]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
64c6023401ce686b12dd6f0f15741bf90547e723
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.451 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20080325.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datadir='${prefix}/share'
175 sysconfdir='${prefix}/etc'
176 sharedstatedir='${prefix}/com'
177 localstatedir='${prefix}/var'
178 libdir='${exec_prefix}/lib'
179 includedir='${prefix}/include'
180 oldincludedir='/usr/include'
181 infodir='${prefix}/info'
182 mandir='${prefix}/man'
183
184 # Identity of this package.
185 PACKAGE_NAME=
186 PACKAGE_TARNAME=
187 PACKAGE_VERSION=
188 PACKAGE_STRING=
189 PACKAGE_BUGREPORT=
190
191 ac_prev=
192 for ac_option
193 do
194   # If the previous option needs an argument, assign it.
195   if test -n "$ac_prev"; then
196     eval "$ac_prev=\$ac_option"
197     ac_prev=
198     continue
199   fi
200
201   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case $ac_option in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir=$ac_optarg ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build_alias ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build_alias=$ac_optarg ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file=$ac_optarg ;;
223
224   --config-cache | -C)
225     cache_file=config.cache ;;
226
227   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228     ac_prev=datadir ;;
229   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230   | --da=*)
231     datadir=$ac_optarg ;;
232
233   -disable-* | --disable-*)
234     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
235     # Reject names that are not valid shell variable names.
236     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
237       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
238    { (exit 1); exit 1; }; }
239     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
240     eval "enable_$ac_feature=no" ;;
241
242   -enable-* | --enable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     case $ac_option in
250       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
251       *) ac_optarg=yes ;;
252     esac
253     eval "enable_$ac_feature='$ac_optarg'" ;;
254
255   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
256   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
257   | --exec | --exe | --ex)
258     ac_prev=exec_prefix ;;
259   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
260   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
261   | --exec=* | --exe=* | --ex=*)
262     exec_prefix=$ac_optarg ;;
263
264   -gas | --gas | --ga | --g)
265     # Obsolete; use --with-gas.
266     with_gas=yes ;;
267
268   -help | --help | --hel | --he | -h)
269     ac_init_help=long ;;
270   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
271     ac_init_help=recursive ;;
272   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
273     ac_init_help=short ;;
274
275   -host | --host | --hos | --ho)
276     ac_prev=host_alias ;;
277   -host=* | --host=* | --hos=* | --ho=*)
278     host_alias=$ac_optarg ;;
279
280   -includedir | --includedir | --includedi | --included | --include \
281   | --includ | --inclu | --incl | --inc)
282     ac_prev=includedir ;;
283   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
284   | --includ=* | --inclu=* | --incl=* | --inc=*)
285     includedir=$ac_optarg ;;
286
287   -infodir | --infodir | --infodi | --infod | --info | --inf)
288     ac_prev=infodir ;;
289   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
290     infodir=$ac_optarg ;;
291
292   -libdir | --libdir | --libdi | --libd)
293     ac_prev=libdir ;;
294   -libdir=* | --libdir=* | --libdi=* | --libd=*)
295     libdir=$ac_optarg ;;
296
297   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
298   | --libexe | --libex | --libe)
299     ac_prev=libexecdir ;;
300   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
301   | --libexe=* | --libex=* | --libe=*)
302     libexecdir=$ac_optarg ;;
303
304   -localstatedir | --localstatedir | --localstatedi | --localstated \
305   | --localstate | --localstat | --localsta | --localst \
306   | --locals | --local | --loca | --loc | --lo)
307     ac_prev=localstatedir ;;
308   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
309   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
310   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
311     localstatedir=$ac_optarg ;;
312
313   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
314     ac_prev=mandir ;;
315   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
316     mandir=$ac_optarg ;;
317
318   -nfp | --nfp | --nf)
319     # Obsolete; use --without-fp.
320     with_fp=no ;;
321
322   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
323   | --no-cr | --no-c)
324     no_create=yes ;;
325
326   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
327   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
328     no_recursion=yes ;;
329
330   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
331   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
332   | --oldin | --oldi | --old | --ol | --o)
333     ac_prev=oldincludedir ;;
334   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
335   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
336   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
337     oldincludedir=$ac_optarg ;;
338
339   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
340     ac_prev=prefix ;;
341   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
342     prefix=$ac_optarg ;;
343
344   -program-prefix | --program-prefix | --program-prefi | --program-pref \
345   | --program-pre | --program-pr | --program-p)
346     ac_prev=program_prefix ;;
347   -program-prefix=* | --program-prefix=* | --program-prefi=* \
348   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
349     program_prefix=$ac_optarg ;;
350
351   -program-suffix | --program-suffix | --program-suffi | --program-suff \
352   | --program-suf | --program-su | --program-s)
353     ac_prev=program_suffix ;;
354   -program-suffix=* | --program-suffix=* | --program-suffi=* \
355   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
356     program_suffix=$ac_optarg ;;
357
358   -program-transform-name | --program-transform-name \
359   | --program-transform-nam | --program-transform-na \
360   | --program-transform-n | --program-transform- \
361   | --program-transform | --program-transfor \
362   | --program-transfo | --program-transf \
363   | --program-trans | --program-tran \
364   | --progr-tra | --program-tr | --program-t)
365     ac_prev=program_transform_name ;;
366   -program-transform-name=* | --program-transform-name=* \
367   | --program-transform-nam=* | --program-transform-na=* \
368   | --program-transform-n=* | --program-transform-=* \
369   | --program-transform=* | --program-transfor=* \
370   | --program-transfo=* | --program-transf=* \
371   | --program-trans=* | --program-tran=* \
372   | --progr-tra=* | --program-tr=* | --program-t=*)
373     program_transform_name=$ac_optarg ;;
374
375   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
376   | -silent | --silent | --silen | --sile | --sil)
377     silent=yes ;;
378
379   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
380     ac_prev=sbindir ;;
381   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
382   | --sbi=* | --sb=*)
383     sbindir=$ac_optarg ;;
384
385   -sharedstatedir | --sharedstatedir | --sharedstatedi \
386   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
387   | --sharedst | --shareds | --shared | --share | --shar \
388   | --sha | --sh)
389     ac_prev=sharedstatedir ;;
390   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
391   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
392   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
393   | --sha=* | --sh=*)
394     sharedstatedir=$ac_optarg ;;
395
396   -site | --site | --sit)
397     ac_prev=site ;;
398   -site=* | --site=* | --sit=*)
399     site=$ac_optarg ;;
400
401   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
402     ac_prev=srcdir ;;
403   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
404     srcdir=$ac_optarg ;;
405
406   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
407   | --syscon | --sysco | --sysc | --sys | --sy)
408     ac_prev=sysconfdir ;;
409   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
410   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
411     sysconfdir=$ac_optarg ;;
412
413   -target | --target | --targe | --targ | --tar | --ta | --t)
414     ac_prev=target_alias ;;
415   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
416     target_alias=$ac_optarg ;;
417
418   -v | -verbose | --verbose | --verbos | --verbo | --verb)
419     verbose=yes ;;
420
421   -version | --version | --versio | --versi | --vers | -V)
422     ac_init_version=: ;;
423
424   -with-* | --with-*)
425     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
426     # Reject names that are not valid shell variable names.
427     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
428       { echo "$as_me: error: invalid package name: $ac_package" >&2
429    { (exit 1); exit 1; }; }
430     ac_package=`echo $ac_package| sed 's/-/_/g'`
431     case $ac_option in
432       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
433       *) ac_optarg=yes ;;
434     esac
435     eval "with_$ac_package='$ac_optarg'" ;;
436
437   -without-* | --without-*)
438     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
439     # Reject names that are not valid shell variable names.
440     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
441       { echo "$as_me: error: invalid package name: $ac_package" >&2
442    { (exit 1); exit 1; }; }
443     ac_package=`echo $ac_package | sed 's/-/_/g'`
444     eval "with_$ac_package=no" ;;
445
446   --x)
447     # Obsolete; use --with-x.
448     with_x=yes ;;
449
450   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451   | --x-incl | --x-inc | --x-in | --x-i)
452     ac_prev=x_includes ;;
453   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455     x_includes=$ac_optarg ;;
456
457   -x-libraries | --x-libraries | --x-librarie | --x-librari \
458   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459     ac_prev=x_libraries ;;
460   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462     x_libraries=$ac_optarg ;;
463
464   -*) { echo "$as_me: error: unrecognized option: $ac_option
465 Try \`$0 --help' for more information." >&2
466    { (exit 1); exit 1; }; }
467     ;;
468
469   *=*)
470     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
471     # Reject names that are not valid shell variable names.
472     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
473       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
474    { (exit 1); exit 1; }; }
475     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
476     eval "$ac_envvar='$ac_optarg'"
477     export $ac_envvar ;;
478
479   *)
480     # FIXME: should be removed in autoconf 3.0.
481     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
482     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
483       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
484     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
485     ;;
486
487   esac
488 done
489
490 if test -n "$ac_prev"; then
491   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
492   { echo "$as_me: error: missing argument to $ac_option" >&2
493    { (exit 1); exit 1; }; }
494 fi
495
496 # Be sure to have absolute paths.
497 for ac_var in exec_prefix prefix
498 do
499   eval ac_val=$`echo $ac_var`
500   case $ac_val in
501     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
502     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503    { (exit 1); exit 1; }; };;
504   esac
505 done
506
507 # Be sure to have absolute paths.
508 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
509               localstatedir libdir includedir oldincludedir infodir mandir
510 do
511   eval ac_val=$`echo $ac_var`
512   case $ac_val in
513     [\\/$]* | ?:[\\/]* ) ;;
514     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
515    { (exit 1); exit 1; }; };;
516   esac
517 done
518
519 # There might be people who depend on the old broken behavior: `$host'
520 # used to hold the argument of --host etc.
521 build=$build_alias
522 host=$host_alias
523 target=$target_alias
524
525 # FIXME: should be removed in autoconf 3.0.
526 if test "x$host_alias" != x; then
527   if test "x$build_alias" = x; then
528     cross_compiling=maybe
529     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
530     If a cross compiler is detected then cross compile mode will be used." >&2
531   elif test "x$build_alias" != "x$host_alias"; then
532     cross_compiling=yes
533   fi
534 fi
535
536 ac_tool_prefix=
537 test -n "$host_alias" && ac_tool_prefix=$host_alias-
538
539 test "$silent" = yes && exec 6>/dev/null
540
541 # Find the source files, if location was not specified.
542 if test -z "$srcdir"; then
543   ac_srcdir_defaulted=yes
544   # Try the directory containing this script, then its parent.
545   ac_prog=$0
546   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
547   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548   srcdir=$ac_confdir
549   if test ! -r $srcdir/$ac_unique_file; then
550     srcdir=..
551   fi
552 else
553   ac_srcdir_defaulted=no
554 fi
555 if test ! -r $srcdir/$ac_unique_file; then
556   if test "$ac_srcdir_defaulted" = yes; then
557     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
558    { (exit 1); exit 1; }; }
559   else
560     { echo "$as_me: error: cannot find sources in $srcdir" >&2
561    { (exit 1); exit 1; }; }
562   fi
563 fi
564 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
565 ac_env_build_alias_set=${build_alias+set}
566 ac_env_build_alias_value=$build_alias
567 ac_cv_env_build_alias_set=${build_alias+set}
568 ac_cv_env_build_alias_value=$build_alias
569 ac_env_host_alias_set=${host_alias+set}
570 ac_env_host_alias_value=$host_alias
571 ac_cv_env_host_alias_set=${host_alias+set}
572 ac_cv_env_host_alias_value=$host_alias
573 ac_env_target_alias_set=${target_alias+set}
574 ac_env_target_alias_value=$target_alias
575 ac_cv_env_target_alias_set=${target_alias+set}
576 ac_cv_env_target_alias_value=$target_alias
577 ac_env_CC_set=${CC+set}
578 ac_env_CC_value=$CC
579 ac_cv_env_CC_set=${CC+set}
580 ac_cv_env_CC_value=$CC
581 ac_env_CFLAGS_set=${CFLAGS+set}
582 ac_env_CFLAGS_value=$CFLAGS
583 ac_cv_env_CFLAGS_set=${CFLAGS+set}
584 ac_cv_env_CFLAGS_value=$CFLAGS
585 ac_env_LDFLAGS_set=${LDFLAGS+set}
586 ac_env_LDFLAGS_value=$LDFLAGS
587 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
588 ac_cv_env_LDFLAGS_value=$LDFLAGS
589 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
590 ac_env_CPPFLAGS_value=$CPPFLAGS
591 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
592 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
593 ac_env_CPP_set=${CPP+set}
594 ac_env_CPP_value=$CPP
595 ac_cv_env_CPP_set=${CPP+set}
596 ac_cv_env_CPP_value=$CPP
597 ac_env_CXX_set=${CXX+set}
598 ac_env_CXX_value=$CXX
599 ac_cv_env_CXX_set=${CXX+set}
600 ac_cv_env_CXX_value=$CXX
601 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
602 ac_env_CXXFLAGS_value=$CXXFLAGS
603 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
604 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
605 ac_env_CXXCPP_set=${CXXCPP+set}
606 ac_env_CXXCPP_value=$CXXCPP
607 ac_cv_env_CXXCPP_set=${CXXCPP+set}
608 ac_cv_env_CXXCPP_value=$CXXCPP
609
610 #
611 # Report the --help message.
612 #
613 if test "$ac_init_help" = "long"; then
614   # Omit some internal or obsolete options to make the list less imposing.
615   # This message is too long to be a string in the A/UX 3.1 sh.
616   cat <<EOF
617 \`configure' configures this package to adapt to many kinds of systems.
618
619 Usage: $0 [OPTION]... [VAR=VALUE]...
620
621 To assign environment variables (e.g., CC, CFLAGS...), specify them as
622 VAR=VALUE.  See below for descriptions of some of the useful variables.
623
624 Defaults for the options are specified in brackets.
625
626 Configuration:
627   -h, --help              display this help and exit
628       --help=short        display options specific to this package
629       --help=recursive    display the short help of all the included packages
630   -V, --version           display version information and exit
631   -q, --quiet, --silent   do not print \`checking...' messages
632       --cache-file=FILE   cache test results in FILE [disabled]
633   -C, --config-cache      alias for \`--cache-file=config.cache'
634   -n, --no-create         do not create output files
635       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
636
637 EOF
638
639   cat <<EOF
640 Installation directories:
641   --prefix=PREFIX         install architecture-independent files in PREFIX
642                           [$ac_default_prefix]
643   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
644                           [PREFIX]
645
646 By default, \`make install' will install all the files in
647 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
648 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
649 for instance \`--prefix=\$HOME'.
650
651 For better control, use the options below.
652
653 Fine tuning of the installation directories:
654   --bindir=DIR            user executables [EPREFIX/bin]
655   --sbindir=DIR           system admin executables [EPREFIX/sbin]
656   --libexecdir=DIR        program executables [EPREFIX/libexec]
657   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
658   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
659   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
660   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
661   --libdir=DIR            object code libraries [EPREFIX/lib]
662   --includedir=DIR        C header files [PREFIX/include]
663   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
664   --infodir=DIR           info documentation [PREFIX/info]
665   --mandir=DIR            man documentation [PREFIX/man]
666 EOF
667
668   cat <<\EOF
669
670 Program names:
671   --program-prefix=PREFIX            prepend PREFIX to installed program names
672   --program-suffix=SUFFIX            append SUFFIX to installed program names
673   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
674
675 System types:
676   --build=BUILD           configure for building on BUILD [guessed]
677   --host=HOST       build programs to run on HOST [BUILD]
678   --target=TARGET   configure for building compilers for TARGET [HOST]
679 EOF
680 fi
681
682 if test -n "$ac_init_help"; then
683
684   cat <<\EOF
685
686 Optional Packages:
687   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
688   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
689
690 Optional Features:
691   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
692   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
693
694   --with-rel-version=XXX  override derived release version
695   --with-abi-version=XXX  override derived ABI version
696   --with-system-type=XXX  test: override derived host system-type
697   --without-cxx           do not adjust ncurses bool to match C++
698   --without-cxx-binding   do not build C++ binding and demo
699   --without-ada           suppress check for Ada95, don't build demo
700   --without-progs         suppress build with programs (e.g., tic)
701   --without-curses-h      install curses.h as ncurses.h only
702   --enable-mixed-case     tic should assume mixed-case filenames
703   --with-install-prefix   prefixes actual install-location ($DESTDIR)
704 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
705   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
706   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
707   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
708   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
709   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
710   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
711 Options to Specify the Libraries Built/Used:
712   --with-libtool          generate libraries with libtool
713   --with-shared           generate shared-libraries
714   --with-normal           generate normal-libraries (default)
715   --with-debug            generate debug-libraries (default)
716   --with-profile          generate profile-libraries
717   --with-termlib          generate separate terminfo library
718   --with-ticlib           generate separate tic library
719   --with-gpm              use Alessandro Rubini's GPM library
720   --without-dlsym         do not use dlsym() to load GPM dynamically
721   --with-sysmouse         use sysmouse (FreeBSD console)
722   --enable-rpath          use rpath option when generating shared libraries
723   --disable-relink        relink shared libraries during install
724   --with-shlib-version=X  Specify rel or abi version for shared libs
725 Fine-Tuning Your Configuration:
726   --disable-overwrite     leave out the link to -lcurses
727   --disable-database      do not use terminfo, only fallbacks/termcap
728   --with-database=XXX     specify terminfo source to install
729   --with-hashed-db        specify hashed-database library
730   --with-fallbacks=XXX    specify list of fallback terminal descriptions
731   --without-xterm-new     specify if xterm terminfo should be old version
732   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
733   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
734   --disable-big-core      assume machine has little memory
735   --disable-big-strings   assume compiler has only standard-size strings
736   --enable-termcap        compile in termcap fallback support
737   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
738   --enable-getcap         fast termcap load, no xrefs to terminfo
739   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
740   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
741   --disable-root-environ  restrict environment when running as root
742   --enable-symlinks       make tic use symbolic links not hard links
743   --enable-broken_linker  compile with broken-linker support code
744   --enable-bsdpad         recognize BSD-style prefix padding
745   --enable-widec          compile with wide-char/UTF-8 code
746   --disable-lp64          allow chtype to be long (ignore _LP64)
747   --disable-largefile     omit support for large files
748   --disable-tparm-varargs compile tparm() without varargs interface
749   --with-bool=TYPE        override fallback type of bool variable
750   --with-caps=alt         compile with alternate Caps file
751   --with-chtype=TYPE      override type of chtype
752   --with-ospeed=TYPE      override type of ospeed variable
753   --with-mmask-t=TYPE     override type of mmask_t
754   --with-rcs-ids          compile-in RCS identifiers
755 Options to Specify How Manpages are Installed:
756   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
757                           optionally formatted/catonly, e.g., gzip,formatted
758   --with-manpage-renames  specify manpage-renaming
759   --with-manpage-aliases  specify manpage-aliases using .so
760   --with-manpage-symlinks specify manpage-aliases using symlinks
761   --with-manpage-tbl      specify manpage processing with tbl
762 Extensions:
763   --disable-ext-funcs     disable function-extensions
764   --enable-const          compile with extra/non-standard const
765   --enable-ext-colors     compile for 256-color support
766   --enable-ext-mouse      compile for extended mouse-encoding
767   --enable-no-padding     compile with $NCURSES_NO_PADDING code
768   --enable-signed-char    compile using signed Boolean's in term.h
769   --enable-sigwinch       compile with SIGWINCH handler
770   --enable-tcap-names     compile with user-definable terminal capabilities
771 Development Code:
772   --without-develop       disable development options
773   --enable-hard-tabs      compile with hard-tabs code
774   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
775 Experimental Code:
776   --disable-assumed-color do not assume anything about default-colors
777   --disable-hashmap       compile without hashmap scrolling-optimization
778   --enable-colorfgbg      compile with $COLORFGBG code
779   --with-pthread          use POSIX thread library
780   --enable-weak-symbols   enable weak-symbols for pthreads
781   --enable-reentrant      compile with experimental reentrant code
782   --enable-safe-sprintf   compile with experimental safe-sprintf code
783   --disable-scroll-hints  compile without scroll-hints code
784   --enable-wgetch-events  compile with experimental wgetch-events code
785 Testing/development Options:
786   --enable-echo           build: display "compiling" commands (default)
787   --enable-warnings       build: turn on GCC compiler warnings
788   --enable-assertions     test: turn on generation of assertion code
789   --with-dmalloc          test: use Gray Watson's dmalloc library
790   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
791   --with-valgrind         test: use valgrind
792   --disable-leaks         test: free permanent memory, analyze leaks
793   --enable-expanded       test: generate functions for certain macros
794   --disable-macros        test: use functions rather than macros
795   --with-trace            test: add trace() function to all models of ncurses
796 Ada95 Binding Options:
797   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
798   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
799   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
800
801 Some influential environment variables:
802   CC          C compiler command
803   CFLAGS      C compiler flags
804   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
805               nonstandard directory <lib dir>
806   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
807               headers in a nonstandard directory <include dir>
808   CPP         C preprocessor
809   CXX         C++ compiler command
810   CXXFLAGS    C++ compiler flags
811   CXXCPP      C++ preprocessor
812
813 Use these variables to override the choices made by `configure' or to help
814 it to find libraries and programs with nonstandard names/locations.
815
816 EOF
817 fi
818
819 if test "$ac_init_help" = "recursive"; then
820   # If there are subdirs, report their specific --help.
821   ac_popdir=`pwd`
822   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
823     cd $ac_subdir
824     # A "../" for each directory in /$ac_subdir.
825     ac_dots=`echo $ac_subdir |
826              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
827
828     case $srcdir in
829     .) # No --srcdir option.  We are building in place.
830       ac_sub_srcdir=$srcdir ;;
831     [\\/]* | ?:[\\/]* ) # Absolute path.
832       ac_sub_srcdir=$srcdir/$ac_subdir ;;
833     *) # Relative path.
834       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
835     esac
836
837     # Check for guested configure; otherwise get Cygnus style configure.
838     if test -f $ac_sub_srcdir/configure.gnu; then
839       echo
840       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
841     elif test -f $ac_sub_srcdir/configure; then
842       echo
843       $SHELL $ac_sub_srcdir/configure  --help=recursive
844     elif test -f $ac_sub_srcdir/configure.ac ||
845            test -f $ac_sub_srcdir/configure.in; then
846       echo
847       $ac_configure --help
848     else
849       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
850     fi
851     cd $ac_popdir
852   done
853 fi
854
855 test -n "$ac_init_help" && exit 0
856 if $ac_init_version; then
857   cat <<\EOF
858
859 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
860 Free Software Foundation, Inc.
861 This configure script is free software; the Free Software Foundation
862 gives unlimited permission to copy, distribute and modify it.
863 EOF
864   exit 0
865 fi
866 exec 5>config.log
867 cat >&5 <<EOF
868 This file contains any messages produced by compilers while
869 running configure, to aid debugging if configure makes a mistake.
870
871 It was created by $as_me, which was
872 generated by GNU Autoconf 2.52.20080325.  Invocation command line was
873
874   $ $0 $@
875
876 EOF
877 {
878 cat <<_ASUNAME
879 ## ---------- ##
880 ## Platform.  ##
881 ## ---------- ##
882
883 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
884 uname -m = `(uname -m) 2>/dev/null || echo unknown`
885 uname -r = `(uname -r) 2>/dev/null || echo unknown`
886 uname -s = `(uname -s) 2>/dev/null || echo unknown`
887 uname -v = `(uname -v) 2>/dev/null || echo unknown`
888
889 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
890 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
891
892 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
893 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
894 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
895 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
896 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
897 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
898 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
899
900 PATH = $PATH
901
902 _ASUNAME
903 } >&5
904
905 cat >&5 <<EOF
906 ## ------------ ##
907 ## Core tests.  ##
908 ## ------------ ##
909
910 EOF
911
912 # Keep a trace of the command line.
913 # Strip out --no-create and --no-recursion so they do not pile up.
914 # Also quote any args containing shell meta-characters.
915 ac_configure_args=
916 ac_sep=
917 for ac_arg
918 do
919   case $ac_arg in
920   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
921   | --no-cr | --no-c) ;;
922   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
923   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
924   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
925     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
926     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
927     ac_sep=" " ;;
928   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
929      ac_sep=" " ;;
930   esac
931   # Get rid of the leading space.
932 done
933
934 # When interrupted or exit'd, cleanup temporary files, and complete
935 # config.log.  We remove comments because anyway the quotes in there
936 # would cause problems or look ugly.
937 trap 'exit_status=$?
938   # Save into config.log some information that might help in debugging.
939   echo >&5
940   echo "## ----------------- ##" >&5
941   echo "## Cache variables.  ##" >&5
942   echo "## ----------------- ##" >&5
943   echo >&5
944   # The following way of writing the cache mishandles newlines in values,
945 {
946   (set) 2>&1 |
947     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
948     *ac_space=\ *)
949       sed -n \
950         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
951           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
952       ;;
953     *)
954       sed -n \
955         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
956       ;;
957     esac;
958 } >&5
959   sed "/^$/d" confdefs.h >conftest.log
960   if test -s conftest.log; then
961     echo >&5
962     echo "## ------------ ##" >&5
963     echo "## confdefs.h.  ##" >&5
964     echo "## ------------ ##" >&5
965     echo >&5
966     cat conftest.log >&5
967   fi
968   (echo; echo) >&5
969   test "$ac_signal" != 0 &&
970     echo "$as_me: caught signal $ac_signal" >&5
971   echo "$as_me: exit $exit_status" >&5
972   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
973     exit $exit_status
974      ' 0
975 for ac_signal in 1 2 13 15; do
976   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
977 done
978 ac_signal=0
979
980 # confdefs.h avoids OS command line length limits that DEFS can exceed.
981 rm -rf conftest* confdefs.h
982 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
983 echo >confdefs.h
984
985 # Let the site file select an alternate cache file if it wants to.
986 # Prefer explicitly selected file to automatically selected ones.
987 if test -z "$CONFIG_SITE"; then
988   if test "x$prefix" != xNONE; then
989     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
990   else
991     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
992   fi
993 fi
994 for ac_site_file in $CONFIG_SITE; do
995   if test -r "$ac_site_file"; then
996     { echo "$as_me:996: loading site script $ac_site_file" >&5
997 echo "$as_me: loading site script $ac_site_file" >&6;}
998     cat "$ac_site_file" >&5
999     . "$ac_site_file"
1000   fi
1001 done
1002
1003 if test -r "$cache_file"; then
1004   # Some versions of bash will fail to source /dev/null (special
1005   # files actually), so we avoid doing that.
1006   if test -f "$cache_file"; then
1007     { echo "$as_me:1007: loading cache $cache_file" >&5
1008 echo "$as_me: loading cache $cache_file" >&6;}
1009     case $cache_file in
1010       [\\/]* | ?:[\\/]* ) . $cache_file;;
1011       *)                      . ./$cache_file;;
1012     esac
1013   fi
1014 else
1015   { echo "$as_me:1015: creating cache $cache_file" >&5
1016 echo "$as_me: creating cache $cache_file" >&6;}
1017   >$cache_file
1018 fi
1019
1020 # Check that the precious variables saved in the cache have kept the same
1021 # value.
1022 ac_cache_corrupted=false
1023 for ac_var in `(set) 2>&1 |
1024                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1025   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1026   eval ac_new_set=\$ac_env_${ac_var}_set
1027   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1028   eval ac_new_val="\$ac_env_${ac_var}_value"
1029   case $ac_old_set,$ac_new_set in
1030     set,)
1031       { echo "$as_me:1031: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1032 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1033       ac_cache_corrupted=: ;;
1034     ,set)
1035       { echo "$as_me:1035: error: \`$ac_var' was not set in the previous run" >&5
1036 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1037       ac_cache_corrupted=: ;;
1038     ,);;
1039     *)
1040       if test "x$ac_old_val" != "x$ac_new_val"; then
1041         { echo "$as_me:1041: error: \`$ac_var' has changed since the previous run:" >&5
1042 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1043         { echo "$as_me:1043:   former value:  $ac_old_val" >&5
1044 echo "$as_me:   former value:  $ac_old_val" >&2;}
1045         { echo "$as_me:1045:   current value: $ac_new_val" >&5
1046 echo "$as_me:   current value: $ac_new_val" >&2;}
1047         ac_cache_corrupted=:
1048       fi;;
1049   esac
1050   # Pass precious variables to config.status.  It doesn't matter if
1051   # we pass some twice (in addition to the command line arguments).
1052   if test "$ac_new_set" = set; then
1053     case $ac_new_val in
1054     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1055       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1056       ac_configure_args="$ac_configure_args '$ac_arg'"
1057       ;;
1058     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1059        ;;
1060     esac
1061   fi
1062 done
1063 if $ac_cache_corrupted; then
1064   { echo "$as_me:1064: error: changes in the environment can compromise the build" >&5
1065 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1066   { { echo "$as_me:1066: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1067 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1068    { (exit 1); exit 1; }; }
1069 fi
1070
1071 ac_ext=c
1072 ac_cpp='$CPP $CPPFLAGS'
1073 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1074 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1075 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1076 ac_main_return=return
1077
1078 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1079   *c*,-n*) ECHO_N= ECHO_C='
1080 ' ECHO_T='      ' ;;
1081   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1082   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1083 esac
1084 echo "#! $SHELL" >conftest.sh
1085 echo  "exit 0"   >>conftest.sh
1086 chmod +x conftest.sh
1087 if { (echo "$as_me:1087: PATH=\".;.\"; conftest.sh") >&5
1088   (PATH=".;."; conftest.sh) 2>&5
1089   ac_status=$?
1090   echo "$as_me:1090: \$? = $ac_status" >&5
1091   (exit $ac_status); }; then
1092   ac_path_separator=';'
1093 else
1094   ac_path_separator=:
1095 fi
1096 PATH_SEPARATOR="$ac_path_separator"
1097 rm -f conftest.sh
1098
1099 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1100
1101 top_builddir=`pwd`
1102
1103 echo "$as_me:1103: checking for egrep" >&5
1104 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1105 if test "${ac_cv_prog_egrep+set}" = set; then
1106   echo $ECHO_N "(cached) $ECHO_C" >&6
1107 else
1108   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1109     then ac_cv_prog_egrep='grep -E'
1110     else ac_cv_prog_egrep='egrep'
1111     fi
1112 fi
1113 echo "$as_me:1113: result: $ac_cv_prog_egrep" >&5
1114 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1115  EGREP=$ac_cv_prog_egrep
1116
1117 test -z "$EGREP" && { { echo "$as_me:1117: error: No egrep program found" >&5
1118 echo "$as_me: error: No egrep program found" >&2;}
1119    { (exit 1); exit 1; }; }
1120
1121 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1122 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1123 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1124 cf_cv_abi_version=${NCURSES_MAJOR}
1125 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1126 cf_cv_timestamp=`date`
1127 echo "$as_me:1127: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1128 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1129
1130 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1131
1132 # Check whether --with-rel-version or --without-rel-version was given.
1133 if test "${with_rel_version+set}" = set; then
1134   withval="$with_rel_version"
1135   { echo "$as_me:1135: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1136 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1137  cf_cv_rel_version=$withval
1138 fi;
1139
1140  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1141  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1142
1143 if test -n "$NCURSES_MAJOR" ; then
1144   case $NCURSES_MAJOR in #(vi
1145   [0-9]*) #(vi
1146         ;;
1147   *)
1148         { { echo "$as_me:1148: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1149 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1150    { (exit 1); exit 1; }; }
1151         ;;
1152   esac
1153 else
1154   { { echo "$as_me:1154: error: Release major-version value is empty" >&5
1155 echo "$as_me: error: Release major-version value is empty" >&2;}
1156    { (exit 1); exit 1; }; }
1157 fi
1158
1159 if test -n "$NCURSES_MINOR" ; then
1160   case $NCURSES_MINOR in #(vi
1161   [0-9]*) #(vi
1162         ;;
1163   *)
1164         { { echo "$as_me:1164: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1165 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1166    { (exit 1); exit 1; }; }
1167         ;;
1168   esac
1169 else
1170   { { echo "$as_me:1170: error: Release minor-version value is empty" >&5
1171 echo "$as_me: error: Release minor-version value is empty" >&2;}
1172    { (exit 1); exit 1; }; }
1173 fi
1174
1175 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1176
1177 # Check whether --with-abi-version or --without-abi-version was given.
1178 if test "${with_abi_version+set}" = set; then
1179   withval="$with_abi_version"
1180   { echo "$as_me:1180: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1181 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1182  cf_cv_abi_version=$withval
1183 fi;
1184
1185 if test -n "$cf_cv_abi_version" ; then
1186   case $cf_cv_abi_version in #(vi
1187   [0-9]*) #(vi
1188         ;;
1189   *)
1190         { { echo "$as_me:1190: error: ABI version is not a number: $cf_cv_abi_version" >&5
1191 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1192    { (exit 1); exit 1; }; }
1193         ;;
1194   esac
1195 else
1196   { { echo "$as_me:1196: error: ABI version value is empty" >&5
1197 echo "$as_me: error: ABI version value is empty" >&2;}
1198    { (exit 1); exit 1; }; }
1199 fi
1200
1201 ac_aux_dir=
1202 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1203   if test -f $ac_dir/install-sh; then
1204     ac_aux_dir=$ac_dir
1205     ac_install_sh="$ac_aux_dir/install-sh -c"
1206     break
1207   elif test -f $ac_dir/install.sh; then
1208     ac_aux_dir=$ac_dir
1209     ac_install_sh="$ac_aux_dir/install.sh -c"
1210     break
1211   elif test -f $ac_dir/shtool; then
1212     ac_aux_dir=$ac_dir
1213     ac_install_sh="$ac_aux_dir/shtool install -c"
1214     break
1215   fi
1216 done
1217 if test -z "$ac_aux_dir"; then
1218   { { echo "$as_me:1218: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1219 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1220    { (exit 1); exit 1; }; }
1221 fi
1222 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1223 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1224 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1225
1226 # Make sure we can run config.sub.
1227 $ac_config_sub sun4 >/dev/null 2>&1 ||
1228   { { echo "$as_me:1228: error: cannot run $ac_config_sub" >&5
1229 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1230    { (exit 1); exit 1; }; }
1231
1232 echo "$as_me:1232: checking build system type" >&5
1233 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1234 if test "${ac_cv_build+set}" = set; then
1235   echo $ECHO_N "(cached) $ECHO_C" >&6
1236 else
1237   ac_cv_build_alias=$build_alias
1238 test -z "$ac_cv_build_alias" &&
1239   ac_cv_build_alias=`$ac_config_guess`
1240 test -z "$ac_cv_build_alias" &&
1241   { { echo "$as_me:1241: error: cannot guess build type; you must specify one" >&5
1242 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1243    { (exit 1); exit 1; }; }
1244 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1245   { { echo "$as_me:1245: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1246 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1247    { (exit 1); exit 1; }; }
1248
1249 fi
1250 echo "$as_me:1250: result: $ac_cv_build" >&5
1251 echo "${ECHO_T}$ac_cv_build" >&6
1252 build=$ac_cv_build
1253 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1254 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1255 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1256
1257 echo "$as_me:1257: checking host system type" >&5
1258 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1259 if test "${ac_cv_host+set}" = set; then
1260   echo $ECHO_N "(cached) $ECHO_C" >&6
1261 else
1262   ac_cv_host_alias=$host_alias
1263 test -z "$ac_cv_host_alias" &&
1264   ac_cv_host_alias=$ac_cv_build_alias
1265 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1266   { { echo "$as_me:1266: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1267 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1268    { (exit 1); exit 1; }; }
1269
1270 fi
1271 echo "$as_me:1271: result: $ac_cv_host" >&5
1272 echo "${ECHO_T}$ac_cv_host" >&6
1273 host=$ac_cv_host
1274 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1275 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1276 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1277
1278 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1279         echo "$as_me:1279: checking target system type" >&5
1280 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1281 if test "${ac_cv_target+set}" = set; then
1282   echo $ECHO_N "(cached) $ECHO_C" >&6
1283 else
1284   ac_cv_target_alias=$target_alias
1285 test "x$ac_cv_target_alias" = "x" &&
1286   ac_cv_target_alias=$ac_cv_host_alias
1287 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1288   { { echo "$as_me:1288: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1289 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1290    { (exit 1); exit 1; }; }
1291
1292 fi
1293 echo "$as_me:1293: result: $ac_cv_target" >&5
1294 echo "${ECHO_T}$ac_cv_target" >&6
1295 target=$ac_cv_target
1296 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1297 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1298 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1299
1300 # The aliases save the names the user supplied, while $host etc.
1301 # will get canonicalized.
1302 test -n "$target_alias" &&
1303   test "$program_prefix$program_suffix$program_transform_name" = \
1304     NONENONEs,x,x, &&
1305   program_prefix=${target_alias}-
1306         system_name="$host_os"
1307 else
1308         system_name="`(uname -s -r) 2>/dev/null`"
1309         if test -z "$system_name" ; then
1310                 system_name="`(hostname) 2>/dev/null`"
1311         fi
1312 fi
1313 test -n "$system_name" && cat >>confdefs.h <<EOF
1314 #define SYSTEM_NAME "$system_name"
1315 EOF
1316
1317 if test "${cf_cv_system_name+set}" = set; then
1318   echo $ECHO_N "(cached) $ECHO_C" >&6
1319 else
1320   cf_cv_system_name="$system_name"
1321 fi
1322
1323 test -z "$system_name" && system_name="$cf_cv_system_name"
1324 test -n "$cf_cv_system_name" && echo "$as_me:1324: result: Configuring for $cf_cv_system_name" >&5
1325 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1326
1327 if test ".$system_name" != ".$cf_cv_system_name" ; then
1328         echo "$as_me:1328: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1329 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1330         { { echo "$as_me:1330: error: \"Please remove config.cache and try again.\"" >&5
1331 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1332    { (exit 1); exit 1; }; }
1333 fi
1334
1335 # Check whether --with-system-type or --without-system-type was given.
1336 if test "${with_system_type+set}" = set; then
1337   withval="$with_system_type"
1338   { echo "$as_me:1338: WARNING: overriding system type to $withval" >&5
1339 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1340  cf_cv_system_name=$withval
1341 fi;
1342
1343 ###     Save the given $CFLAGS to allow user-override.
1344 cf_user_CFLAGS="$CFLAGS"
1345
1346 ###     Default install-location
1347
1348 echo "$as_me:1348: checking for prefix" >&5
1349 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1350 if test "x$prefix" = "xNONE" ; then
1351         case "$cf_cv_system_name" in
1352                 # non-vendor systems don't have a conflict
1353         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1354                 prefix=/usr
1355                 ;;
1356         *)      prefix=$ac_default_prefix
1357                 ;;
1358         esac
1359 fi
1360 echo "$as_me:1360: result: $prefix" >&5
1361 echo "${ECHO_T}$prefix" >&6
1362
1363 if test "x$prefix" = "xNONE" ; then
1364 echo "$as_me:1364: checking for default include-directory" >&5
1365 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1366 test -n "$verbose" && echo 1>&6
1367 for cf_symbol in \
1368         $includedir \
1369         $includedir/ncurses \
1370         $prefix/include \
1371         $prefix/include/ncurses \
1372         /usr/local/include \
1373         /usr/local/include/ncurses \
1374         /usr/include \
1375         /usr/include/ncurses
1376 do
1377         cf_dir=`eval echo $cf_symbol`
1378         if test -f $cf_dir/curses.h ; then
1379         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1380                 includedir="$cf_symbol"
1381                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1382                 break
1383         fi
1384         fi
1385         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1386 done
1387 echo "$as_me:1387: result: $includedir" >&5
1388 echo "${ECHO_T}$includedir" >&6
1389 fi
1390
1391 ###     Checks for programs.
1392 ac_ext=c
1393 ac_cpp='$CPP $CPPFLAGS'
1394 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1395 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1396 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1397 ac_main_return=return
1398 if test -n "$ac_tool_prefix"; then
1399   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1400 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1401 echo "$as_me:1401: checking for $ac_word" >&5
1402 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1403 if test "${ac_cv_prog_CC+set}" = set; then
1404   echo $ECHO_N "(cached) $ECHO_C" >&6
1405 else
1406   if test -n "$CC"; then
1407   ac_cv_prog_CC="$CC" # Let the user override the test.
1408 else
1409   ac_save_IFS=$IFS; IFS=$ac_path_separator
1410 ac_dummy="$PATH"
1411 for ac_dir in $ac_dummy; do
1412   IFS=$ac_save_IFS
1413   test -z "$ac_dir" && ac_dir=.
1414   $as_executable_p "$ac_dir/$ac_word" || continue
1415 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1416 echo "$as_me:1416: found $ac_dir/$ac_word" >&5
1417 break
1418 done
1419
1420 fi
1421 fi
1422 CC=$ac_cv_prog_CC
1423 if test -n "$CC"; then
1424   echo "$as_me:1424: result: $CC" >&5
1425 echo "${ECHO_T}$CC" >&6
1426 else
1427   echo "$as_me:1427: result: no" >&5
1428 echo "${ECHO_T}no" >&6
1429 fi
1430
1431 fi
1432 if test -z "$ac_cv_prog_CC"; then
1433   ac_ct_CC=$CC
1434   # Extract the first word of "gcc", so it can be a program name with args.
1435 set dummy gcc; ac_word=$2
1436 echo "$as_me:1436: checking for $ac_word" >&5
1437 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1438 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1439   echo $ECHO_N "(cached) $ECHO_C" >&6
1440 else
1441   if test -n "$ac_ct_CC"; then
1442   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1443 else
1444   ac_save_IFS=$IFS; IFS=$ac_path_separator
1445 ac_dummy="$PATH"
1446 for ac_dir in $ac_dummy; do
1447   IFS=$ac_save_IFS
1448   test -z "$ac_dir" && ac_dir=.
1449   $as_executable_p "$ac_dir/$ac_word" || continue
1450 ac_cv_prog_ac_ct_CC="gcc"
1451 echo "$as_me:1451: found $ac_dir/$ac_word" >&5
1452 break
1453 done
1454
1455 fi
1456 fi
1457 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1458 if test -n "$ac_ct_CC"; then
1459   echo "$as_me:1459: result: $ac_ct_CC" >&5
1460 echo "${ECHO_T}$ac_ct_CC" >&6
1461 else
1462   echo "$as_me:1462: result: no" >&5
1463 echo "${ECHO_T}no" >&6
1464 fi
1465
1466   CC=$ac_ct_CC
1467 else
1468   CC="$ac_cv_prog_CC"
1469 fi
1470
1471 if test -z "$CC"; then
1472   if test -n "$ac_tool_prefix"; then
1473   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1474 set dummy ${ac_tool_prefix}cc; ac_word=$2
1475 echo "$as_me:1475: checking for $ac_word" >&5
1476 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1477 if test "${ac_cv_prog_CC+set}" = set; then
1478   echo $ECHO_N "(cached) $ECHO_C" >&6
1479 else
1480   if test -n "$CC"; then
1481   ac_cv_prog_CC="$CC" # Let the user override the test.
1482 else
1483   ac_save_IFS=$IFS; IFS=$ac_path_separator
1484 ac_dummy="$PATH"
1485 for ac_dir in $ac_dummy; do
1486   IFS=$ac_save_IFS
1487   test -z "$ac_dir" && ac_dir=.
1488   $as_executable_p "$ac_dir/$ac_word" || continue
1489 ac_cv_prog_CC="${ac_tool_prefix}cc"
1490 echo "$as_me:1490: found $ac_dir/$ac_word" >&5
1491 break
1492 done
1493
1494 fi
1495 fi
1496 CC=$ac_cv_prog_CC
1497 if test -n "$CC"; then
1498   echo "$as_me:1498: result: $CC" >&5
1499 echo "${ECHO_T}$CC" >&6
1500 else
1501   echo "$as_me:1501: result: no" >&5
1502 echo "${ECHO_T}no" >&6
1503 fi
1504
1505 fi
1506 if test -z "$ac_cv_prog_CC"; then
1507   ac_ct_CC=$CC
1508   # Extract the first word of "cc", so it can be a program name with args.
1509 set dummy cc; ac_word=$2
1510 echo "$as_me:1510: checking for $ac_word" >&5
1511 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1512 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1513   echo $ECHO_N "(cached) $ECHO_C" >&6
1514 else
1515   if test -n "$ac_ct_CC"; then
1516   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1517 else
1518   ac_save_IFS=$IFS; IFS=$ac_path_separator
1519 ac_dummy="$PATH"
1520 for ac_dir in $ac_dummy; do
1521   IFS=$ac_save_IFS
1522   test -z "$ac_dir" && ac_dir=.
1523   $as_executable_p "$ac_dir/$ac_word" || continue
1524 ac_cv_prog_ac_ct_CC="cc"
1525 echo "$as_me:1525: found $ac_dir/$ac_word" >&5
1526 break
1527 done
1528
1529 fi
1530 fi
1531 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1532 if test -n "$ac_ct_CC"; then
1533   echo "$as_me:1533: result: $ac_ct_CC" >&5
1534 echo "${ECHO_T}$ac_ct_CC" >&6
1535 else
1536   echo "$as_me:1536: result: no" >&5
1537 echo "${ECHO_T}no" >&6
1538 fi
1539
1540   CC=$ac_ct_CC
1541 else
1542   CC="$ac_cv_prog_CC"
1543 fi
1544
1545 fi
1546 if test -z "$CC"; then
1547   # Extract the first word of "cc", so it can be a program name with args.
1548 set dummy cc; ac_word=$2
1549 echo "$as_me:1549: checking for $ac_word" >&5
1550 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1551 if test "${ac_cv_prog_CC+set}" = set; then
1552   echo $ECHO_N "(cached) $ECHO_C" >&6
1553 else
1554   if test -n "$CC"; then
1555   ac_cv_prog_CC="$CC" # Let the user override the test.
1556 else
1557   ac_prog_rejected=no
1558   ac_save_IFS=$IFS; IFS=$ac_path_separator
1559 ac_dummy="$PATH"
1560 for ac_dir in $ac_dummy; do
1561   IFS=$ac_save_IFS
1562   test -z "$ac_dir" && ac_dir=.
1563   $as_executable_p "$ac_dir/$ac_word" || continue
1564 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1565   ac_prog_rejected=yes
1566   continue
1567 fi
1568 ac_cv_prog_CC="cc"
1569 echo "$as_me:1569: found $ac_dir/$ac_word" >&5
1570 break
1571 done
1572
1573 if test $ac_prog_rejected = yes; then
1574   # We found a bogon in the path, so make sure we never use it.
1575   set dummy $ac_cv_prog_CC
1576   shift
1577   if test $# != 0; then
1578     # We chose a different compiler from the bogus one.
1579     # However, it has the same basename, so the bogon will be chosen
1580     # first if we set CC to just the basename; use the full file name.
1581     shift
1582     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1583     shift
1584     ac_cv_prog_CC="$@"
1585   fi
1586 fi
1587 fi
1588 fi
1589 CC=$ac_cv_prog_CC
1590 if test -n "$CC"; then
1591   echo "$as_me:1591: result: $CC" >&5
1592 echo "${ECHO_T}$CC" >&6
1593 else
1594   echo "$as_me:1594: result: no" >&5
1595 echo "${ECHO_T}no" >&6
1596 fi
1597
1598 fi
1599 if test -z "$CC"; then
1600   if test -n "$ac_tool_prefix"; then
1601   for ac_prog in cl
1602   do
1603     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1604 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1605 echo "$as_me:1605: checking for $ac_word" >&5
1606 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1607 if test "${ac_cv_prog_CC+set}" = set; then
1608   echo $ECHO_N "(cached) $ECHO_C" >&6
1609 else
1610   if test -n "$CC"; then
1611   ac_cv_prog_CC="$CC" # Let the user override the test.
1612 else
1613   ac_save_IFS=$IFS; IFS=$ac_path_separator
1614 ac_dummy="$PATH"
1615 for ac_dir in $ac_dummy; do
1616   IFS=$ac_save_IFS
1617   test -z "$ac_dir" && ac_dir=.
1618   $as_executable_p "$ac_dir/$ac_word" || continue
1619 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1620 echo "$as_me:1620: found $ac_dir/$ac_word" >&5
1621 break
1622 done
1623
1624 fi
1625 fi
1626 CC=$ac_cv_prog_CC
1627 if test -n "$CC"; then
1628   echo "$as_me:1628: result: $CC" >&5
1629 echo "${ECHO_T}$CC" >&6
1630 else
1631   echo "$as_me:1631: result: no" >&5
1632 echo "${ECHO_T}no" >&6
1633 fi
1634
1635     test -n "$CC" && break
1636   done
1637 fi
1638 if test -z "$CC"; then
1639   ac_ct_CC=$CC
1640   for ac_prog in cl
1641 do
1642   # Extract the first word of "$ac_prog", so it can be a program name with args.
1643 set dummy $ac_prog; ac_word=$2
1644 echo "$as_me:1644: checking for $ac_word" >&5
1645 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1646 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1647   echo $ECHO_N "(cached) $ECHO_C" >&6
1648 else
1649   if test -n "$ac_ct_CC"; then
1650   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1651 else
1652   ac_save_IFS=$IFS; IFS=$ac_path_separator
1653 ac_dummy="$PATH"
1654 for ac_dir in $ac_dummy; do
1655   IFS=$ac_save_IFS
1656   test -z "$ac_dir" && ac_dir=.
1657   $as_executable_p "$ac_dir/$ac_word" || continue
1658 ac_cv_prog_ac_ct_CC="$ac_prog"
1659 echo "$as_me:1659: found $ac_dir/$ac_word" >&5
1660 break
1661 done
1662
1663 fi
1664 fi
1665 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1666 if test -n "$ac_ct_CC"; then
1667   echo "$as_me:1667: result: $ac_ct_CC" >&5
1668 echo "${ECHO_T}$ac_ct_CC" >&6
1669 else
1670   echo "$as_me:1670: result: no" >&5
1671 echo "${ECHO_T}no" >&6
1672 fi
1673
1674   test -n "$ac_ct_CC" && break
1675 done
1676
1677   CC=$ac_ct_CC
1678 fi
1679
1680 fi
1681
1682 test -z "$CC" && { { echo "$as_me:1682: error: no acceptable cc found in \$PATH" >&5
1683 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1684    { (exit 1); exit 1; }; }
1685
1686 # Provide some information about the compiler.
1687 echo "$as_me:1687:" \
1688      "checking for C compiler version" >&5
1689 ac_compiler=`set X $ac_compile; echo $2`
1690 { (eval echo "$as_me:1690: \"$ac_compiler --version </dev/null >&5\"") >&5
1691   (eval $ac_compiler --version </dev/null >&5) 2>&5
1692   ac_status=$?
1693   echo "$as_me:1693: \$? = $ac_status" >&5
1694   (exit $ac_status); }
1695 { (eval echo "$as_me:1695: \"$ac_compiler -v </dev/null >&5\"") >&5
1696   (eval $ac_compiler -v </dev/null >&5) 2>&5
1697   ac_status=$?
1698   echo "$as_me:1698: \$? = $ac_status" >&5
1699   (exit $ac_status); }
1700 { (eval echo "$as_me:1700: \"$ac_compiler -V </dev/null >&5\"") >&5
1701   (eval $ac_compiler -V </dev/null >&5) 2>&5
1702   ac_status=$?
1703   echo "$as_me:1703: \$? = $ac_status" >&5
1704   (exit $ac_status); }
1705
1706 cat >conftest.$ac_ext <<_ACEOF
1707 #line 1707 "configure"
1708 #include "confdefs.h"
1709
1710 int
1711 main ()
1712 {
1713
1714   ;
1715   return 0;
1716 }
1717 _ACEOF
1718 ac_clean_files_save=$ac_clean_files
1719 ac_clean_files="$ac_clean_files a.out a.exe"
1720 # Try to create an executable without -o first, disregard a.out.
1721 # It will help us diagnose broken compilers, and finding out an intuition
1722 # of exeext.
1723 echo "$as_me:1723: checking for C compiler default output" >&5
1724 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1725 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1726 if { (eval echo "$as_me:1726: \"$ac_link_default\"") >&5
1727   (eval $ac_link_default) 2>&5
1728   ac_status=$?
1729   echo "$as_me:1729: \$? = $ac_status" >&5
1730   (exit $ac_status); }; then
1731   # Find the output, starting from the most likely.  This scheme is
1732 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1733 # resort.
1734 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1735                 ls a.out conftest 2>/dev/null;
1736                 ls a.* conftest.* 2>/dev/null`; do
1737   case $ac_file in
1738     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1739     a.out ) # We found the default executable, but exeext='' is most
1740             # certainly right.
1741             break;;
1742     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1743           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1744           export ac_cv_exeext
1745           break;;
1746     * ) break;;
1747   esac
1748 done
1749 else
1750   echo "$as_me: failed program was:" >&5
1751 cat conftest.$ac_ext >&5
1752 { { echo "$as_me:1752: error: C compiler cannot create executables" >&5
1753 echo "$as_me: error: C compiler cannot create executables" >&2;}
1754    { (exit 77); exit 77; }; }
1755 fi
1756
1757 ac_exeext=$ac_cv_exeext
1758 echo "$as_me:1758: result: $ac_file" >&5
1759 echo "${ECHO_T}$ac_file" >&6
1760
1761 # Check the compiler produces executables we can run.  If not, either
1762 # the compiler is broken, or we cross compile.
1763 echo "$as_me:1763: checking whether the C compiler works" >&5
1764 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1765 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1766 # If not cross compiling, check that we can run a simple program.
1767 if test "$cross_compiling" != yes; then
1768   if { ac_try='./$ac_file'
1769   { (eval echo "$as_me:1769: \"$ac_try\"") >&5
1770   (eval $ac_try) 2>&5
1771   ac_status=$?
1772   echo "$as_me:1772: \$? = $ac_status" >&5
1773   (exit $ac_status); }; }; then
1774     cross_compiling=no
1775   else
1776     if test "$cross_compiling" = maybe; then
1777         cross_compiling=yes
1778     else
1779         { { echo "$as_me:1779: error: cannot run C compiled programs.
1780 If you meant to cross compile, use \`--host'." >&5
1781 echo "$as_me: error: cannot run C compiled programs.
1782 If you meant to cross compile, use \`--host'." >&2;}
1783    { (exit 1); exit 1; }; }
1784     fi
1785   fi
1786 fi
1787 echo "$as_me:1787: result: yes" >&5
1788 echo "${ECHO_T}yes" >&6
1789
1790 rm -f a.out a.exe conftest$ac_cv_exeext
1791 ac_clean_files=$ac_clean_files_save
1792 # Check the compiler produces executables we can run.  If not, either
1793 # the compiler is broken, or we cross compile.
1794 echo "$as_me:1794: checking whether we are cross compiling" >&5
1795 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1796 echo "$as_me:1796: result: $cross_compiling" >&5
1797 echo "${ECHO_T}$cross_compiling" >&6
1798
1799 echo "$as_me:1799: checking for executable suffix" >&5
1800 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1801 if { (eval echo "$as_me:1801: \"$ac_link\"") >&5
1802   (eval $ac_link) 2>&5
1803   ac_status=$?
1804   echo "$as_me:1804: \$? = $ac_status" >&5
1805   (exit $ac_status); }; then
1806   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1807 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1808 # work properly (i.e., refer to `conftest.exe'), while it won't with
1809 # `rm'.
1810 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1811   case $ac_file in
1812     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1813     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1814           export ac_cv_exeext
1815           break;;
1816     * ) break;;
1817   esac
1818 done
1819 else
1820   { { echo "$as_me:1820: error: cannot compute EXEEXT: cannot compile and link" >&5
1821 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1822    { (exit 1); exit 1; }; }
1823 fi
1824
1825 rm -f conftest$ac_cv_exeext
1826 echo "$as_me:1826: result: $ac_cv_exeext" >&5
1827 echo "${ECHO_T}$ac_cv_exeext" >&6
1828
1829 rm -f conftest.$ac_ext
1830 EXEEXT=$ac_cv_exeext
1831 ac_exeext=$EXEEXT
1832 echo "$as_me:1832: checking for object suffix" >&5
1833 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1834 if test "${ac_cv_objext+set}" = set; then
1835   echo $ECHO_N "(cached) $ECHO_C" >&6
1836 else
1837   cat >conftest.$ac_ext <<_ACEOF
1838 #line 1838 "configure"
1839 #include "confdefs.h"
1840
1841 int
1842 main ()
1843 {
1844
1845   ;
1846   return 0;
1847 }
1848 _ACEOF
1849 rm -f conftest.o conftest.obj
1850 if { (eval echo "$as_me:1850: \"$ac_compile\"") >&5
1851   (eval $ac_compile) 2>&5
1852   ac_status=$?
1853   echo "$as_me:1853: \$? = $ac_status" >&5
1854   (exit $ac_status); }; then
1855   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1856   case $ac_file in
1857     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
1858     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1859        break;;
1860   esac
1861 done
1862 else
1863   echo "$as_me: failed program was:" >&5
1864 cat conftest.$ac_ext >&5
1865 { { echo "$as_me:1865: error: cannot compute OBJEXT: cannot compile" >&5
1866 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1867    { (exit 1); exit 1; }; }
1868 fi
1869
1870 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1871 fi
1872 echo "$as_me:1872: result: $ac_cv_objext" >&5
1873 echo "${ECHO_T}$ac_cv_objext" >&6
1874 OBJEXT=$ac_cv_objext
1875 ac_objext=$OBJEXT
1876 echo "$as_me:1876: checking whether we are using the GNU C compiler" >&5
1877 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1878 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1879   echo $ECHO_N "(cached) $ECHO_C" >&6
1880 else
1881   cat >conftest.$ac_ext <<_ACEOF
1882 #line 1882 "configure"
1883 #include "confdefs.h"
1884
1885 int
1886 main ()
1887 {
1888 #ifndef __GNUC__
1889        choke me
1890 #endif
1891
1892   ;
1893   return 0;
1894 }
1895 _ACEOF
1896 rm -f conftest.$ac_objext
1897 if { (eval echo "$as_me:1897: \"$ac_compile\"") >&5
1898   (eval $ac_compile) 2>&5
1899   ac_status=$?
1900   echo "$as_me:1900: \$? = $ac_status" >&5
1901   (exit $ac_status); } &&
1902          { ac_try='test -s conftest.$ac_objext'
1903   { (eval echo "$as_me:1903: \"$ac_try\"") >&5
1904   (eval $ac_try) 2>&5
1905   ac_status=$?
1906   echo "$as_me:1906: \$? = $ac_status" >&5
1907   (exit $ac_status); }; }; then
1908   ac_compiler_gnu=yes
1909 else
1910   echo "$as_me: failed program was:" >&5
1911 cat conftest.$ac_ext >&5
1912 ac_compiler_gnu=no
1913 fi
1914 rm -f conftest.$ac_objext conftest.$ac_ext
1915 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1916
1917 fi
1918 echo "$as_me:1918: result: $ac_cv_c_compiler_gnu" >&5
1919 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1920 GCC=`test $ac_compiler_gnu = yes && echo yes`
1921 ac_test_CFLAGS=${CFLAGS+set}
1922 ac_save_CFLAGS=$CFLAGS
1923 CFLAGS="-g"
1924 echo "$as_me:1924: checking whether $CC accepts -g" >&5
1925 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1926 if test "${ac_cv_prog_cc_g+set}" = set; then
1927   echo $ECHO_N "(cached) $ECHO_C" >&6
1928 else
1929   cat >conftest.$ac_ext <<_ACEOF
1930 #line 1930 "configure"
1931 #include "confdefs.h"
1932
1933 int
1934 main ()
1935 {
1936
1937   ;
1938   return 0;
1939 }
1940 _ACEOF
1941 rm -f conftest.$ac_objext
1942 if { (eval echo "$as_me:1942: \"$ac_compile\"") >&5
1943   (eval $ac_compile) 2>&5
1944   ac_status=$?
1945   echo "$as_me:1945: \$? = $ac_status" >&5
1946   (exit $ac_status); } &&
1947          { ac_try='test -s conftest.$ac_objext'
1948   { (eval echo "$as_me:1948: \"$ac_try\"") >&5
1949   (eval $ac_try) 2>&5
1950   ac_status=$?
1951   echo "$as_me:1951: \$? = $ac_status" >&5
1952   (exit $ac_status); }; }; then
1953   ac_cv_prog_cc_g=yes
1954 else
1955   echo "$as_me: failed program was:" >&5
1956 cat conftest.$ac_ext >&5
1957 ac_cv_prog_cc_g=no
1958 fi
1959 rm -f conftest.$ac_objext conftest.$ac_ext
1960 fi
1961 echo "$as_me:1961: result: $ac_cv_prog_cc_g" >&5
1962 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1963 if test "$ac_test_CFLAGS" = set; then
1964   CFLAGS=$ac_save_CFLAGS
1965 elif test $ac_cv_prog_cc_g = yes; then
1966   if test "$GCC" = yes; then
1967     CFLAGS="-g -O2"
1968   else
1969     CFLAGS="-g"
1970   fi
1971 else
1972   if test "$GCC" = yes; then
1973     CFLAGS="-O2"
1974   else
1975     CFLAGS=
1976   fi
1977 fi
1978 # Some people use a C++ compiler to compile C.  Since we use `exit',
1979 # in C++ we need to declare it.  In case someone uses the same compiler
1980 # for both compiling C and C++ we need to have the C++ compiler decide
1981 # the declaration of exit, since it's the most demanding environment.
1982 cat >conftest.$ac_ext <<_ACEOF
1983 #ifndef __cplusplus
1984   choke me
1985 #endif
1986 _ACEOF
1987 rm -f conftest.$ac_objext
1988 if { (eval echo "$as_me:1988: \"$ac_compile\"") >&5
1989   (eval $ac_compile) 2>&5
1990   ac_status=$?
1991   echo "$as_me:1991: \$? = $ac_status" >&5
1992   (exit $ac_status); } &&
1993          { ac_try='test -s conftest.$ac_objext'
1994   { (eval echo "$as_me:1994: \"$ac_try\"") >&5
1995   (eval $ac_try) 2>&5
1996   ac_status=$?
1997   echo "$as_me:1997: \$? = $ac_status" >&5
1998   (exit $ac_status); }; }; then
1999   for ac_declaration in \
2000    ''\
2001    '#include <stdlib.h>' \
2002    'extern "C" void std::exit (int) throw (); using std::exit;' \
2003    'extern "C" void std::exit (int); using std::exit;' \
2004    'extern "C" void exit (int) throw ();' \
2005    'extern "C" void exit (int);' \
2006    'void exit (int);'
2007 do
2008   cat >conftest.$ac_ext <<_ACEOF
2009 #line 2009 "configure"
2010 #include "confdefs.h"
2011 #include <stdlib.h>
2012 $ac_declaration
2013 int
2014 main ()
2015 {
2016 exit (42);
2017   ;
2018   return 0;
2019 }
2020 _ACEOF
2021 rm -f conftest.$ac_objext
2022 if { (eval echo "$as_me:2022: \"$ac_compile\"") >&5
2023   (eval $ac_compile) 2>&5
2024   ac_status=$?
2025   echo "$as_me:2025: \$? = $ac_status" >&5
2026   (exit $ac_status); } &&
2027          { ac_try='test -s conftest.$ac_objext'
2028   { (eval echo "$as_me:2028: \"$ac_try\"") >&5
2029   (eval $ac_try) 2>&5
2030   ac_status=$?
2031   echo "$as_me:2031: \$? = $ac_status" >&5
2032   (exit $ac_status); }; }; then
2033   :
2034 else
2035   echo "$as_me: failed program was:" >&5
2036 cat conftest.$ac_ext >&5
2037 continue
2038 fi
2039 rm -f conftest.$ac_objext conftest.$ac_ext
2040   cat >conftest.$ac_ext <<_ACEOF
2041 #line 2041 "configure"
2042 #include "confdefs.h"
2043 $ac_declaration
2044 int
2045 main ()
2046 {
2047 exit (42);
2048   ;
2049   return 0;
2050 }
2051 _ACEOF
2052 rm -f conftest.$ac_objext
2053 if { (eval echo "$as_me:2053: \"$ac_compile\"") >&5
2054   (eval $ac_compile) 2>&5
2055   ac_status=$?
2056   echo "$as_me:2056: \$? = $ac_status" >&5
2057   (exit $ac_status); } &&
2058          { ac_try='test -s conftest.$ac_objext'
2059   { (eval echo "$as_me:2059: \"$ac_try\"") >&5
2060   (eval $ac_try) 2>&5
2061   ac_status=$?
2062   echo "$as_me:2062: \$? = $ac_status" >&5
2063   (exit $ac_status); }; }; then
2064   break
2065 else
2066   echo "$as_me: failed program was:" >&5
2067 cat conftest.$ac_ext >&5
2068 fi
2069 rm -f conftest.$ac_objext conftest.$ac_ext
2070 done
2071 rm -f conftest*
2072 if test -n "$ac_declaration"; then
2073   echo '#ifdef __cplusplus' >>confdefs.h
2074   echo $ac_declaration      >>confdefs.h
2075   echo '#endif'             >>confdefs.h
2076 fi
2077
2078 else
2079   echo "$as_me: failed program was:" >&5
2080 cat conftest.$ac_ext >&5
2081 fi
2082 rm -f conftest.$ac_objext conftest.$ac_ext
2083 ac_ext=c
2084 ac_cpp='$CPP $CPPFLAGS'
2085 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2086 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2087 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2088 ac_main_return=return
2089
2090 GCC_VERSION=none
2091 if test "$GCC" = yes ; then
2092         echo "$as_me:2092: checking version of $CC" >&5
2093 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2094         GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2095         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2096         echo "$as_me:2096: result: $GCC_VERSION" >&5
2097 echo "${ECHO_T}$GCC_VERSION" >&6
2098 fi
2099
2100 ac_ext=c
2101 ac_cpp='$CPP $CPPFLAGS'
2102 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2103 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2104 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2105 ac_main_return=return
2106 echo "$as_me:2106: checking how to run the C preprocessor" >&5
2107 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2108 # On Suns, sometimes $CPP names a directory.
2109 if test -n "$CPP" && test -d "$CPP"; then
2110   CPP=
2111 fi
2112 if test -z "$CPP"; then
2113   if test "${ac_cv_prog_CPP+set}" = set; then
2114   echo $ECHO_N "(cached) $ECHO_C" >&6
2115 else
2116       # Double quotes because CPP needs to be expanded
2117     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2118     do
2119       ac_preproc_ok=false
2120 for ac_c_preproc_warn_flag in '' yes
2121 do
2122   # Use a header file that comes with gcc, so configuring glibc
2123   # with a fresh cross-compiler works.
2124   # On the NeXT, cc -E runs the code through the compiler's parser,
2125   # not just through cpp. "Syntax error" is here to catch this case.
2126   cat >conftest.$ac_ext <<_ACEOF
2127 #line 2127 "configure"
2128 #include "confdefs.h"
2129 #include <assert.h>
2130                      Syntax error
2131 _ACEOF
2132 if { (eval echo "$as_me:2132: \"$ac_cpp conftest.$ac_ext\"") >&5
2133   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2134   ac_status=$?
2135   egrep -v '^ *\+' conftest.er1 >conftest.err
2136   rm -f conftest.er1
2137   cat conftest.err >&5
2138   echo "$as_me:2138: \$? = $ac_status" >&5
2139   (exit $ac_status); } >/dev/null; then
2140   if test -s conftest.err; then
2141     ac_cpp_err=$ac_c_preproc_warn_flag
2142   else
2143     ac_cpp_err=
2144   fi
2145 else
2146   ac_cpp_err=yes
2147 fi
2148 if test -z "$ac_cpp_err"; then
2149   :
2150 else
2151   echo "$as_me: failed program was:" >&5
2152   cat conftest.$ac_ext >&5
2153   # Broken: fails on valid input.
2154 continue
2155 fi
2156 rm -f conftest.err conftest.$ac_ext
2157
2158   # OK, works on sane cases.  Now check whether non-existent headers
2159   # can be detected and how.
2160   cat >conftest.$ac_ext <<_ACEOF
2161 #line 2161 "configure"
2162 #include "confdefs.h"
2163 #include <ac_nonexistent.h>
2164 _ACEOF
2165 if { (eval echo "$as_me:2165: \"$ac_cpp conftest.$ac_ext\"") >&5
2166   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2167   ac_status=$?
2168   egrep -v '^ *\+' conftest.er1 >conftest.err
2169   rm -f conftest.er1
2170   cat conftest.err >&5
2171   echo "$as_me:2171: \$? = $ac_status" >&5
2172   (exit $ac_status); } >/dev/null; then
2173   if test -s conftest.err; then
2174     ac_cpp_err=$ac_c_preproc_warn_flag
2175   else
2176     ac_cpp_err=
2177   fi
2178 else
2179   ac_cpp_err=yes
2180 fi
2181 if test -z "$ac_cpp_err"; then
2182   # Broken: success on invalid input.
2183 continue
2184 else
2185   echo "$as_me: failed program was:" >&5
2186   cat conftest.$ac_ext >&5
2187   # Passes both tests.
2188 ac_preproc_ok=:
2189 break
2190 fi
2191 rm -f conftest.err conftest.$ac_ext
2192
2193 done
2194 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2195 rm -f conftest.err conftest.$ac_ext
2196 if $ac_preproc_ok; then
2197   break
2198 fi
2199
2200     done
2201     ac_cv_prog_CPP=$CPP
2202
2203 fi
2204   CPP=$ac_cv_prog_CPP
2205 else
2206   ac_cv_prog_CPP=$CPP
2207 fi
2208 echo "$as_me:2208: result: $CPP" >&5
2209 echo "${ECHO_T}$CPP" >&6
2210 ac_preproc_ok=false
2211 for ac_c_preproc_warn_flag in '' yes
2212 do
2213   # Use a header file that comes with gcc, so configuring glibc
2214   # with a fresh cross-compiler works.
2215   # On the NeXT, cc -E runs the code through the compiler's parser,
2216   # not just through cpp. "Syntax error" is here to catch this case.
2217   cat >conftest.$ac_ext <<_ACEOF
2218 #line 2218 "configure"
2219 #include "confdefs.h"
2220 #include <assert.h>
2221                      Syntax error
2222 _ACEOF
2223 if { (eval echo "$as_me:2223: \"$ac_cpp conftest.$ac_ext\"") >&5
2224   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2225   ac_status=$?
2226   egrep -v '^ *\+' conftest.er1 >conftest.err
2227   rm -f conftest.er1
2228   cat conftest.err >&5
2229   echo "$as_me:2229: \$? = $ac_status" >&5
2230   (exit $ac_status); } >/dev/null; then
2231   if test -s conftest.err; then
2232     ac_cpp_err=$ac_c_preproc_warn_flag
2233   else
2234     ac_cpp_err=
2235   fi
2236 else
2237   ac_cpp_err=yes
2238 fi
2239 if test -z "$ac_cpp_err"; then
2240   :
2241 else
2242   echo "$as_me: failed program was:" >&5
2243   cat conftest.$ac_ext >&5
2244   # Broken: fails on valid input.
2245 continue
2246 fi
2247 rm -f conftest.err conftest.$ac_ext
2248
2249   # OK, works on sane cases.  Now check whether non-existent headers
2250   # can be detected and how.
2251   cat >conftest.$ac_ext <<_ACEOF
2252 #line 2252 "configure"
2253 #include "confdefs.h"
2254 #include <ac_nonexistent.h>
2255 _ACEOF
2256 if { (eval echo "$as_me:2256: \"$ac_cpp conftest.$ac_ext\"") >&5
2257   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2258   ac_status=$?
2259   egrep -v '^ *\+' conftest.er1 >conftest.err
2260   rm -f conftest.er1
2261   cat conftest.err >&5
2262   echo "$as_me:2262: \$? = $ac_status" >&5
2263   (exit $ac_status); } >/dev/null; then
2264   if test -s conftest.err; then
2265     ac_cpp_err=$ac_c_preproc_warn_flag
2266   else
2267     ac_cpp_err=
2268   fi
2269 else
2270   ac_cpp_err=yes
2271 fi
2272 if test -z "$ac_cpp_err"; then
2273   # Broken: success on invalid input.
2274 continue
2275 else
2276   echo "$as_me: failed program was:" >&5
2277   cat conftest.$ac_ext >&5
2278   # Passes both tests.
2279 ac_preproc_ok=:
2280 break
2281 fi
2282 rm -f conftest.err conftest.$ac_ext
2283
2284 done
2285 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2286 rm -f conftest.err conftest.$ac_ext
2287 if $ac_preproc_ok; then
2288   :
2289 else
2290   { { echo "$as_me:2290: error: C preprocessor \"$CPP\" fails sanity check" >&5
2291 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2292    { (exit 1); exit 1; }; }
2293 fi
2294
2295 ac_ext=c
2296 ac_cpp='$CPP $CPPFLAGS'
2297 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2298 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2299 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2300 ac_main_return=return
2301
2302 if test $ac_cv_c_compiler_gnu = yes; then
2303     echo "$as_me:2303: checking whether $CC needs -traditional" >&5
2304 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2305 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2306   echo $ECHO_N "(cached) $ECHO_C" >&6
2307 else
2308     ac_pattern="Autoconf.*'x'"
2309   cat >conftest.$ac_ext <<_ACEOF
2310 #line 2310 "configure"
2311 #include "confdefs.h"
2312 #include <sgtty.h>
2313 int Autoconf = TIOCGETP;
2314 _ACEOF
2315 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2316   egrep "$ac_pattern" >/dev/null 2>&1; then
2317   ac_cv_prog_gcc_traditional=yes
2318 else
2319   ac_cv_prog_gcc_traditional=no
2320 fi
2321 rm -f conftest*
2322
2323   if test $ac_cv_prog_gcc_traditional = no; then
2324     cat >conftest.$ac_ext <<_ACEOF
2325 #line 2325 "configure"
2326 #include "confdefs.h"
2327 #include <termio.h>
2328 int Autoconf = TCGETA;
2329 _ACEOF
2330 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2331   egrep "$ac_pattern" >/dev/null 2>&1; then
2332   ac_cv_prog_gcc_traditional=yes
2333 fi
2334 rm -f conftest*
2335
2336   fi
2337 fi
2338 echo "$as_me:2338: result: $ac_cv_prog_gcc_traditional" >&5
2339 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2340   if test $ac_cv_prog_gcc_traditional = yes; then
2341     CC="$CC -traditional"
2342   fi
2343 fi
2344
2345 echo "$as_me:2345: checking whether $CC understands -c and -o together" >&5
2346 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2347 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2348   echo $ECHO_N "(cached) $ECHO_C" >&6
2349 else
2350
2351 cat > conftest.$ac_ext <<CF_EOF
2352 #include <stdio.h>
2353 int main()
2354 {
2355         ${cf_cv_main_return:-return}(0);
2356 }
2357 CF_EOF
2358 # We do the test twice because some compilers refuse to overwrite an
2359 # existing .o file with -o, though they will create one.
2360 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2361 if { (eval echo "$as_me:2361: \"$ac_try\"") >&5
2362   (eval $ac_try) 2>&5
2363   ac_status=$?
2364   echo "$as_me:2364: \$? = $ac_status" >&5
2365   (exit $ac_status); } &&
2366   test -f conftest2.$ac_objext && { (eval echo "$as_me:2366: \"$ac_try\"") >&5
2367   (eval $ac_try) 2>&5
2368   ac_status=$?
2369   echo "$as_me:2369: \$? = $ac_status" >&5
2370   (exit $ac_status); };
2371 then
2372   eval cf_cv_prog_CC_c_o=yes
2373 else
2374   eval cf_cv_prog_CC_c_o=no
2375 fi
2376 rm -f conftest*
2377
2378 fi
2379 if test $cf_cv_prog_CC_c_o = yes; then
2380   echo "$as_me:2380: result: yes" >&5
2381 echo "${ECHO_T}yes" >&6
2382 else
2383   echo "$as_me:2383: result: no" >&5
2384 echo "${ECHO_T}no" >&6
2385 fi
2386
2387 echo "$as_me:2387: checking for POSIXized ISC" >&5
2388 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2389 if test -d /etc/conf/kconfig.d &&
2390    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2391 then
2392   echo "$as_me:2392: result: yes" >&5
2393 echo "${ECHO_T}yes" >&6
2394   ISC=yes # If later tests want to check for ISC.
2395
2396 cat >>confdefs.h <<\EOF
2397 #define _POSIX_SOURCE 1
2398 EOF
2399
2400   if test "$GCC" = yes; then
2401     CC="$CC -posix"
2402   else
2403     CC="$CC -Xp"
2404   fi
2405 else
2406   echo "$as_me:2406: result: no" >&5
2407 echo "${ECHO_T}no" >&6
2408   ISC=
2409 fi
2410
2411 echo "$as_me:2411: checking for ${CC-cc} option to accept ANSI C" >&5
2412 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2413 if test "${cf_cv_ansi_cc+set}" = set; then
2414   echo $ECHO_N "(cached) $ECHO_C" >&6
2415 else
2416
2417 cf_cv_ansi_cc=no
2418 cf_save_CFLAGS="$CFLAGS"
2419 cf_save_CPPFLAGS="$CPPFLAGS"
2420 # Don't try gcc -ansi; that turns off useful extensions and
2421 # breaks some systems' header files.
2422 # AIX                   -qlanglvl=ansi
2423 # Ultrix and OSF/1      -std1
2424 # HP-UX                 -Aa -D_HPUX_SOURCE
2425 # SVR4                  -Xc
2426 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2427 for cf_arg in "-DCC_HAS_PROTOS" \
2428         "" \
2429         -qlanglvl=ansi \
2430         -std1 \
2431         -Ae \
2432         "-Aa -D_HPUX_SOURCE" \
2433         -Xc
2434 do
2435
2436 cf_fix_cppflags=no
2437 cf_new_cflags=
2438 cf_new_cppflags=
2439 cf_new_extra_cppflags=
2440
2441 for cf_add_cflags in $cf_arg
2442 do
2443 case $cf_fix_cppflags in
2444 no)
2445         case $cf_add_cflags in #(vi
2446         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2447                 case $cf_add_cflags in
2448                 -D*)
2449                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2450
2451                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2452                         && test -z "${cf_tst_cflags}" \
2453                         && cf_fix_cppflags=yes
2454
2455                         if test $cf_fix_cppflags = yes ; then
2456                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2457                                 continue
2458                         elif test "${cf_tst_cflags}" = "\"'" ; then
2459                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2460                                 continue
2461                         fi
2462                         ;;
2463                 esac
2464                 case "$CPPFLAGS" in
2465                 *$cf_add_cflags) #(vi
2466                         ;;
2467                 *) #(vi
2468                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2469                         ;;
2470                 esac
2471                 ;;
2472         *)
2473                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2474                 ;;
2475         esac
2476         ;;
2477 yes)
2478         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2479
2480         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2481
2482         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2483         && test -z "${cf_tst_cflags}" \
2484         && cf_fix_cppflags=no
2485         ;;
2486 esac
2487 done
2488
2489 if test -n "$cf_new_cflags" ; then
2490
2491         CFLAGS="$CFLAGS $cf_new_cflags"
2492 fi
2493
2494 if test -n "$cf_new_cppflags" ; then
2495
2496         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2497 fi
2498
2499 if test -n "$cf_new_extra_cppflags" ; then
2500
2501         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2502 fi
2503
2504         cat >conftest.$ac_ext <<_ACEOF
2505 #line 2505 "configure"
2506 #include "confdefs.h"
2507
2508 #ifndef CC_HAS_PROTOS
2509 #if !defined(__STDC__) || (__STDC__ != 1)
2510 choke me
2511 #endif
2512 #endif
2513
2514 int
2515 main ()
2516 {
2517
2518         int test (int i, double x);
2519         struct s1 {int (*f) (int a);};
2520         struct s2 {int (*f) (double a);};
2521   ;
2522   return 0;
2523 }
2524 _ACEOF
2525 rm -f conftest.$ac_objext
2526 if { (eval echo "$as_me:2526: \"$ac_compile\"") >&5
2527   (eval $ac_compile) 2>&5
2528   ac_status=$?
2529   echo "$as_me:2529: \$? = $ac_status" >&5
2530   (exit $ac_status); } &&
2531          { ac_try='test -s conftest.$ac_objext'
2532   { (eval echo "$as_me:2532: \"$ac_try\"") >&5
2533   (eval $ac_try) 2>&5
2534   ac_status=$?
2535   echo "$as_me:2535: \$? = $ac_status" >&5
2536   (exit $ac_status); }; }; then
2537   cf_cv_ansi_cc="$cf_arg"; break
2538 else
2539   echo "$as_me: failed program was:" >&5
2540 cat conftest.$ac_ext >&5
2541 fi
2542 rm -f conftest.$ac_objext conftest.$ac_ext
2543 done
2544 CFLAGS="$cf_save_CFLAGS"
2545 CPPFLAGS="$cf_save_CPPFLAGS"
2546
2547 fi
2548 echo "$as_me:2548: result: $cf_cv_ansi_cc" >&5
2549 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2550
2551 if test "$cf_cv_ansi_cc" != "no"; then
2552 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2553
2554 cf_fix_cppflags=no
2555 cf_new_cflags=
2556 cf_new_cppflags=
2557 cf_new_extra_cppflags=
2558
2559 for cf_add_cflags in $cf_cv_ansi_cc
2560 do
2561 case $cf_fix_cppflags in
2562 no)
2563         case $cf_add_cflags in #(vi
2564         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2565                 case $cf_add_cflags in
2566                 -D*)
2567                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2568
2569                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2570                         && test -z "${cf_tst_cflags}" \
2571                         && cf_fix_cppflags=yes
2572
2573                         if test $cf_fix_cppflags = yes ; then
2574                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2575                                 continue
2576                         elif test "${cf_tst_cflags}" = "\"'" ; then
2577                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2578                                 continue
2579                         fi
2580                         ;;
2581                 esac
2582                 case "$CPPFLAGS" in
2583                 *$cf_add_cflags) #(vi
2584                         ;;
2585                 *) #(vi
2586                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2587                         ;;
2588                 esac
2589                 ;;
2590         *)
2591                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2592                 ;;
2593         esac
2594         ;;
2595 yes)
2596         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2597
2598         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2599
2600         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2601         && test -z "${cf_tst_cflags}" \
2602         && cf_fix_cppflags=no
2603         ;;
2604 esac
2605 done
2606
2607 if test -n "$cf_new_cflags" ; then
2608
2609         CFLAGS="$CFLAGS $cf_new_cflags"
2610 fi
2611
2612 if test -n "$cf_new_cppflags" ; then
2613
2614         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2615 fi
2616
2617 if test -n "$cf_new_extra_cppflags" ; then
2618
2619         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2620 fi
2621
2622 else
2623         cat >>confdefs.h <<\EOF
2624 #define CC_HAS_PROTOS 1
2625 EOF
2626
2627 fi
2628 fi
2629
2630 if test "$cf_cv_ansi_cc" = "no"; then
2631         { { echo "$as_me:2631: error: Your compiler does not appear to recognize prototypes.
2632 You have the following choices:
2633         a. adjust your compiler options
2634         b. get an up-to-date compiler
2635         c. use a wrapper such as unproto" >&5
2636 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2637 You have the following choices:
2638         a. adjust your compiler options
2639         b. get an up-to-date compiler
2640         c. use a wrapper such as unproto" >&2;}
2641    { (exit 1); exit 1; }; }
2642 fi
2643
2644 case $cf_cv_system_name in
2645 os2*)
2646     CFLAGS="$CFLAGS -Zmt"
2647     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2648     CXXFLAGS="$CXXFLAGS -Zmt"
2649     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2650     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2651     ac_cv_exeext=.exe
2652     ;;
2653 esac
2654
2655 PROG_EXT="$EXEEXT"
2656
2657 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2658 #define PROG_EXT "$PROG_EXT"
2659 EOF
2660
2661 if test "$cross_compiling" = yes ; then
2662   LDCONFIG=:
2663 else
2664 case "$cf_cv_system_name" in #(vi
2665 freebsd*) #(vi
2666   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2667   ;;
2668 *) LDPATH=$PATH:/sbin:/usr/sbin
2669   # Extract the first word of "ldconfig", so it can be a program name with args.
2670 set dummy ldconfig; ac_word=$2
2671 echo "$as_me:2671: checking for $ac_word" >&5
2672 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2673 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2674   echo $ECHO_N "(cached) $ECHO_C" >&6
2675 else
2676   case $LDCONFIG in
2677   [\\/]* | ?:[\\/]*)
2678   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2679   ;;
2680   *)
2681   ac_save_IFS=$IFS; IFS=$ac_path_separator
2682 ac_dummy="$LDPATH"
2683 for ac_dir in $ac_dummy; do
2684   IFS=$ac_save_IFS
2685   test -z "$ac_dir" && ac_dir=.
2686   if $as_executable_p "$ac_dir/$ac_word"; then
2687    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2688    echo "$as_me:2688: found $ac_dir/$ac_word" >&5
2689    break
2690 fi
2691 done
2692
2693   ;;
2694 esac
2695 fi
2696 LDCONFIG=$ac_cv_path_LDCONFIG
2697
2698 if test -n "$LDCONFIG"; then
2699   echo "$as_me:2699: result: $LDCONFIG" >&5
2700 echo "${ECHO_T}$LDCONFIG" >&6
2701 else
2702   echo "$as_me:2702: result: no" >&5
2703 echo "${ECHO_T}no" >&6
2704 fi
2705
2706   ;;
2707 esac
2708 fi
2709
2710 echo "$as_me:2710: checking if you want to ensure bool is consistent with C++" >&5
2711 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2712
2713 # Check whether --with-cxx or --without-cxx was given.
2714 if test "${with_cxx+set}" = set; then
2715   withval="$with_cxx"
2716   cf_with_cxx=$withval
2717 else
2718   cf_with_cxx=yes
2719 fi;
2720 echo "$as_me:2720: result: $cf_with_cxx" >&5
2721 echo "${ECHO_T}$cf_with_cxx" >&6
2722 if test "X$cf_with_cxx" = Xno ; then
2723         CXX=""
2724         GXX=""
2725 else
2726         # with autoconf 2.13, we can change the error to a warning:
2727                 ac_ext=cc
2728 ac_cpp='$CXXCPP $CPPFLAGS'
2729 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2730 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2731 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2732 ac_main_return=return
2733 if test -n "$ac_tool_prefix"; then
2734   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2735   do
2736     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2737 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2738 echo "$as_me:2738: checking for $ac_word" >&5
2739 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2740 if test "${ac_cv_prog_CXX+set}" = set; then
2741   echo $ECHO_N "(cached) $ECHO_C" >&6
2742 else
2743   if test -n "$CXX"; then
2744   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2745 else
2746   ac_save_IFS=$IFS; IFS=$ac_path_separator
2747 ac_dummy="$PATH"
2748 for ac_dir in $ac_dummy; do
2749   IFS=$ac_save_IFS
2750   test -z "$ac_dir" && ac_dir=.
2751   $as_executable_p "$ac_dir/$ac_word" || continue
2752 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2753 echo "$as_me:2753: found $ac_dir/$ac_word" >&5
2754 break
2755 done
2756
2757 fi
2758 fi
2759 CXX=$ac_cv_prog_CXX
2760 if test -n "$CXX"; then
2761   echo "$as_me:2761: result: $CXX" >&5
2762 echo "${ECHO_T}$CXX" >&6
2763 else
2764   echo "$as_me:2764: result: no" >&5
2765 echo "${ECHO_T}no" >&6
2766 fi
2767
2768     test -n "$CXX" && break
2769   done
2770 fi
2771 if test -z "$CXX"; then
2772   ac_ct_CXX=$CXX
2773   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2774 do
2775   # Extract the first word of "$ac_prog", so it can be a program name with args.
2776 set dummy $ac_prog; ac_word=$2
2777 echo "$as_me:2777: checking for $ac_word" >&5
2778 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2779 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2780   echo $ECHO_N "(cached) $ECHO_C" >&6
2781 else
2782   if test -n "$ac_ct_CXX"; then
2783   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2784 else
2785   ac_save_IFS=$IFS; IFS=$ac_path_separator
2786 ac_dummy="$PATH"
2787 for ac_dir in $ac_dummy; do
2788   IFS=$ac_save_IFS
2789   test -z "$ac_dir" && ac_dir=.
2790   $as_executable_p "$ac_dir/$ac_word" || continue
2791 ac_cv_prog_ac_ct_CXX="$ac_prog"
2792 echo "$as_me:2792: found $ac_dir/$ac_word" >&5
2793 break
2794 done
2795
2796 fi
2797 fi
2798 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2799 if test -n "$ac_ct_CXX"; then
2800   echo "$as_me:2800: result: $ac_ct_CXX" >&5
2801 echo "${ECHO_T}$ac_ct_CXX" >&6
2802 else
2803   echo "$as_me:2803: result: no" >&5
2804 echo "${ECHO_T}no" >&6
2805 fi
2806
2807   test -n "$ac_ct_CXX" && break
2808 done
2809 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2810
2811   CXX=$ac_ct_CXX
2812 fi
2813
2814 # Provide some information about the compiler.
2815 echo "$as_me:2815:" \
2816      "checking for C++ compiler version" >&5
2817 ac_compiler=`set X $ac_compile; echo $2`
2818 { (eval echo "$as_me:2818: \"$ac_compiler --version </dev/null >&5\"") >&5
2819   (eval $ac_compiler --version </dev/null >&5) 2>&5
2820   ac_status=$?
2821   echo "$as_me:2821: \$? = $ac_status" >&5
2822   (exit $ac_status); }
2823 { (eval echo "$as_me:2823: \"$ac_compiler -v </dev/null >&5\"") >&5
2824   (eval $ac_compiler -v </dev/null >&5) 2>&5
2825   ac_status=$?
2826   echo "$as_me:2826: \$? = $ac_status" >&5
2827   (exit $ac_status); }
2828 { (eval echo "$as_me:2828: \"$ac_compiler -V </dev/null >&5\"") >&5
2829   (eval $ac_compiler -V </dev/null >&5) 2>&5
2830   ac_status=$?
2831   echo "$as_me:2831: \$? = $ac_status" >&5
2832   (exit $ac_status); }
2833
2834 echo "$as_me:2834: checking whether we are using the GNU C++ compiler" >&5
2835 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2836 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2837   echo $ECHO_N "(cached) $ECHO_C" >&6
2838 else
2839   cat >conftest.$ac_ext <<_ACEOF
2840 #line 2840 "configure"
2841 #include "confdefs.h"
2842
2843 int
2844 main ()
2845 {
2846 #ifndef __GNUC__
2847        choke me
2848 #endif
2849
2850   ;
2851   return 0;
2852 }
2853 _ACEOF
2854 rm -f conftest.$ac_objext
2855 if { (eval echo "$as_me:2855: \"$ac_compile\"") >&5
2856   (eval $ac_compile) 2>&5
2857   ac_status=$?
2858   echo "$as_me:2858: \$? = $ac_status" >&5
2859   (exit $ac_status); } &&
2860          { ac_try='test -s conftest.$ac_objext'
2861   { (eval echo "$as_me:2861: \"$ac_try\"") >&5
2862   (eval $ac_try) 2>&5
2863   ac_status=$?
2864   echo "$as_me:2864: \$? = $ac_status" >&5
2865   (exit $ac_status); }; }; then
2866   ac_compiler_gnu=yes
2867 else
2868   echo "$as_me: failed program was:" >&5
2869 cat conftest.$ac_ext >&5
2870 ac_compiler_gnu=no
2871 fi
2872 rm -f conftest.$ac_objext conftest.$ac_ext
2873 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2874
2875 fi
2876 echo "$as_me:2876: result: $ac_cv_cxx_compiler_gnu" >&5
2877 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2878 GXX=`test $ac_compiler_gnu = yes && echo yes`
2879 ac_test_CXXFLAGS=${CXXFLAGS+set}
2880 ac_save_CXXFLAGS=$CXXFLAGS
2881 CXXFLAGS="-g"
2882 echo "$as_me:2882: checking whether $CXX accepts -g" >&5
2883 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2884 if test "${ac_cv_prog_cxx_g+set}" = set; then
2885   echo $ECHO_N "(cached) $ECHO_C" >&6
2886 else
2887   cat >conftest.$ac_ext <<_ACEOF
2888 #line 2888 "configure"
2889 #include "confdefs.h"
2890
2891 int
2892 main ()
2893 {
2894
2895   ;
2896   return 0;
2897 }
2898 _ACEOF
2899 rm -f conftest.$ac_objext
2900 if { (eval echo "$as_me:2900: \"$ac_compile\"") >&5
2901   (eval $ac_compile) 2>&5
2902   ac_status=$?
2903   echo "$as_me:2903: \$? = $ac_status" >&5
2904   (exit $ac_status); } &&
2905          { ac_try='test -s conftest.$ac_objext'
2906   { (eval echo "$as_me:2906: \"$ac_try\"") >&5
2907   (eval $ac_try) 2>&5
2908   ac_status=$?
2909   echo "$as_me:2909: \$? = $ac_status" >&5
2910   (exit $ac_status); }; }; then
2911   ac_cv_prog_cxx_g=yes
2912 else
2913   echo "$as_me: failed program was:" >&5
2914 cat conftest.$ac_ext >&5
2915 ac_cv_prog_cxx_g=no
2916 fi
2917 rm -f conftest.$ac_objext conftest.$ac_ext
2918 fi
2919 echo "$as_me:2919: result: $ac_cv_prog_cxx_g" >&5
2920 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2921 if test "$ac_test_CXXFLAGS" = set; then
2922   CXXFLAGS=$ac_save_CXXFLAGS
2923 elif test $ac_cv_prog_cxx_g = yes; then
2924   if test "$GXX" = yes; then
2925     CXXFLAGS="-g -O2"
2926   else
2927     CXXFLAGS="-g"
2928   fi
2929 else
2930   if test "$GXX" = yes; then
2931     CXXFLAGS="-O2"
2932   else
2933     CXXFLAGS=
2934   fi
2935 fi
2936 for ac_declaration in \
2937    ''\
2938    '#include <stdlib.h>' \
2939    'extern "C" void std::exit (int) throw (); using std::exit;' \
2940    'extern "C" void std::exit (int); using std::exit;' \
2941    'extern "C" void exit (int) throw ();' \
2942    'extern "C" void exit (int);' \
2943    'void exit (int);'
2944 do
2945   cat >conftest.$ac_ext <<_ACEOF
2946 #line 2946 "configure"
2947 #include "confdefs.h"
2948 #include <stdlib.h>
2949 $ac_declaration
2950 int
2951 main ()
2952 {
2953 exit (42);
2954   ;
2955   return 0;
2956 }
2957 _ACEOF
2958 rm -f conftest.$ac_objext
2959 if { (eval echo "$as_me:2959: \"$ac_compile\"") >&5
2960   (eval $ac_compile) 2>&5
2961   ac_status=$?
2962   echo "$as_me:2962: \$? = $ac_status" >&5
2963   (exit $ac_status); } &&
2964          { ac_try='test -s conftest.$ac_objext'
2965   { (eval echo "$as_me:2965: \"$ac_try\"") >&5
2966   (eval $ac_try) 2>&5
2967   ac_status=$?
2968   echo "$as_me:2968: \$? = $ac_status" >&5
2969   (exit $ac_status); }; }; then
2970   :
2971 else
2972   echo "$as_me: failed program was:" >&5
2973 cat conftest.$ac_ext >&5
2974 continue
2975 fi
2976 rm -f conftest.$ac_objext conftest.$ac_ext
2977   cat >conftest.$ac_ext <<_ACEOF
2978 #line 2978 "configure"
2979 #include "confdefs.h"
2980 $ac_declaration
2981 int
2982 main ()
2983 {
2984 exit (42);
2985   ;
2986   return 0;
2987 }
2988 _ACEOF
2989 rm -f conftest.$ac_objext
2990 if { (eval echo "$as_me:2990: \"$ac_compile\"") >&5
2991   (eval $ac_compile) 2>&5
2992   ac_status=$?
2993   echo "$as_me:2993: \$? = $ac_status" >&5
2994   (exit $ac_status); } &&
2995          { ac_try='test -s conftest.$ac_objext'
2996   { (eval echo "$as_me:2996: \"$ac_try\"") >&5
2997   (eval $ac_try) 2>&5
2998   ac_status=$?
2999   echo "$as_me:2999: \$? = $ac_status" >&5
3000   (exit $ac_status); }; }; then
3001   break
3002 else
3003   echo "$as_me: failed program was:" >&5
3004 cat conftest.$ac_ext >&5
3005 fi
3006 rm -f conftest.$ac_objext conftest.$ac_ext
3007 done
3008 rm -f conftest*
3009 if test -n "$ac_declaration"; then
3010   echo '#ifdef __cplusplus' >>confdefs.h
3011   echo $ac_declaration      >>confdefs.h
3012   echo '#endif'             >>confdefs.h
3013 fi
3014
3015 ac_ext=c
3016 ac_cpp='$CPP $CPPFLAGS'
3017 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3018 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3019 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3020 ac_main_return=return
3021
3022                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3023         if test "$CXX" = "g++" ; then
3024                 # Extract the first word of "g++", so it can be a program name with args.
3025 set dummy g++; ac_word=$2
3026 echo "$as_me:3026: checking for $ac_word" >&5
3027 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3028 if test "${ac_cv_path_CXX+set}" = set; then
3029   echo $ECHO_N "(cached) $ECHO_C" >&6
3030 else
3031   case $CXX in
3032   [\\/]* | ?:[\\/]*)
3033   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3034   ;;
3035   *)
3036   ac_save_IFS=$IFS; IFS=$ac_path_separator
3037 ac_dummy="$PATH"
3038 for ac_dir in $ac_dummy; do
3039   IFS=$ac_save_IFS
3040   test -z "$ac_dir" && ac_dir=.
3041   if $as_executable_p "$ac_dir/$ac_word"; then
3042    ac_cv_path_CXX="$ac_dir/$ac_word"
3043    echo "$as_me:3043: found $ac_dir/$ac_word" >&5
3044    break
3045 fi
3046 done
3047
3048   ;;
3049 esac
3050 fi
3051 CXX=$ac_cv_path_CXX
3052
3053 if test -n "$CXX"; then
3054   echo "$as_me:3054: result: $CXX" >&5
3055 echo "${ECHO_T}$CXX" >&6
3056 else
3057   echo "$as_me:3057: result: no" >&5
3058 echo "${ECHO_T}no" >&6
3059 fi
3060
3061         fi
3062         if test "$CXX" = "g++" ; then
3063                 { echo "$as_me:3063: WARNING: ignoring hardcoded g++" >&5
3064 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3065                 cf_with_cxx=no; CXX=""; GXX="";
3066         fi
3067 fi
3068
3069 GXX_VERSION=none
3070 if test "$GXX" = yes; then
3071         echo "$as_me:3071: checking version of g++" >&5
3072 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3073         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3074         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3075         echo "$as_me:3075: result: $GXX_VERSION" >&5
3076 echo "${ECHO_T}$GXX_VERSION" >&6
3077 fi
3078
3079 case $GXX_VERSION in
3080 1*|2.[0-6]*)
3081         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3082         # cf_cxx_library=no
3083         { echo "$as_me:3083: WARNING: templates do not work" >&5
3084 echo "$as_me: WARNING: templates do not work" >&2;}
3085         ;;
3086 esac
3087
3088 echo "$as_me:3088: checking if you want to build C++ binding and demo" >&5
3089 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3090
3091 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3092 if test "${with_cxx_binding+set}" = set; then
3093   withval="$with_cxx_binding"
3094   cf_with_cxx_binding=$withval
3095 else
3096   cf_with_cxx_binding=$cf_with_cxx
3097 fi;
3098 echo "$as_me:3098: result: $cf_with_cxx_binding" >&5
3099 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3100
3101 echo "$as_me:3101: checking if you want to build with Ada95" >&5
3102 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3103
3104 # Check whether --with-ada or --without-ada was given.
3105 if test "${with_ada+set}" = set; then
3106   withval="$with_ada"
3107   cf_with_ada=$withval
3108 else
3109   cf_with_ada=yes
3110 fi;
3111 echo "$as_me:3111: result: $cf_with_ada" >&5
3112 echo "${ECHO_T}$cf_with_ada" >&6
3113
3114 echo "$as_me:3114: checking if you want to build programs such as tic" >&5
3115 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3116
3117 # Check whether --with-progs or --without-progs was given.
3118 if test "${with_progs+set}" = set; then
3119   withval="$with_progs"
3120   cf_with_progs=$withval
3121 else
3122   cf_with_progs=yes
3123 fi;
3124 echo "$as_me:3124: result: $cf_with_progs" >&5
3125 echo "${ECHO_T}$cf_with_progs" >&6
3126
3127 echo "$as_me:3127: checking if you wish to install curses.h" >&5
3128 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3129
3130 # Check whether --with-curses-h or --without-curses-h was given.
3131 if test "${with_curses_h+set}" = set; then
3132   withval="$with_curses_h"
3133   with_curses_h=$withval
3134 else
3135   with_curses_h=yes
3136 fi;
3137 echo "$as_me:3137: result: $with_curses_h" >&5
3138 echo "${ECHO_T}$with_curses_h" >&6
3139
3140 modules_to_build="ncurses"
3141 if test "X$cf_with_progs" != Xno ; then
3142 modules_to_build="$modules_to_build progs tack"
3143 fi
3144 modules_to_build="$modules_to_build panel menu form"
3145
3146 test "$program_prefix" != NONE &&
3147   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3148 # Use a double $ so make ignores it.
3149 test "$program_suffix" != NONE &&
3150   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3151 # Double any \ or $.  echo might interpret backslashes.
3152 # By default was `s,x,x', remove it if useless.
3153 cat <<\_ACEOF >conftest.sed
3154 s/[\\$]/&&/g;s/;s,x,x,$//
3155 _ACEOF
3156 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3157 rm conftest.sed
3158
3159 for ac_prog in mawk gawk nawk awk
3160 do
3161   # Extract the first word of "$ac_prog", so it can be a program name with args.
3162 set dummy $ac_prog; ac_word=$2
3163 echo "$as_me:3163: checking for $ac_word" >&5
3164 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3165 if test "${ac_cv_prog_AWK+set}" = set; then
3166   echo $ECHO_N "(cached) $ECHO_C" >&6
3167 else
3168   if test -n "$AWK"; then
3169   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3170 else
3171   ac_save_IFS=$IFS; IFS=$ac_path_separator
3172 ac_dummy="$PATH"
3173 for ac_dir in $ac_dummy; do
3174   IFS=$ac_save_IFS
3175   test -z "$ac_dir" && ac_dir=.
3176   $as_executable_p "$ac_dir/$ac_word" || continue
3177 ac_cv_prog_AWK="$ac_prog"
3178 echo "$as_me:3178: found $ac_dir/$ac_word" >&5
3179 break
3180 done
3181
3182 fi
3183 fi
3184 AWK=$ac_cv_prog_AWK
3185 if test -n "$AWK"; then
3186   echo "$as_me:3186: result: $AWK" >&5
3187 echo "${ECHO_T}$AWK" >&6
3188 else
3189   echo "$as_me:3189: result: no" >&5
3190 echo "${ECHO_T}no" >&6
3191 fi
3192
3193   test -n "$AWK" && break
3194 done
3195
3196 test -z "$AWK" && { { echo "$as_me:3196: error: No awk program found" >&5
3197 echo "$as_me: error: No awk program found" >&2;}
3198    { (exit 1); exit 1; }; }
3199
3200 echo "$as_me:3200: checking for egrep" >&5
3201 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3202 if test "${ac_cv_prog_egrep+set}" = set; then
3203   echo $ECHO_N "(cached) $ECHO_C" >&6
3204 else
3205   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3206     then ac_cv_prog_egrep='grep -E'
3207     else ac_cv_prog_egrep='egrep'
3208     fi
3209 fi
3210 echo "$as_me:3210: result: $ac_cv_prog_egrep" >&5
3211 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3212  EGREP=$ac_cv_prog_egrep
3213
3214 test -z "$EGREP" && { { echo "$as_me:3214: error: No egrep program found" >&5
3215 echo "$as_me: error: No egrep program found" >&2;}
3216    { (exit 1); exit 1; }; }
3217
3218 # Find a good install program.  We prefer a C program (faster),
3219 # so one script is as good as another.  But avoid the broken or
3220 # incompatible versions:
3221 # SysV /etc/install, /usr/sbin/install
3222 # SunOS /usr/etc/install
3223 # IRIX /sbin/install
3224 # AIX /bin/install
3225 # AmigaOS /C/install, which installs bootblocks on floppy discs
3226 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3227 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3228 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3229 # ./install, which can be erroneously created by make from ./install.sh.
3230 echo "$as_me:3230: checking for a BSD compatible install" >&5
3231 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3232 if test -z "$INSTALL"; then
3233 if test "${ac_cv_path_install+set}" = set; then
3234   echo $ECHO_N "(cached) $ECHO_C" >&6
3235 else
3236     ac_save_IFS=$IFS; IFS=$ac_path_separator
3237   for ac_dir in $PATH; do
3238     IFS=$ac_save_IFS
3239     # Account for people who put trailing slashes in PATH elements.
3240     case $ac_dir/ in
3241     / | ./ | .// | /cC/* \
3242     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3243     | /usr/ucb/* ) ;;
3244     *)
3245       # OSF1 and SCO ODT 3.0 have their own names for install.
3246       # Don't use installbsd from OSF since it installs stuff as root
3247       # by default.
3248       for ac_prog in ginstall scoinst install; do
3249         if $as_executable_p "$ac_dir/$ac_prog"; then
3250           if test $ac_prog = install &&
3251             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3252             # AIX install.  It has an incompatible calling convention.
3253             :
3254           elif test $ac_prog = install &&
3255             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3256             # program-specific install script used by HP pwplus--don't use.
3257             :
3258           else
3259             ac_cv_path_install="$ac_dir/$ac_prog -c"
3260             break 2
3261           fi
3262         fi
3263       done
3264       ;;
3265     esac
3266   done
3267
3268 fi
3269   if test "${ac_cv_path_install+set}" = set; then
3270     INSTALL=$ac_cv_path_install
3271   else
3272     # As a last resort, use the slow shell script.  We don't cache a
3273     # path for INSTALL within a source directory, because that will
3274     # break other packages using the cache if that directory is
3275     # removed, or if the path is relative.
3276     INSTALL=$ac_install_sh
3277   fi
3278 fi
3279 echo "$as_me:3279: result: $INSTALL" >&5
3280 echo "${ECHO_T}$INSTALL" >&6
3281
3282 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3283 # It thinks the first close brace ends the variable substitution.
3284 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3285
3286 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3287
3288 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3289
3290 case $INSTALL in
3291 /*)
3292   ;;
3293 *)
3294   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3295   test -z "$cf_dir" && cf_dir=.
3296   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3297   ;;
3298 esac
3299
3300 for ac_prog in tdlint lint alint
3301 do
3302   # Extract the first word of "$ac_prog", so it can be a program name with args.
3303 set dummy $ac_prog; ac_word=$2
3304 echo "$as_me:3304: checking for $ac_word" >&5
3305 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3306 if test "${ac_cv_prog_LINT+set}" = set; then
3307   echo $ECHO_N "(cached) $ECHO_C" >&6
3308 else
3309   if test -n "$LINT"; then
3310   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3311 else
3312   ac_save_IFS=$IFS; IFS=$ac_path_separator
3313 ac_dummy="$PATH"
3314 for ac_dir in $ac_dummy; do
3315   IFS=$ac_save_IFS
3316   test -z "$ac_dir" && ac_dir=.
3317   $as_executable_p "$ac_dir/$ac_word" || continue
3318 ac_cv_prog_LINT="$ac_prog"
3319 echo "$as_me:3319: found $ac_dir/$ac_word" >&5
3320 break
3321 done
3322
3323 fi
3324 fi
3325 LINT=$ac_cv_prog_LINT
3326 if test -n "$LINT"; then
3327   echo "$as_me:3327: result: $LINT" >&5
3328 echo "${ECHO_T}$LINT" >&6
3329 else
3330   echo "$as_me:3330: result: no" >&5
3331 echo "${ECHO_T}no" >&6
3332 fi
3333
3334   test -n "$LINT" && break
3335 done
3336
3337 echo "$as_me:3337: checking whether ln -s works" >&5
3338 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3339 LN_S=$as_ln_s
3340 if test "$LN_S" = "ln -s"; then
3341   echo "$as_me:3341: result: yes" >&5
3342 echo "${ECHO_T}yes" >&6
3343 else
3344   echo "$as_me:3344: result: no, using $LN_S" >&5
3345 echo "${ECHO_T}no, using $LN_S" >&6
3346 fi
3347
3348 echo "$as_me:3348: checking for long file names" >&5
3349 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3350 if test "${ac_cv_sys_long_file_names+set}" = set; then
3351   echo $ECHO_N "(cached) $ECHO_C" >&6
3352 else
3353   ac_cv_sys_long_file_names=yes
3354 # Test for long file names in all the places we know might matter:
3355 #      .                the current directory, where building will happen
3356 #      $prefix/lib      where we will be installing things
3357 #      $exec_prefix/lib likewise
3358 # eval it to expand exec_prefix.
3359 #      $TMPDIR          if set, where it might want to write temporary files
3360 # if $TMPDIR is not set:
3361 #      /tmp             where it might want to write temporary files
3362 #      /var/tmp         likewise
3363 #      /usr/tmp         likewise
3364 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3365   ac_tmpdirs=$TMPDIR
3366 else
3367   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3368 fi
3369 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3370   test -d $ac_dir || continue
3371   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3372   ac_xdir=$ac_dir/cf$$
3373   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3374   ac_tf1=$ac_xdir/conftest9012345
3375   ac_tf2=$ac_xdir/conftest9012346
3376   (echo 1 >$ac_tf1) 2>/dev/null
3377   (echo 2 >$ac_tf2) 2>/dev/null
3378   ac_val=`cat $ac_tf1 2>/dev/null`
3379   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3380     ac_cv_sys_long_file_names=no
3381     rm -rf $ac_xdir 2>/dev/null
3382     break
3383   fi
3384   rm -rf $ac_xdir 2>/dev/null
3385 done
3386 fi
3387 echo "$as_me:3387: result: $ac_cv_sys_long_file_names" >&5
3388 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3389 if test $ac_cv_sys_long_file_names = yes; then
3390
3391 cat >>confdefs.h <<\EOF
3392 #define HAVE_LONG_FILE_NAMES 1
3393 EOF
3394
3395 fi
3396
3397 echo "$as_me:3397: checking if we should assume mixed-case filenames" >&5
3398 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3399
3400 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3401 if test "${enable_mixed_case+set}" = set; then
3402   enableval="$enable_mixed_case"
3403   enable_mixedcase=$enableval
3404 else
3405   enable_mixedcase=auto
3406 fi;
3407 echo "$as_me:3407: result: $enable_mixedcase" >&5
3408 echo "${ECHO_T}$enable_mixedcase" >&6
3409 if test "$enable_mixedcase" = "auto" ; then
3410
3411 echo "$as_me:3411: checking if filesystem supports mixed-case filenames" >&5
3412 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3413 if test "${cf_cv_mixedcase+set}" = set; then
3414   echo $ECHO_N "(cached) $ECHO_C" >&6
3415 else
3416
3417 if test "$cross_compiling" = yes ; then
3418         case $target_alias in #(vi
3419         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3420                 cf_cv_mixedcase=no
3421                 ;;
3422         *)
3423                 cf_cv_mixedcase=yes
3424                 ;;
3425         esac
3426 else
3427         rm -f conftest CONFTEST
3428         echo test >conftest
3429         if test -f CONFTEST ; then
3430                 cf_cv_mixedcase=no
3431         else
3432                 cf_cv_mixedcase=yes
3433         fi
3434         rm -f conftest CONFTEST
3435 fi
3436
3437 fi
3438 echo "$as_me:3438: result: $cf_cv_mixedcase" >&5
3439 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3440 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3441 #define MIXEDCASE_FILENAMES 1
3442 EOF
3443
3444 else
3445     cf_cv_mixedcase=$enable_mixedcase
3446     if test "$enable_mixedcase" = "yes" ; then
3447         cat >>confdefs.h <<\EOF
3448 #define MIXEDCASE_FILENAMES 1
3449 EOF
3450
3451     fi
3452 fi
3453
3454 # do this after mixed-case option (tags/TAGS is not as important as tic).
3455 echo "$as_me:3455: checking whether ${MAKE-make} sets \${MAKE}" >&5
3456 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3457 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3458 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3459   echo $ECHO_N "(cached) $ECHO_C" >&6
3460 else
3461   cat >conftest.make <<\EOF
3462 all:
3463         @echo 'ac_maketemp="${MAKE}"'
3464 EOF
3465 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3466 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3467 if test -n "$ac_maketemp"; then
3468   eval ac_cv_prog_make_${ac_make}_set=yes
3469 else
3470   eval ac_cv_prog_make_${ac_make}_set=no
3471 fi
3472 rm -f conftest.make
3473 fi
3474 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3475   echo "$as_me:3475: result: yes" >&5
3476 echo "${ECHO_T}yes" >&6
3477   SET_MAKE=
3478 else
3479   echo "$as_me:3479: result: no" >&5
3480 echo "${ECHO_T}no" >&6
3481   SET_MAKE="MAKE=${MAKE-make}"
3482 fi
3483
3484 # Extract the first word of "ctags", so it can be a program name with args.
3485 set dummy ctags; ac_word=$2
3486 echo "$as_me:3486: checking for $ac_word" >&5
3487 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3488 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3489   echo $ECHO_N "(cached) $ECHO_C" >&6
3490 else
3491   if test -n "$MAKE_LOWER_TAGS"; then
3492   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3493 else
3494   ac_save_IFS=$IFS; IFS=$ac_path_separator
3495 ac_dummy="$PATH"
3496 for ac_dir in $ac_dummy; do
3497   IFS=$ac_save_IFS
3498   test -z "$ac_dir" && ac_dir=.
3499   $as_executable_p "$ac_dir/$ac_word" || continue
3500 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3501 echo "$as_me:3501: found $ac_dir/$ac_word" >&5
3502 break
3503 done
3504
3505   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3506 fi
3507 fi
3508 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3509 if test -n "$MAKE_LOWER_TAGS"; then
3510   echo "$as_me:3510: result: $MAKE_LOWER_TAGS" >&5
3511 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3512 else
3513   echo "$as_me:3513: result: no" >&5
3514 echo "${ECHO_T}no" >&6
3515 fi
3516
3517 if test "$cf_cv_mixedcase" = yes ; then
3518         # Extract the first word of "etags", so it can be a program name with args.
3519 set dummy etags; ac_word=$2
3520 echo "$as_me:3520: checking for $ac_word" >&5
3521 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3522 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3523   echo $ECHO_N "(cached) $ECHO_C" >&6
3524 else
3525   if test -n "$MAKE_UPPER_TAGS"; then
3526   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3527 else
3528   ac_save_IFS=$IFS; IFS=$ac_path_separator
3529 ac_dummy="$PATH"
3530 for ac_dir in $ac_dummy; do
3531   IFS=$ac_save_IFS
3532   test -z "$ac_dir" && ac_dir=.
3533   $as_executable_p "$ac_dir/$ac_word" || continue
3534 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3535 echo "$as_me:3535: found $ac_dir/$ac_word" >&5
3536 break
3537 done
3538
3539   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3540 fi
3541 fi
3542 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3543 if test -n "$MAKE_UPPER_TAGS"; then
3544   echo "$as_me:3544: result: $MAKE_UPPER_TAGS" >&5
3545 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3546 else
3547   echo "$as_me:3547: result: no" >&5
3548 echo "${ECHO_T}no" >&6
3549 fi
3550
3551 else
3552         MAKE_UPPER_TAGS=no
3553 fi
3554
3555 if test "$MAKE_UPPER_TAGS" = yes ; then
3556         MAKE_UPPER_TAGS=
3557 else
3558         MAKE_UPPER_TAGS="#"
3559 fi
3560
3561 if test "$MAKE_LOWER_TAGS" = yes ; then
3562         MAKE_LOWER_TAGS=
3563 else
3564         MAKE_LOWER_TAGS="#"
3565 fi
3566
3567 echo "$as_me:3567: checking for makeflags variable" >&5
3568 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3569 if test "${cf_cv_makeflags+set}" = set; then
3570   echo $ECHO_N "(cached) $ECHO_C" >&6
3571 else
3572
3573         cf_cv_makeflags=''
3574         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3575         do
3576                 cat >cf_makeflags.tmp <<CF_EOF
3577 SHELL = /bin/sh
3578 all :
3579         @ echo '.$cf_option'
3580 CF_EOF
3581                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3582                 case "$cf_result" in
3583                 .*k)
3584                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3585                         case "$cf_result" in
3586                         .*CC=*) cf_cv_makeflags=
3587                                 ;;
3588                         *)      cf_cv_makeflags=$cf_option
3589                                 ;;
3590                         esac
3591                         break
3592                         ;;
3593                 .-)     ;;
3594                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3595                         ;;
3596                 esac
3597         done
3598         rm -f cf_makeflags.tmp
3599
3600 fi
3601 echo "$as_me:3601: result: $cf_cv_makeflags" >&5
3602 echo "${ECHO_T}$cf_cv_makeflags" >&6
3603
3604 if test -n "$ac_tool_prefix"; then
3605   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3606 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3607 echo "$as_me:3607: checking for $ac_word" >&5
3608 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3609 if test "${ac_cv_prog_RANLIB+set}" = set; then
3610   echo $ECHO_N "(cached) $ECHO_C" >&6
3611 else
3612   if test -n "$RANLIB"; then
3613   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3614 else
3615   ac_save_IFS=$IFS; IFS=$ac_path_separator
3616 ac_dummy="$PATH"
3617 for ac_dir in $ac_dummy; do
3618   IFS=$ac_save_IFS
3619   test -z "$ac_dir" && ac_dir=.
3620   $as_executable_p "$ac_dir/$ac_word" || continue
3621 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3622 echo "$as_me:3622: found $ac_dir/$ac_word" >&5
3623 break
3624 done
3625
3626 fi
3627 fi
3628 RANLIB=$ac_cv_prog_RANLIB
3629 if test -n "$RANLIB"; then
3630   echo "$as_me:3630: result: $RANLIB" >&5
3631 echo "${ECHO_T}$RANLIB" >&6
3632 else
3633   echo "$as_me:3633: result: no" >&5
3634 echo "${ECHO_T}no" >&6
3635 fi
3636
3637 fi
3638 if test -z "$ac_cv_prog_RANLIB"; then
3639   ac_ct_RANLIB=$RANLIB
3640   # Extract the first word of "ranlib", so it can be a program name with args.
3641 set dummy ranlib; ac_word=$2
3642 echo "$as_me:3642: checking for $ac_word" >&5
3643 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3644 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3645   echo $ECHO_N "(cached) $ECHO_C" >&6
3646 else
3647   if test -n "$ac_ct_RANLIB"; then
3648   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3649 else
3650   ac_save_IFS=$IFS; IFS=$ac_path_separator
3651 ac_dummy="$PATH"
3652 for ac_dir in $ac_dummy; do
3653   IFS=$ac_save_IFS
3654   test -z "$ac_dir" && ac_dir=.
3655   $as_executable_p "$ac_dir/$ac_word" || continue
3656 ac_cv_prog_ac_ct_RANLIB="ranlib"
3657 echo "$as_me:3657: found $ac_dir/$ac_word" >&5
3658 break
3659 done
3660
3661   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3662 fi
3663 fi
3664 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3665 if test -n "$ac_ct_RANLIB"; then
3666   echo "$as_me:3666: result: $ac_ct_RANLIB" >&5
3667 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3668 else
3669   echo "$as_me:3669: result: no" >&5
3670 echo "${ECHO_T}no" >&6
3671 fi
3672
3673   RANLIB=$ac_ct_RANLIB
3674 else
3675   RANLIB="$ac_cv_prog_RANLIB"
3676 fi
3677
3678 if test -n "$ac_tool_prefix"; then
3679   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3680 set dummy ${ac_tool_prefix}ld; ac_word=$2
3681 echo "$as_me:3681: checking for $ac_word" >&5
3682 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3683 if test "${ac_cv_prog_LD+set}" = set; then
3684   echo $ECHO_N "(cached) $ECHO_C" >&6
3685 else
3686   if test -n "$LD"; then
3687   ac_cv_prog_LD="$LD" # Let the user override the test.
3688 else
3689   ac_save_IFS=$IFS; IFS=$ac_path_separator
3690 ac_dummy="$PATH"
3691 for ac_dir in $ac_dummy; do
3692   IFS=$ac_save_IFS
3693   test -z "$ac_dir" && ac_dir=.
3694   $as_executable_p "$ac_dir/$ac_word" || continue
3695 ac_cv_prog_LD="${ac_tool_prefix}ld"
3696 echo "$as_me:3696: found $ac_dir/$ac_word" >&5
3697 break
3698 done
3699
3700 fi
3701 fi
3702 LD=$ac_cv_prog_LD
3703 if test -n "$LD"; then
3704   echo "$as_me:3704: result: $LD" >&5
3705 echo "${ECHO_T}$LD" >&6
3706 else
3707   echo "$as_me:3707: result: no" >&5
3708 echo "${ECHO_T}no" >&6
3709 fi
3710
3711 fi
3712 if test -z "$ac_cv_prog_LD"; then
3713   ac_ct_LD=$LD
3714   # Extract the first word of "ld", so it can be a program name with args.
3715 set dummy ld; ac_word=$2
3716 echo "$as_me:3716: checking for $ac_word" >&5
3717 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3718 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3719   echo $ECHO_N "(cached) $ECHO_C" >&6
3720 else
3721   if test -n "$ac_ct_LD"; then
3722   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3723 else
3724   ac_save_IFS=$IFS; IFS=$ac_path_separator
3725 ac_dummy="$PATH"
3726 for ac_dir in $ac_dummy; do
3727   IFS=$ac_save_IFS
3728   test -z "$ac_dir" && ac_dir=.
3729   $as_executable_p "$ac_dir/$ac_word" || continue
3730 ac_cv_prog_ac_ct_LD="ld"
3731 echo "$as_me:3731: found $ac_dir/$ac_word" >&5
3732 break
3733 done
3734
3735   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3736 fi
3737 fi
3738 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3739 if test -n "$ac_ct_LD"; then
3740   echo "$as_me:3740: result: $ac_ct_LD" >&5
3741 echo "${ECHO_T}$ac_ct_LD" >&6
3742 else
3743   echo "$as_me:3743: result: no" >&5
3744 echo "${ECHO_T}no" >&6
3745 fi
3746
3747   LD=$ac_ct_LD
3748 else
3749   LD="$ac_cv_prog_LD"
3750 fi
3751
3752 if test -n "$ac_tool_prefix"; then
3753   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3754 set dummy ${ac_tool_prefix}ar; ac_word=$2
3755 echo "$as_me:3755: checking for $ac_word" >&5
3756 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3757 if test "${ac_cv_prog_AR+set}" = set; then
3758   echo $ECHO_N "(cached) $ECHO_C" >&6
3759 else
3760   if test -n "$AR"; then
3761   ac_cv_prog_AR="$AR" # Let the user override the test.
3762 else
3763   ac_save_IFS=$IFS; IFS=$ac_path_separator
3764 ac_dummy="$PATH"
3765 for ac_dir in $ac_dummy; do
3766   IFS=$ac_save_IFS
3767   test -z "$ac_dir" && ac_dir=.
3768   $as_executable_p "$ac_dir/$ac_word" || continue
3769 ac_cv_prog_AR="${ac_tool_prefix}ar"
3770 echo "$as_me:3770: found $ac_dir/$ac_word" >&5
3771 break
3772 done
3773
3774 fi
3775 fi
3776 AR=$ac_cv_prog_AR
3777 if test -n "$AR"; then
3778   echo "$as_me:3778: result: $AR" >&5
3779 echo "${ECHO_T}$AR" >&6
3780 else
3781   echo "$as_me:3781: result: no" >&5
3782 echo "${ECHO_T}no" >&6
3783 fi
3784
3785 fi
3786 if test -z "$ac_cv_prog_AR"; then
3787   ac_ct_AR=$AR
3788   # Extract the first word of "ar", so it can be a program name with args.
3789 set dummy ar; ac_word=$2
3790 echo "$as_me:3790: checking for $ac_word" >&5
3791 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3792 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3793   echo $ECHO_N "(cached) $ECHO_C" >&6
3794 else
3795   if test -n "$ac_ct_AR"; then
3796   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3797 else
3798   ac_save_IFS=$IFS; IFS=$ac_path_separator
3799 ac_dummy="$PATH"
3800 for ac_dir in $ac_dummy; do
3801   IFS=$ac_save_IFS
3802   test -z "$ac_dir" && ac_dir=.
3803   $as_executable_p "$ac_dir/$ac_word" || continue
3804 ac_cv_prog_ac_ct_AR="ar"
3805 echo "$as_me:3805: found $ac_dir/$ac_word" >&5
3806 break
3807 done
3808
3809   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3810 fi
3811 fi
3812 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3813 if test -n "$ac_ct_AR"; then
3814   echo "$as_me:3814: result: $ac_ct_AR" >&5
3815 echo "${ECHO_T}$ac_ct_AR" >&6
3816 else
3817   echo "$as_me:3817: result: no" >&5
3818 echo "${ECHO_T}no" >&6
3819 fi
3820
3821   AR=$ac_ct_AR
3822 else
3823   AR="$ac_cv_prog_AR"
3824 fi
3825
3826 if test "${cf_cv_subst_AR_OPTS+set}" = set; then
3827   echo $ECHO_N "(cached) $ECHO_C" >&6
3828 else
3829
3830 echo "$as_me:3830: checking for archiver options (symbol AR_OPTS)" >&5
3831 echo $ECHO_N "checking for archiver options (symbol AR_OPTS)... $ECHO_C" >&6
3832
3833 if test -z "$AR_OPTS" ; then
3834         AR_OPTS=rv
3835
3836 fi
3837
3838 cf_cv_subst_AR_OPTS=$AR_OPTS
3839 echo "$as_me:3839: result: $AR_OPTS" >&5
3840 echo "${ECHO_T}$AR_OPTS" >&6
3841
3842 fi
3843
3844 echo "$as_me:3844: checking if you have specified an install-prefix" >&5
3845 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3846
3847 # Check whether --with-install-prefix or --without-install-prefix was given.
3848 if test "${with_install_prefix+set}" = set; then
3849   withval="$with_install_prefix"
3850   case "$withval" in #(vi
3851         yes|no) #(vi
3852                 ;;
3853         *)      DESTDIR="$withval"
3854                 ;;
3855         esac
3856 fi;
3857 echo "$as_me:3857: result: $DESTDIR" >&5
3858 echo "${ECHO_T}$DESTDIR" >&6
3859
3860 ###############################################################################
3861
3862 # If we're cross-compiling, allow the user to override the tools and their
3863 # options.  The configure script is oriented toward identifying the host
3864 # compiler, etc., but we need a build compiler to generate parts of the source.
3865
3866 if test "$cross_compiling" = yes ; then
3867
3868         # defaults that we might want to override
3869         : ${BUILD_CFLAGS:=''}
3870         : ${BUILD_CPPFLAGS:=''}
3871         : ${BUILD_LDFLAGS:=''}
3872         : ${BUILD_LIBS:=''}
3873         : ${BUILD_EXEEXT:='$x'}
3874         : ${BUILD_OBJEXT:='o'}
3875
3876 # Check whether --with-build-cc or --without-build-cc was given.
3877 if test "${with_build_cc+set}" = set; then
3878   withval="$with_build_cc"
3879   BUILD_CC="$withval"
3880 else
3881   for ac_prog in gcc cc cl
3882 do
3883   # Extract the first word of "$ac_prog", so it can be a program name with args.
3884 set dummy $ac_prog; ac_word=$2
3885 echo "$as_me:3885: checking for $ac_word" >&5
3886 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3887 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3888   echo $ECHO_N "(cached) $ECHO_C" >&6
3889 else
3890   if test -n "$BUILD_CC"; then
3891   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3892 else
3893   ac_save_IFS=$IFS; IFS=$ac_path_separator
3894 ac_dummy="$PATH"
3895 for ac_dir in $ac_dummy; do
3896   IFS=$ac_save_IFS
3897   test -z "$ac_dir" && ac_dir=.
3898   $as_executable_p "$ac_dir/$ac_word" || continue
3899 ac_cv_prog_BUILD_CC="$ac_prog"
3900 echo "$as_me:3900: found $ac_dir/$ac_word" >&5
3901 break
3902 done
3903
3904 fi
3905 fi
3906 BUILD_CC=$ac_cv_prog_BUILD_CC
3907 if test -n "$BUILD_CC"; then
3908   echo "$as_me:3908: result: $BUILD_CC" >&5
3909 echo "${ECHO_T}$BUILD_CC" >&6
3910 else
3911   echo "$as_me:3911: result: no" >&5
3912 echo "${ECHO_T}no" >&6
3913 fi
3914
3915   test -n "$BUILD_CC" && break
3916 done
3917
3918 fi;
3919         echo "$as_me:3919: checking for native build C compiler" >&5
3920 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3921         echo "$as_me:3921: result: $BUILD_CC" >&5
3922 echo "${ECHO_T}$BUILD_CC" >&6
3923
3924         echo "$as_me:3924: checking for native build C preprocessor" >&5
3925 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3926
3927 # Check whether --with-build-cpp or --without-build-cpp was given.
3928 if test "${with_build_cpp+set}" = set; then
3929   withval="$with_build_cpp"
3930   BUILD_CPP="$withval"
3931 else
3932   BUILD_CPP='${BUILD_CC} -E'
3933 fi;
3934         echo "$as_me:3934: result: $BUILD_CPP" >&5
3935 echo "${ECHO_T}$BUILD_CPP" >&6
3936
3937         echo "$as_me:3937: checking for native build C flags" >&5
3938 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3939
3940 # Check whether --with-build-cflags or --without-build-cflags was given.
3941 if test "${with_build_cflags+set}" = set; then
3942   withval="$with_build_cflags"
3943   BUILD_CFLAGS="$withval"
3944 fi;
3945         echo "$as_me:3945: result: $BUILD_CFLAGS" >&5
3946 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3947
3948         echo "$as_me:3948: checking for native build C preprocessor-flags" >&5
3949 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3950
3951 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3952 if test "${with_build_cppflags+set}" = set; then
3953   withval="$with_build_cppflags"
3954   BUILD_CPPFLAGS="$withval"
3955 fi;
3956         echo "$as_me:3956: result: $BUILD_CPPFLAGS" >&5
3957 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3958
3959         echo "$as_me:3959: checking for native build linker-flags" >&5
3960 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3961
3962 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3963 if test "${with_build_ldflags+set}" = set; then
3964   withval="$with_build_ldflags"
3965   BUILD_LDFLAGS="$withval"
3966 fi;
3967         echo "$as_me:3967: result: $BUILD_LDFLAGS" >&5
3968 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3969
3970         echo "$as_me:3970: checking for native build linker-libraries" >&5
3971 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3972
3973 # Check whether --with-build-libs or --without-build-libs was given.
3974 if test "${with_build_libs+set}" = set; then
3975   withval="$with_build_libs"
3976   BUILD_LIBS="$withval"
3977 fi;
3978         echo "$as_me:3978: result: $BUILD_LIBS" >&5
3979 echo "${ECHO_T}$BUILD_LIBS" >&6
3980
3981         # this assumes we're on Unix.
3982         BUILD_EXEEXT=
3983         BUILD_OBJEXT=o
3984
3985         : ${BUILD_CC:='${CC}'}
3986
3987         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3988                 { { echo "$as_me:3988: error: Cross-build requires two compilers.
3989 Use --with-build-cc to specify the native compiler." >&5
3990 echo "$as_me: error: Cross-build requires two compilers.
3991 Use --with-build-cc to specify the native compiler." >&2;}
3992    { (exit 1); exit 1; }; }
3993         fi
3994
3995 else
3996         : ${BUILD_CC:='${CC}'}
3997         : ${BUILD_CPP:='${CPP}'}
3998         : ${BUILD_CFLAGS:='${CFLAGS}'}
3999         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4000         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4001         : ${BUILD_LIBS:='${LIBS}'}
4002         : ${BUILD_EXEEXT:='$x'}
4003         : ${BUILD_OBJEXT:='o'}
4004 fi
4005
4006 ###############################################################################
4007
4008 ### Options to allow the user to specify the set of libraries which are used.
4009 ### Use "--without-normal --with-shared" to allow the default model to be
4010 ### shared, for example.
4011 cf_list_models=""
4012
4013 LIBTOOL=
4014
4015 # common library maintenance symbols that are convenient for libtool scripts:
4016 LIB_CREATE='${AR} -cr'
4017 LIB_OBJECT='${OBJECTS}'
4018 LIB_SUFFIX=.a
4019 LIB_PREP="$RANLIB"
4020
4021 # symbols used to prop libtool up to enable it to determine what it should be
4022 # doing:
4023 LIB_CLEAN=
4024 LIB_COMPILE=
4025 LIB_LINK='${CC}'
4026 LIB_INSTALL=
4027 LIB_UNINSTALL=
4028
4029 echo "$as_me:4029: checking if you want to build libraries with libtool" >&5
4030 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4031
4032 # Check whether --with-libtool or --without-libtool was given.
4033 if test "${with_libtool+set}" = set; then
4034   withval="$with_libtool"
4035   with_libtool=$withval
4036 else
4037   with_libtool=no
4038 fi;
4039 echo "$as_me:4039: result: $with_libtool" >&5
4040 echo "${ECHO_T}$with_libtool" >&6
4041 if test "$with_libtool" != "no"; then
4042
4043         if test "$with_libtool" != "yes" ; then
4044
4045 if test "x$prefix" != xNONE; then
4046   cf_path_syntax="$prefix"
4047 else
4048   cf_path_syntax="$ac_default_prefix"
4049 fi
4050
4051 case ".$with_libtool" in #(vi
4052 .\$\(*\)*|.\'*\'*) #(vi
4053   ;;
4054 ..|./*|.\\*) #(vi
4055   ;;
4056 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4057   ;;
4058 .\${*prefix}*) #(vi
4059   eval with_libtool="$with_libtool"
4060   case ".$with_libtool" in #(vi
4061   .NONE/*)
4062     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4063     ;;
4064   esac
4065   ;; #(vi
4066 .no|.NONE/*)
4067   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4068   ;;
4069 *)
4070   { { echo "$as_me:4070: error: expected a pathname, not \"$with_libtool\"" >&5
4071 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4072    { (exit 1); exit 1; }; }
4073   ;;
4074 esac
4075
4076                 LIBTOOL=$with_libtool
4077         else
4078                 # Extract the first word of "libtool", so it can be a program name with args.
4079 set dummy libtool; ac_word=$2
4080 echo "$as_me:4080: checking for $ac_word" >&5
4081 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4082 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4083   echo $ECHO_N "(cached) $ECHO_C" >&6
4084 else
4085   case $LIBTOOL in
4086   [\\/]* | ?:[\\/]*)
4087   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4088   ;;
4089   *)
4090   ac_save_IFS=$IFS; IFS=$ac_path_separator
4091 ac_dummy="$PATH"
4092 for ac_dir in $ac_dummy; do
4093   IFS=$ac_save_IFS
4094   test -z "$ac_dir" && ac_dir=.
4095   if $as_executable_p "$ac_dir/$ac_word"; then
4096    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4097    echo "$as_me:4097: found $ac_dir/$ac_word" >&5
4098    break
4099 fi
4100 done
4101
4102   ;;
4103 esac
4104 fi
4105 LIBTOOL=$ac_cv_path_LIBTOOL
4106
4107 if test -n "$LIBTOOL"; then
4108   echo "$as_me:4108: result: $LIBTOOL" >&5
4109 echo "${ECHO_T}$LIBTOOL" >&6
4110 else
4111   echo "$as_me:4111: result: no" >&5
4112 echo "${ECHO_T}no" >&6
4113 fi
4114
4115         fi
4116         if test -z "$LIBTOOL" ; then
4117                 { { echo "$as_me:4117: error: Cannot find libtool" >&5
4118 echo "$as_me: error: Cannot find libtool" >&2;}
4119    { (exit 1); exit 1; }; }
4120         fi
4121         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} -o'
4122         LIB_OBJECT='${OBJECTS:.o=.lo}'
4123         LIB_SUFFIX=.la
4124         LIB_CLEAN='${LIBTOOL} --mode=clean'
4125         LIB_COMPILE='${LIBTOOL} --mode=compile'
4126         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4127         LIB_INSTALL='${LIBTOOL} --mode=install'
4128         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4129         LIB_PREP=:
4130
4131         # Show the version of libtool
4132         echo "$as_me:4132: checking version of libtool" >&5
4133 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4134
4135         # Save the version in a cache variable - this is not entirely a good
4136         # thing, but the version string from libtool is very ugly, and for
4137         # bug reports it might be useful to have the original string.
4138         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
4139         echo "$as_me:4139: result: $cf_cv_libtool_version" >&5
4140 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4141         if test -z "$cf_cv_libtool_version" ; then
4142                 { { echo "$as_me:4142: error: This is not GNU libtool" >&5
4143 echo "$as_me: error: This is not GNU libtool" >&2;}
4144    { (exit 1); exit 1; }; }
4145         fi
4146
4147         # special hack to add --tag option for C++ compiler
4148         case $cf_cv_libtool_version in
4149         1.[5-9]*|[2-9]*)
4150                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4151                 LIBTOOL="$LIBTOOL --tag=CC"
4152                 ;;
4153         *)
4154                 LIBTOOL_CXX="$LIBTOOL"
4155                 ;;
4156         esac
4157 else
4158         LIBTOOL=""
4159         LIBTOOL_CXX=""
4160 fi
4161
4162 test -z "$LIBTOOL" && ECHO_LT=
4163
4164 if test "$with_libtool" != "no" ; then
4165
4166 cf_list_models="$cf_list_models libtool"
4167
4168 else
4169
4170 echo "$as_me:4170: checking if you want to build shared libraries" >&5
4171 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4172
4173 # Check whether --with-shared or --without-shared was given.
4174 if test "${with_shared+set}" = set; then
4175   withval="$with_shared"
4176   with_shared=$withval
4177 else
4178   with_shared=no
4179 fi;
4180 echo "$as_me:4180: result: $with_shared" >&5
4181 echo "${ECHO_T}$with_shared" >&6
4182 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4183
4184 echo "$as_me:4184: checking if you want to build static libraries" >&5
4185 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4186
4187 # Check whether --with-normal or --without-normal was given.
4188 if test "${with_normal+set}" = set; then
4189   withval="$with_normal"
4190   with_normal=$withval
4191 else
4192   with_normal=yes
4193 fi;
4194 echo "$as_me:4194: result: $with_normal" >&5
4195 echo "${ECHO_T}$with_normal" >&6
4196 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4197
4198 echo "$as_me:4198: checking if you want to build debug libraries" >&5
4199 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4200
4201 # Check whether --with-debug or --without-debug was given.
4202 if test "${with_debug+set}" = set; then
4203   withval="$with_debug"
4204   with_debug=$withval
4205 else
4206   with_debug=yes
4207 fi;
4208 echo "$as_me:4208: result: $with_debug" >&5
4209 echo "${ECHO_T}$with_debug" >&6
4210 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4211
4212 echo "$as_me:4212: checking if you want to build profiling libraries" >&5
4213 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4214
4215 # Check whether --with-profile or --without-profile was given.
4216 if test "${with_profile+set}" = set; then
4217   withval="$with_profile"
4218   with_profile=$withval
4219 else
4220   with_profile=no
4221 fi;
4222 echo "$as_me:4222: result: $with_profile" >&5
4223 echo "${ECHO_T}$with_profile" >&6
4224 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4225
4226 fi
4227
4228 ###############################################################################
4229
4230 echo "$as_me:4230: checking for specified models" >&5
4231 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4232 test -z "$cf_list_models" && cf_list_models=normal
4233 test "$with_libtool" != "no" && cf_list_models=libtool
4234 echo "$as_me:4234: result: $cf_list_models" >&5
4235 echo "${ECHO_T}$cf_list_models" >&6
4236
4237 ### Use the first model as the default, and save its suffix for use in building
4238 ### up test-applications.
4239 echo "$as_me:4239: checking for default model" >&5
4240 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4241 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4242 echo "$as_me:4242: result: $DFT_LWR_MODEL" >&5
4243 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4244
4245 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4246
4247 TICS_NAME=tic
4248
4249 TINFO_NAME=tinfo
4250
4251 LIB_NAME=ncurses
4252
4253 LIB_DIR=../lib
4254 LIB_2ND=../../lib
4255
4256         case $cf_cv_system_name in #(vi
4257         OS/2*|os2*) #(vi
4258         LIB_PREFIX=''
4259         ;;
4260         *)      LIB_PREFIX='lib'
4261         ;;
4262         esac
4263 cf_prefix=$LIB_PREFIX
4264
4265 LIB_PREFIX=$cf_prefix
4266
4267 LIB_SUFFIX=
4268
4269 ###############################################################################
4270
4271 echo "$as_me:4271: checking if you want to build a separate terminfo library" >&5
4272 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4273
4274 # Check whether --with-termlib or --without-termlib was given.
4275 if test "${with_termlib+set}" = set; then
4276   withval="$with_termlib"
4277   with_termlib=$withval
4278 else
4279   with_termlib=no
4280 fi;
4281 echo "$as_me:4281: result: $with_termlib" >&5
4282 echo "${ECHO_T}$with_termlib" >&6
4283
4284 echo "$as_me:4284: checking if you want to build a separate tic library" >&5
4285 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4286
4287 # Check whether --with-ticlib or --without-ticlib was given.
4288 if test "${with_ticlib+set}" = set; then
4289   withval="$with_ticlib"
4290   with_ticlib=$withval
4291 else
4292   with_ticlib=no
4293 fi;
4294 echo "$as_me:4294: result: $with_ticlib" >&5
4295 echo "${ECHO_T}$with_ticlib" >&6
4296
4297 ### Checks for special libraries, must be done up-front.
4298 SHLIB_LIST=""
4299
4300 echo "$as_me:4300: checking if you want to link with the GPM mouse library" >&5
4301 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4302
4303 # Check whether --with-gpm or --without-gpm was given.
4304 if test "${with_gpm+set}" = set; then
4305   withval="$with_gpm"
4306   with_gpm=$withval
4307 else
4308   with_gpm=maybe
4309 fi;
4310 echo "$as_me:4310: result: $with_gpm" >&5
4311 echo "${ECHO_T}$with_gpm" >&6
4312
4313 if test "$with_gpm" != no ; then
4314         echo "$as_me:4314: checking for gpm.h" >&5
4315 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4316 if test "${ac_cv_header_gpm_h+set}" = set; then
4317   echo $ECHO_N "(cached) $ECHO_C" >&6
4318 else
4319   cat >conftest.$ac_ext <<_ACEOF
4320 #line 4320 "configure"
4321 #include "confdefs.h"
4322 #include <gpm.h>
4323 _ACEOF
4324 if { (eval echo "$as_me:4324: \"$ac_cpp conftest.$ac_ext\"") >&5
4325   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4326   ac_status=$?
4327   egrep -v '^ *\+' conftest.er1 >conftest.err
4328   rm -f conftest.er1
4329   cat conftest.err >&5
4330   echo "$as_me:4330: \$? = $ac_status" >&5
4331   (exit $ac_status); } >/dev/null; then
4332   if test -s conftest.err; then
4333     ac_cpp_err=$ac_c_preproc_warn_flag
4334   else
4335     ac_cpp_err=
4336   fi
4337 else
4338   ac_cpp_err=yes
4339 fi
4340 if test -z "$ac_cpp_err"; then
4341   ac_cv_header_gpm_h=yes
4342 else
4343   echo "$as_me: failed program was:" >&5
4344   cat conftest.$ac_ext >&5
4345   ac_cv_header_gpm_h=no
4346 fi
4347 rm -f conftest.err conftest.$ac_ext
4348 fi
4349 echo "$as_me:4349: result: $ac_cv_header_gpm_h" >&5
4350 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4351 if test $ac_cv_header_gpm_h = yes; then
4352
4353                 cat >>confdefs.h <<\EOF
4354 #define HAVE_GPM_H 1
4355 EOF
4356
4357                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4358                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4359
4360 echo "${as_me-configure}:4360: testing assuming we really have GPM library ..." 1>&5
4361
4362                         cat >>confdefs.h <<\EOF
4363 #define HAVE_LIBGPM 1
4364 EOF
4365
4366                 else
4367                         echo "$as_me:4367: checking for Gpm_Open in -lgpm" >&5
4368 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4369 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4370   echo $ECHO_N "(cached) $ECHO_C" >&6
4371 else
4372   ac_check_lib_save_LIBS=$LIBS
4373 LIBS="-lgpm  $LIBS"
4374 cat >conftest.$ac_ext <<_ACEOF
4375 #line 4375 "configure"
4376 #include "confdefs.h"
4377
4378 /* Override any gcc2 internal prototype to avoid an error.  */
4379 #ifdef __cplusplus
4380 extern "C"
4381 #endif
4382 /* We use char because int might match the return type of a gcc2
4383    builtin and then its argument prototype would still apply.  */
4384 char Gpm_Open ();
4385 int
4386 main ()
4387 {
4388 Gpm_Open ();
4389   ;
4390   return 0;
4391 }
4392 _ACEOF
4393 rm -f conftest.$ac_objext conftest$ac_exeext
4394 if { (eval echo "$as_me:4394: \"$ac_link\"") >&5
4395   (eval $ac_link) 2>&5
4396   ac_status=$?
4397   echo "$as_me:4397: \$? = $ac_status" >&5
4398   (exit $ac_status); } &&
4399          { ac_try='test -s conftest$ac_exeext'
4400   { (eval echo "$as_me:4400: \"$ac_try\"") >&5
4401   (eval $ac_try) 2>&5
4402   ac_status=$?
4403   echo "$as_me:4403: \$? = $ac_status" >&5
4404   (exit $ac_status); }; }; then
4405   ac_cv_lib_gpm_Gpm_Open=yes
4406 else
4407   echo "$as_me: failed program was:" >&5
4408 cat conftest.$ac_ext >&5
4409 ac_cv_lib_gpm_Gpm_Open=no
4410 fi
4411 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4412 LIBS=$ac_check_lib_save_LIBS
4413 fi
4414 echo "$as_me:4414: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4415 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4416 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4417   :
4418 else
4419
4420                                 { { echo "$as_me:4420: error: Cannot link with GPM library" >&5
4421 echo "$as_me: error: Cannot link with GPM library" >&2;}
4422    { (exit 1); exit 1; }; }
4423                 fi
4424                 with_gpm=yes
4425
4426 fi
4427
4428 else
4429
4430                 test "$with_gpm" != maybe && { echo "$as_me:4430: WARNING: Cannot find GPM header" >&5
4431 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4432                 with_gpm=no
4433
4434 fi
4435
4436 fi
4437
4438 if test "$with_gpm" != no ; then
4439         echo "$as_me:4439: checking if you want to load GPM dynamically" >&5
4440 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4441
4442 # Check whether --with-dlsym or --without-dlsym was given.
4443 if test "${with_dlsym+set}" = set; then
4444   withval="$with_dlsym"
4445   with_dlsym=$withval
4446 else
4447   with_dlsym=yes
4448 fi;
4449         echo "$as_me:4449: result: $with_dlsym" >&5
4450 echo "${ECHO_T}$with_dlsym" >&6
4451         if test "$with_dlsym" = yes ; then
4452
4453 cf_have_dlsym=no
4454 echo "$as_me:4454: checking for dlsym" >&5
4455 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4456 if test "${ac_cv_func_dlsym+set}" = set; then
4457   echo $ECHO_N "(cached) $ECHO_C" >&6
4458 else
4459   cat >conftest.$ac_ext <<_ACEOF
4460 #line 4460 "configure"
4461 #include "confdefs.h"
4462 /* System header to define __stub macros and hopefully few prototypes,
4463     which can conflict with char dlsym (); below.  */
4464 #include <assert.h>
4465 /* Override any gcc2 internal prototype to avoid an error.  */
4466 #ifdef __cplusplus
4467 extern "C"
4468 #endif
4469 /* We use char because int might match the return type of a gcc2
4470    builtin and then its argument prototype would still apply.  */
4471 char dlsym ();
4472 char (*f) ();
4473
4474 int
4475 main ()
4476 {
4477 /* The GNU C library defines this for functions which it implements
4478     to always fail with ENOSYS.  Some functions are actually named
4479     something starting with __ and the normal name is an alias.  */
4480 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4481 choke me
4482 #else
4483 f = dlsym;
4484 #endif
4485
4486   ;
4487   return 0;
4488 }
4489 _ACEOF
4490 rm -f conftest.$ac_objext conftest$ac_exeext
4491 if { (eval echo "$as_me:4491: \"$ac_link\"") >&5
4492   (eval $ac_link) 2>&5
4493   ac_status=$?
4494   echo "$as_me:4494: \$? = $ac_status" >&5
4495   (exit $ac_status); } &&
4496          { ac_try='test -s conftest$ac_exeext'
4497   { (eval echo "$as_me:4497: \"$ac_try\"") >&5
4498   (eval $ac_try) 2>&5
4499   ac_status=$?
4500   echo "$as_me:4500: \$? = $ac_status" >&5
4501   (exit $ac_status); }; }; then
4502   ac_cv_func_dlsym=yes
4503 else
4504   echo "$as_me: failed program was:" >&5
4505 cat conftest.$ac_ext >&5
4506 ac_cv_func_dlsym=no
4507 fi
4508 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4509 fi
4510 echo "$as_me:4510: result: $ac_cv_func_dlsym" >&5
4511 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4512 if test $ac_cv_func_dlsym = yes; then
4513   cf_have_dlsym=yes
4514 else
4515
4516 cf_have_libdl=no
4517 echo "$as_me:4517: checking for dlsym in -ldl" >&5
4518 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4519 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4520   echo $ECHO_N "(cached) $ECHO_C" >&6
4521 else
4522   ac_check_lib_save_LIBS=$LIBS
4523 LIBS="-ldl  $LIBS"
4524 cat >conftest.$ac_ext <<_ACEOF
4525 #line 4525 "configure"
4526 #include "confdefs.h"
4527
4528 /* Override any gcc2 internal prototype to avoid an error.  */
4529 #ifdef __cplusplus
4530 extern "C"
4531 #endif
4532 /* We use char because int might match the return type of a gcc2
4533    builtin and then its argument prototype would still apply.  */
4534 char dlsym ();
4535 int
4536 main ()
4537 {
4538 dlsym ();
4539   ;
4540   return 0;
4541 }
4542 _ACEOF
4543 rm -f conftest.$ac_objext conftest$ac_exeext
4544 if { (eval echo "$as_me:4544: \"$ac_link\"") >&5
4545   (eval $ac_link) 2>&5
4546   ac_status=$?
4547   echo "$as_me:4547: \$? = $ac_status" >&5
4548   (exit $ac_status); } &&
4549          { ac_try='test -s conftest$ac_exeext'
4550   { (eval echo "$as_me:4550: \"$ac_try\"") >&5
4551   (eval $ac_try) 2>&5
4552   ac_status=$?
4553   echo "$as_me:4553: \$? = $ac_status" >&5
4554   (exit $ac_status); }; }; then
4555   ac_cv_lib_dl_dlsym=yes
4556 else
4557   echo "$as_me: failed program was:" >&5
4558 cat conftest.$ac_ext >&5
4559 ac_cv_lib_dl_dlsym=no
4560 fi
4561 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4562 LIBS=$ac_check_lib_save_LIBS
4563 fi
4564 echo "$as_me:4564: result: $ac_cv_lib_dl_dlsym" >&5
4565 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4566 if test $ac_cv_lib_dl_dlsym = yes; then
4567
4568         cf_have_dlsym=yes
4569         cf_have_libdl=yes
4570 fi
4571
4572 fi
4573
4574 if test "$cf_have_dlsym" = yes ; then
4575         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4576
4577         echo "$as_me:4577: checking whether able to link to dl*() functions" >&5
4578 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4579         cat >conftest.$ac_ext <<_ACEOF
4580 #line 4580 "configure"
4581 #include "confdefs.h"
4582 #include <dlfcn.h>
4583 int
4584 main ()
4585 {
4586
4587                 void *obj;
4588                 if ((obj = dlopen("filename", 0)) != 0) {
4589                         if (dlsym(obj, "symbolname") == 0) {
4590                         dlclose(obj);
4591                         }
4592                 }
4593   ;
4594   return 0;
4595 }
4596 _ACEOF
4597 rm -f conftest.$ac_objext conftest$ac_exeext
4598 if { (eval echo "$as_me:4598: \"$ac_link\"") >&5
4599   (eval $ac_link) 2>&5
4600   ac_status=$?
4601   echo "$as_me:4601: \$? = $ac_status" >&5
4602   (exit $ac_status); } &&
4603          { ac_try='test -s conftest$ac_exeext'
4604   { (eval echo "$as_me:4604: \"$ac_try\"") >&5
4605   (eval $ac_try) 2>&5
4606   ac_status=$?
4607   echo "$as_me:4607: \$? = $ac_status" >&5
4608   (exit $ac_status); }; }; then
4609
4610                 cat >>confdefs.h <<\EOF
4611 #define HAVE_LIBDL 1
4612 EOF
4613
4614 else
4615   echo "$as_me: failed program was:" >&5
4616 cat conftest.$ac_ext >&5
4617
4618                 { { echo "$as_me:4618: error: Cannot link test program for libdl" >&5
4619 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4620    { (exit 1); exit 1; }; }
4621 fi
4622 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4623         echo "$as_me:4623: result: ok" >&5
4624 echo "${ECHO_T}ok" >&6
4625 else
4626         { { echo "$as_me:4626: error: Cannot find dlsym function" >&5
4627 echo "$as_me: error: Cannot find dlsym function" >&2;}
4628    { (exit 1); exit 1; }; }
4629 fi
4630
4631                 if test "$with_gpm" != yes ; then
4632                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4633
4634 echo "${as_me-configure}:4634: testing assuming soname for gpm is $with_gpm ..." 1>&5
4635
4636                         cf_cv_gpm_soname="$with_gpm"
4637                 else
4638
4639 echo "$as_me:4639: checking for soname of gpm library" >&5
4640 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4641 if test "${cf_cv_gpm_soname+set}" = set; then
4642   echo $ECHO_N "(cached) $ECHO_C" >&6
4643 else
4644
4645 cf_cv_gpm_soname=unknown
4646 if test "$cross_compiling" != yes ; then
4647 cat >conftest.$ac_ext <<CF_EOF
4648 #include <gpm.h>
4649 int main()
4650 {
4651 if (Gpm_Open(0,0)) Gpm_Close();
4652         ${cf_cv_main_return:-return}(0);
4653 }
4654 CF_EOF
4655 cf_save_LIBS="$LIBS"
4656         LIBS="-lgpm $LIBS"
4657         if { (eval echo "$as_me:4657: \"$ac_compile\"") >&5
4658   (eval $ac_compile) 2>&5
4659   ac_status=$?
4660   echo "$as_me:4660: \$? = $ac_status" >&5
4661   (exit $ac_status); } ; then
4662                 if { (eval echo "$as_me:4662: \"$ac_link\"") >&5
4663   (eval $ac_link) 2>&5
4664   ac_status=$?
4665   echo "$as_me:4665: \$? = $ac_status" >&5
4666   (exit $ac_status); } ; then
4667                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4668                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4669                 fi
4670         fi
4671 rm -f conftest*
4672 LIBS="$cf_save_LIBS"
4673 fi
4674
4675 fi
4676 echo "$as_me:4676: result: $cf_cv_gpm_soname" >&5
4677 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4678
4679                 fi
4680                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
4681 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4682 EOF
4683
4684                 SHLIB_LIST="-ldl $SHLIB_LIST"
4685         else
4686                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4687         fi
4688         cat >>confdefs.h <<\EOF
4689 #define HAVE_LIBGPM 1
4690 EOF
4691
4692 echo "$as_me:4692: checking for Gpm_Wgetch in -lgpm" >&5
4693 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4694 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4695   echo $ECHO_N "(cached) $ECHO_C" >&6
4696 else
4697   ac_check_lib_save_LIBS=$LIBS
4698 LIBS="-lgpm  $LIBS"
4699 cat >conftest.$ac_ext <<_ACEOF
4700 #line 4700 "configure"
4701 #include "confdefs.h"
4702
4703 /* Override any gcc2 internal prototype to avoid an error.  */
4704 #ifdef __cplusplus
4705 extern "C"
4706 #endif
4707 /* We use char because int might match the return type of a gcc2
4708    builtin and then its argument prototype would still apply.  */
4709 char Gpm_Wgetch ();
4710 int
4711 main ()
4712 {
4713 Gpm_Wgetch ();
4714   ;
4715   return 0;
4716 }
4717 _ACEOF
4718 rm -f conftest.$ac_objext conftest$ac_exeext
4719 if { (eval echo "$as_me:4719: \"$ac_link\"") >&5
4720   (eval $ac_link) 2>&5
4721   ac_status=$?
4722   echo "$as_me:4722: \$? = $ac_status" >&5
4723   (exit $ac_status); } &&
4724          { ac_try='test -s conftest$ac_exeext'
4725   { (eval echo "$as_me:4725: \"$ac_try\"") >&5
4726   (eval $ac_try) 2>&5
4727   ac_status=$?
4728   echo "$as_me:4728: \$? = $ac_status" >&5
4729   (exit $ac_status); }; }; then
4730   ac_cv_lib_gpm_Gpm_Wgetch=yes
4731 else
4732   echo "$as_me: failed program was:" >&5
4733 cat conftest.$ac_ext >&5
4734 ac_cv_lib_gpm_Gpm_Wgetch=no
4735 fi
4736 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4737 LIBS=$ac_check_lib_save_LIBS
4738 fi
4739 echo "$as_me:4739: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
4740 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
4741 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
4742
4743 echo "$as_me:4743: checking if GPM is weakly bound to curses library" >&5
4744 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
4745 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
4746   echo $ECHO_N "(cached) $ECHO_C" >&6
4747 else
4748
4749 cf_cv_check_gpm_wgetch=unknown
4750 if test "$cross_compiling" != yes ; then
4751
4752 cat >conftest.$ac_ext <<CF_EOF
4753 #include <gpm.h>
4754 int main()
4755 {
4756         Gpm_Wgetch();
4757         ${cf_cv_main_return:-return}(0);
4758 }
4759 CF_EOF
4760
4761         cf_save_LIBS="$LIBS"
4762         # This only works if we can look at the symbol table.  If a shared
4763         # library is stripped for install, we cannot use that.  So we're forced
4764         # to rely on the static library, noting that some packagers may not
4765         # include it.
4766         LIBS="-static -lgpm -dynamic $LIBS"
4767         if { (eval echo "$as_me:4767: \"$ac_compile\"") >&5
4768   (eval $ac_compile) 2>&5
4769   ac_status=$?
4770   echo "$as_me:4770: \$? = $ac_status" >&5
4771   (exit $ac_status); } ; then
4772                 if { (eval echo "$as_me:4772: \"$ac_link\"") >&5
4773   (eval $ac_link) 2>&5
4774   ac_status=$?
4775   echo "$as_me:4775: \$? = $ac_status" >&5
4776   (exit $ac_status); } ; then
4777                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
4778                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
4779                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
4780                 fi
4781         fi
4782         rm -f conftest*
4783         LIBS="$cf_save_LIBS"
4784 fi
4785
4786 fi
4787 echo "$as_me:4787: result: $cf_cv_check_gpm_wgetch" >&5
4788 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
4789
4790 if test "$cf_cv_check_gpm_wgetch" != yes ; then
4791         { echo "$as_me:4791: WARNING: GPM library is already linked with curses - read the FAQ" >&5
4792 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
4793 fi
4794
4795 fi
4796
4797 fi
4798
4799 # not everyone has "test -c"
4800 if test -c /dev/sysmouse 2>/dev/null ; then
4801 echo "$as_me:4801: checking if you want to use sysmouse" >&5
4802 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
4803
4804 # Check whether --with-sysmouse or --without-sysmouse was given.
4805 if test "${with_sysmouse+set}" = set; then
4806   withval="$with_sysmouse"
4807   cf_with_sysmouse=$withval
4808 else
4809   cf_with_sysmouse=maybe
4810 fi;
4811         if test "$cf_with_sysmouse" != no ; then
4812         cat >conftest.$ac_ext <<_ACEOF
4813 #line 4813 "configure"
4814 #include "confdefs.h"
4815
4816 #include <osreldate.h>
4817 #if (__FreeBSD_version >= 400017)
4818 #include <sys/consio.h>
4819 #include <sys/fbio.h>
4820 #else
4821 #include <machine/console.h>
4822 #endif
4823
4824 int
4825 main ()
4826 {
4827
4828         struct mouse_info the_mouse;
4829         ioctl(0, CONS_MOUSECTL, &the_mouse);
4830
4831   ;
4832   return 0;
4833 }
4834 _ACEOF
4835 rm -f conftest.$ac_objext
4836 if { (eval echo "$as_me:4836: \"$ac_compile\"") >&5
4837   (eval $ac_compile) 2>&5
4838   ac_status=$?
4839   echo "$as_me:4839: \$? = $ac_status" >&5
4840   (exit $ac_status); } &&
4841          { ac_try='test -s conftest.$ac_objext'
4842   { (eval echo "$as_me:4842: \"$ac_try\"") >&5
4843   (eval $ac_try) 2>&5
4844   ac_status=$?
4845   echo "$as_me:4845: \$? = $ac_status" >&5
4846   (exit $ac_status); }; }; then
4847   cf_with_sysmouse=yes
4848 else
4849   echo "$as_me: failed program was:" >&5
4850 cat conftest.$ac_ext >&5
4851 cf_with_sysmouse=no
4852 fi
4853 rm -f conftest.$ac_objext conftest.$ac_ext
4854         fi
4855 echo "$as_me:4855: result: $cf_with_sysmouse" >&5
4856 echo "${ECHO_T}$cf_with_sysmouse" >&6
4857 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
4858 #define USE_SYSMOUSE 1
4859 EOF
4860
4861 fi
4862
4863 if test X"$CC_G_OPT" = X"" ; then
4864         CC_G_OPT='-g'
4865         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
4866 fi
4867
4868 if test X"$CXX_G_OPT" = X"" ; then
4869         CXX_G_OPT='-g'
4870         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
4871 fi
4872
4873 echo "$as_me:4873: checking for default loader flags" >&5
4874 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
4875 case $DFT_LWR_MODEL in
4876 libtool) LD_MODEL=''   ;;
4877 normal)  LD_MODEL=''   ;;
4878 debug)   LD_MODEL=$CC_G_OPT ;;
4879 profile) LD_MODEL='-pg';;
4880 shared)  LD_MODEL=''   ;;
4881 esac
4882 echo "$as_me:4882: result: $LD_MODEL" >&5
4883 echo "${ECHO_T}$LD_MODEL" >&6
4884
4885 case $DFT_LWR_MODEL in
4886 shared)
4887
4888 echo "$as_me:4888: checking if rpath option should be used" >&5
4889 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
4890
4891 # Check whether --enable-rpath or --disable-rpath was given.
4892 if test "${enable_rpath+set}" = set; then
4893   enableval="$enable_rpath"
4894   cf_cv_ld_rpath=$enableval
4895 else
4896   cf_cv_ld_rpath=no
4897 fi;
4898 echo "$as_me:4898: result: $cf_cv_ld_rpath" >&5
4899 echo "${ECHO_T}$cf_cv_ld_rpath" >&6
4900
4901 echo "$as_me:4901: checking if shared libraries should be relinked during install" >&5
4902 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
4903
4904 # Check whether --enable-relink or --disable-relink was given.
4905 if test "${enable_relink+set}" = set; then
4906   enableval="$enable_relink"
4907   cf_cv_do_relink=$enableval
4908 else
4909   cf_cv_do_relink=yes
4910 fi;
4911 echo "$as_me:4911: result: $cf_cv_do_relink" >&5
4912 echo "${ECHO_T}$cf_cv_do_relink" >&6
4913         ;;
4914 esac
4915
4916         LOCAL_LDFLAGS=
4917         LOCAL_LDFLAGS2=
4918         LD_SHARED_OPTS=
4919         INSTALL_LIB="-m 644"
4920
4921         cf_cv_do_symlinks=no
4922
4923         echo "$as_me:4923: checking if release/abi version should be used for shared libs" >&5
4924 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
4925
4926 # Check whether --with-shlib-version or --without-shlib-version was given.
4927 if test "${with_shlib_version+set}" = set; then
4928   withval="$with_shlib_version"
4929   test -z "$withval" && withval=auto
4930         case $withval in #(vi
4931         yes) #(vi
4932                 cf_cv_shlib_version=auto
4933                 ;;
4934         rel|abi|auto|no) #(vi
4935                 cf_cv_shlib_version=$withval
4936                 ;;
4937         *)
4938                 { { echo "$as_me:4938: error: option value must be one of: rel, abi, auto or no" >&5
4939 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
4940    { (exit 1); exit 1; }; }
4941                 ;;
4942         esac
4943
4944 else
4945   cf_cv_shlib_version=auto
4946 fi;
4947         echo "$as_me:4947: result: $cf_cv_shlib_version" >&5
4948 echo "${ECHO_T}$cf_cv_shlib_version" >&6
4949
4950         cf_cv_rm_so_locs=no
4951
4952         # Some less-capable ports of gcc support only -fpic
4953         CC_SHARED_OPTS=
4954         if test "$GCC" = yes
4955         then
4956                 echo "$as_me:4956: checking which $CC option to use" >&5
4957 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
4958                 cf_save_CFLAGS="$CFLAGS"
4959                 for CC_SHARED_OPTS in -fPIC -fpic ''
4960                 do
4961                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
4962                         cat >conftest.$ac_ext <<_ACEOF
4963 #line 4963 "configure"
4964 #include "confdefs.h"
4965 #include <stdio.h>
4966 int
4967 main ()
4968 {
4969 int x = 1
4970   ;
4971   return 0;
4972 }
4973 _ACEOF
4974 rm -f conftest.$ac_objext
4975 if { (eval echo "$as_me:4975: \"$ac_compile\"") >&5
4976   (eval $ac_compile) 2>&5
4977   ac_status=$?
4978   echo "$as_me:4978: \$? = $ac_status" >&5
4979   (exit $ac_status); } &&
4980          { ac_try='test -s conftest.$ac_objext'
4981   { (eval echo "$as_me:4981: \"$ac_try\"") >&5
4982   (eval $ac_try) 2>&5
4983   ac_status=$?
4984   echo "$as_me:4984: \$? = $ac_status" >&5
4985   (exit $ac_status); }; }; then
4986   break
4987 else
4988   echo "$as_me: failed program was:" >&5
4989 cat conftest.$ac_ext >&5
4990 fi
4991 rm -f conftest.$ac_objext conftest.$ac_ext
4992                 done
4993                 echo "$as_me:4993: result: $CC_SHARED_OPTS" >&5
4994 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
4995                 CFLAGS="$cf_save_CFLAGS"
4996         fi
4997
4998         cf_cv_shlib_version_infix=no
4999
5000         case $cf_cv_system_name in
5001         beos*)
5002                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5003                 ;;
5004         cygwin*)
5005                 CC_SHARED_OPTS=
5006                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5007                 cf_cv_shlib_version=cygdll
5008                 cf_cv_shlib_version_infix=cygdll
5009                 cat >mk_shared_lib.sh <<-CF_EOF
5010                 #!/bin/sh
5011                 SHARED_LIB=\$1
5012                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5013                 shift
5014                 cat <<-EOF
5015                 Linking shared library
5016                 ** SHARED_LIB \$SHARED_LIB
5017                 ** IMPORT_LIB \$IMPORT_LIB
5018 EOF
5019                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5020 CF_EOF
5021                 chmod +x mk_shared_lib.sh
5022                 ;;
5023         darwin*)
5024                 EXTRA_CFLAGS="-no-cpp-precomp"
5025                 CC_SHARED_OPTS="-dynamic"
5026                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5027                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5028                 cf_cv_shlib_version_infix=yes
5029                 echo "$as_me:5029: checking if ld -search_paths_first works" >&5
5030 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5031 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5032   echo $ECHO_N "(cached) $ECHO_C" >&6
5033 else
5034
5035                         cf_save_LDFLAGS=$LDFLAGS
5036                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5037                         cat >conftest.$ac_ext <<_ACEOF
5038 #line 5038 "configure"
5039 #include "confdefs.h"
5040
5041 int
5042 main ()
5043 {
5044 int i;
5045   ;
5046   return 0;
5047 }
5048 _ACEOF
5049 rm -f conftest.$ac_objext conftest$ac_exeext
5050 if { (eval echo "$as_me:5050: \"$ac_link\"") >&5
5051   (eval $ac_link) 2>&5
5052   ac_status=$?
5053   echo "$as_me:5053: \$? = $ac_status" >&5
5054   (exit $ac_status); } &&
5055          { ac_try='test -s conftest$ac_exeext'
5056   { (eval echo "$as_me:5056: \"$ac_try\"") >&5
5057   (eval $ac_try) 2>&5
5058   ac_status=$?
5059   echo "$as_me:5059: \$? = $ac_status" >&5
5060   (exit $ac_status); }; }; then
5061   cf_cv_ldflags_search_paths_first=yes
5062 else
5063   echo "$as_me: failed program was:" >&5
5064 cat conftest.$ac_ext >&5
5065 cf_cv_ldflags_search_paths_first=no
5066 fi
5067 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5068                                 LDFLAGS=$cf_save_LDFLAGS
5069 fi
5070 echo "$as_me:5070: result: $cf_cv_ldflags_search_paths_first" >&5
5071 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5072                 if test $cf_cv_ldflags_search_paths_first = yes; then
5073                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5074                 fi
5075                 ;;
5076         hpux*)
5077                 # (tested with gcc 2.7.2 -- I don't have c89)
5078                 if test "$GCC" = yes; then
5079                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5080                 else
5081                         CC_SHARED_OPTS='+Z'
5082                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5083                 fi
5084                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5085                 # HP-UX shared libraries must be executable, and should be
5086                 # readonly to exploit a quirk in the memory manager.
5087                 INSTALL_LIB="-m 555"
5088                 ;;
5089         irix*)
5090                 if test "$cf_cv_ld_rpath" = yes ; then
5091                         if test "$GCC" = yes; then
5092                                 cf_ld_rpath_opt="-Wl,-rpath,"
5093                                 EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5094                         else
5095                                 cf_ld_rpath_opt="-rpath "
5096                                 EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5097                         fi
5098                 fi
5099                 # tested with IRIX 5.2 and 'cc'.
5100                 if test "$GCC" != yes; then
5101                         CC_SHARED_OPTS='-KPIC'
5102                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5103                 else
5104                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5105                 fi
5106                 cf_cv_rm_so_locs=yes
5107                 ;;
5108         linux*|gnu*|k*bsd*-gnu)
5109                 if test "$DFT_LWR_MODEL" = "shared" ; then
5110                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5111                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5112                 fi
5113                 if test "$cf_cv_ld_rpath" = yes ; then
5114                         cf_ld_rpath_opt="-Wl,-rpath,"
5115                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5116                 fi
5117
5118         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5119         if test "$cf_cv_shlib_version" = rel; then
5120                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5121         else
5122                 cf_cv_shared_soname='`basename $@`'
5123         fi
5124
5125                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5126                 ;;
5127         openbsd[2-9].*)
5128                 if test "$DFT_LWR_MODEL" = "shared" ; then
5129                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5130                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5131                 fi
5132                 if test "$cf_cv_ld_rpath" = yes ; then
5133                         cf_ld_rpath_opt="-Wl,-rpath,"
5134                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5135                 fi
5136                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5137
5138         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5139         if test "$cf_cv_shlib_version" = rel; then
5140                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5141         else
5142                 cf_cv_shared_soname='`basename $@`'
5143         fi
5144
5145                 MK_SHARED_LIB='${CC} ${CFLAGS} -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5146                 ;;
5147         openbsd*|freebsd[12].*)
5148                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5149                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5150                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5151                 ;;
5152         freebsd*)
5153                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5154                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5155                         LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
5156                         LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
5157                         cf_ld_rpath_opt="-rpath "
5158                         EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5159                 fi
5160
5161         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5162         if test "$cf_cv_shlib_version" = rel; then
5163                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5164         else
5165                 cf_cv_shared_soname='`basename $@`'
5166         fi
5167
5168                 MK_SHARED_LIB='${LD} -Bshareable -soname=`basename $@` -o $@'
5169                 ;;
5170         netbsd*)
5171                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5172                 test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
5173                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5174                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5175                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5176                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5177                         if test "$cf_cv_shlib_version" = auto; then
5178                         if test -f /usr/libexec/ld.elf_so; then
5179                                 cf_cv_shlib_version=abi
5180                         else
5181                                 cf_cv_shlib_version=rel
5182                         fi
5183                         fi
5184
5185         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5186         if test "$cf_cv_shlib_version" = rel; then
5187                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5188         else
5189                 cf_cv_shared_soname='`basename $@`'
5190         fi
5191
5192                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5193                 else
5194                         MK_SHARED_LIB='${LD} -Bshareable -o $@'
5195                 fi
5196                 ;;
5197         osf*|mls+*)
5198                 # tested with OSF/1 V3.2 and 'cc'
5199                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5200                 # link with shared libs).
5201                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5202                 case $host_os in
5203                 osf4*)
5204                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5205                         ;;
5206                 esac
5207                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5208                 if test "$DFT_LWR_MODEL" = "shared" ; then
5209                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5210                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5211                 fi
5212                 if test "$cf_cv_ld_rpath" = yes ; then
5213                         cf_ld_rpath_opt="-rpath"
5214                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5215                 fi
5216                 cf_cv_rm_so_locs=yes
5217                 ;;
5218         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
5219                 # tested with osr5.0.5
5220                 if test "$GCC" != yes; then
5221                         CC_SHARED_OPTS='-belf -KPIC'
5222                 fi
5223                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5224                 if test "$cf_cv_ld_rpath" = yes ; then
5225                         # only way is to set LD_RUN_PATH but no switch for it
5226                         RUN_PATH=$libdir
5227                 fi
5228                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5229                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5230                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5231                 ;;
5232         sunos4*)
5233                 # tested with SunOS 4.1.1 and gcc 2.7.0
5234                 if test "$GCC" != yes; then
5235                         CC_SHARED_OPTS='-KPIC'
5236                 fi
5237                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5238                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5239                 ;;
5240         solaris2*)
5241                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5242                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5243                 if test "$DFT_LWR_MODEL" = "shared" ; then
5244                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5245                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5246                 fi
5247                 if test "$cf_cv_ld_rpath" = yes ; then
5248                         cf_ld_rpath_opt="-R"
5249                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5250                 fi
5251
5252         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5253         if test "$cf_cv_shlib_version" = rel; then
5254                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5255         else
5256                 cf_cv_shared_soname='`basename $@`'
5257         fi
5258
5259                 if test "$GCC" != yes; then
5260                         CC_SHARED_OPTS='-xcode=pic32'
5261                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5262                 else
5263                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5264                 fi
5265                 ;;
5266         sysv5uw7*|unix_sv*)
5267                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5268                 if test "$GCC" != yes; then
5269                         CC_SHARED_OPTS='-KPIC'
5270                 fi
5271                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5272                 ;;
5273         *)
5274                 CC_SHARED_OPTS='unknown'
5275                 MK_SHARED_LIB='echo unknown'
5276                 ;;
5277         esac
5278
5279         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5280         case "$cf_cv_shlib_version" in #(vi
5281         rel|abi)
5282                 case "$MK_SHARED_LIB" in #(vi
5283                 *'-o $@')
5284                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5285                         ;;
5286                 *)
5287                         { echo "$as_me:5287: WARNING: ignored --with-shlib-version" >&5
5288 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5289                         ;;
5290                 esac
5291                 ;;
5292         esac
5293
5294         if test -n "$cf_ld_rpath_opt" ; then
5295                 echo "$as_me:5295: checking if we need a space after rpath option" >&5
5296 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5297                 cf_save_LIBS="$LIBS"
5298                 LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
5299                 cat >conftest.$ac_ext <<_ACEOF
5300 #line 5300 "configure"
5301 #include "confdefs.h"
5302
5303 int
5304 main ()
5305 {
5306
5307   ;
5308   return 0;
5309 }
5310 _ACEOF
5311 rm -f conftest.$ac_objext conftest$ac_exeext
5312 if { (eval echo "$as_me:5312: \"$ac_link\"") >&5
5313   (eval $ac_link) 2>&5
5314   ac_status=$?
5315   echo "$as_me:5315: \$? = $ac_status" >&5
5316   (exit $ac_status); } &&
5317          { ac_try='test -s conftest$ac_exeext'
5318   { (eval echo "$as_me:5318: \"$ac_try\"") >&5
5319   (eval $ac_try) 2>&5
5320   ac_status=$?
5321   echo "$as_me:5321: \$? = $ac_status" >&5
5322   (exit $ac_status); }; }; then
5323   cf_rpath_space=no
5324 else
5325   echo "$as_me: failed program was:" >&5
5326 cat conftest.$ac_ext >&5
5327 cf_rpath_space=yes
5328 fi
5329 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5330                 LIBS="$cf_save_LIBS"
5331                 echo "$as_me:5331: result: $cf_rpath_space" >&5
5332 echo "${ECHO_T}$cf_rpath_space" >&6
5333                 test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
5334                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5335         fi
5336
5337 if test "$CC_SHARED_OPTS" = "unknown"; then
5338         for model in $cf_list_models; do
5339                 if test "$model" = "shared"; then
5340                         { { echo "$as_me:5340: error: Shared libraries are not supported in this version" >&5
5341 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5342    { (exit 1); exit 1; }; }
5343                 fi
5344         done
5345 fi
5346
5347 ###############################################################################
5348
5349 ###     use option --disable-overwrite to leave out the link to -lcurses
5350 echo "$as_me:5350: checking if you wish to install ncurses overwriting curses" >&5
5351 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5352
5353 # Check whether --enable-overwrite or --disable-overwrite was given.
5354 if test "${enable_overwrite+set}" = set; then
5355   enableval="$enable_overwrite"
5356   with_overwrite=$enableval
5357 else
5358   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5359 fi;
5360 echo "$as_me:5360: result: $with_overwrite" >&5
5361 echo "${ECHO_T}$with_overwrite" >&6
5362
5363 echo "$as_me:5363: checking if external terminfo-database is used" >&5
5364 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5365
5366 # Check whether --enable-database or --disable-database was given.
5367 if test "${enable_database+set}" = set; then
5368   enableval="$enable_database"
5369   use_database=$enableval
5370 else
5371   use_database=yes
5372 fi;
5373 echo "$as_me:5373: result: $use_database" >&5
5374 echo "${ECHO_T}$use_database" >&6
5375
5376 case $host_os in #(vi
5377 os2*) #(vi
5378         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5379         ;;
5380 *) #(vi
5381         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5382         ;;
5383 esac
5384
5385         case $cf_cv_system_name in
5386         os2*)   PATHSEP=';'  ;;
5387         *)      PATHSEP=':'  ;;
5388         esac
5389
5390 if test "$use_database" != no ; then
5391         cat >>confdefs.h <<\EOF
5392 #define USE_DATABASE 1
5393 EOF
5394
5395         echo "$as_me:5395: checking which terminfo source-file will be installed" >&5
5396 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5397
5398 # Check whether --enable-database or --disable-database was given.
5399 if test "${enable_database+set}" = set; then
5400   enableval="$enable_database"
5401   TERMINFO_SRC=$withval
5402 fi;
5403         echo "$as_me:5403: result: $TERMINFO_SRC" >&5
5404 echo "${ECHO_T}$TERMINFO_SRC" >&6
5405
5406         echo "$as_me:5406: checking whether to use hashed database instead of directory/tree" >&5
5407 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5408
5409 # Check whether --with-hashed-db or --without-hashed-db was given.
5410 if test "${with_hashed_db+set}" = set; then
5411   withval="$with_hashed_db"
5412
5413 else
5414   with_hashed_db=no
5415 fi;
5416         echo "$as_me:5416: result: $with_hashed_db" >&5
5417 echo "${ECHO_T}$with_hashed_db" >&6
5418 fi
5419
5420 echo "$as_me:5420: checking for list of fallback descriptions" >&5
5421 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5422
5423 # Check whether --with-fallbacks or --without-fallbacks was given.
5424 if test "${with_fallbacks+set}" = set; then
5425   withval="$with_fallbacks"
5426   with_fallback=$withval
5427 else
5428   with_fallback=
5429 fi;
5430 echo "$as_me:5430: result: $with_fallback" >&5
5431 echo "${ECHO_T}$with_fallback" >&6
5432 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5433
5434 echo "$as_me:5434: checking if you want modern xterm or antique" >&5
5435 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5436
5437 # Check whether --with-xterm-new or --without-xterm-new was given.
5438 if test "${with_xterm_new+set}" = set; then
5439   withval="$with_xterm_new"
5440   with_xterm_new=$withval
5441 else
5442   with_xterm_new=yes
5443 fi;
5444 case $with_xterm_new in
5445 no)     with_xterm_new=xterm-old;;
5446 *)      with_xterm_new=xterm-new;;
5447 esac
5448 echo "$as_me:5448: result: $with_xterm_new" >&5
5449 echo "${ECHO_T}$with_xterm_new" >&6
5450 WHICH_XTERM=$with_xterm_new
5451
5452 MAKE_TERMINFO=
5453 if test "$use_database" = no ; then
5454         TERMINFO="${datadir}/terminfo"
5455         MAKE_TERMINFO="#"
5456 else
5457
5458 echo "$as_me:5458: checking for list of terminfo directories" >&5
5459 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5460
5461 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5462 if test "${with_terminfo_dirs+set}" = set; then
5463   withval="$with_terminfo_dirs"
5464
5465 else
5466   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5467 fi;
5468 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5469 cf_dst_path=
5470 for cf_src_path in $withval
5471 do
5472
5473 if test "x$prefix" != xNONE; then
5474   cf_path_syntax="$prefix"
5475 else
5476   cf_path_syntax="$ac_default_prefix"
5477 fi
5478
5479 case ".$cf_src_path" in #(vi
5480 .\$\(*\)*|.\'*\'*) #(vi
5481   ;;
5482 ..|./*|.\\*) #(vi
5483   ;;
5484 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5485   ;;
5486 .\${*prefix}*) #(vi
5487   eval cf_src_path="$cf_src_path"
5488   case ".$cf_src_path" in #(vi
5489   .NONE/*)
5490     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5491     ;;
5492   esac
5493   ;; #(vi
5494 .no|.NONE/*)
5495   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5496   ;;
5497 *)
5498   { { echo "$as_me:5498: error: expected a pathname, not \"$cf_src_path\"" >&5
5499 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5500    { (exit 1); exit 1; }; }
5501   ;;
5502 esac
5503
5504   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5505   cf_dst_path="${cf_dst_path}${cf_src_path}"
5506 done
5507 IFS="$ac_save_ifs"
5508
5509 eval 'TERMINFO_DIRS="$cf_dst_path"'
5510
5511 echo "$as_me:5511: result: $TERMINFO_DIRS" >&5
5512 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5513 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5514 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5515 EOF
5516
5517 echo "$as_me:5517: checking for default terminfo directory" >&5
5518 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5519
5520 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5521 if test "${with_default_terminfo_dir+set}" = set; then
5522   withval="$with_default_terminfo_dir"
5523
5524 else
5525   withval="${TERMINFO-${datadir}/terminfo}"
5526 fi; if test -n "${datadir}/terminfo" ; then
5527
5528 if test "x$prefix" != xNONE; then
5529   cf_path_syntax="$prefix"
5530 else
5531   cf_path_syntax="$ac_default_prefix"
5532 fi
5533
5534 case ".$withval" in #(vi
5535 .\$\(*\)*|.\'*\'*) #(vi
5536   ;;
5537 ..|./*|.\\*) #(vi
5538   ;;
5539 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5540   ;;
5541 .\${*prefix}*) #(vi
5542   eval withval="$withval"
5543   case ".$withval" in #(vi
5544   .NONE/*)
5545     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5546     ;;
5547   esac
5548   ;; #(vi
5549 .no|.NONE/*)
5550   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5551   ;;
5552 *)
5553   { { echo "$as_me:5553: error: expected a pathname, not \"$withval\"" >&5
5554 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5555    { (exit 1); exit 1; }; }
5556   ;;
5557 esac
5558
5559 fi
5560 TERMINFO="$withval"
5561
5562 echo "$as_me:5562: result: $TERMINFO" >&5
5563 echo "${ECHO_T}$TERMINFO" >&6
5564 cat >>confdefs.h <<EOF
5565 #define TERMINFO "$TERMINFO"
5566 EOF
5567
5568 fi
5569
5570 ###     use option --disable-big-core to make tic run on small machines
5571 ###     We need 4Mb, check if we can allocate 50% more than that.
5572 echo "$as_me:5572: checking if big-core option selected" >&5
5573 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5574
5575 # Check whether --enable-big-core or --disable-big-core was given.
5576 if test "${enable_big_core+set}" = set; then
5577   enableval="$enable_big_core"
5578   with_big_core=$enableval
5579 else
5580   if test "$cross_compiling" = yes; then
5581   with_big_core=no
5582 else
5583   cat >conftest.$ac_ext <<_ACEOF
5584 #line 5584 "configure"
5585 #include "confdefs.h"
5586
5587 #include <stdlib.h>
5588 #include <string.h>
5589 int main() {
5590         unsigned long n = 6000000L;
5591         char *s = malloc(n);
5592         if (s != 0)
5593                 s[0] = s[n-1] = 0;
5594         ${cf_cv_main_return:-return}(s == 0);
5595 }
5596 _ACEOF
5597 rm -f conftest$ac_exeext
5598 if { (eval echo "$as_me:5598: \"$ac_link\"") >&5
5599   (eval $ac_link) 2>&5
5600   ac_status=$?
5601   echo "$as_me:5601: \$? = $ac_status" >&5
5602   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5603   { (eval echo "$as_me:5603: \"$ac_try\"") >&5
5604   (eval $ac_try) 2>&5
5605   ac_status=$?
5606   echo "$as_me:5606: \$? = $ac_status" >&5
5607   (exit $ac_status); }; }; then
5608   with_big_core=yes
5609 else
5610   echo "$as_me: program exited with status $ac_status" >&5
5611 echo "$as_me: failed program was:" >&5
5612 cat conftest.$ac_ext >&5
5613 with_big_core=no
5614 fi
5615 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5616 fi
5617 fi;
5618 echo "$as_me:5618: result: $with_big_core" >&5
5619 echo "${ECHO_T}$with_big_core" >&6
5620 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
5621 #define HAVE_BIG_CORE 1
5622 EOF
5623
5624 ### ISO C only guarantees 512-char strings, we have tables which load faster
5625 ### when constructed using "big" strings.  More than the C compiler, the awk
5626 ### program is a limit on most vendor UNIX systems.  Check that we can build.
5627 echo "$as_me:5627: checking if big-strings option selected" >&5
5628 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
5629
5630 # Check whether --enable-big-strings or --disable-big-strings was given.
5631 if test "${enable_big_strings+set}" = set; then
5632   enableval="$enable_big_strings"
5633   with_big_strings=$enableval
5634 else
5635
5636     case x$AWK in #(vi
5637     x)
5638         eval with_big_strings=no
5639         ;;
5640     *) #(vi
5641         if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
5642             | $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
5643             eval with_big_strings=yes
5644         else
5645             eval with_big_strings=no
5646         fi
5647         ;;
5648     esac
5649
5650 fi;
5651 echo "$as_me:5651: result: $with_big_strings" >&5
5652 echo "${ECHO_T}$with_big_strings" >&6
5653
5654 USE_BIG_STRINGS=0
5655 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
5656
5657 ###     use option --enable-termcap to compile in the termcap fallback support
5658 echo "$as_me:5658: checking if you want termcap-fallback support" >&5
5659 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
5660
5661 # Check whether --enable-termcap or --disable-termcap was given.
5662 if test "${enable_termcap+set}" = set; then
5663   enableval="$enable_termcap"
5664   with_termcap=$enableval
5665 else
5666   with_termcap=no
5667 fi;
5668 echo "$as_me:5668: result: $with_termcap" >&5
5669 echo "${ECHO_T}$with_termcap" >&6
5670
5671 if test "$with_termcap" != "yes" ; then
5672         if test "$use_database" = no ; then
5673                 if test -z "$with_fallback" ; then
5674                         { { echo "$as_me:5674: error: You have disabled the database w/o specifying fallbacks" >&5
5675 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
5676    { (exit 1); exit 1; }; }
5677                 fi
5678         fi
5679         cat >>confdefs.h <<\EOF
5680 #define PURE_TERMINFO 1
5681 EOF
5682
5683 else
5684
5685 if test "$with_ticlib" != no ; then
5686         { { echo "$as_me:5686: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
5687 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
5688    { (exit 1); exit 1; }; }
5689 fi
5690
5691 cat >>confdefs.h <<\EOF
5692 #define USE_TERMCAP 1
5693 EOF
5694
5695 echo "$as_me:5695: checking for list of termcap files" >&5
5696 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
5697
5698 # Check whether --with-termpath or --without-termpath was given.
5699 if test "${with_termpath+set}" = set; then
5700   withval="$with_termpath"
5701
5702 else
5703   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
5704 fi;
5705 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5706 cf_dst_path=
5707 for cf_src_path in $withval
5708 do
5709
5710 if test "x$prefix" != xNONE; then
5711   cf_path_syntax="$prefix"
5712 else
5713   cf_path_syntax="$ac_default_prefix"
5714 fi
5715
5716 case ".$cf_src_path" in #(vi
5717 .\$\(*\)*|.\'*\'*) #(vi
5718   ;;
5719 ..|./*|.\\*) #(vi
5720   ;;
5721 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5722   ;;
5723 .\${*prefix}*) #(vi
5724   eval cf_src_path="$cf_src_path"
5725   case ".$cf_src_path" in #(vi
5726   .NONE/*)
5727     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5728     ;;
5729   esac
5730   ;; #(vi
5731 .no|.NONE/*)
5732   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5733   ;;
5734 *)
5735   { { echo "$as_me:5735: error: expected a pathname, not \"$cf_src_path\"" >&5
5736 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5737    { (exit 1); exit 1; }; }
5738   ;;
5739 esac
5740
5741   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5742   cf_dst_path="${cf_dst_path}${cf_src_path}"
5743 done
5744 IFS="$ac_save_ifs"
5745
5746 eval 'TERMPATH="$cf_dst_path"'
5747
5748 echo "$as_me:5748: result: $TERMPATH" >&5
5749 echo "${ECHO_T}$TERMPATH" >&6
5750 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
5751 #define TERMPATH "$TERMPATH"
5752 EOF
5753
5754 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
5755 echo "$as_me:5755: checking if fast termcap-loader is needed" >&5
5756 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
5757
5758 # Check whether --enable-getcap or --disable-getcap was given.
5759 if test "${enable_getcap+set}" = set; then
5760   enableval="$enable_getcap"
5761   with_getcap=$enableval
5762 else
5763   with_getcap=no
5764 fi;
5765 echo "$as_me:5765: result: $with_getcap" >&5
5766 echo "${ECHO_T}$with_getcap" >&6
5767 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
5768 #define USE_GETCAP 1
5769 EOF
5770
5771 echo "$as_me:5771: checking if translated termcaps will be cached in ~/.terminfo" >&5
5772 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
5773
5774 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
5775 if test "${enable_getcap_cache+set}" = set; then
5776   enableval="$enable_getcap_cache"
5777   with_getcap_cache=$enableval
5778 else
5779   with_getcap_cache=no
5780 fi;
5781 echo "$as_me:5781: result: $with_getcap_cache" >&5
5782 echo "${ECHO_T}$with_getcap_cache" >&6
5783 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
5784 #define USE_GETCAP_CACHE 1
5785 EOF
5786
5787 fi
5788
5789 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
5790 echo "$as_me:5790: checking if ~/.terminfo is wanted" >&5
5791 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
5792
5793 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
5794 if test "${enable_home_terminfo+set}" = set; then
5795   enableval="$enable_home_terminfo"
5796   with_home_terminfo=$enableval
5797 else
5798   with_home_terminfo=yes
5799 fi;
5800 echo "$as_me:5800: result: $with_home_terminfo" >&5
5801 echo "${ECHO_T}$with_home_terminfo" >&6
5802 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
5803 #define USE_HOME_TERMINFO 1
5804 EOF
5805
5806 echo "$as_me:5806: checking if you want to use restricted environment when running as root" >&5
5807 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
5808
5809 # Check whether --enable-root-environ or --disable-root-environ was given.
5810 if test "${enable_root_environ+set}" = set; then
5811   enableval="$enable_root_environ"
5812   with_root_environ=$enableval
5813 else
5814   with_root_environ=yes
5815 fi;
5816 echo "$as_me:5816: result: $with_root_environ" >&5
5817 echo "${ECHO_T}$with_root_environ" >&6
5818 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
5819 #define USE_ROOT_ENVIRON 1
5820 EOF
5821
5822 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
5823 ###   to reduce storage requirements for the terminfo database.
5824
5825 for ac_func in \
5826         remove \
5827         unlink
5828 do
5829 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5830 echo "$as_me:5830: checking for $ac_func" >&5
5831 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5832 if eval "test \"\${$as_ac_var+set}\" = set"; then
5833   echo $ECHO_N "(cached) $ECHO_C" >&6
5834 else
5835   cat >conftest.$ac_ext <<_ACEOF
5836 #line 5836 "configure"
5837 #include "confdefs.h"
5838 /* System header to define __stub macros and hopefully few prototypes,
5839     which can conflict with char $ac_func (); below.  */
5840 #include <assert.h>
5841 /* Override any gcc2 internal prototype to avoid an error.  */
5842 #ifdef __cplusplus
5843 extern "C"
5844 #endif
5845 /* We use char because int might match the return type of a gcc2
5846    builtin and then its argument prototype would still apply.  */
5847 char $ac_func ();
5848 char (*f) ();
5849
5850 int
5851 main ()
5852 {
5853 /* The GNU C library defines this for functions which it implements
5854     to always fail with ENOSYS.  Some functions are actually named
5855     something starting with __ and the normal name is an alias.  */
5856 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5857 choke me
5858 #else
5859 f = $ac_func;
5860 #endif
5861
5862   ;
5863   return 0;
5864 }
5865 _ACEOF
5866 rm -f conftest.$ac_objext conftest$ac_exeext
5867 if { (eval echo "$as_me:5867: \"$ac_link\"") >&5
5868   (eval $ac_link) 2>&5
5869   ac_status=$?
5870   echo "$as_me:5870: \$? = $ac_status" >&5
5871   (exit $ac_status); } &&
5872          { ac_try='test -s conftest$ac_exeext'
5873   { (eval echo "$as_me:5873: \"$ac_try\"") >&5
5874   (eval $ac_try) 2>&5
5875   ac_status=$?
5876   echo "$as_me:5876: \$? = $ac_status" >&5
5877   (exit $ac_status); }; }; then
5878   eval "$as_ac_var=yes"
5879 else
5880   echo "$as_me: failed program was:" >&5
5881 cat conftest.$ac_ext >&5
5882 eval "$as_ac_var=no"
5883 fi
5884 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5885 fi
5886 echo "$as_me:5886: result: `eval echo '${'$as_ac_var'}'`" >&5
5887 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5888 if test `eval echo '${'$as_ac_var'}'` = yes; then
5889   cat >>confdefs.h <<EOF
5890 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5891 EOF
5892
5893 fi
5894 done
5895
5896 if test "$cross_compiling" = yes ; then
5897
5898 for ac_func in \
5899                 link \
5900                 symlink
5901 do
5902 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5903 echo "$as_me:5903: checking for $ac_func" >&5
5904 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5905 if eval "test \"\${$as_ac_var+set}\" = set"; then
5906   echo $ECHO_N "(cached) $ECHO_C" >&6
5907 else
5908   cat >conftest.$ac_ext <<_ACEOF
5909 #line 5909 "configure"
5910 #include "confdefs.h"
5911 /* System header to define __stub macros and hopefully few prototypes,
5912     which can conflict with char $ac_func (); below.  */
5913 #include <assert.h>
5914 /* Override any gcc2 internal prototype to avoid an error.  */
5915 #ifdef __cplusplus
5916 extern "C"
5917 #endif
5918 /* We use char because int might match the return type of a gcc2
5919    builtin and then its argument prototype would still apply.  */
5920 char $ac_func ();
5921 char (*f) ();
5922
5923 int
5924 main ()
5925 {
5926 /* The GNU C library defines this for functions which it implements
5927     to always fail with ENOSYS.  Some functions are actually named
5928     something starting with __ and the normal name is an alias.  */
5929 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5930 choke me
5931 #else
5932 f = $ac_func;
5933 #endif
5934
5935   ;
5936   return 0;
5937 }
5938 _ACEOF
5939 rm -f conftest.$ac_objext conftest$ac_exeext
5940 if { (eval echo "$as_me:5940: \"$ac_link\"") >&5
5941   (eval $ac_link) 2>&5
5942   ac_status=$?
5943   echo "$as_me:5943: \$? = $ac_status" >&5
5944   (exit $ac_status); } &&
5945          { ac_try='test -s conftest$ac_exeext'
5946   { (eval echo "$as_me:5946: \"$ac_try\"") >&5
5947   (eval $ac_try) 2>&5
5948   ac_status=$?
5949   echo "$as_me:5949: \$? = $ac_status" >&5
5950   (exit $ac_status); }; }; then
5951   eval "$as_ac_var=yes"
5952 else
5953   echo "$as_me: failed program was:" >&5
5954 cat conftest.$ac_ext >&5
5955 eval "$as_ac_var=no"
5956 fi
5957 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5958 fi
5959 echo "$as_me:5959: result: `eval echo '${'$as_ac_var'}'`" >&5
5960 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5961 if test `eval echo '${'$as_ac_var'}'` = yes; then
5962   cat >>confdefs.h <<EOF
5963 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5964 EOF
5965
5966 fi
5967 done
5968
5969 else
5970         echo "$as_me:5970: checking if link/symlink functions work" >&5
5971 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
5972 if test "${cf_cv_link_funcs+set}" = set; then
5973   echo $ECHO_N "(cached) $ECHO_C" >&6
5974 else
5975
5976                 cf_cv_link_funcs=
5977                 for cf_func in link symlink ; do
5978                         if test "$cross_compiling" = yes; then
5979
5980                         eval 'ac_cv_func_'$cf_func'=error'
5981 else
5982   cat >conftest.$ac_ext <<_ACEOF
5983 #line 5983 "configure"
5984 #include "confdefs.h"
5985
5986 #include <sys/types.h>
5987 #include <sys/stat.h>
5988 #ifdef HAVE_UNISTD_H
5989 #include <unistd.h>
5990 #endif
5991 int main()
5992 {
5993         int fail = 0;
5994         char *src = "config.log";
5995         char *dst = "conftest.chk";
5996         struct stat src_sb;
5997         struct stat dst_sb;
5998
5999         stat(src, &src_sb);
6000         fail = ($cf_func("config.log", "conftest.chk") < 0)
6001             || (stat(dst, &dst_sb) < 0)
6002             || (dst_sb.st_mtime != src_sb.st_mtime);
6003 #ifdef HAVE_UNLINK
6004         unlink(dst);
6005 #else
6006         remove(dst);
6007 #endif
6008         ${cf_cv_main_return:-return} (fail);
6009 }
6010
6011 _ACEOF
6012 rm -f conftest$ac_exeext
6013 if { (eval echo "$as_me:6013: \"$ac_link\"") >&5
6014   (eval $ac_link) 2>&5
6015   ac_status=$?
6016   echo "$as_me:6016: \$? = $ac_status" >&5
6017   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6018   { (eval echo "$as_me:6018: \"$ac_try\"") >&5
6019   (eval $ac_try) 2>&5
6020   ac_status=$?
6021   echo "$as_me:6021: \$? = $ac_status" >&5
6022   (exit $ac_status); }; }; then
6023
6024                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6025                         eval 'ac_cv_func_'$cf_func'=yes'
6026 else
6027   echo "$as_me: program exited with status $ac_status" >&5
6028 echo "$as_me: failed program was:" >&5
6029 cat conftest.$ac_ext >&5
6030
6031                         eval 'ac_cv_func_'$cf_func'=no'
6032 fi
6033 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6034 fi
6035                 done
6036                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6037
6038 fi
6039 echo "$as_me:6039: result: $cf_cv_link_funcs" >&5
6040 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6041         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6042 #define HAVE_LINK 1
6043 EOF
6044
6045         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6046 #define HAVE_SYMLINK 1
6047 EOF
6048
6049 fi
6050
6051 with_links=no
6052 with_symlinks=no
6053
6054 # soft links (symbolic links) are useful for some systems where hard links do
6055 # not work, or to make it simpler to copy terminfo trees around.
6056 if test "$ac_cv_func_symlink" = yes ; then
6057     echo "$as_me:6057: checking if tic should use symbolic links" >&5
6058 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6059
6060 # Check whether --enable-symlinks or --disable-symlinks was given.
6061 if test "${enable_symlinks+set}" = set; then
6062   enableval="$enable_symlinks"
6063   with_symlinks=$enableval
6064 else
6065   with_symlinks=no
6066 fi;
6067     echo "$as_me:6067: result: $with_symlinks" >&5
6068 echo "${ECHO_T}$with_symlinks" >&6
6069 fi
6070
6071 # If we have hard links and did not choose to use soft links instead, there is
6072 # no reason to make this choice optional - use the hard links.
6073 if test "$with_symlinks" = no ; then
6074     echo "$as_me:6074: checking if tic should use hard links" >&5
6075 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6076     if test "$ac_cv_func_link" = yes ; then
6077         with_links=yes
6078     else
6079         with_links=no
6080     fi
6081     echo "$as_me:6081: result: $with_links" >&5
6082 echo "${ECHO_T}$with_links" >&6
6083 fi
6084
6085 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6086 #define USE_LINKS 1
6087 EOF
6088
6089 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6090 #define USE_SYMLINKS 1
6091 EOF
6092
6093 ###   use option --enable-broken-linker to force on use of broken-linker support
6094 echo "$as_me:6094: checking if you want broken-linker support code" >&5
6095 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6096
6097 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6098 if test "${enable_broken_linker+set}" = set; then
6099   enableval="$enable_broken_linker"
6100   with_broken_linker=$enableval
6101 else
6102   with_broken_linker=${BROKEN_LINKER-no}
6103 fi;
6104 echo "$as_me:6104: result: $with_broken_linker" >&5
6105 echo "${ECHO_T}$with_broken_linker" >&6
6106
6107 BROKEN_LINKER=0
6108 if test "$with_broken_linker" = yes ; then
6109         cat >>confdefs.h <<\EOF
6110 #define BROKEN_LINKER 1
6111 EOF
6112
6113         BROKEN_LINKER=1
6114 elif test "$DFT_LWR_MODEL" = shared ; then
6115         case $cf_cv_system_name in #(vi
6116         cygwin*)
6117                 cat >>confdefs.h <<\EOF
6118 #define BROKEN_LINKER 1
6119 EOF
6120
6121                 BROKEN_LINKER=1
6122                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6123
6124 echo "${as_me-configure}:6124: testing cygwin linker is broken anyway ..." 1>&5
6125
6126                 ;;
6127         esac
6128 fi
6129
6130 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6131 echo "$as_me:6131: checking if tputs should process BSD-style prefix padding" >&5
6132 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6133
6134 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6135 if test "${enable_bsdpad+set}" = set; then
6136   enableval="$enable_bsdpad"
6137   with_bsdpad=$enableval
6138 else
6139   with_bsdpad=no
6140 fi;
6141 echo "$as_me:6141: result: $with_bsdpad" >&5
6142 echo "${ECHO_T}$with_bsdpad" >&6
6143 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6144 #define BSD_TPUTS 1
6145 EOF
6146
6147 ###   use option --enable-widec to turn on use of wide-character support
6148 NCURSES_CH_T=chtype
6149 NCURSES_LIBUTF8=0
6150
6151 NEED_WCHAR_H=0
6152 NCURSES_MBSTATE_T=0
6153 NCURSES_WCHAR_T=0
6154 NCURSES_WINT_T=0
6155
6156 # Check to define _XOPEN_SOURCE "automatically"
6157
6158 echo "$as_me:6158: checking if $CC -U and -D options work together" >&5
6159 echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
6160 if test "${cf_cv_cc_u_d_options+set}" = set; then
6161   echo $ECHO_N "(cached) $ECHO_C" >&6
6162 else
6163
6164         cf_save_CPPFLAGS="$CPPFLAGS"
6165         CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
6166         cat >conftest.$ac_ext <<_ACEOF
6167 #line 6167 "configure"
6168 #include "confdefs.h"
6169
6170 int
6171 main ()
6172 {
6173
6174 #ifndef U_D_OPTIONS
6175 make an undefined-error
6176 #endif
6177 #ifdef  D_U_OPTIONS
6178 make a defined-error
6179 #endif
6180
6181   ;
6182   return 0;
6183 }
6184 _ACEOF
6185 rm -f conftest.$ac_objext
6186 if { (eval echo "$as_me:6186: \"$ac_compile\"") >&5
6187   (eval $ac_compile) 2>&5
6188   ac_status=$?
6189   echo "$as_me:6189: \$? = $ac_status" >&5
6190   (exit $ac_status); } &&
6191          { ac_try='test -s conftest.$ac_objext'
6192   { (eval echo "$as_me:6192: \"$ac_try\"") >&5
6193   (eval $ac_try) 2>&5
6194   ac_status=$?
6195   echo "$as_me:6195: \$? = $ac_status" >&5
6196   (exit $ac_status); }; }; then
6197
6198         cf_cv_cc_u_d_options=yes
6199 else
6200   echo "$as_me: failed program was:" >&5
6201 cat conftest.$ac_ext >&5
6202
6203         cf_cv_cc_u_d_options=no
6204 fi
6205 rm -f conftest.$ac_objext conftest.$ac_ext
6206         CPPFLAGS="$cf_save_CPPFLAGS"
6207
6208 fi
6209 echo "$as_me:6209: result: $cf_cv_cc_u_d_options" >&5
6210 echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
6211
6212 cf_XOPEN_SOURCE=500
6213 cf_POSIX_C_SOURCE=199506L
6214
6215 case $host_os in #(vi
6216 aix[45]*) #(vi
6217         CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
6218         ;;
6219 freebsd*|dragonfly*) #(vi
6220         # 5.x headers associate
6221         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6222         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6223         cf_POSIX_C_SOURCE=200112L
6224         cf_XOPEN_SOURCE=600
6225         CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6226         ;;
6227 hpux*) #(vi
6228         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
6229         ;;
6230 irix[56].*) #(vi
6231         CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
6232         ;;
6233 linux*|gnu*|k*bsd*-gnu) #(vi
6234
6235 echo "$as_me:6235: checking if we must define _GNU_SOURCE" >&5
6236 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6237 if test "${cf_cv_gnu_source+set}" = set; then
6238   echo $ECHO_N "(cached) $ECHO_C" >&6
6239 else
6240
6241 cat >conftest.$ac_ext <<_ACEOF
6242 #line 6242 "configure"
6243 #include "confdefs.h"
6244 #include <sys/types.h>
6245 int
6246 main ()
6247 {
6248
6249 #ifndef _XOPEN_SOURCE
6250 make an error
6251 #endif
6252   ;
6253   return 0;
6254 }
6255 _ACEOF
6256 rm -f conftest.$ac_objext
6257 if { (eval echo "$as_me:6257: \"$ac_compile\"") >&5
6258   (eval $ac_compile) 2>&5
6259   ac_status=$?
6260   echo "$as_me:6260: \$? = $ac_status" >&5
6261   (exit $ac_status); } &&
6262          { ac_try='test -s conftest.$ac_objext'
6263   { (eval echo "$as_me:6263: \"$ac_try\"") >&5
6264   (eval $ac_try) 2>&5
6265   ac_status=$?
6266   echo "$as_me:6266: \$? = $ac_status" >&5
6267   (exit $ac_status); }; }; then
6268   cf_cv_gnu_source=no
6269 else
6270   echo "$as_me: failed program was:" >&5
6271 cat conftest.$ac_ext >&5
6272 cf_save="$CPPFLAGS"
6273          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6274          cat >conftest.$ac_ext <<_ACEOF
6275 #line 6275 "configure"
6276 #include "confdefs.h"
6277 #include <sys/types.h>
6278 int
6279 main ()
6280 {
6281
6282 #ifdef _XOPEN_SOURCE
6283 make an error
6284 #endif
6285   ;
6286   return 0;
6287 }
6288 _ACEOF
6289 rm -f conftest.$ac_objext
6290 if { (eval echo "$as_me:6290: \"$ac_compile\"") >&5
6291   (eval $ac_compile) 2>&5
6292   ac_status=$?
6293   echo "$as_me:6293: \$? = $ac_status" >&5
6294   (exit $ac_status); } &&
6295          { ac_try='test -s conftest.$ac_objext'
6296   { (eval echo "$as_me:6296: \"$ac_try\"") >&5
6297   (eval $ac_try) 2>&5
6298   ac_status=$?
6299   echo "$as_me:6299: \$? = $ac_status" >&5
6300   (exit $ac_status); }; }; then
6301   cf_cv_gnu_source=no
6302 else
6303   echo "$as_me: failed program was:" >&5
6304 cat conftest.$ac_ext >&5
6305 cf_cv_gnu_source=yes
6306 fi
6307 rm -f conftest.$ac_objext conftest.$ac_ext
6308         CPPFLAGS="$cf_save"
6309
6310 fi
6311 rm -f conftest.$ac_objext conftest.$ac_ext
6312
6313 fi
6314 echo "$as_me:6314: result: $cf_cv_gnu_source" >&5
6315 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6316 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6317
6318         ;;
6319 mirbsd*) #(vi
6320         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6321         ;;
6322 netbsd*) #(vi
6323         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6324         ;;
6325 openbsd*) #(vi
6326         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6327         ;;
6328 osf[45]*) #(vi
6329         CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
6330         ;;
6331 nto-qnx*) #(vi
6332         CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
6333         ;;
6334 sco*) #(vi
6335         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6336         ;;
6337 solaris*) #(vi
6338         CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
6339         ;;
6340 *)
6341         echo "$as_me:6341: checking if we should define _XOPEN_SOURCE" >&5
6342 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6343 if test "${cf_cv_xopen_source+set}" = set; then
6344   echo $ECHO_N "(cached) $ECHO_C" >&6
6345 else
6346
6347         cat >conftest.$ac_ext <<_ACEOF
6348 #line 6348 "configure"
6349 #include "confdefs.h"
6350 #include <sys/types.h>
6351 int
6352 main ()
6353 {
6354
6355 #ifndef _XOPEN_SOURCE
6356 make an error
6357 #endif
6358   ;
6359   return 0;
6360 }
6361 _ACEOF
6362 rm -f conftest.$ac_objext
6363 if { (eval echo "$as_me:6363: \"$ac_compile\"") >&5
6364   (eval $ac_compile) 2>&5
6365   ac_status=$?
6366   echo "$as_me:6366: \$? = $ac_status" >&5
6367   (exit $ac_status); } &&
6368          { ac_try='test -s conftest.$ac_objext'
6369   { (eval echo "$as_me:6369: \"$ac_try\"") >&5
6370   (eval $ac_try) 2>&5
6371   ac_status=$?
6372   echo "$as_me:6372: \$? = $ac_status" >&5
6373   (exit $ac_status); }; }; then
6374   cf_cv_xopen_source=no
6375 else
6376   echo "$as_me: failed program was:" >&5
6377 cat conftest.$ac_ext >&5
6378 cf_save="$CPPFLAGS"
6379          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6380          cat >conftest.$ac_ext <<_ACEOF
6381 #line 6381 "configure"
6382 #include "confdefs.h"
6383 #include <sys/types.h>
6384 int
6385 main ()
6386 {
6387
6388 #ifdef _XOPEN_SOURCE
6389 make an error
6390 #endif
6391   ;
6392   return 0;
6393 }
6394 _ACEOF
6395 rm -f conftest.$ac_objext
6396 if { (eval echo "$as_me:6396: \"$ac_compile\"") >&5
6397   (eval $ac_compile) 2>&5
6398   ac_status=$?
6399   echo "$as_me:6399: \$? = $ac_status" >&5
6400   (exit $ac_status); } &&
6401          { ac_try='test -s conftest.$ac_objext'
6402   { (eval echo "$as_me:6402: \"$ac_try\"") >&5
6403   (eval $ac_try) 2>&5
6404   ac_status=$?
6405   echo "$as_me:6405: \$? = $ac_status" >&5
6406   (exit $ac_status); }; }; then
6407   cf_cv_xopen_source=no
6408 else
6409   echo "$as_me: failed program was:" >&5
6410 cat conftest.$ac_ext >&5
6411 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6412 fi
6413 rm -f conftest.$ac_objext conftest.$ac_ext
6414         CPPFLAGS="$cf_save"
6415
6416 fi
6417 rm -f conftest.$ac_objext conftest.$ac_ext
6418
6419 fi
6420 echo "$as_me:6420: result: $cf_cv_xopen_source" >&5
6421 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6422         if test "$cf_cv_xopen_source" != no ; then
6423
6424 # remove _XOPEN_SOURCE symbol from $CFLAGS
6425 CFLAGS=`echo "$CFLAGS" | \
6426         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6427                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6428
6429 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
6430 CPPFLAGS=`echo "$CPPFLAGS" | \
6431         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6432                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6433
6434                 test "$cf_cv_cc_u_d_options" = yes && \
6435                         CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
6436                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
6437         fi
6438
6439 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6440
6441 cf_save_CFLAGS="$CFLAGS"
6442 cf_save_CPPFLAGS="$CPPFLAGS"
6443
6444 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
6445 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6446         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6447                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6448
6449 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
6450 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6451         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6452                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6453
6454 echo "$as_me:6454: checking if we should define _POSIX_C_SOURCE" >&5
6455 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6456 if test "${cf_cv_posix_c_source+set}" = set; then
6457   echo $ECHO_N "(cached) $ECHO_C" >&6
6458 else
6459
6460 echo "${as_me-configure}:6460: testing if the symbol is already defined go no further ..." 1>&5
6461
6462         cat >conftest.$ac_ext <<_ACEOF
6463 #line 6463 "configure"
6464 #include "confdefs.h"
6465 #include <sys/types.h>
6466 int
6467 main ()
6468 {
6469
6470 #ifndef _POSIX_C_SOURCE
6471 make an error
6472 #endif
6473   ;
6474   return 0;
6475 }
6476 _ACEOF
6477 rm -f conftest.$ac_objext
6478 if { (eval echo "$as_me:6478: \"$ac_compile\"") >&5
6479   (eval $ac_compile) 2>&5
6480   ac_status=$?
6481   echo "$as_me:6481: \$? = $ac_status" >&5
6482   (exit $ac_status); } &&
6483          { ac_try='test -s conftest.$ac_objext'
6484   { (eval echo "$as_me:6484: \"$ac_try\"") >&5
6485   (eval $ac_try) 2>&5
6486   ac_status=$?
6487   echo "$as_me:6487: \$? = $ac_status" >&5
6488   (exit $ac_status); }; }; then
6489   cf_cv_posix_c_source=no
6490 else
6491   echo "$as_me: failed program was:" >&5
6492 cat conftest.$ac_ext >&5
6493 cf_want_posix_source=no
6494          case .$cf_POSIX_C_SOURCE in #(vi
6495          .[12]??*) #(vi
6496                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6497                 ;;
6498          .2) #(vi
6499                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6500                 cf_want_posix_source=yes
6501                 ;;
6502          .*)
6503                 cf_want_posix_source=yes
6504                 ;;
6505          esac
6506          if test "$cf_want_posix_source" = yes ; then
6507                 cat >conftest.$ac_ext <<_ACEOF
6508 #line 6508 "configure"
6509 #include "confdefs.h"
6510 #include <sys/types.h>
6511 int
6512 main ()
6513 {
6514
6515 #ifdef _POSIX_SOURCE
6516 make an error
6517 #endif
6518   ;
6519   return 0;
6520 }
6521 _ACEOF
6522 rm -f conftest.$ac_objext
6523 if { (eval echo "$as_me:6523: \"$ac_compile\"") >&5
6524   (eval $ac_compile) 2>&5
6525   ac_status=$?
6526   echo "$as_me:6526: \$? = $ac_status" >&5
6527   (exit $ac_status); } &&
6528          { ac_try='test -s conftest.$ac_objext'
6529   { (eval echo "$as_me:6529: \"$ac_try\"") >&5
6530   (eval $ac_try) 2>&5
6531   ac_status=$?
6532   echo "$as_me:6532: \$? = $ac_status" >&5
6533   (exit $ac_status); }; }; then
6534   :
6535 else
6536   echo "$as_me: failed program was:" >&5
6537 cat conftest.$ac_ext >&5
6538 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6539 fi
6540 rm -f conftest.$ac_objext conftest.$ac_ext
6541          fi
6542
6543 echo "${as_me-configure}:6543: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6544
6545          CFLAGS="$cf_trim_CFLAGS"
6546          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6547
6548 echo "${as_me-configure}:6548: testing if the second compile does not leave our definition intact error ..." 1>&5
6549
6550          cat >conftest.$ac_ext <<_ACEOF
6551 #line 6551 "configure"
6552 #include "confdefs.h"
6553 #include <sys/types.h>
6554 int
6555 main ()
6556 {
6557
6558 #ifndef _POSIX_C_SOURCE
6559 make an error
6560 #endif
6561   ;
6562   return 0;
6563 }
6564 _ACEOF
6565 rm -f conftest.$ac_objext
6566 if { (eval echo "$as_me:6566: \"$ac_compile\"") >&5
6567   (eval $ac_compile) 2>&5
6568   ac_status=$?
6569   echo "$as_me:6569: \$? = $ac_status" >&5
6570   (exit $ac_status); } &&
6571          { ac_try='test -s conftest.$ac_objext'
6572   { (eval echo "$as_me:6572: \"$ac_try\"") >&5
6573   (eval $ac_try) 2>&5
6574   ac_status=$?
6575   echo "$as_me:6575: \$? = $ac_status" >&5
6576   (exit $ac_status); }; }; then
6577   :
6578 else
6579   echo "$as_me: failed program was:" >&5
6580 cat conftest.$ac_ext >&5
6581 cf_cv_posix_c_source=no
6582 fi
6583 rm -f conftest.$ac_objext conftest.$ac_ext
6584          CFLAGS="$cf_save_CFLAGS"
6585          CPPFLAGS="$cf_save_CPPFLAGS"
6586
6587 fi
6588 rm -f conftest.$ac_objext conftest.$ac_ext
6589
6590 fi
6591 echo "$as_me:6591: result: $cf_cv_posix_c_source" >&5
6592 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6593
6594 if test "$cf_cv_posix_c_source" != no ; then
6595         CFLAGS="$cf_trim_CFLAGS"
6596         CPPFLAGS="$cf_trim_CPPFLAGS"
6597         if test "$cf_cv_cc_u_d_options" = yes ; then
6598                 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
6599                                 sed -e 's/-D/-U/g' -e 's/=[^    ]*//g'`
6600                 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
6601         fi
6602         CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
6603 fi
6604
6605         ;;
6606 esac
6607
6608 # Work around breakage on OS X
6609
6610 echo "$as_me:6610: checking if SIGWINCH is defined" >&5
6611 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
6612 if test "${cf_cv_define_sigwinch+set}" = set; then
6613   echo $ECHO_N "(cached) $ECHO_C" >&6
6614 else
6615
6616         cat >conftest.$ac_ext <<_ACEOF
6617 #line 6617 "configure"
6618 #include "confdefs.h"
6619
6620 #include <sys/types.h>
6621 #include <sys/signal.h>
6622
6623 int
6624 main ()
6625 {
6626 int x = SIGWINCH
6627   ;
6628   return 0;
6629 }
6630 _ACEOF
6631 rm -f conftest.$ac_objext
6632 if { (eval echo "$as_me:6632: \"$ac_compile\"") >&5
6633   (eval $ac_compile) 2>&5
6634   ac_status=$?
6635   echo "$as_me:6635: \$? = $ac_status" >&5
6636   (exit $ac_status); } &&
6637          { ac_try='test -s conftest.$ac_objext'
6638   { (eval echo "$as_me:6638: \"$ac_try\"") >&5
6639   (eval $ac_try) 2>&5
6640   ac_status=$?
6641   echo "$as_me:6641: \$? = $ac_status" >&5
6642   (exit $ac_status); }; }; then
6643   cf_cv_define_sigwinch=yes
6644 else
6645   echo "$as_me: failed program was:" >&5
6646 cat conftest.$ac_ext >&5
6647 cat >conftest.$ac_ext <<_ACEOF
6648 #line 6648 "configure"
6649 #include "confdefs.h"
6650
6651 #undef _XOPEN_SOURCE
6652 #undef _POSIX_SOURCE
6653 #undef _POSIX_C_SOURCE
6654 #include <sys/types.h>
6655 #include <sys/signal.h>
6656
6657 int
6658 main ()
6659 {
6660 int x = SIGWINCH
6661   ;
6662   return 0;
6663 }
6664 _ACEOF
6665 rm -f conftest.$ac_objext
6666 if { (eval echo "$as_me:6666: \"$ac_compile\"") >&5
6667   (eval $ac_compile) 2>&5
6668   ac_status=$?
6669   echo "$as_me:6669: \$? = $ac_status" >&5
6670   (exit $ac_status); } &&
6671          { ac_try='test -s conftest.$ac_objext'
6672   { (eval echo "$as_me:6672: \"$ac_try\"") >&5
6673   (eval $ac_try) 2>&5
6674   ac_status=$?
6675   echo "$as_me:6675: \$? = $ac_status" >&5
6676   (exit $ac_status); }; }; then
6677   cf_cv_define_sigwinch=maybe
6678 else
6679   echo "$as_me: failed program was:" >&5
6680 cat conftest.$ac_ext >&5
6681 cf_cv_define_sigwinch=no
6682 fi
6683 rm -f conftest.$ac_objext conftest.$ac_ext
6684
6685 fi
6686 rm -f conftest.$ac_objext conftest.$ac_ext
6687
6688 fi
6689 echo "$as_me:6689: result: $cf_cv_define_sigwinch" >&5
6690 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6691
6692 if test "$cf_cv_define_sigwinch" = maybe ; then
6693 echo "$as_me:6693: checking for actual SIGWINCH definition" >&5
6694 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
6695 if test "${cf_cv_fixup_sigwinch+set}" = set; then
6696   echo $ECHO_N "(cached) $ECHO_C" >&6
6697 else
6698
6699 cf_cv_fixup_sigwinch=unknown
6700 cf_sigwinch=32
6701 while test $cf_sigwinch != 1
6702 do
6703         cat >conftest.$ac_ext <<_ACEOF
6704 #line 6704 "configure"
6705 #include "confdefs.h"
6706
6707 #undef _XOPEN_SOURCE
6708 #undef _POSIX_SOURCE
6709 #undef _POSIX_C_SOURCE
6710 #include <sys/types.h>
6711 #include <sys/signal.h>
6712
6713 int
6714 main ()
6715 {
6716
6717 #if SIGWINCH != $cf_sigwinch
6718 make an error
6719 #endif
6720 int x = SIGWINCH
6721   ;
6722   return 0;
6723 }
6724 _ACEOF
6725 rm -f conftest.$ac_objext
6726 if { (eval echo "$as_me:6726: \"$ac_compile\"") >&5
6727   (eval $ac_compile) 2>&5
6728   ac_status=$?
6729   echo "$as_me:6729: \$? = $ac_status" >&5
6730   (exit $ac_status); } &&
6731          { ac_try='test -s conftest.$ac_objext'
6732   { (eval echo "$as_me:6732: \"$ac_try\"") >&5
6733   (eval $ac_try) 2>&5
6734   ac_status=$?
6735   echo "$as_me:6735: \$? = $ac_status" >&5
6736   (exit $ac_status); }; }; then
6737   cf_cv_fixup_sigwinch=$cf_sigwinch
6738          break
6739 else
6740   echo "$as_me: failed program was:" >&5
6741 cat conftest.$ac_ext >&5
6742 fi
6743 rm -f conftest.$ac_objext conftest.$ac_ext
6744
6745 cf_sigwinch=`expr $cf_sigwinch - 1`
6746 done
6747
6748 fi
6749 echo "$as_me:6749: result: $cf_cv_fixup_sigwinch" >&5
6750 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
6751
6752         if test "$cf_cv_fixup_sigwinch" != unknown ; then
6753                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
6754         fi
6755 fi
6756
6757 # Checks for CODESET support.
6758
6759   echo "$as_me:6759: checking for nl_langinfo and CODESET" >&5
6760 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
6761 if test "${am_cv_langinfo_codeset+set}" = set; then
6762   echo $ECHO_N "(cached) $ECHO_C" >&6
6763 else
6764   cat >conftest.$ac_ext <<_ACEOF
6765 #line 6765 "configure"
6766 #include "confdefs.h"
6767 #include <langinfo.h>
6768 int
6769 main ()
6770 {
6771 char* cs = nl_langinfo(CODESET);
6772   ;
6773   return 0;
6774 }
6775 _ACEOF
6776 rm -f conftest.$ac_objext conftest$ac_exeext
6777 if { (eval echo "$as_me:6777: \"$ac_link\"") >&5
6778   (eval $ac_link) 2>&5
6779   ac_status=$?
6780   echo "$as_me:6780: \$? = $ac_status" >&5
6781   (exit $ac_status); } &&
6782          { ac_try='test -s conftest$ac_exeext'
6783   { (eval echo "$as_me:6783: \"$ac_try\"") >&5
6784   (eval $ac_try) 2>&5
6785   ac_status=$?
6786   echo "$as_me:6786: \$? = $ac_status" >&5
6787   (exit $ac_status); }; }; then
6788   am_cv_langinfo_codeset=yes
6789 else
6790   echo "$as_me: failed program was:" >&5
6791 cat conftest.$ac_ext >&5
6792 am_cv_langinfo_codeset=no
6793 fi
6794 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6795
6796 fi
6797 echo "$as_me:6797: result: $am_cv_langinfo_codeset" >&5
6798 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
6799   if test $am_cv_langinfo_codeset = yes; then
6800
6801 cat >>confdefs.h <<\EOF
6802 #define HAVE_LANGINFO_CODESET 1
6803 EOF
6804
6805   fi
6806
6807 # use these variables to work around a defect in gcc's fixincludes.
6808 NCURSES_OK_WCHAR_T=
6809 NCURSES_OK_WINT_T=
6810
6811 echo "$as_me:6811: checking if you want wide-character code" >&5
6812 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6813
6814 # Check whether --enable-widec or --disable-widec was given.
6815 if test "${enable_widec+set}" = set; then
6816   enableval="$enable_widec"
6817   with_widec=$enableval
6818 else
6819   with_widec=no
6820 fi;
6821 echo "$as_me:6821: result: $with_widec" >&5
6822 echo "${ECHO_T}$with_widec" >&6
6823 if test "$with_widec" = yes ; then
6824         LIB_SUFFIX="w${LIB_SUFFIX}"
6825         cat >>confdefs.h <<\EOF
6826 #define USE_WIDEC_SUPPORT 1
6827 EOF
6828
6829 echo "$as_me:6829: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
6830 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
6831 cat >conftest.$ac_ext <<_ACEOF
6832 #line 6832 "configure"
6833 #include "confdefs.h"
6834 #include <sys/types.h>
6835
6836 int
6837 main ()
6838 {
6839
6840 #ifndef _XOPEN_SOURCE_EXTENDED
6841 make an error
6842 #endif
6843   ;
6844   return 0;
6845 }
6846 _ACEOF
6847 rm -f conftest.$ac_objext
6848 if { (eval echo "$as_me:6848: \"$ac_compile\"") >&5
6849   (eval $ac_compile) 2>&5
6850   ac_status=$?
6851   echo "$as_me:6851: \$? = $ac_status" >&5
6852   (exit $ac_status); } &&
6853          { ac_try='test -s conftest.$ac_objext'
6854   { (eval echo "$as_me:6854: \"$ac_try\"") >&5
6855   (eval $ac_try) 2>&5
6856   ac_status=$?
6857   echo "$as_me:6857: \$? = $ac_status" >&5
6858   (exit $ac_status); }; }; then
6859   cf_result=no
6860 else
6861   echo "$as_me: failed program was:" >&5
6862 cat conftest.$ac_ext >&5
6863 cf_result=yes
6864 fi
6865 rm -f conftest.$ac_objext conftest.$ac_ext
6866 echo "$as_me:6866: result: $cf_result" >&5
6867 echo "${ECHO_T}$cf_result" >&6
6868
6869 if test "$cf_result" = yes ; then
6870         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
6871 elif test "x" != "x" ; then
6872         echo "$as_me:6872: checking checking for compatible value versus " >&5
6873 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
6874         cat >conftest.$ac_ext <<_ACEOF
6875 #line 6875 "configure"
6876 #include "confdefs.h"
6877 #include <sys/types.h>
6878
6879 int
6880 main ()
6881 {
6882
6883 #if _XOPEN_SOURCE_EXTENDED- < 0
6884 make an error
6885 #endif
6886   ;
6887   return 0;
6888 }
6889 _ACEOF
6890 rm -f conftest.$ac_objext
6891 if { (eval echo "$as_me:6891: \"$ac_compile\"") >&5
6892   (eval $ac_compile) 2>&5
6893   ac_status=$?
6894   echo "$as_me:6894: \$? = $ac_status" >&5
6895   (exit $ac_status); } &&
6896          { ac_try='test -s conftest.$ac_objext'
6897   { (eval echo "$as_me:6897: \"$ac_try\"") >&5
6898   (eval $ac_try) 2>&5
6899   ac_status=$?
6900   echo "$as_me:6900: \$? = $ac_status" >&5
6901   (exit $ac_status); }; }; then
6902   cf_result=yes
6903 else
6904   echo "$as_me: failed program was:" >&5
6905 cat conftest.$ac_ext >&5
6906 cf_result=no
6907 fi
6908 rm -f conftest.$ac_objext conftest.$ac_ext
6909         echo "$as_me:6909: result: $cf_result" >&5
6910 echo "${ECHO_T}$cf_result" >&6
6911         if test "$cf_result" = no ; then
6912                 # perhaps we can override it - try...
6913                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
6914         fi
6915 fi
6916
6917         # with_overwrite=no
6918         NCURSES_CH_T=cchar_t
6919
6920 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
6921 do
6922 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6923 echo "$as_me:6923: checking for $ac_func" >&5
6924 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6925 if eval "test \"\${$as_ac_var+set}\" = set"; then
6926   echo $ECHO_N "(cached) $ECHO_C" >&6
6927 else
6928   cat >conftest.$ac_ext <<_ACEOF
6929 #line 6929 "configure"
6930 #include "confdefs.h"
6931 /* System header to define __stub macros and hopefully few prototypes,
6932     which can conflict with char $ac_func (); below.  */
6933 #include <assert.h>
6934 /* Override any gcc2 internal prototype to avoid an error.  */
6935 #ifdef __cplusplus
6936 extern "C"
6937 #endif
6938 /* We use char because int might match the return type of a gcc2
6939    builtin and then its argument prototype would still apply.  */
6940 char $ac_func ();
6941 char (*f) ();
6942
6943 int
6944 main ()
6945 {
6946 /* The GNU C library defines this for functions which it implements
6947     to always fail with ENOSYS.  Some functions are actually named
6948     something starting with __ and the normal name is an alias.  */
6949 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6950 choke me
6951 #else
6952 f = $ac_func;
6953 #endif
6954
6955   ;
6956   return 0;
6957 }
6958 _ACEOF
6959 rm -f conftest.$ac_objext conftest$ac_exeext
6960 if { (eval echo "$as_me:6960: \"$ac_link\"") >&5
6961   (eval $ac_link) 2>&5
6962   ac_status=$?
6963   echo "$as_me:6963: \$? = $ac_status" >&5
6964   (exit $ac_status); } &&
6965          { ac_try='test -s conftest$ac_exeext'
6966   { (eval echo "$as_me:6966: \"$ac_try\"") >&5
6967   (eval $ac_try) 2>&5
6968   ac_status=$?
6969   echo "$as_me:6969: \$? = $ac_status" >&5
6970   (exit $ac_status); }; }; then
6971   eval "$as_ac_var=yes"
6972 else
6973   echo "$as_me: failed program was:" >&5
6974 cat conftest.$ac_ext >&5
6975 eval "$as_ac_var=no"
6976 fi
6977 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6978 fi
6979 echo "$as_me:6979: result: `eval echo '${'$as_ac_var'}'`" >&5
6980 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6981 if test `eval echo '${'$as_ac_var'}'` = yes; then
6982   cat >>confdefs.h <<EOF
6983 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6984 EOF
6985
6986 fi
6987 done
6988
6989         if test "$ac_cv_func_putwc" != yes ; then
6990
6991 echo "$as_me:6991: checking for putwc in libutf8" >&5
6992 echo $ECHO_N "checking for putwc in libutf8... $ECHO_C" >&6
6993 if test "${cf_cv_libutf8+set}" = set; then
6994   echo $ECHO_N "(cached) $ECHO_C" >&6
6995 else
6996
6997         cf_save_LIBS="$LIBS"
6998         LIBS="-lutf8 $LIBS"
6999 cat >conftest.$ac_ext <<_ACEOF
7000 #line 7000 "configure"
7001 #include "confdefs.h"
7002
7003 #include <libutf8.h>
7004 int
7005 main ()
7006 {
7007 putwc(0,0);
7008   ;
7009   return 0;
7010 }
7011 _ACEOF
7012 rm -f conftest.$ac_objext conftest$ac_exeext
7013 if { (eval echo "$as_me:7013: \"$ac_link\"") >&5
7014   (eval $ac_link) 2>&5
7015   ac_status=$?
7016   echo "$as_me:7016: \$? = $ac_status" >&5
7017   (exit $ac_status); } &&
7018          { ac_try='test -s conftest$ac_exeext'
7019   { (eval echo "$as_me:7019: \"$ac_try\"") >&5
7020   (eval $ac_try) 2>&5
7021   ac_status=$?
7022   echo "$as_me:7022: \$? = $ac_status" >&5
7023   (exit $ac_status); }; }; then
7024   cf_cv_libutf8=yes
7025 else
7026   echo "$as_me: failed program was:" >&5
7027 cat conftest.$ac_ext >&5
7028 cf_cv_libutf8=no
7029 fi
7030 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7031         LIBS="$cf_save_LIBS"
7032
7033 fi
7034 echo "$as_me:7034: result: $cf_cv_libutf8" >&5
7035 echo "${ECHO_T}$cf_cv_libutf8" >&6
7036
7037 if test "$cf_cv_libutf8" = yes ; then
7038         cat >>confdefs.h <<\EOF
7039 #define HAVE_LIBUTF8_H 1
7040 EOF
7041
7042         LIBS="-lutf8 $LIBS"
7043 fi
7044
7045                 if test "$cf_cv_libutf8" = yes ; then
7046                         NCURSES_LIBUTF8=1
7047                 fi
7048         fi
7049
7050 # This is needed on Tru64 5.0 to declare mbstate_t
7051 echo "$as_me:7051: checking if we must include wchar.h to declare mbstate_t" >&5
7052 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
7053 if test "${cf_cv_mbstate_t+set}" = set; then
7054   echo $ECHO_N "(cached) $ECHO_C" >&6
7055 else
7056
7057 cat >conftest.$ac_ext <<_ACEOF
7058 #line 7058 "configure"
7059 #include "confdefs.h"
7060
7061 #include <stdlib.h>
7062 #include <stdarg.h>
7063 #include <stdio.h>
7064 #ifdef HAVE_LIBUTF8_H
7065 #include <libutf8.h>
7066 #endif
7067 int
7068 main ()
7069 {
7070 mbstate_t state
7071   ;
7072   return 0;
7073 }
7074 _ACEOF
7075 rm -f conftest.$ac_objext
7076 if { (eval echo "$as_me:7076: \"$ac_compile\"") >&5
7077   (eval $ac_compile) 2>&5
7078   ac_status=$?
7079   echo "$as_me:7079: \$? = $ac_status" >&5
7080   (exit $ac_status); } &&
7081          { ac_try='test -s conftest.$ac_objext'
7082   { (eval echo "$as_me:7082: \"$ac_try\"") >&5
7083   (eval $ac_try) 2>&5
7084   ac_status=$?
7085   echo "$as_me:7085: \$? = $ac_status" >&5
7086   (exit $ac_status); }; }; then
7087   cf_cv_mbstate_t=no
7088 else
7089   echo "$as_me: failed program was:" >&5
7090 cat conftest.$ac_ext >&5
7091 cat >conftest.$ac_ext <<_ACEOF
7092 #line 7092 "configure"
7093 #include "confdefs.h"
7094
7095 #include <stdlib.h>
7096 #include <stdarg.h>
7097 #include <stdio.h>
7098 #include <wchar.h>
7099 #ifdef HAVE_LIBUTF8_H
7100 #include <libutf8.h>
7101 #endif
7102 int
7103 main ()
7104 {
7105 mbstate_t value
7106   ;
7107   return 0;
7108 }
7109 _ACEOF
7110 rm -f conftest.$ac_objext
7111 if { (eval echo "$as_me:7111: \"$ac_compile\"") >&5
7112   (eval $ac_compile) 2>&5
7113   ac_status=$?
7114   echo "$as_me:7114: \$? = $ac_status" >&5
7115   (exit $ac_status); } &&
7116          { ac_try='test -s conftest.$ac_objext'
7117   { (eval echo "$as_me:7117: \"$ac_try\"") >&5
7118   (eval $ac_try) 2>&5
7119   ac_status=$?
7120   echo "$as_me:7120: \$? = $ac_status" >&5
7121   (exit $ac_status); }; }; then
7122   cf_cv_mbstate_t=yes
7123 else
7124   echo "$as_me: failed program was:" >&5
7125 cat conftest.$ac_ext >&5
7126 cf_cv_mbstate_t=unknown
7127 fi
7128 rm -f conftest.$ac_objext conftest.$ac_ext
7129 fi
7130 rm -f conftest.$ac_objext conftest.$ac_ext
7131 fi
7132 echo "$as_me:7132: result: $cf_cv_mbstate_t" >&5
7133 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
7134
7135 if test "$cf_cv_mbstate_t" = yes ; then
7136         cat >>confdefs.h <<\EOF
7137 #define NEED_WCHAR_H 1
7138 EOF
7139
7140         NEED_WCHAR_H=1
7141 fi
7142
7143 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
7144 if test "$cf_cv_mbstate_t" = unknown ; then
7145         NCURSES_MBSTATE_T=1
7146 fi
7147
7148 # This is needed on Tru64 5.0 to declare wchar_t
7149 echo "$as_me:7149: checking if we must include wchar.h to declare wchar_t" >&5
7150 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
7151 if test "${cf_cv_wchar_t+set}" = set; then
7152   echo $ECHO_N "(cached) $ECHO_C" >&6
7153 else
7154
7155 cat >conftest.$ac_ext <<_ACEOF
7156 #line 7156 "configure"
7157 #include "confdefs.h"
7158
7159 #include <stdlib.h>
7160 #include <stdarg.h>
7161 #include <stdio.h>
7162 #ifdef HAVE_LIBUTF8_H
7163 #include <libutf8.h>
7164 #endif
7165 int
7166 main ()
7167 {
7168 wchar_t state
7169   ;
7170   return 0;
7171 }
7172 _ACEOF
7173 rm -f conftest.$ac_objext
7174 if { (eval echo "$as_me:7174: \"$ac_compile\"") >&5
7175   (eval $ac_compile) 2>&5
7176   ac_status=$?
7177   echo "$as_me:7177: \$? = $ac_status" >&5
7178   (exit $ac_status); } &&
7179          { ac_try='test -s conftest.$ac_objext'
7180   { (eval echo "$as_me:7180: \"$ac_try\"") >&5
7181   (eval $ac_try) 2>&5
7182   ac_status=$?
7183   echo "$as_me:7183: \$? = $ac_status" >&5
7184   (exit $ac_status); }; }; then
7185   cf_cv_wchar_t=no
7186 else
7187   echo "$as_me: failed program was:" >&5
7188 cat conftest.$ac_ext >&5
7189 cat >conftest.$ac_ext <<_ACEOF
7190 #line 7190 "configure"
7191 #include "confdefs.h"
7192
7193 #include <stdlib.h>
7194 #include <stdarg.h>
7195 #include <stdio.h>
7196 #include <wchar.h>
7197 #ifdef HAVE_LIBUTF8_H
7198 #include <libutf8.h>
7199 #endif
7200 int
7201 main ()
7202 {
7203 wchar_t value
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   cf_cv_wchar_t=yes
7221 else
7222   echo "$as_me: failed program was:" >&5
7223 cat conftest.$ac_ext >&5
7224 cf_cv_wchar_t=unknown
7225 fi
7226 rm -f conftest.$ac_objext conftest.$ac_ext
7227 fi
7228 rm -f conftest.$ac_objext conftest.$ac_ext
7229 fi
7230 echo "$as_me:7230: result: $cf_cv_wchar_t" >&5
7231 echo "${ECHO_T}$cf_cv_wchar_t" >&6
7232
7233 if test "$cf_cv_wchar_t" = yes ; then
7234         cat >>confdefs.h <<\EOF
7235 #define NEED_WCHAR_H 1
7236 EOF
7237
7238         NEED_WCHAR_H=1
7239 fi
7240
7241 # if we do not find wchar_t in either place, use substitution to provide a fallback.
7242 if test "$cf_cv_wchar_t" = unknown ; then
7243         NCURSES_WCHAR_T=1
7244 fi
7245
7246 # if we find wchar_t in either place, use substitution to provide a fallback.
7247 if test "$cf_cv_wchar_t" != unknown ; then
7248         NCURSES_OK_WCHAR_T=1
7249 fi
7250
7251 # This is needed on Tru64 5.0 to declare wint_t
7252 echo "$as_me:7252: checking if we must include wchar.h to declare wint_t" >&5
7253 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
7254 if test "${cf_cv_wint_t+set}" = set; then
7255   echo $ECHO_N "(cached) $ECHO_C" >&6
7256 else
7257
7258 cat >conftest.$ac_ext <<_ACEOF
7259 #line 7259 "configure"
7260 #include "confdefs.h"
7261
7262 #include <stdlib.h>
7263 #include <stdarg.h>
7264 #include <stdio.h>
7265 #ifdef HAVE_LIBUTF8_H
7266 #include <libutf8.h>
7267 #endif
7268 int
7269 main ()
7270 {
7271 wint_t state
7272   ;
7273   return 0;
7274 }
7275 _ACEOF
7276 rm -f conftest.$ac_objext
7277 if { (eval echo "$as_me:7277: \"$ac_compile\"") >&5
7278   (eval $ac_compile) 2>&5
7279   ac_status=$?
7280   echo "$as_me:7280: \$? = $ac_status" >&5
7281   (exit $ac_status); } &&
7282          { ac_try='test -s conftest.$ac_objext'
7283   { (eval echo "$as_me:7283: \"$ac_try\"") >&5
7284   (eval $ac_try) 2>&5
7285   ac_status=$?
7286   echo "$as_me:7286: \$? = $ac_status" >&5
7287   (exit $ac_status); }; }; then
7288   cf_cv_wint_t=no
7289 else
7290   echo "$as_me: failed program was:" >&5
7291 cat conftest.$ac_ext >&5
7292 cat >conftest.$ac_ext <<_ACEOF
7293 #line 7293 "configure"
7294 #include "confdefs.h"
7295
7296 #include <stdlib.h>
7297 #include <stdarg.h>
7298 #include <stdio.h>
7299 #include <wchar.h>
7300 #ifdef HAVE_LIBUTF8_H
7301 #include <libutf8.h>
7302 #endif
7303 int
7304 main ()
7305 {
7306 wint_t value
7307   ;
7308   return 0;
7309 }
7310 _ACEOF
7311 rm -f conftest.$ac_objext
7312 if { (eval echo "$as_me:7312: \"$ac_compile\"") >&5
7313   (eval $ac_compile) 2>&5
7314   ac_status=$?
7315   echo "$as_me:7315: \$? = $ac_status" >&5
7316   (exit $ac_status); } &&
7317          { ac_try='test -s conftest.$ac_objext'
7318   { (eval echo "$as_me:7318: \"$ac_try\"") >&5
7319   (eval $ac_try) 2>&5
7320   ac_status=$?
7321   echo "$as_me:7321: \$? = $ac_status" >&5
7322   (exit $ac_status); }; }; then
7323   cf_cv_wint_t=yes
7324 else
7325   echo "$as_me: failed program was:" >&5
7326 cat conftest.$ac_ext >&5
7327 cf_cv_wint_t=unknown
7328 fi
7329 rm -f conftest.$ac_objext conftest.$ac_ext
7330 fi
7331 rm -f conftest.$ac_objext conftest.$ac_ext
7332 fi
7333 echo "$as_me:7333: result: $cf_cv_wint_t" >&5
7334 echo "${ECHO_T}$cf_cv_wint_t" >&6
7335
7336 if test "$cf_cv_wint_t" = yes ; then
7337         cat >>confdefs.h <<\EOF
7338 #define NEED_WCHAR_H 1
7339 EOF
7340
7341         NEED_WCHAR_H=1
7342 fi
7343
7344 # if we do not find wint_t in either place, use substitution to provide a fallback.
7345 if test "$cf_cv_wint_t" = unknown ; then
7346         NCURSES_WINT_T=1
7347 fi
7348
7349 # if we find wint_t in either place, use substitution to provide a fallback.
7350 if test "$cf_cv_wint_t" != unknown ; then
7351         NCURSES_OK_WINT_T=1
7352 fi
7353
7354         if test "$NCURSES_MBSTATE_T" != 0; then
7355                 cat >>confdefs.h <<\EOF
7356 #define NEED_MBSTATE_T_DEF 1
7357 EOF
7358
7359         fi
7360 fi
7361
7362 ###   use option --disable-lp64 to allow long chtype
7363 case $cf_cv_abi_version in
7364 [345]*)
7365         default_with_lp64=no
7366         ;;
7367 *)
7368         default_with_lp64=yes
7369         ;;
7370 esac
7371
7372 echo "$as_me:7372: checking whether to enable _LP64 definition in curses.h" >&5
7373 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
7374
7375 # Check whether --enable-lp64 or --disable-lp64 was given.
7376 if test "${enable_lp64+set}" = set; then
7377   enableval="$enable_lp64"
7378   with_lp64=$enableval
7379 else
7380   with_lp64=$default_with_lp64
7381 fi;
7382 echo "$as_me:7382: result: $with_lp64" >&5
7383 echo "${ECHO_T}$with_lp64" >&6
7384
7385 if test "$with_lp64" = yes ; then
7386         cf_cv_enable_lp64=1
7387 else
7388         cf_cv_enable_lp64=0
7389 fi
7390
7391 # Check whether --enable-largefile or --disable-largefile was given.
7392 if test "${enable_largefile+set}" = set; then
7393   enableval="$enable_largefile"
7394
7395 fi;
7396 if test "$enable_largefile" != no; then
7397
7398   echo "$as_me:7398: checking for special C compiler options needed for large files" >&5
7399 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
7400 if test "${ac_cv_sys_largefile_CC+set}" = set; then
7401   echo $ECHO_N "(cached) $ECHO_C" >&6
7402 else
7403   ac_cv_sys_largefile_CC=no
7404      if test "$GCC" != yes; then
7405        ac_save_CC=$CC
7406        while :; do
7407          # IRIX 6.2 and later do not support large files by default,
7408          # so use the C compiler's -n32 option if that helps.
7409          cat >conftest.$ac_ext <<_ACEOF
7410 #line 7410 "configure"
7411 #include "confdefs.h"
7412 #include <sys/types.h>
7413  /* Check that off_t can represent 2**63 - 1 correctly.
7414     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7415     since some C++ compilers masquerading as C compilers
7416     incorrectly reject 9223372036854775807.  */
7417 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7418   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7419                        && LARGE_OFF_T % 2147483647 == 1)
7420                       ? 1 : -1];
7421 int
7422 main ()
7423 {
7424
7425   ;
7426   return 0;
7427 }
7428 _ACEOF
7429          rm -f conftest.$ac_objext
7430 if { (eval echo "$as_me:7430: \"$ac_compile\"") >&5
7431   (eval $ac_compile) 2>&5
7432   ac_status=$?
7433   echo "$as_me:7433: \$? = $ac_status" >&5
7434   (exit $ac_status); } &&
7435          { ac_try='test -s conftest.$ac_objext'
7436   { (eval echo "$as_me:7436: \"$ac_try\"") >&5
7437   (eval $ac_try) 2>&5
7438   ac_status=$?
7439   echo "$as_me:7439: \$? = $ac_status" >&5
7440   (exit $ac_status); }; }; then
7441   break
7442 else
7443   echo "$as_me: failed program was:" >&5
7444 cat conftest.$ac_ext >&5
7445 fi
7446 rm -f conftest.$ac_objext
7447          CC="$CC -n32"
7448          rm -f conftest.$ac_objext
7449 if { (eval echo "$as_me:7449: \"$ac_compile\"") >&5
7450   (eval $ac_compile) 2>&5
7451   ac_status=$?
7452   echo "$as_me:7452: \$? = $ac_status" >&5
7453   (exit $ac_status); } &&
7454          { ac_try='test -s conftest.$ac_objext'
7455   { (eval echo "$as_me:7455: \"$ac_try\"") >&5
7456   (eval $ac_try) 2>&5
7457   ac_status=$?
7458   echo "$as_me:7458: \$? = $ac_status" >&5
7459   (exit $ac_status); }; }; then
7460   ac_cv_sys_largefile_CC=' -n32'; break
7461 else
7462   echo "$as_me: failed program was:" >&5
7463 cat conftest.$ac_ext >&5
7464 fi
7465 rm -f conftest.$ac_objext
7466          break
7467        done
7468        CC=$ac_save_CC
7469        rm -f conftest.$ac_ext
7470     fi
7471 fi
7472 echo "$as_me:7472: result: $ac_cv_sys_largefile_CC" >&5
7473 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
7474   if test "$ac_cv_sys_largefile_CC" != no; then
7475     CC=$CC$ac_cv_sys_largefile_CC
7476   fi
7477
7478   echo "$as_me:7478: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7479 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
7480 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
7481   echo $ECHO_N "(cached) $ECHO_C" >&6
7482 else
7483   while :; do
7484   ac_cv_sys_file_offset_bits=no
7485   cat >conftest.$ac_ext <<_ACEOF
7486 #line 7486 "configure"
7487 #include "confdefs.h"
7488 #include <sys/types.h>
7489  /* Check that off_t can represent 2**63 - 1 correctly.
7490     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7491     since some C++ compilers masquerading as C compilers
7492     incorrectly reject 9223372036854775807.  */
7493 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7494   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7495                        && LARGE_OFF_T % 2147483647 == 1)
7496                       ? 1 : -1];
7497 int
7498 main ()
7499 {
7500
7501   ;
7502   return 0;
7503 }
7504 _ACEOF
7505 rm -f conftest.$ac_objext
7506 if { (eval echo "$as_me:7506: \"$ac_compile\"") >&5
7507   (eval $ac_compile) 2>&5
7508   ac_status=$?
7509   echo "$as_me:7509: \$? = $ac_status" >&5
7510   (exit $ac_status); } &&
7511          { ac_try='test -s conftest.$ac_objext'
7512   { (eval echo "$as_me:7512: \"$ac_try\"") >&5
7513   (eval $ac_try) 2>&5
7514   ac_status=$?
7515   echo "$as_me:7515: \$? = $ac_status" >&5
7516   (exit $ac_status); }; }; then
7517   break
7518 else
7519   echo "$as_me: failed program was:" >&5
7520 cat conftest.$ac_ext >&5
7521 fi
7522 rm -f conftest.$ac_objext conftest.$ac_ext
7523   cat >conftest.$ac_ext <<_ACEOF
7524 #line 7524 "configure"
7525 #include "confdefs.h"
7526 #define _FILE_OFFSET_BITS 64
7527 #include <sys/types.h>
7528  /* Check that off_t can represent 2**63 - 1 correctly.
7529     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7530     since some C++ compilers masquerading as C compilers
7531     incorrectly reject 9223372036854775807.  */
7532 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7533   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7534                        && LARGE_OFF_T % 2147483647 == 1)
7535                       ? 1 : -1];
7536 int
7537 main ()
7538 {
7539
7540   ;
7541   return 0;
7542 }
7543 _ACEOF
7544 rm -f conftest.$ac_objext
7545 if { (eval echo "$as_me:7545: \"$ac_compile\"") >&5
7546   (eval $ac_compile) 2>&5
7547   ac_status=$?
7548   echo "$as_me:7548: \$? = $ac_status" >&5
7549   (exit $ac_status); } &&
7550          { ac_try='test -s conftest.$ac_objext'
7551   { (eval echo "$as_me:7551: \"$ac_try\"") >&5
7552   (eval $ac_try) 2>&5
7553   ac_status=$?
7554   echo "$as_me:7554: \$? = $ac_status" >&5
7555   (exit $ac_status); }; }; then
7556   ac_cv_sys_file_offset_bits=64; break
7557 else
7558   echo "$as_me: failed program was:" >&5
7559 cat conftest.$ac_ext >&5
7560 fi
7561 rm -f conftest.$ac_objext conftest.$ac_ext
7562   break
7563 done
7564 fi
7565 echo "$as_me:7565: result: $ac_cv_sys_file_offset_bits" >&5
7566 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
7567 if test "$ac_cv_sys_file_offset_bits" != no; then
7568
7569 cat >>confdefs.h <<EOF
7570 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7571 EOF
7572
7573 fi
7574 rm -f conftest*
7575   echo "$as_me:7575: checking for _LARGE_FILES value needed for large files" >&5
7576 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
7577 if test "${ac_cv_sys_large_files+set}" = set; then
7578   echo $ECHO_N "(cached) $ECHO_C" >&6
7579 else
7580   while :; do
7581   ac_cv_sys_large_files=no
7582   cat >conftest.$ac_ext <<_ACEOF
7583 #line 7583 "configure"
7584 #include "confdefs.h"
7585 #include <sys/types.h>
7586  /* Check that off_t can represent 2**63 - 1 correctly.
7587     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7588     since some C++ compilers masquerading as C compilers
7589     incorrectly reject 9223372036854775807.  */
7590 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7591   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7592                        && LARGE_OFF_T % 2147483647 == 1)
7593                       ? 1 : -1];
7594 int
7595 main ()
7596 {
7597
7598   ;
7599   return 0;
7600 }
7601 _ACEOF
7602 rm -f conftest.$ac_objext
7603 if { (eval echo "$as_me:7603: \"$ac_compile\"") >&5
7604   (eval $ac_compile) 2>&5
7605   ac_status=$?
7606   echo "$as_me:7606: \$? = $ac_status" >&5
7607   (exit $ac_status); } &&
7608          { ac_try='test -s conftest.$ac_objext'
7609   { (eval echo "$as_me:7609: \"$ac_try\"") >&5
7610   (eval $ac_try) 2>&5
7611   ac_status=$?
7612   echo "$as_me:7612: \$? = $ac_status" >&5
7613   (exit $ac_status); }; }; then
7614   break
7615 else
7616   echo "$as_me: failed program was:" >&5
7617 cat conftest.$ac_ext >&5
7618 fi
7619 rm -f conftest.$ac_objext conftest.$ac_ext
7620   cat >conftest.$ac_ext <<_ACEOF
7621 #line 7621 "configure"
7622 #include "confdefs.h"
7623 #define _LARGE_FILES 1
7624 #include <sys/types.h>
7625  /* Check that off_t can represent 2**63 - 1 correctly.
7626     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7627     since some C++ compilers masquerading as C compilers
7628     incorrectly reject 9223372036854775807.  */
7629 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7630   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7631                        && LARGE_OFF_T % 2147483647 == 1)
7632                       ? 1 : -1];
7633 int
7634 main ()
7635 {
7636
7637   ;
7638   return 0;
7639 }
7640 _ACEOF
7641 rm -f conftest.$ac_objext
7642 if { (eval echo "$as_me:7642: \"$ac_compile\"") >&5
7643   (eval $ac_compile) 2>&5
7644   ac_status=$?
7645   echo "$as_me:7645: \$? = $ac_status" >&5
7646   (exit $ac_status); } &&
7647          { ac_try='test -s conftest.$ac_objext'
7648   { (eval echo "$as_me:7648: \"$ac_try\"") >&5
7649   (eval $ac_try) 2>&5
7650   ac_status=$?
7651   echo "$as_me:7651: \$? = $ac_status" >&5
7652   (exit $ac_status); }; }; then
7653   ac_cv_sys_large_files=1; break
7654 else
7655   echo "$as_me: failed program was:" >&5
7656 cat conftest.$ac_ext >&5
7657 fi
7658 rm -f conftest.$ac_objext conftest.$ac_ext
7659   break
7660 done
7661 fi
7662 echo "$as_me:7662: result: $ac_cv_sys_large_files" >&5
7663 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
7664 if test "$ac_cv_sys_large_files" != no; then
7665
7666 cat >>confdefs.h <<EOF
7667 #define _LARGE_FILES $ac_cv_sys_large_files
7668 EOF
7669
7670 fi
7671 rm -f conftest*
7672 fi
7673
7674     if test "$enable_largefile" != no ; then
7675         echo "$as_me:7675: checking for _LARGEFILE_SOURCE value needed for large files" >&5
7676 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
7677 if test "${ac_cv_sys_largefile_source+set}" = set; then
7678   echo $ECHO_N "(cached) $ECHO_C" >&6
7679 else
7680   while :; do
7681   ac_cv_sys_largefile_source=no
7682   cat >conftest.$ac_ext <<_ACEOF
7683 #line 7683 "configure"
7684 #include "confdefs.h"
7685 #include <stdio.h>
7686 int
7687 main ()
7688 {
7689 return !fseeko;
7690   ;
7691   return 0;
7692 }
7693 _ACEOF
7694 rm -f conftest.$ac_objext
7695 if { (eval echo "$as_me:7695: \"$ac_compile\"") >&5
7696   (eval $ac_compile) 2>&5
7697   ac_status=$?
7698   echo "$as_me:7698: \$? = $ac_status" >&5
7699   (exit $ac_status); } &&
7700          { ac_try='test -s conftest.$ac_objext'
7701   { (eval echo "$as_me:7701: \"$ac_try\"") >&5
7702   (eval $ac_try) 2>&5
7703   ac_status=$?
7704   echo "$as_me:7704: \$? = $ac_status" >&5
7705   (exit $ac_status); }; }; then
7706   break
7707 else
7708   echo "$as_me: failed program was:" >&5
7709 cat conftest.$ac_ext >&5
7710 fi
7711 rm -f conftest.$ac_objext conftest.$ac_ext
7712   cat >conftest.$ac_ext <<_ACEOF
7713 #line 7713 "configure"
7714 #include "confdefs.h"
7715 #define _LARGEFILE_SOURCE 1
7716 #include <stdio.h>
7717 int
7718 main ()
7719 {
7720 return !fseeko;
7721   ;
7722   return 0;
7723 }
7724 _ACEOF
7725 rm -f conftest.$ac_objext
7726 if { (eval echo "$as_me:7726: \"$ac_compile\"") >&5
7727   (eval $ac_compile) 2>&5
7728   ac_status=$?
7729   echo "$as_me:7729: \$? = $ac_status" >&5
7730   (exit $ac_status); } &&
7731          { ac_try='test -s conftest.$ac_objext'
7732   { (eval echo "$as_me:7732: \"$ac_try\"") >&5
7733   (eval $ac_try) 2>&5
7734   ac_status=$?
7735   echo "$as_me:7735: \$? = $ac_status" >&5
7736   (exit $ac_status); }; }; then
7737   ac_cv_sys_largefile_source=1; break
7738 else
7739   echo "$as_me: failed program was:" >&5
7740 cat conftest.$ac_ext >&5
7741 fi
7742 rm -f conftest.$ac_objext conftest.$ac_ext
7743   break
7744 done
7745 fi
7746 echo "$as_me:7746: result: $ac_cv_sys_largefile_source" >&5
7747 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
7748 if test "$ac_cv_sys_largefile_source" != no; then
7749
7750 cat >>confdefs.h <<EOF
7751 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
7752 EOF
7753
7754 fi
7755 rm -f conftest*
7756
7757 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
7758 # in glibc 2.1.3, but that breaks too many other things.
7759 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
7760 echo "$as_me:7760: checking for fseeko" >&5
7761 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
7762 if test "${ac_cv_func_fseeko+set}" = set; then
7763   echo $ECHO_N "(cached) $ECHO_C" >&6
7764 else
7765   cat >conftest.$ac_ext <<_ACEOF
7766 #line 7766 "configure"
7767 #include "confdefs.h"
7768 #include <stdio.h>
7769 int
7770 main ()
7771 {
7772 return fseeko && fseeko (stdin, 0, 0);
7773   ;
7774   return 0;
7775 }
7776 _ACEOF
7777 rm -f conftest.$ac_objext conftest$ac_exeext
7778 if { (eval echo "$as_me:7778: \"$ac_link\"") >&5
7779   (eval $ac_link) 2>&5
7780   ac_status=$?
7781   echo "$as_me:7781: \$? = $ac_status" >&5
7782   (exit $ac_status); } &&
7783          { ac_try='test -s conftest$ac_exeext'
7784   { (eval echo "$as_me:7784: \"$ac_try\"") >&5
7785   (eval $ac_try) 2>&5
7786   ac_status=$?
7787   echo "$as_me:7787: \$? = $ac_status" >&5
7788   (exit $ac_status); }; }; then
7789   ac_cv_func_fseeko=yes
7790 else
7791   echo "$as_me: failed program was:" >&5
7792 cat conftest.$ac_ext >&5
7793 ac_cv_func_fseeko=no
7794 fi
7795 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7796 fi
7797 echo "$as_me:7797: result: $ac_cv_func_fseeko" >&5
7798 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
7799 if test $ac_cv_func_fseeko = yes; then
7800
7801 cat >>confdefs.h <<\EOF
7802 #define HAVE_FSEEKO 1
7803 EOF
7804
7805 fi
7806
7807         # Normally we would collect these definitions in the config.h,
7808         # but (like _XOPEN_SOURCE), some environments rely on having these
7809         # defined before any of the system headers are included.  Another
7810         # case comes up with C++, e.g., on AIX the compiler compiles the
7811         # header files by themselves before looking at the body files it is
7812         # told to compile.  For ncurses, those header files do not include
7813         # the config.h
7814         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
7815         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
7816         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
7817
7818         echo "$as_me:7818: checking whether to use struct dirent64" >&5
7819 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
7820 if test "${cf_cv_struct_dirent64+set}" = set; then
7821   echo $ECHO_N "(cached) $ECHO_C" >&6
7822 else
7823
7824                 cat >conftest.$ac_ext <<_ACEOF
7825 #line 7825 "configure"
7826 #include "confdefs.h"
7827
7828 #include <sys/types.h>
7829 #include <dirent.h>
7830
7831 int
7832 main ()
7833 {
7834
7835                 /* if transitional largefile support is setup, this is true */
7836                 extern struct dirent64 * readdir(DIR *);
7837                 struct dirent64 *x = readdir((DIR *)0);
7838                 struct dirent *y = readdir((DIR *)0);
7839                 int z = x - y;
7840
7841   ;
7842   return 0;
7843 }
7844 _ACEOF
7845 rm -f conftest.$ac_objext
7846 if { (eval echo "$as_me:7846: \"$ac_compile\"") >&5
7847   (eval $ac_compile) 2>&5
7848   ac_status=$?
7849   echo "$as_me:7849: \$? = $ac_status" >&5
7850   (exit $ac_status); } &&
7851          { ac_try='test -s conftest.$ac_objext'
7852   { (eval echo "$as_me:7852: \"$ac_try\"") >&5
7853   (eval $ac_try) 2>&5
7854   ac_status=$?
7855   echo "$as_me:7855: \$? = $ac_status" >&5
7856   (exit $ac_status); }; }; then
7857   cf_cv_struct_dirent64=yes
7858 else
7859   echo "$as_me: failed program was:" >&5
7860 cat conftest.$ac_ext >&5
7861 cf_cv_struct_dirent64=no
7862 fi
7863 rm -f conftest.$ac_objext conftest.$ac_ext
7864
7865 fi
7866 echo "$as_me:7866: result: $cf_cv_struct_dirent64" >&5
7867 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
7868         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
7869 #define HAVE_STRUCT_DIRENT64 1
7870 EOF
7871
7872     fi
7873
7874 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
7875 echo "$as_me:7875: checking if you want tparm not to use X/Open fixed-parameter list" >&5
7876 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
7877
7878 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
7879 if test "${enable_tparm_varargs+set}" = set; then
7880   enableval="$enable_tparm_varargs"
7881   with_tparm_varargs=$enableval
7882 else
7883   with_tparm_varargs=yes
7884 fi;
7885 echo "$as_me:7885: result: $with_tparm_varargs" >&5
7886 echo "${ECHO_T}$with_tparm_varargs" >&6
7887 NCURSES_TPARM_VARARGS=0
7888 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
7889
7890 ###   use option --with-bool to override bool's type
7891 echo "$as_me:7891: checking for type of bool" >&5
7892 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
7893
7894 # Check whether --with-bool or --without-bool was given.
7895 if test "${with_bool+set}" = set; then
7896   withval="$with_bool"
7897   NCURSES_BOOL="$withval"
7898 else
7899   NCURSES_BOOL=auto
7900 fi;
7901 echo "$as_me:7901: result: $NCURSES_BOOL" >&5
7902 echo "${ECHO_T}$NCURSES_BOOL" >&6
7903
7904 echo "$as_me:7904: checking for alternate terminal capabilities file" >&5
7905 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
7906
7907 # Check whether --with-caps or --without-caps was given.
7908 if test "${with_caps+set}" = set; then
7909   withval="$with_caps"
7910   TERMINFO_CAPS=Caps.$withval
7911 else
7912   TERMINFO_CAPS=Caps
7913 fi;
7914 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
7915 echo "$as_me:7915: result: $TERMINFO_CAPS" >&5
7916 echo "${ECHO_T}$TERMINFO_CAPS" >&6
7917
7918 ###   use option --with-chtype to override chtype's type
7919 echo "$as_me:7919: checking for type of chtype" >&5
7920 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
7921
7922 # Check whether --with-chtype or --without-chtype was given.
7923 if test "${with_chtype+set}" = set; then
7924   withval="$with_chtype"
7925   NCURSES_CHTYPE="$withval"
7926 else
7927   NCURSES_CHTYPE=auto
7928 fi;
7929 echo "$as_me:7929: result: $NCURSES_CHTYPE" >&5
7930 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
7931
7932 ###   use option --with-ospeed to override ospeed's type
7933 echo "$as_me:7933: checking for type of ospeed" >&5
7934 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
7935
7936 # Check whether --with-ospeed or --without-ospeed was given.
7937 if test "${with_ospeed+set}" = set; then
7938   withval="$with_ospeed"
7939   NCURSES_OSPEED="$withval"
7940 else
7941   NCURSES_OSPEED=short
7942 fi;
7943 echo "$as_me:7943: result: $NCURSES_OSPEED" >&5
7944 echo "${ECHO_T}$NCURSES_OSPEED" >&6
7945
7946 ###   use option --with-mmask-t to override mmask_t's type
7947 echo "$as_me:7947: checking for type of mmask_t" >&5
7948 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
7949
7950 # Check whether --with-mmask-t or --without-mmask-t was given.
7951 if test "${with_mmask_t+set}" = set; then
7952   withval="$with_mmask_t"
7953   NCURSES_MMASK_T="$withval"
7954 else
7955   NCURSES_MMASK_T=auto
7956 fi;
7957 echo "$as_me:7957: result: $NCURSES_MMASK_T" >&5
7958 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
7959
7960 ### Enable compiling-in rcs id's
7961 echo "$as_me:7961: checking if RCS identifiers should be compiled-in" >&5
7962 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
7963
7964 # Check whether --with-rcs-ids or --without-rcs-ids was given.
7965 if test "${with_rcs_ids+set}" = set; then
7966   withval="$with_rcs_ids"
7967   with_rcs_ids=$withval
7968 else
7969   with_rcs_ids=no
7970 fi;
7971 echo "$as_me:7971: result: $with_rcs_ids" >&5
7972 echo "${ECHO_T}$with_rcs_ids" >&6
7973 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
7974 #define USE_RCS_IDS 1
7975 EOF
7976
7977 ###############################################################################
7978
7979 echo "$as_me:7979: checking format of man-pages" >&5
7980 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
7981
7982 # Check whether --with-manpage-format or --without-manpage-format was given.
7983 if test "${with_manpage_format+set}" = set; then
7984   withval="$with_manpage_format"
7985   MANPAGE_FORMAT=$withval
7986 else
7987   MANPAGE_FORMAT=unknown
7988 fi;
7989
7990 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
7991 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
7992
7993 cf_unknown=
7994
7995 case $MANPAGE_FORMAT in
7996 unknown)
7997   if test -z "$MANPATH" ; then
7998     MANPATH="/usr/man:/usr/share/man"
7999   fi
8000
8001   # look for the 'date' man-page (it's most likely to be installed!)
8002   MANPAGE_FORMAT=
8003   cf_preform=no
8004   cf_catonly=yes
8005   cf_example=date
8006
8007   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
8008   for cf_dir in $MANPATH; do
8009     test -z "$cf_dir" && cf_dir=/usr/man
8010     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
8011     do
8012       cf_test=`echo $cf_name | sed -e 's/*//'`
8013       if test "x$cf_test" = "x$cf_name" ; then
8014
8015         case "$cf_name" in
8016         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
8017         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
8018         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
8019         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
8020         esac
8021
8022         case "$cf_name" in
8023         $cf_dir/man*)
8024           cf_catonly=no
8025           ;;
8026         $cf_dir/cat*)
8027           cf_preform=yes
8028           ;;
8029         esac
8030         break
8031       fi
8032
8033       # if we found a match in either man* or cat*, stop looking
8034       if test -n "$MANPAGE_FORMAT" ; then
8035         cf_found=no
8036         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
8037         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
8038         case "$cf_name" in
8039         $cf_dir/cat*)
8040           cf_found=yes
8041           ;;
8042         esac
8043         test $cf_found=yes && break
8044       fi
8045     done
8046     # only check the first directory in $MANPATH where we find manpages
8047     if test -n "$MANPAGE_FORMAT" ; then
8048        break
8049     fi
8050   done
8051   # if we did not find the example, just assume it is normal
8052   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
8053   IFS="$ac_save_ifs"
8054   ;;
8055 *)
8056   for cf_option in $MANPAGE_FORMAT; do
8057      case $cf_option in #(vi
8058      gzip|compress|BSDI|normal|formatted|catonly)
8059        ;;
8060      *)
8061        cf_unknown="$cf_unknown $cf_option"
8062        ;;
8063      esac
8064   done
8065   ;;
8066 esac
8067
8068 echo "$as_me:8068: result: $MANPAGE_FORMAT" >&5
8069 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
8070 if test -n "$cf_unknown" ; then
8071   { echo "$as_me:8071: WARNING: Unexpected manpage-format $cf_unknown" >&5
8072 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
8073 fi
8074
8075 echo "$as_me:8075: checking for manpage renaming" >&5
8076 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
8077
8078 # Check whether --with-manpage-renames or --without-manpage-renames was given.
8079 if test "${with_manpage_renames+set}" = set; then
8080   withval="$with_manpage_renames"
8081   MANPAGE_RENAMES=$withval
8082 else
8083   MANPAGE_RENAMES=yes
8084 fi;
8085
8086 case ".$MANPAGE_RENAMES" in #(vi
8087 .no) #(vi
8088   ;;
8089 .|.yes)
8090   # Debian 'man' program?
8091   if test -f /etc/debian_version ; then
8092     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
8093   else
8094     MANPAGE_RENAMES=no
8095   fi
8096   ;;
8097 esac
8098
8099 if test "$MANPAGE_RENAMES" != no ; then
8100   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
8101     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
8102   elif test ! -f $MANPAGE_RENAMES ; then
8103     { { echo "$as_me:8103: error: not a filename: $MANPAGE_RENAMES" >&5
8104 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
8105    { (exit 1); exit 1; }; }
8106   fi
8107
8108   test ! -d man && mkdir man
8109
8110   # Construct a sed-script to perform renaming within man-pages
8111   if test -n "$MANPAGE_RENAMES" ; then
8112     test ! -d man && mkdir man
8113     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
8114   fi
8115 fi
8116
8117 echo "$as_me:8117: result: $MANPAGE_RENAMES" >&5
8118 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
8119
8120 echo "$as_me:8120: checking if manpage aliases will be installed" >&5
8121 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
8122
8123 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
8124 if test "${with_manpage_aliases+set}" = set; then
8125   withval="$with_manpage_aliases"
8126   MANPAGE_ALIASES=$withval
8127 else
8128   MANPAGE_ALIASES=yes
8129 fi;
8130
8131 echo "$as_me:8131: result: $MANPAGE_ALIASES" >&5
8132 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
8133
8134 if test "$LN_S" = "ln -s"; then
8135         cf_use_symlinks=yes
8136 else
8137         cf_use_symlinks=no
8138 fi
8139
8140 MANPAGE_SYMLINKS=no
8141 if test "$MANPAGE_ALIASES" = yes ; then
8142 echo "$as_me:8142: checking if manpage symlinks should be used" >&5
8143 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
8144
8145 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
8146 if test "${with_manpage_symlinks+set}" = set; then
8147   withval="$with_manpage_symlinks"
8148   MANPAGE_SYMLINKS=$withval
8149 else
8150   MANPAGE_SYMLINKS=$cf_use_symlinks
8151 fi;
8152
8153 if test "$$cf_use_symlinks" = no; then
8154 if test "$MANPAGE_SYMLINKS" = yes ; then
8155         { echo "$as_me:8155: WARNING: cannot make symlinks" >&5
8156 echo "$as_me: WARNING: cannot make symlinks" >&2;}
8157         MANPAGE_SYMLINKS=no
8158 fi
8159 fi
8160
8161 echo "$as_me:8161: result: $MANPAGE_SYMLINKS" >&5
8162 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
8163 fi
8164
8165 echo "$as_me:8165: checking for manpage tbl" >&5
8166 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
8167
8168 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
8169 if test "${with_manpage_tbl+set}" = set; then
8170   withval="$with_manpage_tbl"
8171   MANPAGE_TBL=$withval
8172 else
8173   MANPAGE_TBL=no
8174 fi;
8175
8176 echo "$as_me:8176: result: $MANPAGE_TBL" >&5
8177 echo "${ECHO_T}$MANPAGE_TBL" >&6
8178
8179   if test "$prefix" = "NONE" ; then
8180      cf_prefix="$ac_default_prefix"
8181   else
8182      cf_prefix="$prefix"
8183   fi
8184
8185   case "$MANPAGE_FORMAT" in # (vi
8186   *catonly*) # (vi
8187     cf_format=yes
8188     cf_inboth=no
8189     ;;
8190   *formatted*) # (vi
8191     cf_format=yes
8192     cf_inboth=yes
8193     ;;
8194   *)
8195     cf_format=no
8196     cf_inboth=no
8197     ;;
8198   esac
8199
8200 test ! -d man && mkdir man
8201
8202 cf_so_strip=
8203 cf_compress=
8204 case "$MANPAGE_FORMAT" in #(vi
8205 *compress*) #(vi
8206         cf_so_strip="Z"
8207         cf_compress=compress
8208   ;;
8209 *gzip*) #(vi
8210         cf_so_strip="gz"
8211         cf_compress=gzip
8212   ;;
8213 esac
8214
8215 cf_edit_man=./edit_man.sh
8216 cf_man_alias=`pwd`/man_alias.sed
8217
8218 cat >$cf_edit_man <<CF_EOF
8219 #! /bin/sh
8220 # this script is generated by the configure-script CF_MAN_PAGES macro.
8221
8222 prefix="$cf_prefix"
8223 datadir="$datadir"
8224
8225 NCURSES_MAJOR="$NCURSES_MAJOR"
8226 NCURSES_MINOR="$NCURSES_MINOR"
8227 NCURSES_PATCH="$NCURSES_PATCH"
8228
8229 NCURSES_OSPEED="$NCURSES_OSPEED"
8230 TERMINFO="$TERMINFO"
8231
8232 MKDIRS="sh `cd $srcdir && pwd`/mkdirs.sh"
8233
8234 INSTALL="$INSTALL"
8235 INSTALL_DATA="$INSTALL_DATA"
8236
8237 transform="$program_transform_name"
8238
8239 TMP=\${TMPDIR-/tmp}/man\$\$
8240 trap "rm -f \$TMP" 0 1 2 5 15
8241
8242 form=\$1
8243 shift || exit 1
8244
8245 verb=\$1
8246 shift || exit 1
8247
8248 mandir=\$1
8249 shift || exit 1
8250
8251 srcdir=\$1
8252 top_srcdir=\$srcdir/..
8253 shift || exit 1
8254
8255 if test "\$form" = normal ; then
8256         if test "$cf_format" = yes ; then
8257         if test "$cf_inboth" = no ; then
8258                 sh \$0 format \$verb \$mandir \$srcdir \$*
8259                 exit $?
8260         fi
8261         fi
8262         cf_subdir=\$mandir/man
8263         cf_tables=$MANPAGE_TBL
8264 else
8265         cf_subdir=\$mandir/cat
8266         cf_tables=yes
8267 fi
8268
8269 # process the list of source-files
8270 for i in \$* ; do
8271 case \$i in #(vi
8272 *.orig|*.rej) ;; #(vi
8273 *.[0-9]*)
8274         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
8275         if test \$verb = installing ; then
8276         if test ! -d \$cf_subdir\${section} ; then
8277                 \$MKDIRS \$cf_subdir\$section
8278         fi
8279         fi
8280
8281         # replace variables in man page
8282         if test ! -f $cf_man_alias ; then
8283 cat >>$cf_man_alias <<-CF_EOF2
8284                 s,@DATADIR@,\$datadir,g
8285                 s,@TERMINFO@,\$TERMINFO,g
8286                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
8287                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
8288                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
8289                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
8290 CF_EOF
8291
8292         for cf_name in  captoinfo clear infocmp infotocap tic toe tput
8293         do
8294                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8295                 cf_name=`echo $cf_name|sed "$program_transform_name"`
8296 cat >>$cf_edit_man <<-CF_EOF
8297                 s,@$cf_NAME@,$cf_name,
8298 CF_EOF
8299         done
8300
8301 cat >>$cf_edit_man <<CF_EOF
8302 CF_EOF2
8303                 echo "...made $cf_man_alias"
8304         fi
8305
8306         aliases=
8307         cf_source=\`basename \$i\`
8308         inalias=\$cf_source
8309         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
8310         if test ! -f \$inalias ; then
8311                 echo .. skipped \$cf_source
8312                 continue
8313         fi
8314 CF_EOF
8315
8316 if test "$MANPAGE_ALIASES" != no ; then
8317 cat >>$cf_edit_man <<CF_EOF
8318         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
8319 CF_EOF
8320 fi
8321
8322 if test "$MANPAGE_RENAMES" = no ; then
8323 cat >>$cf_edit_man <<CF_EOF
8324         # perform program transformations for section 1 man pages
8325         if test \$section = 1 ; then
8326                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
8327         else
8328                 cf_target=\$cf_subdir\${section}/\$cf_source
8329         fi
8330 CF_EOF
8331 else
8332 cat >>$cf_edit_man <<CF_EOF
8333         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
8334         if test -z "\$cf_target" ; then
8335                 echo '? missing rename for '\$cf_source
8336                 cf_target="\$cf_source"
8337         fi
8338         cf_target="\$cf_subdir\${section}/\${cf_target}"
8339
8340 CF_EOF
8341 fi
8342
8343 cat >>$cf_edit_man <<CF_EOF
8344         sed     -f $cf_man_alias \\
8345 CF_EOF
8346
8347 if test -f $MANPAGE_RENAMES ; then
8348 cat >>$cf_edit_man <<CF_EOF
8349                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
8350 CF_EOF
8351 else
8352 cat >>$cf_edit_man <<CF_EOF
8353                 < \$i >\$TMP
8354 CF_EOF
8355 fi
8356
8357 cat >>$cf_edit_man <<CF_EOF
8358 if test \$cf_tables = yes ; then
8359         tbl \$TMP >\$TMP.out
8360         mv \$TMP.out \$TMP
8361 fi
8362 CF_EOF
8363
8364 if test $with_curses_h != yes ; then
8365 cat >>$cf_edit_man <<CF_EOF
8366         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
8367         mv \$TMP.out \$TMP
8368 CF_EOF
8369 fi
8370
8371 cat >>$cf_edit_man <<CF_EOF
8372         if test \$form = format ; then
8373                 nroff -man \$TMP >\$TMP.out
8374                 mv \$TMP.out \$TMP
8375         fi
8376 CF_EOF
8377
8378 if test -n "$cf_compress" ; then
8379 cat >>$cf_edit_man <<CF_EOF
8380         if test \$verb = installing ; then
8381         if ( $cf_compress -f \$TMP )
8382         then
8383                 mv \$TMP.$cf_so_strip \$TMP
8384         fi
8385         fi
8386         cf_target="\$cf_target.$cf_so_strip"
8387 CF_EOF
8388 fi
8389
8390 case "$MANPAGE_FORMAT" in #(vi
8391 *BSDI*)
8392 cat >>$cf_edit_man <<CF_EOF
8393         if test \$form = format ; then
8394                 # BSDI installs only .0 suffixes in the cat directories
8395                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
8396         fi
8397 CF_EOF
8398   ;;
8399 esac
8400
8401 cat >>$cf_edit_man <<CF_EOF
8402         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
8403         if test \$verb = installing ; then
8404                 echo \$verb \$cf_target
8405                 \$INSTALL_DATA \$TMP \$cf_target
8406                 test -d \$cf_subdir\${section} &&
8407                 test -n "\$aliases" && (
8408                         cd \$cf_subdir\${section} && (
8409                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
8410                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
8411                                 cf_target=\`basename \$cf_target\`
8412                                 for cf_alias in \$aliases
8413                                 do
8414                                         if test \$section = 1 ; then
8415                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8416                                         fi
8417
8418                                         if test "$MANPAGE_SYMLINKS" = yes ; then
8419                                                 if test -f \$cf_alias\${suffix} ; then
8420                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
8421                                                         then
8422                                                                 continue
8423                                                         fi
8424                                                 fi
8425                                                 echo .. \$verb alias \$cf_alias\${suffix}
8426                                                 rm -f \$cf_alias\${suffix}
8427                                                 $LN_S \$cf_target \$cf_alias\${suffix}
8428                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
8429                                                 echo ".so \$cf_source" >\$TMP
8430 CF_EOF
8431 if test -n "$cf_compress" ; then
8432 cat >>$cf_edit_man <<CF_EOF
8433                                                 if test -n "$cf_so_strip" ; then
8434                                                         $cf_compress -f \$TMP
8435                                                         mv \$TMP.$cf_so_strip \$TMP
8436                                                 fi
8437 CF_EOF
8438 fi
8439 cat >>$cf_edit_man <<CF_EOF
8440                                                 echo .. \$verb alias \$cf_alias\${suffix}
8441                                                 rm -f \$cf_alias\${suffix}
8442                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
8443                                         fi
8444                                 done
8445                         )
8446                 )
8447         elif test \$verb = removing ; then
8448                 test -f \$cf_target && (
8449                         echo \$verb \$cf_target
8450                         rm -f \$cf_target
8451                 )
8452                 test -d \$cf_subdir\${section} &&
8453                 test -n "\$aliases" && (
8454                         cd \$cf_subdir\${section} && (
8455                                 for cf_alias in \$aliases
8456                                 do
8457                                         if test \$section = 1 ; then
8458                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8459                                         fi
8460
8461                                         echo .. \$verb alias \$cf_alias\${suffix}
8462                                         rm -f \$cf_alias\${suffix}
8463                                 done
8464                         )
8465                 )
8466         else
8467 #               echo ".hy 0"
8468                 cat \$TMP
8469         fi
8470         ;;
8471 esac
8472 done
8473
8474 if test $cf_inboth = yes ; then
8475 if test \$form != format ; then
8476         sh \$0 format \$verb \$mandir \$srcdir \$*
8477 fi
8478 fi
8479
8480 exit 0
8481 CF_EOF
8482 chmod 755 $cf_edit_man
8483
8484 ###############################################################################
8485
8486 ### Note that some functions (such as const) are normally disabled anyway.
8487 echo "$as_me:8487: checking if you want to build with function extensions" >&5
8488 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
8489
8490 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
8491 if test "${enable_ext_funcs+set}" = set; then
8492   enableval="$enable_ext_funcs"
8493   with_ext_funcs=$enableval
8494 else
8495   with_ext_funcs=yes
8496 fi;
8497 echo "$as_me:8497: result: $with_ext_funcs" >&5
8498 echo "${ECHO_T}$with_ext_funcs" >&6
8499 if test "$with_ext_funcs" = yes ; then
8500         NCURSES_EXT_FUNCS=1
8501         cat >>confdefs.h <<\EOF
8502 #define HAVE_CURSES_VERSION 1
8503 EOF
8504
8505         cat >>confdefs.h <<\EOF
8506 #define HAVE_HAS_KEY 1
8507 EOF
8508
8509         cat >>confdefs.h <<\EOF
8510 #define HAVE_RESIZETERM 1
8511 EOF
8512
8513         cat >>confdefs.h <<\EOF
8514 #define HAVE_RESIZE_TERM 1
8515 EOF
8516
8517         cat >>confdefs.h <<\EOF
8518 #define HAVE_USE_DEFAULT_COLORS 1
8519 EOF
8520
8521         cat >>confdefs.h <<\EOF
8522 #define HAVE_WRESIZE 1
8523 EOF
8524
8525         cat >>confdefs.h <<\EOF
8526 #define NCURSES_EXT_FUNCS 1
8527 EOF
8528
8529 else
8530         NCURSES_EXT_FUNCS=0
8531 fi
8532
8533 ###   use option --enable-const to turn on use of const beyond that in XSI.
8534 echo "$as_me:8534: checking for extended use of const keyword" >&5
8535 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
8536
8537 # Check whether --enable-const or --disable-const was given.
8538 if test "${enable_const+set}" = set; then
8539   enableval="$enable_const"
8540   with_ext_const=$enableval
8541 else
8542   with_ext_const=no
8543 fi;
8544 echo "$as_me:8544: result: $with_ext_const" >&5
8545 echo "${ECHO_T}$with_ext_const" >&6
8546 NCURSES_CONST='/*nothing*/'
8547 if test "$with_ext_const" = yes ; then
8548         NCURSES_CONST=const
8549 fi
8550
8551 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
8552 echo "$as_me:8552: checking if you want to use extended colors" >&5
8553 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
8554
8555 # Check whether --enable-ext-colors or --disable-ext-colors was given.
8556 if test "${enable_ext_colors+set}" = set; then
8557   enableval="$enable_ext_colors"
8558   with_ext_colors=$enableval
8559 else
8560   with_ext_colors=no
8561 fi;
8562 echo "$as_me:8562: result: $with_ext_colors" >&5
8563 echo "${ECHO_T}$with_ext_colors" >&6
8564 NCURSES_EXT_COLORS=0
8565 if test "$with_ext_colors" = yes ; then
8566         if test "$with_widec" != yes ; then
8567                 { { echo "$as_me:8567: error: This option applies only to wide-character library" >&5
8568 echo "$as_me: error: This option applies only to wide-character library" >&2;}
8569    { (exit 1); exit 1; }; }
8570         else
8571                 # cannot be ABI 5 since it changes sizeof(cchar_t)
8572
8573 if test "${with_abi_version+set}" != set; then
8574         case $cf_cv_rel_version in
8575         5.*)
8576                 cf_cv_rel_version=6.0
8577                 cf_cv_abi_version=6
8578                 { echo "$as_me:8578: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
8579 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
8580                 ;;
8581         esac
8582 fi
8583
8584         fi
8585         NCURSES_EXT_COLORS=1
8586         cat >>confdefs.h <<\EOF
8587 #define NCURSES_EXT_COLORS 1
8588 EOF
8589
8590 fi
8591
8592 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
8593 echo "$as_me:8593: checking if you want to use extended mouse encoding" >&5
8594 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
8595
8596 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
8597 if test "${enable_ext_mouse+set}" = set; then
8598   enableval="$enable_ext_mouse"
8599   with_ext_mouse=$enableval
8600 else
8601   with_ext_mouse=no
8602 fi;
8603 echo "$as_me:8603: result: $with_ext_mouse" >&5
8604 echo "${ECHO_T}$with_ext_mouse" >&6
8605 NCURSES_MOUSE_VERSION=1
8606 if test "$with_ext_mouse" = yes ; then
8607         NCURSES_MOUSE_VERSION=2
8608
8609 if test "${with_abi_version+set}" != set; then
8610         case $cf_cv_rel_version in
8611         5.*)
8612                 cf_cv_rel_version=6.0
8613                 cf_cv_abi_version=6
8614                 { echo "$as_me:8614: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
8615 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
8616                 ;;
8617         esac
8618 fi
8619
8620 fi
8621
8622 echo "$as_me:8622: checking if you want \$NCURSES_NO_PADDING code" >&5
8623 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
8624
8625 # Check whether --enable-no-padding or --disable-no-padding was given.
8626 if test "${enable_no_padding+set}" = set; then
8627   enableval="$enable_no_padding"
8628   with_no_padding=$enableval
8629 else
8630   with_no_padding=$with_ext_funcs
8631 fi;
8632 echo "$as_me:8632: result: $with_no_padding" >&5
8633 echo "${ECHO_T}$with_no_padding" >&6
8634 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
8635 #define NCURSES_NO_PADDING 1
8636 EOF
8637
8638 echo "$as_me:8638: checking for ANSI C header files" >&5
8639 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
8640 if test "${ac_cv_header_stdc+set}" = set; then
8641   echo $ECHO_N "(cached) $ECHO_C" >&6
8642 else
8643   cat >conftest.$ac_ext <<_ACEOF
8644 #line 8644 "configure"
8645 #include "confdefs.h"
8646 #include <stdlib.h>
8647 #include <stdarg.h>
8648 #include <string.h>
8649 #include <float.h>
8650
8651 _ACEOF
8652 if { (eval echo "$as_me:8652: \"$ac_cpp conftest.$ac_ext\"") >&5
8653   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8654   ac_status=$?
8655   egrep -v '^ *\+' conftest.er1 >conftest.err
8656   rm -f conftest.er1
8657   cat conftest.err >&5
8658   echo "$as_me:8658: \$? = $ac_status" >&5
8659   (exit $ac_status); } >/dev/null; then
8660   if test -s conftest.err; then
8661     ac_cpp_err=$ac_c_preproc_warn_flag
8662   else
8663     ac_cpp_err=
8664   fi
8665 else
8666   ac_cpp_err=yes
8667 fi
8668 if test -z "$ac_cpp_err"; then
8669   ac_cv_header_stdc=yes
8670 else
8671   echo "$as_me: failed program was:" >&5
8672   cat conftest.$ac_ext >&5
8673   ac_cv_header_stdc=no
8674 fi
8675 rm -f conftest.err conftest.$ac_ext
8676
8677 if test $ac_cv_header_stdc = yes; then
8678   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8679   cat >conftest.$ac_ext <<_ACEOF
8680 #line 8680 "configure"
8681 #include "confdefs.h"
8682 #include <string.h>
8683
8684 _ACEOF
8685 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8686   egrep "memchr" >/dev/null 2>&1; then
8687   :
8688 else
8689   ac_cv_header_stdc=no
8690 fi
8691 rm -f conftest*
8692
8693 fi
8694
8695 if test $ac_cv_header_stdc = yes; then
8696   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8697   cat >conftest.$ac_ext <<_ACEOF
8698 #line 8698 "configure"
8699 #include "confdefs.h"
8700 #include <stdlib.h>
8701
8702 _ACEOF
8703 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8704   egrep "free" >/dev/null 2>&1; then
8705   :
8706 else
8707   ac_cv_header_stdc=no
8708 fi
8709 rm -f conftest*
8710
8711 fi
8712
8713 if test $ac_cv_header_stdc = yes; then
8714   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8715   if test "$cross_compiling" = yes; then
8716   :
8717 else
8718   cat >conftest.$ac_ext <<_ACEOF
8719 #line 8719 "configure"
8720 #include "confdefs.h"
8721 #include <ctype.h>
8722 #if ((' ' & 0x0FF) == 0x020)
8723 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8724 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8725 #else
8726 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8727                      || ('j' <= (c) && (c) <= 'r') \
8728                      || ('s' <= (c) && (c) <= 'z'))
8729 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8730 #endif
8731
8732 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8733 int
8734 main ()
8735 {
8736   int i;
8737   for (i = 0; i < 256; i++)
8738     if (XOR (islower (i), ISLOWER (i))
8739         || toupper (i) != TOUPPER (i))
8740       $ac_main_return(2);
8741   $ac_main_return (0);
8742 }
8743 _ACEOF
8744 rm -f conftest$ac_exeext
8745 if { (eval echo "$as_me:8745: \"$ac_link\"") >&5
8746   (eval $ac_link) 2>&5
8747   ac_status=$?
8748   echo "$as_me:8748: \$? = $ac_status" >&5
8749   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8750   { (eval echo "$as_me:8750: \"$ac_try\"") >&5
8751   (eval $ac_try) 2>&5
8752   ac_status=$?
8753   echo "$as_me:8753: \$? = $ac_status" >&5
8754   (exit $ac_status); }; }; then
8755   :
8756 else
8757   echo "$as_me: program exited with status $ac_status" >&5
8758 echo "$as_me: failed program was:" >&5
8759 cat conftest.$ac_ext >&5
8760 ac_cv_header_stdc=no
8761 fi
8762 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8763 fi
8764 fi
8765 fi
8766 echo "$as_me:8766: result: $ac_cv_header_stdc" >&5
8767 echo "${ECHO_T}$ac_cv_header_stdc" >&6
8768 if test $ac_cv_header_stdc = yes; then
8769
8770 cat >>confdefs.h <<\EOF
8771 #define STDC_HEADERS 1
8772 EOF
8773
8774 fi
8775
8776 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8777
8778 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8779                   inttypes.h stdint.h unistd.h
8780 do
8781 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8782 echo "$as_me:8782: checking for $ac_header" >&5
8783 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8784 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8785   echo $ECHO_N "(cached) $ECHO_C" >&6
8786 else
8787   cat >conftest.$ac_ext <<_ACEOF
8788 #line 8788 "configure"
8789 #include "confdefs.h"
8790 $ac_includes_default
8791 #include <$ac_header>
8792 _ACEOF
8793 rm -f conftest.$ac_objext
8794 if { (eval echo "$as_me:8794: \"$ac_compile\"") >&5
8795   (eval $ac_compile) 2>&5
8796   ac_status=$?
8797   echo "$as_me:8797: \$? = $ac_status" >&5
8798   (exit $ac_status); } &&
8799          { ac_try='test -s conftest.$ac_objext'
8800   { (eval echo "$as_me:8800: \"$ac_try\"") >&5
8801   (eval $ac_try) 2>&5
8802   ac_status=$?
8803   echo "$as_me:8803: \$? = $ac_status" >&5
8804   (exit $ac_status); }; }; then
8805   eval "$as_ac_Header=yes"
8806 else
8807   echo "$as_me: failed program was:" >&5
8808 cat conftest.$ac_ext >&5
8809 eval "$as_ac_Header=no"
8810 fi
8811 rm -f conftest.$ac_objext conftest.$ac_ext
8812 fi
8813 echo "$as_me:8813: result: `eval echo '${'$as_ac_Header'}'`" >&5
8814 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8815 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8816   cat >>confdefs.h <<EOF
8817 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8818 EOF
8819
8820 fi
8821 done
8822
8823 echo "$as_me:8823: checking for signed char" >&5
8824 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
8825 if test "${ac_cv_type_signed_char+set}" = set; then
8826   echo $ECHO_N "(cached) $ECHO_C" >&6
8827 else
8828   cat >conftest.$ac_ext <<_ACEOF
8829 #line 8829 "configure"
8830 #include "confdefs.h"
8831 $ac_includes_default
8832 int
8833 main ()
8834 {
8835 if ((signed char *) 0)
8836   return 0;
8837 if (sizeof (signed char))
8838   return 0;
8839   ;
8840   return 0;
8841 }
8842 _ACEOF
8843 rm -f conftest.$ac_objext
8844 if { (eval echo "$as_me:8844: \"$ac_compile\"") >&5
8845   (eval $ac_compile) 2>&5
8846   ac_status=$?
8847   echo "$as_me:8847: \$? = $ac_status" >&5
8848   (exit $ac_status); } &&
8849          { ac_try='test -s conftest.$ac_objext'
8850   { (eval echo "$as_me:8850: \"$ac_try\"") >&5
8851   (eval $ac_try) 2>&5
8852   ac_status=$?
8853   echo "$as_me:8853: \$? = $ac_status" >&5
8854   (exit $ac_status); }; }; then
8855   ac_cv_type_signed_char=yes
8856 else
8857   echo "$as_me: failed program was:" >&5
8858 cat conftest.$ac_ext >&5
8859 ac_cv_type_signed_char=no
8860 fi
8861 rm -f conftest.$ac_objext conftest.$ac_ext
8862 fi
8863 echo "$as_me:8863: result: $ac_cv_type_signed_char" >&5
8864 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
8865
8866 echo "$as_me:8866: checking size of signed char" >&5
8867 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
8868 if test "${ac_cv_sizeof_signed_char+set}" = set; then
8869   echo $ECHO_N "(cached) $ECHO_C" >&6
8870 else
8871   if test "$ac_cv_type_signed_char" = yes; then
8872   if test "$cross_compiling" = yes; then
8873   # Depending upon the size, compute the lo and hi bounds.
8874 cat >conftest.$ac_ext <<_ACEOF
8875 #line 8875 "configure"
8876 #include "confdefs.h"
8877 $ac_includes_default
8878 int
8879 main ()
8880 {
8881 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
8882   ;
8883   return 0;
8884 }
8885 _ACEOF
8886 rm -f conftest.$ac_objext
8887 if { (eval echo "$as_me:8887: \"$ac_compile\"") >&5
8888   (eval $ac_compile) 2>&5
8889   ac_status=$?
8890   echo "$as_me:8890: \$? = $ac_status" >&5
8891   (exit $ac_status); } &&
8892          { ac_try='test -s conftest.$ac_objext'
8893   { (eval echo "$as_me:8893: \"$ac_try\"") >&5
8894   (eval $ac_try) 2>&5
8895   ac_status=$?
8896   echo "$as_me:8896: \$? = $ac_status" >&5
8897   (exit $ac_status); }; }; then
8898   ac_lo=0 ac_mid=0
8899   while :; do
8900     cat >conftest.$ac_ext <<_ACEOF
8901 #line 8901 "configure"
8902 #include "confdefs.h"
8903 $ac_includes_default
8904 int
8905 main ()
8906 {
8907 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8908   ;
8909   return 0;
8910 }
8911 _ACEOF
8912 rm -f conftest.$ac_objext
8913 if { (eval echo "$as_me:8913: \"$ac_compile\"") >&5
8914   (eval $ac_compile) 2>&5
8915   ac_status=$?
8916   echo "$as_me:8916: \$? = $ac_status" >&5
8917   (exit $ac_status); } &&
8918          { ac_try='test -s conftest.$ac_objext'
8919   { (eval echo "$as_me:8919: \"$ac_try\"") >&5
8920   (eval $ac_try) 2>&5
8921   ac_status=$?
8922   echo "$as_me:8922: \$? = $ac_status" >&5
8923   (exit $ac_status); }; }; then
8924   ac_hi=$ac_mid; break
8925 else
8926   echo "$as_me: failed program was:" >&5
8927 cat conftest.$ac_ext >&5
8928 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
8929 fi
8930 rm -f conftest.$ac_objext conftest.$ac_ext
8931   done
8932 else
8933   echo "$as_me: failed program was:" >&5
8934 cat conftest.$ac_ext >&5
8935 ac_hi=-1 ac_mid=-1
8936   while :; do
8937     cat >conftest.$ac_ext <<_ACEOF
8938 #line 8938 "configure"
8939 #include "confdefs.h"
8940 $ac_includes_default
8941 int
8942 main ()
8943 {
8944 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
8945   ;
8946   return 0;
8947 }
8948 _ACEOF
8949 rm -f conftest.$ac_objext
8950 if { (eval echo "$as_me:8950: \"$ac_compile\"") >&5
8951   (eval $ac_compile) 2>&5
8952   ac_status=$?
8953   echo "$as_me:8953: \$? = $ac_status" >&5
8954   (exit $ac_status); } &&
8955          { ac_try='test -s conftest.$ac_objext'
8956   { (eval echo "$as_me:8956: \"$ac_try\"") >&5
8957   (eval $ac_try) 2>&5
8958   ac_status=$?
8959   echo "$as_me:8959: \$? = $ac_status" >&5
8960   (exit $ac_status); }; }; then
8961   ac_lo=$ac_mid; break
8962 else
8963   echo "$as_me: failed program was:" >&5
8964 cat conftest.$ac_ext >&5
8965 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
8966 fi
8967 rm -f conftest.$ac_objext conftest.$ac_ext
8968   done
8969 fi
8970 rm -f conftest.$ac_objext conftest.$ac_ext
8971 # Binary search between lo and hi bounds.
8972 while test "x$ac_lo" != "x$ac_hi"; do
8973   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8974   cat >conftest.$ac_ext <<_ACEOF
8975 #line 8975 "configure"
8976 #include "confdefs.h"
8977 $ac_includes_default
8978 int
8979 main ()
8980 {
8981 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8982   ;
8983   return 0;
8984 }
8985 _ACEOF
8986 rm -f conftest.$ac_objext
8987 if { (eval echo "$as_me:8987: \"$ac_compile\"") >&5
8988   (eval $ac_compile) 2>&5
8989   ac_status=$?
8990   echo "$as_me:8990: \$? = $ac_status" >&5
8991   (exit $ac_status); } &&
8992          { ac_try='test -s conftest.$ac_objext'
8993   { (eval echo "$as_me:8993: \"$ac_try\"") >&5
8994   (eval $ac_try) 2>&5
8995   ac_status=$?
8996   echo "$as_me:8996: \$? = $ac_status" >&5
8997   (exit $ac_status); }; }; then
8998   ac_hi=$ac_mid
8999 else
9000   echo "$as_me: failed program was:" >&5
9001 cat conftest.$ac_ext >&5
9002 ac_lo=`expr $ac_mid + 1`
9003 fi
9004 rm -f conftest.$ac_objext conftest.$ac_ext
9005 done
9006 ac_cv_sizeof_signed_char=$ac_lo
9007 else
9008   if test "$cross_compiling" = yes; then
9009   { { echo "$as_me:9009: error: cannot run test program while cross compiling" >&5
9010 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
9011    { (exit 1); exit 1; }; }
9012 else
9013   cat >conftest.$ac_ext <<_ACEOF
9014 #line 9014 "configure"
9015 #include "confdefs.h"
9016 $ac_includes_default
9017 int
9018 main ()
9019 {
9020 FILE *f = fopen ("conftest.val", "w");
9021 if (!f)
9022   $ac_main_return (1);
9023 fprintf (f, "%d", (sizeof (signed char)));
9024 fclose (f);
9025   ;
9026   return 0;
9027 }
9028 _ACEOF
9029 rm -f conftest$ac_exeext
9030 if { (eval echo "$as_me:9030: \"$ac_link\"") >&5
9031   (eval $ac_link) 2>&5
9032   ac_status=$?
9033   echo "$as_me:9033: \$? = $ac_status" >&5
9034   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9035   { (eval echo "$as_me:9035: \"$ac_try\"") >&5
9036   (eval $ac_try) 2>&5
9037   ac_status=$?
9038   echo "$as_me:9038: \$? = $ac_status" >&5
9039   (exit $ac_status); }; }; then
9040   ac_cv_sizeof_signed_char=`cat conftest.val`
9041 else
9042   echo "$as_me: program exited with status $ac_status" >&5
9043 echo "$as_me: failed program was:" >&5
9044 cat conftest.$ac_ext >&5
9045 fi
9046 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9047 fi
9048 fi
9049 rm -f conftest.val
9050 else
9051   ac_cv_sizeof_signed_char=0
9052 fi
9053 fi
9054 echo "$as_me:9054: result: $ac_cv_sizeof_signed_char" >&5
9055 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
9056 cat >>confdefs.h <<EOF
9057 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
9058 EOF
9059
9060 if test "$ac_cv_sizeof_signed_char" = 1 ; then
9061         NCURSES_SBOOL="signed char"
9062 else
9063         NCURSES_SBOOL="char"
9064 fi
9065 echo "$as_me:9065: checking if you want to use signed Boolean array in term.h" >&5
9066 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
9067
9068 # Check whether --enable-signed-char or --disable-signed-char was given.
9069 if test "${enable_signed_char+set}" = set; then
9070   enableval="$enable_signed_char"
9071   with_signed_char=$enableval
9072 else
9073   with_signed_char=no
9074 fi;
9075 echo "$as_me:9075: result: $with_signed_char" >&5
9076 echo "${ECHO_T}$with_signed_char" >&6
9077 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
9078
9079 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
9080 echo "$as_me:9080: checking if you want SIGWINCH handler" >&5
9081 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
9082
9083 # Check whether --enable-sigwinch or --disable-sigwinch was given.
9084 if test "${enable_sigwinch+set}" = set; then
9085   enableval="$enable_sigwinch"
9086   with_sigwinch=$enableval
9087 else
9088   with_sigwinch=$with_ext_funcs
9089 fi;
9090 echo "$as_me:9090: result: $with_sigwinch" >&5
9091 echo "${ECHO_T}$with_sigwinch" >&6
9092 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
9093 #define USE_SIGWINCH 1
9094 EOF
9095
9096 ###   use option --enable-tcap-names to allow user to define new capabilities
9097 echo "$as_me:9097: checking if you want user-definable terminal capabilities like termcap" >&5
9098 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
9099
9100 # Check whether --enable-tcap-names or --disable-tcap-names was given.
9101 if test "${enable_tcap_names+set}" = set; then
9102   enableval="$enable_tcap_names"
9103   with_tcap_names=$enableval
9104 else
9105   with_tcap_names=$with_ext_funcs
9106 fi;
9107 echo "$as_me:9107: result: $with_tcap_names" >&5
9108 echo "${ECHO_T}$with_tcap_names" >&6
9109 NCURSES_XNAMES=0
9110 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
9111
9112 ###############################################################################
9113 # These options are relatively safe to experiment with.
9114
9115 echo "$as_me:9115: checking if you want all development code" >&5
9116 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
9117
9118 # Check whether --with-develop or --without-develop was given.
9119 if test "${with_develop+set}" = set; then
9120   withval="$with_develop"
9121   with_develop=$withval
9122 else
9123   with_develop=no
9124 fi;
9125 echo "$as_me:9125: result: $with_develop" >&5
9126 echo "${ECHO_T}$with_develop" >&6
9127
9128 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
9129 echo "$as_me:9129: checking if you want hard-tabs code" >&5
9130 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
9131
9132 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
9133 if test "${enable_hard_tabs+set}" = set; then
9134   enableval="$enable_hard_tabs"
9135
9136 else
9137   enable_hard_tabs=$with_develop
9138 fi;
9139 echo "$as_me:9139: result: $enable_hard_tabs" >&5
9140 echo "${ECHO_T}$enable_hard_tabs" >&6
9141 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
9142 #define USE_HARD_TABS 1
9143 EOF
9144
9145 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
9146 echo "$as_me:9146: checking if you want limited support for xmc" >&5
9147 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
9148
9149 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
9150 if test "${enable_xmc_glitch+set}" = set; then
9151   enableval="$enable_xmc_glitch"
9152
9153 else
9154   enable_xmc_glitch=$with_develop
9155 fi;
9156 echo "$as_me:9156: result: $enable_xmc_glitch" >&5
9157 echo "${ECHO_T}$enable_xmc_glitch" >&6
9158 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
9159 #define USE_XMC_SUPPORT 1
9160 EOF
9161
9162 ###############################################################################
9163 # These are just experimental, probably should not be in a package:
9164
9165 echo "$as_me:9165: checking if you do not want to assume colors are white-on-black" >&5
9166 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
9167
9168 # Check whether --enable-assumed-color or --disable-assumed-color was given.
9169 if test "${enable_assumed_color+set}" = set; then
9170   enableval="$enable_assumed_color"
9171   with_assumed_color=$enableval
9172 else
9173   with_assumed_color=yes
9174 fi;
9175 echo "$as_me:9175: result: $with_assumed_color" >&5
9176 echo "${ECHO_T}$with_assumed_color" >&6
9177 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
9178 #define USE_ASSUMED_COLOR 1
9179 EOF
9180
9181 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
9182 echo "$as_me:9182: checking if you want hashmap scrolling-optimization code" >&5
9183 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
9184
9185 # Check whether --enable-hashmap or --disable-hashmap was given.
9186 if test "${enable_hashmap+set}" = set; then
9187   enableval="$enable_hashmap"
9188   with_hashmap=$enableval
9189 else
9190   with_hashmap=yes
9191 fi;
9192 echo "$as_me:9192: result: $with_hashmap" >&5
9193 echo "${ECHO_T}$with_hashmap" >&6
9194 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
9195 #define USE_HASHMAP 1
9196 EOF
9197
9198 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
9199 echo "$as_me:9199: checking if you want colorfgbg code" >&5
9200 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
9201
9202 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
9203 if test "${enable_colorfgbg+set}" = set; then
9204   enableval="$enable_colorfgbg"
9205   with_colorfgbg=$enableval
9206 else
9207   with_colorfgbg=no
9208 fi;
9209 echo "$as_me:9209: result: $with_colorfgbg" >&5
9210 echo "${ECHO_T}$with_colorfgbg" >&6
9211 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
9212 #define USE_COLORFGBG 1
9213 EOF
9214
9215 # This is still experimental (20080329), but should ultimately be moved to
9216 # the script-block --with-normal, etc.
9217
9218 echo "$as_me:9218: checking if you want to link with the pthread library" >&5
9219 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
9220
9221 # Check whether --with-pthread or --without-pthread was given.
9222 if test "${with_pthread+set}" = set; then
9223   withval="$with_pthread"
9224   with_pthread=$withval
9225 else
9226   with_pthread=no
9227 fi;
9228 echo "$as_me:9228: result: $with_pthread" >&5
9229 echo "${ECHO_T}$with_pthread" >&6
9230
9231 if test "$with_pthread" != no ; then
9232     echo "$as_me:9232: checking for pthread.h" >&5
9233 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
9234 if test "${ac_cv_header_pthread_h+set}" = set; then
9235   echo $ECHO_N "(cached) $ECHO_C" >&6
9236 else
9237   cat >conftest.$ac_ext <<_ACEOF
9238 #line 9238 "configure"
9239 #include "confdefs.h"
9240 #include <pthread.h>
9241 _ACEOF
9242 if { (eval echo "$as_me:9242: \"$ac_cpp conftest.$ac_ext\"") >&5
9243   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9244   ac_status=$?
9245   egrep -v '^ *\+' conftest.er1 >conftest.err
9246   rm -f conftest.er1
9247   cat conftest.err >&5
9248   echo "$as_me:9248: \$? = $ac_status" >&5
9249   (exit $ac_status); } >/dev/null; then
9250   if test -s conftest.err; then
9251     ac_cpp_err=$ac_c_preproc_warn_flag
9252   else
9253     ac_cpp_err=
9254   fi
9255 else
9256   ac_cpp_err=yes
9257 fi
9258 if test -z "$ac_cpp_err"; then
9259   ac_cv_header_pthread_h=yes
9260 else
9261   echo "$as_me: failed program was:" >&5
9262   cat conftest.$ac_ext >&5
9263   ac_cv_header_pthread_h=no
9264 fi
9265 rm -f conftest.err conftest.$ac_ext
9266 fi
9267 echo "$as_me:9267: result: $ac_cv_header_pthread_h" >&5
9268 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
9269 if test $ac_cv_header_pthread_h = yes; then
9270
9271         cat >>confdefs.h <<\EOF
9272 #define HAVE_PTHREADS_H 1
9273 EOF
9274
9275         echo "$as_me:9275: checking if we can link with the pthread library" >&5
9276 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
9277         cf_save_LIBS="$LIBS"
9278         LIBS="-lpthread $LIBS"
9279         cat >conftest.$ac_ext <<_ACEOF
9280 #line 9280 "configure"
9281 #include "confdefs.h"
9282
9283 #include <pthread.h>
9284
9285 int
9286 main ()
9287 {
9288
9289         int rc = pthread_create(0,0,0,0);
9290
9291   ;
9292   return 0;
9293 }
9294 _ACEOF
9295 rm -f conftest.$ac_objext conftest$ac_exeext
9296 if { (eval echo "$as_me:9296: \"$ac_link\"") >&5
9297   (eval $ac_link) 2>&5
9298   ac_status=$?
9299   echo "$as_me:9299: \$? = $ac_status" >&5
9300   (exit $ac_status); } &&
9301          { ac_try='test -s conftest$ac_exeext'
9302   { (eval echo "$as_me:9302: \"$ac_try\"") >&5
9303   (eval $ac_try) 2>&5
9304   ac_status=$?
9305   echo "$as_me:9305: \$? = $ac_status" >&5
9306   (exit $ac_status); }; }; then
9307   with_pthread=yes
9308 else
9309   echo "$as_me: failed program was:" >&5
9310 cat conftest.$ac_ext >&5
9311 with_pthread=no
9312 fi
9313 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9314         LIBS="$cf_save_LIBS"
9315         echo "$as_me:9315: result: $with_pthread" >&5
9316 echo "${ECHO_T}$with_pthread" >&6
9317
9318         if test "$with_pthread" = yes ; then
9319             LIBS="-lpthread $LIBS"
9320             cat >>confdefs.h <<\EOF
9321 #define HAVE_LIBPTHREADS 1
9322 EOF
9323
9324         else
9325             { { echo "$as_me:9325: error: Cannot link with pthread library" >&5
9326 echo "$as_me: error: Cannot link with pthread library" >&2;}
9327    { (exit 1); exit 1; }; }
9328         fi
9329
9330 fi
9331
9332 fi
9333
9334 echo "$as_me:9334: checking if you want to use weak-symbols for pthreads" >&5
9335 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
9336
9337 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
9338 if test "${enable_weak_symbols+set}" = set; then
9339   enableval="$enable_weak_symbols"
9340   use_weak_symbols=$withval
9341 else
9342   use_weak_symbols=no
9343 fi;
9344 echo "$as_me:9344: result: $use_weak_symbols" >&5
9345 echo "${ECHO_T}$use_weak_symbols" >&6
9346 if test "$use_weak_symbols" = yes ; then
9347
9348 echo "$as_me:9348: checking if $CC supports weak symbols" >&5
9349 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
9350 if test "${cf_cv_weak_symbols+set}" = set; then
9351   echo $ECHO_N "(cached) $ECHO_C" >&6
9352 else
9353
9354 cat >conftest.$ac_ext <<_ACEOF
9355 #line 9355 "configure"
9356 #include "confdefs.h"
9357
9358 #include <stdio.h>
9359 int
9360 main ()
9361 {
9362
9363 #if defined(__GNUC__)
9364 #  if defined __USE_ISOC99
9365 #    define _cat_pragma(exp)    _Pragma(#exp)
9366 #    define _weak_pragma(exp)   _cat_pragma(weak name)
9367 #  else
9368 #    define _weak_pragma(exp)
9369 #  endif
9370 #  define _declare(name)        __extension__ extern __typeof__(name) name
9371 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
9372 #endif
9373
9374 weak_symbol(fopen);
9375
9376   ;
9377   return 0;
9378 }
9379 _ACEOF
9380 rm -f conftest.$ac_objext
9381 if { (eval echo "$as_me:9381: \"$ac_compile\"") >&5
9382   (eval $ac_compile) 2>&5
9383   ac_status=$?
9384   echo "$as_me:9384: \$? = $ac_status" >&5
9385   (exit $ac_status); } &&
9386          { ac_try='test -s conftest.$ac_objext'
9387   { (eval echo "$as_me:9387: \"$ac_try\"") >&5
9388   (eval $ac_try) 2>&5
9389   ac_status=$?
9390   echo "$as_me:9390: \$? = $ac_status" >&5
9391   (exit $ac_status); }; }; then
9392   cf_cv_weak_symbols=yes
9393 else
9394   echo "$as_me: failed program was:" >&5
9395 cat conftest.$ac_ext >&5
9396 cf_cv_weak_symbols=no
9397 fi
9398 rm -f conftest.$ac_objext conftest.$ac_ext
9399
9400 fi
9401 echo "$as_me:9401: result: $cf_cv_weak_symbols" >&5
9402 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
9403
9404 else
9405     cf_cv_weak_symbols=no
9406 fi
9407
9408 if test $cf_cv_weak_symbols = yes ; then
9409     cat >>confdefs.h <<\EOF
9410 #define USE_WEAK_SYMBOLS 1
9411 EOF
9412
9413 fi
9414
9415 PTHREAD=
9416 if test "$with_pthread" = "yes" ; then
9417     cat >>confdefs.h <<\EOF
9418 #define USE_PTHREADS 1
9419 EOF
9420
9421     enable_reentrant=yes
9422     if test $cf_cv_weak_symbols = yes ; then
9423         PTHREAD=-lpthread
9424     fi
9425 fi
9426
9427 # Reentrant code has to be opaque; there's little advantage to making ncurses
9428 # opaque outside of that, so there is no --enable-opaque option.  We can use
9429 # this option without --with-pthreads, but this will be always set for
9430 # pthreads.
9431 echo "$as_me:9431: checking if you want experimental reentrant code" >&5
9432 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
9433
9434 # Check whether --enable-reentrant or --disable-reentrant was given.
9435 if test "${enable_reentrant+set}" = set; then
9436   enableval="$enable_reentrant"
9437   with_reentrant=$enableval
9438 else
9439   with_reentrant=no
9440 fi;
9441 echo "$as_me:9441: result: $with_reentrant" >&5
9442 echo "${ECHO_T}$with_reentrant" >&6
9443 if test "$with_reentrant" = yes ; then
9444         cf_cv_enable_reentrant=1
9445         cf_cv_enable_opaque="NCURSES_INTERNALS"
9446         NCURSES_OPAQUE=1
9447         NCURSES_SIZE_T=int
9448     if test $cf_cv_weak_symbols = yes ; then
9449
9450 # remove pthread library from $LIBS
9451 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
9452
9453     else
9454         LIB_SUFFIX="t${LIB_SUFFIX}"
9455     fi
9456         cat >>confdefs.h <<\EOF
9457 #define USE_REENTRANT 1
9458 EOF
9459
9460 if test "${with_abi_version+set}" != set; then
9461         case $cf_cv_rel_version in
9462         5.*)
9463                 cf_cv_rel_version=6.0
9464                 cf_cv_abi_version=6
9465                 { echo "$as_me:9465: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9466 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9467                 ;;
9468         esac
9469 fi
9470
9471 else
9472         cf_cv_enable_reentrant=0
9473         cf_cv_enable_opaque="NCURSES_OPAQUE"
9474         NCURSES_OPAQUE=0
9475         NCURSES_SIZE_T=short
9476 fi
9477
9478 echo "$as_me:9478: checking if you want experimental safe-sprintf code" >&5
9479 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
9480
9481 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
9482 if test "${enable_safe_sprintf+set}" = set; then
9483   enableval="$enable_safe_sprintf"
9484   with_safe_sprintf=$enableval
9485 else
9486   with_safe_sprintf=no
9487 fi;
9488 echo "$as_me:9488: result: $with_safe_sprintf" >&5
9489 echo "${ECHO_T}$with_safe_sprintf" >&6
9490 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
9491 #define USE_SAFE_SPRINTF 1
9492 EOF
9493
9494 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
9495 # when hashmap is used scroll hints are useless
9496 if test "$with_hashmap" = no ; then
9497 echo "$as_me:9497: checking if you want to experiment without scrolling-hints code" >&5
9498 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
9499
9500 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
9501 if test "${enable_scroll_hints+set}" = set; then
9502   enableval="$enable_scroll_hints"
9503   with_scroll_hints=$enableval
9504 else
9505   with_scroll_hints=yes
9506 fi;
9507 echo "$as_me:9507: result: $with_scroll_hints" >&5
9508 echo "${ECHO_T}$with_scroll_hints" >&6
9509 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
9510 #define USE_SCROLL_HINTS 1
9511 EOF
9512
9513 fi
9514
9515 echo "$as_me:9515: checking if you want experimental wgetch-events code" >&5
9516 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
9517
9518 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
9519 if test "${enable_wgetch_events+set}" = set; then
9520   enableval="$enable_wgetch_events"
9521   with_wgetch_events=$enableval
9522 else
9523   with_wgetch_events=no
9524 fi;
9525 echo "$as_me:9525: result: $with_wgetch_events" >&5
9526 echo "${ECHO_T}$with_wgetch_events" >&6
9527 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
9528 #define NCURSES_WGETCH_EVENTS 1
9529 EOF
9530
9531 ###############################################################################
9532
9533 ###     use option --disable-echo to suppress full display compiling commands
9534 echo "$as_me:9534: checking if you want to display full commands during build" >&5
9535 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
9536
9537 # Check whether --enable-echo or --disable-echo was given.
9538 if test "${enable_echo+set}" = set; then
9539   enableval="$enable_echo"
9540   with_echo=$enableval
9541 else
9542   with_echo=yes
9543 fi;
9544 if test "$with_echo" = yes; then
9545         ECHO_LINK=
9546 else
9547         ECHO_LINK='@ echo linking $@ ... ;'
9548         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
9549         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
9550 fi
9551 echo "$as_me:9551: result: $with_echo" >&5
9552 echo "${ECHO_T}$with_echo" >&6
9553
9554 ###     use option --enable-warnings to turn on all gcc warnings
9555 echo "$as_me:9555: checking if you want to see compiler warnings" >&5
9556 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
9557
9558 # Check whether --enable-warnings or --disable-warnings was given.
9559 if test "${enable_warnings+set}" = set; then
9560   enableval="$enable_warnings"
9561   with_warnings=$enableval
9562 fi;
9563 echo "$as_me:9563: result: $with_warnings" >&5
9564 echo "${ECHO_T}$with_warnings" >&6
9565
9566 if test "x$with_warnings" = "xyes"; then
9567         ADAFLAGS="$ADAFLAGS -gnatg"
9568
9569 INTEL_COMPILER=no
9570
9571 if test "$GCC" = yes ; then
9572         case $host_os in
9573         linux*|gnu*)
9574                 echo "$as_me:9574: checking if this is really Intel C compiler" >&5
9575 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
9576                 cf_save_CFLAGS="$CFLAGS"
9577                 CFLAGS="$CFLAGS -no-gcc"
9578                 cat >conftest.$ac_ext <<_ACEOF
9579 #line 9579 "configure"
9580 #include "confdefs.h"
9581
9582 int
9583 main ()
9584 {
9585
9586 #ifdef __INTEL_COMPILER
9587 #else
9588 make an error
9589 #endif
9590
9591   ;
9592   return 0;
9593 }
9594 _ACEOF
9595 rm -f conftest.$ac_objext
9596 if { (eval echo "$as_me:9596: \"$ac_compile\"") >&5
9597   (eval $ac_compile) 2>&5
9598   ac_status=$?
9599   echo "$as_me:9599: \$? = $ac_status" >&5
9600   (exit $ac_status); } &&
9601          { ac_try='test -s conftest.$ac_objext'
9602   { (eval echo "$as_me:9602: \"$ac_try\"") >&5
9603   (eval $ac_try) 2>&5
9604   ac_status=$?
9605   echo "$as_me:9605: \$? = $ac_status" >&5
9606   (exit $ac_status); }; }; then
9607   INTEL_COMPILER=yes
9608 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9609
9610 else
9611   echo "$as_me: failed program was:" >&5
9612 cat conftest.$ac_ext >&5
9613 fi
9614 rm -f conftest.$ac_objext conftest.$ac_ext
9615                 CFLAGS="$cf_save_CFLAGS"
9616                 echo "$as_me:9616: result: $INTEL_COMPILER" >&5
9617 echo "${ECHO_T}$INTEL_COMPILER" >&6
9618                 ;;
9619         esac
9620 fi
9621
9622 cat > conftest.$ac_ext <<EOF
9623 #line 9623 "${as_me-configure}"
9624 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9625 EOF
9626
9627 if test "$INTEL_COMPILER" = yes
9628 then
9629 # The "-wdXXX" options suppress warnings:
9630 # remark #1419: external declaration in primary source file
9631 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9632 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9633 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9634 # remark #193: zero used for undefined preprocessing identifier
9635 # remark #593: variable "curs_sb_left_arrow" was set but never used
9636 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9637 # remark #869: parameter "tw" was never referenced
9638 # remark #981: operands are evaluated in unspecified order
9639 # warning #269: invalid format string conversion
9640
9641         { echo "$as_me:9641: checking for $CC warning options..." >&5
9642 echo "$as_me: checking for $CC warning options..." >&6;}
9643         cf_save_CFLAGS="$CFLAGS"
9644         EXTRA_CFLAGS="-Wall"
9645         for cf_opt in \
9646                 wd1419 \
9647                 wd1682 \
9648                 wd1683 \
9649                 wd1684 \
9650                 wd193 \
9651                 wd279 \
9652                 wd593 \
9653                 wd810 \
9654                 wd869 \
9655                 wd981
9656         do
9657                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9658                 if { (eval echo "$as_me:9658: \"$ac_compile\"") >&5
9659   (eval $ac_compile) 2>&5
9660   ac_status=$?
9661   echo "$as_me:9661: \$? = $ac_status" >&5
9662   (exit $ac_status); }; then
9663                         test -n "$verbose" && echo "$as_me:9663: result: ... -$cf_opt" >&5
9664 echo "${ECHO_T}... -$cf_opt" >&6
9665                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9666                 fi
9667         done
9668         CFLAGS="$cf_save_CFLAGS"
9669
9670 elif test "$GCC" = yes
9671 then
9672         { echo "$as_me:9672: checking for $CC warning options..." >&5
9673 echo "$as_me: checking for $CC warning options..." >&6;}
9674         cf_save_CFLAGS="$CFLAGS"
9675         EXTRA_CFLAGS="-W -Wall"
9676         cf_warn_CONST=""
9677         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
9678         for cf_opt in \
9679                 Wbad-function-cast \
9680                 Wcast-align \
9681                 Wcast-qual \
9682                 Winline \
9683                 Wmissing-declarations \
9684                 Wmissing-prototypes \
9685                 Wnested-externs \
9686                 Wpointer-arith \
9687                 Wshadow \
9688                 Wstrict-prototypes \
9689                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
9690         do
9691                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9692                 if { (eval echo "$as_me:9692: \"$ac_compile\"") >&5
9693   (eval $ac_compile) 2>&5
9694   ac_status=$?
9695   echo "$as_me:9695: \$? = $ac_status" >&5
9696   (exit $ac_status); }; then
9697                         test -n "$verbose" && echo "$as_me:9697: result: ... -$cf_opt" >&5
9698 echo "${ECHO_T}... -$cf_opt" >&6
9699                         case $cf_opt in #(vi
9700                         Wcast-qual) #(vi
9701                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
9702                                 ;;
9703                         Winline) #(vi
9704                                 case $GCC_VERSION in
9705                                 [34].*)
9706                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
9707
9708 echo "${as_me-configure}:9708: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
9709
9710                                         continue;;
9711                                 esac
9712                                 ;;
9713                         esac
9714                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9715                 fi
9716         done
9717         CFLAGS="$cf_save_CFLAGS"
9718 fi
9719 rm -f conftest*
9720
9721         if test "$cf_with_cxx" = yes ; then
9722
9723 INTEL_CPLUSPLUS=no
9724
9725 if test "$GCC" = yes ; then
9726         case $host_os in
9727         linux*|gnu*)
9728                 echo "$as_me:9728: checking if this is really Intel C++ compiler" >&5
9729 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
9730                 cf_save_CFLAGS="$CXXFLAGS"
9731                 CXXFLAGS="$CXXFLAGS -no-gcc"
9732                 cat >conftest.$ac_ext <<_ACEOF
9733 #line 9733 "configure"
9734 #include "confdefs.h"
9735
9736 int
9737 main ()
9738 {
9739
9740 #ifdef __INTEL_COMPILER
9741 #else
9742 make an error
9743 #endif
9744
9745   ;
9746   return 0;
9747 }
9748 _ACEOF
9749 rm -f conftest.$ac_objext
9750 if { (eval echo "$as_me:9750: \"$ac_compile\"") >&5
9751   (eval $ac_compile) 2>&5
9752   ac_status=$?
9753   echo "$as_me:9753: \$? = $ac_status" >&5
9754   (exit $ac_status); } &&
9755          { ac_try='test -s conftest.$ac_objext'
9756   { (eval echo "$as_me:9756: \"$ac_try\"") >&5
9757   (eval $ac_try) 2>&5
9758   ac_status=$?
9759   echo "$as_me:9759: \$? = $ac_status" >&5
9760   (exit $ac_status); }; }; then
9761   INTEL_CPLUSPLUS=yes
9762 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9763
9764 else
9765   echo "$as_me: failed program was:" >&5
9766 cat conftest.$ac_ext >&5
9767 fi
9768 rm -f conftest.$ac_objext conftest.$ac_ext
9769                 CXXFLAGS="$cf_save_CFLAGS"
9770                 echo "$as_me:9770: result: $INTEL_CPLUSPLUS" >&5
9771 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
9772                 ;;
9773         esac
9774 fi
9775
9776 ac_ext=cc
9777 ac_cpp='$CXXCPP $CPPFLAGS'
9778 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9779 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9780 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9781 ac_main_return=return
9782
9783 cat > conftest.$ac_ext <<EOF
9784 #line 9784 "configure"
9785 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9786 EOF
9787
9788 if test "$INTEL_CPLUSPLUS" = yes
9789 then
9790 # The "-wdXXX" options suppress warnings:
9791 # remark #1419: external declaration in primary source file
9792 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9793 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9794 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9795 # remark #193: zero used for undefined preprocessing identifier
9796 # remark #593: variable "curs_sb_left_arrow" was set but never used
9797 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9798 # remark #869: parameter "tw" was never referenced
9799 # remark #981: operands are evaluated in unspecified order
9800 # warning #269: invalid format string conversion
9801
9802         { echo "$as_me:9802: checking for $CC warning options..." >&5
9803 echo "$as_me: checking for $CC warning options..." >&6;}
9804         cf_save_CXXFLAGS="$CXXFLAGS"
9805         EXTRA_CXXFLAGS="-Wall"
9806         for cf_opt in \
9807                 wd1419 \
9808                 wd1682 \
9809                 wd1683 \
9810                 wd1684 \
9811                 wd193 \
9812                 wd279 \
9813                 wd593 \
9814                 wd810 \
9815                 wd869 \
9816                 wd981
9817         do
9818                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
9819                 if { (eval echo "$as_me:9819: \"$ac_compile\"") >&5
9820   (eval $ac_compile) 2>&5
9821   ac_status=$?
9822   echo "$as_me:9822: \$? = $ac_status" >&5
9823   (exit $ac_status); }; then
9824                         test -n "$verbose" && echo "$as_me:9824: result: ... -$cf_opt" >&5
9825 echo "${ECHO_T}... -$cf_opt" >&6
9826                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9827                 fi
9828         done
9829         CXXFLAGS="$cf_save_CXXFLAGS"
9830
9831 elif test "$GXX" = yes
9832 then
9833         { echo "$as_me:9833: checking for $CXX warning options..." >&5
9834 echo "$as_me: checking for $CXX warning options..." >&6;}
9835         cf_save_CXXFLAGS="$CXXFLAGS"
9836         EXTRA_CXXFLAGS="-W -Wall"
9837         cf_gxx_extra_warnings=""
9838         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
9839         case "$GCC_VERSION" in
9840         [1-2].*)
9841                 ;;
9842         *)
9843                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
9844                 ;;
9845         esac
9846         for cf_opt in \
9847                 Wabi \
9848                 fabi-version=0 \
9849                 Woverloaded-virtual \
9850                 Wsign-promo \
9851                 Wsynth \
9852                 Wold-style-cast \
9853                 Wcast-align \
9854                 Wcast-qual \
9855                 Wmissing-prototypes \
9856                 Wpointer-arith \
9857                 Wshadow \
9858                 Wstrict-prototypes \
9859                 Wundef $cf_gxx_extra_warnings Wno-unused
9860         do
9861                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
9862                 if { (eval echo "$as_me:9862: \"$ac_compile\"") >&5
9863   (eval $ac_compile) 2>&5
9864   ac_status=$?
9865   echo "$as_me:9865: \$? = $ac_status" >&5
9866   (exit $ac_status); }; then
9867                         test -n "$verbose" && echo "$as_me:9867: result: ... -$cf_opt" >&5
9868 echo "${ECHO_T}... -$cf_opt" >&6
9869                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9870                 else
9871                         test -n "$verbose" && echo "$as_me:9871: result: ... no -$cf_opt" >&5
9872 echo "${ECHO_T}... no -$cf_opt" >&6
9873                 fi
9874         done
9875         CXXFLAGS="$cf_save_CXXFLAGS"
9876 fi
9877
9878 rm -f conftest*
9879 ac_ext=c
9880 ac_cpp='$CPP $CPPFLAGS'
9881 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9882 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9883 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9884 ac_main_return=return
9885
9886         fi
9887 fi
9888
9889 if test "$GCC" = yes
9890 then
9891 cat > conftest.i <<EOF
9892 #ifndef GCC_PRINTF
9893 #define GCC_PRINTF 0
9894 #endif
9895 #ifndef GCC_SCANF
9896 #define GCC_SCANF 0
9897 #endif
9898 #ifndef GCC_NORETURN
9899 #define GCC_NORETURN /* nothing */
9900 #endif
9901 #ifndef GCC_UNUSED
9902 #define GCC_UNUSED /* nothing */
9903 #endif
9904 EOF
9905 if test "$GCC" = yes
9906 then
9907         { echo "$as_me:9907: checking for $CC __attribute__ directives..." >&5
9908 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
9909 cat > conftest.$ac_ext <<EOF
9910 #line 9910 "${as_me-configure}"
9911 #include "confdefs.h"
9912 #include "conftest.h"
9913 #include "conftest.i"
9914 #if     GCC_PRINTF
9915 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9916 #else
9917 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
9918 #endif
9919 #if     GCC_SCANF
9920 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9921 #else
9922 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
9923 #endif
9924 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
9925 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
9926 extern void foo(void) GCC_NORETURN;
9927 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
9928 EOF
9929         for cf_attribute in scanf printf unused noreturn
9930         do
9931
9932 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9933
9934                 cf_directive="__attribute__(($cf_attribute))"
9935                 echo "checking for $CC $cf_directive" 1>&5
9936                 case $cf_attribute in
9937                 scanf|printf)
9938                 cat >conftest.h <<EOF
9939 #define GCC_$cf_ATTRIBUTE 1
9940 EOF
9941                         ;;
9942                 *)
9943                 cat >conftest.h <<EOF
9944 #define GCC_$cf_ATTRIBUTE $cf_directive
9945 EOF
9946                         ;;
9947                 esac
9948                 if { (eval echo "$as_me:9948: \"$ac_compile\"") >&5
9949   (eval $ac_compile) 2>&5
9950   ac_status=$?
9951   echo "$as_me:9951: \$? = $ac_status" >&5
9952   (exit $ac_status); }; then
9953                         test -n "$verbose" && echo "$as_me:9953: result: ... $cf_attribute" >&5
9954 echo "${ECHO_T}... $cf_attribute" >&6
9955                         cat conftest.h >>confdefs.h
9956                 fi
9957         done
9958 else
9959         fgrep define conftest.i >>confdefs.h
9960 fi
9961 rm -rf conftest*
9962 fi
9963
9964 ###     use option --enable-assertions to turn on generation of assertion code
9965 echo "$as_me:9965: checking if you want to enable runtime assertions" >&5
9966 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
9967
9968 # Check whether --enable-assertions or --disable-assertions was given.
9969 if test "${enable_assertions+set}" = set; then
9970   enableval="$enable_assertions"
9971   with_assertions=$enableval
9972 else
9973   with_assertions=no
9974 fi;
9975 echo "$as_me:9975: result: $with_assertions" >&5
9976 echo "${ECHO_T}$with_assertions" >&6
9977 if test -n "$GCC"
9978 then
9979         if test "$with_assertions" = no
9980         then
9981                 cat >>confdefs.h <<\EOF
9982 #define NDEBUG 1
9983 EOF
9984
9985                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
9986         else
9987                 ADAFLAGS="$ADAFLAGS -gnata"
9988         fi
9989 fi
9990
9991 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
9992
9993 echo "$as_me:9993: checking if you want to use dmalloc for testing" >&5
9994 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
9995
9996 # Check whether --with-dmalloc or --without-dmalloc was given.
9997 if test "${with_dmalloc+set}" = set; then
9998   withval="$with_dmalloc"
9999   cat >>confdefs.h <<\EOF
10000 #define USE_DMALLOC 1
10001 EOF
10002
10003         : ${with_cflags:=-g}
10004         : ${with_no_leaks:=yes}
10005          with_dmalloc=yes
10006 else
10007   with_dmalloc=
10008 fi;
10009 echo "$as_me:10009: result: ${with_dmalloc:-no}" >&5
10010 echo "${ECHO_T}${with_dmalloc:-no}" >&6
10011
10012 case .$with_cflags in #(vi
10013 .*-g*)
10014         case .$CFLAGS in #(vi
10015         .*-g*) #(vi
10016                 ;;
10017         *)
10018
10019 cf_fix_cppflags=no
10020 cf_new_cflags=
10021 cf_new_cppflags=
10022 cf_new_extra_cppflags=
10023
10024 for cf_add_cflags in -g
10025 do
10026 case $cf_fix_cppflags in
10027 no)
10028         case $cf_add_cflags in #(vi
10029         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10030                 case $cf_add_cflags in
10031                 -D*)
10032                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10033
10034                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10035                         && test -z "${cf_tst_cflags}" \
10036                         && cf_fix_cppflags=yes
10037
10038                         if test $cf_fix_cppflags = yes ; then
10039                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10040                                 continue
10041                         elif test "${cf_tst_cflags}" = "\"'" ; then
10042                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10043                                 continue
10044                         fi
10045                         ;;
10046                 esac
10047                 case "$CPPFLAGS" in
10048                 *$cf_add_cflags) #(vi
10049                         ;;
10050                 *) #(vi
10051                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10052                         ;;
10053                 esac
10054                 ;;
10055         *)
10056                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10057                 ;;
10058         esac
10059         ;;
10060 yes)
10061         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10062
10063         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10064
10065         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10066         && test -z "${cf_tst_cflags}" \
10067         && cf_fix_cppflags=no
10068         ;;
10069 esac
10070 done
10071
10072 if test -n "$cf_new_cflags" ; then
10073
10074         CFLAGS="$CFLAGS $cf_new_cflags"
10075 fi
10076
10077 if test -n "$cf_new_cppflags" ; then
10078
10079         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10080 fi
10081
10082 if test -n "$cf_new_extra_cppflags" ; then
10083
10084         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10085 fi
10086
10087                 ;;
10088         esac
10089         ;;
10090 esac
10091
10092 if test "$with_dmalloc" = yes ; then
10093         echo "$as_me:10093: checking for dmalloc.h" >&5
10094 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
10095 if test "${ac_cv_header_dmalloc_h+set}" = set; then
10096   echo $ECHO_N "(cached) $ECHO_C" >&6
10097 else
10098   cat >conftest.$ac_ext <<_ACEOF
10099 #line 10099 "configure"
10100 #include "confdefs.h"
10101 #include <dmalloc.h>
10102 _ACEOF
10103 if { (eval echo "$as_me:10103: \"$ac_cpp conftest.$ac_ext\"") >&5
10104   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10105   ac_status=$?
10106   egrep -v '^ *\+' conftest.er1 >conftest.err
10107   rm -f conftest.er1
10108   cat conftest.err >&5
10109   echo "$as_me:10109: \$? = $ac_status" >&5
10110   (exit $ac_status); } >/dev/null; then
10111   if test -s conftest.err; then
10112     ac_cpp_err=$ac_c_preproc_warn_flag
10113   else
10114     ac_cpp_err=
10115   fi
10116 else
10117   ac_cpp_err=yes
10118 fi
10119 if test -z "$ac_cpp_err"; then
10120   ac_cv_header_dmalloc_h=yes
10121 else
10122   echo "$as_me: failed program was:" >&5
10123   cat conftest.$ac_ext >&5
10124   ac_cv_header_dmalloc_h=no
10125 fi
10126 rm -f conftest.err conftest.$ac_ext
10127 fi
10128 echo "$as_me:10128: result: $ac_cv_header_dmalloc_h" >&5
10129 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
10130 if test $ac_cv_header_dmalloc_h = yes; then
10131
10132 echo "$as_me:10132: checking for dmalloc_debug in -ldmalloc" >&5
10133 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
10134 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
10135   echo $ECHO_N "(cached) $ECHO_C" >&6
10136 else
10137   ac_check_lib_save_LIBS=$LIBS
10138 LIBS="-ldmalloc  $LIBS"
10139 cat >conftest.$ac_ext <<_ACEOF
10140 #line 10140 "configure"
10141 #include "confdefs.h"
10142
10143 /* Override any gcc2 internal prototype to avoid an error.  */
10144 #ifdef __cplusplus
10145 extern "C"
10146 #endif
10147 /* We use char because int might match the return type of a gcc2
10148    builtin and then its argument prototype would still apply.  */
10149 char dmalloc_debug ();
10150 int
10151 main ()
10152 {
10153 dmalloc_debug ();
10154   ;
10155   return 0;
10156 }
10157 _ACEOF
10158 rm -f conftest.$ac_objext conftest$ac_exeext
10159 if { (eval echo "$as_me:10159: \"$ac_link\"") >&5
10160   (eval $ac_link) 2>&5
10161   ac_status=$?
10162   echo "$as_me:10162: \$? = $ac_status" >&5
10163   (exit $ac_status); } &&
10164          { ac_try='test -s conftest$ac_exeext'
10165   { (eval echo "$as_me:10165: \"$ac_try\"") >&5
10166   (eval $ac_try) 2>&5
10167   ac_status=$?
10168   echo "$as_me:10168: \$? = $ac_status" >&5
10169   (exit $ac_status); }; }; then
10170   ac_cv_lib_dmalloc_dmalloc_debug=yes
10171 else
10172   echo "$as_me: failed program was:" >&5
10173 cat conftest.$ac_ext >&5
10174 ac_cv_lib_dmalloc_dmalloc_debug=no
10175 fi
10176 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10177 LIBS=$ac_check_lib_save_LIBS
10178 fi
10179 echo "$as_me:10179: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
10180 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
10181 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
10182   cat >>confdefs.h <<EOF
10183 #define HAVE_LIBDMALLOC 1
10184 EOF
10185
10186   LIBS="-ldmalloc $LIBS"
10187
10188 fi
10189
10190 fi
10191
10192 fi
10193
10194 echo "$as_me:10194: checking if you want to use dbmalloc for testing" >&5
10195 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
10196
10197 # Check whether --with-dbmalloc or --without-dbmalloc was given.
10198 if test "${with_dbmalloc+set}" = set; then
10199   withval="$with_dbmalloc"
10200   cat >>confdefs.h <<\EOF
10201 #define USE_DBMALLOC 1
10202 EOF
10203
10204         : ${with_cflags:=-g}
10205         : ${with_no_leaks:=yes}
10206          with_dbmalloc=yes
10207 else
10208   with_dbmalloc=
10209 fi;
10210 echo "$as_me:10210: result: ${with_dbmalloc:-no}" >&5
10211 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
10212
10213 case .$with_cflags in #(vi
10214 .*-g*)
10215         case .$CFLAGS in #(vi
10216         .*-g*) #(vi
10217                 ;;
10218         *)
10219
10220 cf_fix_cppflags=no
10221 cf_new_cflags=
10222 cf_new_cppflags=
10223 cf_new_extra_cppflags=
10224
10225 for cf_add_cflags in -g
10226 do
10227 case $cf_fix_cppflags in
10228 no)
10229         case $cf_add_cflags in #(vi
10230         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10231                 case $cf_add_cflags in
10232                 -D*)
10233                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10234
10235                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10236                         && test -z "${cf_tst_cflags}" \
10237                         && cf_fix_cppflags=yes
10238
10239                         if test $cf_fix_cppflags = yes ; then
10240                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10241                                 continue
10242                         elif test "${cf_tst_cflags}" = "\"'" ; then
10243                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10244                                 continue
10245                         fi
10246                         ;;
10247                 esac
10248                 case "$CPPFLAGS" in
10249                 *$cf_add_cflags) #(vi
10250                         ;;
10251                 *) #(vi
10252                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10253                         ;;
10254                 esac
10255                 ;;
10256         *)
10257                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10258                 ;;
10259         esac
10260         ;;
10261 yes)
10262         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10263
10264         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10265
10266         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10267         && test -z "${cf_tst_cflags}" \
10268         && cf_fix_cppflags=no
10269         ;;
10270 esac
10271 done
10272
10273 if test -n "$cf_new_cflags" ; then
10274
10275         CFLAGS="$CFLAGS $cf_new_cflags"
10276 fi
10277
10278 if test -n "$cf_new_cppflags" ; then
10279
10280         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10281 fi
10282
10283 if test -n "$cf_new_extra_cppflags" ; then
10284
10285         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10286 fi
10287
10288                 ;;
10289         esac
10290         ;;
10291 esac
10292
10293 if test "$with_dbmalloc" = yes ; then
10294         echo "$as_me:10294: checking for dbmalloc.h" >&5
10295 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
10296 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
10297   echo $ECHO_N "(cached) $ECHO_C" >&6
10298 else
10299   cat >conftest.$ac_ext <<_ACEOF
10300 #line 10300 "configure"
10301 #include "confdefs.h"
10302 #include <dbmalloc.h>
10303 _ACEOF
10304 if { (eval echo "$as_me:10304: \"$ac_cpp conftest.$ac_ext\"") >&5
10305   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10306   ac_status=$?
10307   egrep -v '^ *\+' conftest.er1 >conftest.err
10308   rm -f conftest.er1
10309   cat conftest.err >&5
10310   echo "$as_me:10310: \$? = $ac_status" >&5
10311   (exit $ac_status); } >/dev/null; then
10312   if test -s conftest.err; then
10313     ac_cpp_err=$ac_c_preproc_warn_flag
10314   else
10315     ac_cpp_err=
10316   fi
10317 else
10318   ac_cpp_err=yes
10319 fi
10320 if test -z "$ac_cpp_err"; then
10321   ac_cv_header_dbmalloc_h=yes
10322 else
10323   echo "$as_me: failed program was:" >&5
10324   cat conftest.$ac_ext >&5
10325   ac_cv_header_dbmalloc_h=no
10326 fi
10327 rm -f conftest.err conftest.$ac_ext
10328 fi
10329 echo "$as_me:10329: result: $ac_cv_header_dbmalloc_h" >&5
10330 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
10331 if test $ac_cv_header_dbmalloc_h = yes; then
10332
10333 echo "$as_me:10333: checking for debug_malloc in -ldbmalloc" >&5
10334 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
10335 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
10336   echo $ECHO_N "(cached) $ECHO_C" >&6
10337 else
10338   ac_check_lib_save_LIBS=$LIBS
10339 LIBS="-ldbmalloc  $LIBS"
10340 cat >conftest.$ac_ext <<_ACEOF
10341 #line 10341 "configure"
10342 #include "confdefs.h"
10343
10344 /* Override any gcc2 internal prototype to avoid an error.  */
10345 #ifdef __cplusplus
10346 extern "C"
10347 #endif
10348 /* We use char because int might match the return type of a gcc2
10349    builtin and then its argument prototype would still apply.  */
10350 char debug_malloc ();
10351 int
10352 main ()
10353 {
10354 debug_malloc ();
10355   ;
10356   return 0;
10357 }
10358 _ACEOF
10359 rm -f conftest.$ac_objext conftest$ac_exeext
10360 if { (eval echo "$as_me:10360: \"$ac_link\"") >&5
10361   (eval $ac_link) 2>&5
10362   ac_status=$?
10363   echo "$as_me:10363: \$? = $ac_status" >&5
10364   (exit $ac_status); } &&
10365          { ac_try='test -s conftest$ac_exeext'
10366   { (eval echo "$as_me:10366: \"$ac_try\"") >&5
10367   (eval $ac_try) 2>&5
10368   ac_status=$?
10369   echo "$as_me:10369: \$? = $ac_status" >&5
10370   (exit $ac_status); }; }; then
10371   ac_cv_lib_dbmalloc_debug_malloc=yes
10372 else
10373   echo "$as_me: failed program was:" >&5
10374 cat conftest.$ac_ext >&5
10375 ac_cv_lib_dbmalloc_debug_malloc=no
10376 fi
10377 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10378 LIBS=$ac_check_lib_save_LIBS
10379 fi
10380 echo "$as_me:10380: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
10381 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
10382 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
10383   cat >>confdefs.h <<EOF
10384 #define HAVE_LIBDBMALLOC 1
10385 EOF
10386
10387   LIBS="-ldbmalloc $LIBS"
10388
10389 fi
10390
10391 fi
10392
10393 fi
10394
10395 echo "$as_me:10395: checking if you want to use valgrind for testing" >&5
10396 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
10397
10398 # Check whether --with-valgrind or --without-valgrind was given.
10399 if test "${with_valgrind+set}" = set; then
10400   withval="$with_valgrind"
10401   cat >>confdefs.h <<\EOF
10402 #define USE_VALGRIND 1
10403 EOF
10404
10405         : ${with_cflags:=-g}
10406         : ${with_no_leaks:=yes}
10407          with_valgrind=yes
10408 else
10409   with_valgrind=
10410 fi;
10411 echo "$as_me:10411: result: ${with_valgrind:-no}" >&5
10412 echo "${ECHO_T}${with_valgrind:-no}" >&6
10413
10414 case .$with_cflags in #(vi
10415 .*-g*)
10416         case .$CFLAGS in #(vi
10417         .*-g*) #(vi
10418                 ;;
10419         *)
10420
10421 cf_fix_cppflags=no
10422 cf_new_cflags=
10423 cf_new_cppflags=
10424 cf_new_extra_cppflags=
10425
10426 for cf_add_cflags in -g
10427 do
10428 case $cf_fix_cppflags in
10429 no)
10430         case $cf_add_cflags in #(vi
10431         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10432                 case $cf_add_cflags in
10433                 -D*)
10434                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10435
10436                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10437                         && test -z "${cf_tst_cflags}" \
10438                         && cf_fix_cppflags=yes
10439
10440                         if test $cf_fix_cppflags = yes ; then
10441                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10442                                 continue
10443                         elif test "${cf_tst_cflags}" = "\"'" ; then
10444                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10445                                 continue
10446                         fi
10447                         ;;
10448                 esac
10449                 case "$CPPFLAGS" in
10450                 *$cf_add_cflags) #(vi
10451                         ;;
10452                 *) #(vi
10453                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10454                         ;;
10455                 esac
10456                 ;;
10457         *)
10458                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10459                 ;;
10460         esac
10461         ;;
10462 yes)
10463         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10464
10465         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10466
10467         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10468         && test -z "${cf_tst_cflags}" \
10469         && cf_fix_cppflags=no
10470         ;;
10471 esac
10472 done
10473
10474 if test -n "$cf_new_cflags" ; then
10475
10476         CFLAGS="$CFLAGS $cf_new_cflags"
10477 fi
10478
10479 if test -n "$cf_new_cppflags" ; then
10480
10481         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10482 fi
10483
10484 if test -n "$cf_new_extra_cppflags" ; then
10485
10486         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10487 fi
10488
10489                 ;;
10490         esac
10491         ;;
10492 esac
10493
10494 echo "$as_me:10494: checking if you want to perform memory-leak testing" >&5
10495 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
10496
10497 # Check whether --enable-leaks or --disable-leaks was given.
10498 if test "${enable_leaks+set}" = set; then
10499   enableval="$enable_leaks"
10500   with_no_leaks=yes
10501 else
10502   : ${with_no_leaks:=no}
10503 fi;
10504 echo "$as_me:10504: result: $with_no_leaks" >&5
10505 echo "${ECHO_T}$with_no_leaks" >&6
10506
10507 if test "$with_no_leaks" = yes ; then
10508         cat >>confdefs.h <<\EOF
10509 #define NO_LEAKS 1
10510 EOF
10511
10512 fi
10513
10514 cat >>confdefs.h <<\EOF
10515 #define HAVE_NC_ALLOC_H 1
10516 EOF
10517
10518 ###     use option --enable-expanded to generate certain macros as functions
10519
10520 # Check whether --enable-expanded or --disable-expanded was given.
10521 if test "${enable_expanded+set}" = set; then
10522   enableval="$enable_expanded"
10523   test "$enableval" = yes && cat >>confdefs.h <<\EOF
10524 #define NCURSES_EXPANDED 1
10525 EOF
10526
10527 fi;
10528
10529 ###     use option --disable-macros to suppress macros in favor of functions
10530
10531 # Check whether --enable-macros or --disable-macros was given.
10532 if test "${enable_macros+set}" = set; then
10533   enableval="$enable_macros"
10534   test "$enableval" = no && cat >>confdefs.h <<\EOF
10535 #define NCURSES_NOMACROS 1
10536 EOF
10537
10538 fi;
10539
10540 # Normally we only add trace() to the debug-library.  Allow this to be
10541 # extended to all models of the ncurses library:
10542 cf_all_traces=no
10543 case "$CFLAGS $CPPFLAGS" in
10544 *-DTRACE*)
10545         cf_all_traces=yes
10546         ;;
10547 esac
10548
10549 echo "$as_me:10549: checking whether to add trace feature to all models" >&5
10550 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
10551
10552 # Check whether --with-trace or --without-trace was given.
10553 if test "${with_trace+set}" = set; then
10554   withval="$with_trace"
10555   cf_with_trace=$withval
10556 else
10557   cf_with_trace=$cf_all_traces
10558 fi;
10559 echo "$as_me:10559: result: $cf_with_trace" >&5
10560 echo "${ECHO_T}$cf_with_trace" >&6
10561
10562 if test "$cf_with_trace" = yes ; then
10563         LIB_TRACING=all
10564         ADA_TRACE=TRUE
10565
10566 cf_fix_cppflags=no
10567 cf_new_cflags=
10568 cf_new_cppflags=
10569 cf_new_extra_cppflags=
10570
10571 for cf_add_cflags in -DTRACE
10572 do
10573 case $cf_fix_cppflags in
10574 no)
10575         case $cf_add_cflags in #(vi
10576         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10577                 case $cf_add_cflags in
10578                 -D*)
10579                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10580
10581                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10582                         && test -z "${cf_tst_cflags}" \
10583                         && cf_fix_cppflags=yes
10584
10585                         if test $cf_fix_cppflags = yes ; then
10586                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10587                                 continue
10588                         elif test "${cf_tst_cflags}" = "\"'" ; then
10589                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10590                                 continue
10591                         fi
10592                         ;;
10593                 esac
10594                 case "$CPPFLAGS" in
10595                 *$cf_add_cflags) #(vi
10596                         ;;
10597                 *) #(vi
10598                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10599                         ;;
10600                 esac
10601                 ;;
10602         *)
10603                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10604                 ;;
10605         esac
10606         ;;
10607 yes)
10608         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10609
10610         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10611
10612         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10613         && test -z "${cf_tst_cflags}" \
10614         && cf_fix_cppflags=no
10615         ;;
10616 esac
10617 done
10618
10619 if test -n "$cf_new_cflags" ; then
10620
10621         CFLAGS="$CFLAGS $cf_new_cflags"
10622 fi
10623
10624 if test -n "$cf_new_cppflags" ; then
10625
10626         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10627 fi
10628
10629 if test -n "$cf_new_extra_cppflags" ; then
10630
10631         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10632 fi
10633
10634 else
10635         LIB_TRACING=DEBUG
10636         ADA_TRACE=FALSE
10637 fi
10638
10639 ###     Checks for libraries.
10640 echo "$as_me:10640: checking for gettimeofday" >&5
10641 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
10642 if test "${ac_cv_func_gettimeofday+set}" = set; then
10643   echo $ECHO_N "(cached) $ECHO_C" >&6
10644 else
10645   cat >conftest.$ac_ext <<_ACEOF
10646 #line 10646 "configure"
10647 #include "confdefs.h"
10648 /* System header to define __stub macros and hopefully few prototypes,
10649     which can conflict with char gettimeofday (); below.  */
10650 #include <assert.h>
10651 /* Override any gcc2 internal prototype to avoid an error.  */
10652 #ifdef __cplusplus
10653 extern "C"
10654 #endif
10655 /* We use char because int might match the return type of a gcc2
10656    builtin and then its argument prototype would still apply.  */
10657 char gettimeofday ();
10658 char (*f) ();
10659
10660 int
10661 main ()
10662 {
10663 /* The GNU C library defines this for functions which it implements
10664     to always fail with ENOSYS.  Some functions are actually named
10665     something starting with __ and the normal name is an alias.  */
10666 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
10667 choke me
10668 #else
10669 f = gettimeofday;
10670 #endif
10671
10672   ;
10673   return 0;
10674 }
10675 _ACEOF
10676 rm -f conftest.$ac_objext conftest$ac_exeext
10677 if { (eval echo "$as_me:10677: \"$ac_link\"") >&5
10678   (eval $ac_link) 2>&5
10679   ac_status=$?
10680   echo "$as_me:10680: \$? = $ac_status" >&5
10681   (exit $ac_status); } &&
10682          { ac_try='test -s conftest$ac_exeext'
10683   { (eval echo "$as_me:10683: \"$ac_try\"") >&5
10684   (eval $ac_try) 2>&5
10685   ac_status=$?
10686   echo "$as_me:10686: \$? = $ac_status" >&5
10687   (exit $ac_status); }; }; then
10688   ac_cv_func_gettimeofday=yes
10689 else
10690   echo "$as_me: failed program was:" >&5
10691 cat conftest.$ac_ext >&5
10692 ac_cv_func_gettimeofday=no
10693 fi
10694 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10695 fi
10696 echo "$as_me:10696: result: $ac_cv_func_gettimeofday" >&5
10697 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
10698 if test $ac_cv_func_gettimeofday = yes; then
10699   cat >>confdefs.h <<\EOF
10700 #define HAVE_GETTIMEOFDAY 1
10701 EOF
10702
10703 else
10704
10705 echo "$as_me:10705: checking for gettimeofday in -lbsd" >&5
10706 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
10707 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
10708   echo $ECHO_N "(cached) $ECHO_C" >&6
10709 else
10710   ac_check_lib_save_LIBS=$LIBS
10711 LIBS="-lbsd  $LIBS"
10712 cat >conftest.$ac_ext <<_ACEOF
10713 #line 10713 "configure"
10714 #include "confdefs.h"
10715
10716 /* Override any gcc2 internal prototype to avoid an error.  */
10717 #ifdef __cplusplus
10718 extern "C"
10719 #endif
10720 /* We use char because int might match the return type of a gcc2
10721    builtin and then its argument prototype would still apply.  */
10722 char gettimeofday ();
10723 int
10724 main ()
10725 {
10726 gettimeofday ();
10727   ;
10728   return 0;
10729 }
10730 _ACEOF
10731 rm -f conftest.$ac_objext conftest$ac_exeext
10732 if { (eval echo "$as_me:10732: \"$ac_link\"") >&5
10733   (eval $ac_link) 2>&5
10734   ac_status=$?
10735   echo "$as_me:10735: \$? = $ac_status" >&5
10736   (exit $ac_status); } &&
10737          { ac_try='test -s conftest$ac_exeext'
10738   { (eval echo "$as_me:10738: \"$ac_try\"") >&5
10739   (eval $ac_try) 2>&5
10740   ac_status=$?
10741   echo "$as_me:10741: \$? = $ac_status" >&5
10742   (exit $ac_status); }; }; then
10743   ac_cv_lib_bsd_gettimeofday=yes
10744 else
10745   echo "$as_me: failed program was:" >&5
10746 cat conftest.$ac_ext >&5
10747 ac_cv_lib_bsd_gettimeofday=no
10748 fi
10749 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10750 LIBS=$ac_check_lib_save_LIBS
10751 fi
10752 echo "$as_me:10752: result: $ac_cv_lib_bsd_gettimeofday" >&5
10753 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
10754 if test $ac_cv_lib_bsd_gettimeofday = yes; then
10755   cat >>confdefs.h <<\EOF
10756 #define HAVE_GETTIMEOFDAY 1
10757 EOF
10758
10759         LIBS="$LIBS -lbsd"
10760 fi
10761
10762 fi
10763
10764 echo "$as_me:10764: checking if -lm needed for math functions" >&5
10765 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
10766 if test "${cf_cv_need_libm+set}" = set; then
10767   echo $ECHO_N "(cached) $ECHO_C" >&6
10768 else
10769
10770         cat >conftest.$ac_ext <<_ACEOF
10771 #line 10771 "configure"
10772 #include "confdefs.h"
10773
10774         #include <stdio.h>
10775         #include <math.h>
10776
10777 int
10778 main ()
10779 {
10780 double x = rand(); printf("result = %g\n", sin(x))
10781   ;
10782   return 0;
10783 }
10784 _ACEOF
10785 rm -f conftest.$ac_objext conftest$ac_exeext
10786 if { (eval echo "$as_me:10786: \"$ac_link\"") >&5
10787   (eval $ac_link) 2>&5
10788   ac_status=$?
10789   echo "$as_me:10789: \$? = $ac_status" >&5
10790   (exit $ac_status); } &&
10791          { ac_try='test -s conftest$ac_exeext'
10792   { (eval echo "$as_me:10792: \"$ac_try\"") >&5
10793   (eval $ac_try) 2>&5
10794   ac_status=$?
10795   echo "$as_me:10795: \$? = $ac_status" >&5
10796   (exit $ac_status); }; }; then
10797   cf_cv_need_libm=no
10798 else
10799   echo "$as_me: failed program was:" >&5
10800 cat conftest.$ac_ext >&5
10801 cf_cv_need_libm=yes
10802 fi
10803 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10804 fi
10805 echo "$as_me:10805: result: $cf_cv_need_libm" >&5
10806 echo "${ECHO_T}$cf_cv_need_libm" >&6
10807 if test "$cf_cv_need_libm" = yes
10808 then
10809 MATH_LIB=-lm
10810 fi
10811
10812 ###     Checks for header files.
10813 echo "$as_me:10813: checking for ANSI C header files" >&5
10814 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10815 if test "${ac_cv_header_stdc+set}" = set; then
10816   echo $ECHO_N "(cached) $ECHO_C" >&6
10817 else
10818   cat >conftest.$ac_ext <<_ACEOF
10819 #line 10819 "configure"
10820 #include "confdefs.h"
10821 #include <stdlib.h>
10822 #include <stdarg.h>
10823 #include <string.h>
10824 #include <float.h>
10825
10826 _ACEOF
10827 if { (eval echo "$as_me:10827: \"$ac_cpp conftest.$ac_ext\"") >&5
10828   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10829   ac_status=$?
10830   egrep -v '^ *\+' conftest.er1 >conftest.err
10831   rm -f conftest.er1
10832   cat conftest.err >&5
10833   echo "$as_me:10833: \$? = $ac_status" >&5
10834   (exit $ac_status); } >/dev/null; then
10835   if test -s conftest.err; then
10836     ac_cpp_err=$ac_c_preproc_warn_flag
10837   else
10838     ac_cpp_err=
10839   fi
10840 else
10841   ac_cpp_err=yes
10842 fi
10843 if test -z "$ac_cpp_err"; then
10844   ac_cv_header_stdc=yes
10845 else
10846   echo "$as_me: failed program was:" >&5
10847   cat conftest.$ac_ext >&5
10848   ac_cv_header_stdc=no
10849 fi
10850 rm -f conftest.err conftest.$ac_ext
10851
10852 if test $ac_cv_header_stdc = yes; then
10853   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10854   cat >conftest.$ac_ext <<_ACEOF
10855 #line 10855 "configure"
10856 #include "confdefs.h"
10857 #include <string.h>
10858
10859 _ACEOF
10860 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10861   egrep "memchr" >/dev/null 2>&1; then
10862   :
10863 else
10864   ac_cv_header_stdc=no
10865 fi
10866 rm -f conftest*
10867
10868 fi
10869
10870 if test $ac_cv_header_stdc = yes; then
10871   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10872   cat >conftest.$ac_ext <<_ACEOF
10873 #line 10873 "configure"
10874 #include "confdefs.h"
10875 #include <stdlib.h>
10876
10877 _ACEOF
10878 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10879   egrep "free" >/dev/null 2>&1; then
10880   :
10881 else
10882   ac_cv_header_stdc=no
10883 fi
10884 rm -f conftest*
10885
10886 fi
10887
10888 if test $ac_cv_header_stdc = yes; then
10889   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10890   if test "$cross_compiling" = yes; then
10891   :
10892 else
10893   cat >conftest.$ac_ext <<_ACEOF
10894 #line 10894 "configure"
10895 #include "confdefs.h"
10896 #include <ctype.h>
10897 #if ((' ' & 0x0FF) == 0x020)
10898 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10899 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10900 #else
10901 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10902                      || ('j' <= (c) && (c) <= 'r') \
10903                      || ('s' <= (c) && (c) <= 'z'))
10904 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10905 #endif
10906
10907 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10908 int
10909 main ()
10910 {
10911   int i;
10912   for (i = 0; i < 256; i++)
10913     if (XOR (islower (i), ISLOWER (i))
10914         || toupper (i) != TOUPPER (i))
10915       $ac_main_return(2);
10916   $ac_main_return (0);
10917 }
10918 _ACEOF
10919 rm -f conftest$ac_exeext
10920 if { (eval echo "$as_me:10920: \"$ac_link\"") >&5
10921   (eval $ac_link) 2>&5
10922   ac_status=$?
10923   echo "$as_me:10923: \$? = $ac_status" >&5
10924   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10925   { (eval echo "$as_me:10925: \"$ac_try\"") >&5
10926   (eval $ac_try) 2>&5
10927   ac_status=$?
10928   echo "$as_me:10928: \$? = $ac_status" >&5
10929   (exit $ac_status); }; }; then
10930   :
10931 else
10932   echo "$as_me: program exited with status $ac_status" >&5
10933 echo "$as_me: failed program was:" >&5
10934 cat conftest.$ac_ext >&5
10935 ac_cv_header_stdc=no
10936 fi
10937 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10938 fi
10939 fi
10940 fi
10941 echo "$as_me:10941: result: $ac_cv_header_stdc" >&5
10942 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10943 if test $ac_cv_header_stdc = yes; then
10944
10945 cat >>confdefs.h <<\EOF
10946 #define STDC_HEADERS 1
10947 EOF
10948
10949 fi
10950
10951 ac_header_dirent=no
10952 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10953   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10954 echo "$as_me:10954: checking for $ac_hdr that defines DIR" >&5
10955 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10956 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10957   echo $ECHO_N "(cached) $ECHO_C" >&6
10958 else
10959   cat >conftest.$ac_ext <<_ACEOF
10960 #line 10960 "configure"
10961 #include "confdefs.h"
10962 #include <sys/types.h>
10963 #include <$ac_hdr>
10964
10965 int
10966 main ()
10967 {
10968 if ((DIR *) 0)
10969 return 0;
10970   ;
10971   return 0;
10972 }
10973 _ACEOF
10974 rm -f conftest.$ac_objext
10975 if { (eval echo "$as_me:10975: \"$ac_compile\"") >&5
10976   (eval $ac_compile) 2>&5
10977   ac_status=$?
10978   echo "$as_me:10978: \$? = $ac_status" >&5
10979   (exit $ac_status); } &&
10980          { ac_try='test -s conftest.$ac_objext'
10981   { (eval echo "$as_me:10981: \"$ac_try\"") >&5
10982   (eval $ac_try) 2>&5
10983   ac_status=$?
10984   echo "$as_me:10984: \$? = $ac_status" >&5
10985   (exit $ac_status); }; }; then
10986   eval "$as_ac_Header=yes"
10987 else
10988   echo "$as_me: failed program was:" >&5
10989 cat conftest.$ac_ext >&5
10990 eval "$as_ac_Header=no"
10991 fi
10992 rm -f conftest.$ac_objext conftest.$ac_ext
10993 fi
10994 echo "$as_me:10994: result: `eval echo '${'$as_ac_Header'}'`" >&5
10995 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10996 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10997   cat >>confdefs.h <<EOF
10998 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10999 EOF
11000
11001 ac_header_dirent=$ac_hdr; break
11002 fi
11003
11004 done
11005 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11006 if test $ac_header_dirent = dirent.h; then
11007   echo "$as_me:11007: checking for opendir in -ldir" >&5
11008 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
11009 if test "${ac_cv_lib_dir_opendir+set}" = set; then
11010   echo $ECHO_N "(cached) $ECHO_C" >&6
11011 else
11012   ac_check_lib_save_LIBS=$LIBS
11013 LIBS="-ldir  $LIBS"
11014 cat >conftest.$ac_ext <<_ACEOF
11015 #line 11015 "configure"
11016 #include "confdefs.h"
11017
11018 /* Override any gcc2 internal prototype to avoid an error.  */
11019 #ifdef __cplusplus
11020 extern "C"
11021 #endif
11022 /* We use char because int might match the return type of a gcc2
11023    builtin and then its argument prototype would still apply.  */
11024 char opendir ();
11025 int
11026 main ()
11027 {
11028 opendir ();
11029   ;
11030   return 0;
11031 }
11032 _ACEOF
11033 rm -f conftest.$ac_objext conftest$ac_exeext
11034 if { (eval echo "$as_me:11034: \"$ac_link\"") >&5
11035   (eval $ac_link) 2>&5
11036   ac_status=$?
11037   echo "$as_me:11037: \$? = $ac_status" >&5
11038   (exit $ac_status); } &&
11039          { ac_try='test -s conftest$ac_exeext'
11040   { (eval echo "$as_me:11040: \"$ac_try\"") >&5
11041   (eval $ac_try) 2>&5
11042   ac_status=$?
11043   echo "$as_me:11043: \$? = $ac_status" >&5
11044   (exit $ac_status); }; }; then
11045   ac_cv_lib_dir_opendir=yes
11046 else
11047   echo "$as_me: failed program was:" >&5
11048 cat conftest.$ac_ext >&5
11049 ac_cv_lib_dir_opendir=no
11050 fi
11051 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11052 LIBS=$ac_check_lib_save_LIBS
11053 fi
11054 echo "$as_me:11054: result: $ac_cv_lib_dir_opendir" >&5
11055 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
11056 if test $ac_cv_lib_dir_opendir = yes; then
11057   LIBS="$LIBS -ldir"
11058 fi
11059
11060 else
11061   echo "$as_me:11061: checking for opendir in -lx" >&5
11062 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
11063 if test "${ac_cv_lib_x_opendir+set}" = set; then
11064   echo $ECHO_N "(cached) $ECHO_C" >&6
11065 else
11066   ac_check_lib_save_LIBS=$LIBS
11067 LIBS="-lx  $LIBS"
11068 cat >conftest.$ac_ext <<_ACEOF
11069 #line 11069 "configure"
11070 #include "confdefs.h"
11071
11072 /* Override any gcc2 internal prototype to avoid an error.  */
11073 #ifdef __cplusplus
11074 extern "C"
11075 #endif
11076 /* We use char because int might match the return type of a gcc2
11077    builtin and then its argument prototype would still apply.  */
11078 char opendir ();
11079 int
11080 main ()
11081 {
11082 opendir ();
11083   ;
11084   return 0;
11085 }
11086 _ACEOF
11087 rm -f conftest.$ac_objext conftest$ac_exeext
11088 if { (eval echo "$as_me:11088: \"$ac_link\"") >&5
11089   (eval $ac_link) 2>&5
11090   ac_status=$?
11091   echo "$as_me:11091: \$? = $ac_status" >&5
11092   (exit $ac_status); } &&
11093          { ac_try='test -s conftest$ac_exeext'
11094   { (eval echo "$as_me:11094: \"$ac_try\"") >&5
11095   (eval $ac_try) 2>&5
11096   ac_status=$?
11097   echo "$as_me:11097: \$? = $ac_status" >&5
11098   (exit $ac_status); }; }; then
11099   ac_cv_lib_x_opendir=yes
11100 else
11101   echo "$as_me: failed program was:" >&5
11102 cat conftest.$ac_ext >&5
11103 ac_cv_lib_x_opendir=no
11104 fi
11105 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11106 LIBS=$ac_check_lib_save_LIBS
11107 fi
11108 echo "$as_me:11108: result: $ac_cv_lib_x_opendir" >&5
11109 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
11110 if test $ac_cv_lib_x_opendir = yes; then
11111   LIBS="$LIBS -lx"
11112 fi
11113
11114 fi
11115
11116 echo "$as_me:11116: checking whether time.h and sys/time.h may both be included" >&5
11117 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
11118 if test "${ac_cv_header_time+set}" = set; then
11119   echo $ECHO_N "(cached) $ECHO_C" >&6
11120 else
11121   cat >conftest.$ac_ext <<_ACEOF
11122 #line 11122 "configure"
11123 #include "confdefs.h"
11124 #include <sys/types.h>
11125 #include <sys/time.h>
11126 #include <time.h>
11127
11128 int
11129 main ()
11130 {
11131 if ((struct tm *) 0)
11132 return 0;
11133   ;
11134   return 0;
11135 }
11136 _ACEOF
11137 rm -f conftest.$ac_objext
11138 if { (eval echo "$as_me:11138: \"$ac_compile\"") >&5
11139   (eval $ac_compile) 2>&5
11140   ac_status=$?
11141   echo "$as_me:11141: \$? = $ac_status" >&5
11142   (exit $ac_status); } &&
11143          { ac_try='test -s conftest.$ac_objext'
11144   { (eval echo "$as_me:11144: \"$ac_try\"") >&5
11145   (eval $ac_try) 2>&5
11146   ac_status=$?
11147   echo "$as_me:11147: \$? = $ac_status" >&5
11148   (exit $ac_status); }; }; then
11149   ac_cv_header_time=yes
11150 else
11151   echo "$as_me: failed program was:" >&5
11152 cat conftest.$ac_ext >&5
11153 ac_cv_header_time=no
11154 fi
11155 rm -f conftest.$ac_objext conftest.$ac_ext
11156 fi
11157 echo "$as_me:11157: result: $ac_cv_header_time" >&5
11158 echo "${ECHO_T}$ac_cv_header_time" >&6
11159 if test $ac_cv_header_time = yes; then
11160
11161 cat >>confdefs.h <<\EOF
11162 #define TIME_WITH_SYS_TIME 1
11163 EOF
11164
11165 fi
11166
11167 echo "$as_me:11167: checking for regular-expression headers" >&5
11168 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
11169 if test "${cf_cv_regex+set}" = set; then
11170   echo $ECHO_N "(cached) $ECHO_C" >&6
11171 else
11172
11173 cat >conftest.$ac_ext <<_ACEOF
11174 #line 11174 "configure"
11175 #include "confdefs.h"
11176 #include <sys/types.h>
11177 #include <regex.h>
11178 int
11179 main ()
11180 {
11181
11182         regex_t *p;
11183         int x = regcomp(p, "", 0);
11184         int y = regexec(p, "", 0, 0, 0);
11185         regfree(p);
11186
11187   ;
11188   return 0;
11189 }
11190 _ACEOF
11191 rm -f conftest.$ac_objext conftest$ac_exeext
11192 if { (eval echo "$as_me:11192: \"$ac_link\"") >&5
11193   (eval $ac_link) 2>&5
11194   ac_status=$?
11195   echo "$as_me:11195: \$? = $ac_status" >&5
11196   (exit $ac_status); } &&
11197          { ac_try='test -s conftest$ac_exeext'
11198   { (eval echo "$as_me:11198: \"$ac_try\"") >&5
11199   (eval $ac_try) 2>&5
11200   ac_status=$?
11201   echo "$as_me:11201: \$? = $ac_status" >&5
11202   (exit $ac_status); }; }; then
11203   cf_cv_regex="regex.h"
11204 else
11205   echo "$as_me: failed program was:" >&5
11206 cat conftest.$ac_ext >&5
11207
11208         cat >conftest.$ac_ext <<_ACEOF
11209 #line 11209 "configure"
11210 #include "confdefs.h"
11211 #include <regexp.h>
11212 int
11213 main ()
11214 {
11215
11216                 char *p = compile("", "", "", 0);
11217                 int x = step("", "");
11218
11219   ;
11220   return 0;
11221 }
11222 _ACEOF
11223 rm -f conftest.$ac_objext conftest$ac_exeext
11224 if { (eval echo "$as_me:11224: \"$ac_link\"") >&5
11225   (eval $ac_link) 2>&5
11226   ac_status=$?
11227   echo "$as_me:11227: \$? = $ac_status" >&5
11228   (exit $ac_status); } &&
11229          { ac_try='test -s conftest$ac_exeext'
11230   { (eval echo "$as_me:11230: \"$ac_try\"") >&5
11231   (eval $ac_try) 2>&5
11232   ac_status=$?
11233   echo "$as_me:11233: \$? = $ac_status" >&5
11234   (exit $ac_status); }; }; then
11235   cf_cv_regex="regexp.h"
11236 else
11237   echo "$as_me: failed program was:" >&5
11238 cat conftest.$ac_ext >&5
11239
11240                 cf_save_LIBS="$LIBS"
11241                 LIBS="-lgen $LIBS"
11242                 cat >conftest.$ac_ext <<_ACEOF
11243 #line 11243 "configure"
11244 #include "confdefs.h"
11245 #include <regexpr.h>
11246 int
11247 main ()
11248 {
11249
11250                         char *p = compile("", "", "");
11251                         int x = step("", "");
11252
11253   ;
11254   return 0;
11255 }
11256 _ACEOF
11257 rm -f conftest.$ac_objext conftest$ac_exeext
11258 if { (eval echo "$as_me:11258: \"$ac_link\"") >&5
11259   (eval $ac_link) 2>&5
11260   ac_status=$?
11261   echo "$as_me:11261: \$? = $ac_status" >&5
11262   (exit $ac_status); } &&
11263          { ac_try='test -s conftest$ac_exeext'
11264   { (eval echo "$as_me:11264: \"$ac_try\"") >&5
11265   (eval $ac_try) 2>&5
11266   ac_status=$?
11267   echo "$as_me:11267: \$? = $ac_status" >&5
11268   (exit $ac_status); }; }; then
11269   cf_cv_regex="regexpr.h"
11270 else
11271   echo "$as_me: failed program was:" >&5
11272 cat conftest.$ac_ext >&5
11273 LIBS="$cf_save_LIBS"
11274 fi
11275 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11276 fi
11277 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11278 fi
11279 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11280
11281 fi
11282
11283 echo "$as_me:11283: result: $cf_cv_regex" >&5
11284 echo "${ECHO_T}$cf_cv_regex" >&6
11285 case $cf_cv_regex in
11286         regex.h)   cat >>confdefs.h <<\EOF
11287 #define HAVE_REGEX_H_FUNCS 1
11288 EOF
11289  ;;
11290         regexp.h)  cat >>confdefs.h <<\EOF
11291 #define HAVE_REGEXP_H_FUNCS 1
11292 EOF
11293  ;;
11294         regexpr.h) cat >>confdefs.h <<\EOF
11295 #define HAVE_REGEXPR_H_FUNCS 1
11296 EOF
11297  ;;
11298 esac
11299
11300 for ac_header in \
11301 fcntl.h \
11302 getopt.h \
11303 limits.h \
11304 locale.h \
11305 poll.h \
11306 sys/bsdtypes.h \
11307 sys/ioctl.h \
11308 sys/param.h \
11309 sys/poll.h \
11310 sys/select.h \
11311 sys/time.h \
11312 sys/times.h \
11313 ttyent.h \
11314 unistd.h \
11315 wctype.h \
11316
11317 do
11318 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11319 echo "$as_me:11319: checking for $ac_header" >&5
11320 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11321 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11322   echo $ECHO_N "(cached) $ECHO_C" >&6
11323 else
11324   cat >conftest.$ac_ext <<_ACEOF
11325 #line 11325 "configure"
11326 #include "confdefs.h"
11327 #include <$ac_header>
11328 _ACEOF
11329 if { (eval echo "$as_me:11329: \"$ac_cpp conftest.$ac_ext\"") >&5
11330   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11331   ac_status=$?
11332   egrep -v '^ *\+' conftest.er1 >conftest.err
11333   rm -f conftest.er1
11334   cat conftest.err >&5
11335   echo "$as_me:11335: \$? = $ac_status" >&5
11336   (exit $ac_status); } >/dev/null; then
11337   if test -s conftest.err; then
11338     ac_cpp_err=$ac_c_preproc_warn_flag
11339   else
11340     ac_cpp_err=
11341   fi
11342 else
11343   ac_cpp_err=yes
11344 fi
11345 if test -z "$ac_cpp_err"; then
11346   eval "$as_ac_Header=yes"
11347 else
11348   echo "$as_me: failed program was:" >&5
11349   cat conftest.$ac_ext >&5
11350   eval "$as_ac_Header=no"
11351 fi
11352 rm -f conftest.err conftest.$ac_ext
11353 fi
11354 echo "$as_me:11354: result: `eval echo '${'$as_ac_Header'}'`" >&5
11355 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11356 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11357   cat >>confdefs.h <<EOF
11358 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11359 EOF
11360
11361 fi
11362 done
11363
11364 # check for ISC (this may also define _POSIX_SOURCE)
11365 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
11366 if test "$ISC" = yes ; then
11367
11368 echo "$as_me:11368: checking for main in -lcposix" >&5
11369 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
11370 if test "${ac_cv_lib_cposix_main+set}" = set; then
11371   echo $ECHO_N "(cached) $ECHO_C" >&6
11372 else
11373   ac_check_lib_save_LIBS=$LIBS
11374 LIBS="-lcposix  $LIBS"
11375 cat >conftest.$ac_ext <<_ACEOF
11376 #line 11376 "configure"
11377 #include "confdefs.h"
11378
11379 int
11380 main ()
11381 {
11382 main ();
11383   ;
11384   return 0;
11385 }
11386 _ACEOF
11387 rm -f conftest.$ac_objext conftest$ac_exeext
11388 if { (eval echo "$as_me:11388: \"$ac_link\"") >&5
11389   (eval $ac_link) 2>&5
11390   ac_status=$?
11391   echo "$as_me:11391: \$? = $ac_status" >&5
11392   (exit $ac_status); } &&
11393          { ac_try='test -s conftest$ac_exeext'
11394   { (eval echo "$as_me:11394: \"$ac_try\"") >&5
11395   (eval $ac_try) 2>&5
11396   ac_status=$?
11397   echo "$as_me:11397: \$? = $ac_status" >&5
11398   (exit $ac_status); }; }; then
11399   ac_cv_lib_cposix_main=yes
11400 else
11401   echo "$as_me: failed program was:" >&5
11402 cat conftest.$ac_ext >&5
11403 ac_cv_lib_cposix_main=no
11404 fi
11405 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11406 LIBS=$ac_check_lib_save_LIBS
11407 fi
11408 echo "$as_me:11408: result: $ac_cv_lib_cposix_main" >&5
11409 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
11410 if test $ac_cv_lib_cposix_main = yes; then
11411   cat >>confdefs.h <<EOF
11412 #define HAVE_LIBCPOSIX 1
11413 EOF
11414
11415   LIBS="-lcposix $LIBS"
11416
11417 fi
11418
11419         echo "$as_me:11419: checking for bzero in -linet" >&5
11420 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
11421 if test "${ac_cv_lib_inet_bzero+set}" = set; then
11422   echo $ECHO_N "(cached) $ECHO_C" >&6
11423 else
11424   ac_check_lib_save_LIBS=$LIBS
11425 LIBS="-linet  $LIBS"
11426 cat >conftest.$ac_ext <<_ACEOF
11427 #line 11427 "configure"
11428 #include "confdefs.h"
11429
11430 /* Override any gcc2 internal prototype to avoid an error.  */
11431 #ifdef __cplusplus
11432 extern "C"
11433 #endif
11434 /* We use char because int might match the return type of a gcc2
11435    builtin and then its argument prototype would still apply.  */
11436 char bzero ();
11437 int
11438 main ()
11439 {
11440 bzero ();
11441   ;
11442   return 0;
11443 }
11444 _ACEOF
11445 rm -f conftest.$ac_objext conftest$ac_exeext
11446 if { (eval echo "$as_me:11446: \"$ac_link\"") >&5
11447   (eval $ac_link) 2>&5
11448   ac_status=$?
11449   echo "$as_me:11449: \$? = $ac_status" >&5
11450   (exit $ac_status); } &&
11451          { ac_try='test -s conftest$ac_exeext'
11452   { (eval echo "$as_me:11452: \"$ac_try\"") >&5
11453   (eval $ac_try) 2>&5
11454   ac_status=$?
11455   echo "$as_me:11455: \$? = $ac_status" >&5
11456   (exit $ac_status); }; }; then
11457   ac_cv_lib_inet_bzero=yes
11458 else
11459   echo "$as_me: failed program was:" >&5
11460 cat conftest.$ac_ext >&5
11461 ac_cv_lib_inet_bzero=no
11462 fi
11463 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11464 LIBS=$ac_check_lib_save_LIBS
11465 fi
11466 echo "$as_me:11466: result: $ac_cv_lib_inet_bzero" >&5
11467 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
11468 if test $ac_cv_lib_inet_bzero = yes; then
11469   LIBS="$LIBS -linet"
11470 fi
11471 fi
11472
11473 echo "$as_me:11473: checking if sys/time.h works with sys/select.h" >&5
11474 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
11475 if test "${cf_cv_sys_time_select+set}" = set; then
11476   echo $ECHO_N "(cached) $ECHO_C" >&6
11477 else
11478
11479 cat >conftest.$ac_ext <<_ACEOF
11480 #line 11480 "configure"
11481 #include "confdefs.h"
11482
11483 #include <sys/types.h>
11484 #ifdef HAVE_SYS_TIME_H
11485 #include <sys/time.h>
11486 #endif
11487 #ifdef HAVE_SYS_SELECT_H
11488 #include <sys/select.h>
11489 #endif
11490
11491 int
11492 main ()
11493 {
11494
11495   ;
11496   return 0;
11497 }
11498 _ACEOF
11499 rm -f conftest.$ac_objext
11500 if { (eval echo "$as_me:11500: \"$ac_compile\"") >&5
11501   (eval $ac_compile) 2>&5
11502   ac_status=$?
11503   echo "$as_me:11503: \$? = $ac_status" >&5
11504   (exit $ac_status); } &&
11505          { ac_try='test -s conftest.$ac_objext'
11506   { (eval echo "$as_me:11506: \"$ac_try\"") >&5
11507   (eval $ac_try) 2>&5
11508   ac_status=$?
11509   echo "$as_me:11509: \$? = $ac_status" >&5
11510   (exit $ac_status); }; }; then
11511   cf_cv_sys_time_select=yes
11512 else
11513   echo "$as_me: failed program was:" >&5
11514 cat conftest.$ac_ext >&5
11515 cf_cv_sys_time_select=no
11516 fi
11517 rm -f conftest.$ac_objext conftest.$ac_ext
11518
11519 fi
11520
11521 echo "$as_me:11521: result: $cf_cv_sys_time_select" >&5
11522 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
11523 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
11524 #define HAVE_SYS_TIME_SELECT 1
11525 EOF
11526
11527 ###     checks for compiler characteristics
11528 ac_ext=c
11529 ac_cpp='$CPP $CPPFLAGS'
11530 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11531 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11532 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11533 ac_main_return=return
11534
11535 echo "$as_me:11535: checking for $CC option to accept ANSI C" >&5
11536 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
11537 if test "${ac_cv_prog_cc_stdc+set}" = set; then
11538   echo $ECHO_N "(cached) $ECHO_C" >&6
11539 else
11540   ac_cv_prog_cc_stdc=no
11541 ac_save_CC=$CC
11542 cat >conftest.$ac_ext <<_ACEOF
11543 #line 11543 "configure"
11544 #include "confdefs.h"
11545 #include <stdarg.h>
11546 #include <stdio.h>
11547 #include <sys/types.h>
11548 #include <sys/stat.h>
11549 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
11550 struct buf { int x; };
11551 FILE * (*rcsopen) (struct buf *, struct stat *, int);
11552 static char *e (p, i)
11553      char **p;
11554      int i;
11555 {
11556   return p[i];
11557 }
11558 static char *f (char * (*g) (char **, int), char **p, ...)
11559 {
11560   char *s;
11561   va_list v;
11562   va_start (v,p);
11563   s = g (p, va_arg (v,int));
11564   va_end (v);
11565   return s;
11566 }
11567 int test (int i, double x);
11568 struct s1 {int (*f) (int a);};
11569 struct s2 {int (*f) (double a);};
11570 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
11571 int argc;
11572 char **argv;
11573 int
11574 main ()
11575 {
11576 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
11577   ;
11578   return 0;
11579 }
11580 _ACEOF
11581 # Don't try gcc -ansi; that turns off useful extensions and
11582 # breaks some systems' header files.
11583 # AIX                   -qlanglvl=ansi
11584 # Ultrix and OSF/1      -std1
11585 # HP-UX 10.20 and later -Ae
11586 # HP-UX older versions  -Aa -D_HPUX_SOURCE
11587 # SVR4                  -Xc -D__EXTENSIONS__
11588 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
11589 do
11590   CC="$ac_save_CC $ac_arg"
11591   rm -f conftest.$ac_objext
11592 if { (eval echo "$as_me:11592: \"$ac_compile\"") >&5
11593   (eval $ac_compile) 2>&5
11594   ac_status=$?
11595   echo "$as_me:11595: \$? = $ac_status" >&5
11596   (exit $ac_status); } &&
11597          { ac_try='test -s conftest.$ac_objext'
11598   { (eval echo "$as_me:11598: \"$ac_try\"") >&5
11599   (eval $ac_try) 2>&5
11600   ac_status=$?
11601   echo "$as_me:11601: \$? = $ac_status" >&5
11602   (exit $ac_status); }; }; then
11603   ac_cv_prog_cc_stdc=$ac_arg
11604 break
11605 else
11606   echo "$as_me: failed program was:" >&5
11607 cat conftest.$ac_ext >&5
11608 fi
11609 rm -f conftest.$ac_objext
11610 done
11611 rm -f conftest.$ac_ext conftest.$ac_objext
11612 CC=$ac_save_CC
11613
11614 fi
11615
11616 case "x$ac_cv_prog_cc_stdc" in
11617   x|xno)
11618     echo "$as_me:11618: result: none needed" >&5
11619 echo "${ECHO_T}none needed" >&6 ;;
11620   *)
11621     echo "$as_me:11621: result: $ac_cv_prog_cc_stdc" >&5
11622 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
11623     CC="$CC $ac_cv_prog_cc_stdc" ;;
11624 esac
11625
11626 echo "$as_me:11626: checking for an ANSI C-conforming const" >&5
11627 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
11628 if test "${ac_cv_c_const+set}" = set; then
11629   echo $ECHO_N "(cached) $ECHO_C" >&6
11630 else
11631   cat >conftest.$ac_ext <<_ACEOF
11632 #line 11632 "configure"
11633 #include "confdefs.h"
11634
11635 int
11636 main ()
11637 {
11638 /* FIXME: Include the comments suggested by Paul. */
11639 #ifndef __cplusplus
11640   /* Ultrix mips cc rejects this.  */
11641   typedef int charset[2];
11642   const charset x;
11643   /* SunOS 4.1.1 cc rejects this.  */
11644   char const *const *ccp;
11645   char **p;
11646   /* NEC SVR4.0.2 mips cc rejects this.  */
11647   struct point {int x, y;};
11648   static struct point const zero = {0,0};
11649   /* AIX XL C 1.02.0.0 rejects this.
11650      It does not let you subtract one const X* pointer from another in
11651      an arm of an if-expression whose if-part is not a constant
11652      expression */
11653   const char *g = "string";
11654   ccp = &g + (g ? g-g : 0);
11655   /* HPUX 7.0 cc rejects these. */
11656   ++ccp;
11657   p = (char**) ccp;
11658   ccp = (char const *const *) p;
11659   { /* SCO 3.2v4 cc rejects this.  */
11660     char *t;
11661     char const *s = 0 ? (char *) 0 : (char const *) 0;
11662
11663     *t++ = 0;
11664   }
11665   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11666     int x[] = {25, 17};
11667     const int *foo = &x[0];
11668     ++foo;
11669   }
11670   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11671     typedef const int *iptr;
11672     iptr p = 0;
11673     ++p;
11674   }
11675   { /* AIX XL C 1.02.0.0 rejects this saying
11676        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11677     struct s { int j; const int *ap[3]; };
11678     struct s *b; b->j = 5;
11679   }
11680   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11681     const int foo = 10;
11682   }
11683 #endif
11684
11685   ;
11686   return 0;
11687 }
11688 _ACEOF
11689 rm -f conftest.$ac_objext
11690 if { (eval echo "$as_me:11690: \"$ac_compile\"") >&5
11691   (eval $ac_compile) 2>&5
11692   ac_status=$?
11693   echo "$as_me:11693: \$? = $ac_status" >&5
11694   (exit $ac_status); } &&
11695          { ac_try='test -s conftest.$ac_objext'
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   ac_cv_c_const=yes
11702 else
11703   echo "$as_me: failed program was:" >&5
11704 cat conftest.$ac_ext >&5
11705 ac_cv_c_const=no
11706 fi
11707 rm -f conftest.$ac_objext conftest.$ac_ext
11708 fi
11709 echo "$as_me:11709: result: $ac_cv_c_const" >&5
11710 echo "${ECHO_T}$ac_cv_c_const" >&6
11711 if test $ac_cv_c_const = no; then
11712
11713 cat >>confdefs.h <<\EOF
11714 #define const
11715 EOF
11716
11717 fi
11718
11719 echo "$as_me:11719: checking for inline" >&5
11720 echo $ECHO_N "checking for inline... $ECHO_C" >&6
11721 if test "${ac_cv_c_inline+set}" = set; then
11722   echo $ECHO_N "(cached) $ECHO_C" >&6
11723 else
11724   ac_cv_c_inline=no
11725 for ac_kw in inline __inline__ __inline; do
11726   cat >conftest.$ac_ext <<_ACEOF
11727 #line 11727 "configure"
11728 #include "confdefs.h"
11729 #ifndef __cplusplus
11730 static $ac_kw int static_foo () {return 0; }
11731 $ac_kw int foo () {return 0; }
11732 #endif
11733
11734 _ACEOF
11735 rm -f conftest.$ac_objext
11736 if { (eval echo "$as_me:11736: \"$ac_compile\"") >&5
11737   (eval $ac_compile) 2>&5
11738   ac_status=$?
11739   echo "$as_me:11739: \$? = $ac_status" >&5
11740   (exit $ac_status); } &&
11741          { ac_try='test -s conftest.$ac_objext'
11742   { (eval echo "$as_me:11742: \"$ac_try\"") >&5
11743   (eval $ac_try) 2>&5
11744   ac_status=$?
11745   echo "$as_me:11745: \$? = $ac_status" >&5
11746   (exit $ac_status); }; }; then
11747   ac_cv_c_inline=$ac_kw; break
11748 else
11749   echo "$as_me: failed program was:" >&5
11750 cat conftest.$ac_ext >&5
11751 fi
11752 rm -f conftest.$ac_objext conftest.$ac_ext
11753 done
11754
11755 fi
11756 echo "$as_me:11756: result: $ac_cv_c_inline" >&5
11757 echo "${ECHO_T}$ac_cv_c_inline" >&6
11758 case $ac_cv_c_inline in
11759   inline | yes) ;;
11760   no)
11761 cat >>confdefs.h <<\EOF
11762 #define inline
11763 EOF
11764  ;;
11765   *)  cat >>confdefs.h <<EOF
11766 #define inline $ac_cv_c_inline
11767 EOF
11768  ;;
11769 esac
11770
11771 NCURSES_INLINE=
11772 if test "$ac_cv_c_inline" != no ; then
11773   NCURSES_INLINE=inline
11774   if test "$INTEL_COMPILER" = yes
11775   then
11776     :
11777   elif test "$GCC" = yes
11778   then
11779     echo "$as_me:11779: checking if gcc supports options to tune inlining" >&5
11780 echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6
11781 if test "${cf_cv_gcc_inline+set}" = set; then
11782   echo $ECHO_N "(cached) $ECHO_C" >&6
11783 else
11784
11785       cf_save_CFLAGS=$CFLAGS
11786       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
11787       cat >conftest.$ac_ext <<_ACEOF
11788 #line 11788 "configure"
11789 #include "confdefs.h"
11790 inline int foo(void) { return 1; }
11791 int
11792 main ()
11793 {
11794 ${cf_cv_main_return:-return} foo()
11795   ;
11796   return 0;
11797 }
11798 _ACEOF
11799 rm -f conftest.$ac_objext
11800 if { (eval echo "$as_me:11800: \"$ac_compile\"") >&5
11801   (eval $ac_compile) 2>&5
11802   ac_status=$?
11803   echo "$as_me:11803: \$? = $ac_status" >&5
11804   (exit $ac_status); } &&
11805          { ac_try='test -s conftest.$ac_objext'
11806   { (eval echo "$as_me:11806: \"$ac_try\"") >&5
11807   (eval $ac_try) 2>&5
11808   ac_status=$?
11809   echo "$as_me:11809: \$? = $ac_status" >&5
11810   (exit $ac_status); }; }; then
11811   cf_cv_gcc_inline=yes
11812 else
11813   echo "$as_me: failed program was:" >&5
11814 cat conftest.$ac_ext >&5
11815 cf_cv_gcc_inline=no
11816 fi
11817 rm -f conftest.$ac_objext conftest.$ac_ext
11818       CFLAGS=$cf_save_CFLAGS
11819
11820 fi
11821 echo "$as_me:11821: result: $cf_cv_gcc_inline" >&5
11822 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
11823     if test "$cf_cv_gcc_inline" = yes ; then
11824
11825 cf_fix_cppflags=no
11826 cf_new_cflags=
11827 cf_new_cppflags=
11828 cf_new_extra_cppflags=
11829
11830 for cf_add_cflags in --param max-inline-insns-single=1200
11831 do
11832 case $cf_fix_cppflags in
11833 no)
11834         case $cf_add_cflags in #(vi
11835         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11836                 case $cf_add_cflags in
11837                 -D*)
11838                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11839
11840                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11841                         && test -z "${cf_tst_cflags}" \
11842                         && cf_fix_cppflags=yes
11843
11844                         if test $cf_fix_cppflags = yes ; then
11845                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11846                                 continue
11847                         elif test "${cf_tst_cflags}" = "\"'" ; then
11848                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11849                                 continue
11850                         fi
11851                         ;;
11852                 esac
11853                 case "$CPPFLAGS" in
11854                 *$cf_add_cflags) #(vi
11855                         ;;
11856                 *) #(vi
11857                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11858                         ;;
11859                 esac
11860                 ;;
11861         *)
11862                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11863                 ;;
11864         esac
11865         ;;
11866 yes)
11867         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11868
11869         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11870
11871         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11872         && test -z "${cf_tst_cflags}" \
11873         && cf_fix_cppflags=no
11874         ;;
11875 esac
11876 done
11877
11878 if test -n "$cf_new_cflags" ; then
11879
11880         CFLAGS="$CFLAGS $cf_new_cflags"
11881 fi
11882
11883 if test -n "$cf_new_cppflags" ; then
11884
11885         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
11886 fi
11887
11888 if test -n "$cf_new_extra_cppflags" ; then
11889
11890         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11891 fi
11892
11893     fi
11894   fi
11895 fi
11896
11897 echo "$as_me:11897: checking for signal global datatype" >&5
11898 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
11899 if test "${cf_cv_sig_atomic_t+set}" = set; then
11900   echo $ECHO_N "(cached) $ECHO_C" >&6
11901 else
11902
11903         for cf_type in \
11904                 "volatile sig_atomic_t" \
11905                 "sig_atomic_t" \
11906                 "int"
11907         do
11908         cat >conftest.$ac_ext <<_ACEOF
11909 #line 11909 "configure"
11910 #include "confdefs.h"
11911
11912 #include <sys/types.h>
11913 #include <signal.h>
11914 #include <stdio.h>
11915
11916 extern $cf_type x;
11917 $cf_type x;
11918 static void handler(int sig)
11919 {
11920         x = 5;
11921 }
11922 int
11923 main ()
11924 {
11925 signal(SIGINT, handler);
11926                  x = 1
11927   ;
11928   return 0;
11929 }
11930 _ACEOF
11931 rm -f conftest.$ac_objext
11932 if { (eval echo "$as_me:11932: \"$ac_compile\"") >&5
11933   (eval $ac_compile) 2>&5
11934   ac_status=$?
11935   echo "$as_me:11935: \$? = $ac_status" >&5
11936   (exit $ac_status); } &&
11937          { ac_try='test -s conftest.$ac_objext'
11938   { (eval echo "$as_me:11938: \"$ac_try\"") >&5
11939   (eval $ac_try) 2>&5
11940   ac_status=$?
11941   echo "$as_me:11941: \$? = $ac_status" >&5
11942   (exit $ac_status); }; }; then
11943   cf_cv_sig_atomic_t=$cf_type
11944 else
11945   echo "$as_me: failed program was:" >&5
11946 cat conftest.$ac_ext >&5
11947 cf_cv_sig_atomic_t=no
11948 fi
11949 rm -f conftest.$ac_objext conftest.$ac_ext
11950                 test "$cf_cv_sig_atomic_t" != no && break
11951         done
11952
11953 fi
11954
11955 echo "$as_me:11955: result: $cf_cv_sig_atomic_t" >&5
11956 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
11957 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
11958 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
11959 EOF
11960
11961 if test $NCURSES_CHTYPE = auto ; then
11962
11963 echo "$as_me:11963: checking for type of chtype" >&5
11964 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11965 if test "${cf_cv_typeof_chtype+set}" = set; then
11966   echo $ECHO_N "(cached) $ECHO_C" >&6
11967 else
11968
11969                 if test "$cross_compiling" = yes; then
11970   cf_cv_typeof_chtype=long
11971 else
11972   cat >conftest.$ac_ext <<_ACEOF
11973 #line 11973 "configure"
11974 #include "confdefs.h"
11975
11976 #define WANT_BITS 31
11977 #include <stdio.h>
11978 int main()
11979 {
11980         FILE *fp = fopen("cf_test.out", "w");
11981         if (fp != 0) {
11982                 char *result = "long";
11983                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
11984                         int n;
11985                         unsigned int x, y;
11986                         for (n = 0; n < WANT_BITS; n++) {
11987                                 x = (1 << n);
11988                                 y = (x >> n);
11989                                 if (y != 1 || x == 0) {
11990                                         x = 0;
11991                                         break;
11992                                 }
11993                         }
11994                         /*
11995                          * If x is nonzero, an int is big enough for the bits
11996                          * that we want.
11997                          */
11998                         result = (x != 0) ? "int" : "long";
11999                 }
12000                 fputs(result, fp);
12001                 fclose(fp);
12002         }
12003         ${cf_cv_main_return:-return}(0);
12004 }
12005
12006 _ACEOF
12007 rm -f conftest$ac_exeext
12008 if { (eval echo "$as_me:12008: \"$ac_link\"") >&5
12009   (eval $ac_link) 2>&5
12010   ac_status=$?
12011   echo "$as_me:12011: \$? = $ac_status" >&5
12012   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12013   { (eval echo "$as_me:12013: \"$ac_try\"") >&5
12014   (eval $ac_try) 2>&5
12015   ac_status=$?
12016   echo "$as_me:12016: \$? = $ac_status" >&5
12017   (exit $ac_status); }; }; then
12018   cf_cv_typeof_chtype=`cat cf_test.out`
12019 else
12020   echo "$as_me: program exited with status $ac_status" >&5
12021 echo "$as_me: failed program was:" >&5
12022 cat conftest.$ac_ext >&5
12023 cf_cv_typeof_chtype=long
12024 fi
12025 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12026 fi
12027                 rm -f cf_test.out
12028
12029 fi
12030
12031 echo "$as_me:12031: result: $cf_cv_typeof_chtype" >&5
12032 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
12033
12034 cat >>confdefs.h <<EOF
12035 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
12036 EOF
12037
12038 else
12039         cf_cv_typeof_chtype=$NCURSES_CHTYPE
12040 fi
12041 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
12042
12043 echo "$as_me:12043: checking if unsigned literals are legal" >&5
12044 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
12045 if test "${cf_cv_unsigned_literals+set}" = set; then
12046   echo $ECHO_N "(cached) $ECHO_C" >&6
12047 else
12048
12049         cat >conftest.$ac_ext <<_ACEOF
12050 #line 12050 "configure"
12051 #include "confdefs.h"
12052
12053 int
12054 main ()
12055 {
12056 long x = 1L + 1UL + 1U + 1
12057   ;
12058   return 0;
12059 }
12060 _ACEOF
12061 rm -f conftest.$ac_objext
12062 if { (eval echo "$as_me:12062: \"$ac_compile\"") >&5
12063   (eval $ac_compile) 2>&5
12064   ac_status=$?
12065   echo "$as_me:12065: \$? = $ac_status" >&5
12066   (exit $ac_status); } &&
12067          { ac_try='test -s conftest.$ac_objext'
12068   { (eval echo "$as_me:12068: \"$ac_try\"") >&5
12069   (eval $ac_try) 2>&5
12070   ac_status=$?
12071   echo "$as_me:12071: \$? = $ac_status" >&5
12072   (exit $ac_status); }; }; then
12073   cf_cv_unsigned_literals=yes
12074 else
12075   echo "$as_me: failed program was:" >&5
12076 cat conftest.$ac_ext >&5
12077 cf_cv_unsigned_literals=no
12078 fi
12079 rm -f conftest.$ac_objext conftest.$ac_ext
12080
12081 fi
12082
12083 echo "$as_me:12083: result: $cf_cv_unsigned_literals" >&5
12084 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
12085
12086 cf_cv_1UL="1"
12087 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
12088 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
12089
12090 if test $NCURSES_MMASK_T = auto ; then
12091         cf_cv_typeof_mmask_t=long
12092 else
12093         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
12094 fi
12095 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
12096
12097 ###     Checks for external-data
12098
12099 echo "$as_me:12099: checking if external errno is declared" >&5
12100 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
12101 if test "${cf_cv_dcl_errno+set}" = set; then
12102   echo $ECHO_N "(cached) $ECHO_C" >&6
12103 else
12104
12105     cat >conftest.$ac_ext <<_ACEOF
12106 #line 12106 "configure"
12107 #include "confdefs.h"
12108
12109 #ifdef HAVE_STDLIB_H
12110 #include <stdlib.h>
12111 #endif
12112 #include <stdio.h>
12113 #include <sys/types.h>
12114 #include <errno.h>
12115 int
12116 main ()
12117 {
12118 int x = (int) errno
12119   ;
12120   return 0;
12121 }
12122 _ACEOF
12123 rm -f conftest.$ac_objext
12124 if { (eval echo "$as_me:12124: \"$ac_compile\"") >&5
12125   (eval $ac_compile) 2>&5
12126   ac_status=$?
12127   echo "$as_me:12127: \$? = $ac_status" >&5
12128   (exit $ac_status); } &&
12129          { ac_try='test -s conftest.$ac_objext'
12130   { (eval echo "$as_me:12130: \"$ac_try\"") >&5
12131   (eval $ac_try) 2>&5
12132   ac_status=$?
12133   echo "$as_me:12133: \$? = $ac_status" >&5
12134   (exit $ac_status); }; }; then
12135   cf_cv_dcl_errno=yes
12136 else
12137   echo "$as_me: failed program was:" >&5
12138 cat conftest.$ac_ext >&5
12139 cf_cv_dcl_errno=no
12140 fi
12141 rm -f conftest.$ac_objext conftest.$ac_ext
12142
12143 fi
12144 echo "$as_me:12144: result: $cf_cv_dcl_errno" >&5
12145 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
12146
12147 if test "$cf_cv_dcl_errno" = no ; then
12148
12149 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12150
12151     cat >>confdefs.h <<EOF
12152 #define $cf_result 1
12153 EOF
12154
12155 fi
12156
12157 # It's possible (for near-UNIX clones) that the data doesn't exist
12158
12159 echo "$as_me:12159: checking if external errno exists" >&5
12160 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
12161 if test "${cf_cv_have_errno+set}" = set; then
12162   echo $ECHO_N "(cached) $ECHO_C" >&6
12163 else
12164
12165     cat >conftest.$ac_ext <<_ACEOF
12166 #line 12166 "configure"
12167 #include "confdefs.h"
12168
12169 #undef errno
12170 extern int errno;
12171
12172 int
12173 main ()
12174 {
12175 errno = 2
12176   ;
12177   return 0;
12178 }
12179 _ACEOF
12180 rm -f conftest.$ac_objext conftest$ac_exeext
12181 if { (eval echo "$as_me:12181: \"$ac_link\"") >&5
12182   (eval $ac_link) 2>&5
12183   ac_status=$?
12184   echo "$as_me:12184: \$? = $ac_status" >&5
12185   (exit $ac_status); } &&
12186          { ac_try='test -s conftest$ac_exeext'
12187   { (eval echo "$as_me:12187: \"$ac_try\"") >&5
12188   (eval $ac_try) 2>&5
12189   ac_status=$?
12190   echo "$as_me:12190: \$? = $ac_status" >&5
12191   (exit $ac_status); }; }; then
12192   cf_cv_have_errno=yes
12193 else
12194   echo "$as_me: failed program was:" >&5
12195 cat conftest.$ac_ext >&5
12196 cf_cv_have_errno=no
12197 fi
12198 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12199
12200 fi
12201 echo "$as_me:12201: result: $cf_cv_have_errno" >&5
12202 echo "${ECHO_T}$cf_cv_have_errno" >&6
12203
12204 if test "$cf_cv_have_errno" = yes ; then
12205
12206 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12207
12208     cat >>confdefs.h <<EOF
12209 #define $cf_result 1
12210 EOF
12211
12212 fi
12213
12214 echo "$as_me:12214: checking if data-only library module links" >&5
12215 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
12216 if test "${cf_cv_link_dataonly+set}" = set; then
12217   echo $ECHO_N "(cached) $ECHO_C" >&6
12218 else
12219
12220         rm -f conftest.a
12221         cat >conftest.$ac_ext <<EOF
12222 #line 12222 "configure"
12223 int     testdata[3] = { 123, 456, 789 };
12224 EOF
12225         if { (eval echo "$as_me:12225: \"$ac_compile\"") >&5
12226   (eval $ac_compile) 2>&5
12227   ac_status=$?
12228   echo "$as_me:12228: \$? = $ac_status" >&5
12229   (exit $ac_status); } ; then
12230                 mv conftest.o data.o && \
12231                 ( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
12232         fi
12233         rm -f conftest.$ac_ext data.o
12234         cat >conftest.$ac_ext <<EOF
12235 #line 12235 "configure"
12236 int     testfunc()
12237 {
12238 #if defined(NeXT)
12239         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
12240 #else
12241         extern int testdata[3];
12242         return testdata[0] == 123
12243            &&  testdata[1] == 456
12244            &&  testdata[2] == 789;
12245 #endif
12246 }
12247 EOF
12248         if { (eval echo "$as_me:12248: \"$ac_compile\"") >&5
12249   (eval $ac_compile) 2>&5
12250   ac_status=$?
12251   echo "$as_me:12251: \$? = $ac_status" >&5
12252   (exit $ac_status); }; then
12253                 mv conftest.o func.o && \
12254                 ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
12255         fi
12256         rm -f conftest.$ac_ext func.o
12257         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
12258         cf_saveLIBS="$LIBS"
12259         LIBS="conftest.a $LIBS"
12260         if test "$cross_compiling" = yes; then
12261   cf_cv_link_dataonly=unknown
12262 else
12263   cat >conftest.$ac_ext <<_ACEOF
12264 #line 12264 "configure"
12265 #include "confdefs.h"
12266
12267         int main()
12268         {
12269                 extern int testfunc();
12270                 ${cf_cv_main_return:-return} (!testfunc());
12271         }
12272
12273 _ACEOF
12274 rm -f conftest$ac_exeext
12275 if { (eval echo "$as_me:12275: \"$ac_link\"") >&5
12276   (eval $ac_link) 2>&5
12277   ac_status=$?
12278   echo "$as_me:12278: \$? = $ac_status" >&5
12279   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12280   { (eval echo "$as_me:12280: \"$ac_try\"") >&5
12281   (eval $ac_try) 2>&5
12282   ac_status=$?
12283   echo "$as_me:12283: \$? = $ac_status" >&5
12284   (exit $ac_status); }; }; then
12285   cf_cv_link_dataonly=yes
12286 else
12287   echo "$as_me: program exited with status $ac_status" >&5
12288 echo "$as_me: failed program was:" >&5
12289 cat conftest.$ac_ext >&5
12290 cf_cv_link_dataonly=no
12291 fi
12292 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12293 fi
12294         LIBS="$cf_saveLIBS"
12295
12296 fi
12297
12298 echo "$as_me:12298: result: $cf_cv_link_dataonly" >&5
12299 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
12300
12301 if test "$cf_cv_link_dataonly" = no ; then
12302         cat >>confdefs.h <<\EOF
12303 #define BROKEN_LINKER 1
12304 EOF
12305
12306         BROKEN_LINKER=1
12307 fi
12308
12309 ###     Checks for library functions.
12310
12311 for ac_func in \
12312 getcwd \
12313 getegid \
12314 geteuid \
12315 getttynam \
12316 issetugid \
12317 poll \
12318 remove \
12319 select \
12320 setbuf \
12321 setbuffer \
12322 setvbuf \
12323 sigaction \
12324 sigvec \
12325 strdup \
12326 strstr \
12327 tcgetpgrp \
12328 times \
12329 vsnprintf \
12330
12331 do
12332 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12333 echo "$as_me:12333: checking for $ac_func" >&5
12334 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12335 if eval "test \"\${$as_ac_var+set}\" = set"; then
12336   echo $ECHO_N "(cached) $ECHO_C" >&6
12337 else
12338   cat >conftest.$ac_ext <<_ACEOF
12339 #line 12339 "configure"
12340 #include "confdefs.h"
12341 /* System header to define __stub macros and hopefully few prototypes,
12342     which can conflict with char $ac_func (); below.  */
12343 #include <assert.h>
12344 /* Override any gcc2 internal prototype to avoid an error.  */
12345 #ifdef __cplusplus
12346 extern "C"
12347 #endif
12348 /* We use char because int might match the return type of a gcc2
12349    builtin and then its argument prototype would still apply.  */
12350 char $ac_func ();
12351 char (*f) ();
12352
12353 int
12354 main ()
12355 {
12356 /* The GNU C library defines this for functions which it implements
12357     to always fail with ENOSYS.  Some functions are actually named
12358     something starting with __ and the normal name is an alias.  */
12359 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12360 choke me
12361 #else
12362 f = $ac_func;
12363 #endif
12364
12365   ;
12366   return 0;
12367 }
12368 _ACEOF
12369 rm -f conftest.$ac_objext conftest$ac_exeext
12370 if { (eval echo "$as_me:12370: \"$ac_link\"") >&5
12371   (eval $ac_link) 2>&5
12372   ac_status=$?
12373   echo "$as_me:12373: \$? = $ac_status" >&5
12374   (exit $ac_status); } &&
12375          { ac_try='test -s conftest$ac_exeext'
12376   { (eval echo "$as_me:12376: \"$ac_try\"") >&5
12377   (eval $ac_try) 2>&5
12378   ac_status=$?
12379   echo "$as_me:12379: \$? = $ac_status" >&5
12380   (exit $ac_status); }; }; then
12381   eval "$as_ac_var=yes"
12382 else
12383   echo "$as_me: failed program was:" >&5
12384 cat conftest.$ac_ext >&5
12385 eval "$as_ac_var=no"
12386 fi
12387 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12388 fi
12389 echo "$as_me:12389: result: `eval echo '${'$as_ac_var'}'`" >&5
12390 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12391 if test `eval echo '${'$as_ac_var'}'` = yes; then
12392   cat >>confdefs.h <<EOF
12393 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12394 EOF
12395
12396 fi
12397 done
12398
12399 if test "$with_getcap" = "yes" ; then
12400
12401 echo "$as_me:12401: checking for terminal-capability database functions" >&5
12402 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
12403 if test "${cf_cv_cgetent+set}" = set; then
12404   echo $ECHO_N "(cached) $ECHO_C" >&6
12405 else
12406
12407 cat >conftest.$ac_ext <<_ACEOF
12408 #line 12408 "configure"
12409 #include "confdefs.h"
12410
12411 #include <stdlib.h>
12412 int
12413 main ()
12414 {
12415
12416         char temp[128];
12417         char *buf = temp;
12418         char *db_array = temp;
12419         cgetent(&buf, /* int *, */ &db_array, "vt100");
12420         cgetcap(buf, "tc", '=');
12421         cgetmatch(buf, "tc");
12422
12423   ;
12424   return 0;
12425 }
12426 _ACEOF
12427 rm -f conftest.$ac_objext conftest$ac_exeext
12428 if { (eval echo "$as_me:12428: \"$ac_link\"") >&5
12429   (eval $ac_link) 2>&5
12430   ac_status=$?
12431   echo "$as_me:12431: \$? = $ac_status" >&5
12432   (exit $ac_status); } &&
12433          { ac_try='test -s conftest$ac_exeext'
12434   { (eval echo "$as_me:12434: \"$ac_try\"") >&5
12435   (eval $ac_try) 2>&5
12436   ac_status=$?
12437   echo "$as_me:12437: \$? = $ac_status" >&5
12438   (exit $ac_status); }; }; then
12439   cf_cv_cgetent=yes
12440 else
12441   echo "$as_me: failed program was:" >&5
12442 cat conftest.$ac_ext >&5
12443 cf_cv_cgetent=no
12444 fi
12445 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12446
12447 fi
12448
12449 echo "$as_me:12449: result: $cf_cv_cgetent" >&5
12450 echo "${ECHO_T}$cf_cv_cgetent" >&6
12451 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
12452 #define HAVE_BSD_CGETENT 1
12453 EOF
12454
12455 fi
12456
12457 echo "$as_me:12457: checking for isascii" >&5
12458 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
12459 if test "${cf_cv_have_isascii+set}" = set; then
12460   echo $ECHO_N "(cached) $ECHO_C" >&6
12461 else
12462
12463         cat >conftest.$ac_ext <<_ACEOF
12464 #line 12464 "configure"
12465 #include "confdefs.h"
12466 #include <ctype.h>
12467 int
12468 main ()
12469 {
12470 int x = isascii(' ')
12471   ;
12472   return 0;
12473 }
12474 _ACEOF
12475 rm -f conftest.$ac_objext conftest$ac_exeext
12476 if { (eval echo "$as_me:12476: \"$ac_link\"") >&5
12477   (eval $ac_link) 2>&5
12478   ac_status=$?
12479   echo "$as_me:12479: \$? = $ac_status" >&5
12480   (exit $ac_status); } &&
12481          { ac_try='test -s conftest$ac_exeext'
12482   { (eval echo "$as_me:12482: \"$ac_try\"") >&5
12483   (eval $ac_try) 2>&5
12484   ac_status=$?
12485   echo "$as_me:12485: \$? = $ac_status" >&5
12486   (exit $ac_status); }; }; then
12487   cf_cv_have_isascii=yes
12488 else
12489   echo "$as_me: failed program was:" >&5
12490 cat conftest.$ac_ext >&5
12491 cf_cv_have_isascii=no
12492 fi
12493 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12494
12495 fi
12496 echo "$as_me:12496: result: $cf_cv_have_isascii" >&5
12497 echo "${ECHO_T}$cf_cv_have_isascii" >&6
12498 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
12499 #define HAVE_ISASCII 1
12500 EOF
12501
12502 if test "$ac_cv_func_sigaction" = yes; then
12503 echo "$as_me:12503: checking whether sigaction needs _POSIX_SOURCE" >&5
12504 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
12505 cat >conftest.$ac_ext <<_ACEOF
12506 #line 12506 "configure"
12507 #include "confdefs.h"
12508
12509 #include <sys/types.h>
12510 #include <signal.h>
12511 int
12512 main ()
12513 {
12514 struct sigaction act
12515   ;
12516   return 0;
12517 }
12518 _ACEOF
12519 rm -f conftest.$ac_objext
12520 if { (eval echo "$as_me:12520: \"$ac_compile\"") >&5
12521   (eval $ac_compile) 2>&5
12522   ac_status=$?
12523   echo "$as_me:12523: \$? = $ac_status" >&5
12524   (exit $ac_status); } &&
12525          { ac_try='test -s conftest.$ac_objext'
12526   { (eval echo "$as_me:12526: \"$ac_try\"") >&5
12527   (eval $ac_try) 2>&5
12528   ac_status=$?
12529   echo "$as_me:12529: \$? = $ac_status" >&5
12530   (exit $ac_status); }; }; then
12531   sigact_bad=no
12532 else
12533   echo "$as_me: failed program was:" >&5
12534 cat conftest.$ac_ext >&5
12535
12536 cat >conftest.$ac_ext <<_ACEOF
12537 #line 12537 "configure"
12538 #include "confdefs.h"
12539
12540 #define _POSIX_SOURCE
12541 #include <sys/types.h>
12542 #include <signal.h>
12543 int
12544 main ()
12545 {
12546 struct sigaction act
12547   ;
12548   return 0;
12549 }
12550 _ACEOF
12551 rm -f conftest.$ac_objext
12552 if { (eval echo "$as_me:12552: \"$ac_compile\"") >&5
12553   (eval $ac_compile) 2>&5
12554   ac_status=$?
12555   echo "$as_me:12555: \$? = $ac_status" >&5
12556   (exit $ac_status); } &&
12557          { ac_try='test -s conftest.$ac_objext'
12558   { (eval echo "$as_me:12558: \"$ac_try\"") >&5
12559   (eval $ac_try) 2>&5
12560   ac_status=$?
12561   echo "$as_me:12561: \$? = $ac_status" >&5
12562   (exit $ac_status); }; }; then
12563   sigact_bad=yes
12564          cat >>confdefs.h <<\EOF
12565 #define SVR4_ACTION 1
12566 EOF
12567
12568 else
12569   echo "$as_me: failed program was:" >&5
12570 cat conftest.$ac_ext >&5
12571 sigact_bad=unknown
12572 fi
12573 rm -f conftest.$ac_objext conftest.$ac_ext
12574 fi
12575 rm -f conftest.$ac_objext conftest.$ac_ext
12576 echo "$as_me:12576: result: $sigact_bad" >&5
12577 echo "${ECHO_T}$sigact_bad" >&6
12578 fi
12579
12580 echo "$as_me:12580: checking if nanosleep really works" >&5
12581 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
12582 if test "${cf_cv_func_nanosleep+set}" = set; then
12583   echo $ECHO_N "(cached) $ECHO_C" >&6
12584 else
12585
12586 if test "$cross_compiling" = yes; then
12587   cf_cv_func_nanosleep=unknown
12588 else
12589   cat >conftest.$ac_ext <<_ACEOF
12590 #line 12590 "configure"
12591 #include "confdefs.h"
12592
12593 #include <stdio.h>
12594 #include <errno.h>
12595 #include <time.h>
12596
12597 #ifdef HAVE_SYS_TIME_H
12598 #include <sys/time.h>
12599 #endif
12600
12601 int main() {
12602         struct timespec ts1, ts2;
12603         int code;
12604         ts1.tv_sec  = 0;
12605         ts1.tv_nsec = 750000000;
12606         ts2.tv_sec  = 0;
12607         ts2.tv_nsec = 0;
12608         errno = 0;
12609         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
12610         ${cf_cv_main_return:-return}(code != 0);
12611 }
12612
12613 _ACEOF
12614 rm -f conftest$ac_exeext
12615 if { (eval echo "$as_me:12615: \"$ac_link\"") >&5
12616   (eval $ac_link) 2>&5
12617   ac_status=$?
12618   echo "$as_me:12618: \$? = $ac_status" >&5
12619   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12620   { (eval echo "$as_me:12620: \"$ac_try\"") >&5
12621   (eval $ac_try) 2>&5
12622   ac_status=$?
12623   echo "$as_me:12623: \$? = $ac_status" >&5
12624   (exit $ac_status); }; }; then
12625   cf_cv_func_nanosleep=yes
12626 else
12627   echo "$as_me: program exited with status $ac_status" >&5
12628 echo "$as_me: failed program was:" >&5
12629 cat conftest.$ac_ext >&5
12630 cf_cv_func_nanosleep=no
12631 fi
12632 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12633 fi
12634 fi
12635 echo "$as_me:12635: result: $cf_cv_func_nanosleep" >&5
12636 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
12637
12638 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
12639 #define HAVE_NANOSLEEP 1
12640 EOF
12641
12642 for ac_header in \
12643 termio.h \
12644 termios.h \
12645 unistd.h \
12646
12647 do
12648 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12649 echo "$as_me:12649: checking for $ac_header" >&5
12650 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12651 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12652   echo $ECHO_N "(cached) $ECHO_C" >&6
12653 else
12654   cat >conftest.$ac_ext <<_ACEOF
12655 #line 12655 "configure"
12656 #include "confdefs.h"
12657 #include <$ac_header>
12658 _ACEOF
12659 if { (eval echo "$as_me:12659: \"$ac_cpp conftest.$ac_ext\"") >&5
12660   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12661   ac_status=$?
12662   egrep -v '^ *\+' conftest.er1 >conftest.err
12663   rm -f conftest.er1
12664   cat conftest.err >&5
12665   echo "$as_me:12665: \$? = $ac_status" >&5
12666   (exit $ac_status); } >/dev/null; then
12667   if test -s conftest.err; then
12668     ac_cpp_err=$ac_c_preproc_warn_flag
12669   else
12670     ac_cpp_err=
12671   fi
12672 else
12673   ac_cpp_err=yes
12674 fi
12675 if test -z "$ac_cpp_err"; then
12676   eval "$as_ac_Header=yes"
12677 else
12678   echo "$as_me: failed program was:" >&5
12679   cat conftest.$ac_ext >&5
12680   eval "$as_ac_Header=no"
12681 fi
12682 rm -f conftest.err conftest.$ac_ext
12683 fi
12684 echo "$as_me:12684: result: `eval echo '${'$as_ac_Header'}'`" >&5
12685 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12686 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12687   cat >>confdefs.h <<EOF
12688 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12689 EOF
12690
12691 fi
12692 done
12693
12694 if test "$ISC" = yes ; then
12695
12696 for ac_header in sys/termio.h
12697 do
12698 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12699 echo "$as_me:12699: checking for $ac_header" >&5
12700 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12701 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12702   echo $ECHO_N "(cached) $ECHO_C" >&6
12703 else
12704   cat >conftest.$ac_ext <<_ACEOF
12705 #line 12705 "configure"
12706 #include "confdefs.h"
12707 #include <$ac_header>
12708 _ACEOF
12709 if { (eval echo "$as_me:12709: \"$ac_cpp conftest.$ac_ext\"") >&5
12710   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12711   ac_status=$?
12712   egrep -v '^ *\+' conftest.er1 >conftest.err
12713   rm -f conftest.er1
12714   cat conftest.err >&5
12715   echo "$as_me:12715: \$? = $ac_status" >&5
12716   (exit $ac_status); } >/dev/null; then
12717   if test -s conftest.err; then
12718     ac_cpp_err=$ac_c_preproc_warn_flag
12719   else
12720     ac_cpp_err=
12721   fi
12722 else
12723   ac_cpp_err=yes
12724 fi
12725 if test -z "$ac_cpp_err"; then
12726   eval "$as_ac_Header=yes"
12727 else
12728   echo "$as_me: failed program was:" >&5
12729   cat conftest.$ac_ext >&5
12730   eval "$as_ac_Header=no"
12731 fi
12732 rm -f conftest.err conftest.$ac_ext
12733 fi
12734 echo "$as_me:12734: result: `eval echo '${'$as_ac_Header'}'`" >&5
12735 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12736 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12737   cat >>confdefs.h <<EOF
12738 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12739 EOF
12740
12741 fi
12742 done
12743
12744 fi
12745 if test "$ac_cv_header_termios_h" = yes ; then
12746         case "$CFLAGS $CPPFLAGS" in
12747         *-D_POSIX_SOURCE*)
12748                 termios_bad=dunno ;;
12749         *)      termios_bad=maybe ;;
12750         esac
12751         if test "$termios_bad" = maybe ; then
12752         echo "$as_me:12752: checking whether termios.h needs _POSIX_SOURCE" >&5
12753 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
12754         cat >conftest.$ac_ext <<_ACEOF
12755 #line 12755 "configure"
12756 #include "confdefs.h"
12757 #include <termios.h>
12758 int
12759 main ()
12760 {
12761 struct termios foo; int x = foo.c_iflag
12762   ;
12763   return 0;
12764 }
12765 _ACEOF
12766 rm -f conftest.$ac_objext
12767 if { (eval echo "$as_me:12767: \"$ac_compile\"") >&5
12768   (eval $ac_compile) 2>&5
12769   ac_status=$?
12770   echo "$as_me:12770: \$? = $ac_status" >&5
12771   (exit $ac_status); } &&
12772          { ac_try='test -s conftest.$ac_objext'
12773   { (eval echo "$as_me:12773: \"$ac_try\"") >&5
12774   (eval $ac_try) 2>&5
12775   ac_status=$?
12776   echo "$as_me:12776: \$? = $ac_status" >&5
12777   (exit $ac_status); }; }; then
12778   termios_bad=no
12779 else
12780   echo "$as_me: failed program was:" >&5
12781 cat conftest.$ac_ext >&5
12782
12783                 cat >conftest.$ac_ext <<_ACEOF
12784 #line 12784 "configure"
12785 #include "confdefs.h"
12786
12787 #define _POSIX_SOURCE
12788 #include <termios.h>
12789 int
12790 main ()
12791 {
12792 struct termios foo; int x = foo.c_iflag
12793   ;
12794   return 0;
12795 }
12796 _ACEOF
12797 rm -f conftest.$ac_objext
12798 if { (eval echo "$as_me:12798: \"$ac_compile\"") >&5
12799   (eval $ac_compile) 2>&5
12800   ac_status=$?
12801   echo "$as_me:12801: \$? = $ac_status" >&5
12802   (exit $ac_status); } &&
12803          { ac_try='test -s conftest.$ac_objext'
12804   { (eval echo "$as_me:12804: \"$ac_try\"") >&5
12805   (eval $ac_try) 2>&5
12806   ac_status=$?
12807   echo "$as_me:12807: \$? = $ac_status" >&5
12808   (exit $ac_status); }; }; then
12809   termios_bad=unknown
12810 else
12811   echo "$as_me: failed program was:" >&5
12812 cat conftest.$ac_ext >&5
12813 termios_bad=yes cat >>confdefs.h <<\EOF
12814 #define SVR4_TERMIO 1
12815 EOF
12816
12817 fi
12818 rm -f conftest.$ac_objext conftest.$ac_ext
12819
12820 fi
12821 rm -f conftest.$ac_objext conftest.$ac_ext
12822         echo "$as_me:12822: result: $termios_bad" >&5
12823 echo "${ECHO_T}$termios_bad" >&6
12824         fi
12825 fi
12826
12827 echo "$as_me:12827: checking for tcgetattr" >&5
12828 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
12829 if test "${cf_cv_have_tcgetattr+set}" = set; then
12830   echo $ECHO_N "(cached) $ECHO_C" >&6
12831 else
12832
12833 cat >conftest.$ac_ext <<_ACEOF
12834 #line 12834 "configure"
12835 #include "confdefs.h"
12836
12837 #include <sys/types.h>
12838 #ifdef HAVE_UNISTD_H
12839 #include <unistd.h>
12840 #endif
12841 #ifdef HAVE_TERMIOS_H
12842 #include <termios.h>
12843 #define TTY struct termios
12844 #else
12845 #ifdef HAVE_TERMIO_H
12846 #include <termio.h>
12847 #define TTY struct termio
12848 #endif
12849 #endif
12850
12851 int
12852 main ()
12853 {
12854
12855 TTY foo;
12856 tcgetattr(1, &foo);
12857   ;
12858   return 0;
12859 }
12860 _ACEOF
12861 rm -f conftest.$ac_objext conftest$ac_exeext
12862 if { (eval echo "$as_me:12862: \"$ac_link\"") >&5
12863   (eval $ac_link) 2>&5
12864   ac_status=$?
12865   echo "$as_me:12865: \$? = $ac_status" >&5
12866   (exit $ac_status); } &&
12867          { ac_try='test -s conftest$ac_exeext'
12868   { (eval echo "$as_me:12868: \"$ac_try\"") >&5
12869   (eval $ac_try) 2>&5
12870   ac_status=$?
12871   echo "$as_me:12871: \$? = $ac_status" >&5
12872   (exit $ac_status); }; }; then
12873   cf_cv_have_tcgetattr=yes
12874 else
12875   echo "$as_me: failed program was:" >&5
12876 cat conftest.$ac_ext >&5
12877 cf_cv_have_tcgetattr=no
12878 fi
12879 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12880 fi
12881 echo "$as_me:12881: result: $cf_cv_have_tcgetattr" >&5
12882 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
12883 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
12884 #define HAVE_TCGETATTR 1
12885 EOF
12886
12887 echo "$as_me:12887: checking for vsscanf function or workaround" >&5
12888 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
12889 if test "${cf_cv_func_vsscanf+set}" = set; then
12890   echo $ECHO_N "(cached) $ECHO_C" >&6
12891 else
12892
12893 cat >conftest.$ac_ext <<_ACEOF
12894 #line 12894 "configure"
12895 #include "confdefs.h"
12896
12897 #include <stdarg.h>
12898 #include <stdio.h>
12899 int
12900 main ()
12901 {
12902
12903         va_list ap;
12904         vsscanf("from", "%d", ap)
12905   ;
12906   return 0;
12907 }
12908 _ACEOF
12909 rm -f conftest.$ac_objext conftest$ac_exeext
12910 if { (eval echo "$as_me:12910: \"$ac_link\"") >&5
12911   (eval $ac_link) 2>&5
12912   ac_status=$?
12913   echo "$as_me:12913: \$? = $ac_status" >&5
12914   (exit $ac_status); } &&
12915          { ac_try='test -s conftest$ac_exeext'
12916   { (eval echo "$as_me:12916: \"$ac_try\"") >&5
12917   (eval $ac_try) 2>&5
12918   ac_status=$?
12919   echo "$as_me:12919: \$? = $ac_status" >&5
12920   (exit $ac_status); }; }; then
12921   cf_cv_func_vsscanf=vsscanf
12922 else
12923   echo "$as_me: failed program was:" >&5
12924 cat conftest.$ac_ext >&5
12925
12926 cat >conftest.$ac_ext <<_ACEOF
12927 #line 12927 "configure"
12928 #include "confdefs.h"
12929
12930 #include <stdarg.h>
12931 #include <stdio.h>
12932 int
12933 main ()
12934 {
12935
12936     FILE strbuf;
12937     char *str = "from";
12938
12939     strbuf._flag = _IOREAD;
12940     strbuf._ptr = strbuf._base = (unsigned char *) str;
12941     strbuf._cnt = strlen(str);
12942     strbuf._file = _NFILE;
12943     return (vfscanf(&strbuf, "%d", ap))
12944   ;
12945   return 0;
12946 }
12947 _ACEOF
12948 rm -f conftest.$ac_objext conftest$ac_exeext
12949 if { (eval echo "$as_me:12949: \"$ac_link\"") >&5
12950   (eval $ac_link) 2>&5
12951   ac_status=$?
12952   echo "$as_me:12952: \$? = $ac_status" >&5
12953   (exit $ac_status); } &&
12954          { ac_try='test -s conftest$ac_exeext'
12955   { (eval echo "$as_me:12955: \"$ac_try\"") >&5
12956   (eval $ac_try) 2>&5
12957   ac_status=$?
12958   echo "$as_me:12958: \$? = $ac_status" >&5
12959   (exit $ac_status); }; }; then
12960   cf_cv_func_vsscanf=vfscanf
12961 else
12962   echo "$as_me: failed program was:" >&5
12963 cat conftest.$ac_ext >&5
12964
12965 cat >conftest.$ac_ext <<_ACEOF
12966 #line 12966 "configure"
12967 #include "confdefs.h"
12968
12969 #include <stdarg.h>
12970 #include <stdio.h>
12971 int
12972 main ()
12973 {
12974
12975     FILE strbuf;
12976     char *str = "from";
12977
12978     strbuf._flag = _IOREAD;
12979     strbuf._ptr = strbuf._base = (unsigned char *) str;
12980     strbuf._cnt = strlen(str);
12981     strbuf._file = _NFILE;
12982     return (_doscan(&strbuf, "%d", ap))
12983   ;
12984   return 0;
12985 }
12986 _ACEOF
12987 rm -f conftest.$ac_objext conftest$ac_exeext
12988 if { (eval echo "$as_me:12988: \"$ac_link\"") >&5
12989   (eval $ac_link) 2>&5
12990   ac_status=$?
12991   echo "$as_me:12991: \$? = $ac_status" >&5
12992   (exit $ac_status); } &&
12993          { ac_try='test -s conftest$ac_exeext'
12994   { (eval echo "$as_me:12994: \"$ac_try\"") >&5
12995   (eval $ac_try) 2>&5
12996   ac_status=$?
12997   echo "$as_me:12997: \$? = $ac_status" >&5
12998   (exit $ac_status); }; }; then
12999   cf_cv_func_vsscanf=_doscan
13000 else
13001   echo "$as_me: failed program was:" >&5
13002 cat conftest.$ac_ext >&5
13003
13004 cf_cv_func_vsscanf=no
13005 fi
13006 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13007 fi
13008 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13009 fi
13010 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13011 fi
13012 echo "$as_me:13012: result: $cf_cv_func_vsscanf" >&5
13013 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
13014
13015 case $cf_cv_func_vsscanf in #(vi
13016 vsscanf) cat >>confdefs.h <<\EOF
13017 #define HAVE_VSSCANF 1
13018 EOF
13019 ;; #(vi
13020 vfscanf) cat >>confdefs.h <<\EOF
13021 #define HAVE_VFSCANF 1
13022 EOF
13023 ;; #(vi
13024 _doscan) cat >>confdefs.h <<\EOF
13025 #define HAVE__DOSCAN 1
13026 EOF
13027 ;;
13028 esac
13029
13030 echo "$as_me:13030: checking for working mkstemp" >&5
13031 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
13032 if test "${cf_cv_func_mkstemp+set}" = set; then
13033   echo $ECHO_N "(cached) $ECHO_C" >&6
13034 else
13035
13036 rm -f conftest*
13037 if test "$cross_compiling" = yes; then
13038   echo "$as_me:13038: checking for mkstemp" >&5
13039 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
13040 if test "${ac_cv_func_mkstemp+set}" = set; then
13041   echo $ECHO_N "(cached) $ECHO_C" >&6
13042 else
13043   cat >conftest.$ac_ext <<_ACEOF
13044 #line 13044 "configure"
13045 #include "confdefs.h"
13046 /* System header to define __stub macros and hopefully few prototypes,
13047     which can conflict with char mkstemp (); below.  */
13048 #include <assert.h>
13049 /* Override any gcc2 internal prototype to avoid an error.  */
13050 #ifdef __cplusplus
13051 extern "C"
13052 #endif
13053 /* We use char because int might match the return type of a gcc2
13054    builtin and then its argument prototype would still apply.  */
13055 char mkstemp ();
13056 char (*f) ();
13057
13058 int
13059 main ()
13060 {
13061 /* The GNU C library defines this for functions which it implements
13062     to always fail with ENOSYS.  Some functions are actually named
13063     something starting with __ and the normal name is an alias.  */
13064 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
13065 choke me
13066 #else
13067 f = mkstemp;
13068 #endif
13069
13070   ;
13071   return 0;
13072 }
13073 _ACEOF
13074 rm -f conftest.$ac_objext conftest$ac_exeext
13075 if { (eval echo "$as_me:13075: \"$ac_link\"") >&5
13076   (eval $ac_link) 2>&5
13077   ac_status=$?
13078   echo "$as_me:13078: \$? = $ac_status" >&5
13079   (exit $ac_status); } &&
13080          { ac_try='test -s conftest$ac_exeext'
13081   { (eval echo "$as_me:13081: \"$ac_try\"") >&5
13082   (eval $ac_try) 2>&5
13083   ac_status=$?
13084   echo "$as_me:13084: \$? = $ac_status" >&5
13085   (exit $ac_status); }; }; then
13086   ac_cv_func_mkstemp=yes
13087 else
13088   echo "$as_me: failed program was:" >&5
13089 cat conftest.$ac_ext >&5
13090 ac_cv_func_mkstemp=no
13091 fi
13092 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13093 fi
13094 echo "$as_me:13094: result: $ac_cv_func_mkstemp" >&5
13095 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
13096
13097 else
13098   cat >conftest.$ac_ext <<_ACEOF
13099 #line 13099 "configure"
13100 #include "confdefs.h"
13101
13102 #include <sys/types.h>
13103 #include <stdlib.h>
13104 #include <stdio.h>
13105 #include <string.h>
13106 #include <sys/stat.h>
13107 int main()
13108 {
13109         char *tmpl = "conftestXXXXXX";
13110         char name[2][80];
13111         int n;
13112         int result = 0;
13113         int fd;
13114         struct stat sb;
13115
13116         umask(077);
13117         for (n = 0; n < 2; ++n) {
13118                 strcpy(name[n], tmpl);
13119                 if ((fd = mkstemp(name[n])) >= 0) {
13120                         if (!strcmp(name[n], tmpl)
13121                          || stat(name[n], &sb) != 0
13122                          || (sb.st_mode & S_IFMT) != S_IFREG
13123                          || (sb.st_mode & 077) != 0) {
13124                                 result = 1;
13125                         }
13126                         close(fd);
13127                 }
13128         }
13129         if (result == 0
13130          && !strcmp(name[0], name[1]))
13131                 result = 1;
13132         ${cf_cv_main_return:-return}(result);
13133 }
13134
13135 _ACEOF
13136 rm -f conftest$ac_exeext
13137 if { (eval echo "$as_me:13137: \"$ac_link\"") >&5
13138   (eval $ac_link) 2>&5
13139   ac_status=$?
13140   echo "$as_me:13140: \$? = $ac_status" >&5
13141   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13142   { (eval echo "$as_me:13142: \"$ac_try\"") >&5
13143   (eval $ac_try) 2>&5
13144   ac_status=$?
13145   echo "$as_me:13145: \$? = $ac_status" >&5
13146   (exit $ac_status); }; }; then
13147   cf_cv_func_mkstemp=yes
13148
13149 else
13150   echo "$as_me: program exited with status $ac_status" >&5
13151 echo "$as_me: failed program was:" >&5
13152 cat conftest.$ac_ext >&5
13153 cf_cv_func_mkstemp=no
13154
13155 fi
13156 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13157 fi
13158
13159 fi
13160 echo "$as_me:13160: result: $cf_cv_func_mkstemp" >&5
13161 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
13162 if test "$cf_cv_func_mkstemp" = yes ; then
13163         cat >>confdefs.h <<\EOF
13164 #define HAVE_MKSTEMP 1
13165 EOF
13166
13167 fi
13168
13169 # setup for prototype of fallback for vsscanf()
13170
13171 if test "$cf_cv_func_vsscanf" = vsscanf ; then
13172         HAVE_VSSCANF=1
13173 else
13174         HAVE_VSSCANF=0
13175 fi
13176
13177 if test "$cross_compiling" = yes ; then
13178         { echo "$as_me:13178: WARNING: cross compiling: assume setvbuf params not reversed" >&5
13179 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
13180 else
13181         echo "$as_me:13181: checking whether setvbuf arguments are reversed" >&5
13182 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
13183 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
13184   echo $ECHO_N "(cached) $ECHO_C" >&6
13185 else
13186   if test "$cross_compiling" = yes; then
13187   { { echo "$as_me:13187: error: cannot run test program while cross compiling" >&5
13188 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13189    { (exit 1); exit 1; }; }
13190 else
13191   cat >conftest.$ac_ext <<_ACEOF
13192 #line 13192 "configure"
13193 #include "confdefs.h"
13194 #include <stdio.h>
13195 /* If setvbuf has the reversed format, exit 0. */
13196 int
13197 main ()
13198 {
13199   /* This call has the arguments reversed.
13200      A reversed system may check and see that the address of main
13201      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
13202   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
13203     $ac_main_return(1);
13204   putc('\r', stdout);
13205   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
13206 }
13207 _ACEOF
13208 rm -f conftest$ac_exeext
13209 if { (eval echo "$as_me:13209: \"$ac_link\"") >&5
13210   (eval $ac_link) 2>&5
13211   ac_status=$?
13212   echo "$as_me:13212: \$? = $ac_status" >&5
13213   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13214   { (eval echo "$as_me:13214: \"$ac_try\"") >&5
13215   (eval $ac_try) 2>&5
13216   ac_status=$?
13217   echo "$as_me:13217: \$? = $ac_status" >&5
13218   (exit $ac_status); }; }; then
13219   ac_cv_func_setvbuf_reversed=yes
13220 else
13221   echo "$as_me: program exited with status $ac_status" >&5
13222 echo "$as_me: failed program was:" >&5
13223 cat conftest.$ac_ext >&5
13224 ac_cv_func_setvbuf_reversed=no
13225 fi
13226 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13227 fi
13228 rm -f core core.* *.core
13229 fi
13230 echo "$as_me:13230: result: $ac_cv_func_setvbuf_reversed" >&5
13231 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
13232 if test $ac_cv_func_setvbuf_reversed = yes; then
13233
13234 cat >>confdefs.h <<\EOF
13235 #define SETVBUF_REVERSED 1
13236 EOF
13237
13238 fi
13239
13240 fi
13241 echo "$as_me:13241: checking return type of signal handlers" >&5
13242 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
13243 if test "${ac_cv_type_signal+set}" = set; then
13244   echo $ECHO_N "(cached) $ECHO_C" >&6
13245 else
13246   cat >conftest.$ac_ext <<_ACEOF
13247 #line 13247 "configure"
13248 #include "confdefs.h"
13249 #include <sys/types.h>
13250 #include <signal.h>
13251 #ifdef signal
13252 # undef signal
13253 #endif
13254 #ifdef __cplusplus
13255 extern "C" void (*signal (int, void (*)(int)))(int);
13256 #else
13257 void (*signal ()) ();
13258 #endif
13259
13260 int
13261 main ()
13262 {
13263 int i;
13264   ;
13265   return 0;
13266 }
13267 _ACEOF
13268 rm -f conftest.$ac_objext
13269 if { (eval echo "$as_me:13269: \"$ac_compile\"") >&5
13270   (eval $ac_compile) 2>&5
13271   ac_status=$?
13272   echo "$as_me:13272: \$? = $ac_status" >&5
13273   (exit $ac_status); } &&
13274          { ac_try='test -s conftest.$ac_objext'
13275   { (eval echo "$as_me:13275: \"$ac_try\"") >&5
13276   (eval $ac_try) 2>&5
13277   ac_status=$?
13278   echo "$as_me:13278: \$? = $ac_status" >&5
13279   (exit $ac_status); }; }; then
13280   ac_cv_type_signal=void
13281 else
13282   echo "$as_me: failed program was:" >&5
13283 cat conftest.$ac_ext >&5
13284 ac_cv_type_signal=int
13285 fi
13286 rm -f conftest.$ac_objext conftest.$ac_ext
13287 fi
13288 echo "$as_me:13288: result: $ac_cv_type_signal" >&5
13289 echo "${ECHO_T}$ac_cv_type_signal" >&6
13290
13291 cat >>confdefs.h <<EOF
13292 #define RETSIGTYPE $ac_cv_type_signal
13293 EOF
13294
13295 echo "$as_me:13295: checking for type sigaction_t" >&5
13296 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
13297 if test "${cf_cv_type_sigaction+set}" = set; then
13298   echo $ECHO_N "(cached) $ECHO_C" >&6
13299 else
13300
13301         cat >conftest.$ac_ext <<_ACEOF
13302 #line 13302 "configure"
13303 #include "confdefs.h"
13304
13305 #include <signal.h>
13306 int
13307 main ()
13308 {
13309 sigaction_t x
13310   ;
13311   return 0;
13312 }
13313 _ACEOF
13314 rm -f conftest.$ac_objext
13315 if { (eval echo "$as_me:13315: \"$ac_compile\"") >&5
13316   (eval $ac_compile) 2>&5
13317   ac_status=$?
13318   echo "$as_me:13318: \$? = $ac_status" >&5
13319   (exit $ac_status); } &&
13320          { ac_try='test -s conftest.$ac_objext'
13321   { (eval echo "$as_me:13321: \"$ac_try\"") >&5
13322   (eval $ac_try) 2>&5
13323   ac_status=$?
13324   echo "$as_me:13324: \$? = $ac_status" >&5
13325   (exit $ac_status); }; }; then
13326   cf_cv_type_sigaction=yes
13327 else
13328   echo "$as_me: failed program was:" >&5
13329 cat conftest.$ac_ext >&5
13330 cf_cv_type_sigaction=no
13331 fi
13332 rm -f conftest.$ac_objext conftest.$ac_ext
13333 fi
13334
13335 echo "$as_me:13335: result: $cf_cv_type_sigaction" >&5
13336 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
13337 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
13338 #define HAVE_TYPE_SIGACTION 1
13339 EOF
13340
13341 echo "$as_me:13341: checking declaration of size-change" >&5
13342 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
13343 if test "${cf_cv_sizechange+set}" = set; then
13344   echo $ECHO_N "(cached) $ECHO_C" >&6
13345 else
13346
13347     cf_cv_sizechange=unknown
13348     cf_save_CPPFLAGS="$CPPFLAGS"
13349
13350 for cf_opts in "" "NEED_PTEM_H"
13351 do
13352
13353     CPPFLAGS="$cf_save_CPPFLAGS"
13354     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
13355     cat >conftest.$ac_ext <<_ACEOF
13356 #line 13356 "configure"
13357 #include "confdefs.h"
13358 #include <sys/types.h>
13359 #ifdef HAVE_TERMIOS_H
13360 #include <termios.h>
13361 #else
13362 #ifdef HAVE_TERMIO_H
13363 #include <termio.h>
13364 #endif
13365 #endif
13366 #ifdef NEED_PTEM_H
13367 /* This is a workaround for SCO:  they neglected to define struct winsize in
13368  * termios.h -- it's only in termio.h and ptem.h
13369  */
13370 #include        <sys/stream.h>
13371 #include        <sys/ptem.h>
13372 #endif
13373 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
13374 #include <sys/ioctl.h>
13375 #endif
13376
13377 int
13378 main ()
13379 {
13380
13381 #ifdef TIOCGSIZE
13382         struct ttysize win;     /* FIXME: what system is this? */
13383         int y = win.ts_lines;
13384         int x = win.ts_cols;
13385 #else
13386 #ifdef TIOCGWINSZ
13387         struct winsize win;
13388         int y = win.ws_row;
13389         int x = win.ws_col;
13390 #else
13391         no TIOCGSIZE or TIOCGWINSZ
13392 #endif /* TIOCGWINSZ */
13393 #endif /* TIOCGSIZE */
13394
13395   ;
13396   return 0;
13397 }
13398 _ACEOF
13399 rm -f conftest.$ac_objext
13400 if { (eval echo "$as_me:13400: \"$ac_compile\"") >&5
13401   (eval $ac_compile) 2>&5
13402   ac_status=$?
13403   echo "$as_me:13403: \$? = $ac_status" >&5
13404   (exit $ac_status); } &&
13405          { ac_try='test -s conftest.$ac_objext'
13406   { (eval echo "$as_me:13406: \"$ac_try\"") >&5
13407   (eval $ac_try) 2>&5
13408   ac_status=$?
13409   echo "$as_me:13409: \$? = $ac_status" >&5
13410   (exit $ac_status); }; }; then
13411   cf_cv_sizechange=yes
13412 else
13413   echo "$as_me: failed program was:" >&5
13414 cat conftest.$ac_ext >&5
13415 cf_cv_sizechange=no
13416 fi
13417 rm -f conftest.$ac_objext conftest.$ac_ext
13418
13419         CPPFLAGS="$cf_save_CPPFLAGS"
13420         if test "$cf_cv_sizechange" = yes ; then
13421                 echo "size-change succeeded ($cf_opts)" >&5
13422                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
13423                 break
13424         fi
13425 done
13426
13427 fi
13428 echo "$as_me:13428: result: $cf_cv_sizechange" >&5
13429 echo "${ECHO_T}$cf_cv_sizechange" >&6
13430 if test "$cf_cv_sizechange" != no ; then
13431         cat >>confdefs.h <<\EOF
13432 #define HAVE_SIZECHANGE 1
13433 EOF
13434
13435         case $cf_cv_sizechange in #(vi
13436         NEED*)
13437                 cat >>confdefs.h <<EOF
13438 #define $cf_cv_sizechange  1
13439 EOF
13440
13441                 ;;
13442         esac
13443 fi
13444
13445 echo "$as_me:13445: checking for memmove" >&5
13446 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
13447 if test "${ac_cv_func_memmove+set}" = set; then
13448   echo $ECHO_N "(cached) $ECHO_C" >&6
13449 else
13450   cat >conftest.$ac_ext <<_ACEOF
13451 #line 13451 "configure"
13452 #include "confdefs.h"
13453 /* System header to define __stub macros and hopefully few prototypes,
13454     which can conflict with char memmove (); below.  */
13455 #include <assert.h>
13456 /* Override any gcc2 internal prototype to avoid an error.  */
13457 #ifdef __cplusplus
13458 extern "C"
13459 #endif
13460 /* We use char because int might match the return type of a gcc2
13461    builtin and then its argument prototype would still apply.  */
13462 char memmove ();
13463 char (*f) ();
13464
13465 int
13466 main ()
13467 {
13468 /* The GNU C library defines this for functions which it implements
13469     to always fail with ENOSYS.  Some functions are actually named
13470     something starting with __ and the normal name is an alias.  */
13471 #if defined (__stub_memmove) || defined (__stub___memmove)
13472 choke me
13473 #else
13474 f = memmove;
13475 #endif
13476
13477   ;
13478   return 0;
13479 }
13480 _ACEOF
13481 rm -f conftest.$ac_objext conftest$ac_exeext
13482 if { (eval echo "$as_me:13482: \"$ac_link\"") >&5
13483   (eval $ac_link) 2>&5
13484   ac_status=$?
13485   echo "$as_me:13485: \$? = $ac_status" >&5
13486   (exit $ac_status); } &&
13487          { ac_try='test -s conftest$ac_exeext'
13488   { (eval echo "$as_me:13488: \"$ac_try\"") >&5
13489   (eval $ac_try) 2>&5
13490   ac_status=$?
13491   echo "$as_me:13491: \$? = $ac_status" >&5
13492   (exit $ac_status); }; }; then
13493   ac_cv_func_memmove=yes
13494 else
13495   echo "$as_me: failed program was:" >&5
13496 cat conftest.$ac_ext >&5
13497 ac_cv_func_memmove=no
13498 fi
13499 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13500 fi
13501 echo "$as_me:13501: result: $ac_cv_func_memmove" >&5
13502 echo "${ECHO_T}$ac_cv_func_memmove" >&6
13503 if test $ac_cv_func_memmove = yes; then
13504   :
13505 else
13506
13507 echo "$as_me:13507: checking for bcopy" >&5
13508 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
13509 if test "${ac_cv_func_bcopy+set}" = set; then
13510   echo $ECHO_N "(cached) $ECHO_C" >&6
13511 else
13512   cat >conftest.$ac_ext <<_ACEOF
13513 #line 13513 "configure"
13514 #include "confdefs.h"
13515 /* System header to define __stub macros and hopefully few prototypes,
13516     which can conflict with char bcopy (); below.  */
13517 #include <assert.h>
13518 /* Override any gcc2 internal prototype to avoid an error.  */
13519 #ifdef __cplusplus
13520 extern "C"
13521 #endif
13522 /* We use char because int might match the return type of a gcc2
13523    builtin and then its argument prototype would still apply.  */
13524 char bcopy ();
13525 char (*f) ();
13526
13527 int
13528 main ()
13529 {
13530 /* The GNU C library defines this for functions which it implements
13531     to always fail with ENOSYS.  Some functions are actually named
13532     something starting with __ and the normal name is an alias.  */
13533 #if defined (__stub_bcopy) || defined (__stub___bcopy)
13534 choke me
13535 #else
13536 f = bcopy;
13537 #endif
13538
13539   ;
13540   return 0;
13541 }
13542 _ACEOF
13543 rm -f conftest.$ac_objext conftest$ac_exeext
13544 if { (eval echo "$as_me:13544: \"$ac_link\"") >&5
13545   (eval $ac_link) 2>&5
13546   ac_status=$?
13547   echo "$as_me:13547: \$? = $ac_status" >&5
13548   (exit $ac_status); } &&
13549          { ac_try='test -s conftest$ac_exeext'
13550   { (eval echo "$as_me:13550: \"$ac_try\"") >&5
13551   (eval $ac_try) 2>&5
13552   ac_status=$?
13553   echo "$as_me:13553: \$? = $ac_status" >&5
13554   (exit $ac_status); }; }; then
13555   ac_cv_func_bcopy=yes
13556 else
13557   echo "$as_me: failed program was:" >&5
13558 cat conftest.$ac_ext >&5
13559 ac_cv_func_bcopy=no
13560 fi
13561 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13562 fi
13563 echo "$as_me:13563: result: $ac_cv_func_bcopy" >&5
13564 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
13565 if test $ac_cv_func_bcopy = yes; then
13566
13567         echo "$as_me:13567: checking if bcopy does overlapping moves" >&5
13568 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
13569 if test "${cf_cv_good_bcopy+set}" = set; then
13570   echo $ECHO_N "(cached) $ECHO_C" >&6
13571 else
13572
13573                 if test "$cross_compiling" = yes; then
13574   cf_cv_good_bcopy=unknown
13575 else
13576   cat >conftest.$ac_ext <<_ACEOF
13577 #line 13577 "configure"
13578 #include "confdefs.h"
13579
13580 int main() {
13581         static char data[] = "abcdefghijklmnopqrstuwwxyz";
13582         char temp[40];
13583         bcopy(data, temp, sizeof(data));
13584         bcopy(temp+10, temp, 15);
13585         bcopy(temp+5, temp+15, 10);
13586         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
13587 }
13588
13589 _ACEOF
13590 rm -f conftest$ac_exeext
13591 if { (eval echo "$as_me:13591: \"$ac_link\"") >&5
13592   (eval $ac_link) 2>&5
13593   ac_status=$?
13594   echo "$as_me:13594: \$? = $ac_status" >&5
13595   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13596   { (eval echo "$as_me:13596: \"$ac_try\"") >&5
13597   (eval $ac_try) 2>&5
13598   ac_status=$?
13599   echo "$as_me:13599: \$? = $ac_status" >&5
13600   (exit $ac_status); }; }; then
13601   cf_cv_good_bcopy=yes
13602 else
13603   echo "$as_me: program exited with status $ac_status" >&5
13604 echo "$as_me: failed program was:" >&5
13605 cat conftest.$ac_ext >&5
13606 cf_cv_good_bcopy=no
13607 fi
13608 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13609 fi
13610
13611 fi
13612 echo "$as_me:13612: result: $cf_cv_good_bcopy" >&5
13613 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
13614
13615 else
13616   cf_cv_good_bcopy=no
13617 fi
13618
13619         if test "$cf_cv_good_bcopy" = yes ; then
13620                 cat >>confdefs.h <<\EOF
13621 #define USE_OK_BCOPY 1
13622 EOF
13623
13624         else
13625                 cat >>confdefs.h <<\EOF
13626 #define USE_MY_MEMMOVE 1
13627 EOF
13628
13629         fi
13630
13631 fi
13632
13633 echo "$as_me:13633: checking if poll really works" >&5
13634 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
13635 if test "${cf_cv_working_poll+set}" = set; then
13636   echo $ECHO_N "(cached) $ECHO_C" >&6
13637 else
13638
13639 if test "$cross_compiling" = yes; then
13640   cf_cv_working_poll=unknown
13641 else
13642   cat >conftest.$ac_ext <<_ACEOF
13643 #line 13643 "configure"
13644 #include "confdefs.h"
13645
13646 #include <stdio.h>
13647 #ifdef HAVE_POLL_H
13648 #include <poll.h>
13649 #else
13650 #include <sys/poll.h>
13651 #endif
13652 int main() {
13653         struct pollfd myfds;
13654         int ret;
13655
13656         myfds.fd = 0;
13657         myfds.events = POLLIN;
13658
13659         ret = poll(&myfds, 1, 100);
13660         ${cf_cv_main_return:-return}(ret != 0);
13661 }
13662 _ACEOF
13663 rm -f conftest$ac_exeext
13664 if { (eval echo "$as_me:13664: \"$ac_link\"") >&5
13665   (eval $ac_link) 2>&5
13666   ac_status=$?
13667   echo "$as_me:13667: \$? = $ac_status" >&5
13668   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13669   { (eval echo "$as_me:13669: \"$ac_try\"") >&5
13670   (eval $ac_try) 2>&5
13671   ac_status=$?
13672   echo "$as_me:13672: \$? = $ac_status" >&5
13673   (exit $ac_status); }; }; then
13674   cf_cv_working_poll=yes
13675 else
13676   echo "$as_me: program exited with status $ac_status" >&5
13677 echo "$as_me: failed program was:" >&5
13678 cat conftest.$ac_ext >&5
13679 cf_cv_working_poll=no
13680 fi
13681 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13682 fi
13683 fi
13684 echo "$as_me:13684: result: $cf_cv_working_poll" >&5
13685 echo "${ECHO_T}$cf_cv_working_poll" >&6
13686 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
13687 #define HAVE_WORKING_POLL 1
13688 EOF
13689
13690 # special check for test/ditto.c
13691
13692 echo "$as_me:13692: checking for openpty in -lutil" >&5
13693 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
13694 if test "${ac_cv_lib_util_openpty+set}" = set; then
13695   echo $ECHO_N "(cached) $ECHO_C" >&6
13696 else
13697   ac_check_lib_save_LIBS=$LIBS
13698 LIBS="-lutil  $LIBS"
13699 cat >conftest.$ac_ext <<_ACEOF
13700 #line 13700 "configure"
13701 #include "confdefs.h"
13702
13703 /* Override any gcc2 internal prototype to avoid an error.  */
13704 #ifdef __cplusplus
13705 extern "C"
13706 #endif
13707 /* We use char because int might match the return type of a gcc2
13708    builtin and then its argument prototype would still apply.  */
13709 char openpty ();
13710 int
13711 main ()
13712 {
13713 openpty ();
13714   ;
13715   return 0;
13716 }
13717 _ACEOF
13718 rm -f conftest.$ac_objext conftest$ac_exeext
13719 if { (eval echo "$as_me:13719: \"$ac_link\"") >&5
13720   (eval $ac_link) 2>&5
13721   ac_status=$?
13722   echo "$as_me:13722: \$? = $ac_status" >&5
13723   (exit $ac_status); } &&
13724          { ac_try='test -s conftest$ac_exeext'
13725   { (eval echo "$as_me:13725: \"$ac_try\"") >&5
13726   (eval $ac_try) 2>&5
13727   ac_status=$?
13728   echo "$as_me:13728: \$? = $ac_status" >&5
13729   (exit $ac_status); }; }; then
13730   ac_cv_lib_util_openpty=yes
13731 else
13732   echo "$as_me: failed program was:" >&5
13733 cat conftest.$ac_ext >&5
13734 ac_cv_lib_util_openpty=no
13735 fi
13736 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13737 LIBS=$ac_check_lib_save_LIBS
13738 fi
13739 echo "$as_me:13739: result: $ac_cv_lib_util_openpty" >&5
13740 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
13741 if test $ac_cv_lib_util_openpty = yes; then
13742   cf_cv_lib_util=yes
13743 else
13744   cf_cv_lib_util=no
13745 fi
13746
13747 echo "$as_me:13747: checking for openpty header" >&5
13748 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
13749 if test "${cf_cv_func_openpty+set}" = set; then
13750   echo $ECHO_N "(cached) $ECHO_C" >&6
13751 else
13752
13753     cf_save_LIBS="$LIBS"
13754     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
13755     for cf_header in pty.h libutil.h util.h
13756     do
13757     cat >conftest.$ac_ext <<_ACEOF
13758 #line 13758 "configure"
13759 #include "confdefs.h"
13760
13761 #include <$cf_header>
13762
13763 int
13764 main ()
13765 {
13766
13767     int x = openpty((int *)0, (int *)0, (char *)0,
13768                    (struct termios *)0, (struct winsize *)0);
13769
13770   ;
13771   return 0;
13772 }
13773 _ACEOF
13774 rm -f conftest.$ac_objext conftest$ac_exeext
13775 if { (eval echo "$as_me:13775: \"$ac_link\"") >&5
13776   (eval $ac_link) 2>&5
13777   ac_status=$?
13778   echo "$as_me:13778: \$? = $ac_status" >&5
13779   (exit $ac_status); } &&
13780          { ac_try='test -s conftest$ac_exeext'
13781   { (eval echo "$as_me:13781: \"$ac_try\"") >&5
13782   (eval $ac_try) 2>&5
13783   ac_status=$?
13784   echo "$as_me:13784: \$? = $ac_status" >&5
13785   (exit $ac_status); }; }; then
13786
13787         cf_cv_func_openpty=$cf_header
13788         break
13789
13790 else
13791   echo "$as_me: failed program was:" >&5
13792 cat conftest.$ac_ext >&5
13793
13794         cf_cv_func_openpty=no
13795
13796 fi
13797 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13798     done
13799     LIBS="$cf_save_LIBS"
13800
13801 fi
13802 echo "$as_me:13802: result: $cf_cv_func_openpty" >&5
13803 echo "${ECHO_T}$cf_cv_func_openpty" >&6
13804
13805 if test "$cf_cv_func_openpty" != no ; then
13806     cat >>confdefs.h <<EOF
13807 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
13808 EOF
13809
13810     cat >>confdefs.h <<\EOF
13811 #define USE_XTERM_PTY 1
13812 EOF
13813
13814     if test "$cf_cv_lib_util" = yes ; then
13815         TEST_LIBS="-lutil $TEST_LIBS"
13816     fi
13817 fi
13818
13819 if test "$with_hashed_db" != no ; then
13820         cat >>confdefs.h <<\EOF
13821 #define USE_HASHED_DB 1
13822 EOF
13823
13824 case $with_hashed_db in #(vi
13825 yes|*able*) #(vi
13826     ;;
13827 *)
13828     if test -d "$with_hashed_db" ; then
13829
13830 if test -n "$with_hashed_db/include" ; then
13831   for cf_add_incdir in $with_hashed_db/include
13832   do
13833         while test $cf_add_incdir != /usr/include
13834         do
13835           if test -d $cf_add_incdir
13836           then
13837                 cf_have_incdir=no
13838                 if test -n "$CFLAGS$CPPFLAGS" ; then
13839                   # a loop is needed to ensure we can add subdirs of existing dirs
13840                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13841                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13842                           cf_have_incdir=yes; break
13843                         fi
13844                   done
13845                 fi
13846
13847                 if test "$cf_have_incdir" = no ; then
13848           if test "$cf_add_incdir" = /usr/local/include ; then
13849                         if test "$GCC" = yes
13850                         then
13851                           cf_save_CPPFLAGS=$CPPFLAGS
13852                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13853                           cat >conftest.$ac_ext <<_ACEOF
13854 #line 13854 "configure"
13855 #include "confdefs.h"
13856 #include <stdio.h>
13857 int
13858 main ()
13859 {
13860 printf("Hello")
13861   ;
13862   return 0;
13863 }
13864 _ACEOF
13865 rm -f conftest.$ac_objext
13866 if { (eval echo "$as_me:13866: \"$ac_compile\"") >&5
13867   (eval $ac_compile) 2>&5
13868   ac_status=$?
13869   echo "$as_me:13869: \$? = $ac_status" >&5
13870   (exit $ac_status); } &&
13871          { ac_try='test -s conftest.$ac_objext'
13872   { (eval echo "$as_me:13872: \"$ac_try\"") >&5
13873   (eval $ac_try) 2>&5
13874   ac_status=$?
13875   echo "$as_me:13875: \$? = $ac_status" >&5
13876   (exit $ac_status); }; }; then
13877   :
13878 else
13879   echo "$as_me: failed program was:" >&5
13880 cat conftest.$ac_ext >&5
13881 cf_have_incdir=yes
13882 fi
13883 rm -f conftest.$ac_objext conftest.$ac_ext
13884                           CPPFLAGS=$cf_save_CPPFLAGS
13885                         fi
13886                   fi
13887                 fi
13888
13889                 if test "$cf_have_incdir" = no ; then
13890                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
13891
13892 echo "${as_me-configure}:13892: testing adding $cf_add_incdir to include-path ..." 1>&5
13893
13894                   CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
13895
13896           cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
13897           test "$cf_top_incdir" = "$cf_add_incdir" && break
13898           cf_add_incdir="$cf_top_incdir"
13899                 else
13900                   break
13901                 fi
13902           fi
13903         done
13904   done
13905 fi
13906
13907 if test -n "$with_hashed_db/lib" ; then
13908   for cf_add_libdir in $with_hashed_db/lib
13909   do
13910     if test $cf_add_libdir = /usr/lib ; then
13911       :
13912     elif test -d $cf_add_libdir
13913     then
13914       cf_have_libdir=no
13915       if test -n "$LDFLAGS$LIBS" ; then
13916         # a loop is needed to ensure we can add subdirs of existing dirs
13917         for cf_test_libdir in $LDFLAGS $LIBS ; do
13918           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13919             cf_have_libdir=yes; break
13920           fi
13921         done
13922       fi
13923       if test "$cf_have_libdir" = no ; then
13924         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
13925
13926 echo "${as_me-configure}:13926: testing adding $cf_add_libdir to library-path ..." 1>&5
13927
13928         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13929       fi
13930     fi
13931   done
13932 fi
13933
13934     fi
13935 esac
13936
13937 echo "$as_me:13937: checking for db.h" >&5
13938 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
13939 if test "${ac_cv_header_db_h+set}" = set; then
13940   echo $ECHO_N "(cached) $ECHO_C" >&6
13941 else
13942   cat >conftest.$ac_ext <<_ACEOF
13943 #line 13943 "configure"
13944 #include "confdefs.h"
13945 #include <db.h>
13946 _ACEOF
13947 if { (eval echo "$as_me:13947: \"$ac_cpp conftest.$ac_ext\"") >&5
13948   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13949   ac_status=$?
13950   egrep -v '^ *\+' conftest.er1 >conftest.err
13951   rm -f conftest.er1
13952   cat conftest.err >&5
13953   echo "$as_me:13953: \$? = $ac_status" >&5
13954   (exit $ac_status); } >/dev/null; then
13955   if test -s conftest.err; then
13956     ac_cpp_err=$ac_c_preproc_warn_flag
13957   else
13958     ac_cpp_err=
13959   fi
13960 else
13961   ac_cpp_err=yes
13962 fi
13963 if test -z "$ac_cpp_err"; then
13964   ac_cv_header_db_h=yes
13965 else
13966   echo "$as_me: failed program was:" >&5
13967   cat conftest.$ac_ext >&5
13968   ac_cv_header_db_h=no
13969 fi
13970 rm -f conftest.err conftest.$ac_ext
13971 fi
13972 echo "$as_me:13972: result: $ac_cv_header_db_h" >&5
13973 echo "${ECHO_T}$ac_cv_header_db_h" >&6
13974 if test $ac_cv_header_db_h = yes; then
13975
13976 echo "$as_me:13976: checking for version of db" >&5
13977 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
13978 if test "${cf_cv_hashed_db_version+set}" = set; then
13979   echo $ECHO_N "(cached) $ECHO_C" >&6
13980 else
13981
13982 cf_cv_hashed_db_version=unknown
13983
13984 for cf_db_version in 1 2 3 4 5
13985 do
13986
13987 echo "${as_me-configure}:13987: testing checking for db version $cf_db_version ..." 1>&5
13988
13989         cat >conftest.$ac_ext <<_ACEOF
13990 #line 13990 "configure"
13991 #include "confdefs.h"
13992
13993 $ac_includes_default
13994 #include <db.h>
13995
13996 #ifdef DB_VERSION_MAJOR
13997         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
13998 #if $cf_db_version == DB_VERSION_MAJOR
13999         /* ok */
14000 #else
14001         make an error
14002 #endif
14003 #else
14004 #if $cf_db_version == 1
14005         /* ok: assuming this is DB 1.8.5 */
14006 #else
14007         make an error
14008 #endif
14009 #endif
14010
14011 int
14012 main ()
14013 {
14014 DBT *foo = 0
14015   ;
14016   return 0;
14017 }
14018 _ACEOF
14019 rm -f conftest.$ac_objext
14020 if { (eval echo "$as_me:14020: \"$ac_compile\"") >&5
14021   (eval $ac_compile) 2>&5
14022   ac_status=$?
14023   echo "$as_me:14023: \$? = $ac_status" >&5
14024   (exit $ac_status); } &&
14025          { ac_try='test -s conftest.$ac_objext'
14026   { (eval echo "$as_me:14026: \"$ac_try\"") >&5
14027   (eval $ac_try) 2>&5
14028   ac_status=$?
14029   echo "$as_me:14029: \$? = $ac_status" >&5
14030   (exit $ac_status); }; }; then
14031
14032         cf_cv_hashed_db_version=$cf_db_version
14033         break
14034
14035 else
14036   echo "$as_me: failed program was:" >&5
14037 cat conftest.$ac_ext >&5
14038 fi
14039 rm -f conftest.$ac_objext conftest.$ac_ext
14040 done
14041
14042 fi
14043 echo "$as_me:14043: result: $cf_cv_hashed_db_version" >&5
14044 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
14045
14046 if test "$cf_cv_hashed_db_version" = unknown ; then
14047         { { echo "$as_me:14047: error: Cannot determine version of db" >&5
14048 echo "$as_me: error: Cannot determine version of db" >&2;}
14049    { (exit 1); exit 1; }; }
14050 else
14051
14052 echo "$as_me:14052: checking for db libraries" >&5
14053 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
14054 if test "${cf_cv_hashed_db_libs+set}" = set; then
14055   echo $ECHO_N "(cached) $ECHO_C" >&6
14056 else
14057
14058 cf_cv_hashed_db_libs=unknown
14059 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
14060 do
14061         cf_save_libs="$LIBS"
14062         if test -n "$cf_db_libs"; then
14063                 LIBS="-l$cf_db_libs $LIBS"
14064         fi
14065
14066 echo "${as_me-configure}:14066: testing checking for library "$cf_db_libs" ..." 1>&5
14067
14068         cat >conftest.$ac_ext <<_ACEOF
14069 #line 14069 "configure"
14070 #include "confdefs.h"
14071
14072 $ac_includes_default
14073 #include <db.h>
14074
14075 int
14076 main ()
14077 {
14078
14079         char *path = "/tmp/foo";
14080 #ifdef DB_VERSION_MAJOR
14081 #if DB_VERSION_MAJOR >= 4
14082         DB *result = 0;
14083         db_create(&result, NULL, 0);
14084         result->open(result,
14085                 NULL,
14086                 path,
14087                 path,
14088                 DB_HASH,
14089                 DB_CREATE,
14090                 0644);
14091 #elif DB_VERSION_MAJOR >= 3
14092         DB *result = 0;
14093         db_create(&result, NULL, 0);
14094         result->open(result,
14095                 path,
14096                 path,
14097                 DB_HASH,
14098                 DB_CREATE,
14099                 0644);
14100 #elif DB_VERSION_MAJOR >= 2
14101         DB *result = 0;
14102         db_open(path,
14103                 DB_HASH,
14104                 DB_CREATE,
14105                 0644,
14106                 (DB_ENV *) 0,
14107                 (DB_INFO *) 0,
14108                 &result);
14109 #endif /* DB_VERSION_MAJOR */
14110 #else
14111         DB *result = dbopen(path,
14112                      2,
14113                      0644,
14114                      DB_HASH,
14115                      0);
14116 #endif
14117         ${cf_cv_main_return:-return}(result != 0)
14118
14119   ;
14120   return 0;
14121 }
14122 _ACEOF
14123 rm -f conftest.$ac_objext conftest$ac_exeext
14124 if { (eval echo "$as_me:14124: \"$ac_link\"") >&5
14125   (eval $ac_link) 2>&5
14126   ac_status=$?
14127   echo "$as_me:14127: \$? = $ac_status" >&5
14128   (exit $ac_status); } &&
14129          { ac_try='test -s conftest$ac_exeext'
14130   { (eval echo "$as_me:14130: \"$ac_try\"") >&5
14131   (eval $ac_try) 2>&5
14132   ac_status=$?
14133   echo "$as_me:14133: \$? = $ac_status" >&5
14134   (exit $ac_status); }; }; then
14135
14136         if test -n "$cf_db_libs" ; then
14137                 cf_cv_hashed_db_libs=$cf_db_libs
14138         else
14139                 cf_cv_hashed_db_libs=default
14140         fi
14141         LIBS="$cf_save_libs"
14142         break
14143
14144 else
14145   echo "$as_me: failed program was:" >&5
14146 cat conftest.$ac_ext >&5
14147 fi
14148 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14149         LIBS="$cf_save_libs"
14150 done
14151
14152 fi
14153 echo "$as_me:14153: result: $cf_cv_hashed_db_libs" >&5
14154 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
14155
14156         if test "$cf_cv_hashed_db_libs" = unknown ; then
14157                 { { echo "$as_me:14157: error: Cannot determine library for db" >&5
14158 echo "$as_me: error: Cannot determine library for db" >&2;}
14159    { (exit 1); exit 1; }; }
14160         elif test "$cf_cv_hashed_db_libs" != default ; then
14161                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
14162         fi
14163 fi
14164
14165 else
14166
14167         { { echo "$as_me:14167: error: Cannot find db.h" >&5
14168 echo "$as_me: error: Cannot find db.h" >&2;}
14169    { (exit 1); exit 1; }; }
14170
14171 fi
14172
14173 fi
14174
14175 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
14176         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
14177         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
14178 fi
14179
14180 # Just in case, check if the C compiler has a bool type.
14181
14182 echo "$as_me:14182: checking if we should include stdbool.h" >&5
14183 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
14184
14185 if test "${cf_cv_header_stdbool_h+set}" = set; then
14186   echo $ECHO_N "(cached) $ECHO_C" >&6
14187 else
14188
14189         cat >conftest.$ac_ext <<_ACEOF
14190 #line 14190 "configure"
14191 #include "confdefs.h"
14192
14193 int
14194 main ()
14195 {
14196 bool foo = false
14197   ;
14198   return 0;
14199 }
14200 _ACEOF
14201 rm -f conftest.$ac_objext
14202 if { (eval echo "$as_me:14202: \"$ac_compile\"") >&5
14203   (eval $ac_compile) 2>&5
14204   ac_status=$?
14205   echo "$as_me:14205: \$? = $ac_status" >&5
14206   (exit $ac_status); } &&
14207          { ac_try='test -s conftest.$ac_objext'
14208   { (eval echo "$as_me:14208: \"$ac_try\"") >&5
14209   (eval $ac_try) 2>&5
14210   ac_status=$?
14211   echo "$as_me:14211: \$? = $ac_status" >&5
14212   (exit $ac_status); }; }; then
14213   cf_cv_header_stdbool_h=0
14214 else
14215   echo "$as_me: failed program was:" >&5
14216 cat conftest.$ac_ext >&5
14217 cat >conftest.$ac_ext <<_ACEOF
14218 #line 14218 "configure"
14219 #include "confdefs.h"
14220
14221 #ifndef __BEOS__
14222 #include <stdbool.h>
14223 #endif
14224
14225 int
14226 main ()
14227 {
14228 bool foo = false
14229   ;
14230   return 0;
14231 }
14232 _ACEOF
14233 rm -f conftest.$ac_objext
14234 if { (eval echo "$as_me:14234: \"$ac_compile\"") >&5
14235   (eval $ac_compile) 2>&5
14236   ac_status=$?
14237   echo "$as_me:14237: \$? = $ac_status" >&5
14238   (exit $ac_status); } &&
14239          { ac_try='test -s conftest.$ac_objext'
14240   { (eval echo "$as_me:14240: \"$ac_try\"") >&5
14241   (eval $ac_try) 2>&5
14242   ac_status=$?
14243   echo "$as_me:14243: \$? = $ac_status" >&5
14244   (exit $ac_status); }; }; then
14245   cf_cv_header_stdbool_h=1
14246 else
14247   echo "$as_me: failed program was:" >&5
14248 cat conftest.$ac_ext >&5
14249 cf_cv_header_stdbool_h=0
14250 fi
14251 rm -f conftest.$ac_objext conftest.$ac_ext
14252 fi
14253 rm -f conftest.$ac_objext conftest.$ac_ext
14254 fi
14255
14256 if test "$cf_cv_header_stdbool_h" = 1
14257 then    echo "$as_me:14257: result: yes" >&5
14258 echo "${ECHO_T}yes" >&6
14259 else    echo "$as_me:14259: result: no" >&5
14260 echo "${ECHO_T}no" >&6
14261 fi
14262
14263 echo "$as_me:14263: checking for builtin bool type" >&5
14264 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
14265
14266 if test "${cf_cv_cc_bool_type+set}" = set; then
14267   echo $ECHO_N "(cached) $ECHO_C" >&6
14268 else
14269
14270         cat >conftest.$ac_ext <<_ACEOF
14271 #line 14271 "configure"
14272 #include "confdefs.h"
14273
14274 #include <stdio.h>
14275 #include <sys/types.h>
14276
14277 int
14278 main ()
14279 {
14280 bool x = false
14281   ;
14282   return 0;
14283 }
14284 _ACEOF
14285 rm -f conftest.$ac_objext
14286 if { (eval echo "$as_me:14286: \"$ac_compile\"") >&5
14287   (eval $ac_compile) 2>&5
14288   ac_status=$?
14289   echo "$as_me:14289: \$? = $ac_status" >&5
14290   (exit $ac_status); } &&
14291          { ac_try='test -s conftest.$ac_objext'
14292   { (eval echo "$as_me:14292: \"$ac_try\"") >&5
14293   (eval $ac_try) 2>&5
14294   ac_status=$?
14295   echo "$as_me:14295: \$? = $ac_status" >&5
14296   (exit $ac_status); }; }; then
14297   cf_cv_cc_bool_type=1
14298 else
14299   echo "$as_me: failed program was:" >&5
14300 cat conftest.$ac_ext >&5
14301 cf_cv_cc_bool_type=0
14302 fi
14303 rm -f conftest.$ac_objext conftest.$ac_ext
14304
14305 fi
14306
14307 if test "$cf_cv_cc_bool_type" = 1
14308 then    echo "$as_me:14308: result: yes" >&5
14309 echo "${ECHO_T}yes" >&6
14310 else    echo "$as_me:14310: result: no" >&5
14311 echo "${ECHO_T}no" >&6
14312 fi
14313
14314 # Check for C++ compiler characteristics (and ensure that it's there!)
14315 if test -n "$CXX" ; then
14316         ac_ext=cc
14317 ac_cpp='$CXXCPP $CPPFLAGS'
14318 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14319 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14320 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14321 ac_main_return=return
14322
14323 if test -n "$GXX" ; then
14324 case $cf_cv_system_name in #(vi
14325 os2*) #(vi
14326         cf_stdcpp_libname=stdcpp
14327         ;;
14328 *)
14329         cf_stdcpp_libname=stdc++
14330         ;;
14331 esac
14332 echo "$as_me:14332: checking for library $cf_stdcpp_libname" >&5
14333 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
14334 if test "${cf_cv_libstdcpp+set}" = set; then
14335   echo $ECHO_N "(cached) $ECHO_C" >&6
14336 else
14337
14338         cf_save="$LIBS"
14339         LIBS="$LIBS -l$cf_stdcpp_libname"
14340 cat >conftest.$ac_ext <<_ACEOF
14341 #line 14341 "configure"
14342 #include "confdefs.h"
14343
14344 #include <strstream.h>
14345 int
14346 main ()
14347 {
14348
14349 char buf[80];
14350 strstreambuf foo(buf, sizeof(buf))
14351
14352   ;
14353   return 0;
14354 }
14355 _ACEOF
14356 rm -f conftest.$ac_objext conftest$ac_exeext
14357 if { (eval echo "$as_me:14357: \"$ac_link\"") >&5
14358   (eval $ac_link) 2>&5
14359   ac_status=$?
14360   echo "$as_me:14360: \$? = $ac_status" >&5
14361   (exit $ac_status); } &&
14362          { ac_try='test -s conftest$ac_exeext'
14363   { (eval echo "$as_me:14363: \"$ac_try\"") >&5
14364   (eval $ac_try) 2>&5
14365   ac_status=$?
14366   echo "$as_me:14366: \$? = $ac_status" >&5
14367   (exit $ac_status); }; }; then
14368   cf_cv_libstdcpp=yes
14369 else
14370   echo "$as_me: failed program was:" >&5
14371 cat conftest.$ac_ext >&5
14372 cf_cv_libstdcpp=no
14373 fi
14374 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14375         LIBS="$cf_save"
14376
14377 fi
14378 echo "$as_me:14378: result: $cf_cv_libstdcpp" >&5
14379 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
14380 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
14381 fi
14382
14383         echo "$as_me:14383: checking whether $CXX understands -c and -o together" >&5
14384 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
14385 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
14386   echo $ECHO_N "(cached) $ECHO_C" >&6
14387 else
14388
14389 cat > conftest.$ac_ext <<CF_EOF
14390 #include <stdio.h>
14391 int main()
14392 {
14393         ${cf_cv_main_return:-return}(0);
14394 }
14395 CF_EOF
14396 # We do the test twice because some compilers refuse to overwrite an
14397 # existing .o file with -o, though they will create one.
14398 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
14399 if { (eval echo "$as_me:14399: \"$ac_try\"") >&5
14400   (eval $ac_try) 2>&5
14401   ac_status=$?
14402   echo "$as_me:14402: \$? = $ac_status" >&5
14403   (exit $ac_status); } &&
14404   test -f conftest2.$ac_objext && { (eval echo "$as_me:14404: \"$ac_try\"") >&5
14405   (eval $ac_try) 2>&5
14406   ac_status=$?
14407   echo "$as_me:14407: \$? = $ac_status" >&5
14408   (exit $ac_status); };
14409 then
14410   eval cf_cv_prog_CXX_c_o=yes
14411 else
14412   eval cf_cv_prog_CXX_c_o=no
14413 fi
14414 rm -f conftest*
14415
14416 fi
14417 if test $cf_cv_prog_CXX_c_o = yes; then
14418   echo "$as_me:14418: result: yes" >&5
14419 echo "${ECHO_T}yes" >&6
14420 else
14421   echo "$as_me:14421: result: no" >&5
14422 echo "${ECHO_T}no" >&6
14423 fi
14424
14425         case $GXX_VERSION in
14426         1*|2.0-6*)
14427                 cf_cxx_library=yes
14428                 ;;
14429         *-2.7*|2.7*)
14430
14431 cf_cxx_library=unknown
14432 case $cf_cv_system_name in #(vi
14433 os2*) #(vi
14434         cf_gpp_libname=gpp
14435         ;;
14436 *)
14437         cf_gpp_libname=g++
14438         ;;
14439 esac
14440 if test "$GXX" = yes; then
14441         echo "$as_me:14441: checking for lib$cf_gpp_libname" >&5
14442 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
14443         cf_save="$LIBS"
14444         LIBS="$LIBS -l$cf_gpp_libname"
14445         cat >conftest.$ac_ext <<_ACEOF
14446 #line 14446 "configure"
14447 #include "confdefs.h"
14448
14449 #include <$cf_gpp_libname/builtin.h>
14450
14451 int
14452 main ()
14453 {
14454 two_arg_error_handler_t foo2 = lib_error_handler
14455   ;
14456   return 0;
14457 }
14458 _ACEOF
14459 rm -f conftest.$ac_objext conftest$ac_exeext
14460 if { (eval echo "$as_me:14460: \"$ac_link\"") >&5
14461   (eval $ac_link) 2>&5
14462   ac_status=$?
14463   echo "$as_me:14463: \$? = $ac_status" >&5
14464   (exit $ac_status); } &&
14465          { ac_try='test -s conftest$ac_exeext'
14466   { (eval echo "$as_me:14466: \"$ac_try\"") >&5
14467   (eval $ac_try) 2>&5
14468   ac_status=$?
14469   echo "$as_me:14469: \$? = $ac_status" >&5
14470   (exit $ac_status); }; }; then
14471   cf_cxx_library=yes
14472          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
14473          if test "$cf_gpp_libname" = cpp ; then
14474             cat >>confdefs.h <<\EOF
14475 #define HAVE_GPP_BUILTIN_H 1
14476 EOF
14477
14478          else
14479             cat >>confdefs.h <<\EOF
14480 #define HAVE_GXX_BUILTIN_H 1
14481 EOF
14482
14483          fi
14484 else
14485   echo "$as_me: failed program was:" >&5
14486 cat conftest.$ac_ext >&5
14487 cat >conftest.$ac_ext <<_ACEOF
14488 #line 14488 "configure"
14489 #include "confdefs.h"
14490
14491 #include <builtin.h>
14492
14493 int
14494 main ()
14495 {
14496 two_arg_error_handler_t foo2 = lib_error_handler
14497   ;
14498   return 0;
14499 }
14500 _ACEOF
14501 rm -f conftest.$ac_objext conftest$ac_exeext
14502 if { (eval echo "$as_me:14502: \"$ac_link\"") >&5
14503   (eval $ac_link) 2>&5
14504   ac_status=$?
14505   echo "$as_me:14505: \$? = $ac_status" >&5
14506   (exit $ac_status); } &&
14507          { ac_try='test -s conftest$ac_exeext'
14508   { (eval echo "$as_me:14508: \"$ac_try\"") >&5
14509   (eval $ac_try) 2>&5
14510   ac_status=$?
14511   echo "$as_me:14511: \$? = $ac_status" >&5
14512   (exit $ac_status); }; }; then
14513   cf_cxx_library=yes
14514          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
14515          cat >>confdefs.h <<\EOF
14516 #define HAVE_BUILTIN_H 1
14517 EOF
14518
14519 else
14520   echo "$as_me: failed program was:" >&5
14521 cat conftest.$ac_ext >&5
14522 cf_cxx_library=no
14523 fi
14524 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14525 fi
14526 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14527         LIBS="$cf_save"
14528         echo "$as_me:14528: result: $cf_cxx_library" >&5
14529 echo "${ECHO_T}$cf_cxx_library" >&6
14530 fi
14531
14532                 ;;
14533         *)
14534                 cf_cxx_library=no
14535                 ;;
14536         esac
14537
14538         ac_ext=cc
14539 ac_cpp='$CXXCPP $CPPFLAGS'
14540 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14541 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14542 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14543 ac_main_return=return
14544 echo "$as_me:14544: checking how to run the C++ preprocessor" >&5
14545 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
14546 if test -z "$CXXCPP"; then
14547   if test "${ac_cv_prog_CXXCPP+set}" = set; then
14548   echo $ECHO_N "(cached) $ECHO_C" >&6
14549 else
14550       # Double quotes because CXXCPP needs to be expanded
14551     for CXXCPP in "$CXX -E" "/lib/cpp"
14552     do
14553       ac_preproc_ok=false
14554 for ac_cxx_preproc_warn_flag in '' yes
14555 do
14556   # Use a header file that comes with gcc, so configuring glibc
14557   # with a fresh cross-compiler works.
14558   # On the NeXT, cc -E runs the code through the compiler's parser,
14559   # not just through cpp. "Syntax error" is here to catch this case.
14560   cat >conftest.$ac_ext <<_ACEOF
14561 #line 14561 "configure"
14562 #include "confdefs.h"
14563 #include <assert.h>
14564                      Syntax error
14565 _ACEOF
14566 if { (eval echo "$as_me:14566: \"$ac_cpp conftest.$ac_ext\"") >&5
14567   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14568   ac_status=$?
14569   egrep -v '^ *\+' conftest.er1 >conftest.err
14570   rm -f conftest.er1
14571   cat conftest.err >&5
14572   echo "$as_me:14572: \$? = $ac_status" >&5
14573   (exit $ac_status); } >/dev/null; then
14574   if test -s conftest.err; then
14575     ac_cpp_err=$ac_cxx_preproc_warn_flag
14576   else
14577     ac_cpp_err=
14578   fi
14579 else
14580   ac_cpp_err=yes
14581 fi
14582 if test -z "$ac_cpp_err"; then
14583   :
14584 else
14585   echo "$as_me: failed program was:" >&5
14586   cat conftest.$ac_ext >&5
14587   # Broken: fails on valid input.
14588 continue
14589 fi
14590 rm -f conftest.err conftest.$ac_ext
14591
14592   # OK, works on sane cases.  Now check whether non-existent headers
14593   # can be detected and how.
14594   cat >conftest.$ac_ext <<_ACEOF
14595 #line 14595 "configure"
14596 #include "confdefs.h"
14597 #include <ac_nonexistent.h>
14598 _ACEOF
14599 if { (eval echo "$as_me:14599: \"$ac_cpp conftest.$ac_ext\"") >&5
14600   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14601   ac_status=$?
14602   egrep -v '^ *\+' conftest.er1 >conftest.err
14603   rm -f conftest.er1
14604   cat conftest.err >&5
14605   echo "$as_me:14605: \$? = $ac_status" >&5
14606   (exit $ac_status); } >/dev/null; then
14607   if test -s conftest.err; then
14608     ac_cpp_err=$ac_cxx_preproc_warn_flag
14609   else
14610     ac_cpp_err=
14611   fi
14612 else
14613   ac_cpp_err=yes
14614 fi
14615 if test -z "$ac_cpp_err"; then
14616   # Broken: success on invalid input.
14617 continue
14618 else
14619   echo "$as_me: failed program was:" >&5
14620   cat conftest.$ac_ext >&5
14621   # Passes both tests.
14622 ac_preproc_ok=:
14623 break
14624 fi
14625 rm -f conftest.err conftest.$ac_ext
14626
14627 done
14628 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
14629 rm -f conftest.err conftest.$ac_ext
14630 if $ac_preproc_ok; then
14631   break
14632 fi
14633
14634     done
14635     ac_cv_prog_CXXCPP=$CXXCPP
14636
14637 fi
14638   CXXCPP=$ac_cv_prog_CXXCPP
14639 else
14640   ac_cv_prog_CXXCPP=$CXXCPP
14641 fi
14642 echo "$as_me:14642: result: $CXXCPP" >&5
14643 echo "${ECHO_T}$CXXCPP" >&6
14644 ac_preproc_ok=false
14645 for ac_cxx_preproc_warn_flag in '' yes
14646 do
14647   # Use a header file that comes with gcc, so configuring glibc
14648   # with a fresh cross-compiler works.
14649   # On the NeXT, cc -E runs the code through the compiler's parser,
14650   # not just through cpp. "Syntax error" is here to catch this case.
14651   cat >conftest.$ac_ext <<_ACEOF
14652 #line 14652 "configure"
14653 #include "confdefs.h"
14654 #include <assert.h>
14655                      Syntax error
14656 _ACEOF
14657 if { (eval echo "$as_me:14657: \"$ac_cpp conftest.$ac_ext\"") >&5
14658   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14659   ac_status=$?
14660   egrep -v '^ *\+' conftest.er1 >conftest.err
14661   rm -f conftest.er1
14662   cat conftest.err >&5
14663   echo "$as_me:14663: \$? = $ac_status" >&5
14664   (exit $ac_status); } >/dev/null; then
14665   if test -s conftest.err; then
14666     ac_cpp_err=$ac_cxx_preproc_warn_flag
14667   else
14668     ac_cpp_err=
14669   fi
14670 else
14671   ac_cpp_err=yes
14672 fi
14673 if test -z "$ac_cpp_err"; then
14674   :
14675 else
14676   echo "$as_me: failed program was:" >&5
14677   cat conftest.$ac_ext >&5
14678   # Broken: fails on valid input.
14679 continue
14680 fi
14681 rm -f conftest.err conftest.$ac_ext
14682
14683   # OK, works on sane cases.  Now check whether non-existent headers
14684   # can be detected and how.
14685   cat >conftest.$ac_ext <<_ACEOF
14686 #line 14686 "configure"
14687 #include "confdefs.h"
14688 #include <ac_nonexistent.h>
14689 _ACEOF
14690 if { (eval echo "$as_me:14690: \"$ac_cpp conftest.$ac_ext\"") >&5
14691   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14692   ac_status=$?
14693   egrep -v '^ *\+' conftest.er1 >conftest.err
14694   rm -f conftest.er1
14695   cat conftest.err >&5
14696   echo "$as_me:14696: \$? = $ac_status" >&5
14697   (exit $ac_status); } >/dev/null; then
14698   if test -s conftest.err; then
14699     ac_cpp_err=$ac_cxx_preproc_warn_flag
14700   else
14701     ac_cpp_err=
14702   fi
14703 else
14704   ac_cpp_err=yes
14705 fi
14706 if test -z "$ac_cpp_err"; then
14707   # Broken: success on invalid input.
14708 continue
14709 else
14710   echo "$as_me: failed program was:" >&5
14711   cat conftest.$ac_ext >&5
14712   # Passes both tests.
14713 ac_preproc_ok=:
14714 break
14715 fi
14716 rm -f conftest.err conftest.$ac_ext
14717
14718 done
14719 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
14720 rm -f conftest.err conftest.$ac_ext
14721 if $ac_preproc_ok; then
14722   :
14723 else
14724   { { echo "$as_me:14724: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
14725 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
14726    { (exit 1); exit 1; }; }
14727 fi
14728
14729 ac_ext=cc
14730 ac_cpp='$CXXCPP $CPPFLAGS'
14731 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14732 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14733 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14734 ac_main_return=return
14735
14736 for ac_header in iostream typeinfo
14737 do
14738 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14739 echo "$as_me:14739: checking for $ac_header" >&5
14740 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14741 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14742   echo $ECHO_N "(cached) $ECHO_C" >&6
14743 else
14744   cat >conftest.$ac_ext <<_ACEOF
14745 #line 14745 "configure"
14746 #include "confdefs.h"
14747 #include <$ac_header>
14748 _ACEOF
14749 if { (eval echo "$as_me:14749: \"$ac_cpp conftest.$ac_ext\"") >&5
14750   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14751   ac_status=$?
14752   egrep -v '^ *\+' conftest.er1 >conftest.err
14753   rm -f conftest.er1
14754   cat conftest.err >&5
14755   echo "$as_me:14755: \$? = $ac_status" >&5
14756   (exit $ac_status); } >/dev/null; then
14757   if test -s conftest.err; then
14758     ac_cpp_err=$ac_cxx_preproc_warn_flag
14759   else
14760     ac_cpp_err=
14761   fi
14762 else
14763   ac_cpp_err=yes
14764 fi
14765 if test -z "$ac_cpp_err"; then
14766   eval "$as_ac_Header=yes"
14767 else
14768   echo "$as_me: failed program was:" >&5
14769   cat conftest.$ac_ext >&5
14770   eval "$as_ac_Header=no"
14771 fi
14772 rm -f conftest.err conftest.$ac_ext
14773 fi
14774 echo "$as_me:14774: result: `eval echo '${'$as_ac_Header'}'`" >&5
14775 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14776 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14777   cat >>confdefs.h <<EOF
14778 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14779 EOF
14780
14781 fi
14782 done
14783
14784     if test x"$ac_cv_header_iostream" = xyes ; then
14785         echo "$as_me:14785: checking if iostream uses std-namespace" >&5
14786 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
14787         cat >conftest.$ac_ext <<_ACEOF
14788 #line 14788 "configure"
14789 #include "confdefs.h"
14790
14791 #include <iostream>
14792 using std::endl;
14793 using std::cerr;
14794 int
14795 main ()
14796 {
14797
14798 cerr << "testing" << endl;
14799
14800   ;
14801   return 0;
14802 }
14803 _ACEOF
14804 rm -f conftest.$ac_objext
14805 if { (eval echo "$as_me:14805: \"$ac_compile\"") >&5
14806   (eval $ac_compile) 2>&5
14807   ac_status=$?
14808   echo "$as_me:14808: \$? = $ac_status" >&5
14809   (exit $ac_status); } &&
14810          { ac_try='test -s conftest.$ac_objext'
14811   { (eval echo "$as_me:14811: \"$ac_try\"") >&5
14812   (eval $ac_try) 2>&5
14813   ac_status=$?
14814   echo "$as_me:14814: \$? = $ac_status" >&5
14815   (exit $ac_status); }; }; then
14816   cf_iostream_namespace=yes
14817 else
14818   echo "$as_me: failed program was:" >&5
14819 cat conftest.$ac_ext >&5
14820 cf_iostream_namespace=no
14821 fi
14822 rm -f conftest.$ac_objext conftest.$ac_ext
14823         echo "$as_me:14823: result: $cf_iostream_namespace" >&5
14824 echo "${ECHO_T}$cf_iostream_namespace" >&6
14825         if test "$cf_iostream_namespace" = yes ; then
14826             cat >>confdefs.h <<\EOF
14827 #define IOSTREAM_NAMESPACE 1
14828 EOF
14829
14830         fi
14831     fi
14832
14833 echo "$as_me:14833: checking if we should include stdbool.h" >&5
14834 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
14835
14836 if test "${cf_cv_header_stdbool_h+set}" = set; then
14837   echo $ECHO_N "(cached) $ECHO_C" >&6
14838 else
14839
14840         cat >conftest.$ac_ext <<_ACEOF
14841 #line 14841 "configure"
14842 #include "confdefs.h"
14843
14844 int
14845 main ()
14846 {
14847 bool foo = false
14848   ;
14849   return 0;
14850 }
14851 _ACEOF
14852 rm -f conftest.$ac_objext
14853 if { (eval echo "$as_me:14853: \"$ac_compile\"") >&5
14854   (eval $ac_compile) 2>&5
14855   ac_status=$?
14856   echo "$as_me:14856: \$? = $ac_status" >&5
14857   (exit $ac_status); } &&
14858          { ac_try='test -s conftest.$ac_objext'
14859   { (eval echo "$as_me:14859: \"$ac_try\"") >&5
14860   (eval $ac_try) 2>&5
14861   ac_status=$?
14862   echo "$as_me:14862: \$? = $ac_status" >&5
14863   (exit $ac_status); }; }; then
14864   cf_cv_header_stdbool_h=0
14865 else
14866   echo "$as_me: failed program was:" >&5
14867 cat conftest.$ac_ext >&5
14868 cat >conftest.$ac_ext <<_ACEOF
14869 #line 14869 "configure"
14870 #include "confdefs.h"
14871
14872 #ifndef __BEOS__
14873 #include <stdbool.h>
14874 #endif
14875
14876 int
14877 main ()
14878 {
14879 bool foo = false
14880   ;
14881   return 0;
14882 }
14883 _ACEOF
14884 rm -f conftest.$ac_objext
14885 if { (eval echo "$as_me:14885: \"$ac_compile\"") >&5
14886   (eval $ac_compile) 2>&5
14887   ac_status=$?
14888   echo "$as_me:14888: \$? = $ac_status" >&5
14889   (exit $ac_status); } &&
14890          { ac_try='test -s conftest.$ac_objext'
14891   { (eval echo "$as_me:14891: \"$ac_try\"") >&5
14892   (eval $ac_try) 2>&5
14893   ac_status=$?
14894   echo "$as_me:14894: \$? = $ac_status" >&5
14895   (exit $ac_status); }; }; then
14896   cf_cv_header_stdbool_h=1
14897 else
14898   echo "$as_me: failed program was:" >&5
14899 cat conftest.$ac_ext >&5
14900 cf_cv_header_stdbool_h=0
14901 fi
14902 rm -f conftest.$ac_objext conftest.$ac_ext
14903 fi
14904 rm -f conftest.$ac_objext conftest.$ac_ext
14905 fi
14906
14907 if test "$cf_cv_header_stdbool_h" = 1
14908 then    echo "$as_me:14908: result: yes" >&5
14909 echo "${ECHO_T}yes" >&6
14910 else    echo "$as_me:14910: result: no" >&5
14911 echo "${ECHO_T}no" >&6
14912 fi
14913
14914 echo "$as_me:14914: checking for builtin bool type" >&5
14915 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
14916
14917 if test "${cf_cv_builtin_bool+set}" = set; then
14918   echo $ECHO_N "(cached) $ECHO_C" >&6
14919 else
14920
14921         cat >conftest.$ac_ext <<_ACEOF
14922 #line 14922 "configure"
14923 #include "confdefs.h"
14924
14925 #include <stdio.h>
14926 #include <sys/types.h>
14927
14928 int
14929 main ()
14930 {
14931 bool x = false
14932   ;
14933   return 0;
14934 }
14935 _ACEOF
14936 rm -f conftest.$ac_objext
14937 if { (eval echo "$as_me:14937: \"$ac_compile\"") >&5
14938   (eval $ac_compile) 2>&5
14939   ac_status=$?
14940   echo "$as_me:14940: \$? = $ac_status" >&5
14941   (exit $ac_status); } &&
14942          { ac_try='test -s conftest.$ac_objext'
14943   { (eval echo "$as_me:14943: \"$ac_try\"") >&5
14944   (eval $ac_try) 2>&5
14945   ac_status=$?
14946   echo "$as_me:14946: \$? = $ac_status" >&5
14947   (exit $ac_status); }; }; then
14948   cf_cv_builtin_bool=1
14949 else
14950   echo "$as_me: failed program was:" >&5
14951 cat conftest.$ac_ext >&5
14952 cf_cv_builtin_bool=0
14953 fi
14954 rm -f conftest.$ac_objext conftest.$ac_ext
14955
14956 fi
14957
14958 if test "$cf_cv_builtin_bool" = 1
14959 then    echo "$as_me:14959: result: yes" >&5
14960 echo "${ECHO_T}yes" >&6
14961 else    echo "$as_me:14961: result: no" >&5
14962 echo "${ECHO_T}no" >&6
14963 fi
14964
14965 echo "$as_me:14965: checking for size of bool" >&5
14966 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
14967 if test "${cf_cv_type_of_bool+set}" = set; then
14968   echo $ECHO_N "(cached) $ECHO_C" >&6
14969 else
14970
14971         rm -f cf_test.out
14972         if test "$cross_compiling" = yes; then
14973   cf_cv_type_of_bool=unknown
14974 else
14975   cat >conftest.$ac_ext <<_ACEOF
14976 #line 14976 "configure"
14977 #include "confdefs.h"
14978
14979 #include <stdlib.h>
14980 #include <stdio.h>
14981
14982 #if defined(__cplusplus)
14983
14984 #ifdef HAVE_GXX_BUILTIN_H
14985 #include <g++/builtin.h>
14986 #elif HAVE_GPP_BUILTIN_H
14987 #include <gpp/builtin.h>
14988 #elif HAVE_BUILTIN_H
14989 #include <builtin.h>
14990 #endif
14991
14992 #else
14993
14994 #if $cf_cv_header_stdbool_h
14995 #include <stdbool.h>
14996 #endif
14997
14998 #endif
14999
15000 main()
15001 {
15002         FILE *fp = fopen("cf_test.out", "w");
15003         if (fp != 0) {
15004                 bool x = true;
15005                 if ((bool)(-x) >= 0)
15006                         fputs("unsigned ", fp);
15007                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
15008                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
15009                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
15010                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
15011                 fclose(fp);
15012         }
15013         ${cf_cv_main_return:-return}(0);
15014 }
15015
15016 _ACEOF
15017 rm -f conftest$ac_exeext
15018 if { (eval echo "$as_me:15018: \"$ac_link\"") >&5
15019   (eval $ac_link) 2>&5
15020   ac_status=$?
15021   echo "$as_me:15021: \$? = $ac_status" >&5
15022   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15023   { (eval echo "$as_me:15023: \"$ac_try\"") >&5
15024   (eval $ac_try) 2>&5
15025   ac_status=$?
15026   echo "$as_me:15026: \$? = $ac_status" >&5
15027   (exit $ac_status); }; }; then
15028   cf_cv_type_of_bool=`cat cf_test.out`
15029                  if test -z "$cf_cv_type_of_bool"; then
15030                    cf_cv_type_of_bool=unknown
15031                  fi
15032 else
15033   echo "$as_me: program exited with status $ac_status" >&5
15034 echo "$as_me: failed program was:" >&5
15035 cat conftest.$ac_ext >&5
15036 cf_cv_type_of_bool=unknown
15037 fi
15038 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15039 fi
15040
15041 fi
15042
15043         rm -f cf_test.out
15044 echo "$as_me:15044: result: $cf_cv_type_of_bool" >&5
15045 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15046 if test "$cf_cv_type_of_bool" = unknown ; then
15047         case .$NCURSES_BOOL in #(vi
15048         .auto|.) NCURSES_BOOL=unsigned;;
15049         esac
15050         { echo "$as_me:15050: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
15051 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
15052         cf_cv_type_of_bool=$NCURSES_BOOL
15053 fi
15054
15055 echo "$as_me:15055: checking for special defines needed for etip.h" >&5
15056 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
15057 cf_save_CXXFLAGS="$CXXFLAGS"
15058 cf_result="none"
15059 for cf_math in "" MATH_H
15060 do
15061 for cf_excp in "" MATH_EXCEPTION
15062 do
15063         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
15064         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
15065         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
15066 cat >conftest.$ac_ext <<_ACEOF
15067 #line 15067 "configure"
15068 #include "confdefs.h"
15069
15070 #include <etip.h.in>
15071
15072 int
15073 main ()
15074 {
15075
15076   ;
15077   return 0;
15078 }
15079 _ACEOF
15080 rm -f conftest.$ac_objext
15081 if { (eval echo "$as_me:15081: \"$ac_compile\"") >&5
15082   (eval $ac_compile) 2>&5
15083   ac_status=$?
15084   echo "$as_me:15084: \$? = $ac_status" >&5
15085   (exit $ac_status); } &&
15086          { ac_try='test -s conftest.$ac_objext'
15087   { (eval echo "$as_me:15087: \"$ac_try\"") >&5
15088   (eval $ac_try) 2>&5
15089   ac_status=$?
15090   echo "$as_me:15090: \$? = $ac_status" >&5
15091   (exit $ac_status); }; }; then
15092
15093         test -n "$cf_math" && cat >>confdefs.h <<EOF
15094 #define ETIP_NEEDS_${cf_math} 1
15095 EOF
15096
15097         test -n "$cf_excp" && cat >>confdefs.h <<EOF
15098 #define ETIP_NEEDS_${cf_excp} 1
15099 EOF
15100
15101         cf_result="$cf_math $cf_excp"
15102         break
15103
15104 else
15105   echo "$as_me: failed program was:" >&5
15106 cat conftest.$ac_ext >&5
15107 fi
15108 rm -f conftest.$ac_objext conftest.$ac_ext
15109 done
15110 done
15111 echo "$as_me:15111: result: $cf_result" >&5
15112 echo "${ECHO_T}$cf_result" >&6
15113 CXXFLAGS="$cf_save_CXXFLAGS"
15114
15115 if test -n "$CXX"; then
15116 echo "$as_me:15116: checking if $CXX accepts parameter initialization" >&5
15117 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
15118 if test "${cf_cv_cpp_param_init+set}" = set; then
15119   echo $ECHO_N "(cached) $ECHO_C" >&6
15120 else
15121
15122         ac_ext=cc
15123 ac_cpp='$CXXCPP $CPPFLAGS'
15124 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15125 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15126 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15127 ac_main_return=return
15128
15129         if test "$cross_compiling" = yes; then
15130   cf_cv_cpp_param_init=unknown
15131 else
15132   cat >conftest.$ac_ext <<_ACEOF
15133 #line 15133 "configure"
15134 #include "confdefs.h"
15135
15136 class TEST {
15137 private:
15138         int value;
15139 public:
15140         TEST(int x = 1);
15141         ~TEST();
15142 };
15143
15144 TEST::TEST(int x = 1)   // some compilers do not like second initializer
15145 {
15146         value = x;
15147 }
15148 void main() { }
15149
15150 _ACEOF
15151 rm -f conftest$ac_exeext
15152 if { (eval echo "$as_me:15152: \"$ac_link\"") >&5
15153   (eval $ac_link) 2>&5
15154   ac_status=$?
15155   echo "$as_me:15155: \$? = $ac_status" >&5
15156   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15157   { (eval echo "$as_me:15157: \"$ac_try\"") >&5
15158   (eval $ac_try) 2>&5
15159   ac_status=$?
15160   echo "$as_me:15160: \$? = $ac_status" >&5
15161   (exit $ac_status); }; }; then
15162   cf_cv_cpp_param_init=yes
15163 else
15164   echo "$as_me: program exited with status $ac_status" >&5
15165 echo "$as_me: failed program was:" >&5
15166 cat conftest.$ac_ext >&5
15167 cf_cv_cpp_param_init=no
15168 fi
15169 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15170 fi
15171         ac_ext=cc
15172 ac_cpp='$CXXCPP $CPPFLAGS'
15173 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15174 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15175 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15176 ac_main_return=return
15177
15178 fi
15179 echo "$as_me:15179: result: $cf_cv_cpp_param_init" >&5
15180 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
15181 fi
15182 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
15183 #define CPP_HAS_PARAM_INIT 1
15184 EOF
15185
15186 if test -n "$CXX"; then
15187
15188 echo "$as_me:15188: checking if $CXX accepts static_cast" >&5
15189 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
15190 if test "${cf_cv_cpp_static_cast+set}" = set; then
15191   echo $ECHO_N "(cached) $ECHO_C" >&6
15192 else
15193
15194         ac_ext=cc
15195 ac_cpp='$CXXCPP $CPPFLAGS'
15196 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15197 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15198 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15199 ac_main_return=return
15200
15201         cat >conftest.$ac_ext <<_ACEOF
15202 #line 15202 "configure"
15203 #include "confdefs.h"
15204
15205 class NCursesPanel
15206 {
15207 public:
15208   NCursesPanel(int nlines,
15209                int ncols,
15210                int begin_y = 0,
15211                int begin_x = 0)
15212   {
15213   }
15214
15215   ~NCursesPanel();
15216 };
15217
15218 template<class T> class NCursesUserPanel : public NCursesPanel
15219 {
15220 public:
15221   NCursesUserPanel (int nlines,
15222                     int ncols,
15223                     int begin_y = 0,
15224                     int begin_x = 0,
15225                     const T* p_UserData = static_cast<T*>(0))
15226     : NCursesPanel (nlines, ncols, begin_y, begin_x)
15227   {
15228   };
15229   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
15230   {
15231   };
15232
15233   virtual ~NCursesUserPanel() {};
15234 };
15235
15236 int
15237 main ()
15238 {
15239
15240         const char* p_UserData = static_cast<char*>(0)
15241   ;
15242   return 0;
15243 }
15244 _ACEOF
15245 rm -f conftest.$ac_objext
15246 if { (eval echo "$as_me:15246: \"$ac_compile\"") >&5
15247   (eval $ac_compile) 2>&5
15248   ac_status=$?
15249   echo "$as_me:15249: \$? = $ac_status" >&5
15250   (exit $ac_status); } &&
15251          { ac_try='test -s conftest.$ac_objext'
15252   { (eval echo "$as_me:15252: \"$ac_try\"") >&5
15253   (eval $ac_try) 2>&5
15254   ac_status=$?
15255   echo "$as_me:15255: \$? = $ac_status" >&5
15256   (exit $ac_status); }; }; then
15257   cf_cv_cpp_static_cast=yes
15258 else
15259   echo "$as_me: failed program was:" >&5
15260 cat conftest.$ac_ext >&5
15261 cf_cv_cpp_static_cast=no
15262 fi
15263 rm -f conftest.$ac_objext conftest.$ac_ext
15264
15265         ac_ext=cc
15266 ac_cpp='$CXXCPP $CPPFLAGS'
15267 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15268 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15269 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15270 ac_main_return=return
15271
15272 fi
15273 echo "$as_me:15273: result: $cf_cv_cpp_static_cast" >&5
15274 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
15275
15276 fi
15277
15278 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
15279 #define CPP_HAS_STATIC_CAST 1
15280 EOF
15281
15282         CXX_AR='$(AR)'
15283         CXX_AR_OPTS='$(AR_OPTS)'
15284         case $cf_cv_system_name in #(vi
15285         irix*) #(vi
15286             if test "$GXX" != yes ; then
15287                 CXX_AR='$(CXX)'
15288                 CXX_AR_OPTS='-ar -o'
15289             fi
15290             ;;
15291         sco3.2v5*) #(vi
15292             CXXLDFLAGS="-u main"
15293             ;;
15294         solaris2*)
15295             if test "$GXX" != yes ; then
15296                 CXX_AR='$(CXX)'
15297                 CXX_AR_OPTS='-xar -o'
15298             fi
15299             ;;
15300         esac
15301
15302 else
15303         cf_cxx_library=no
15304         cf_cv_builtin_bool=1
15305
15306         # Just because we are not configuring against C++ right now does not
15307         # mean that a user will not want to use C++.  Some distributors disable
15308         # the C++ portion of this configuration as a shortcut (or just to avoid
15309         # compiling the demo in the c++ directory).  So we need a reasonable
15310         # default for the 'bool' type.
15311         #
15312         # Caveat: since the storage of the bool type is not standardized, it
15313         # may change.
15314
15315         if test "$NCURSES_BOOL" != auto ; then
15316                 cf_cv_type_of_bool=$NCURSES_BOOL
15317                 cf_cv_header_stdbool_h=0
15318         else
15319                 if test "$cf_cv_header_stdbool_h" = 1 ; then
15320
15321 echo "$as_me:15321: checking for size of bool" >&5
15322 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
15323 if test "${cf_cv_type_of_bool+set}" = set; then
15324   echo $ECHO_N "(cached) $ECHO_C" >&6
15325 else
15326
15327         rm -f cf_test.out
15328         if test "$cross_compiling" = yes; then
15329   cf_cv_type_of_bool=unknown
15330 else
15331   cat >conftest.$ac_ext <<_ACEOF
15332 #line 15332 "configure"
15333 #include "confdefs.h"
15334
15335 #include <stdlib.h>
15336 #include <stdio.h>
15337
15338 #if defined(__cplusplus)
15339
15340 #ifdef HAVE_GXX_BUILTIN_H
15341 #include <g++/builtin.h>
15342 #elif HAVE_GPP_BUILTIN_H
15343 #include <gpp/builtin.h>
15344 #elif HAVE_BUILTIN_H
15345 #include <builtin.h>
15346 #endif
15347
15348 #else
15349
15350 #if $cf_cv_header_stdbool_h
15351 #include <stdbool.h>
15352 #endif
15353
15354 #endif
15355
15356 main()
15357 {
15358         FILE *fp = fopen("cf_test.out", "w");
15359         if (fp != 0) {
15360                 bool x = true;
15361                 if ((bool)(-x) >= 0)
15362                         fputs("unsigned ", fp);
15363                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
15364                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
15365                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
15366                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
15367                 fclose(fp);
15368         }
15369         ${cf_cv_main_return:-return}(0);
15370 }
15371
15372 _ACEOF
15373 rm -f conftest$ac_exeext
15374 if { (eval echo "$as_me:15374: \"$ac_link\"") >&5
15375   (eval $ac_link) 2>&5
15376   ac_status=$?
15377   echo "$as_me:15377: \$? = $ac_status" >&5
15378   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15379   { (eval echo "$as_me:15379: \"$ac_try\"") >&5
15380   (eval $ac_try) 2>&5
15381   ac_status=$?
15382   echo "$as_me:15382: \$? = $ac_status" >&5
15383   (exit $ac_status); }; }; then
15384   cf_cv_type_of_bool=`cat cf_test.out`
15385                  if test -z "$cf_cv_type_of_bool"; then
15386                    cf_cv_type_of_bool=unknown
15387                  fi
15388 else
15389   echo "$as_me: program exited with status $ac_status" >&5
15390 echo "$as_me: failed program was:" >&5
15391 cat conftest.$ac_ext >&5
15392 cf_cv_type_of_bool=unknown
15393 fi
15394 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15395 fi
15396
15397 fi
15398
15399         rm -f cf_test.out
15400 echo "$as_me:15400: result: $cf_cv_type_of_bool" >&5
15401 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15402 if test "$cf_cv_type_of_bool" = unknown ; then
15403         case .$NCURSES_BOOL in #(vi
15404         .auto|.) NCURSES_BOOL=unsigned;;
15405         esac
15406         { echo "$as_me:15406: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
15407 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
15408         cf_cv_type_of_bool=$NCURSES_BOOL
15409 fi
15410
15411                 else
15412                         echo "$as_me:15412: checking for fallback type of bool" >&5
15413 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
15414                         case "$host_cpu" in #(vi
15415                         i?86)   cf_cv_type_of_bool=char ;; #(vi
15416                         *)      cf_cv_type_of_bool=int  ;;
15417                         esac
15418                         echo "$as_me:15418: result: $cf_cv_type_of_bool" >&5
15419 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15420                 fi
15421         fi
15422 fi
15423
15424 # If the C compiler did not declare bool, and we did not determine that the C++
15425 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
15426 # ncurses library use the same type as C++ bool.  Note that this allows one to
15427 # specify the type of bool in a configure-script option and postpone
15428 # integration with the C++ compiler provided that the types are compatible.
15429 USE_CXX_BOOL=1
15430 if test $cf_cv_cc_bool_type = 1
15431 then
15432         # oops: C has a bool.  Unlikely, but C++ could differ.
15433         USE_CXX_BOOL=0
15434 elif test $cf_cv_builtin_bool = 0
15435 then
15436         # C++ has no bool
15437         USE_CXX_BOOL=0
15438 else
15439         # this is the normal case
15440         USE_CXX_BOOL='defined(__cplusplus)'
15441 fi
15442
15443 if test -f "${srcdir}/Ada95/Makefile.in" ; then
15444
15445 if test "$cf_with_ada" != "no" ; then
15446     if test "$with_libtool" != "no"; then
15447         { echo "$as_me:15447: WARNING: libtool does not support Ada - disabling feature" >&5
15448 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
15449         cf_with_ada=no
15450     fi
15451 fi
15452
15453 if test "$cf_with_ada" != "no" ; then
15454 cf_ada_make=gnatmake
15455 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
15456 set dummy $cf_ada_make; ac_word=$2
15457 echo "$as_me:15457: checking for $ac_word" >&5
15458 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15459 if test "${ac_cv_prog_gnat_exists+set}" = set; then
15460   echo $ECHO_N "(cached) $ECHO_C" >&6
15461 else
15462   if test -n "$gnat_exists"; then
15463   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
15464 else
15465   ac_save_IFS=$IFS; IFS=$ac_path_separator
15466 ac_dummy="$PATH"
15467 for ac_dir in $ac_dummy; do
15468   IFS=$ac_save_IFS
15469   test -z "$ac_dir" && ac_dir=.
15470   $as_executable_p "$ac_dir/$ac_word" || continue
15471 ac_cv_prog_gnat_exists="yes"
15472 echo "$as_me:15472: found $ac_dir/$ac_word" >&5
15473 break
15474 done
15475
15476   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
15477 fi
15478 fi
15479 gnat_exists=$ac_cv_prog_gnat_exists
15480 if test -n "$gnat_exists"; then
15481   echo "$as_me:15481: result: $gnat_exists" >&5
15482 echo "${ECHO_T}$gnat_exists" >&6
15483 else
15484   echo "$as_me:15484: result: no" >&5
15485 echo "${ECHO_T}no" >&6
15486 fi
15487
15488 if test "$ac_cv_prog_gnat_exists" = no; then
15489    cf_ada_make=
15490 else
15491
15492 echo "$as_me:15492: checking for gnat version" >&5
15493 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
15494 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
15495   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
15496 echo "$as_me:15496: result: $cf_gnat_version" >&5
15497 echo "${ECHO_T}$cf_gnat_version" >&6
15498
15499 case $cf_gnat_version in
15500   3.1[1-9]*|3.[2-9]*|[4-9].*)
15501     cf_cv_prog_gnat_correct=yes
15502     ;;
15503   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
15504      cf_cv_prog_gnat_correct=no
15505      ;;
15506 esac
15507 case $cf_gnat_version in
15508   3.[1-9]*|[4-9].*)
15509       cf_compile_generics=generics
15510       cf_generic_objects="\${GENOBJS}"
15511       ;;
15512   *)  cf_compile_generics=
15513       cf_generic_objects=
15514       ;;
15515 esac
15516
15517    # Extract the first word of "m4", so it can be a program name with args.
15518 set dummy m4; ac_word=$2
15519 echo "$as_me:15519: checking for $ac_word" >&5
15520 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15521 if test "${ac_cv_prog_M4_exists+set}" = set; then
15522   echo $ECHO_N "(cached) $ECHO_C" >&6
15523 else
15524   if test -n "$M4_exists"; then
15525   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
15526 else
15527   ac_save_IFS=$IFS; IFS=$ac_path_separator
15528 ac_dummy="$PATH"
15529 for ac_dir in $ac_dummy; do
15530   IFS=$ac_save_IFS
15531   test -z "$ac_dir" && ac_dir=.
15532   $as_executable_p "$ac_dir/$ac_word" || continue
15533 ac_cv_prog_M4_exists="yes"
15534 echo "$as_me:15534: found $ac_dir/$ac_word" >&5
15535 break
15536 done
15537
15538   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
15539 fi
15540 fi
15541 M4_exists=$ac_cv_prog_M4_exists
15542 if test -n "$M4_exists"; then
15543   echo "$as_me:15543: result: $M4_exists" >&5
15544 echo "${ECHO_T}$M4_exists" >&6
15545 else
15546   echo "$as_me:15546: result: no" >&5
15547 echo "${ECHO_T}no" >&6
15548 fi
15549
15550    if test "$ac_cv_prog_M4_exists" = no; then
15551       cf_cv_prog_gnat_correct=no
15552       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
15553    fi
15554    if test "$cf_cv_prog_gnat_correct" = yes; then
15555       echo "$as_me:15555: checking if GNAT works" >&5
15556 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
15557
15558 rm -f conftest*
15559 cat >>conftest.ads <<CF_EOF
15560 procedure conftest;
15561 CF_EOF
15562 cat >>conftest.adb <<CF_EOF
15563 with Text_IO;
15564 with GNAT.OS_Lib;
15565 procedure conftest is
15566 begin
15567    Text_IO.Put ("Hello World");
15568    Text_IO.New_Line;
15569    GNAT.OS_Lib.OS_Exit (0);
15570 end conftest;
15571 CF_EOF
15572 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
15573    if ( ./conftest 1>&5 2>&1 ) ; then
15574       cf_cv_prog_gnat_correct=yes
15575    else
15576       cf_cv_prog_gnat_correct=no
15577    fi
15578 else
15579    cf_cv_prog_gnat_correct=no
15580 fi
15581 rm -f conftest*
15582
15583       echo "$as_me:15583: result: $cf_cv_prog_gnat_correct" >&5
15584 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
15585    fi
15586 fi
15587 if test "$cf_cv_prog_gnat_correct" = yes; then
15588    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
15589
15590    echo "$as_me:15590: checking if GNAT pragma Unreferenced works" >&5
15591 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
15592
15593 rm -f conftest*
15594 cat >>conftest.ads <<CF_EOF
15595 procedure conftest;
15596 CF_EOF
15597 cat >>conftest.adb <<CF_EOF
15598 with Text_IO;
15599 with GNAT.OS_Lib;
15600 procedure conftest is
15601    test : Integer;
15602    pragma Unreferenced (test);
15603 begin
15604    test := 1;
15605    Text_IO.Put ("Hello World");
15606    Text_IO.New_Line;
15607    GNAT.OS_Lib.OS_Exit (0);
15608 end conftest;
15609 CF_EOF
15610 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
15611       cf_cv_pragma_unreferenced=yes
15612 else
15613    cf_cv_pragma_unreferenced=no
15614 fi
15615 rm -f conftest*
15616
15617    echo "$as_me:15617: result: $cf_cv_pragma_unreferenced" >&5
15618 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
15619
15620    # if the pragma is supported, use it (needed in the Trace code).
15621    if test $cf_cv_pragma_unreferenced = yes ; then
15622       PRAGMA_UNREF=TRUE
15623    else
15624       PRAGMA_UNREF=FALSE
15625    fi
15626
15627 # Check whether --with-ada-compiler or --without-ada-compiler was given.
15628 if test "${with_ada_compiler+set}" = set; then
15629   withval="$with_ada_compiler"
15630   cf_ada_compiler=$withval
15631 else
15632   cf_ada_compiler=gnatmake
15633 fi;
15634
15635    cf_ada_package=terminal_interface
15636
15637 # Check whether --with-ada-include or --without-ada-include was given.
15638 if test "${with_ada_include+set}" = set; then
15639   withval="$with_ada_include"
15640
15641 else
15642   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
15643 fi; if test -n "$prefix/lib/ada/adainclude" ; then
15644
15645 if test "x$prefix" != xNONE; then
15646   cf_path_syntax="$prefix"
15647 else
15648   cf_path_syntax="$ac_default_prefix"
15649 fi
15650
15651 case ".$withval" in #(vi
15652 .\$\(*\)*|.\'*\'*) #(vi
15653   ;;
15654 ..|./*|.\\*) #(vi
15655   ;;
15656 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
15657   ;;
15658 .\${*prefix}*) #(vi
15659   eval withval="$withval"
15660   case ".$withval" in #(vi
15661   .NONE/*)
15662     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15663     ;;
15664   esac
15665   ;; #(vi
15666 .no|.NONE/*)
15667   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15668   ;;
15669 *)
15670   { { echo "$as_me:15670: error: expected a pathname, not \"$withval\"" >&5
15671 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
15672    { (exit 1); exit 1; }; }
15673   ;;
15674 esac
15675
15676 fi
15677 ADA_INCLUDE="$withval"
15678
15679 # Check whether --with-ada-objects or --without-ada-objects was given.
15680 if test "${with_ada_objects+set}" = set; then
15681   withval="$with_ada_objects"
15682
15683 else
15684   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
15685 fi; if test -n "$prefix/lib/ada/adalib" ; then
15686
15687 if test "x$prefix" != xNONE; then
15688   cf_path_syntax="$prefix"
15689 else
15690   cf_path_syntax="$ac_default_prefix"
15691 fi
15692
15693 case ".$withval" in #(vi
15694 .\$\(*\)*|.\'*\'*) #(vi
15695   ;;
15696 ..|./*|.\\*) #(vi
15697   ;;
15698 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
15699   ;;
15700 .\${*prefix}*) #(vi
15701   eval withval="$withval"
15702   case ".$withval" in #(vi
15703   .NONE/*)
15704     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15705     ;;
15706   esac
15707   ;; #(vi
15708 .no|.NONE/*)
15709   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15710   ;;
15711 *)
15712   { { echo "$as_me:15712: error: expected a pathname, not \"$withval\"" >&5
15713 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
15714    { (exit 1); exit 1; }; }
15715   ;;
15716 esac
15717
15718 fi
15719 ADA_OBJECTS="$withval"
15720
15721 fi
15722 fi
15723 else
15724    cf_with_ada=no
15725 fi
15726
15727 ### Construct the ncurses library-subsets, if any, from this set of keywords:
15728 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
15729 ###
15730 ### ticlib modules may be a separate library, otherwise contained in termlib.
15731 ### termlib modules may be a separate library, otherwise contained in ncurses.
15732 ###
15733 ### The of "+" or " " between the tokens controls the way the script
15734 ### chooses to split module lists into libraries.
15735 ###
15736 ### (see CF_LIB_RULES).
15737 echo "$as_me:15737: checking for library subsets" >&5
15738 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
15739 LIB_SUBSETS=
15740
15741 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
15742         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
15743         if test "$with_ticlib" != no ; then
15744                 LIB_SUBSETS="${LIB_SUBSETS} "
15745         else
15746                 LIB_SUBSETS="${LIB_SUBSETS}+"
15747         fi
15748 fi
15749
15750 LIB_SUBSETS="${LIB_SUBSETS}termlib"
15751 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
15752 if test "$with_termlib" != no ; then
15753         LIB_SUBSETS="${LIB_SUBSETS} "
15754 else
15755         LIB_SUBSETS="${LIB_SUBSETS}+"
15756 fi
15757
15758 LIB_SUBSETS="${LIB_SUBSETS}base"
15759 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
15760 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
15761
15762 echo "$as_me:15762: result: $LIB_SUBSETS" >&5
15763 echo "${ECHO_T}$LIB_SUBSETS" >&6
15764
15765 ### Construct the list of include-directories to be generated
15766
15767 CPPFLAGS="-I. -I../include $CPPFLAGS"
15768 if test "$srcdir" != "."; then
15769         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
15770 fi
15771 if test "$GCC" != yes; then
15772         CPPFLAGS="$CPPFLAGS -I\${includedir}"
15773 elif test "$includedir" != "/usr/include"; then
15774         if test "$includedir" = '${prefix}/include' ; then
15775                 if test $prefix != /usr ; then
15776                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
15777                 fi
15778         else
15779                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
15780         fi
15781 fi
15782
15783 ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
15784 if test "$srcdir" != "."; then
15785         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
15786 fi
15787 if test "$GCC" != yes; then
15788         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15789 elif test "$includedir" != "/usr/include"; then
15790         if test "$includedir" = '${prefix}/include' ; then
15791                 if test $prefix != /usr ; then
15792                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15793                 fi
15794         else
15795                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15796         fi
15797 fi
15798
15799 ### Build up pieces for makefile rules
15800 echo "$as_me:15800: checking default library suffix" >&5
15801 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
15802
15803         case $DFT_LWR_MODEL in
15804         libtool) DFT_ARG_SUFFIX=''   ;;
15805         normal)  DFT_ARG_SUFFIX=''   ;;
15806         debug)   DFT_ARG_SUFFIX='_g' ;;
15807         profile) DFT_ARG_SUFFIX='_p' ;;
15808         shared)  DFT_ARG_SUFFIX=''   ;;
15809         esac
15810         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
15811 echo "$as_me:15811: result: $DFT_ARG_SUFFIX" >&5
15812 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
15813
15814 echo "$as_me:15814: checking default library-dependency suffix" >&5
15815 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
15816
15817         case $DFT_LWR_MODEL in
15818         libtool)
15819                 DFT_LIB_SUFFIX='.la'
15820                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
15821                 ;;
15822         normal)
15823                 DFT_LIB_SUFFIX='.a'
15824                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
15825                 ;;
15826         debug)
15827                 DFT_LIB_SUFFIX='_g.a'
15828                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
15829                 ;;
15830         profile)
15831                 DFT_LIB_SUFFIX='_p.a'
15832                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
15833                 ;;
15834         shared)
15835                 case $cf_cv_system_name in
15836                 cygwin*)
15837                         DFT_LIB_SUFFIX='.dll'
15838                         DFT_DEP_SUFFIX='.dll.a'
15839                         ;;
15840                 darwin*)
15841                         DFT_LIB_SUFFIX='.dylib'
15842                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
15843                         ;;
15844                 hpux*)
15845                         case $target in
15846                         ia64*)
15847                                 DFT_LIB_SUFFIX='.so'
15848                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
15849                                 ;;
15850                         *)
15851                                 DFT_LIB_SUFFIX='.sl'
15852                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
15853                                 ;;
15854                         esac
15855                         ;;
15856                 *)      DFT_LIB_SUFFIX='.so'
15857                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
15858                         ;;
15859                 esac
15860         esac
15861         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
15862         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
15863 echo "$as_me:15863: result: $DFT_DEP_SUFFIX" >&5
15864 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
15865
15866 echo "$as_me:15866: checking default object directory" >&5
15867 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
15868
15869         case $DFT_LWR_MODEL in
15870         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
15871         normal)  DFT_OBJ_SUBDIR='objects' ;;
15872         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
15873         profile) DFT_OBJ_SUBDIR='obj_p' ;;
15874         shared)
15875                 case $cf_cv_system_name in #(vi
15876                 cygwin) #(vi
15877                         DFT_OBJ_SUBDIR='objects' ;;
15878                 *)
15879                         DFT_OBJ_SUBDIR='obj_s' ;;
15880                 esac
15881         esac
15882 echo "$as_me:15882: result: $DFT_OBJ_SUBDIR" >&5
15883 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
15884
15885 # libtool thinks it can make c++ shared libraries (perhaps only g++)
15886 if test "$cf_with_cxx" = yes ; then
15887 echo "$as_me:15887: checking c++ library-dependency suffix" >&5
15888 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
15889 if test "$with_libtool" != "no"; then
15890         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
15891 else
15892
15893         case normal in
15894         libtool)
15895                 CXX_LIB_SUFFIX='.la'
15896                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
15897                 ;;
15898         normal)
15899                 CXX_LIB_SUFFIX='.a'
15900                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
15901                 ;;
15902         debug)
15903                 CXX_LIB_SUFFIX='_g.a'
15904                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
15905                 ;;
15906         profile)
15907                 CXX_LIB_SUFFIX='_p.a'
15908                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
15909                 ;;
15910         shared)
15911                 case $cf_cv_system_name in
15912                 cygwin*)
15913                         CXX_LIB_SUFFIX='.dll'
15914                         CXX_DEP_SUFFIX='.dll.a'
15915                         ;;
15916                 darwin*)
15917                         CXX_LIB_SUFFIX='.dylib'
15918                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
15919                         ;;
15920                 hpux*)
15921                         case $target in
15922                         ia64*)
15923                                 CXX_LIB_SUFFIX='.so'
15924                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
15925                                 ;;
15926                         *)
15927                                 CXX_LIB_SUFFIX='.sl'
15928                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
15929                                 ;;
15930                         esac
15931                         ;;
15932                 *)      CXX_LIB_SUFFIX='.so'
15933                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
15934                         ;;
15935                 esac
15936         esac
15937         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
15938         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
15939 fi
15940 echo "$as_me:15940: result: $CXX_LIB_SUFFIX" >&5
15941 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
15942
15943 fi
15944
15945 # do not want -ldl in build except as needed for -lncurses dependency
15946 if test "$with_dlsym" = yes ; then
15947 if test $DFT_LWR_MODEL = shared || \
15948    test $DFT_LWR_MODEL = libtool ; then
15949
15950 # remove dl library from $LIBS
15951 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
15952
15953 fi
15954 fi
15955 ### Set up low-level terminfo dependencies for makefiles.
15956
15957 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
15958 # do not need libdl
15959 TICS_LIST=
15960 if test "$with_dlsym" = yes ; then
15961
15962 # remove dl library from $SHLIB_LIST
15963 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
15964
15965 fi
15966
15967 if test "$with_ticlib" != no ; then
15968
15969         if test "$with_ticlib" != yes ; then
15970                 TICS_NAME=$with_ticlib
15971                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15972                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15973                 TICS_LIB_SUFFIX="${with_ticlib}"
15974         else
15975                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
15976                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
15977                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
15978         fi
15979         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
15980 else
15981         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15982 fi
15983
15984 if test "$with_termlib" != no ; then
15985
15986         if test "$with_termlib" != yes ; then
15987                 TINFO_NAME=$with_termlib
15988                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15989                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15990                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15991                 TINFO_LIB_SUFFIX="${with_termlib}"
15992         else
15993                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
15994                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
15995                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
15996                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
15997         fi
15998
15999         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
16000         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
16001         if test "$DFT_LWR_MODEL" = "libtool"; then
16002                 TEST_ARGS="${TEST_DEPS}"
16003                 TEST_ARG2="${TEST_DEP2}"
16004                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
16005         else
16006                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
16007                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
16008                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
16009                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
16010                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
16011         fi
16012 else
16013         # the next lines are needed for linking libtic over libncurses
16014         TINFO_NAME=${LIB_NAME}
16015         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
16016         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
16017         TICS_LIST="$SHLIB_LIST"
16018
16019         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16020 fi
16021
16022 if test "$DFT_LWR_MODEL" = shared ; then
16023         case $cf_cv_system_name in #(vi
16024         cygwin*)
16025                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
16026                 TINFO_SUFFIX=.dll
16027                 ;;
16028         esac
16029 fi
16030
16031 if test "$with_dlsym" = yes ; then
16032
16033 # remove dl library from $TICS_LIST
16034 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
16035
16036 fi
16037
16038 if test "$DFT_LWR_MODEL" = "libtool"; then
16039     OBJEXT=lo
16040 fi
16041
16042 # needed for Ada95
16043 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
16044
16045 case $DFT_LWR_MODEL in
16046 normal|debug|profile)
16047
16048 if test "$GCC" = yes ; then
16049         case $cf_cv_system_name in #(
16050         aix[45]*)       #( gcc 4.2.4 linkage on AIX is broken
16051                 LDFLAGS_STATIC=
16052                 LDFLAGS_SHARED=
16053                 ;;
16054     *)  #( normally, except when broken
16055         LDFLAGS_STATIC=-static
16056         LDFLAGS_SHARED=-dynamic
16057         ;;
16058     esac
16059 else
16060         case $cf_cv_system_name in #(
16061         aix[45]*)       #( from ld manpage
16062                 LDFLAGS_STATIC=-bstatic
16063                 LDFLAGS_SHARED=-bdynamic
16064                 ;;
16065         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
16066                 # We could also use just "archive" and "shared".
16067                 LDFLAGS_STATIC=-Wl,-a,archive_shared
16068                 LDFLAGS_SHARED=-Wl,-a,shared_archive
16069                 ;;
16070         irix*)          #( from ld manpage IRIX64
16071                 LDFLAGS_STATIC=-Bstatic
16072                 LDFLAGS_SHARED=-Bdynamic
16073                 ;;
16074         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
16075                 # alternative "-oldstyle_liblookup" (not in cc manpage)
16076                 LDFLAGS_STATIC=-noso
16077                 LDFLAGS_SHARED=-so_archive
16078                 ;;
16079         solaris2*)
16080                 LDFLAGS_STATIC=-Bstatic
16081                 LDFLAGS_SHARED=-Bdynamic
16082                 ;;
16083         esac
16084 fi
16085
16086         ;;
16087 esac
16088
16089 echo "$as_me:16089: checking where we will install curses.h" >&5
16090 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
16091 test "$with_overwrite" = no && \
16092 test "x$includedir" = 'x${prefix}/include' && \
16093         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
16094 echo "$as_me:16094: result: $includedir" >&5
16095 echo "${ECHO_T}$includedir" >&6
16096
16097 ### Resolve a conflict between normal and wide-curses by forcing applications
16098 ### that will need libutf8 to add it to their configure script.
16099 if test "$with_overwrite" != no ; then
16100 if test "$NCURSES_LIBUTF8" = 1 ; then
16101         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
16102         { echo "$as_me:16102: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
16103 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
16104 fi
16105 fi
16106
16107 # used to separate tack out of the tree
16108 NCURSES_TREE=
16109
16110 ### predefined stuff for the test programs
16111 cat >>confdefs.h <<\EOF
16112 #define HAVE_SLK_COLOR 1
16113 EOF
16114
16115 ### Construct the list of subdirectories for which we'll customize makefiles
16116 ### with the appropriate compile-rules.
16117
16118 echo "$as_me:16118: checking for src modules" >&5
16119 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
16120
16121 # dependencies and linker-arguments for test-programs
16122 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
16123 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
16124 if test "$DFT_LWR_MODEL" = "libtool"; then
16125         TEST_ARGS="${TEST_DEPS}"
16126         TEST_ARG2="${TEST_DEP2}"
16127 else
16128         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
16129         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
16130 fi
16131
16132 cf_cv_src_modules=
16133 for cf_dir in $modules_to_build
16134 do
16135         if test -f $srcdir/$cf_dir/modules; then
16136
16137                 # We may/may not have tack in the distribution, though the
16138                 # makefile is.
16139                 if test $cf_dir = tack ; then
16140                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
16141                                 continue
16142                         fi
16143                 fi
16144
16145                 if test -z "$cf_cv_src_modules"; then
16146                         cf_cv_src_modules=$cf_dir
16147                 else
16148                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
16149                 fi
16150
16151                 # Make the ncurses_cfg.h file record the library interface files as
16152                 # well.  These are header files that are the same name as their
16153                 # directory.  Ncurses is the only library that does not follow
16154                 # that pattern.
16155                 if test $cf_dir = tack ; then
16156                         continue
16157                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
16158
16159 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16160
16161                         cat >>confdefs.h <<EOF
16162 #define HAVE_${cf_have_include}_H 1
16163 EOF
16164
16165                         cat >>confdefs.h <<EOF
16166 #define HAVE_LIB${cf_have_include} 1
16167 EOF
16168
16169                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
16170                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
16171                         if test "$DFT_LWR_MODEL" = "libtool"; then
16172                                 TEST_ARGS="${TEST_DEPS}"
16173                                 TEST_ARG2="${TEST_DEP2}"
16174                         else
16175                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
16176                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
16177                         fi
16178                 fi
16179         fi
16180 done
16181 echo "$as_me:16181: result: $cf_cv_src_modules" >&5
16182 echo "${ECHO_T}$cf_cv_src_modules" >&6
16183
16184 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
16185 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
16186
16187 SRC_SUBDIRS="man include"
16188 for cf_dir in $cf_cv_src_modules
16189 do
16190         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
16191 done
16192 SRC_SUBDIRS="$SRC_SUBDIRS test"
16193 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
16194 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
16195
16196 ADA_SUBDIRS=
16197 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
16198    SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
16199    ADA_SUBDIRS="gen src samples"
16200 fi
16201
16202 SUB_MAKEFILES=
16203 for cf_dir in $SRC_SUBDIRS
16204 do
16205         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
16206 done
16207
16208 if test -n "$ADA_SUBDIRS"; then
16209    for cf_dir in $ADA_SUBDIRS
16210    do
16211       SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
16212    done
16213
16214 fi
16215
16216 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
16217    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses-config"
16218 fi
16219
16220 DIRS_TO_MAKE="lib"
16221 for cf_item in $cf_list_models
16222 do
16223
16224         case $cf_item in
16225         libtool) cf_subdir='obj_lo'  ;;
16226         normal)  cf_subdir='objects' ;;
16227         debug)   cf_subdir='obj_g' ;;
16228         profile) cf_subdir='obj_p' ;;
16229         shared)
16230                 case $cf_cv_system_name in #(vi
16231                 cygwin) #(vi
16232                         cf_subdir='objects' ;;
16233                 *)
16234                         cf_subdir='obj_s' ;;
16235                 esac
16236         esac
16237
16238         for cf_item2 in $DIRS_TO_MAKE
16239         do
16240                 test $cf_item2 = $cf_subdir && break
16241         done
16242         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
16243 done
16244 for cf_dir in $DIRS_TO_MAKE
16245 do
16246         test ! -d $cf_dir && mkdir $cf_dir
16247 done
16248
16249 cat >>confdefs.h <<EOF
16250 #define NCURSES_PATHSEP '$PATHSEP'
16251 EOF
16252
16253 cat >>confdefs.h <<EOF
16254 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
16255 EOF
16256
16257 ### Now that we're done running tests, add the compiler-warnings, if any
16258
16259 cf_fix_cppflags=no
16260 cf_new_cflags=
16261 cf_new_cppflags=
16262 cf_new_extra_cppflags=
16263
16264 for cf_add_cflags in $EXTRA_CFLAGS
16265 do
16266 case $cf_fix_cppflags in
16267 no)
16268         case $cf_add_cflags in #(vi
16269         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
16270                 case $cf_add_cflags in
16271                 -D*)
16272                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16273
16274                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
16275                         && test -z "${cf_tst_cflags}" \
16276                         && cf_fix_cppflags=yes
16277
16278                         if test $cf_fix_cppflags = yes ; then
16279                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16280                                 continue
16281                         elif test "${cf_tst_cflags}" = "\"'" ; then
16282                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16283                                 continue
16284                         fi
16285                         ;;
16286                 esac
16287                 case "$CPPFLAGS" in
16288                 *$cf_add_cflags) #(vi
16289                         ;;
16290                 *) #(vi
16291                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16292                         ;;
16293                 esac
16294                 ;;
16295         *)
16296                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16297                 ;;
16298         esac
16299         ;;
16300 yes)
16301         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16302
16303         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16304
16305         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
16306         && test -z "${cf_tst_cflags}" \
16307         && cf_fix_cppflags=no
16308         ;;
16309 esac
16310 done
16311
16312 if test -n "$cf_new_cflags" ; then
16313
16314         CFLAGS="$CFLAGS $cf_new_cflags"
16315 fi
16316
16317 if test -n "$cf_new_cppflags" ; then
16318
16319         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
16320 fi
16321
16322 if test -n "$cf_new_extra_cppflags" ; then
16323
16324         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
16325 fi
16326
16327 ### If we're building with rpath, try to link non-standard libs that way too.
16328 if test "$DFT_LWR_MODEL" = "shared"; then
16329
16330 echo "$as_me:16330: checking for updated LDFLAGS" >&5
16331 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
16332 if test -n "$LDFLAGS" ; then
16333 echo "$as_me:16333: result: maybe" >&5
16334 echo "${ECHO_T}maybe" >&6
16335 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
16336
16337 echo "${as_me-configure}:16337: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
16338
16339 test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
16340
16341 echo "${as_me-configure}:16341: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
16342
16343 case "$EXTRA_LDFLAGS" in #(vi
16344 -Wl,-rpath,*) #(vi
16345         cf_rpath_hack="-Wl,-rpath,"
16346         ;;
16347 -R\ *)
16348         cf_rpath_hack="-R "
16349         ;;
16350 -R*)
16351         cf_rpath_hack="-R"
16352         ;;
16353 *)
16354         cf_rpath_hack=
16355         ;;
16356 esac
16357 if test -n "$cf_rpath_hack" ; then
16358         cf_rpath_dst=
16359         for cf_rpath_src in $LDFLAGS
16360         do
16361                 test -n "$verbose" && echo "    Filtering $cf_rpath_src" 1>&6
16362
16363 echo "${as_me-configure}:16363: testing Filtering $cf_rpath_src ..." 1>&5
16364
16365                 case $cf_rpath_src in #(vi
16366                 -L*) #(vi
16367                         if test "$cf_rpath_hack" = "-R " ; then
16368                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e 's%-L%-R %'`
16369                         else
16370                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e s%-L%$cf_rpath_hack%`
16371                         fi
16372                         test -n "$verbose" && echo "    ...Filter $cf_rpath_tmp" 1>&6
16373
16374 echo "${as_me-configure}:16374: testing ...Filter $cf_rpath_tmp ..." 1>&5
16375
16376                         EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
16377                         ;;
16378                 esac
16379                 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
16380         done
16381         LDFLAGS=$cf_rpath_dst
16382         test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
16383
16384 echo "${as_me-configure}:16384: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
16385
16386         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
16387
16388 echo "${as_me-configure}:16388: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
16389
16390 fi
16391 else
16392 echo "$as_me:16392: result: no" >&5
16393 echo "${ECHO_T}no" >&6
16394 fi
16395
16396 fi
16397
16398 ### Define substitutions for header files to avoid name-pollution
16399
16400 if test "$cf_cv_have_tcgetattr" = yes ; then
16401         HAVE_TCGETATTR=1
16402 else
16403         HAVE_TCGETATTR=0
16404 fi
16405
16406 if test "$ac_cv_header_termio_h" = yes ; then
16407         HAVE_TERMIO_H=1
16408 else
16409         HAVE_TERMIO_H=0
16410 fi
16411
16412 if test "$ac_cv_header_termios_h" = yes ; then
16413         HAVE_TERMIOS_H=1
16414 else
16415         HAVE_TERMIOS_H=0
16416 fi
16417
16418 ################################################################################
16419 test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
16420 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
16421 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"
16422 ac_config_commands="$ac_config_commands default"
16423 cat >confcache <<\_ACEOF
16424 # This file is a shell script that caches the results of configure
16425 # tests run on this system so they can be shared between configure
16426 # scripts and configure runs, see configure's option --config-cache.
16427 # It is not useful on other systems.  If it contains results you don't
16428 # want to keep, you may remove or edit it.
16429 #
16430 # config.status only pays attention to the cache file if you give it
16431 # the --recheck option to rerun configure.
16432 #
16433 # `ac_cv_env_foo' variables (set or unset) will be overriden when
16434 # loading this file, other *unset* `ac_cv_foo' will be assigned the
16435 # following values.
16436
16437 _ACEOF
16438
16439 # The following way of writing the cache mishandles newlines in values,
16440 # but we know of no workaround that is simple, portable, and efficient.
16441 # So, don't put newlines in cache variables' values.
16442 # Ultrix sh set writes to stderr and can't be redirected directly,
16443 # and sets the high bit in the cache file unless we assign to the vars.
16444 {
16445   (set) 2>&1 |
16446     case `(ac_space=' '; set | grep ac_space) 2>&1` in
16447     *ac_space=\ *)
16448       # `set' does not quote correctly, so add quotes (double-quote
16449       # substitution turns \\\\ into \\, and sed turns \\ into \).
16450       sed -n \
16451         "s/'/'\\\\''/g;
16452           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16453       ;;
16454     *)
16455       # `set' quotes correctly as required by POSIX, so do not add quotes.
16456       sed -n \
16457         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16458       ;;
16459     esac;
16460 } |
16461   sed '
16462      t clear
16463      : clear
16464      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16465      t end
16466      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16467      : end' >>confcache
16468 if cmp -s $cache_file confcache; then :; else
16469   if test -w $cache_file; then
16470     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16471     cat confcache >$cache_file
16472   else
16473     echo "not updating unwritable cache $cache_file"
16474   fi
16475 fi
16476 rm -f confcache
16477
16478 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16479 # Let make expand exec_prefix.
16480 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16481
16482 # VPATH may cause trouble with some makes, so we remove $(srcdir),
16483 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16484 # trailing colons and then remove the whole line if VPATH becomes empty
16485 # (actually we leave an empty line to preserve line numbers).
16486 if test "x$srcdir" = x.; then
16487   ac_vpsub='/^[         ]*VPATH[        ]*=/{
16488 s/:*\$(srcdir):*/:/;
16489 s/:*\${srcdir}:*/:/;
16490 s/:*@srcdir@:*/:/;
16491 s/^\([^=]*=[    ]*\):*/\1/;
16492 s/:*$//;
16493 s/^[^=]*=[      ]*$//;
16494 }'
16495 fi
16496
16497 DEFS=-DHAVE_CONFIG_H
16498
16499 : ${CONFIG_STATUS=./config.status}
16500 ac_clean_files_save=$ac_clean_files
16501 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16502 { echo "$as_me:16502: creating $CONFIG_STATUS" >&5
16503 echo "$as_me: creating $CONFIG_STATUS" >&6;}
16504 cat >$CONFIG_STATUS <<_ACEOF
16505 #! $SHELL
16506 # Generated automatically by configure.
16507 # Run this file to recreate the current configuration.
16508 # Compiler output produced by configure, useful for debugging
16509 # configure, is in config.log if it exists.
16510
16511 debug=false
16512 SHELL=\${CONFIG_SHELL-$SHELL}
16513 ac_cs_invocation="\$0 \$@"
16514
16515 _ACEOF
16516
16517 cat >>$CONFIG_STATUS <<\_ACEOF
16518 # Be Bourne compatible
16519 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16520   emulate sh
16521   NULLCMD=:
16522 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16523   set -o posix
16524 fi
16525
16526 # Name of the executable.
16527 as_me=`echo "$0" |sed 's,.*[\\/],,'`
16528
16529 if expr a : '\(a\)' >/dev/null 2>&1; then
16530   as_expr=expr
16531 else
16532   as_expr=false
16533 fi
16534
16535 rm -f conf$$ conf$$.exe conf$$.file
16536 echo >conf$$.file
16537 if ln -s conf$$.file conf$$ 2>/dev/null; then
16538   # We could just check for DJGPP; but this test a) works b) is more generic
16539   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16540   if test -f conf$$.exe; then
16541     # Don't use ln at all; we don't have any links
16542     as_ln_s='cp -p'
16543   else
16544     as_ln_s='ln -s'
16545   fi
16546 elif ln conf$$.file conf$$ 2>/dev/null; then
16547   as_ln_s=ln
16548 else
16549   as_ln_s='cp -p'
16550 fi
16551 rm -f conf$$ conf$$.exe conf$$.file
16552
16553 as_executable_p="test -f"
16554
16555 # Support unset when possible.
16556 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16557   as_unset=unset
16558 else
16559   as_unset=false
16560 fi
16561
16562 # NLS nuisances.
16563 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
16564 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
16565 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
16566 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
16567 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
16568 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
16569 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
16570 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
16571
16572 # IFS
16573 # We need space, tab and new line, in precisely that order.
16574 as_nl='
16575 '
16576 IFS="   $as_nl"
16577
16578 # CDPATH.
16579 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
16580
16581 exec 6>&1
16582
16583 _ACEOF
16584
16585 # Files that config.status was made for.
16586 if test -n "$ac_config_files"; then
16587   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16588 fi
16589
16590 if test -n "$ac_config_headers"; then
16591   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16592 fi
16593
16594 if test -n "$ac_config_links"; then
16595   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16596 fi
16597
16598 if test -n "$ac_config_commands"; then
16599   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16600 fi
16601
16602 cat >>$CONFIG_STATUS <<\EOF
16603
16604 ac_cs_usage="\
16605 \`$as_me' instantiates files from templates according to the
16606 current configuration.
16607
16608 Usage: $0 [OPTIONS] [FILE]...
16609
16610   -h, --help       print this help, then exit
16611   -V, --version    print version number, then exit
16612   -d, --debug      don't remove temporary files
16613       --recheck    update $as_me by reconfiguring in the same conditions
16614   --file=FILE[:TEMPLATE]
16615                    instantiate the configuration file FILE
16616   --header=FILE[:TEMPLATE]
16617                    instantiate the configuration header FILE
16618
16619 Configuration files:
16620 $config_files
16621
16622 Configuration headers:
16623 $config_headers
16624
16625 Configuration commands:
16626 $config_commands
16627
16628 Report bugs to <bug-autoconf@gnu.org>."
16629 EOF
16630
16631 cat >>$CONFIG_STATUS <<EOF
16632 ac_cs_version="\\
16633 config.status
16634 configured by $0, generated by GNU Autoconf 2.52.20080325,
16635   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16636
16637 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16638 Free Software Foundation, Inc.
16639 This config.status script is free software; the Free Software Foundation
16640 gives unlimited permission to copy, distribute and modify it."
16641 srcdir=$srcdir
16642 INSTALL="$INSTALL"
16643 EOF
16644
16645 cat >>$CONFIG_STATUS <<\EOF
16646 # If no file are specified by the user, then we need to provide default
16647 # value.  By we need to know if files were specified by the user.
16648 ac_need_defaults=:
16649 while test $# != 0
16650 do
16651   case $1 in
16652   --*=*)
16653     ac_option=`expr "x$1" : 'x\([^=]*\)='`
16654     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16655     shift
16656     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16657     shift
16658     ;;
16659   -*);;
16660   *) # This is not an option, so the user has probably given explicit
16661      # arguments.
16662      ac_need_defaults=false;;
16663   esac
16664
16665   case $1 in
16666   # Handling of the options.
16667 EOF
16668 cat >>$CONFIG_STATUS <<EOF
16669   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16670     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16671     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16672 EOF
16673 cat >>$CONFIG_STATUS <<\EOF
16674   --version | --vers* | -V )
16675     echo "$ac_cs_version"; exit 0 ;;
16676   --he | --h)
16677     # Conflict between --help and --header
16678     { { echo "$as_me:16678: error: ambiguous option: $1
16679 Try \`$0 --help' for more information." >&5
16680 echo "$as_me: error: ambiguous option: $1
16681 Try \`$0 --help' for more information." >&2;}
16682    { (exit 1); exit 1; }; };;
16683   --help | --hel | -h )
16684     echo "$ac_cs_usage"; exit 0 ;;
16685   --debug | --d* | -d )
16686     debug=: ;;
16687   --file | --fil | --fi | --f )
16688     shift
16689     CONFIG_FILES="$CONFIG_FILES $1"
16690     ac_need_defaults=false;;
16691   --header | --heade | --head | --hea )
16692     shift
16693     CONFIG_HEADERS="$CONFIG_HEADERS $1"
16694     ac_need_defaults=false;;
16695
16696   # This is an error.
16697   -*) { { echo "$as_me:16697: error: unrecognized option: $1
16698 Try \`$0 --help' for more information." >&5
16699 echo "$as_me: error: unrecognized option: $1
16700 Try \`$0 --help' for more information." >&2;}
16701    { (exit 1); exit 1; }; } ;;
16702
16703   *) ac_config_targets="$ac_config_targets $1" ;;
16704
16705   esac
16706   shift
16707 done
16708
16709 exec 5>>config.log
16710 cat >&5 << _ACEOF
16711
16712 ## ----------------------- ##
16713 ## Running config.status.  ##
16714 ## ----------------------- ##
16715
16716 This file was extended by $as_me 2.52.20080325, executed with
16717   CONFIG_FILES    = $CONFIG_FILES
16718   CONFIG_HEADERS  = $CONFIG_HEADERS
16719   CONFIG_LINKS    = $CONFIG_LINKS
16720   CONFIG_COMMANDS = $CONFIG_COMMANDS
16721   > $ac_cs_invocation
16722 on `(hostname || uname -n) 2>/dev/null | sed 1q`
16723
16724 _ACEOF
16725 EOF
16726
16727 cat >>$CONFIG_STATUS <<EOF
16728 #
16729 # INIT-COMMANDS section.
16730 #
16731
16732 ### Special initialization commands, used to pass information from the
16733 ### configuration-run into config.status
16734
16735 AWK="$AWK"
16736 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
16737 DFT_LWR_MODEL="$DFT_LWR_MODEL"
16738 ECHO_LINK="$ECHO_LINK"
16739 LDCONFIG="$LDCONFIG"
16740 LIB_NAME="$LIB_NAME"
16741 LIB_SUBSETS="$LIB_SUBSETS"
16742 LIB_SUFFIX="$LIB_SUFFIX"
16743 LIB_TRACING="$LIB_TRACING"
16744 MAKE_TERMINFO="$MAKE_TERMINFO"
16745 NCURSES_MAJOR="$NCURSES_MAJOR"
16746 NCURSES_MINOR="$NCURSES_MINOR"
16747 NCURSES_OSPEED="$NCURSES_OSPEED"
16748 NCURSES_PATCH="$NCURSES_PATCH"
16749 SRC_SUBDIRS="$SRC_SUBDIRS"
16750 TERMINFO="$TERMINFO"
16751 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
16752 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
16753 TINFO_NAME="$TINFO_NAME"
16754 TINFO_SUFFIX="$TINFO_SUFFIX"
16755 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
16756 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
16757 TICS_NAME="$TICS_NAME"
16758 WITH_CURSES_H="$with_curses_h"
16759 WITH_ECHO="$with_echo"
16760 WITH_OVERWRITE="$with_overwrite"
16761 cf_LIST_MODELS="$cf_list_models"
16762 cf_cv_abi_version="$cf_cv_abi_version"
16763 cf_cv_do_relink="$cf_cv_do_relink"
16764 cf_cv_do_symlinks="$cf_cv_do_symlinks"
16765 cf_cv_enable_lp64="$cf_cv_enable_lp64"
16766 cf_cv_enable_opaque="$cf_cv_enable_opaque"
16767 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
16768 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
16769 cf_cv_rel_version="$cf_cv_rel_version"
16770 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
16771 cf_cv_shared_soname='$cf_cv_shared_soname'
16772 cf_cv_shlib_version="$cf_cv_shlib_version"
16773 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
16774 cf_cv_system_name="$cf_cv_system_name"
16775 cf_with_cxx_binding="$cf_with_cxx_binding"
16776 host="$host"
16777 target="$target"
16778
16779 EOF
16780
16781 cat >>$CONFIG_STATUS <<\EOF
16782 for ac_config_target in $ac_config_targets
16783 do
16784   case "$ac_config_target" in
16785   # Handling of arguments.
16786   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
16787   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
16788   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
16789   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
16790   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
16791   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16792   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16793   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
16794   *) { { echo "$as_me:16794: error: invalid argument: $ac_config_target" >&5
16795 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16796    { (exit 1); exit 1; }; };;
16797   esac
16798 done
16799
16800 # If the user did not use the arguments to specify the items to instantiate,
16801 # then the envvar interface is used.  Set only those that are not.
16802 # We use the long form for the default assignment because of an extremely
16803 # bizarre bug on SunOS 4.1.3.
16804 if $ac_need_defaults; then
16805   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16806   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16807   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16808 fi
16809
16810 # Create a temporary directory, and hook for its removal unless debugging.
16811 $debug ||
16812 {
16813   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16814   trap '{ (exit 1); exit 1; }' 1 2 13 15
16815 }
16816
16817 # Create a (secure) tmp directory for tmp files.
16818 : ${TMPDIR=/tmp}
16819 {
16820   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16821   test -n "$tmp" && test -d "$tmp"
16822 }  ||
16823 {
16824   tmp=$TMPDIR/cs$$-$RANDOM
16825   (umask 077 && mkdir $tmp)
16826 } ||
16827 {
16828    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16829    { (exit 1); exit 1; }
16830 }
16831
16832 EOF
16833
16834 cat >>$CONFIG_STATUS <<EOF
16835
16836 #
16837 # CONFIG_FILES section.
16838 #
16839
16840 # No need to generate the scripts if there are no CONFIG_FILES.
16841 # This happens for instance when ./config.status config.h
16842 if test -n "\$CONFIG_FILES"; then
16843   # Protect against being on the right side of a sed subst in config.status.
16844   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16845    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16846 s,@SHELL@,$SHELL,;t t
16847 s,@exec_prefix@,$exec_prefix,;t t
16848 s,@prefix@,$prefix,;t t
16849 s,@program_transform_name@,$program_transform_name,;t t
16850 s,@bindir@,$bindir,;t t
16851 s,@sbindir@,$sbindir,;t t
16852 s,@libexecdir@,$libexecdir,;t t
16853 s,@datadir@,$datadir,;t t
16854 s,@sysconfdir@,$sysconfdir,;t t
16855 s,@sharedstatedir@,$sharedstatedir,;t t
16856 s,@localstatedir@,$localstatedir,;t t
16857 s,@libdir@,$libdir,;t t
16858 s,@includedir@,$includedir,;t t
16859 s,@oldincludedir@,$oldincludedir,;t t
16860 s,@infodir@,$infodir,;t t
16861 s,@mandir@,$mandir,;t t
16862 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16863 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16864 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16865 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16866 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16867 s,@build_alias@,$build_alias,;t t
16868 s,@host_alias@,$host_alias,;t t
16869 s,@target_alias@,$target_alias,;t t
16870 s,@ECHO_C@,$ECHO_C,;t t
16871 s,@ECHO_N@,$ECHO_N,;t t
16872 s,@ECHO_T@,$ECHO_T,;t t
16873 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16874 s,@DEFS@,$DEFS,;t t
16875 s,@LIBS@,$LIBS,;t t
16876 s,@top_builddir@,$top_builddir,;t t
16877 s,@EGREP@,$EGREP,;t t
16878 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
16879 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
16880 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
16881 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
16882 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
16883 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
16884 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
16885 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
16886 s,@build@,$build,;t t
16887 s,@build_cpu@,$build_cpu,;t t
16888 s,@build_vendor@,$build_vendor,;t t
16889 s,@build_os@,$build_os,;t t
16890 s,@host@,$host,;t t
16891 s,@host_cpu@,$host_cpu,;t t
16892 s,@host_vendor@,$host_vendor,;t t
16893 s,@host_os@,$host_os,;t t
16894 s,@target@,$target,;t t
16895 s,@target_cpu@,$target_cpu,;t t
16896 s,@target_vendor@,$target_vendor,;t t
16897 s,@target_os@,$target_os,;t t
16898 s,@CC@,$CC,;t t
16899 s,@CFLAGS@,$CFLAGS,;t t
16900 s,@LDFLAGS@,$LDFLAGS,;t t
16901 s,@CPPFLAGS@,$CPPFLAGS,;t t
16902 s,@ac_ct_CC@,$ac_ct_CC,;t t
16903 s,@EXEEXT@,$EXEEXT,;t t
16904 s,@OBJEXT@,$OBJEXT,;t t
16905 s,@CPP@,$CPP,;t t
16906 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
16907 s,@PROG_EXT@,$PROG_EXT,;t t
16908 s,@LDCONFIG@,$LDCONFIG,;t t
16909 s,@CXX@,$CXX,;t t
16910 s,@CXXFLAGS@,$CXXFLAGS,;t t
16911 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
16912 s,@AWK@,$AWK,;t t
16913 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16914 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16915 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16916 s,@LINT@,$LINT,;t t
16917 s,@LINT_OPTS@,$LINT_OPTS,;t t
16918 s,@LN_S@,$LN_S,;t t
16919 s,@SET_MAKE@,$SET_MAKE,;t t
16920 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
16921 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
16922 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
16923 s,@RANLIB@,$RANLIB,;t t
16924 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16925 s,@LD@,$LD,;t t
16926 s,@ac_ct_LD@,$ac_ct_LD,;t t
16927 s,@AR@,$AR,;t t
16928 s,@ac_ct_AR@,$ac_ct_AR,;t t
16929 s,@AR_OPTS@,$AR_OPTS,;t t
16930 s,@DESTDIR@,$DESTDIR,;t t
16931 s,@BUILD_CC@,$BUILD_CC,;t t
16932 s,@BUILD_CPP@,$BUILD_CPP,;t t
16933 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
16934 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
16935 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
16936 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
16937 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
16938 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
16939 s,@cf_list_models@,$cf_list_models,;t t
16940 s,@LIBTOOL@,$LIBTOOL,;t t
16941 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
16942 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
16943 s,@LIB_CREATE@,$LIB_CREATE,;t t
16944 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
16945 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
16946 s,@LIB_PREP@,$LIB_PREP,;t t
16947 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
16948 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
16949 s,@LIB_LINK@,$LIB_LINK,;t t
16950 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
16951 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
16952 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
16953 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
16954 s,@TICS_NAME@,$TICS_NAME,;t t
16955 s,@TINFO_NAME@,$TINFO_NAME,;t t
16956 s,@LIB_NAME@,$LIB_NAME,;t t
16957 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
16958 s,@CC_G_OPT@,$CC_G_OPT,;t t
16959 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
16960 s,@LD_MODEL@,$LD_MODEL,;t t
16961 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
16962 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
16963 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
16964 s,@LINK_PROGS@,$LINK_PROGS,;t t
16965 s,@LINK_TESTS@,$LINK_TESTS,;t t
16966 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
16967 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
16968 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
16969 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
16970 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
16971 s,@PATHSEP@,$PATHSEP,;t t
16972 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
16973 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
16974 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
16975 s,@TERMINFO@,$TERMINFO,;t t
16976 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
16977 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
16978 s,@TERMPATH@,$TERMPATH,;t t
16979 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
16980 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
16981 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
16982 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
16983 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
16984 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
16985 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
16986 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
16987 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
16988 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
16989 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
16990 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
16991 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
16992 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
16993 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
16994 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
16995 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
16996 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
16997 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
16998 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
16999 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
17000 s,@PTHREAD@,$PTHREAD,;t t
17001 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
17002 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
17003 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
17004 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
17005 s,@ECHO_LINK@,$ECHO_LINK,;t t
17006 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
17007 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
17008 s,@ADA_TRACE@,$ADA_TRACE,;t t
17009 s,@MATH_LIB@,$MATH_LIB,;t t
17010 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
17011 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
17012 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
17013 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
17014 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
17015 s,@TEST_LIBS@,$TEST_LIBS,;t t
17016 s,@CXXCPP@,$CXXCPP,;t t
17017 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
17018 s,@CXX_AR@,$CXX_AR,;t t
17019 s,@CXX_AR_OPTS@,$CXX_AR_OPTS,;t t
17020 s,@CXXLIBS@,$CXXLIBS,;t t
17021 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
17022 s,@gnat_exists@,$gnat_exists,;t t
17023 s,@M4_exists@,$M4_exists,;t t
17024 s,@cf_ada_make@,$cf_ada_make,;t t
17025 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
17026 s,@cf_ada_package@,$cf_ada_package,;t t
17027 s,@ADAFLAGS@,$ADAFLAGS,;t t
17028 s,@cf_compile_generics@,$cf_compile_generics,;t t
17029 s,@cf_generic_objects@,$cf_generic_objects,;t t
17030 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
17031 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
17032 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
17033 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
17034 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
17035 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
17036 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
17037 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
17038 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
17039 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
17040 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
17041 s,@TICS_ARGS@,$TICS_ARGS,;t t
17042 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
17043 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
17044 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
17045 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
17046 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
17047 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
17048 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
17049 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
17050 s,@TICS_LIST@,$TICS_LIST,;t t
17051 s,@TINFO_LIST@,$TINFO_LIST,;t t
17052 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
17053 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
17054 s,@TEST_ARGS@,$TEST_ARGS,;t t
17055 s,@TEST_DEPS@,$TEST_DEPS,;t t
17056 s,@TEST_ARG2@,$TEST_ARG2,;t t
17057 s,@TEST_DEP2@,$TEST_DEP2,;t t
17058 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
17059 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
17060 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
17061 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
17062 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
17063 CEOF
17064
17065 EOF
17066
17067   cat >>$CONFIG_STATUS <<\EOF
17068   # Split the substitutions into bite-sized pieces for seds with
17069   # small command number limits, like on Digital OSF/1 and HP-UX.
17070   ac_max_sed_lines=48
17071   ac_sed_frag=1 # Number of current file.
17072   ac_beg=1 # First line for current file.
17073   ac_end=$ac_max_sed_lines # Line after last line for current file.
17074   ac_more_lines=:
17075   ac_sed_cmds=
17076   while $ac_more_lines; do
17077     if test $ac_beg -gt 1; then
17078       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17079     else
17080       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17081     fi
17082     if test ! -s $tmp/subs.frag; then
17083       ac_more_lines=false
17084     else
17085       # The purpose of the label and of the branching condition is to
17086       # speed up the sed processing (if there are no `@' at all, there
17087       # is no need to browse any of the substitutions).
17088       # These are the two extra sed commands mentioned above.
17089       (echo ':t
17090   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17091       if test -z "$ac_sed_cmds"; then
17092         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17093       else
17094         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17095       fi
17096       ac_sed_frag=`expr $ac_sed_frag + 1`
17097       ac_beg=$ac_end
17098       ac_end=`expr $ac_end + $ac_max_sed_lines`
17099     fi
17100   done
17101   if test -z "$ac_sed_cmds"; then
17102     ac_sed_cmds=cat
17103   fi
17104 fi # test -n "$CONFIG_FILES"
17105
17106 EOF
17107 cat >>$CONFIG_STATUS <<\EOF
17108 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17109   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17110   case $ac_file in
17111   - | *:- | *:-:* ) # input from stdin
17112         cat >$tmp/stdin
17113         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17114         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17115   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17116         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17117   * )   ac_file_in=$ac_file.in ;;
17118   esac
17119
17120   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17121   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17122          X"$ac_file" : 'X\(//\)[^/]' \| \
17123          X"$ac_file" : 'X\(//\)$' \| \
17124          X"$ac_file" : 'X\(/\)' \| \
17125          .     : '\(.\)' 2>/dev/null ||
17126 echo X"$ac_file" |
17127     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17128           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17129           /^X\(\/\/\)$/{ s//\1/; q; }
17130           /^X\(\/\).*/{ s//\1/; q; }
17131           s/.*/./; q'`
17132   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17133     { case "$ac_dir" in
17134   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17135   *)                      as_incr_dir=.;;
17136 esac
17137 as_dummy="$ac_dir"
17138 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17139   case $as_mkdir_dir in
17140     # Skip DOS drivespec
17141     ?:) as_incr_dir=$as_mkdir_dir ;;
17142     *)
17143       as_incr_dir=$as_incr_dir/$as_mkdir_dir
17144       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17145     ;;
17146   esac
17147 done; }
17148
17149     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
17150     # A "../" for each directory in $ac_dir_suffix.
17151     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
17152   else
17153     ac_dir_suffix= ac_dots=
17154   fi
17155
17156   case $srcdir in
17157   .)  ac_srcdir=.
17158       if test -z "$ac_dots"; then
17159          ac_top_srcdir=.
17160       else
17161          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
17162       fi ;;
17163   [\\/]* | ?:[\\/]* )
17164       ac_srcdir=$srcdir$ac_dir_suffix;
17165       ac_top_srcdir=$srcdir ;;
17166   *) # Relative path.
17167     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
17168     ac_top_srcdir=$ac_dots$srcdir ;;
17169   esac
17170
17171   case $INSTALL in
17172   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17173   *) ac_INSTALL=$ac_dots$INSTALL ;;
17174   esac
17175
17176   if test x"$ac_file" != x-; then
17177     { echo "$as_me:17177: creating $ac_file" >&5
17178 echo "$as_me: creating $ac_file" >&6;}
17179     rm -f "$ac_file"
17180   fi
17181   # Let's still pretend it is `configure' which instantiates (i.e., don't
17182   # use $as_me), people would be surprised to read:
17183   #    /* config.h.  Generated automatically by config.status.  */
17184   configure_input="Generated automatically from `echo $ac_file_in |
17185                                                  sed 's,.*/,,'` by configure."
17186
17187   # First look for the input files in the build tree, otherwise in the
17188   # src tree.
17189   ac_file_inputs=`IFS=:
17190     for f in $ac_file_in; do
17191       case $f in
17192       -) echo $tmp/stdin ;;
17193       [\\/$]*)
17194          # Absolute (can't be DOS-style, as IFS=:)
17195          test -f "$f" || { { echo "$as_me:17195: error: cannot find input file: $f" >&5
17196 echo "$as_me: error: cannot find input file: $f" >&2;}
17197    { (exit 1); exit 1; }; }
17198          echo $f;;
17199       *) # Relative
17200          if test -f "$f"; then
17201            # Build tree
17202            echo $f
17203          elif test -f "$srcdir/$f"; then
17204            # Source tree
17205            echo $srcdir/$f
17206          else
17207            # /dev/null tree
17208            { { echo "$as_me:17208: error: cannot find input file: $f" >&5
17209 echo "$as_me: error: cannot find input file: $f" >&2;}
17210    { (exit 1); exit 1; }; }
17211          fi;;
17212       esac
17213     done` || { (exit 1); exit 1; }
17214 EOF
17215 cat >>$CONFIG_STATUS <<EOF
17216   sed "$ac_vpsub
17217 $extrasub
17218 EOF
17219 cat >>$CONFIG_STATUS <<\EOF
17220 :t
17221 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17222 s,@configure_input@,$configure_input,;t t
17223 s,@srcdir@,$ac_srcdir,;t t
17224 s,@top_srcdir@,$ac_top_srcdir,;t t
17225 s,@INSTALL@,$ac_INSTALL,;t t
17226 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17227   rm -f $tmp/stdin
17228   if test x"$ac_file" != x-; then
17229     mv $tmp/out $ac_file
17230   else
17231     cat $tmp/out
17232     rm -f $tmp/out
17233   fi
17234
17235 done
17236 EOF
17237 cat >>$CONFIG_STATUS <<\EOF
17238
17239 #
17240 # CONFIG_HEADER section.
17241 #
17242
17243 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17244 # NAME is the cpp macro being defined and VALUE is the value it is being given.
17245 #
17246 # ac_d sets the value in "#define NAME VALUE" lines.
17247 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
17248 ac_dB='[        ].*$,\1#\2'
17249 ac_dC=' '
17250 ac_dD=',;t'
17251 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
17252 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17253 ac_iB='\([      ]\),\1#\2define\3'
17254 ac_iC=' '
17255 ac_iD='\4,;t'
17256 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17257 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17258 ac_uB='$,\1#\2define\3'
17259 ac_uC=' '
17260 ac_uD=',;t'
17261
17262 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
17263   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17264   case $ac_file in
17265   - | *:- | *:-:* ) # input from stdin
17266         cat >$tmp/stdin
17267         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17268         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17269   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17270         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17271   * )   ac_file_in=$ac_file.in ;;
17272   esac
17273
17274   test x"$ac_file" != x- && { echo "$as_me:17274: creating $ac_file" >&5
17275 echo "$as_me: creating $ac_file" >&6;}
17276
17277   # First look for the input files in the build tree, otherwise in the
17278   # src tree.
17279   ac_file_inputs=`IFS=:
17280     for f in $ac_file_in; do
17281       case $f in
17282       -) echo $tmp/stdin ;;
17283       [\\/$]*)
17284          # Absolute (can't be DOS-style, as IFS=:)
17285          test -f "$f" || { { echo "$as_me:17285: error: cannot find input file: $f" >&5
17286 echo "$as_me: error: cannot find input file: $f" >&2;}
17287    { (exit 1); exit 1; }; }
17288          echo $f;;
17289       *) # Relative
17290          if test -f "$f"; then
17291            # Build tree
17292            echo $f
17293          elif test -f "$srcdir/$f"; then
17294            # Source tree
17295            echo $srcdir/$f
17296          else
17297            # /dev/null tree
17298            { { echo "$as_me:17298: error: cannot find input file: $f" >&5
17299 echo "$as_me: error: cannot find input file: $f" >&2;}
17300    { (exit 1); exit 1; }; }
17301          fi;;
17302       esac
17303     done` || { (exit 1); exit 1; }
17304   # Remove the trailing spaces.
17305   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
17306
17307 EOF
17308
17309 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
17310 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
17311 # be either 'cat' or 'sort'.
17312 cat confdefs.h | uniq >conftest.vals
17313
17314 # Break up conftest.vals because some shells have a limit on
17315 # the size of here documents, and old seds have small limits too.
17316
17317 rm -f conftest.tail
17318 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
17319 while grep . conftest.vals >/dev/null
17320 do
17321   # Write chunks of a limited-size here document to conftest.frag.
17322   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
17323   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
17324   echo 'CEOF' >> $CONFIG_STATUS
17325   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
17326   rm -f conftest.vals
17327   mv conftest.tail conftest.vals
17328 done
17329 rm -f conftest.vals
17330
17331 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
17332 # marker @DEFS@.
17333 echo '  cat >> conftest.edit <<CEOF
17334 /@DEFS@/r conftest.frag
17335 /@DEFS@/d
17336 CEOF
17337 sed -f conftest.edit $tmp/in > $tmp/out
17338 rm -f $tmp/in
17339 mv $tmp/out $tmp/in
17340 rm -f conftest.edit conftest.frag
17341 ' >> $CONFIG_STATUS
17342
17343 cat >>$CONFIG_STATUS <<\EOF
17344   # Let's still pretend it is `configure' which instantiates (i.e., don't
17345   # use $as_me), people would be surprised to read:
17346   #    /* config.h.  Generated automatically by config.status.  */
17347   if test x"$ac_file" = x-; then
17348     echo "/* Generated automatically by configure.  */" >$tmp/config.h
17349   else
17350     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
17351   fi
17352   cat $tmp/in >>$tmp/config.h
17353   rm -f $tmp/in
17354   if test x"$ac_file" != x-; then
17355     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17356       { echo "$as_me:17356: $ac_file is unchanged" >&5
17357 echo "$as_me: $ac_file is unchanged" >&6;}
17358     else
17359       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17360          X"$ac_file" : 'X\(//\)[^/]' \| \
17361          X"$ac_file" : 'X\(//\)$' \| \
17362          X"$ac_file" : 'X\(/\)' \| \
17363          .     : '\(.\)' 2>/dev/null ||
17364 echo X"$ac_file" |
17365     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17366           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17367           /^X\(\/\/\)$/{ s//\1/; q; }
17368           /^X\(\/\).*/{ s//\1/; q; }
17369           s/.*/./; q'`
17370       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17371         { case "$ac_dir" in
17372   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17373   *)                      as_incr_dir=.;;
17374 esac
17375 as_dummy="$ac_dir"
17376 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17377   case $as_mkdir_dir in
17378     # Skip DOS drivespec
17379     ?:) as_incr_dir=$as_mkdir_dir ;;
17380     *)
17381       as_incr_dir=$as_incr_dir/$as_mkdir_dir
17382       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17383     ;;
17384   esac
17385 done; }
17386
17387       fi
17388       rm -f $ac_file
17389       mv $tmp/config.h $ac_file
17390     fi
17391   else
17392     cat $tmp/config.h
17393     rm -f $tmp/config.h
17394   fi
17395 done
17396 EOF
17397 cat >>$CONFIG_STATUS <<\EOF
17398
17399 #
17400 # CONFIG_COMMANDS section.
17401 #
17402 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
17403   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
17404   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
17405
17406   case $ac_dest in
17407     default )
17408
17409 for cf_dir in test
17410 do
17411         if test ! -d $srcdir/$cf_dir; then
17412                 continue
17413         elif test -f $srcdir/$cf_dir/programs; then
17414                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
17415         fi
17416 done
17417
17418         case $cf_cv_system_name in #(vi
17419         OS/2*|os2*) #(vi
17420         LIB_PREFIX=''
17421         ;;
17422         *)      LIB_PREFIX='lib'
17423         ;;
17424         esac
17425 cf_prefix=$LIB_PREFIX
17426
17427 if test $cf_cv_shlib_version = cygdll ; then
17428         TINFO_NAME=$TINFO_ARG_SUFFIX
17429         TINFO_SUFFIX=.dll
17430 fi
17431
17432 for cf_dir in $SRC_SUBDIRS
17433 do
17434         if test ! -d $srcdir/$cf_dir ; then
17435                 continue
17436         elif test -f $srcdir/$cf_dir/modules; then
17437
17438                 SHARED_LIB=
17439                 LIBS_TO_MAKE=
17440                 for cf_item in $cf_LIST_MODELS
17441                 do
17442
17443         case $cf_item in
17444         libtool)
17445                 cf_suffix='.la'
17446                 cf_depsuf=$cf_suffix
17447                 ;;
17448         normal)
17449                 cf_suffix='.a'
17450                 cf_depsuf=$cf_suffix
17451                 ;;
17452         debug)
17453                 cf_suffix='_g.a'
17454                 cf_depsuf=$cf_suffix
17455                 ;;
17456         profile)
17457                 cf_suffix='_p.a'
17458                 cf_depsuf=$cf_suffix
17459                 ;;
17460         shared)
17461                 case $cf_cv_system_name in
17462                 cygwin*)
17463                         cf_suffix='.dll'
17464                         cf_depsuf='.dll.a'
17465                         ;;
17466                 darwin*)
17467                         cf_suffix='.dylib'
17468                         cf_depsuf=$cf_suffix
17469                         ;;
17470                 hpux*)
17471                         case $target in
17472                         ia64*)
17473                                 cf_suffix='.so'
17474                                 cf_depsuf=$cf_suffix
17475                                 ;;
17476                         *)
17477                                 cf_suffix='.sl'
17478                                 cf_depsuf=$cf_suffix
17479                                 ;;
17480                         esac
17481                         ;;
17482                 *)      cf_suffix='.so'
17483                         cf_depsuf=$cf_suffix
17484                         ;;
17485                 esac
17486         esac
17487         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
17488         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
17489
17490                         if test $cf_item = shared ; then
17491                         if test "$cf_cv_do_symlinks" = yes ; then
17492                                 case "$cf_cv_shlib_version" in #(vi
17493                                 rel) #(vi
17494                                         case "$cf_cv_system_name" in #(vi
17495                                         darwin*)
17496                                         case .${LIB_SUFFIX} in
17497                                         .w*)
17498                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
17499                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
17500                                                 ;;
17501                                         *)
17502                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
17503                                                 ;;
17504                                         esac
17505                                         ;; #(vi
17506                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
17507                                         esac
17508                                         ;;
17509                                 abi)
17510                                         case "$cf_cv_system_name" in #(vi
17511                                         darwin*)
17512                                         case .${LIB_SUFFIX} in
17513                                         .w*)
17514                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
17515                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
17516                                                 ;;
17517                                         *)
17518                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
17519                                                 ;;
17520                                         esac
17521                                         ;; #(vi
17522                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
17523                                         esac
17524                                         ;;
17525                                 esac
17526                         fi
17527                         # cygwin needs import library, and has unique naming convention
17528                         # use autodetected ${cf_prefix} for import lib and static lib, but
17529                         # use 'cyg' prefix for shared lib.
17530                         if test $cf_cv_shlib_version = cygdll ; then
17531                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
17532                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
17533                                 continue
17534                         fi
17535                         fi
17536                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
17537                 done
17538
17539                 if test $cf_dir = ncurses ; then
17540                         cf_subsets="$LIB_SUBSETS"
17541                         cf_r_parts="$cf_subsets"
17542                         cf_liblist="$LIBS_TO_MAKE"
17543
17544                         while test -n "$cf_r_parts"
17545                         do
17546                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
17547                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
17548                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
17549                                         cf_item=
17550                                         case $cf_l_parts in #(vi
17551                                         *termlib*) #(vi
17552                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
17553                                                 ;;
17554                                         *ticlib*)
17555                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
17556                                                 ;;
17557                                         *)
17558                                                 break
17559                                                 ;;
17560                                         esac
17561                                         if test -n "$cf_item"; then
17562                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
17563                                         fi
17564                                 else
17565                                         break
17566                                 fi
17567                         done
17568                 else
17569                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
17570                 fi
17571
17572                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
17573                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
17574                         $cf_dir/Makefile >$cf_dir/Makefile.out
17575                 mv $cf_dir/Makefile.out $cf_dir/Makefile
17576
17577                 $AWK -f $srcdir/mk-0th.awk \
17578                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
17579                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
17580
17581                 for cf_subset in $cf_subsets
17582                 do
17583                         cf_subdirs=
17584                         for cf_item in $cf_LIST_MODELS
17585                         do
17586                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
17587
17588 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17589
17590         case $cf_item in
17591         libtool)
17592                 cf_suffix='.la'
17593                 cf_depsuf=$cf_suffix
17594                 ;;
17595         normal)
17596                 cf_suffix='.a'
17597                 cf_depsuf=$cf_suffix
17598                 ;;
17599         debug)
17600                 cf_suffix='_g.a'
17601                 cf_depsuf=$cf_suffix
17602                 ;;
17603         profile)
17604                 cf_suffix='_p.a'
17605                 cf_depsuf=$cf_suffix
17606                 ;;
17607         shared)
17608                 case $cf_cv_system_name in
17609                 cygwin*)
17610                         cf_suffix='.dll'
17611                         cf_depsuf='.dll.a'
17612                         ;;
17613                 darwin*)
17614                         cf_suffix='.dylib'
17615                         cf_depsuf=$cf_suffix
17616                         ;;
17617                 hpux*)
17618                         case $target in
17619                         ia64*)
17620                                 cf_suffix='.so'
17621                                 cf_depsuf=$cf_suffix
17622                                 ;;
17623                         *)
17624                                 cf_suffix='.sl'
17625                                 cf_depsuf=$cf_suffix
17626                                 ;;
17627                         esac
17628                         ;;
17629                 *)      cf_suffix='.so'
17630                         cf_depsuf=$cf_suffix
17631                         ;;
17632                 esac
17633         esac
17634         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
17635         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
17636
17637         case $cf_item in
17638         libtool) cf_subdir='obj_lo'  ;;
17639         normal)  cf_subdir='objects' ;;
17640         debug)   cf_subdir='obj_g' ;;
17641         profile) cf_subdir='obj_p' ;;
17642         shared)
17643                 case $cf_cv_system_name in #(vi
17644                 cygwin) #(vi
17645                         cf_subdir='objects' ;;
17646                 *)
17647                         cf_subdir='obj_s' ;;
17648                 esac
17649         esac
17650
17651                         # Test for case where we build libtinfo with a different name.
17652                         cf_libname=$cf_dir
17653                         if test $cf_dir = ncurses ; then
17654                                 case $cf_subset in
17655                                 *base*)
17656                                         cf_libname=${cf_libname}$LIB_SUFFIX
17657                                         ;;
17658                                 *termlib*)
17659                                         cf_libname=$TINFO_LIB_SUFFIX
17660                                         ;;
17661                                 ticlib*)
17662                                         cf_libname=$TICS_LIB_SUFFIX
17663                                         ;;
17664                                 esac
17665                         else
17666                                 cf_libname=${cf_libname}$LIB_SUFFIX
17667                         fi
17668                         if test -n "${DFT_ARG_SUFFIX}" ; then
17669                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
17670                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
17671                         fi
17672
17673                         # These dependencies really are for development, not
17674                         # builds, but they are useful in porting, too.
17675                         cf_depend="../include/ncurses_cfg.h"
17676                         if test "$srcdir" = "."; then
17677                                 cf_reldir="."
17678                         else
17679                                 cf_reldir="\${srcdir}"
17680                         fi
17681
17682                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
17683                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
17684                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
17685                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
17686                         fi
17687
17688                         cf_dir_suffix=
17689                         old_cf_suffix="$cf_suffix"
17690                         if test "$cf_cv_shlib_version_infix" = yes ; then
17691                         if test -n "$LIB_SUFFIX" ; then
17692                                 case $LIB_SUFFIX in
17693                                 w*)
17694                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
17695                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
17696                                         cf_dir_suffix=w
17697                                         ;;
17698                                 esac
17699                         fi
17700                         fi
17701
17702                         $AWK -f $srcdir/mk-1st.awk \
17703                                 name=${cf_libname}${cf_dir_suffix} \
17704                                 traces=$LIB_TRACING \
17705                                 MODEL=$cf_ITEM \
17706                                 model=$cf_subdir \
17707                                 prefix=$cf_prefix \
17708                                 suffix=$cf_suffix \
17709                                 subset=$cf_subset \
17710                                 TermlibRoot=$TINFO_NAME \
17711                                 TermlibSuffix=$TINFO_SUFFIX \
17712                                 ShlibVer=$cf_cv_shlib_version \
17713                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
17714                                 ReLink=${cf_cv_do_relink-no} \
17715                                 DoLinks=$cf_cv_do_symlinks \
17716                                 rmSoLocs=$cf_cv_rm_so_locs \
17717                                 ldconfig="$LDCONFIG" \
17718                                 overwrite=$WITH_OVERWRITE \
17719                                 depend="$cf_depend" \
17720                                 host="$host" \
17721                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
17722
17723                         cf_suffix="$old_cf_suffix"
17724
17725                         for cf_subdir2 in $cf_subdirs lib
17726                         do
17727                                 test $cf_subdir = $cf_subdir2 && break
17728                         done
17729                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
17730                         $AWK -f $srcdir/mk-2nd.awk \
17731                                 name=$cf_dir \
17732                                 traces=$LIB_TRACING \
17733                                 MODEL=$cf_ITEM \
17734                                 model=$cf_subdir \
17735                                 subset=$cf_subset \
17736                                 srcdir=$srcdir \
17737                                 echo=$WITH_ECHO \
17738                                 crenames=$cf_cv_prog_CC_c_o \
17739                                 cxxrenames=$cf_cv_prog_CXX_c_o \
17740                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
17741                         cf_subdirs="$cf_subdirs $cf_subdir"
17742                         done
17743                 done
17744         fi
17745
17746         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
17747 done
17748
17749 for cf_dir in $SRC_SUBDIRS
17750 do
17751         if test ! -d $srcdir/$cf_dir ; then
17752                 continue
17753         fi
17754
17755         if test -f $cf_dir/Makefile ; then
17756                 case "$cf_dir" in
17757                 Ada95) #(vi
17758                         echo 'libs \' >> Makefile
17759                         echo 'install.libs \' >> Makefile
17760                         echo 'uninstall.libs ::' >> Makefile
17761                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
17762                         ;;
17763                 esac
17764         fi
17765
17766         if test -f $srcdir/$cf_dir/modules; then
17767                 echo >> Makefile
17768                 if test -f $srcdir/$cf_dir/headers; then
17769 cat >> Makefile <<CF_EOF
17770 install.includes \\
17771 uninstall.includes \\
17772 CF_EOF
17773                 fi
17774 if test "$cf_dir" != "c++" ; then
17775 echo 'lint \' >> Makefile
17776 fi
17777 cat >> Makefile <<CF_EOF
17778 libs \\
17779 lintlib \\
17780 install.libs \\
17781 uninstall.libs \\
17782 install.$cf_dir \\
17783 uninstall.$cf_dir ::
17784         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
17785 CF_EOF
17786         elif test -f $srcdir/$cf_dir/headers; then
17787 cat >> Makefile <<CF_EOF
17788
17789 libs \\
17790 install.libs \\
17791 uninstall.libs \\
17792 install.includes \\
17793 uninstall.includes ::
17794         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
17795 CF_EOF
17796 fi
17797 done
17798
17799 cat >> Makefile <<CF_EOF
17800
17801 install.libs uninstall.libs \\
17802 install.data uninstall.data ::
17803 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
17804
17805 install.man \\
17806 uninstall.man ::
17807         cd man && \${MAKE} \${CF_MFLAGS} \$@
17808
17809 distclean ::
17810         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
17811         rm -f headers.sh headers.sed mk_shared_lib.sh
17812         rm -rf \${DIRS_TO_MAKE}
17813 CF_EOF
17814
17815 # Special case: tack's manpage lives in its own directory.
17816 if test -d tack ; then
17817 if test -f $srcdir/$tack.h; then
17818 cat >> Makefile <<CF_EOF
17819
17820 install.man \\
17821 uninstall.man ::
17822         cd tack && \${MAKE} \${CF_MFLAGS} \$@
17823 CF_EOF
17824 fi
17825 fi
17826
17827 rm -f headers.sed headers.sh
17828
17829 echo creating headers.sh
17830 cat >headers.sh <<CF_EOF
17831 #! /bin/sh
17832 # This shell script is generated by the 'configure' script.  It is invoked in a
17833 # subdirectory of the build tree.  It generates a sed-script in the parent
17834 # directory that is used to adjust includes for header files that reside in a
17835 # subdirectory of /usr/include, etc.
17836 PRG=""
17837 while test \$# != 3
17838 do
17839 PRG="\$PRG \$1"; shift
17840 done
17841 DST=\$1
17842 REF=\$2
17843 SRC=\$3
17844 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
17845 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
17846 echo installing \$SRC in \$DST
17847 CF_EOF
17848
17849 if test $WITH_CURSES_H = yes; then
17850         cat >>headers.sh <<CF_EOF
17851 case \$DST in
17852 /*/include/*)
17853         END=\`basename \$DST\`
17854         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
17855         do
17856                 NAME=\`basename \$i\`
17857                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
17858         done
17859         ;;
17860 *)
17861         echo "" >> \$TMPSED
17862         ;;
17863 esac
17864 CF_EOF
17865
17866 else
17867         cat >>headers.sh <<CF_EOF
17868 case \$DST in
17869 /*/include/*)
17870         END=\`basename \$DST\`
17871         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
17872         do
17873                 NAME=\`basename \$i\`
17874                 if test "\$NAME" = "curses.h"
17875                 then
17876                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
17877                         NAME=ncurses.h
17878                 fi
17879                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
17880         done
17881         ;;
17882 *)
17883         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
17884         ;;
17885 esac
17886 CF_EOF
17887 fi
17888 cat >>headers.sh <<CF_EOF
17889 rm -f \$TMPSRC
17890 sed -f \$TMPSED \$SRC > \$TMPSRC
17891 NAME=\`basename \$SRC\`
17892 CF_EOF
17893 if test $WITH_CURSES_H != yes; then
17894         cat >>headers.sh <<CF_EOF
17895 test "\$NAME" = "curses.h" && NAME=ncurses.h
17896 CF_EOF
17897 fi
17898 cat >>headers.sh <<CF_EOF
17899 # Just in case someone gzip'd manpages, remove the conflicting copy.
17900 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
17901
17902 eval \$PRG \$TMPSRC \$DST/\$NAME
17903 rm -f \$TMPSRC \$TMPSED
17904 CF_EOF
17905
17906 chmod 0755 headers.sh
17907
17908 for cf_dir in $SRC_SUBDIRS
17909 do
17910         if test ! -d $srcdir/$cf_dir ; then
17911                 continue
17912         fi
17913
17914         if test -f $srcdir/$cf_dir/headers; then
17915                 $AWK -f $srcdir/mk-hdr.awk \
17916                         subset="$LIB_SUBSETS" \
17917                         compat="$WITH_CURSES_H" \
17918                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
17919         fi
17920
17921         if test -f $srcdir/$cf_dir/modules; then
17922                 if test "$cf_dir" != "c++" ; then
17923                         cat >>$cf_dir/Makefile <<"CF_EOF"
17924 depend : ${AUTO_SRC}
17925         makedepend -- ${CPPFLAGS} -- ${C_SRC}
17926
17927 # DO NOT DELETE THIS LINE -- make depend depends on it.
17928 CF_EOF
17929                 fi
17930         fi
17931 done
17932
17933  ;;
17934   esac
17935 done
17936 EOF
17937
17938 cat >>$CONFIG_STATUS <<\EOF
17939
17940 { (exit 0); exit 0; }
17941 EOF
17942 chmod +x $CONFIG_STATUS
17943 ac_clean_files=$ac_clean_files_save
17944
17945 # configure is writing to config.log, and then calls config.status.
17946 # config.status does its own redirection, appending to config.log.
17947 # Unfortunately, on DOS this fails, as config.log is still kept open
17948 # by configure, so config.status won't be able to write to it; its
17949 # output is simply discarded.  So we exec the FD to /dev/null,
17950 # effectively closing config.log, so it can be properly (re)opened and
17951 # appended to by config.status.  When coming back to configure, we
17952 # need to make the FD available again.
17953 if test "$no_create" != yes; then
17954   ac_cs_success=:
17955   exec 5>/dev/null
17956   $SHELL $CONFIG_STATUS || ac_cs_success=false
17957   exec 5>>config.log
17958   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17959   # would make configure fail if this is the last instruction.
17960   $ac_cs_success || { (exit 1); exit 1; }
17961 fi
17962 ${MAKE-make} preinstall