]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
682cb57f1f7064e7cf8159deffe9f10e9d714718
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.452 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20080325.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datadir='${prefix}/share'
175 sysconfdir='${prefix}/etc'
176 sharedstatedir='${prefix}/com'
177 localstatedir='${prefix}/var'
178 libdir='${exec_prefix}/lib'
179 includedir='${prefix}/include'
180 oldincludedir='/usr/include'
181 infodir='${prefix}/info'
182 mandir='${prefix}/man'
183
184 # Identity of this package.
185 PACKAGE_NAME=
186 PACKAGE_TARNAME=
187 PACKAGE_VERSION=
188 PACKAGE_STRING=
189 PACKAGE_BUGREPORT=
190
191 ac_prev=
192 for ac_option
193 do
194   # If the previous option needs an argument, assign it.
195   if test -n "$ac_prev"; then
196     eval "$ac_prev=\$ac_option"
197     ac_prev=
198     continue
199   fi
200
201   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case $ac_option in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir=$ac_optarg ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build_alias ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build_alias=$ac_optarg ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file=$ac_optarg ;;
223
224   --config-cache | -C)
225     cache_file=config.cache ;;
226
227   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228     ac_prev=datadir ;;
229   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230   | --da=*)
231     datadir=$ac_optarg ;;
232
233   -disable-* | --disable-*)
234     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
235     # Reject names that are not valid shell variable names.
236     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
237       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
238    { (exit 1); exit 1; }; }
239     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
240     eval "enable_$ac_feature=no" ;;
241
242   -enable-* | --enable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     case $ac_option in
250       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
251       *) ac_optarg=yes ;;
252     esac
253     eval "enable_$ac_feature='$ac_optarg'" ;;
254
255   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
256   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
257   | --exec | --exe | --ex)
258     ac_prev=exec_prefix ;;
259   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
260   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
261   | --exec=* | --exe=* | --ex=*)
262     exec_prefix=$ac_optarg ;;
263
264   -gas | --gas | --ga | --g)
265     # Obsolete; use --with-gas.
266     with_gas=yes ;;
267
268   -help | --help | --hel | --he | -h)
269     ac_init_help=long ;;
270   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
271     ac_init_help=recursive ;;
272   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
273     ac_init_help=short ;;
274
275   -host | --host | --hos | --ho)
276     ac_prev=host_alias ;;
277   -host=* | --host=* | --hos=* | --ho=*)
278     host_alias=$ac_optarg ;;
279
280   -includedir | --includedir | --includedi | --included | --include \
281   | --includ | --inclu | --incl | --inc)
282     ac_prev=includedir ;;
283   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
284   | --includ=* | --inclu=* | --incl=* | --inc=*)
285     includedir=$ac_optarg ;;
286
287   -infodir | --infodir | --infodi | --infod | --info | --inf)
288     ac_prev=infodir ;;
289   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
290     infodir=$ac_optarg ;;
291
292   -libdir | --libdir | --libdi | --libd)
293     ac_prev=libdir ;;
294   -libdir=* | --libdir=* | --libdi=* | --libd=*)
295     libdir=$ac_optarg ;;
296
297   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
298   | --libexe | --libex | --libe)
299     ac_prev=libexecdir ;;
300   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
301   | --libexe=* | --libex=* | --libe=*)
302     libexecdir=$ac_optarg ;;
303
304   -localstatedir | --localstatedir | --localstatedi | --localstated \
305   | --localstate | --localstat | --localsta | --localst \
306   | --locals | --local | --loca | --loc | --lo)
307     ac_prev=localstatedir ;;
308   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
309   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
310   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
311     localstatedir=$ac_optarg ;;
312
313   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
314     ac_prev=mandir ;;
315   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
316     mandir=$ac_optarg ;;
317
318   -nfp | --nfp | --nf)
319     # Obsolete; use --without-fp.
320     with_fp=no ;;
321
322   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
323   | --no-cr | --no-c)
324     no_create=yes ;;
325
326   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
327   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
328     no_recursion=yes ;;
329
330   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
331   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
332   | --oldin | --oldi | --old | --ol | --o)
333     ac_prev=oldincludedir ;;
334   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
335   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
336   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
337     oldincludedir=$ac_optarg ;;
338
339   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
340     ac_prev=prefix ;;
341   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
342     prefix=$ac_optarg ;;
343
344   -program-prefix | --program-prefix | --program-prefi | --program-pref \
345   | --program-pre | --program-pr | --program-p)
346     ac_prev=program_prefix ;;
347   -program-prefix=* | --program-prefix=* | --program-prefi=* \
348   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
349     program_prefix=$ac_optarg ;;
350
351   -program-suffix | --program-suffix | --program-suffi | --program-suff \
352   | --program-suf | --program-su | --program-s)
353     ac_prev=program_suffix ;;
354   -program-suffix=* | --program-suffix=* | --program-suffi=* \
355   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
356     program_suffix=$ac_optarg ;;
357
358   -program-transform-name | --program-transform-name \
359   | --program-transform-nam | --program-transform-na \
360   | --program-transform-n | --program-transform- \
361   | --program-transform | --program-transfor \
362   | --program-transfo | --program-transf \
363   | --program-trans | --program-tran \
364   | --progr-tra | --program-tr | --program-t)
365     ac_prev=program_transform_name ;;
366   -program-transform-name=* | --program-transform-name=* \
367   | --program-transform-nam=* | --program-transform-na=* \
368   | --program-transform-n=* | --program-transform-=* \
369   | --program-transform=* | --program-transfor=* \
370   | --program-transfo=* | --program-transf=* \
371   | --program-trans=* | --program-tran=* \
372   | --progr-tra=* | --program-tr=* | --program-t=*)
373     program_transform_name=$ac_optarg ;;
374
375   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
376   | -silent | --silent | --silen | --sile | --sil)
377     silent=yes ;;
378
379   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
380     ac_prev=sbindir ;;
381   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
382   | --sbi=* | --sb=*)
383     sbindir=$ac_optarg ;;
384
385   -sharedstatedir | --sharedstatedir | --sharedstatedi \
386   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
387   | --sharedst | --shareds | --shared | --share | --shar \
388   | --sha | --sh)
389     ac_prev=sharedstatedir ;;
390   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
391   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
392   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
393   | --sha=* | --sh=*)
394     sharedstatedir=$ac_optarg ;;
395
396   -site | --site | --sit)
397     ac_prev=site ;;
398   -site=* | --site=* | --sit=*)
399     site=$ac_optarg ;;
400
401   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
402     ac_prev=srcdir ;;
403   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
404     srcdir=$ac_optarg ;;
405
406   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
407   | --syscon | --sysco | --sysc | --sys | --sy)
408     ac_prev=sysconfdir ;;
409   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
410   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
411     sysconfdir=$ac_optarg ;;
412
413   -target | --target | --targe | --targ | --tar | --ta | --t)
414     ac_prev=target_alias ;;
415   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
416     target_alias=$ac_optarg ;;
417
418   -v | -verbose | --verbose | --verbos | --verbo | --verb)
419     verbose=yes ;;
420
421   -version | --version | --versio | --versi | --vers | -V)
422     ac_init_version=: ;;
423
424   -with-* | --with-*)
425     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
426     # Reject names that are not valid shell variable names.
427     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
428       { echo "$as_me: error: invalid package name: $ac_package" >&2
429    { (exit 1); exit 1; }; }
430     ac_package=`echo $ac_package| sed 's/-/_/g'`
431     case $ac_option in
432       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
433       *) ac_optarg=yes ;;
434     esac
435     eval "with_$ac_package='$ac_optarg'" ;;
436
437   -without-* | --without-*)
438     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
439     # Reject names that are not valid shell variable names.
440     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
441       { echo "$as_me: error: invalid package name: $ac_package" >&2
442    { (exit 1); exit 1; }; }
443     ac_package=`echo $ac_package | sed 's/-/_/g'`
444     eval "with_$ac_package=no" ;;
445
446   --x)
447     # Obsolete; use --with-x.
448     with_x=yes ;;
449
450   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451   | --x-incl | --x-inc | --x-in | --x-i)
452     ac_prev=x_includes ;;
453   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455     x_includes=$ac_optarg ;;
456
457   -x-libraries | --x-libraries | --x-librarie | --x-librari \
458   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459     ac_prev=x_libraries ;;
460   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462     x_libraries=$ac_optarg ;;
463
464   -*) { echo "$as_me: error: unrecognized option: $ac_option
465 Try \`$0 --help' for more information." >&2
466    { (exit 1); exit 1; }; }
467     ;;
468
469   *=*)
470     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
471     # Reject names that are not valid shell variable names.
472     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
473       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
474    { (exit 1); exit 1; }; }
475     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
476     eval "$ac_envvar='$ac_optarg'"
477     export $ac_envvar ;;
478
479   *)
480     # FIXME: should be removed in autoconf 3.0.
481     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
482     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
483       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
484     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
485     ;;
486
487   esac
488 done
489
490 if test -n "$ac_prev"; then
491   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
492   { echo "$as_me: error: missing argument to $ac_option" >&2
493    { (exit 1); exit 1; }; }
494 fi
495
496 # Be sure to have absolute paths.
497 for ac_var in exec_prefix prefix
498 do
499   eval ac_val=$`echo $ac_var`
500   case $ac_val in
501     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
502     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503    { (exit 1); exit 1; }; };;
504   esac
505 done
506
507 # Be sure to have absolute paths.
508 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
509               localstatedir libdir includedir oldincludedir infodir mandir
510 do
511   eval ac_val=$`echo $ac_var`
512   case $ac_val in
513     [\\/$]* | ?:[\\/]* ) ;;
514     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
515    { (exit 1); exit 1; }; };;
516   esac
517 done
518
519 # There might be people who depend on the old broken behavior: `$host'
520 # used to hold the argument of --host etc.
521 build=$build_alias
522 host=$host_alias
523 target=$target_alias
524
525 # FIXME: should be removed in autoconf 3.0.
526 if test "x$host_alias" != x; then
527   if test "x$build_alias" = x; then
528     cross_compiling=maybe
529     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
530     If a cross compiler is detected then cross compile mode will be used." >&2
531   elif test "x$build_alias" != "x$host_alias"; then
532     cross_compiling=yes
533   fi
534 fi
535
536 ac_tool_prefix=
537 test -n "$host_alias" && ac_tool_prefix=$host_alias-
538
539 test "$silent" = yes && exec 6>/dev/null
540
541 # Find the source files, if location was not specified.
542 if test -z "$srcdir"; then
543   ac_srcdir_defaulted=yes
544   # Try the directory containing this script, then its parent.
545   ac_prog=$0
546   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
547   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548   srcdir=$ac_confdir
549   if test ! -r $srcdir/$ac_unique_file; then
550     srcdir=..
551   fi
552 else
553   ac_srcdir_defaulted=no
554 fi
555 if test ! -r $srcdir/$ac_unique_file; then
556   if test "$ac_srcdir_defaulted" = yes; then
557     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
558    { (exit 1); exit 1; }; }
559   else
560     { echo "$as_me: error: cannot find sources in $srcdir" >&2
561    { (exit 1); exit 1; }; }
562   fi
563 fi
564 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
565 ac_env_build_alias_set=${build_alias+set}
566 ac_env_build_alias_value=$build_alias
567 ac_cv_env_build_alias_set=${build_alias+set}
568 ac_cv_env_build_alias_value=$build_alias
569 ac_env_host_alias_set=${host_alias+set}
570 ac_env_host_alias_value=$host_alias
571 ac_cv_env_host_alias_set=${host_alias+set}
572 ac_cv_env_host_alias_value=$host_alias
573 ac_env_target_alias_set=${target_alias+set}
574 ac_env_target_alias_value=$target_alias
575 ac_cv_env_target_alias_set=${target_alias+set}
576 ac_cv_env_target_alias_value=$target_alias
577 ac_env_CC_set=${CC+set}
578 ac_env_CC_value=$CC
579 ac_cv_env_CC_set=${CC+set}
580 ac_cv_env_CC_value=$CC
581 ac_env_CFLAGS_set=${CFLAGS+set}
582 ac_env_CFLAGS_value=$CFLAGS
583 ac_cv_env_CFLAGS_set=${CFLAGS+set}
584 ac_cv_env_CFLAGS_value=$CFLAGS
585 ac_env_LDFLAGS_set=${LDFLAGS+set}
586 ac_env_LDFLAGS_value=$LDFLAGS
587 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
588 ac_cv_env_LDFLAGS_value=$LDFLAGS
589 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
590 ac_env_CPPFLAGS_value=$CPPFLAGS
591 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
592 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
593 ac_env_CPP_set=${CPP+set}
594 ac_env_CPP_value=$CPP
595 ac_cv_env_CPP_set=${CPP+set}
596 ac_cv_env_CPP_value=$CPP
597 ac_env_CXX_set=${CXX+set}
598 ac_env_CXX_value=$CXX
599 ac_cv_env_CXX_set=${CXX+set}
600 ac_cv_env_CXX_value=$CXX
601 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
602 ac_env_CXXFLAGS_value=$CXXFLAGS
603 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
604 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
605 ac_env_CXXCPP_set=${CXXCPP+set}
606 ac_env_CXXCPP_value=$CXXCPP
607 ac_cv_env_CXXCPP_set=${CXXCPP+set}
608 ac_cv_env_CXXCPP_value=$CXXCPP
609
610 #
611 # Report the --help message.
612 #
613 if test "$ac_init_help" = "long"; then
614   # Omit some internal or obsolete options to make the list less imposing.
615   # This message is too long to be a string in the A/UX 3.1 sh.
616   cat <<EOF
617 \`configure' configures this package to adapt to many kinds of systems.
618
619 Usage: $0 [OPTION]... [VAR=VALUE]...
620
621 To assign environment variables (e.g., CC, CFLAGS...), specify them as
622 VAR=VALUE.  See below for descriptions of some of the useful variables.
623
624 Defaults for the options are specified in brackets.
625
626 Configuration:
627   -h, --help              display this help and exit
628       --help=short        display options specific to this package
629       --help=recursive    display the short help of all the included packages
630   -V, --version           display version information and exit
631   -q, --quiet, --silent   do not print \`checking...' messages
632       --cache-file=FILE   cache test results in FILE [disabled]
633   -C, --config-cache      alias for \`--cache-file=config.cache'
634   -n, --no-create         do not create output files
635       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
636
637 EOF
638
639   cat <<EOF
640 Installation directories:
641   --prefix=PREFIX         install architecture-independent files in PREFIX
642                           [$ac_default_prefix]
643   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
644                           [PREFIX]
645
646 By default, \`make install' will install all the files in
647 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
648 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
649 for instance \`--prefix=\$HOME'.
650
651 For better control, use the options below.
652
653 Fine tuning of the installation directories:
654   --bindir=DIR            user executables [EPREFIX/bin]
655   --sbindir=DIR           system admin executables [EPREFIX/sbin]
656   --libexecdir=DIR        program executables [EPREFIX/libexec]
657   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
658   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
659   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
660   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
661   --libdir=DIR            object code libraries [EPREFIX/lib]
662   --includedir=DIR        C header files [PREFIX/include]
663   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
664   --infodir=DIR           info documentation [PREFIX/info]
665   --mandir=DIR            man documentation [PREFIX/man]
666 EOF
667
668   cat <<\EOF
669
670 Program names:
671   --program-prefix=PREFIX            prepend PREFIX to installed program names
672   --program-suffix=SUFFIX            append SUFFIX to installed program names
673   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
674
675 System types:
676   --build=BUILD           configure for building on BUILD [guessed]
677   --host=HOST       build programs to run on HOST [BUILD]
678   --target=TARGET   configure for building compilers for TARGET [HOST]
679 EOF
680 fi
681
682 if test -n "$ac_init_help"; then
683
684   cat <<\EOF
685
686 Optional Packages:
687   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
688   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
689
690 Optional Features:
691   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
692   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
693
694   --with-rel-version=XXX  override derived release version
695   --with-abi-version=XXX  override derived ABI version
696   --with-system-type=XXX  test: override derived host system-type
697   --without-cxx           do not adjust ncurses bool to match C++
698   --without-cxx-binding   do not build C++ binding and demo
699   --without-ada           suppress check for Ada95, don't build demo
700   --without-progs         suppress build with programs (e.g., tic)
701   --without-curses-h      install curses.h as ncurses.h only
702   --enable-mixed-case     tic should assume mixed-case filenames
703   --with-install-prefix   prefixes actual install-location ($DESTDIR)
704 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
705   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
706   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
707   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
708   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
709   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
710   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
711 Options to Specify the Libraries Built/Used:
712   --with-libtool          generate libraries with libtool
713   --with-shared           generate shared-libraries
714   --with-normal           generate normal-libraries (default)
715   --with-debug            generate debug-libraries (default)
716   --with-profile          generate profile-libraries
717   --with-termlib          generate separate terminfo library
718   --with-ticlib           generate separate tic library
719   --with-gpm              use Alessandro Rubini's GPM library
720   --without-dlsym         do not use dlsym() to load GPM dynamically
721   --with-sysmouse         use sysmouse (FreeBSD console)
722   --enable-rpath          use rpath option when generating shared libraries
723   --disable-relink        relink shared libraries during install
724   --with-shlib-version=X  Specify rel or abi version for shared libs
725 Fine-Tuning Your Configuration:
726   --disable-overwrite     leave out the link to -lcurses
727   --disable-database      do not use terminfo, only fallbacks/termcap
728   --with-database=XXX     specify terminfo source to install
729   --with-hashed-db        specify hashed-database library
730   --with-fallbacks=XXX    specify list of fallback terminal descriptions
731   --without-xterm-new     specify if xterm terminfo should be old version
732   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
733   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
734   --disable-big-core      assume machine has little memory
735   --disable-big-strings   assume compiler has only standard-size strings
736   --enable-termcap        compile in termcap fallback support
737   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
738   --enable-getcap         fast termcap load, no xrefs to terminfo
739   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
740   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
741   --disable-root-environ  restrict environment when running as root
742   --enable-symlinks       make tic use symbolic links not hard links
743   --enable-broken_linker  compile with broken-linker support code
744   --enable-bsdpad         recognize BSD-style prefix padding
745   --enable-widec          compile with wide-char/UTF-8 code
746   --disable-lp64          allow chtype to be long (ignore _LP64)
747   --disable-largefile     omit support for large files
748   --disable-tparm-varargs compile tparm() without varargs interface
749   --disable-tic-depends   link tic library without explicit dependency on ncurses library
750   --with-bool=TYPE        override fallback type of bool variable
751   --with-caps=alt         compile with alternate Caps file
752   --with-chtype=TYPE      override type of chtype
753   --with-ospeed=TYPE      override type of ospeed variable
754   --with-mmask-t=TYPE     override type of mmask_t
755   --with-rcs-ids          compile-in RCS identifiers
756 Options to Specify How Manpages are Installed:
757   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
758                           optionally formatted/catonly, e.g., gzip,formatted
759   --with-manpage-renames  specify manpage-renaming
760   --with-manpage-aliases  specify manpage-aliases using .so
761   --with-manpage-symlinks specify manpage-aliases using symlinks
762   --with-manpage-tbl      specify manpage processing with tbl
763 Extensions:
764   --disable-ext-funcs     disable function-extensions
765   --enable-const          compile with extra/non-standard const
766   --enable-ext-colors     compile for 256-color support
767   --enable-ext-mouse      compile for extended mouse-encoding
768   --enable-no-padding     compile with $NCURSES_NO_PADDING code
769   --enable-signed-char    compile using signed Boolean's in term.h
770   --enable-sigwinch       compile with SIGWINCH handler
771   --enable-tcap-names     compile with user-definable terminal capabilities
772 Development Code:
773   --without-develop       disable development options
774   --enable-hard-tabs      compile with hard-tabs code
775   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
776 Experimental Code:
777   --disable-assumed-color do not assume anything about default-colors
778   --disable-hashmap       compile without hashmap scrolling-optimization
779   --enable-colorfgbg      compile with $COLORFGBG code
780   --with-pthread          use POSIX thread library
781   --enable-weak-symbols   enable weak-symbols for pthreads
782   --enable-reentrant      compile with experimental reentrant code
783   --enable-safe-sprintf   compile with experimental safe-sprintf code
784   --disable-scroll-hints  compile without scroll-hints code
785   --enable-wgetch-events  compile with experimental wgetch-events code
786 Testing/development Options:
787   --enable-echo           build: display "compiling" commands (default)
788   --enable-warnings       build: turn on GCC compiler warnings
789   --enable-assertions     test: turn on generation of assertion code
790   --with-dmalloc          test: use Gray Watson's dmalloc library
791   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
792   --with-valgrind         test: use valgrind
793   --disable-leaks         test: free permanent memory, analyze leaks
794   --enable-expanded       test: generate functions for certain macros
795   --disable-macros        test: use functions rather than macros
796   --with-trace            test: add trace() function to all models of ncurses
797 Ada95 Binding Options:
798   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
799   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
800   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
801
802 Some influential environment variables:
803   CC          C compiler command
804   CFLAGS      C compiler flags
805   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
806               nonstandard directory <lib dir>
807   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
808               headers in a nonstandard directory <include dir>
809   CPP         C preprocessor
810   CXX         C++ compiler command
811   CXXFLAGS    C++ compiler flags
812   CXXCPP      C++ preprocessor
813
814 Use these variables to override the choices made by `configure' or to help
815 it to find libraries and programs with nonstandard names/locations.
816
817 EOF
818 fi
819
820 if test "$ac_init_help" = "recursive"; then
821   # If there are subdirs, report their specific --help.
822   ac_popdir=`pwd`
823   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
824     cd $ac_subdir
825     # A "../" for each directory in /$ac_subdir.
826     ac_dots=`echo $ac_subdir |
827              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
828
829     case $srcdir in
830     .) # No --srcdir option.  We are building in place.
831       ac_sub_srcdir=$srcdir ;;
832     [\\/]* | ?:[\\/]* ) # Absolute path.
833       ac_sub_srcdir=$srcdir/$ac_subdir ;;
834     *) # Relative path.
835       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
836     esac
837
838     # Check for guested configure; otherwise get Cygnus style configure.
839     if test -f $ac_sub_srcdir/configure.gnu; then
840       echo
841       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
842     elif test -f $ac_sub_srcdir/configure; then
843       echo
844       $SHELL $ac_sub_srcdir/configure  --help=recursive
845     elif test -f $ac_sub_srcdir/configure.ac ||
846            test -f $ac_sub_srcdir/configure.in; then
847       echo
848       $ac_configure --help
849     else
850       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
851     fi
852     cd $ac_popdir
853   done
854 fi
855
856 test -n "$ac_init_help" && exit 0
857 if $ac_init_version; then
858   cat <<\EOF
859
860 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
861 Free Software Foundation, Inc.
862 This configure script is free software; the Free Software Foundation
863 gives unlimited permission to copy, distribute and modify it.
864 EOF
865   exit 0
866 fi
867 exec 5>config.log
868 cat >&5 <<EOF
869 This file contains any messages produced by compilers while
870 running configure, to aid debugging if configure makes a mistake.
871
872 It was created by $as_me, which was
873 generated by GNU Autoconf 2.52.20080325.  Invocation command line was
874
875   $ $0 $@
876
877 EOF
878 {
879 cat <<_ASUNAME
880 ## ---------- ##
881 ## Platform.  ##
882 ## ---------- ##
883
884 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
885 uname -m = `(uname -m) 2>/dev/null || echo unknown`
886 uname -r = `(uname -r) 2>/dev/null || echo unknown`
887 uname -s = `(uname -s) 2>/dev/null || echo unknown`
888 uname -v = `(uname -v) 2>/dev/null || echo unknown`
889
890 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
891 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
892
893 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
894 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
895 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
896 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
897 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
898 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
899 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
900
901 PATH = $PATH
902
903 _ASUNAME
904 } >&5
905
906 cat >&5 <<EOF
907 ## ------------ ##
908 ## Core tests.  ##
909 ## ------------ ##
910
911 EOF
912
913 # Keep a trace of the command line.
914 # Strip out --no-create and --no-recursion so they do not pile up.
915 # Also quote any args containing shell meta-characters.
916 ac_configure_args=
917 ac_sep=
918 for ac_arg
919 do
920   case $ac_arg in
921   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
922   | --no-cr | --no-c) ;;
923   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
924   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
925   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
926     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
927     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
928     ac_sep=" " ;;
929   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
930      ac_sep=" " ;;
931   esac
932   # Get rid of the leading space.
933 done
934
935 # When interrupted or exit'd, cleanup temporary files, and complete
936 # config.log.  We remove comments because anyway the quotes in there
937 # would cause problems or look ugly.
938 trap 'exit_status=$?
939   # Save into config.log some information that might help in debugging.
940   echo >&5
941   echo "## ----------------- ##" >&5
942   echo "## Cache variables.  ##" >&5
943   echo "## ----------------- ##" >&5
944   echo >&5
945   # The following way of writing the cache mishandles newlines in values,
946 {
947   (set) 2>&1 |
948     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
949     *ac_space=\ *)
950       sed -n \
951         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
952           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
953       ;;
954     *)
955       sed -n \
956         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
957       ;;
958     esac;
959 } >&5
960   sed "/^$/d" confdefs.h >conftest.log
961   if test -s conftest.log; then
962     echo >&5
963     echo "## ------------ ##" >&5
964     echo "## confdefs.h.  ##" >&5
965     echo "## ------------ ##" >&5
966     echo >&5
967     cat conftest.log >&5
968   fi
969   (echo; echo) >&5
970   test "$ac_signal" != 0 &&
971     echo "$as_me: caught signal $ac_signal" >&5
972   echo "$as_me: exit $exit_status" >&5
973   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
974     exit $exit_status
975      ' 0
976 for ac_signal in 1 2 13 15; do
977   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
978 done
979 ac_signal=0
980
981 # confdefs.h avoids OS command line length limits that DEFS can exceed.
982 rm -rf conftest* confdefs.h
983 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
984 echo >confdefs.h
985
986 # Let the site file select an alternate cache file if it wants to.
987 # Prefer explicitly selected file to automatically selected ones.
988 if test -z "$CONFIG_SITE"; then
989   if test "x$prefix" != xNONE; then
990     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
991   else
992     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
993   fi
994 fi
995 for ac_site_file in $CONFIG_SITE; do
996   if test -r "$ac_site_file"; then
997     { echo "$as_me:997: loading site script $ac_site_file" >&5
998 echo "$as_me: loading site script $ac_site_file" >&6;}
999     cat "$ac_site_file" >&5
1000     . "$ac_site_file"
1001   fi
1002 done
1003
1004 if test -r "$cache_file"; then
1005   # Some versions of bash will fail to source /dev/null (special
1006   # files actually), so we avoid doing that.
1007   if test -f "$cache_file"; then
1008     { echo "$as_me:1008: loading cache $cache_file" >&5
1009 echo "$as_me: loading cache $cache_file" >&6;}
1010     case $cache_file in
1011       [\\/]* | ?:[\\/]* ) . $cache_file;;
1012       *)                      . ./$cache_file;;
1013     esac
1014   fi
1015 else
1016   { echo "$as_me:1016: creating cache $cache_file" >&5
1017 echo "$as_me: creating cache $cache_file" >&6;}
1018   >$cache_file
1019 fi
1020
1021 # Check that the precious variables saved in the cache have kept the same
1022 # value.
1023 ac_cache_corrupted=false
1024 for ac_var in `(set) 2>&1 |
1025                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1026   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1027   eval ac_new_set=\$ac_env_${ac_var}_set
1028   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1029   eval ac_new_val="\$ac_env_${ac_var}_value"
1030   case $ac_old_set,$ac_new_set in
1031     set,)
1032       { echo "$as_me:1032: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1033 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1034       ac_cache_corrupted=: ;;
1035     ,set)
1036       { echo "$as_me:1036: error: \`$ac_var' was not set in the previous run" >&5
1037 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1038       ac_cache_corrupted=: ;;
1039     ,);;
1040     *)
1041       if test "x$ac_old_val" != "x$ac_new_val"; then
1042         { echo "$as_me:1042: error: \`$ac_var' has changed since the previous run:" >&5
1043 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1044         { echo "$as_me:1044:   former value:  $ac_old_val" >&5
1045 echo "$as_me:   former value:  $ac_old_val" >&2;}
1046         { echo "$as_me:1046:   current value: $ac_new_val" >&5
1047 echo "$as_me:   current value: $ac_new_val" >&2;}
1048         ac_cache_corrupted=:
1049       fi;;
1050   esac
1051   # Pass precious variables to config.status.  It doesn't matter if
1052   # we pass some twice (in addition to the command line arguments).
1053   if test "$ac_new_set" = set; then
1054     case $ac_new_val in
1055     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1056       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1057       ac_configure_args="$ac_configure_args '$ac_arg'"
1058       ;;
1059     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1060        ;;
1061     esac
1062   fi
1063 done
1064 if $ac_cache_corrupted; then
1065   { echo "$as_me:1065: error: changes in the environment can compromise the build" >&5
1066 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1067   { { echo "$as_me:1067: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1068 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1069    { (exit 1); exit 1; }; }
1070 fi
1071
1072 ac_ext=c
1073 ac_cpp='$CPP $CPPFLAGS'
1074 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1075 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1076 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1077 ac_main_return=return
1078
1079 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1080   *c*,-n*) ECHO_N= ECHO_C='
1081 ' ECHO_T='      ' ;;
1082   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1083   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1084 esac
1085 echo "#! $SHELL" >conftest.sh
1086 echo  "exit 0"   >>conftest.sh
1087 chmod +x conftest.sh
1088 if { (echo "$as_me:1088: PATH=\".;.\"; conftest.sh") >&5
1089   (PATH=".;."; conftest.sh) 2>&5
1090   ac_status=$?
1091   echo "$as_me:1091: \$? = $ac_status" >&5
1092   (exit $ac_status); }; then
1093   ac_path_separator=';'
1094 else
1095   ac_path_separator=:
1096 fi
1097 PATH_SEPARATOR="$ac_path_separator"
1098 rm -f conftest.sh
1099
1100 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1101
1102 top_builddir=`pwd`
1103
1104 echo "$as_me:1104: checking for egrep" >&5
1105 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1106 if test "${ac_cv_prog_egrep+set}" = set; then
1107   echo $ECHO_N "(cached) $ECHO_C" >&6
1108 else
1109   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1110     then ac_cv_prog_egrep='grep -E'
1111     else ac_cv_prog_egrep='egrep'
1112     fi
1113 fi
1114 echo "$as_me:1114: result: $ac_cv_prog_egrep" >&5
1115 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1116  EGREP=$ac_cv_prog_egrep
1117
1118 test -z "$EGREP" && { { echo "$as_me:1118: error: No egrep program found" >&5
1119 echo "$as_me: error: No egrep program found" >&2;}
1120    { (exit 1); exit 1; }; }
1121
1122 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1123 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1124 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1125 cf_cv_abi_version=${NCURSES_MAJOR}
1126 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1127 cf_cv_timestamp=`date`
1128 echo "$as_me:1128: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1129 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1130
1131 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1132
1133 # Check whether --with-rel-version or --without-rel-version was given.
1134 if test "${with_rel_version+set}" = set; then
1135   withval="$with_rel_version"
1136   { echo "$as_me:1136: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1137 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1138  cf_cv_rel_version=$withval
1139 fi;
1140
1141  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1142  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1143
1144 if test -n "$NCURSES_MAJOR" ; then
1145   case $NCURSES_MAJOR in #(vi
1146   [0-9]*) #(vi
1147         ;;
1148   *)
1149         { { echo "$as_me:1149: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1150 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1151    { (exit 1); exit 1; }; }
1152         ;;
1153   esac
1154 else
1155   { { echo "$as_me:1155: error: Release major-version value is empty" >&5
1156 echo "$as_me: error: Release major-version value is empty" >&2;}
1157    { (exit 1); exit 1; }; }
1158 fi
1159
1160 if test -n "$NCURSES_MINOR" ; then
1161   case $NCURSES_MINOR in #(vi
1162   [0-9]*) #(vi
1163         ;;
1164   *)
1165         { { echo "$as_me:1165: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1166 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1167    { (exit 1); exit 1; }; }
1168         ;;
1169   esac
1170 else
1171   { { echo "$as_me:1171: error: Release minor-version value is empty" >&5
1172 echo "$as_me: error: Release minor-version value is empty" >&2;}
1173    { (exit 1); exit 1; }; }
1174 fi
1175
1176 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1177
1178 # Check whether --with-abi-version or --without-abi-version was given.
1179 if test "${with_abi_version+set}" = set; then
1180   withval="$with_abi_version"
1181   { echo "$as_me:1181: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1182 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1183  cf_cv_abi_version=$withval
1184 fi;
1185
1186 if test -n "$cf_cv_abi_version" ; then
1187   case $cf_cv_abi_version in #(vi
1188   [0-9]*) #(vi
1189         ;;
1190   *)
1191         { { echo "$as_me:1191: error: ABI version is not a number: $cf_cv_abi_version" >&5
1192 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1193    { (exit 1); exit 1; }; }
1194         ;;
1195   esac
1196 else
1197   { { echo "$as_me:1197: error: ABI version value is empty" >&5
1198 echo "$as_me: error: ABI version value is empty" >&2;}
1199    { (exit 1); exit 1; }; }
1200 fi
1201
1202 ac_aux_dir=
1203 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1204   if test -f $ac_dir/install-sh; then
1205     ac_aux_dir=$ac_dir
1206     ac_install_sh="$ac_aux_dir/install-sh -c"
1207     break
1208   elif test -f $ac_dir/install.sh; then
1209     ac_aux_dir=$ac_dir
1210     ac_install_sh="$ac_aux_dir/install.sh -c"
1211     break
1212   elif test -f $ac_dir/shtool; then
1213     ac_aux_dir=$ac_dir
1214     ac_install_sh="$ac_aux_dir/shtool install -c"
1215     break
1216   fi
1217 done
1218 if test -z "$ac_aux_dir"; then
1219   { { echo "$as_me:1219: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1220 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1221    { (exit 1); exit 1; }; }
1222 fi
1223 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1224 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1225 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1226
1227 # Make sure we can run config.sub.
1228 $ac_config_sub sun4 >/dev/null 2>&1 ||
1229   { { echo "$as_me:1229: error: cannot run $ac_config_sub" >&5
1230 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1231    { (exit 1); exit 1; }; }
1232
1233 echo "$as_me:1233: checking build system type" >&5
1234 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1235 if test "${ac_cv_build+set}" = set; then
1236   echo $ECHO_N "(cached) $ECHO_C" >&6
1237 else
1238   ac_cv_build_alias=$build_alias
1239 test -z "$ac_cv_build_alias" &&
1240   ac_cv_build_alias=`$ac_config_guess`
1241 test -z "$ac_cv_build_alias" &&
1242   { { echo "$as_me:1242: error: cannot guess build type; you must specify one" >&5
1243 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1244    { (exit 1); exit 1; }; }
1245 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1246   { { echo "$as_me:1246: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1247 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1248    { (exit 1); exit 1; }; }
1249
1250 fi
1251 echo "$as_me:1251: result: $ac_cv_build" >&5
1252 echo "${ECHO_T}$ac_cv_build" >&6
1253 build=$ac_cv_build
1254 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1255 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1256 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1257
1258 echo "$as_me:1258: checking host system type" >&5
1259 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1260 if test "${ac_cv_host+set}" = set; then
1261   echo $ECHO_N "(cached) $ECHO_C" >&6
1262 else
1263   ac_cv_host_alias=$host_alias
1264 test -z "$ac_cv_host_alias" &&
1265   ac_cv_host_alias=$ac_cv_build_alias
1266 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1267   { { echo "$as_me:1267: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1268 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1269    { (exit 1); exit 1; }; }
1270
1271 fi
1272 echo "$as_me:1272: result: $ac_cv_host" >&5
1273 echo "${ECHO_T}$ac_cv_host" >&6
1274 host=$ac_cv_host
1275 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1276 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1277 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1278
1279 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1280         echo "$as_me:1280: checking target system type" >&5
1281 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1282 if test "${ac_cv_target+set}" = set; then
1283   echo $ECHO_N "(cached) $ECHO_C" >&6
1284 else
1285   ac_cv_target_alias=$target_alias
1286 test "x$ac_cv_target_alias" = "x" &&
1287   ac_cv_target_alias=$ac_cv_host_alias
1288 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1289   { { echo "$as_me:1289: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1290 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1291    { (exit 1); exit 1; }; }
1292
1293 fi
1294 echo "$as_me:1294: result: $ac_cv_target" >&5
1295 echo "${ECHO_T}$ac_cv_target" >&6
1296 target=$ac_cv_target
1297 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1298 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1299 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1300
1301 # The aliases save the names the user supplied, while $host etc.
1302 # will get canonicalized.
1303 test -n "$target_alias" &&
1304   test "$program_prefix$program_suffix$program_transform_name" = \
1305     NONENONEs,x,x, &&
1306   program_prefix=${target_alias}-
1307         system_name="$host_os"
1308 else
1309         system_name="`(uname -s -r) 2>/dev/null`"
1310         if test -z "$system_name" ; then
1311                 system_name="`(hostname) 2>/dev/null`"
1312         fi
1313 fi
1314 test -n "$system_name" && cat >>confdefs.h <<EOF
1315 #define SYSTEM_NAME "$system_name"
1316 EOF
1317
1318 if test "${cf_cv_system_name+set}" = set; then
1319   echo $ECHO_N "(cached) $ECHO_C" >&6
1320 else
1321   cf_cv_system_name="$system_name"
1322 fi
1323
1324 test -z "$system_name" && system_name="$cf_cv_system_name"
1325 test -n "$cf_cv_system_name" && echo "$as_me:1325: result: Configuring for $cf_cv_system_name" >&5
1326 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1327
1328 if test ".$system_name" != ".$cf_cv_system_name" ; then
1329         echo "$as_me:1329: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1330 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1331         { { echo "$as_me:1331: error: \"Please remove config.cache and try again.\"" >&5
1332 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1333    { (exit 1); exit 1; }; }
1334 fi
1335
1336 # Check whether --with-system-type or --without-system-type was given.
1337 if test "${with_system_type+set}" = set; then
1338   withval="$with_system_type"
1339   { echo "$as_me:1339: WARNING: overriding system type to $withval" >&5
1340 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1341  cf_cv_system_name=$withval
1342 fi;
1343
1344 ###     Save the given $CFLAGS to allow user-override.
1345 cf_user_CFLAGS="$CFLAGS"
1346
1347 ###     Default install-location
1348
1349 echo "$as_me:1349: checking for prefix" >&5
1350 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1351 if test "x$prefix" = "xNONE" ; then
1352         case "$cf_cv_system_name" in
1353                 # non-vendor systems don't have a conflict
1354         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1355                 prefix=/usr
1356                 ;;
1357         *)      prefix=$ac_default_prefix
1358                 ;;
1359         esac
1360 fi
1361 echo "$as_me:1361: result: $prefix" >&5
1362 echo "${ECHO_T}$prefix" >&6
1363
1364 if test "x$prefix" = "xNONE" ; then
1365 echo "$as_me:1365: checking for default include-directory" >&5
1366 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1367 test -n "$verbose" && echo 1>&6
1368 for cf_symbol in \
1369         $includedir \
1370         $includedir/ncurses \
1371         $prefix/include \
1372         $prefix/include/ncurses \
1373         /usr/local/include \
1374         /usr/local/include/ncurses \
1375         /usr/include \
1376         /usr/include/ncurses
1377 do
1378         cf_dir=`eval echo $cf_symbol`
1379         if test -f $cf_dir/curses.h ; then
1380         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1381                 includedir="$cf_symbol"
1382                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1383                 break
1384         fi
1385         fi
1386         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1387 done
1388 echo "$as_me:1388: result: $includedir" >&5
1389 echo "${ECHO_T}$includedir" >&6
1390 fi
1391
1392 ###     Checks for programs.
1393 ac_ext=c
1394 ac_cpp='$CPP $CPPFLAGS'
1395 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1396 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1397 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1398 ac_main_return=return
1399 if test -n "$ac_tool_prefix"; then
1400   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1401 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1402 echo "$as_me:1402: checking for $ac_word" >&5
1403 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1404 if test "${ac_cv_prog_CC+set}" = set; then
1405   echo $ECHO_N "(cached) $ECHO_C" >&6
1406 else
1407   if test -n "$CC"; then
1408   ac_cv_prog_CC="$CC" # Let the user override the test.
1409 else
1410   ac_save_IFS=$IFS; IFS=$ac_path_separator
1411 ac_dummy="$PATH"
1412 for ac_dir in $ac_dummy; do
1413   IFS=$ac_save_IFS
1414   test -z "$ac_dir" && ac_dir=.
1415   $as_executable_p "$ac_dir/$ac_word" || continue
1416 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1417 echo "$as_me:1417: found $ac_dir/$ac_word" >&5
1418 break
1419 done
1420
1421 fi
1422 fi
1423 CC=$ac_cv_prog_CC
1424 if test -n "$CC"; then
1425   echo "$as_me:1425: result: $CC" >&5
1426 echo "${ECHO_T}$CC" >&6
1427 else
1428   echo "$as_me:1428: result: no" >&5
1429 echo "${ECHO_T}no" >&6
1430 fi
1431
1432 fi
1433 if test -z "$ac_cv_prog_CC"; then
1434   ac_ct_CC=$CC
1435   # Extract the first word of "gcc", so it can be a program name with args.
1436 set dummy gcc; ac_word=$2
1437 echo "$as_me:1437: checking for $ac_word" >&5
1438 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1439 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1440   echo $ECHO_N "(cached) $ECHO_C" >&6
1441 else
1442   if test -n "$ac_ct_CC"; then
1443   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1444 else
1445   ac_save_IFS=$IFS; IFS=$ac_path_separator
1446 ac_dummy="$PATH"
1447 for ac_dir in $ac_dummy; do
1448   IFS=$ac_save_IFS
1449   test -z "$ac_dir" && ac_dir=.
1450   $as_executable_p "$ac_dir/$ac_word" || continue
1451 ac_cv_prog_ac_ct_CC="gcc"
1452 echo "$as_me:1452: found $ac_dir/$ac_word" >&5
1453 break
1454 done
1455
1456 fi
1457 fi
1458 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1459 if test -n "$ac_ct_CC"; then
1460   echo "$as_me:1460: result: $ac_ct_CC" >&5
1461 echo "${ECHO_T}$ac_ct_CC" >&6
1462 else
1463   echo "$as_me:1463: result: no" >&5
1464 echo "${ECHO_T}no" >&6
1465 fi
1466
1467   CC=$ac_ct_CC
1468 else
1469   CC="$ac_cv_prog_CC"
1470 fi
1471
1472 if test -z "$CC"; then
1473   if test -n "$ac_tool_prefix"; then
1474   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1475 set dummy ${ac_tool_prefix}cc; ac_word=$2
1476 echo "$as_me:1476: checking for $ac_word" >&5
1477 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1478 if test "${ac_cv_prog_CC+set}" = set; then
1479   echo $ECHO_N "(cached) $ECHO_C" >&6
1480 else
1481   if test -n "$CC"; then
1482   ac_cv_prog_CC="$CC" # Let the user override the test.
1483 else
1484   ac_save_IFS=$IFS; IFS=$ac_path_separator
1485 ac_dummy="$PATH"
1486 for ac_dir in $ac_dummy; do
1487   IFS=$ac_save_IFS
1488   test -z "$ac_dir" && ac_dir=.
1489   $as_executable_p "$ac_dir/$ac_word" || continue
1490 ac_cv_prog_CC="${ac_tool_prefix}cc"
1491 echo "$as_me:1491: found $ac_dir/$ac_word" >&5
1492 break
1493 done
1494
1495 fi
1496 fi
1497 CC=$ac_cv_prog_CC
1498 if test -n "$CC"; then
1499   echo "$as_me:1499: result: $CC" >&5
1500 echo "${ECHO_T}$CC" >&6
1501 else
1502   echo "$as_me:1502: result: no" >&5
1503 echo "${ECHO_T}no" >&6
1504 fi
1505
1506 fi
1507 if test -z "$ac_cv_prog_CC"; then
1508   ac_ct_CC=$CC
1509   # Extract the first word of "cc", so it can be a program name with args.
1510 set dummy cc; ac_word=$2
1511 echo "$as_me:1511: checking for $ac_word" >&5
1512 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1513 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1514   echo $ECHO_N "(cached) $ECHO_C" >&6
1515 else
1516   if test -n "$ac_ct_CC"; then
1517   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1518 else
1519   ac_save_IFS=$IFS; IFS=$ac_path_separator
1520 ac_dummy="$PATH"
1521 for ac_dir in $ac_dummy; do
1522   IFS=$ac_save_IFS
1523   test -z "$ac_dir" && ac_dir=.
1524   $as_executable_p "$ac_dir/$ac_word" || continue
1525 ac_cv_prog_ac_ct_CC="cc"
1526 echo "$as_me:1526: found $ac_dir/$ac_word" >&5
1527 break
1528 done
1529
1530 fi
1531 fi
1532 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1533 if test -n "$ac_ct_CC"; then
1534   echo "$as_me:1534: result: $ac_ct_CC" >&5
1535 echo "${ECHO_T}$ac_ct_CC" >&6
1536 else
1537   echo "$as_me:1537: result: no" >&5
1538 echo "${ECHO_T}no" >&6
1539 fi
1540
1541   CC=$ac_ct_CC
1542 else
1543   CC="$ac_cv_prog_CC"
1544 fi
1545
1546 fi
1547 if test -z "$CC"; then
1548   # Extract the first word of "cc", so it can be a program name with args.
1549 set dummy cc; ac_word=$2
1550 echo "$as_me:1550: checking for $ac_word" >&5
1551 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1552 if test "${ac_cv_prog_CC+set}" = set; then
1553   echo $ECHO_N "(cached) $ECHO_C" >&6
1554 else
1555   if test -n "$CC"; then
1556   ac_cv_prog_CC="$CC" # Let the user override the test.
1557 else
1558   ac_prog_rejected=no
1559   ac_save_IFS=$IFS; IFS=$ac_path_separator
1560 ac_dummy="$PATH"
1561 for ac_dir in $ac_dummy; do
1562   IFS=$ac_save_IFS
1563   test -z "$ac_dir" && ac_dir=.
1564   $as_executable_p "$ac_dir/$ac_word" || continue
1565 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1566   ac_prog_rejected=yes
1567   continue
1568 fi
1569 ac_cv_prog_CC="cc"
1570 echo "$as_me:1570: found $ac_dir/$ac_word" >&5
1571 break
1572 done
1573
1574 if test $ac_prog_rejected = yes; then
1575   # We found a bogon in the path, so make sure we never use it.
1576   set dummy $ac_cv_prog_CC
1577   shift
1578   if test $# != 0; then
1579     # We chose a different compiler from the bogus one.
1580     # However, it has the same basename, so the bogon will be chosen
1581     # first if we set CC to just the basename; use the full file name.
1582     shift
1583     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1584     shift
1585     ac_cv_prog_CC="$@"
1586   fi
1587 fi
1588 fi
1589 fi
1590 CC=$ac_cv_prog_CC
1591 if test -n "$CC"; then
1592   echo "$as_me:1592: result: $CC" >&5
1593 echo "${ECHO_T}$CC" >&6
1594 else
1595   echo "$as_me:1595: result: no" >&5
1596 echo "${ECHO_T}no" >&6
1597 fi
1598
1599 fi
1600 if test -z "$CC"; then
1601   if test -n "$ac_tool_prefix"; then
1602   for ac_prog in cl
1603   do
1604     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1605 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1606 echo "$as_me:1606: checking for $ac_word" >&5
1607 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1608 if test "${ac_cv_prog_CC+set}" = set; then
1609   echo $ECHO_N "(cached) $ECHO_C" >&6
1610 else
1611   if test -n "$CC"; then
1612   ac_cv_prog_CC="$CC" # Let the user override the test.
1613 else
1614   ac_save_IFS=$IFS; IFS=$ac_path_separator
1615 ac_dummy="$PATH"
1616 for ac_dir in $ac_dummy; do
1617   IFS=$ac_save_IFS
1618   test -z "$ac_dir" && ac_dir=.
1619   $as_executable_p "$ac_dir/$ac_word" || continue
1620 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1621 echo "$as_me:1621: found $ac_dir/$ac_word" >&5
1622 break
1623 done
1624
1625 fi
1626 fi
1627 CC=$ac_cv_prog_CC
1628 if test -n "$CC"; then
1629   echo "$as_me:1629: result: $CC" >&5
1630 echo "${ECHO_T}$CC" >&6
1631 else
1632   echo "$as_me:1632: result: no" >&5
1633 echo "${ECHO_T}no" >&6
1634 fi
1635
1636     test -n "$CC" && break
1637   done
1638 fi
1639 if test -z "$CC"; then
1640   ac_ct_CC=$CC
1641   for ac_prog in cl
1642 do
1643   # Extract the first word of "$ac_prog", so it can be a program name with args.
1644 set dummy $ac_prog; ac_word=$2
1645 echo "$as_me:1645: checking for $ac_word" >&5
1646 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1647 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1648   echo $ECHO_N "(cached) $ECHO_C" >&6
1649 else
1650   if test -n "$ac_ct_CC"; then
1651   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1652 else
1653   ac_save_IFS=$IFS; IFS=$ac_path_separator
1654 ac_dummy="$PATH"
1655 for ac_dir in $ac_dummy; do
1656   IFS=$ac_save_IFS
1657   test -z "$ac_dir" && ac_dir=.
1658   $as_executable_p "$ac_dir/$ac_word" || continue
1659 ac_cv_prog_ac_ct_CC="$ac_prog"
1660 echo "$as_me:1660: found $ac_dir/$ac_word" >&5
1661 break
1662 done
1663
1664 fi
1665 fi
1666 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1667 if test -n "$ac_ct_CC"; then
1668   echo "$as_me:1668: result: $ac_ct_CC" >&5
1669 echo "${ECHO_T}$ac_ct_CC" >&6
1670 else
1671   echo "$as_me:1671: result: no" >&5
1672 echo "${ECHO_T}no" >&6
1673 fi
1674
1675   test -n "$ac_ct_CC" && break
1676 done
1677
1678   CC=$ac_ct_CC
1679 fi
1680
1681 fi
1682
1683 test -z "$CC" && { { echo "$as_me:1683: error: no acceptable cc found in \$PATH" >&5
1684 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1685    { (exit 1); exit 1; }; }
1686
1687 # Provide some information about the compiler.
1688 echo "$as_me:1688:" \
1689      "checking for C compiler version" >&5
1690 ac_compiler=`set X $ac_compile; echo $2`
1691 { (eval echo "$as_me:1691: \"$ac_compiler --version </dev/null >&5\"") >&5
1692   (eval $ac_compiler --version </dev/null >&5) 2>&5
1693   ac_status=$?
1694   echo "$as_me:1694: \$? = $ac_status" >&5
1695   (exit $ac_status); }
1696 { (eval echo "$as_me:1696: \"$ac_compiler -v </dev/null >&5\"") >&5
1697   (eval $ac_compiler -v </dev/null >&5) 2>&5
1698   ac_status=$?
1699   echo "$as_me:1699: \$? = $ac_status" >&5
1700   (exit $ac_status); }
1701 { (eval echo "$as_me:1701: \"$ac_compiler -V </dev/null >&5\"") >&5
1702   (eval $ac_compiler -V </dev/null >&5) 2>&5
1703   ac_status=$?
1704   echo "$as_me:1704: \$? = $ac_status" >&5
1705   (exit $ac_status); }
1706
1707 cat >conftest.$ac_ext <<_ACEOF
1708 #line 1708 "configure"
1709 #include "confdefs.h"
1710
1711 int
1712 main ()
1713 {
1714
1715   ;
1716   return 0;
1717 }
1718 _ACEOF
1719 ac_clean_files_save=$ac_clean_files
1720 ac_clean_files="$ac_clean_files a.out a.exe"
1721 # Try to create an executable without -o first, disregard a.out.
1722 # It will help us diagnose broken compilers, and finding out an intuition
1723 # of exeext.
1724 echo "$as_me:1724: checking for C compiler default output" >&5
1725 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1726 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1727 if { (eval echo "$as_me:1727: \"$ac_link_default\"") >&5
1728   (eval $ac_link_default) 2>&5
1729   ac_status=$?
1730   echo "$as_me:1730: \$? = $ac_status" >&5
1731   (exit $ac_status); }; then
1732   # Find the output, starting from the most likely.  This scheme is
1733 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1734 # resort.
1735 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1736                 ls a.out conftest 2>/dev/null;
1737                 ls a.* conftest.* 2>/dev/null`; do
1738   case $ac_file in
1739     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1740     a.out ) # We found the default executable, but exeext='' is most
1741             # certainly right.
1742             break;;
1743     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1744           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1745           export ac_cv_exeext
1746           break;;
1747     * ) break;;
1748   esac
1749 done
1750 else
1751   echo "$as_me: failed program was:" >&5
1752 cat conftest.$ac_ext >&5
1753 { { echo "$as_me:1753: error: C compiler cannot create executables" >&5
1754 echo "$as_me: error: C compiler cannot create executables" >&2;}
1755    { (exit 77); exit 77; }; }
1756 fi
1757
1758 ac_exeext=$ac_cv_exeext
1759 echo "$as_me:1759: result: $ac_file" >&5
1760 echo "${ECHO_T}$ac_file" >&6
1761
1762 # Check the compiler produces executables we can run.  If not, either
1763 # the compiler is broken, or we cross compile.
1764 echo "$as_me:1764: checking whether the C compiler works" >&5
1765 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1766 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1767 # If not cross compiling, check that we can run a simple program.
1768 if test "$cross_compiling" != yes; then
1769   if { ac_try='./$ac_file'
1770   { (eval echo "$as_me:1770: \"$ac_try\"") >&5
1771   (eval $ac_try) 2>&5
1772   ac_status=$?
1773   echo "$as_me:1773: \$? = $ac_status" >&5
1774   (exit $ac_status); }; }; then
1775     cross_compiling=no
1776   else
1777     if test "$cross_compiling" = maybe; then
1778         cross_compiling=yes
1779     else
1780         { { echo "$as_me:1780: error: cannot run C compiled programs.
1781 If you meant to cross compile, use \`--host'." >&5
1782 echo "$as_me: error: cannot run C compiled programs.
1783 If you meant to cross compile, use \`--host'." >&2;}
1784    { (exit 1); exit 1; }; }
1785     fi
1786   fi
1787 fi
1788 echo "$as_me:1788: result: yes" >&5
1789 echo "${ECHO_T}yes" >&6
1790
1791 rm -f a.out a.exe conftest$ac_cv_exeext
1792 ac_clean_files=$ac_clean_files_save
1793 # Check the compiler produces executables we can run.  If not, either
1794 # the compiler is broken, or we cross compile.
1795 echo "$as_me:1795: checking whether we are cross compiling" >&5
1796 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1797 echo "$as_me:1797: result: $cross_compiling" >&5
1798 echo "${ECHO_T}$cross_compiling" >&6
1799
1800 echo "$as_me:1800: checking for executable suffix" >&5
1801 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1802 if { (eval echo "$as_me:1802: \"$ac_link\"") >&5
1803   (eval $ac_link) 2>&5
1804   ac_status=$?
1805   echo "$as_me:1805: \$? = $ac_status" >&5
1806   (exit $ac_status); }; then
1807   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1808 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1809 # work properly (i.e., refer to `conftest.exe'), while it won't with
1810 # `rm'.
1811 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1812   case $ac_file in
1813     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1814     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1815           export ac_cv_exeext
1816           break;;
1817     * ) break;;
1818   esac
1819 done
1820 else
1821   { { echo "$as_me:1821: error: cannot compute EXEEXT: cannot compile and link" >&5
1822 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1823    { (exit 1); exit 1; }; }
1824 fi
1825
1826 rm -f conftest$ac_cv_exeext
1827 echo "$as_me:1827: result: $ac_cv_exeext" >&5
1828 echo "${ECHO_T}$ac_cv_exeext" >&6
1829
1830 rm -f conftest.$ac_ext
1831 EXEEXT=$ac_cv_exeext
1832 ac_exeext=$EXEEXT
1833 echo "$as_me:1833: checking for object suffix" >&5
1834 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1835 if test "${ac_cv_objext+set}" = set; then
1836   echo $ECHO_N "(cached) $ECHO_C" >&6
1837 else
1838   cat >conftest.$ac_ext <<_ACEOF
1839 #line 1839 "configure"
1840 #include "confdefs.h"
1841
1842 int
1843 main ()
1844 {
1845
1846   ;
1847   return 0;
1848 }
1849 _ACEOF
1850 rm -f conftest.o conftest.obj
1851 if { (eval echo "$as_me:1851: \"$ac_compile\"") >&5
1852   (eval $ac_compile) 2>&5
1853   ac_status=$?
1854   echo "$as_me:1854: \$? = $ac_status" >&5
1855   (exit $ac_status); }; then
1856   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1857   case $ac_file in
1858     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
1859     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1860        break;;
1861   esac
1862 done
1863 else
1864   echo "$as_me: failed program was:" >&5
1865 cat conftest.$ac_ext >&5
1866 { { echo "$as_me:1866: error: cannot compute OBJEXT: cannot compile" >&5
1867 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1868    { (exit 1); exit 1; }; }
1869 fi
1870
1871 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1872 fi
1873 echo "$as_me:1873: result: $ac_cv_objext" >&5
1874 echo "${ECHO_T}$ac_cv_objext" >&6
1875 OBJEXT=$ac_cv_objext
1876 ac_objext=$OBJEXT
1877 echo "$as_me:1877: checking whether we are using the GNU C compiler" >&5
1878 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1879 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1880   echo $ECHO_N "(cached) $ECHO_C" >&6
1881 else
1882   cat >conftest.$ac_ext <<_ACEOF
1883 #line 1883 "configure"
1884 #include "confdefs.h"
1885
1886 int
1887 main ()
1888 {
1889 #ifndef __GNUC__
1890        choke me
1891 #endif
1892
1893   ;
1894   return 0;
1895 }
1896 _ACEOF
1897 rm -f conftest.$ac_objext
1898 if { (eval echo "$as_me:1898: \"$ac_compile\"") >&5
1899   (eval $ac_compile) 2>&5
1900   ac_status=$?
1901   echo "$as_me:1901: \$? = $ac_status" >&5
1902   (exit $ac_status); } &&
1903          { ac_try='test -s conftest.$ac_objext'
1904   { (eval echo "$as_me:1904: \"$ac_try\"") >&5
1905   (eval $ac_try) 2>&5
1906   ac_status=$?
1907   echo "$as_me:1907: \$? = $ac_status" >&5
1908   (exit $ac_status); }; }; then
1909   ac_compiler_gnu=yes
1910 else
1911   echo "$as_me: failed program was:" >&5
1912 cat conftest.$ac_ext >&5
1913 ac_compiler_gnu=no
1914 fi
1915 rm -f conftest.$ac_objext conftest.$ac_ext
1916 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1917
1918 fi
1919 echo "$as_me:1919: result: $ac_cv_c_compiler_gnu" >&5
1920 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1921 GCC=`test $ac_compiler_gnu = yes && echo yes`
1922 ac_test_CFLAGS=${CFLAGS+set}
1923 ac_save_CFLAGS=$CFLAGS
1924 CFLAGS="-g"
1925 echo "$as_me:1925: checking whether $CC accepts -g" >&5
1926 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1927 if test "${ac_cv_prog_cc_g+set}" = set; then
1928   echo $ECHO_N "(cached) $ECHO_C" >&6
1929 else
1930   cat >conftest.$ac_ext <<_ACEOF
1931 #line 1931 "configure"
1932 #include "confdefs.h"
1933
1934 int
1935 main ()
1936 {
1937
1938   ;
1939   return 0;
1940 }
1941 _ACEOF
1942 rm -f conftest.$ac_objext
1943 if { (eval echo "$as_me:1943: \"$ac_compile\"") >&5
1944   (eval $ac_compile) 2>&5
1945   ac_status=$?
1946   echo "$as_me:1946: \$? = $ac_status" >&5
1947   (exit $ac_status); } &&
1948          { ac_try='test -s conftest.$ac_objext'
1949   { (eval echo "$as_me:1949: \"$ac_try\"") >&5
1950   (eval $ac_try) 2>&5
1951   ac_status=$?
1952   echo "$as_me:1952: \$? = $ac_status" >&5
1953   (exit $ac_status); }; }; then
1954   ac_cv_prog_cc_g=yes
1955 else
1956   echo "$as_me: failed program was:" >&5
1957 cat conftest.$ac_ext >&5
1958 ac_cv_prog_cc_g=no
1959 fi
1960 rm -f conftest.$ac_objext conftest.$ac_ext
1961 fi
1962 echo "$as_me:1962: result: $ac_cv_prog_cc_g" >&5
1963 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1964 if test "$ac_test_CFLAGS" = set; then
1965   CFLAGS=$ac_save_CFLAGS
1966 elif test $ac_cv_prog_cc_g = yes; then
1967   if test "$GCC" = yes; then
1968     CFLAGS="-g -O2"
1969   else
1970     CFLAGS="-g"
1971   fi
1972 else
1973   if test "$GCC" = yes; then
1974     CFLAGS="-O2"
1975   else
1976     CFLAGS=
1977   fi
1978 fi
1979 # Some people use a C++ compiler to compile C.  Since we use `exit',
1980 # in C++ we need to declare it.  In case someone uses the same compiler
1981 # for both compiling C and C++ we need to have the C++ compiler decide
1982 # the declaration of exit, since it's the most demanding environment.
1983 cat >conftest.$ac_ext <<_ACEOF
1984 #ifndef __cplusplus
1985   choke me
1986 #endif
1987 _ACEOF
1988 rm -f conftest.$ac_objext
1989 if { (eval echo "$as_me:1989: \"$ac_compile\"") >&5
1990   (eval $ac_compile) 2>&5
1991   ac_status=$?
1992   echo "$as_me:1992: \$? = $ac_status" >&5
1993   (exit $ac_status); } &&
1994          { ac_try='test -s conftest.$ac_objext'
1995   { (eval echo "$as_me:1995: \"$ac_try\"") >&5
1996   (eval $ac_try) 2>&5
1997   ac_status=$?
1998   echo "$as_me:1998: \$? = $ac_status" >&5
1999   (exit $ac_status); }; }; then
2000   for ac_declaration in \
2001    ''\
2002    '#include <stdlib.h>' \
2003    'extern "C" void std::exit (int) throw (); using std::exit;' \
2004    'extern "C" void std::exit (int); using std::exit;' \
2005    'extern "C" void exit (int) throw ();' \
2006    'extern "C" void exit (int);' \
2007    'void exit (int);'
2008 do
2009   cat >conftest.$ac_ext <<_ACEOF
2010 #line 2010 "configure"
2011 #include "confdefs.h"
2012 #include <stdlib.h>
2013 $ac_declaration
2014 int
2015 main ()
2016 {
2017 exit (42);
2018   ;
2019   return 0;
2020 }
2021 _ACEOF
2022 rm -f conftest.$ac_objext
2023 if { (eval echo "$as_me:2023: \"$ac_compile\"") >&5
2024   (eval $ac_compile) 2>&5
2025   ac_status=$?
2026   echo "$as_me:2026: \$? = $ac_status" >&5
2027   (exit $ac_status); } &&
2028          { ac_try='test -s conftest.$ac_objext'
2029   { (eval echo "$as_me:2029: \"$ac_try\"") >&5
2030   (eval $ac_try) 2>&5
2031   ac_status=$?
2032   echo "$as_me:2032: \$? = $ac_status" >&5
2033   (exit $ac_status); }; }; then
2034   :
2035 else
2036   echo "$as_me: failed program was:" >&5
2037 cat conftest.$ac_ext >&5
2038 continue
2039 fi
2040 rm -f conftest.$ac_objext conftest.$ac_ext
2041   cat >conftest.$ac_ext <<_ACEOF
2042 #line 2042 "configure"
2043 #include "confdefs.h"
2044 $ac_declaration
2045 int
2046 main ()
2047 {
2048 exit (42);
2049   ;
2050   return 0;
2051 }
2052 _ACEOF
2053 rm -f conftest.$ac_objext
2054 if { (eval echo "$as_me:2054: \"$ac_compile\"") >&5
2055   (eval $ac_compile) 2>&5
2056   ac_status=$?
2057   echo "$as_me:2057: \$? = $ac_status" >&5
2058   (exit $ac_status); } &&
2059          { ac_try='test -s conftest.$ac_objext'
2060   { (eval echo "$as_me:2060: \"$ac_try\"") >&5
2061   (eval $ac_try) 2>&5
2062   ac_status=$?
2063   echo "$as_me:2063: \$? = $ac_status" >&5
2064   (exit $ac_status); }; }; then
2065   break
2066 else
2067   echo "$as_me: failed program was:" >&5
2068 cat conftest.$ac_ext >&5
2069 fi
2070 rm -f conftest.$ac_objext conftest.$ac_ext
2071 done
2072 rm -f conftest*
2073 if test -n "$ac_declaration"; then
2074   echo '#ifdef __cplusplus' >>confdefs.h
2075   echo $ac_declaration      >>confdefs.h
2076   echo '#endif'             >>confdefs.h
2077 fi
2078
2079 else
2080   echo "$as_me: failed program was:" >&5
2081 cat conftest.$ac_ext >&5
2082 fi
2083 rm -f conftest.$ac_objext conftest.$ac_ext
2084 ac_ext=c
2085 ac_cpp='$CPP $CPPFLAGS'
2086 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2087 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2088 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2089 ac_main_return=return
2090
2091 GCC_VERSION=none
2092 if test "$GCC" = yes ; then
2093         echo "$as_me:2093: checking version of $CC" >&5
2094 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2095         GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2096         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2097         echo "$as_me:2097: result: $GCC_VERSION" >&5
2098 echo "${ECHO_T}$GCC_VERSION" >&6
2099 fi
2100
2101 ac_ext=c
2102 ac_cpp='$CPP $CPPFLAGS'
2103 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2104 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2105 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2106 ac_main_return=return
2107 echo "$as_me:2107: checking how to run the C preprocessor" >&5
2108 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2109 # On Suns, sometimes $CPP names a directory.
2110 if test -n "$CPP" && test -d "$CPP"; then
2111   CPP=
2112 fi
2113 if test -z "$CPP"; then
2114   if test "${ac_cv_prog_CPP+set}" = set; then
2115   echo $ECHO_N "(cached) $ECHO_C" >&6
2116 else
2117       # Double quotes because CPP needs to be expanded
2118     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2119     do
2120       ac_preproc_ok=false
2121 for ac_c_preproc_warn_flag in '' yes
2122 do
2123   # Use a header file that comes with gcc, so configuring glibc
2124   # with a fresh cross-compiler works.
2125   # On the NeXT, cc -E runs the code through the compiler's parser,
2126   # not just through cpp. "Syntax error" is here to catch this case.
2127   cat >conftest.$ac_ext <<_ACEOF
2128 #line 2128 "configure"
2129 #include "confdefs.h"
2130 #include <assert.h>
2131                      Syntax error
2132 _ACEOF
2133 if { (eval echo "$as_me:2133: \"$ac_cpp conftest.$ac_ext\"") >&5
2134   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2135   ac_status=$?
2136   egrep -v '^ *\+' conftest.er1 >conftest.err
2137   rm -f conftest.er1
2138   cat conftest.err >&5
2139   echo "$as_me:2139: \$? = $ac_status" >&5
2140   (exit $ac_status); } >/dev/null; then
2141   if test -s conftest.err; then
2142     ac_cpp_err=$ac_c_preproc_warn_flag
2143   else
2144     ac_cpp_err=
2145   fi
2146 else
2147   ac_cpp_err=yes
2148 fi
2149 if test -z "$ac_cpp_err"; then
2150   :
2151 else
2152   echo "$as_me: failed program was:" >&5
2153   cat conftest.$ac_ext >&5
2154   # Broken: fails on valid input.
2155 continue
2156 fi
2157 rm -f conftest.err conftest.$ac_ext
2158
2159   # OK, works on sane cases.  Now check whether non-existent headers
2160   # can be detected and how.
2161   cat >conftest.$ac_ext <<_ACEOF
2162 #line 2162 "configure"
2163 #include "confdefs.h"
2164 #include <ac_nonexistent.h>
2165 _ACEOF
2166 if { (eval echo "$as_me:2166: \"$ac_cpp conftest.$ac_ext\"") >&5
2167   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2168   ac_status=$?
2169   egrep -v '^ *\+' conftest.er1 >conftest.err
2170   rm -f conftest.er1
2171   cat conftest.err >&5
2172   echo "$as_me:2172: \$? = $ac_status" >&5
2173   (exit $ac_status); } >/dev/null; then
2174   if test -s conftest.err; then
2175     ac_cpp_err=$ac_c_preproc_warn_flag
2176   else
2177     ac_cpp_err=
2178   fi
2179 else
2180   ac_cpp_err=yes
2181 fi
2182 if test -z "$ac_cpp_err"; then
2183   # Broken: success on invalid input.
2184 continue
2185 else
2186   echo "$as_me: failed program was:" >&5
2187   cat conftest.$ac_ext >&5
2188   # Passes both tests.
2189 ac_preproc_ok=:
2190 break
2191 fi
2192 rm -f conftest.err conftest.$ac_ext
2193
2194 done
2195 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2196 rm -f conftest.err conftest.$ac_ext
2197 if $ac_preproc_ok; then
2198   break
2199 fi
2200
2201     done
2202     ac_cv_prog_CPP=$CPP
2203
2204 fi
2205   CPP=$ac_cv_prog_CPP
2206 else
2207   ac_cv_prog_CPP=$CPP
2208 fi
2209 echo "$as_me:2209: result: $CPP" >&5
2210 echo "${ECHO_T}$CPP" >&6
2211 ac_preproc_ok=false
2212 for ac_c_preproc_warn_flag in '' yes
2213 do
2214   # Use a header file that comes with gcc, so configuring glibc
2215   # with a fresh cross-compiler works.
2216   # On the NeXT, cc -E runs the code through the compiler's parser,
2217   # not just through cpp. "Syntax error" is here to catch this case.
2218   cat >conftest.$ac_ext <<_ACEOF
2219 #line 2219 "configure"
2220 #include "confdefs.h"
2221 #include <assert.h>
2222                      Syntax error
2223 _ACEOF
2224 if { (eval echo "$as_me:2224: \"$ac_cpp conftest.$ac_ext\"") >&5
2225   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2226   ac_status=$?
2227   egrep -v '^ *\+' conftest.er1 >conftest.err
2228   rm -f conftest.er1
2229   cat conftest.err >&5
2230   echo "$as_me:2230: \$? = $ac_status" >&5
2231   (exit $ac_status); } >/dev/null; then
2232   if test -s conftest.err; then
2233     ac_cpp_err=$ac_c_preproc_warn_flag
2234   else
2235     ac_cpp_err=
2236   fi
2237 else
2238   ac_cpp_err=yes
2239 fi
2240 if test -z "$ac_cpp_err"; then
2241   :
2242 else
2243   echo "$as_me: failed program was:" >&5
2244   cat conftest.$ac_ext >&5
2245   # Broken: fails on valid input.
2246 continue
2247 fi
2248 rm -f conftest.err conftest.$ac_ext
2249
2250   # OK, works on sane cases.  Now check whether non-existent headers
2251   # can be detected and how.
2252   cat >conftest.$ac_ext <<_ACEOF
2253 #line 2253 "configure"
2254 #include "confdefs.h"
2255 #include <ac_nonexistent.h>
2256 _ACEOF
2257 if { (eval echo "$as_me:2257: \"$ac_cpp conftest.$ac_ext\"") >&5
2258   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2259   ac_status=$?
2260   egrep -v '^ *\+' conftest.er1 >conftest.err
2261   rm -f conftest.er1
2262   cat conftest.err >&5
2263   echo "$as_me:2263: \$? = $ac_status" >&5
2264   (exit $ac_status); } >/dev/null; then
2265   if test -s conftest.err; then
2266     ac_cpp_err=$ac_c_preproc_warn_flag
2267   else
2268     ac_cpp_err=
2269   fi
2270 else
2271   ac_cpp_err=yes
2272 fi
2273 if test -z "$ac_cpp_err"; then
2274   # Broken: success on invalid input.
2275 continue
2276 else
2277   echo "$as_me: failed program was:" >&5
2278   cat conftest.$ac_ext >&5
2279   # Passes both tests.
2280 ac_preproc_ok=:
2281 break
2282 fi
2283 rm -f conftest.err conftest.$ac_ext
2284
2285 done
2286 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2287 rm -f conftest.err conftest.$ac_ext
2288 if $ac_preproc_ok; then
2289   :
2290 else
2291   { { echo "$as_me:2291: error: C preprocessor \"$CPP\" fails sanity check" >&5
2292 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2293    { (exit 1); exit 1; }; }
2294 fi
2295
2296 ac_ext=c
2297 ac_cpp='$CPP $CPPFLAGS'
2298 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2299 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2300 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2301 ac_main_return=return
2302
2303 if test $ac_cv_c_compiler_gnu = yes; then
2304     echo "$as_me:2304: checking whether $CC needs -traditional" >&5
2305 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2306 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2307   echo $ECHO_N "(cached) $ECHO_C" >&6
2308 else
2309     ac_pattern="Autoconf.*'x'"
2310   cat >conftest.$ac_ext <<_ACEOF
2311 #line 2311 "configure"
2312 #include "confdefs.h"
2313 #include <sgtty.h>
2314 int Autoconf = TIOCGETP;
2315 _ACEOF
2316 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2317   egrep "$ac_pattern" >/dev/null 2>&1; then
2318   ac_cv_prog_gcc_traditional=yes
2319 else
2320   ac_cv_prog_gcc_traditional=no
2321 fi
2322 rm -f conftest*
2323
2324   if test $ac_cv_prog_gcc_traditional = no; then
2325     cat >conftest.$ac_ext <<_ACEOF
2326 #line 2326 "configure"
2327 #include "confdefs.h"
2328 #include <termio.h>
2329 int Autoconf = TCGETA;
2330 _ACEOF
2331 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2332   egrep "$ac_pattern" >/dev/null 2>&1; then
2333   ac_cv_prog_gcc_traditional=yes
2334 fi
2335 rm -f conftest*
2336
2337   fi
2338 fi
2339 echo "$as_me:2339: result: $ac_cv_prog_gcc_traditional" >&5
2340 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2341   if test $ac_cv_prog_gcc_traditional = yes; then
2342     CC="$CC -traditional"
2343   fi
2344 fi
2345
2346 echo "$as_me:2346: checking whether $CC understands -c and -o together" >&5
2347 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2348 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2349   echo $ECHO_N "(cached) $ECHO_C" >&6
2350 else
2351
2352 cat > conftest.$ac_ext <<CF_EOF
2353 #include <stdio.h>
2354 int main()
2355 {
2356         ${cf_cv_main_return:-return}(0);
2357 }
2358 CF_EOF
2359 # We do the test twice because some compilers refuse to overwrite an
2360 # existing .o file with -o, though they will create one.
2361 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2362 if { (eval echo "$as_me:2362: \"$ac_try\"") >&5
2363   (eval $ac_try) 2>&5
2364   ac_status=$?
2365   echo "$as_me:2365: \$? = $ac_status" >&5
2366   (exit $ac_status); } &&
2367   test -f conftest2.$ac_objext && { (eval echo "$as_me:2367: \"$ac_try\"") >&5
2368   (eval $ac_try) 2>&5
2369   ac_status=$?
2370   echo "$as_me:2370: \$? = $ac_status" >&5
2371   (exit $ac_status); };
2372 then
2373   eval cf_cv_prog_CC_c_o=yes
2374 else
2375   eval cf_cv_prog_CC_c_o=no
2376 fi
2377 rm -f conftest*
2378
2379 fi
2380 if test $cf_cv_prog_CC_c_o = yes; then
2381   echo "$as_me:2381: result: yes" >&5
2382 echo "${ECHO_T}yes" >&6
2383 else
2384   echo "$as_me:2384: result: no" >&5
2385 echo "${ECHO_T}no" >&6
2386 fi
2387
2388 echo "$as_me:2388: checking for POSIXized ISC" >&5
2389 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2390 if test -d /etc/conf/kconfig.d &&
2391    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2392 then
2393   echo "$as_me:2393: result: yes" >&5
2394 echo "${ECHO_T}yes" >&6
2395   ISC=yes # If later tests want to check for ISC.
2396
2397 cat >>confdefs.h <<\EOF
2398 #define _POSIX_SOURCE 1
2399 EOF
2400
2401   if test "$GCC" = yes; then
2402     CC="$CC -posix"
2403   else
2404     CC="$CC -Xp"
2405   fi
2406 else
2407   echo "$as_me:2407: result: no" >&5
2408 echo "${ECHO_T}no" >&6
2409   ISC=
2410 fi
2411
2412 echo "$as_me:2412: checking for ${CC-cc} option to accept ANSI C" >&5
2413 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2414 if test "${cf_cv_ansi_cc+set}" = set; then
2415   echo $ECHO_N "(cached) $ECHO_C" >&6
2416 else
2417
2418 cf_cv_ansi_cc=no
2419 cf_save_CFLAGS="$CFLAGS"
2420 cf_save_CPPFLAGS="$CPPFLAGS"
2421 # Don't try gcc -ansi; that turns off useful extensions and
2422 # breaks some systems' header files.
2423 # AIX                   -qlanglvl=ansi
2424 # Ultrix and OSF/1      -std1
2425 # HP-UX                 -Aa -D_HPUX_SOURCE
2426 # SVR4                  -Xc
2427 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2428 for cf_arg in "-DCC_HAS_PROTOS" \
2429         "" \
2430         -qlanglvl=ansi \
2431         -std1 \
2432         -Ae \
2433         "-Aa -D_HPUX_SOURCE" \
2434         -Xc
2435 do
2436
2437 cf_fix_cppflags=no
2438 cf_new_cflags=
2439 cf_new_cppflags=
2440 cf_new_extra_cppflags=
2441
2442 for cf_add_cflags in $cf_arg
2443 do
2444 case $cf_fix_cppflags in
2445 no)
2446         case $cf_add_cflags in #(vi
2447         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2448                 case $cf_add_cflags in
2449                 -D*)
2450                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2451
2452                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2453                         && test -z "${cf_tst_cflags}" \
2454                         && cf_fix_cppflags=yes
2455
2456                         if test $cf_fix_cppflags = yes ; then
2457                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2458                                 continue
2459                         elif test "${cf_tst_cflags}" = "\"'" ; then
2460                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2461                                 continue
2462                         fi
2463                         ;;
2464                 esac
2465                 case "$CPPFLAGS" in
2466                 *$cf_add_cflags) #(vi
2467                         ;;
2468                 *) #(vi
2469                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2470                         ;;
2471                 esac
2472                 ;;
2473         *)
2474                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2475                 ;;
2476         esac
2477         ;;
2478 yes)
2479         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2480
2481         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2482
2483         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2484         && test -z "${cf_tst_cflags}" \
2485         && cf_fix_cppflags=no
2486         ;;
2487 esac
2488 done
2489
2490 if test -n "$cf_new_cflags" ; then
2491
2492         CFLAGS="$CFLAGS $cf_new_cflags"
2493 fi
2494
2495 if test -n "$cf_new_cppflags" ; then
2496
2497         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2498 fi
2499
2500 if test -n "$cf_new_extra_cppflags" ; then
2501
2502         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2503 fi
2504
2505         cat >conftest.$ac_ext <<_ACEOF
2506 #line 2506 "configure"
2507 #include "confdefs.h"
2508
2509 #ifndef CC_HAS_PROTOS
2510 #if !defined(__STDC__) || (__STDC__ != 1)
2511 choke me
2512 #endif
2513 #endif
2514
2515 int
2516 main ()
2517 {
2518
2519         int test (int i, double x);
2520         struct s1 {int (*f) (int a);};
2521         struct s2 {int (*f) (double a);};
2522   ;
2523   return 0;
2524 }
2525 _ACEOF
2526 rm -f conftest.$ac_objext
2527 if { (eval echo "$as_me:2527: \"$ac_compile\"") >&5
2528   (eval $ac_compile) 2>&5
2529   ac_status=$?
2530   echo "$as_me:2530: \$? = $ac_status" >&5
2531   (exit $ac_status); } &&
2532          { ac_try='test -s conftest.$ac_objext'
2533   { (eval echo "$as_me:2533: \"$ac_try\"") >&5
2534   (eval $ac_try) 2>&5
2535   ac_status=$?
2536   echo "$as_me:2536: \$? = $ac_status" >&5
2537   (exit $ac_status); }; }; then
2538   cf_cv_ansi_cc="$cf_arg"; break
2539 else
2540   echo "$as_me: failed program was:" >&5
2541 cat conftest.$ac_ext >&5
2542 fi
2543 rm -f conftest.$ac_objext conftest.$ac_ext
2544 done
2545 CFLAGS="$cf_save_CFLAGS"
2546 CPPFLAGS="$cf_save_CPPFLAGS"
2547
2548 fi
2549 echo "$as_me:2549: result: $cf_cv_ansi_cc" >&5
2550 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2551
2552 if test "$cf_cv_ansi_cc" != "no"; then
2553 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2554
2555 cf_fix_cppflags=no
2556 cf_new_cflags=
2557 cf_new_cppflags=
2558 cf_new_extra_cppflags=
2559
2560 for cf_add_cflags in $cf_cv_ansi_cc
2561 do
2562 case $cf_fix_cppflags in
2563 no)
2564         case $cf_add_cflags in #(vi
2565         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2566                 case $cf_add_cflags in
2567                 -D*)
2568                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2569
2570                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2571                         && test -z "${cf_tst_cflags}" \
2572                         && cf_fix_cppflags=yes
2573
2574                         if test $cf_fix_cppflags = yes ; then
2575                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2576                                 continue
2577                         elif test "${cf_tst_cflags}" = "\"'" ; then
2578                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2579                                 continue
2580                         fi
2581                         ;;
2582                 esac
2583                 case "$CPPFLAGS" in
2584                 *$cf_add_cflags) #(vi
2585                         ;;
2586                 *) #(vi
2587                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2588                         ;;
2589                 esac
2590                 ;;
2591         *)
2592                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2593                 ;;
2594         esac
2595         ;;
2596 yes)
2597         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2598
2599         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2600
2601         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2602         && test -z "${cf_tst_cflags}" \
2603         && cf_fix_cppflags=no
2604         ;;
2605 esac
2606 done
2607
2608 if test -n "$cf_new_cflags" ; then
2609
2610         CFLAGS="$CFLAGS $cf_new_cflags"
2611 fi
2612
2613 if test -n "$cf_new_cppflags" ; then
2614
2615         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2616 fi
2617
2618 if test -n "$cf_new_extra_cppflags" ; then
2619
2620         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2621 fi
2622
2623 else
2624         cat >>confdefs.h <<\EOF
2625 #define CC_HAS_PROTOS 1
2626 EOF
2627
2628 fi
2629 fi
2630
2631 if test "$cf_cv_ansi_cc" = "no"; then
2632         { { echo "$as_me:2632: error: Your compiler does not appear to recognize prototypes.
2633 You have the following choices:
2634         a. adjust your compiler options
2635         b. get an up-to-date compiler
2636         c. use a wrapper such as unproto" >&5
2637 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2638 You have the following choices:
2639         a. adjust your compiler options
2640         b. get an up-to-date compiler
2641         c. use a wrapper such as unproto" >&2;}
2642    { (exit 1); exit 1; }; }
2643 fi
2644
2645 case $cf_cv_system_name in
2646 os2*)
2647     CFLAGS="$CFLAGS -Zmt"
2648     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2649     CXXFLAGS="$CXXFLAGS -Zmt"
2650     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2651     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2652     ac_cv_exeext=.exe
2653     ;;
2654 esac
2655
2656 PROG_EXT="$EXEEXT"
2657
2658 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2659 #define PROG_EXT "$PROG_EXT"
2660 EOF
2661
2662 if test "$cross_compiling" = yes ; then
2663   LDCONFIG=:
2664 else
2665 case "$cf_cv_system_name" in #(vi
2666 freebsd*) #(vi
2667   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2668   ;;
2669 *) LDPATH=$PATH:/sbin:/usr/sbin
2670   # Extract the first word of "ldconfig", so it can be a program name with args.
2671 set dummy ldconfig; ac_word=$2
2672 echo "$as_me:2672: checking for $ac_word" >&5
2673 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2674 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2675   echo $ECHO_N "(cached) $ECHO_C" >&6
2676 else
2677   case $LDCONFIG in
2678   [\\/]* | ?:[\\/]*)
2679   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2680   ;;
2681   *)
2682   ac_save_IFS=$IFS; IFS=$ac_path_separator
2683 ac_dummy="$LDPATH"
2684 for ac_dir in $ac_dummy; do
2685   IFS=$ac_save_IFS
2686   test -z "$ac_dir" && ac_dir=.
2687   if $as_executable_p "$ac_dir/$ac_word"; then
2688    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2689    echo "$as_me:2689: found $ac_dir/$ac_word" >&5
2690    break
2691 fi
2692 done
2693
2694   ;;
2695 esac
2696 fi
2697 LDCONFIG=$ac_cv_path_LDCONFIG
2698
2699 if test -n "$LDCONFIG"; then
2700   echo "$as_me:2700: result: $LDCONFIG" >&5
2701 echo "${ECHO_T}$LDCONFIG" >&6
2702 else
2703   echo "$as_me:2703: result: no" >&5
2704 echo "${ECHO_T}no" >&6
2705 fi
2706
2707   ;;
2708 esac
2709 fi
2710
2711 echo "$as_me:2711: checking if you want to ensure bool is consistent with C++" >&5
2712 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2713
2714 # Check whether --with-cxx or --without-cxx was given.
2715 if test "${with_cxx+set}" = set; then
2716   withval="$with_cxx"
2717   cf_with_cxx=$withval
2718 else
2719   cf_with_cxx=yes
2720 fi;
2721 echo "$as_me:2721: result: $cf_with_cxx" >&5
2722 echo "${ECHO_T}$cf_with_cxx" >&6
2723 if test "X$cf_with_cxx" = Xno ; then
2724         CXX=""
2725         GXX=""
2726 else
2727         # with autoconf 2.13, we can change the error to a warning:
2728                 ac_ext=cc
2729 ac_cpp='$CXXCPP $CPPFLAGS'
2730 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2731 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2732 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2733 ac_main_return=return
2734 if test -n "$ac_tool_prefix"; then
2735   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2736   do
2737     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2738 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2739 echo "$as_me:2739: checking for $ac_word" >&5
2740 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2741 if test "${ac_cv_prog_CXX+set}" = set; then
2742   echo $ECHO_N "(cached) $ECHO_C" >&6
2743 else
2744   if test -n "$CXX"; then
2745   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2746 else
2747   ac_save_IFS=$IFS; IFS=$ac_path_separator
2748 ac_dummy="$PATH"
2749 for ac_dir in $ac_dummy; do
2750   IFS=$ac_save_IFS
2751   test -z "$ac_dir" && ac_dir=.
2752   $as_executable_p "$ac_dir/$ac_word" || continue
2753 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2754 echo "$as_me:2754: found $ac_dir/$ac_word" >&5
2755 break
2756 done
2757
2758 fi
2759 fi
2760 CXX=$ac_cv_prog_CXX
2761 if test -n "$CXX"; then
2762   echo "$as_me:2762: result: $CXX" >&5
2763 echo "${ECHO_T}$CXX" >&6
2764 else
2765   echo "$as_me:2765: result: no" >&5
2766 echo "${ECHO_T}no" >&6
2767 fi
2768
2769     test -n "$CXX" && break
2770   done
2771 fi
2772 if test -z "$CXX"; then
2773   ac_ct_CXX=$CXX
2774   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2775 do
2776   # Extract the first word of "$ac_prog", so it can be a program name with args.
2777 set dummy $ac_prog; ac_word=$2
2778 echo "$as_me:2778: checking for $ac_word" >&5
2779 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2780 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2781   echo $ECHO_N "(cached) $ECHO_C" >&6
2782 else
2783   if test -n "$ac_ct_CXX"; then
2784   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2785 else
2786   ac_save_IFS=$IFS; IFS=$ac_path_separator
2787 ac_dummy="$PATH"
2788 for ac_dir in $ac_dummy; do
2789   IFS=$ac_save_IFS
2790   test -z "$ac_dir" && ac_dir=.
2791   $as_executable_p "$ac_dir/$ac_word" || continue
2792 ac_cv_prog_ac_ct_CXX="$ac_prog"
2793 echo "$as_me:2793: found $ac_dir/$ac_word" >&5
2794 break
2795 done
2796
2797 fi
2798 fi
2799 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2800 if test -n "$ac_ct_CXX"; then
2801   echo "$as_me:2801: result: $ac_ct_CXX" >&5
2802 echo "${ECHO_T}$ac_ct_CXX" >&6
2803 else
2804   echo "$as_me:2804: result: no" >&5
2805 echo "${ECHO_T}no" >&6
2806 fi
2807
2808   test -n "$ac_ct_CXX" && break
2809 done
2810 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2811
2812   CXX=$ac_ct_CXX
2813 fi
2814
2815 # Provide some information about the compiler.
2816 echo "$as_me:2816:" \
2817      "checking for C++ compiler version" >&5
2818 ac_compiler=`set X $ac_compile; echo $2`
2819 { (eval echo "$as_me:2819: \"$ac_compiler --version </dev/null >&5\"") >&5
2820   (eval $ac_compiler --version </dev/null >&5) 2>&5
2821   ac_status=$?
2822   echo "$as_me:2822: \$? = $ac_status" >&5
2823   (exit $ac_status); }
2824 { (eval echo "$as_me:2824: \"$ac_compiler -v </dev/null >&5\"") >&5
2825   (eval $ac_compiler -v </dev/null >&5) 2>&5
2826   ac_status=$?
2827   echo "$as_me:2827: \$? = $ac_status" >&5
2828   (exit $ac_status); }
2829 { (eval echo "$as_me:2829: \"$ac_compiler -V </dev/null >&5\"") >&5
2830   (eval $ac_compiler -V </dev/null >&5) 2>&5
2831   ac_status=$?
2832   echo "$as_me:2832: \$? = $ac_status" >&5
2833   (exit $ac_status); }
2834
2835 echo "$as_me:2835: checking whether we are using the GNU C++ compiler" >&5
2836 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2837 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2838   echo $ECHO_N "(cached) $ECHO_C" >&6
2839 else
2840   cat >conftest.$ac_ext <<_ACEOF
2841 #line 2841 "configure"
2842 #include "confdefs.h"
2843
2844 int
2845 main ()
2846 {
2847 #ifndef __GNUC__
2848        choke me
2849 #endif
2850
2851   ;
2852   return 0;
2853 }
2854 _ACEOF
2855 rm -f conftest.$ac_objext
2856 if { (eval echo "$as_me:2856: \"$ac_compile\"") >&5
2857   (eval $ac_compile) 2>&5
2858   ac_status=$?
2859   echo "$as_me:2859: \$? = $ac_status" >&5
2860   (exit $ac_status); } &&
2861          { ac_try='test -s conftest.$ac_objext'
2862   { (eval echo "$as_me:2862: \"$ac_try\"") >&5
2863   (eval $ac_try) 2>&5
2864   ac_status=$?
2865   echo "$as_me:2865: \$? = $ac_status" >&5
2866   (exit $ac_status); }; }; then
2867   ac_compiler_gnu=yes
2868 else
2869   echo "$as_me: failed program was:" >&5
2870 cat conftest.$ac_ext >&5
2871 ac_compiler_gnu=no
2872 fi
2873 rm -f conftest.$ac_objext conftest.$ac_ext
2874 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2875
2876 fi
2877 echo "$as_me:2877: result: $ac_cv_cxx_compiler_gnu" >&5
2878 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2879 GXX=`test $ac_compiler_gnu = yes && echo yes`
2880 ac_test_CXXFLAGS=${CXXFLAGS+set}
2881 ac_save_CXXFLAGS=$CXXFLAGS
2882 CXXFLAGS="-g"
2883 echo "$as_me:2883: checking whether $CXX accepts -g" >&5
2884 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2885 if test "${ac_cv_prog_cxx_g+set}" = set; then
2886   echo $ECHO_N "(cached) $ECHO_C" >&6
2887 else
2888   cat >conftest.$ac_ext <<_ACEOF
2889 #line 2889 "configure"
2890 #include "confdefs.h"
2891
2892 int
2893 main ()
2894 {
2895
2896   ;
2897   return 0;
2898 }
2899 _ACEOF
2900 rm -f conftest.$ac_objext
2901 if { (eval echo "$as_me:2901: \"$ac_compile\"") >&5
2902   (eval $ac_compile) 2>&5
2903   ac_status=$?
2904   echo "$as_me:2904: \$? = $ac_status" >&5
2905   (exit $ac_status); } &&
2906          { ac_try='test -s conftest.$ac_objext'
2907   { (eval echo "$as_me:2907: \"$ac_try\"") >&5
2908   (eval $ac_try) 2>&5
2909   ac_status=$?
2910   echo "$as_me:2910: \$? = $ac_status" >&5
2911   (exit $ac_status); }; }; then
2912   ac_cv_prog_cxx_g=yes
2913 else
2914   echo "$as_me: failed program was:" >&5
2915 cat conftest.$ac_ext >&5
2916 ac_cv_prog_cxx_g=no
2917 fi
2918 rm -f conftest.$ac_objext conftest.$ac_ext
2919 fi
2920 echo "$as_me:2920: result: $ac_cv_prog_cxx_g" >&5
2921 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2922 if test "$ac_test_CXXFLAGS" = set; then
2923   CXXFLAGS=$ac_save_CXXFLAGS
2924 elif test $ac_cv_prog_cxx_g = yes; then
2925   if test "$GXX" = yes; then
2926     CXXFLAGS="-g -O2"
2927   else
2928     CXXFLAGS="-g"
2929   fi
2930 else
2931   if test "$GXX" = yes; then
2932     CXXFLAGS="-O2"
2933   else
2934     CXXFLAGS=
2935   fi
2936 fi
2937 for ac_declaration in \
2938    ''\
2939    '#include <stdlib.h>' \
2940    'extern "C" void std::exit (int) throw (); using std::exit;' \
2941    'extern "C" void std::exit (int); using std::exit;' \
2942    'extern "C" void exit (int) throw ();' \
2943    'extern "C" void exit (int);' \
2944    'void exit (int);'
2945 do
2946   cat >conftest.$ac_ext <<_ACEOF
2947 #line 2947 "configure"
2948 #include "confdefs.h"
2949 #include <stdlib.h>
2950 $ac_declaration
2951 int
2952 main ()
2953 {
2954 exit (42);
2955   ;
2956   return 0;
2957 }
2958 _ACEOF
2959 rm -f conftest.$ac_objext
2960 if { (eval echo "$as_me:2960: \"$ac_compile\"") >&5
2961   (eval $ac_compile) 2>&5
2962   ac_status=$?
2963   echo "$as_me:2963: \$? = $ac_status" >&5
2964   (exit $ac_status); } &&
2965          { ac_try='test -s conftest.$ac_objext'
2966   { (eval echo "$as_me:2966: \"$ac_try\"") >&5
2967   (eval $ac_try) 2>&5
2968   ac_status=$?
2969   echo "$as_me:2969: \$? = $ac_status" >&5
2970   (exit $ac_status); }; }; then
2971   :
2972 else
2973   echo "$as_me: failed program was:" >&5
2974 cat conftest.$ac_ext >&5
2975 continue
2976 fi
2977 rm -f conftest.$ac_objext conftest.$ac_ext
2978   cat >conftest.$ac_ext <<_ACEOF
2979 #line 2979 "configure"
2980 #include "confdefs.h"
2981 $ac_declaration
2982 int
2983 main ()
2984 {
2985 exit (42);
2986   ;
2987   return 0;
2988 }
2989 _ACEOF
2990 rm -f conftest.$ac_objext
2991 if { (eval echo "$as_me:2991: \"$ac_compile\"") >&5
2992   (eval $ac_compile) 2>&5
2993   ac_status=$?
2994   echo "$as_me:2994: \$? = $ac_status" >&5
2995   (exit $ac_status); } &&
2996          { ac_try='test -s conftest.$ac_objext'
2997   { (eval echo "$as_me:2997: \"$ac_try\"") >&5
2998   (eval $ac_try) 2>&5
2999   ac_status=$?
3000   echo "$as_me:3000: \$? = $ac_status" >&5
3001   (exit $ac_status); }; }; then
3002   break
3003 else
3004   echo "$as_me: failed program was:" >&5
3005 cat conftest.$ac_ext >&5
3006 fi
3007 rm -f conftest.$ac_objext conftest.$ac_ext
3008 done
3009 rm -f conftest*
3010 if test -n "$ac_declaration"; then
3011   echo '#ifdef __cplusplus' >>confdefs.h
3012   echo $ac_declaration      >>confdefs.h
3013   echo '#endif'             >>confdefs.h
3014 fi
3015
3016 ac_ext=c
3017 ac_cpp='$CPP $CPPFLAGS'
3018 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3019 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3020 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3021 ac_main_return=return
3022
3023                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3024         if test "$CXX" = "g++" ; then
3025                 # Extract the first word of "g++", so it can be a program name with args.
3026 set dummy g++; ac_word=$2
3027 echo "$as_me:3027: checking for $ac_word" >&5
3028 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3029 if test "${ac_cv_path_CXX+set}" = set; then
3030   echo $ECHO_N "(cached) $ECHO_C" >&6
3031 else
3032   case $CXX in
3033   [\\/]* | ?:[\\/]*)
3034   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3035   ;;
3036   *)
3037   ac_save_IFS=$IFS; IFS=$ac_path_separator
3038 ac_dummy="$PATH"
3039 for ac_dir in $ac_dummy; do
3040   IFS=$ac_save_IFS
3041   test -z "$ac_dir" && ac_dir=.
3042   if $as_executable_p "$ac_dir/$ac_word"; then
3043    ac_cv_path_CXX="$ac_dir/$ac_word"
3044    echo "$as_me:3044: found $ac_dir/$ac_word" >&5
3045    break
3046 fi
3047 done
3048
3049   ;;
3050 esac
3051 fi
3052 CXX=$ac_cv_path_CXX
3053
3054 if test -n "$CXX"; then
3055   echo "$as_me:3055: result: $CXX" >&5
3056 echo "${ECHO_T}$CXX" >&6
3057 else
3058   echo "$as_me:3058: result: no" >&5
3059 echo "${ECHO_T}no" >&6
3060 fi
3061
3062         fi
3063         if test "$CXX" = "g++" ; then
3064                 { echo "$as_me:3064: WARNING: ignoring hardcoded g++" >&5
3065 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3066                 cf_with_cxx=no; CXX=""; GXX="";
3067         fi
3068 fi
3069
3070 GXX_VERSION=none
3071 if test "$GXX" = yes; then
3072         echo "$as_me:3072: checking version of g++" >&5
3073 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3074         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3075         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3076         echo "$as_me:3076: result: $GXX_VERSION" >&5
3077 echo "${ECHO_T}$GXX_VERSION" >&6
3078 fi
3079
3080 case $GXX_VERSION in
3081 1*|2.[0-6]*)
3082         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3083         # cf_cxx_library=no
3084         { echo "$as_me:3084: WARNING: templates do not work" >&5
3085 echo "$as_me: WARNING: templates do not work" >&2;}
3086         ;;
3087 esac
3088
3089 echo "$as_me:3089: checking if you want to build C++ binding and demo" >&5
3090 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3091
3092 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3093 if test "${with_cxx_binding+set}" = set; then
3094   withval="$with_cxx_binding"
3095   cf_with_cxx_binding=$withval
3096 else
3097   cf_with_cxx_binding=$cf_with_cxx
3098 fi;
3099 echo "$as_me:3099: result: $cf_with_cxx_binding" >&5
3100 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3101
3102 echo "$as_me:3102: checking if you want to build with Ada95" >&5
3103 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3104
3105 # Check whether --with-ada or --without-ada was given.
3106 if test "${with_ada+set}" = set; then
3107   withval="$with_ada"
3108   cf_with_ada=$withval
3109 else
3110   cf_with_ada=yes
3111 fi;
3112 echo "$as_me:3112: result: $cf_with_ada" >&5
3113 echo "${ECHO_T}$cf_with_ada" >&6
3114
3115 echo "$as_me:3115: checking if you want to build programs such as tic" >&5
3116 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3117
3118 # Check whether --with-progs or --without-progs was given.
3119 if test "${with_progs+set}" = set; then
3120   withval="$with_progs"
3121   cf_with_progs=$withval
3122 else
3123   cf_with_progs=yes
3124 fi;
3125 echo "$as_me:3125: result: $cf_with_progs" >&5
3126 echo "${ECHO_T}$cf_with_progs" >&6
3127
3128 echo "$as_me:3128: checking if you wish to install curses.h" >&5
3129 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3130
3131 # Check whether --with-curses-h or --without-curses-h was given.
3132 if test "${with_curses_h+set}" = set; then
3133   withval="$with_curses_h"
3134   with_curses_h=$withval
3135 else
3136   with_curses_h=yes
3137 fi;
3138 echo "$as_me:3138: result: $with_curses_h" >&5
3139 echo "${ECHO_T}$with_curses_h" >&6
3140
3141 modules_to_build="ncurses"
3142 if test "X$cf_with_progs" != Xno ; then
3143 modules_to_build="$modules_to_build progs tack"
3144 fi
3145 modules_to_build="$modules_to_build panel menu form"
3146
3147 test "$program_prefix" != NONE &&
3148   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3149 # Use a double $ so make ignores it.
3150 test "$program_suffix" != NONE &&
3151   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3152 # Double any \ or $.  echo might interpret backslashes.
3153 # By default was `s,x,x', remove it if useless.
3154 cat <<\_ACEOF >conftest.sed
3155 s/[\\$]/&&/g;s/;s,x,x,$//
3156 _ACEOF
3157 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3158 rm conftest.sed
3159
3160 for ac_prog in mawk gawk nawk awk
3161 do
3162   # Extract the first word of "$ac_prog", so it can be a program name with args.
3163 set dummy $ac_prog; ac_word=$2
3164 echo "$as_me:3164: checking for $ac_word" >&5
3165 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3166 if test "${ac_cv_prog_AWK+set}" = set; then
3167   echo $ECHO_N "(cached) $ECHO_C" >&6
3168 else
3169   if test -n "$AWK"; then
3170   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3171 else
3172   ac_save_IFS=$IFS; IFS=$ac_path_separator
3173 ac_dummy="$PATH"
3174 for ac_dir in $ac_dummy; do
3175   IFS=$ac_save_IFS
3176   test -z "$ac_dir" && ac_dir=.
3177   $as_executable_p "$ac_dir/$ac_word" || continue
3178 ac_cv_prog_AWK="$ac_prog"
3179 echo "$as_me:3179: found $ac_dir/$ac_word" >&5
3180 break
3181 done
3182
3183 fi
3184 fi
3185 AWK=$ac_cv_prog_AWK
3186 if test -n "$AWK"; then
3187   echo "$as_me:3187: result: $AWK" >&5
3188 echo "${ECHO_T}$AWK" >&6
3189 else
3190   echo "$as_me:3190: result: no" >&5
3191 echo "${ECHO_T}no" >&6
3192 fi
3193
3194   test -n "$AWK" && break
3195 done
3196
3197 test -z "$AWK" && { { echo "$as_me:3197: error: No awk program found" >&5
3198 echo "$as_me: error: No awk program found" >&2;}
3199    { (exit 1); exit 1; }; }
3200
3201 echo "$as_me:3201: checking for egrep" >&5
3202 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3203 if test "${ac_cv_prog_egrep+set}" = set; then
3204   echo $ECHO_N "(cached) $ECHO_C" >&6
3205 else
3206   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3207     then ac_cv_prog_egrep='grep -E'
3208     else ac_cv_prog_egrep='egrep'
3209     fi
3210 fi
3211 echo "$as_me:3211: result: $ac_cv_prog_egrep" >&5
3212 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3213  EGREP=$ac_cv_prog_egrep
3214
3215 test -z "$EGREP" && { { echo "$as_me:3215: error: No egrep program found" >&5
3216 echo "$as_me: error: No egrep program found" >&2;}
3217    { (exit 1); exit 1; }; }
3218
3219 # Find a good install program.  We prefer a C program (faster),
3220 # so one script is as good as another.  But avoid the broken or
3221 # incompatible versions:
3222 # SysV /etc/install, /usr/sbin/install
3223 # SunOS /usr/etc/install
3224 # IRIX /sbin/install
3225 # AIX /bin/install
3226 # AmigaOS /C/install, which installs bootblocks on floppy discs
3227 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3228 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3229 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3230 # ./install, which can be erroneously created by make from ./install.sh.
3231 echo "$as_me:3231: checking for a BSD compatible install" >&5
3232 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3233 if test -z "$INSTALL"; then
3234 if test "${ac_cv_path_install+set}" = set; then
3235   echo $ECHO_N "(cached) $ECHO_C" >&6
3236 else
3237     ac_save_IFS=$IFS; IFS=$ac_path_separator
3238   for ac_dir in $PATH; do
3239     IFS=$ac_save_IFS
3240     # Account for people who put trailing slashes in PATH elements.
3241     case $ac_dir/ in
3242     / | ./ | .// | /cC/* \
3243     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3244     | /usr/ucb/* ) ;;
3245     *)
3246       # OSF1 and SCO ODT 3.0 have their own names for install.
3247       # Don't use installbsd from OSF since it installs stuff as root
3248       # by default.
3249       for ac_prog in ginstall scoinst install; do
3250         if $as_executable_p "$ac_dir/$ac_prog"; then
3251           if test $ac_prog = install &&
3252             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3253             # AIX install.  It has an incompatible calling convention.
3254             :
3255           elif test $ac_prog = install &&
3256             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3257             # program-specific install script used by HP pwplus--don't use.
3258             :
3259           else
3260             ac_cv_path_install="$ac_dir/$ac_prog -c"
3261             break 2
3262           fi
3263         fi
3264       done
3265       ;;
3266     esac
3267   done
3268
3269 fi
3270   if test "${ac_cv_path_install+set}" = set; then
3271     INSTALL=$ac_cv_path_install
3272   else
3273     # As a last resort, use the slow shell script.  We don't cache a
3274     # path for INSTALL within a source directory, because that will
3275     # break other packages using the cache if that directory is
3276     # removed, or if the path is relative.
3277     INSTALL=$ac_install_sh
3278   fi
3279 fi
3280 echo "$as_me:3280: result: $INSTALL" >&5
3281 echo "${ECHO_T}$INSTALL" >&6
3282
3283 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3284 # It thinks the first close brace ends the variable substitution.
3285 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3286
3287 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3288
3289 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3290
3291 case $INSTALL in
3292 /*)
3293   ;;
3294 *)
3295   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3296   test -z "$cf_dir" && cf_dir=.
3297   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3298   ;;
3299 esac
3300
3301 for ac_prog in tdlint lint alint
3302 do
3303   # Extract the first word of "$ac_prog", so it can be a program name with args.
3304 set dummy $ac_prog; ac_word=$2
3305 echo "$as_me:3305: checking for $ac_word" >&5
3306 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3307 if test "${ac_cv_prog_LINT+set}" = set; then
3308   echo $ECHO_N "(cached) $ECHO_C" >&6
3309 else
3310   if test -n "$LINT"; then
3311   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3312 else
3313   ac_save_IFS=$IFS; IFS=$ac_path_separator
3314 ac_dummy="$PATH"
3315 for ac_dir in $ac_dummy; do
3316   IFS=$ac_save_IFS
3317   test -z "$ac_dir" && ac_dir=.
3318   $as_executable_p "$ac_dir/$ac_word" || continue
3319 ac_cv_prog_LINT="$ac_prog"
3320 echo "$as_me:3320: found $ac_dir/$ac_word" >&5
3321 break
3322 done
3323
3324 fi
3325 fi
3326 LINT=$ac_cv_prog_LINT
3327 if test -n "$LINT"; then
3328   echo "$as_me:3328: result: $LINT" >&5
3329 echo "${ECHO_T}$LINT" >&6
3330 else
3331   echo "$as_me:3331: result: no" >&5
3332 echo "${ECHO_T}no" >&6
3333 fi
3334
3335   test -n "$LINT" && break
3336 done
3337
3338 echo "$as_me:3338: checking whether ln -s works" >&5
3339 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3340 LN_S=$as_ln_s
3341 if test "$LN_S" = "ln -s"; then
3342   echo "$as_me:3342: result: yes" >&5
3343 echo "${ECHO_T}yes" >&6
3344 else
3345   echo "$as_me:3345: result: no, using $LN_S" >&5
3346 echo "${ECHO_T}no, using $LN_S" >&6
3347 fi
3348
3349 echo "$as_me:3349: checking for long file names" >&5
3350 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3351 if test "${ac_cv_sys_long_file_names+set}" = set; then
3352   echo $ECHO_N "(cached) $ECHO_C" >&6
3353 else
3354   ac_cv_sys_long_file_names=yes
3355 # Test for long file names in all the places we know might matter:
3356 #      .                the current directory, where building will happen
3357 #      $prefix/lib      where we will be installing things
3358 #      $exec_prefix/lib likewise
3359 # eval it to expand exec_prefix.
3360 #      $TMPDIR          if set, where it might want to write temporary files
3361 # if $TMPDIR is not set:
3362 #      /tmp             where it might want to write temporary files
3363 #      /var/tmp         likewise
3364 #      /usr/tmp         likewise
3365 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3366   ac_tmpdirs=$TMPDIR
3367 else
3368   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3369 fi
3370 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3371   test -d $ac_dir || continue
3372   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3373   ac_xdir=$ac_dir/cf$$
3374   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3375   ac_tf1=$ac_xdir/conftest9012345
3376   ac_tf2=$ac_xdir/conftest9012346
3377   (echo 1 >$ac_tf1) 2>/dev/null
3378   (echo 2 >$ac_tf2) 2>/dev/null
3379   ac_val=`cat $ac_tf1 2>/dev/null`
3380   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3381     ac_cv_sys_long_file_names=no
3382     rm -rf $ac_xdir 2>/dev/null
3383     break
3384   fi
3385   rm -rf $ac_xdir 2>/dev/null
3386 done
3387 fi
3388 echo "$as_me:3388: result: $ac_cv_sys_long_file_names" >&5
3389 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3390 if test $ac_cv_sys_long_file_names = yes; then
3391
3392 cat >>confdefs.h <<\EOF
3393 #define HAVE_LONG_FILE_NAMES 1
3394 EOF
3395
3396 fi
3397
3398 echo "$as_me:3398: checking if we should assume mixed-case filenames" >&5
3399 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3400
3401 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3402 if test "${enable_mixed_case+set}" = set; then
3403   enableval="$enable_mixed_case"
3404   enable_mixedcase=$enableval
3405 else
3406   enable_mixedcase=auto
3407 fi;
3408 echo "$as_me:3408: result: $enable_mixedcase" >&5
3409 echo "${ECHO_T}$enable_mixedcase" >&6
3410 if test "$enable_mixedcase" = "auto" ; then
3411
3412 echo "$as_me:3412: checking if filesystem supports mixed-case filenames" >&5
3413 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3414 if test "${cf_cv_mixedcase+set}" = set; then
3415   echo $ECHO_N "(cached) $ECHO_C" >&6
3416 else
3417
3418 if test "$cross_compiling" = yes ; then
3419         case $target_alias in #(vi
3420         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3421                 cf_cv_mixedcase=no
3422                 ;;
3423         *)
3424                 cf_cv_mixedcase=yes
3425                 ;;
3426         esac
3427 else
3428         rm -f conftest CONFTEST
3429         echo test >conftest
3430         if test -f CONFTEST ; then
3431                 cf_cv_mixedcase=no
3432         else
3433                 cf_cv_mixedcase=yes
3434         fi
3435         rm -f conftest CONFTEST
3436 fi
3437
3438 fi
3439 echo "$as_me:3439: result: $cf_cv_mixedcase" >&5
3440 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3441 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3442 #define MIXEDCASE_FILENAMES 1
3443 EOF
3444
3445 else
3446     cf_cv_mixedcase=$enable_mixedcase
3447     if test "$enable_mixedcase" = "yes" ; then
3448         cat >>confdefs.h <<\EOF
3449 #define MIXEDCASE_FILENAMES 1
3450 EOF
3451
3452     fi
3453 fi
3454
3455 # do this after mixed-case option (tags/TAGS is not as important as tic).
3456 echo "$as_me:3456: checking whether ${MAKE-make} sets \${MAKE}" >&5
3457 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3458 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3459 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3460   echo $ECHO_N "(cached) $ECHO_C" >&6
3461 else
3462   cat >conftest.make <<\EOF
3463 all:
3464         @echo 'ac_maketemp="${MAKE}"'
3465 EOF
3466 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3467 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3468 if test -n "$ac_maketemp"; then
3469   eval ac_cv_prog_make_${ac_make}_set=yes
3470 else
3471   eval ac_cv_prog_make_${ac_make}_set=no
3472 fi
3473 rm -f conftest.make
3474 fi
3475 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3476   echo "$as_me:3476: result: yes" >&5
3477 echo "${ECHO_T}yes" >&6
3478   SET_MAKE=
3479 else
3480   echo "$as_me:3480: result: no" >&5
3481 echo "${ECHO_T}no" >&6
3482   SET_MAKE="MAKE=${MAKE-make}"
3483 fi
3484
3485 # Extract the first word of "ctags", so it can be a program name with args.
3486 set dummy ctags; ac_word=$2
3487 echo "$as_me:3487: checking for $ac_word" >&5
3488 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3489 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3490   echo $ECHO_N "(cached) $ECHO_C" >&6
3491 else
3492   if test -n "$MAKE_LOWER_TAGS"; then
3493   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3494 else
3495   ac_save_IFS=$IFS; IFS=$ac_path_separator
3496 ac_dummy="$PATH"
3497 for ac_dir in $ac_dummy; do
3498   IFS=$ac_save_IFS
3499   test -z "$ac_dir" && ac_dir=.
3500   $as_executable_p "$ac_dir/$ac_word" || continue
3501 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3502 echo "$as_me:3502: found $ac_dir/$ac_word" >&5
3503 break
3504 done
3505
3506   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3507 fi
3508 fi
3509 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3510 if test -n "$MAKE_LOWER_TAGS"; then
3511   echo "$as_me:3511: result: $MAKE_LOWER_TAGS" >&5
3512 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3513 else
3514   echo "$as_me:3514: result: no" >&5
3515 echo "${ECHO_T}no" >&6
3516 fi
3517
3518 if test "$cf_cv_mixedcase" = yes ; then
3519         # Extract the first word of "etags", so it can be a program name with args.
3520 set dummy etags; ac_word=$2
3521 echo "$as_me:3521: checking for $ac_word" >&5
3522 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3523 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3524   echo $ECHO_N "(cached) $ECHO_C" >&6
3525 else
3526   if test -n "$MAKE_UPPER_TAGS"; then
3527   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3528 else
3529   ac_save_IFS=$IFS; IFS=$ac_path_separator
3530 ac_dummy="$PATH"
3531 for ac_dir in $ac_dummy; do
3532   IFS=$ac_save_IFS
3533   test -z "$ac_dir" && ac_dir=.
3534   $as_executable_p "$ac_dir/$ac_word" || continue
3535 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3536 echo "$as_me:3536: found $ac_dir/$ac_word" >&5
3537 break
3538 done
3539
3540   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3541 fi
3542 fi
3543 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3544 if test -n "$MAKE_UPPER_TAGS"; then
3545   echo "$as_me:3545: result: $MAKE_UPPER_TAGS" >&5
3546 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3547 else
3548   echo "$as_me:3548: result: no" >&5
3549 echo "${ECHO_T}no" >&6
3550 fi
3551
3552 else
3553         MAKE_UPPER_TAGS=no
3554 fi
3555
3556 if test "$MAKE_UPPER_TAGS" = yes ; then
3557         MAKE_UPPER_TAGS=
3558 else
3559         MAKE_UPPER_TAGS="#"
3560 fi
3561
3562 if test "$MAKE_LOWER_TAGS" = yes ; then
3563         MAKE_LOWER_TAGS=
3564 else
3565         MAKE_LOWER_TAGS="#"
3566 fi
3567
3568 echo "$as_me:3568: checking for makeflags variable" >&5
3569 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3570 if test "${cf_cv_makeflags+set}" = set; then
3571   echo $ECHO_N "(cached) $ECHO_C" >&6
3572 else
3573
3574         cf_cv_makeflags=''
3575         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3576         do
3577                 cat >cf_makeflags.tmp <<CF_EOF
3578 SHELL = /bin/sh
3579 all :
3580         @ echo '.$cf_option'
3581 CF_EOF
3582                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3583                 case "$cf_result" in
3584                 .*k)
3585                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3586                         case "$cf_result" in
3587                         .*CC=*) cf_cv_makeflags=
3588                                 ;;
3589                         *)      cf_cv_makeflags=$cf_option
3590                                 ;;
3591                         esac
3592                         break
3593                         ;;
3594                 .-)     ;;
3595                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3596                         ;;
3597                 esac
3598         done
3599         rm -f cf_makeflags.tmp
3600
3601 fi
3602 echo "$as_me:3602: result: $cf_cv_makeflags" >&5
3603 echo "${ECHO_T}$cf_cv_makeflags" >&6
3604
3605 if test -n "$ac_tool_prefix"; then
3606   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3607 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3608 echo "$as_me:3608: checking for $ac_word" >&5
3609 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3610 if test "${ac_cv_prog_RANLIB+set}" = set; then
3611   echo $ECHO_N "(cached) $ECHO_C" >&6
3612 else
3613   if test -n "$RANLIB"; then
3614   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3615 else
3616   ac_save_IFS=$IFS; IFS=$ac_path_separator
3617 ac_dummy="$PATH"
3618 for ac_dir in $ac_dummy; do
3619   IFS=$ac_save_IFS
3620   test -z "$ac_dir" && ac_dir=.
3621   $as_executable_p "$ac_dir/$ac_word" || continue
3622 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3623 echo "$as_me:3623: found $ac_dir/$ac_word" >&5
3624 break
3625 done
3626
3627 fi
3628 fi
3629 RANLIB=$ac_cv_prog_RANLIB
3630 if test -n "$RANLIB"; then
3631   echo "$as_me:3631: result: $RANLIB" >&5
3632 echo "${ECHO_T}$RANLIB" >&6
3633 else
3634   echo "$as_me:3634: result: no" >&5
3635 echo "${ECHO_T}no" >&6
3636 fi
3637
3638 fi
3639 if test -z "$ac_cv_prog_RANLIB"; then
3640   ac_ct_RANLIB=$RANLIB
3641   # Extract the first word of "ranlib", so it can be a program name with args.
3642 set dummy ranlib; ac_word=$2
3643 echo "$as_me:3643: checking for $ac_word" >&5
3644 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3645 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3646   echo $ECHO_N "(cached) $ECHO_C" >&6
3647 else
3648   if test -n "$ac_ct_RANLIB"; then
3649   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3650 else
3651   ac_save_IFS=$IFS; IFS=$ac_path_separator
3652 ac_dummy="$PATH"
3653 for ac_dir in $ac_dummy; do
3654   IFS=$ac_save_IFS
3655   test -z "$ac_dir" && ac_dir=.
3656   $as_executable_p "$ac_dir/$ac_word" || continue
3657 ac_cv_prog_ac_ct_RANLIB="ranlib"
3658 echo "$as_me:3658: found $ac_dir/$ac_word" >&5
3659 break
3660 done
3661
3662   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3663 fi
3664 fi
3665 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3666 if test -n "$ac_ct_RANLIB"; then
3667   echo "$as_me:3667: result: $ac_ct_RANLIB" >&5
3668 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3669 else
3670   echo "$as_me:3670: result: no" >&5
3671 echo "${ECHO_T}no" >&6
3672 fi
3673
3674   RANLIB=$ac_ct_RANLIB
3675 else
3676   RANLIB="$ac_cv_prog_RANLIB"
3677 fi
3678
3679 if test -n "$ac_tool_prefix"; then
3680   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3681 set dummy ${ac_tool_prefix}ld; ac_word=$2
3682 echo "$as_me:3682: checking for $ac_word" >&5
3683 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3684 if test "${ac_cv_prog_LD+set}" = set; then
3685   echo $ECHO_N "(cached) $ECHO_C" >&6
3686 else
3687   if test -n "$LD"; then
3688   ac_cv_prog_LD="$LD" # Let the user override the test.
3689 else
3690   ac_save_IFS=$IFS; IFS=$ac_path_separator
3691 ac_dummy="$PATH"
3692 for ac_dir in $ac_dummy; do
3693   IFS=$ac_save_IFS
3694   test -z "$ac_dir" && ac_dir=.
3695   $as_executable_p "$ac_dir/$ac_word" || continue
3696 ac_cv_prog_LD="${ac_tool_prefix}ld"
3697 echo "$as_me:3697: found $ac_dir/$ac_word" >&5
3698 break
3699 done
3700
3701 fi
3702 fi
3703 LD=$ac_cv_prog_LD
3704 if test -n "$LD"; then
3705   echo "$as_me:3705: result: $LD" >&5
3706 echo "${ECHO_T}$LD" >&6
3707 else
3708   echo "$as_me:3708: result: no" >&5
3709 echo "${ECHO_T}no" >&6
3710 fi
3711
3712 fi
3713 if test -z "$ac_cv_prog_LD"; then
3714   ac_ct_LD=$LD
3715   # Extract the first word of "ld", so it can be a program name with args.
3716 set dummy ld; ac_word=$2
3717 echo "$as_me:3717: checking for $ac_word" >&5
3718 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3719 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3720   echo $ECHO_N "(cached) $ECHO_C" >&6
3721 else
3722   if test -n "$ac_ct_LD"; then
3723   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3724 else
3725   ac_save_IFS=$IFS; IFS=$ac_path_separator
3726 ac_dummy="$PATH"
3727 for ac_dir in $ac_dummy; do
3728   IFS=$ac_save_IFS
3729   test -z "$ac_dir" && ac_dir=.
3730   $as_executable_p "$ac_dir/$ac_word" || continue
3731 ac_cv_prog_ac_ct_LD="ld"
3732 echo "$as_me:3732: found $ac_dir/$ac_word" >&5
3733 break
3734 done
3735
3736   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3737 fi
3738 fi
3739 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3740 if test -n "$ac_ct_LD"; then
3741   echo "$as_me:3741: result: $ac_ct_LD" >&5
3742 echo "${ECHO_T}$ac_ct_LD" >&6
3743 else
3744   echo "$as_me:3744: result: no" >&5
3745 echo "${ECHO_T}no" >&6
3746 fi
3747
3748   LD=$ac_ct_LD
3749 else
3750   LD="$ac_cv_prog_LD"
3751 fi
3752
3753 if test -n "$ac_tool_prefix"; then
3754   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3755 set dummy ${ac_tool_prefix}ar; ac_word=$2
3756 echo "$as_me:3756: checking for $ac_word" >&5
3757 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3758 if test "${ac_cv_prog_AR+set}" = set; then
3759   echo $ECHO_N "(cached) $ECHO_C" >&6
3760 else
3761   if test -n "$AR"; then
3762   ac_cv_prog_AR="$AR" # Let the user override the test.
3763 else
3764   ac_save_IFS=$IFS; IFS=$ac_path_separator
3765 ac_dummy="$PATH"
3766 for ac_dir in $ac_dummy; do
3767   IFS=$ac_save_IFS
3768   test -z "$ac_dir" && ac_dir=.
3769   $as_executable_p "$ac_dir/$ac_word" || continue
3770 ac_cv_prog_AR="${ac_tool_prefix}ar"
3771 echo "$as_me:3771: found $ac_dir/$ac_word" >&5
3772 break
3773 done
3774
3775 fi
3776 fi
3777 AR=$ac_cv_prog_AR
3778 if test -n "$AR"; then
3779   echo "$as_me:3779: result: $AR" >&5
3780 echo "${ECHO_T}$AR" >&6
3781 else
3782   echo "$as_me:3782: result: no" >&5
3783 echo "${ECHO_T}no" >&6
3784 fi
3785
3786 fi
3787 if test -z "$ac_cv_prog_AR"; then
3788   ac_ct_AR=$AR
3789   # Extract the first word of "ar", so it can be a program name with args.
3790 set dummy ar; ac_word=$2
3791 echo "$as_me:3791: checking for $ac_word" >&5
3792 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3793 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3794   echo $ECHO_N "(cached) $ECHO_C" >&6
3795 else
3796   if test -n "$ac_ct_AR"; then
3797   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3798 else
3799   ac_save_IFS=$IFS; IFS=$ac_path_separator
3800 ac_dummy="$PATH"
3801 for ac_dir in $ac_dummy; do
3802   IFS=$ac_save_IFS
3803   test -z "$ac_dir" && ac_dir=.
3804   $as_executable_p "$ac_dir/$ac_word" || continue
3805 ac_cv_prog_ac_ct_AR="ar"
3806 echo "$as_me:3806: found $ac_dir/$ac_word" >&5
3807 break
3808 done
3809
3810   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3811 fi
3812 fi
3813 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3814 if test -n "$ac_ct_AR"; then
3815   echo "$as_me:3815: result: $ac_ct_AR" >&5
3816 echo "${ECHO_T}$ac_ct_AR" >&6
3817 else
3818   echo "$as_me:3818: result: no" >&5
3819 echo "${ECHO_T}no" >&6
3820 fi
3821
3822   AR=$ac_ct_AR
3823 else
3824   AR="$ac_cv_prog_AR"
3825 fi
3826
3827 if test "${cf_cv_subst_AR_OPTS+set}" = set; then
3828   echo $ECHO_N "(cached) $ECHO_C" >&6
3829 else
3830
3831 echo "$as_me:3831: checking for archiver options (symbol AR_OPTS)" >&5
3832 echo $ECHO_N "checking for archiver options (symbol AR_OPTS)... $ECHO_C" >&6
3833
3834 if test -z "$AR_OPTS" ; then
3835         AR_OPTS=rv
3836
3837 fi
3838
3839 cf_cv_subst_AR_OPTS=$AR_OPTS
3840 echo "$as_me:3840: result: $AR_OPTS" >&5
3841 echo "${ECHO_T}$AR_OPTS" >&6
3842
3843 fi
3844
3845 echo "$as_me:3845: checking if you have specified an install-prefix" >&5
3846 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3847
3848 # Check whether --with-install-prefix or --without-install-prefix was given.
3849 if test "${with_install_prefix+set}" = set; then
3850   withval="$with_install_prefix"
3851   case "$withval" in #(vi
3852         yes|no) #(vi
3853                 ;;
3854         *)      DESTDIR="$withval"
3855                 ;;
3856         esac
3857 fi;
3858 echo "$as_me:3858: result: $DESTDIR" >&5
3859 echo "${ECHO_T}$DESTDIR" >&6
3860
3861 ###############################################################################
3862
3863 # If we're cross-compiling, allow the user to override the tools and their
3864 # options.  The configure script is oriented toward identifying the host
3865 # compiler, etc., but we need a build compiler to generate parts of the source.
3866
3867 if test "$cross_compiling" = yes ; then
3868
3869         # defaults that we might want to override
3870         : ${BUILD_CFLAGS:=''}
3871         : ${BUILD_CPPFLAGS:=''}
3872         : ${BUILD_LDFLAGS:=''}
3873         : ${BUILD_LIBS:=''}
3874         : ${BUILD_EXEEXT:='$x'}
3875         : ${BUILD_OBJEXT:='o'}
3876
3877 # Check whether --with-build-cc or --without-build-cc was given.
3878 if test "${with_build_cc+set}" = set; then
3879   withval="$with_build_cc"
3880   BUILD_CC="$withval"
3881 else
3882   for ac_prog in gcc cc cl
3883 do
3884   # Extract the first word of "$ac_prog", so it can be a program name with args.
3885 set dummy $ac_prog; ac_word=$2
3886 echo "$as_me:3886: checking for $ac_word" >&5
3887 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3888 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3889   echo $ECHO_N "(cached) $ECHO_C" >&6
3890 else
3891   if test -n "$BUILD_CC"; then
3892   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3893 else
3894   ac_save_IFS=$IFS; IFS=$ac_path_separator
3895 ac_dummy="$PATH"
3896 for ac_dir in $ac_dummy; do
3897   IFS=$ac_save_IFS
3898   test -z "$ac_dir" && ac_dir=.
3899   $as_executable_p "$ac_dir/$ac_word" || continue
3900 ac_cv_prog_BUILD_CC="$ac_prog"
3901 echo "$as_me:3901: found $ac_dir/$ac_word" >&5
3902 break
3903 done
3904
3905 fi
3906 fi
3907 BUILD_CC=$ac_cv_prog_BUILD_CC
3908 if test -n "$BUILD_CC"; then
3909   echo "$as_me:3909: result: $BUILD_CC" >&5
3910 echo "${ECHO_T}$BUILD_CC" >&6
3911 else
3912   echo "$as_me:3912: result: no" >&5
3913 echo "${ECHO_T}no" >&6
3914 fi
3915
3916   test -n "$BUILD_CC" && break
3917 done
3918
3919 fi;
3920         echo "$as_me:3920: checking for native build C compiler" >&5
3921 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3922         echo "$as_me:3922: result: $BUILD_CC" >&5
3923 echo "${ECHO_T}$BUILD_CC" >&6
3924
3925         echo "$as_me:3925: checking for native build C preprocessor" >&5
3926 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3927
3928 # Check whether --with-build-cpp or --without-build-cpp was given.
3929 if test "${with_build_cpp+set}" = set; then
3930   withval="$with_build_cpp"
3931   BUILD_CPP="$withval"
3932 else
3933   BUILD_CPP='${BUILD_CC} -E'
3934 fi;
3935         echo "$as_me:3935: result: $BUILD_CPP" >&5
3936 echo "${ECHO_T}$BUILD_CPP" >&6
3937
3938         echo "$as_me:3938: checking for native build C flags" >&5
3939 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3940
3941 # Check whether --with-build-cflags or --without-build-cflags was given.
3942 if test "${with_build_cflags+set}" = set; then
3943   withval="$with_build_cflags"
3944   BUILD_CFLAGS="$withval"
3945 fi;
3946         echo "$as_me:3946: result: $BUILD_CFLAGS" >&5
3947 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3948
3949         echo "$as_me:3949: checking for native build C preprocessor-flags" >&5
3950 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3951
3952 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3953 if test "${with_build_cppflags+set}" = set; then
3954   withval="$with_build_cppflags"
3955   BUILD_CPPFLAGS="$withval"
3956 fi;
3957         echo "$as_me:3957: result: $BUILD_CPPFLAGS" >&5
3958 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3959
3960         echo "$as_me:3960: checking for native build linker-flags" >&5
3961 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3962
3963 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3964 if test "${with_build_ldflags+set}" = set; then
3965   withval="$with_build_ldflags"
3966   BUILD_LDFLAGS="$withval"
3967 fi;
3968         echo "$as_me:3968: result: $BUILD_LDFLAGS" >&5
3969 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3970
3971         echo "$as_me:3971: checking for native build linker-libraries" >&5
3972 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3973
3974 # Check whether --with-build-libs or --without-build-libs was given.
3975 if test "${with_build_libs+set}" = set; then
3976   withval="$with_build_libs"
3977   BUILD_LIBS="$withval"
3978 fi;
3979         echo "$as_me:3979: result: $BUILD_LIBS" >&5
3980 echo "${ECHO_T}$BUILD_LIBS" >&6
3981
3982         # this assumes we're on Unix.
3983         BUILD_EXEEXT=
3984         BUILD_OBJEXT=o
3985
3986         : ${BUILD_CC:='${CC}'}
3987
3988         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3989                 { { echo "$as_me:3989: error: Cross-build requires two compilers.
3990 Use --with-build-cc to specify the native compiler." >&5
3991 echo "$as_me: error: Cross-build requires two compilers.
3992 Use --with-build-cc to specify the native compiler." >&2;}
3993    { (exit 1); exit 1; }; }
3994         fi
3995
3996 else
3997         : ${BUILD_CC:='${CC}'}
3998         : ${BUILD_CPP:='${CPP}'}
3999         : ${BUILD_CFLAGS:='${CFLAGS}'}
4000         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4001         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4002         : ${BUILD_LIBS:='${LIBS}'}
4003         : ${BUILD_EXEEXT:='$x'}
4004         : ${BUILD_OBJEXT:='o'}
4005 fi
4006
4007 ###############################################################################
4008
4009 ### Options to allow the user to specify the set of libraries which are used.
4010 ### Use "--without-normal --with-shared" to allow the default model to be
4011 ### shared, for example.
4012 cf_list_models=""
4013
4014 LIBTOOL=
4015
4016 # common library maintenance symbols that are convenient for libtool scripts:
4017 LIB_CREATE='${AR} -cr'
4018 LIB_OBJECT='${OBJECTS}'
4019 LIB_SUFFIX=.a
4020 LIB_PREP="$RANLIB"
4021
4022 # symbols used to prop libtool up to enable it to determine what it should be
4023 # doing:
4024 LIB_CLEAN=
4025 LIB_COMPILE=
4026 LIB_LINK='${CC}'
4027 LIB_INSTALL=
4028 LIB_UNINSTALL=
4029
4030 echo "$as_me:4030: checking if you want to build libraries with libtool" >&5
4031 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4032
4033 # Check whether --with-libtool or --without-libtool was given.
4034 if test "${with_libtool+set}" = set; then
4035   withval="$with_libtool"
4036   with_libtool=$withval
4037 else
4038   with_libtool=no
4039 fi;
4040 echo "$as_me:4040: result: $with_libtool" >&5
4041 echo "${ECHO_T}$with_libtool" >&6
4042 if test "$with_libtool" != "no"; then
4043
4044         if test "$with_libtool" != "yes" ; then
4045
4046 if test "x$prefix" != xNONE; then
4047   cf_path_syntax="$prefix"
4048 else
4049   cf_path_syntax="$ac_default_prefix"
4050 fi
4051
4052 case ".$with_libtool" in #(vi
4053 .\$\(*\)*|.\'*\'*) #(vi
4054   ;;
4055 ..|./*|.\\*) #(vi
4056   ;;
4057 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4058   ;;
4059 .\${*prefix}*) #(vi
4060   eval with_libtool="$with_libtool"
4061   case ".$with_libtool" in #(vi
4062   .NONE/*)
4063     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4064     ;;
4065   esac
4066   ;; #(vi
4067 .no|.NONE/*)
4068   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4069   ;;
4070 *)
4071   { { echo "$as_me:4071: error: expected a pathname, not \"$with_libtool\"" >&5
4072 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4073    { (exit 1); exit 1; }; }
4074   ;;
4075 esac
4076
4077                 LIBTOOL=$with_libtool
4078         else
4079                 # Extract the first word of "libtool", so it can be a program name with args.
4080 set dummy libtool; ac_word=$2
4081 echo "$as_me:4081: checking for $ac_word" >&5
4082 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4083 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4084   echo $ECHO_N "(cached) $ECHO_C" >&6
4085 else
4086   case $LIBTOOL in
4087   [\\/]* | ?:[\\/]*)
4088   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4089   ;;
4090   *)
4091   ac_save_IFS=$IFS; IFS=$ac_path_separator
4092 ac_dummy="$PATH"
4093 for ac_dir in $ac_dummy; do
4094   IFS=$ac_save_IFS
4095   test -z "$ac_dir" && ac_dir=.
4096   if $as_executable_p "$ac_dir/$ac_word"; then
4097    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4098    echo "$as_me:4098: found $ac_dir/$ac_word" >&5
4099    break
4100 fi
4101 done
4102
4103   ;;
4104 esac
4105 fi
4106 LIBTOOL=$ac_cv_path_LIBTOOL
4107
4108 if test -n "$LIBTOOL"; then
4109   echo "$as_me:4109: result: $LIBTOOL" >&5
4110 echo "${ECHO_T}$LIBTOOL" >&6
4111 else
4112   echo "$as_me:4112: result: no" >&5
4113 echo "${ECHO_T}no" >&6
4114 fi
4115
4116         fi
4117         if test -z "$LIBTOOL" ; then
4118                 { { echo "$as_me:4118: error: Cannot find libtool" >&5
4119 echo "$as_me: error: Cannot find libtool" >&2;}
4120    { (exit 1); exit 1; }; }
4121         fi
4122         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} -o'
4123         LIB_OBJECT='${OBJECTS:.o=.lo}'
4124         LIB_SUFFIX=.la
4125         LIB_CLEAN='${LIBTOOL} --mode=clean'
4126         LIB_COMPILE='${LIBTOOL} --mode=compile'
4127         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4128         LIB_INSTALL='${LIBTOOL} --mode=install'
4129         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4130         LIB_PREP=:
4131
4132         # Show the version of libtool
4133         echo "$as_me:4133: checking version of libtool" >&5
4134 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4135
4136         # Save the version in a cache variable - this is not entirely a good
4137         # thing, but the version string from libtool is very ugly, and for
4138         # bug reports it might be useful to have the original string.
4139         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
4140         echo "$as_me:4140: result: $cf_cv_libtool_version" >&5
4141 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4142         if test -z "$cf_cv_libtool_version" ; then
4143                 { { echo "$as_me:4143: error: This is not GNU libtool" >&5
4144 echo "$as_me: error: This is not GNU libtool" >&2;}
4145    { (exit 1); exit 1; }; }
4146         fi
4147
4148         # special hack to add --tag option for C++ compiler
4149         case $cf_cv_libtool_version in
4150         1.[5-9]*|[2-9]*)
4151                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4152                 LIBTOOL="$LIBTOOL --tag=CC"
4153                 ;;
4154         *)
4155                 LIBTOOL_CXX="$LIBTOOL"
4156                 ;;
4157         esac
4158 else
4159         LIBTOOL=""
4160         LIBTOOL_CXX=""
4161 fi
4162
4163 test -z "$LIBTOOL" && ECHO_LT=
4164
4165 if test "$with_libtool" != "no" ; then
4166
4167 cf_list_models="$cf_list_models libtool"
4168
4169 else
4170
4171 echo "$as_me:4171: checking if you want to build shared libraries" >&5
4172 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4173
4174 # Check whether --with-shared or --without-shared was given.
4175 if test "${with_shared+set}" = set; then
4176   withval="$with_shared"
4177   with_shared=$withval
4178 else
4179   with_shared=no
4180 fi;
4181 echo "$as_me:4181: result: $with_shared" >&5
4182 echo "${ECHO_T}$with_shared" >&6
4183 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4184
4185 echo "$as_me:4185: checking if you want to build static libraries" >&5
4186 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4187
4188 # Check whether --with-normal or --without-normal was given.
4189 if test "${with_normal+set}" = set; then
4190   withval="$with_normal"
4191   with_normal=$withval
4192 else
4193   with_normal=yes
4194 fi;
4195 echo "$as_me:4195: result: $with_normal" >&5
4196 echo "${ECHO_T}$with_normal" >&6
4197 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4198
4199 echo "$as_me:4199: checking if you want to build debug libraries" >&5
4200 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4201
4202 # Check whether --with-debug or --without-debug was given.
4203 if test "${with_debug+set}" = set; then
4204   withval="$with_debug"
4205   with_debug=$withval
4206 else
4207   with_debug=yes
4208 fi;
4209 echo "$as_me:4209: result: $with_debug" >&5
4210 echo "${ECHO_T}$with_debug" >&6
4211 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4212
4213 echo "$as_me:4213: checking if you want to build profiling libraries" >&5
4214 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4215
4216 # Check whether --with-profile or --without-profile was given.
4217 if test "${with_profile+set}" = set; then
4218   withval="$with_profile"
4219   with_profile=$withval
4220 else
4221   with_profile=no
4222 fi;
4223 echo "$as_me:4223: result: $with_profile" >&5
4224 echo "${ECHO_T}$with_profile" >&6
4225 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4226
4227 fi
4228
4229 ###############################################################################
4230
4231 echo "$as_me:4231: checking for specified models" >&5
4232 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4233 test -z "$cf_list_models" && cf_list_models=normal
4234 test "$with_libtool" != "no" && cf_list_models=libtool
4235 echo "$as_me:4235: result: $cf_list_models" >&5
4236 echo "${ECHO_T}$cf_list_models" >&6
4237
4238 ### Use the first model as the default, and save its suffix for use in building
4239 ### up test-applications.
4240 echo "$as_me:4240: checking for default model" >&5
4241 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4242 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4243 echo "$as_me:4243: result: $DFT_LWR_MODEL" >&5
4244 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4245
4246 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4247
4248 TICS_NAME=tic
4249
4250 TINFO_NAME=tinfo
4251
4252 LIB_NAME=ncurses
4253
4254 LIB_DIR=../lib
4255 LIB_2ND=../../lib
4256
4257         case $cf_cv_system_name in #(vi
4258         OS/2*|os2*) #(vi
4259         LIB_PREFIX=''
4260         ;;
4261         *)      LIB_PREFIX='lib'
4262         ;;
4263         esac
4264 cf_prefix=$LIB_PREFIX
4265
4266 LIB_PREFIX=$cf_prefix
4267
4268 LIB_SUFFIX=
4269
4270 ###############################################################################
4271
4272 echo "$as_me:4272: checking if you want to build a separate terminfo library" >&5
4273 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4274
4275 # Check whether --with-termlib or --without-termlib was given.
4276 if test "${with_termlib+set}" = set; then
4277   withval="$with_termlib"
4278   with_termlib=$withval
4279 else
4280   with_termlib=no
4281 fi;
4282 echo "$as_me:4282: result: $with_termlib" >&5
4283 echo "${ECHO_T}$with_termlib" >&6
4284
4285 echo "$as_me:4285: checking if you want to build a separate tic library" >&5
4286 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4287
4288 # Check whether --with-ticlib or --without-ticlib was given.
4289 if test "${with_ticlib+set}" = set; then
4290   withval="$with_ticlib"
4291   with_ticlib=$withval
4292 else
4293   with_ticlib=no
4294 fi;
4295 echo "$as_me:4295: result: $with_ticlib" >&5
4296 echo "${ECHO_T}$with_ticlib" >&6
4297
4298 ### Checks for special libraries, must be done up-front.
4299 SHLIB_LIST=""
4300
4301 echo "$as_me:4301: checking if you want to link with the GPM mouse library" >&5
4302 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4303
4304 # Check whether --with-gpm or --without-gpm was given.
4305 if test "${with_gpm+set}" = set; then
4306   withval="$with_gpm"
4307   with_gpm=$withval
4308 else
4309   with_gpm=maybe
4310 fi;
4311 echo "$as_me:4311: result: $with_gpm" >&5
4312 echo "${ECHO_T}$with_gpm" >&6
4313
4314 if test "$with_gpm" != no ; then
4315         echo "$as_me:4315: checking for gpm.h" >&5
4316 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4317 if test "${ac_cv_header_gpm_h+set}" = set; then
4318   echo $ECHO_N "(cached) $ECHO_C" >&6
4319 else
4320   cat >conftest.$ac_ext <<_ACEOF
4321 #line 4321 "configure"
4322 #include "confdefs.h"
4323 #include <gpm.h>
4324 _ACEOF
4325 if { (eval echo "$as_me:4325: \"$ac_cpp conftest.$ac_ext\"") >&5
4326   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4327   ac_status=$?
4328   egrep -v '^ *\+' conftest.er1 >conftest.err
4329   rm -f conftest.er1
4330   cat conftest.err >&5
4331   echo "$as_me:4331: \$? = $ac_status" >&5
4332   (exit $ac_status); } >/dev/null; then
4333   if test -s conftest.err; then
4334     ac_cpp_err=$ac_c_preproc_warn_flag
4335   else
4336     ac_cpp_err=
4337   fi
4338 else
4339   ac_cpp_err=yes
4340 fi
4341 if test -z "$ac_cpp_err"; then
4342   ac_cv_header_gpm_h=yes
4343 else
4344   echo "$as_me: failed program was:" >&5
4345   cat conftest.$ac_ext >&5
4346   ac_cv_header_gpm_h=no
4347 fi
4348 rm -f conftest.err conftest.$ac_ext
4349 fi
4350 echo "$as_me:4350: result: $ac_cv_header_gpm_h" >&5
4351 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4352 if test $ac_cv_header_gpm_h = yes; then
4353
4354                 cat >>confdefs.h <<\EOF
4355 #define HAVE_GPM_H 1
4356 EOF
4357
4358                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4359                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4360
4361 echo "${as_me-configure}:4361: testing assuming we really have GPM library ..." 1>&5
4362
4363                         cat >>confdefs.h <<\EOF
4364 #define HAVE_LIBGPM 1
4365 EOF
4366
4367                 else
4368                         echo "$as_me:4368: checking for Gpm_Open in -lgpm" >&5
4369 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4370 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4371   echo $ECHO_N "(cached) $ECHO_C" >&6
4372 else
4373   ac_check_lib_save_LIBS=$LIBS
4374 LIBS="-lgpm  $LIBS"
4375 cat >conftest.$ac_ext <<_ACEOF
4376 #line 4376 "configure"
4377 #include "confdefs.h"
4378
4379 /* Override any gcc2 internal prototype to avoid an error.  */
4380 #ifdef __cplusplus
4381 extern "C"
4382 #endif
4383 /* We use char because int might match the return type of a gcc2
4384    builtin and then its argument prototype would still apply.  */
4385 char Gpm_Open ();
4386 int
4387 main ()
4388 {
4389 Gpm_Open ();
4390   ;
4391   return 0;
4392 }
4393 _ACEOF
4394 rm -f conftest.$ac_objext conftest$ac_exeext
4395 if { (eval echo "$as_me:4395: \"$ac_link\"") >&5
4396   (eval $ac_link) 2>&5
4397   ac_status=$?
4398   echo "$as_me:4398: \$? = $ac_status" >&5
4399   (exit $ac_status); } &&
4400          { ac_try='test -s conftest$ac_exeext'
4401   { (eval echo "$as_me:4401: \"$ac_try\"") >&5
4402   (eval $ac_try) 2>&5
4403   ac_status=$?
4404   echo "$as_me:4404: \$? = $ac_status" >&5
4405   (exit $ac_status); }; }; then
4406   ac_cv_lib_gpm_Gpm_Open=yes
4407 else
4408   echo "$as_me: failed program was:" >&5
4409 cat conftest.$ac_ext >&5
4410 ac_cv_lib_gpm_Gpm_Open=no
4411 fi
4412 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4413 LIBS=$ac_check_lib_save_LIBS
4414 fi
4415 echo "$as_me:4415: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4416 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4417 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4418   :
4419 else
4420
4421                                 { { echo "$as_me:4421: error: Cannot link with GPM library" >&5
4422 echo "$as_me: error: Cannot link with GPM library" >&2;}
4423    { (exit 1); exit 1; }; }
4424                 fi
4425                 with_gpm=yes
4426
4427 fi
4428
4429 else
4430
4431                 test "$with_gpm" != maybe && { echo "$as_me:4431: WARNING: Cannot find GPM header" >&5
4432 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4433                 with_gpm=no
4434
4435 fi
4436
4437 fi
4438
4439 if test "$with_gpm" != no ; then
4440         echo "$as_me:4440: checking if you want to load GPM dynamically" >&5
4441 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4442
4443 # Check whether --with-dlsym or --without-dlsym was given.
4444 if test "${with_dlsym+set}" = set; then
4445   withval="$with_dlsym"
4446   with_dlsym=$withval
4447 else
4448   with_dlsym=yes
4449 fi;
4450         echo "$as_me:4450: result: $with_dlsym" >&5
4451 echo "${ECHO_T}$with_dlsym" >&6
4452         if test "$with_dlsym" = yes ; then
4453
4454 cf_have_dlsym=no
4455 echo "$as_me:4455: checking for dlsym" >&5
4456 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4457 if test "${ac_cv_func_dlsym+set}" = set; then
4458   echo $ECHO_N "(cached) $ECHO_C" >&6
4459 else
4460   cat >conftest.$ac_ext <<_ACEOF
4461 #line 4461 "configure"
4462 #include "confdefs.h"
4463 /* System header to define __stub macros and hopefully few prototypes,
4464     which can conflict with char dlsym (); below.  */
4465 #include <assert.h>
4466 /* Override any gcc2 internal prototype to avoid an error.  */
4467 #ifdef __cplusplus
4468 extern "C"
4469 #endif
4470 /* We use char because int might match the return type of a gcc2
4471    builtin and then its argument prototype would still apply.  */
4472 char dlsym ();
4473 char (*f) ();
4474
4475 int
4476 main ()
4477 {
4478 /* The GNU C library defines this for functions which it implements
4479     to always fail with ENOSYS.  Some functions are actually named
4480     something starting with __ and the normal name is an alias.  */
4481 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4482 choke me
4483 #else
4484 f = dlsym;
4485 #endif
4486
4487   ;
4488   return 0;
4489 }
4490 _ACEOF
4491 rm -f conftest.$ac_objext conftest$ac_exeext
4492 if { (eval echo "$as_me:4492: \"$ac_link\"") >&5
4493   (eval $ac_link) 2>&5
4494   ac_status=$?
4495   echo "$as_me:4495: \$? = $ac_status" >&5
4496   (exit $ac_status); } &&
4497          { ac_try='test -s conftest$ac_exeext'
4498   { (eval echo "$as_me:4498: \"$ac_try\"") >&5
4499   (eval $ac_try) 2>&5
4500   ac_status=$?
4501   echo "$as_me:4501: \$? = $ac_status" >&5
4502   (exit $ac_status); }; }; then
4503   ac_cv_func_dlsym=yes
4504 else
4505   echo "$as_me: failed program was:" >&5
4506 cat conftest.$ac_ext >&5
4507 ac_cv_func_dlsym=no
4508 fi
4509 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4510 fi
4511 echo "$as_me:4511: result: $ac_cv_func_dlsym" >&5
4512 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4513 if test $ac_cv_func_dlsym = yes; then
4514   cf_have_dlsym=yes
4515 else
4516
4517 cf_have_libdl=no
4518 echo "$as_me:4518: checking for dlsym in -ldl" >&5
4519 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4520 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4521   echo $ECHO_N "(cached) $ECHO_C" >&6
4522 else
4523   ac_check_lib_save_LIBS=$LIBS
4524 LIBS="-ldl  $LIBS"
4525 cat >conftest.$ac_ext <<_ACEOF
4526 #line 4526 "configure"
4527 #include "confdefs.h"
4528
4529 /* Override any gcc2 internal prototype to avoid an error.  */
4530 #ifdef __cplusplus
4531 extern "C"
4532 #endif
4533 /* We use char because int might match the return type of a gcc2
4534    builtin and then its argument prototype would still apply.  */
4535 char dlsym ();
4536 int
4537 main ()
4538 {
4539 dlsym ();
4540   ;
4541   return 0;
4542 }
4543 _ACEOF
4544 rm -f conftest.$ac_objext conftest$ac_exeext
4545 if { (eval echo "$as_me:4545: \"$ac_link\"") >&5
4546   (eval $ac_link) 2>&5
4547   ac_status=$?
4548   echo "$as_me:4548: \$? = $ac_status" >&5
4549   (exit $ac_status); } &&
4550          { ac_try='test -s conftest$ac_exeext'
4551   { (eval echo "$as_me:4551: \"$ac_try\"") >&5
4552   (eval $ac_try) 2>&5
4553   ac_status=$?
4554   echo "$as_me:4554: \$? = $ac_status" >&5
4555   (exit $ac_status); }; }; then
4556   ac_cv_lib_dl_dlsym=yes
4557 else
4558   echo "$as_me: failed program was:" >&5
4559 cat conftest.$ac_ext >&5
4560 ac_cv_lib_dl_dlsym=no
4561 fi
4562 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4563 LIBS=$ac_check_lib_save_LIBS
4564 fi
4565 echo "$as_me:4565: result: $ac_cv_lib_dl_dlsym" >&5
4566 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4567 if test $ac_cv_lib_dl_dlsym = yes; then
4568
4569         cf_have_dlsym=yes
4570         cf_have_libdl=yes
4571 fi
4572
4573 fi
4574
4575 if test "$cf_have_dlsym" = yes ; then
4576         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4577
4578         echo "$as_me:4578: checking whether able to link to dl*() functions" >&5
4579 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4580         cat >conftest.$ac_ext <<_ACEOF
4581 #line 4581 "configure"
4582 #include "confdefs.h"
4583 #include <dlfcn.h>
4584 int
4585 main ()
4586 {
4587
4588                 void *obj;
4589                 if ((obj = dlopen("filename", 0)) != 0) {
4590                         if (dlsym(obj, "symbolname") == 0) {
4591                         dlclose(obj);
4592                         }
4593                 }
4594   ;
4595   return 0;
4596 }
4597 _ACEOF
4598 rm -f conftest.$ac_objext conftest$ac_exeext
4599 if { (eval echo "$as_me:4599: \"$ac_link\"") >&5
4600   (eval $ac_link) 2>&5
4601   ac_status=$?
4602   echo "$as_me:4602: \$? = $ac_status" >&5
4603   (exit $ac_status); } &&
4604          { ac_try='test -s conftest$ac_exeext'
4605   { (eval echo "$as_me:4605: \"$ac_try\"") >&5
4606   (eval $ac_try) 2>&5
4607   ac_status=$?
4608   echo "$as_me:4608: \$? = $ac_status" >&5
4609   (exit $ac_status); }; }; then
4610
4611                 cat >>confdefs.h <<\EOF
4612 #define HAVE_LIBDL 1
4613 EOF
4614
4615 else
4616   echo "$as_me: failed program was:" >&5
4617 cat conftest.$ac_ext >&5
4618
4619                 { { echo "$as_me:4619: error: Cannot link test program for libdl" >&5
4620 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4621    { (exit 1); exit 1; }; }
4622 fi
4623 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4624         echo "$as_me:4624: result: ok" >&5
4625 echo "${ECHO_T}ok" >&6
4626 else
4627         { { echo "$as_me:4627: error: Cannot find dlsym function" >&5
4628 echo "$as_me: error: Cannot find dlsym function" >&2;}
4629    { (exit 1); exit 1; }; }
4630 fi
4631
4632                 if test "$with_gpm" != yes ; then
4633                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4634
4635 echo "${as_me-configure}:4635: testing assuming soname for gpm is $with_gpm ..." 1>&5
4636
4637                         cf_cv_gpm_soname="$with_gpm"
4638                 else
4639
4640 echo "$as_me:4640: checking for soname of gpm library" >&5
4641 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4642 if test "${cf_cv_gpm_soname+set}" = set; then
4643   echo $ECHO_N "(cached) $ECHO_C" >&6
4644 else
4645
4646 cf_cv_gpm_soname=unknown
4647 if test "$cross_compiling" != yes ; then
4648 cat >conftest.$ac_ext <<CF_EOF
4649 #include <gpm.h>
4650 int main()
4651 {
4652 if (Gpm_Open(0,0)) Gpm_Close();
4653         ${cf_cv_main_return:-return}(0);
4654 }
4655 CF_EOF
4656 cf_save_LIBS="$LIBS"
4657         LIBS="-lgpm $LIBS"
4658         if { (eval echo "$as_me:4658: \"$ac_compile\"") >&5
4659   (eval $ac_compile) 2>&5
4660   ac_status=$?
4661   echo "$as_me:4661: \$? = $ac_status" >&5
4662   (exit $ac_status); } ; then
4663                 if { (eval echo "$as_me:4663: \"$ac_link\"") >&5
4664   (eval $ac_link) 2>&5
4665   ac_status=$?
4666   echo "$as_me:4666: \$? = $ac_status" >&5
4667   (exit $ac_status); } ; then
4668                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4669                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4670                 fi
4671         fi
4672 rm -f conftest*
4673 LIBS="$cf_save_LIBS"
4674 fi
4675
4676 fi
4677 echo "$as_me:4677: result: $cf_cv_gpm_soname" >&5
4678 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4679
4680                 fi
4681                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
4682 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4683 EOF
4684
4685                 SHLIB_LIST="-ldl $SHLIB_LIST"
4686         else
4687                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4688         fi
4689         cat >>confdefs.h <<\EOF
4690 #define HAVE_LIBGPM 1
4691 EOF
4692
4693 echo "$as_me:4693: checking for Gpm_Wgetch in -lgpm" >&5
4694 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4695 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4696   echo $ECHO_N "(cached) $ECHO_C" >&6
4697 else
4698   ac_check_lib_save_LIBS=$LIBS
4699 LIBS="-lgpm  $LIBS"
4700 cat >conftest.$ac_ext <<_ACEOF
4701 #line 4701 "configure"
4702 #include "confdefs.h"
4703
4704 /* Override any gcc2 internal prototype to avoid an error.  */
4705 #ifdef __cplusplus
4706 extern "C"
4707 #endif
4708 /* We use char because int might match the return type of a gcc2
4709    builtin and then its argument prototype would still apply.  */
4710 char Gpm_Wgetch ();
4711 int
4712 main ()
4713 {
4714 Gpm_Wgetch ();
4715   ;
4716   return 0;
4717 }
4718 _ACEOF
4719 rm -f conftest.$ac_objext conftest$ac_exeext
4720 if { (eval echo "$as_me:4720: \"$ac_link\"") >&5
4721   (eval $ac_link) 2>&5
4722   ac_status=$?
4723   echo "$as_me:4723: \$? = $ac_status" >&5
4724   (exit $ac_status); } &&
4725          { ac_try='test -s conftest$ac_exeext'
4726   { (eval echo "$as_me:4726: \"$ac_try\"") >&5
4727   (eval $ac_try) 2>&5
4728   ac_status=$?
4729   echo "$as_me:4729: \$? = $ac_status" >&5
4730   (exit $ac_status); }; }; then
4731   ac_cv_lib_gpm_Gpm_Wgetch=yes
4732 else
4733   echo "$as_me: failed program was:" >&5
4734 cat conftest.$ac_ext >&5
4735 ac_cv_lib_gpm_Gpm_Wgetch=no
4736 fi
4737 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4738 LIBS=$ac_check_lib_save_LIBS
4739 fi
4740 echo "$as_me:4740: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
4741 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
4742 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
4743
4744 echo "$as_me:4744: checking if GPM is weakly bound to curses library" >&5
4745 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
4746 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
4747   echo $ECHO_N "(cached) $ECHO_C" >&6
4748 else
4749
4750 cf_cv_check_gpm_wgetch=unknown
4751 if test "$cross_compiling" != yes ; then
4752
4753 cat >conftest.$ac_ext <<CF_EOF
4754 #include <gpm.h>
4755 int main()
4756 {
4757         Gpm_Wgetch();
4758         ${cf_cv_main_return:-return}(0);
4759 }
4760 CF_EOF
4761
4762         cf_save_LIBS="$LIBS"
4763         # This only works if we can look at the symbol table.  If a shared
4764         # library is stripped for install, we cannot use that.  So we're forced
4765         # to rely on the static library, noting that some packagers may not
4766         # include it.
4767         LIBS="-static -lgpm -dynamic $LIBS"
4768         if { (eval echo "$as_me:4768: \"$ac_compile\"") >&5
4769   (eval $ac_compile) 2>&5
4770   ac_status=$?
4771   echo "$as_me:4771: \$? = $ac_status" >&5
4772   (exit $ac_status); } ; then
4773                 if { (eval echo "$as_me:4773: \"$ac_link\"") >&5
4774   (eval $ac_link) 2>&5
4775   ac_status=$?
4776   echo "$as_me:4776: \$? = $ac_status" >&5
4777   (exit $ac_status); } ; then
4778                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
4779                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
4780                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
4781                 fi
4782         fi
4783         rm -f conftest*
4784         LIBS="$cf_save_LIBS"
4785 fi
4786
4787 fi
4788 echo "$as_me:4788: result: $cf_cv_check_gpm_wgetch" >&5
4789 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
4790
4791 if test "$cf_cv_check_gpm_wgetch" != yes ; then
4792         { echo "$as_me:4792: WARNING: GPM library is already linked with curses - read the FAQ" >&5
4793 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
4794 fi
4795
4796 fi
4797
4798 fi
4799
4800 # not everyone has "test -c"
4801 if test -c /dev/sysmouse 2>/dev/null ; then
4802 echo "$as_me:4802: checking if you want to use sysmouse" >&5
4803 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
4804
4805 # Check whether --with-sysmouse or --without-sysmouse was given.
4806 if test "${with_sysmouse+set}" = set; then
4807   withval="$with_sysmouse"
4808   cf_with_sysmouse=$withval
4809 else
4810   cf_with_sysmouse=maybe
4811 fi;
4812         if test "$cf_with_sysmouse" != no ; then
4813         cat >conftest.$ac_ext <<_ACEOF
4814 #line 4814 "configure"
4815 #include "confdefs.h"
4816
4817 #include <osreldate.h>
4818 #if (__FreeBSD_version >= 400017)
4819 #include <sys/consio.h>
4820 #include <sys/fbio.h>
4821 #else
4822 #include <machine/console.h>
4823 #endif
4824
4825 int
4826 main ()
4827 {
4828
4829         struct mouse_info the_mouse;
4830         ioctl(0, CONS_MOUSECTL, &the_mouse);
4831
4832   ;
4833   return 0;
4834 }
4835 _ACEOF
4836 rm -f conftest.$ac_objext
4837 if { (eval echo "$as_me:4837: \"$ac_compile\"") >&5
4838   (eval $ac_compile) 2>&5
4839   ac_status=$?
4840   echo "$as_me:4840: \$? = $ac_status" >&5
4841   (exit $ac_status); } &&
4842          { ac_try='test -s conftest.$ac_objext'
4843   { (eval echo "$as_me:4843: \"$ac_try\"") >&5
4844   (eval $ac_try) 2>&5
4845   ac_status=$?
4846   echo "$as_me:4846: \$? = $ac_status" >&5
4847   (exit $ac_status); }; }; then
4848   cf_with_sysmouse=yes
4849 else
4850   echo "$as_me: failed program was:" >&5
4851 cat conftest.$ac_ext >&5
4852 cf_with_sysmouse=no
4853 fi
4854 rm -f conftest.$ac_objext conftest.$ac_ext
4855         fi
4856 echo "$as_me:4856: result: $cf_with_sysmouse" >&5
4857 echo "${ECHO_T}$cf_with_sysmouse" >&6
4858 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
4859 #define USE_SYSMOUSE 1
4860 EOF
4861
4862 fi
4863
4864 if test X"$CC_G_OPT" = X"" ; then
4865         CC_G_OPT='-g'
4866         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
4867 fi
4868
4869 if test X"$CXX_G_OPT" = X"" ; then
4870         CXX_G_OPT='-g'
4871         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
4872 fi
4873
4874 echo "$as_me:4874: checking for default loader flags" >&5
4875 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
4876 case $DFT_LWR_MODEL in
4877 libtool) LD_MODEL=''   ;;
4878 normal)  LD_MODEL=''   ;;
4879 debug)   LD_MODEL=$CC_G_OPT ;;
4880 profile) LD_MODEL='-pg';;
4881 shared)  LD_MODEL=''   ;;
4882 esac
4883 echo "$as_me:4883: result: $LD_MODEL" >&5
4884 echo "${ECHO_T}$LD_MODEL" >&6
4885
4886 case $DFT_LWR_MODEL in
4887 shared)
4888
4889 echo "$as_me:4889: checking if rpath option should be used" >&5
4890 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
4891
4892 # Check whether --enable-rpath or --disable-rpath was given.
4893 if test "${enable_rpath+set}" = set; then
4894   enableval="$enable_rpath"
4895   cf_cv_ld_rpath=$enableval
4896 else
4897   cf_cv_ld_rpath=no
4898 fi;
4899 echo "$as_me:4899: result: $cf_cv_ld_rpath" >&5
4900 echo "${ECHO_T}$cf_cv_ld_rpath" >&6
4901
4902 echo "$as_me:4902: checking if shared libraries should be relinked during install" >&5
4903 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
4904
4905 # Check whether --enable-relink or --disable-relink was given.
4906 if test "${enable_relink+set}" = set; then
4907   enableval="$enable_relink"
4908   cf_cv_do_relink=$enableval
4909 else
4910   cf_cv_do_relink=yes
4911 fi;
4912 echo "$as_me:4912: result: $cf_cv_do_relink" >&5
4913 echo "${ECHO_T}$cf_cv_do_relink" >&6
4914         ;;
4915 esac
4916
4917         LOCAL_LDFLAGS=
4918         LOCAL_LDFLAGS2=
4919         LD_SHARED_OPTS=
4920         INSTALL_LIB="-m 644"
4921
4922         cf_cv_do_symlinks=no
4923
4924         echo "$as_me:4924: checking if release/abi version should be used for shared libs" >&5
4925 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
4926
4927 # Check whether --with-shlib-version or --without-shlib-version was given.
4928 if test "${with_shlib_version+set}" = set; then
4929   withval="$with_shlib_version"
4930   test -z "$withval" && withval=auto
4931         case $withval in #(vi
4932         yes) #(vi
4933                 cf_cv_shlib_version=auto
4934                 ;;
4935         rel|abi|auto|no) #(vi
4936                 cf_cv_shlib_version=$withval
4937                 ;;
4938         *)
4939                 { { echo "$as_me:4939: error: option value must be one of: rel, abi, auto or no" >&5
4940 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
4941    { (exit 1); exit 1; }; }
4942                 ;;
4943         esac
4944
4945 else
4946   cf_cv_shlib_version=auto
4947 fi;
4948         echo "$as_me:4948: result: $cf_cv_shlib_version" >&5
4949 echo "${ECHO_T}$cf_cv_shlib_version" >&6
4950
4951         cf_cv_rm_so_locs=no
4952
4953         # Some less-capable ports of gcc support only -fpic
4954         CC_SHARED_OPTS=
4955         if test "$GCC" = yes
4956         then
4957                 echo "$as_me:4957: checking which $CC option to use" >&5
4958 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
4959                 cf_save_CFLAGS="$CFLAGS"
4960                 for CC_SHARED_OPTS in -fPIC -fpic ''
4961                 do
4962                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
4963                         cat >conftest.$ac_ext <<_ACEOF
4964 #line 4964 "configure"
4965 #include "confdefs.h"
4966 #include <stdio.h>
4967 int
4968 main ()
4969 {
4970 int x = 1
4971   ;
4972   return 0;
4973 }
4974 _ACEOF
4975 rm -f conftest.$ac_objext
4976 if { (eval echo "$as_me:4976: \"$ac_compile\"") >&5
4977   (eval $ac_compile) 2>&5
4978   ac_status=$?
4979   echo "$as_me:4979: \$? = $ac_status" >&5
4980   (exit $ac_status); } &&
4981          { ac_try='test -s conftest.$ac_objext'
4982   { (eval echo "$as_me:4982: \"$ac_try\"") >&5
4983   (eval $ac_try) 2>&5
4984   ac_status=$?
4985   echo "$as_me:4985: \$? = $ac_status" >&5
4986   (exit $ac_status); }; }; then
4987   break
4988 else
4989   echo "$as_me: failed program was:" >&5
4990 cat conftest.$ac_ext >&5
4991 fi
4992 rm -f conftest.$ac_objext conftest.$ac_ext
4993                 done
4994                 echo "$as_me:4994: result: $CC_SHARED_OPTS" >&5
4995 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
4996                 CFLAGS="$cf_save_CFLAGS"
4997         fi
4998
4999         cf_cv_shlib_version_infix=no
5000
5001         case $cf_cv_system_name in
5002         beos*)
5003                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5004                 ;;
5005         cygwin*)
5006                 CC_SHARED_OPTS=
5007                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5008                 cf_cv_shlib_version=cygdll
5009                 cf_cv_shlib_version_infix=cygdll
5010                 cat >mk_shared_lib.sh <<-CF_EOF
5011                 #!/bin/sh
5012                 SHARED_LIB=\$1
5013                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5014                 shift
5015                 cat <<-EOF
5016                 Linking shared library
5017                 ** SHARED_LIB \$SHARED_LIB
5018                 ** IMPORT_LIB \$IMPORT_LIB
5019 EOF
5020                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5021 CF_EOF
5022                 chmod +x mk_shared_lib.sh
5023                 ;;
5024         darwin*)
5025                 EXTRA_CFLAGS="-no-cpp-precomp"
5026                 CC_SHARED_OPTS="-dynamic"
5027                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5028                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5029                 cf_cv_shlib_version_infix=yes
5030                 echo "$as_me:5030: checking if ld -search_paths_first works" >&5
5031 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5032 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5033   echo $ECHO_N "(cached) $ECHO_C" >&6
5034 else
5035
5036                         cf_save_LDFLAGS=$LDFLAGS
5037                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5038                         cat >conftest.$ac_ext <<_ACEOF
5039 #line 5039 "configure"
5040 #include "confdefs.h"
5041
5042 int
5043 main ()
5044 {
5045 int i;
5046   ;
5047   return 0;
5048 }
5049 _ACEOF
5050 rm -f conftest.$ac_objext conftest$ac_exeext
5051 if { (eval echo "$as_me:5051: \"$ac_link\"") >&5
5052   (eval $ac_link) 2>&5
5053   ac_status=$?
5054   echo "$as_me:5054: \$? = $ac_status" >&5
5055   (exit $ac_status); } &&
5056          { ac_try='test -s conftest$ac_exeext'
5057   { (eval echo "$as_me:5057: \"$ac_try\"") >&5
5058   (eval $ac_try) 2>&5
5059   ac_status=$?
5060   echo "$as_me:5060: \$? = $ac_status" >&5
5061   (exit $ac_status); }; }; then
5062   cf_cv_ldflags_search_paths_first=yes
5063 else
5064   echo "$as_me: failed program was:" >&5
5065 cat conftest.$ac_ext >&5
5066 cf_cv_ldflags_search_paths_first=no
5067 fi
5068 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5069                                 LDFLAGS=$cf_save_LDFLAGS
5070 fi
5071 echo "$as_me:5071: result: $cf_cv_ldflags_search_paths_first" >&5
5072 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5073                 if test $cf_cv_ldflags_search_paths_first = yes; then
5074                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5075                 fi
5076                 ;;
5077         hpux*)
5078                 # (tested with gcc 2.7.2 -- I don't have c89)
5079                 if test "$GCC" = yes; then
5080                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5081                 else
5082                         CC_SHARED_OPTS='+Z'
5083                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5084                 fi
5085                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5086                 # HP-UX shared libraries must be executable, and should be
5087                 # readonly to exploit a quirk in the memory manager.
5088                 INSTALL_LIB="-m 555"
5089                 ;;
5090         irix*)
5091                 if test "$cf_cv_ld_rpath" = yes ; then
5092                         if test "$GCC" = yes; then
5093                                 cf_ld_rpath_opt="-Wl,-rpath,"
5094                                 EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5095                         else
5096                                 cf_ld_rpath_opt="-rpath "
5097                                 EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5098                         fi
5099                 fi
5100                 # tested with IRIX 5.2 and 'cc'.
5101                 if test "$GCC" != yes; then
5102                         CC_SHARED_OPTS='-KPIC'
5103                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5104                 else
5105                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5106                 fi
5107                 cf_cv_rm_so_locs=yes
5108                 ;;
5109         linux*|gnu*|k*bsd*-gnu)
5110                 if test "$DFT_LWR_MODEL" = "shared" ; then
5111                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5112                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5113                 fi
5114                 if test "$cf_cv_ld_rpath" = yes ; then
5115                         cf_ld_rpath_opt="-Wl,-rpath,"
5116                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5117                 fi
5118
5119         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5120         if test "$cf_cv_shlib_version" = rel; then
5121                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5122         else
5123                 cf_cv_shared_soname='`basename $@`'
5124         fi
5125
5126                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5127                 ;;
5128         openbsd[2-9].*)
5129                 if test "$DFT_LWR_MODEL" = "shared" ; then
5130                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5131                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5132                 fi
5133                 if test "$cf_cv_ld_rpath" = yes ; then
5134                         cf_ld_rpath_opt="-Wl,-rpath,"
5135                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5136                 fi
5137                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5138
5139         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5140         if test "$cf_cv_shlib_version" = rel; then
5141                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5142         else
5143                 cf_cv_shared_soname='`basename $@`'
5144         fi
5145
5146                 MK_SHARED_LIB='${CC} ${CFLAGS} -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5147                 ;;
5148         openbsd*|freebsd[12].*)
5149                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5150                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5151                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5152                 ;;
5153         freebsd*)
5154                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5155                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5156                         LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
5157                         LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
5158                         cf_ld_rpath_opt="-rpath "
5159                         EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5160                 fi
5161
5162         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5163         if test "$cf_cv_shlib_version" = rel; then
5164                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5165         else
5166                 cf_cv_shared_soname='`basename $@`'
5167         fi
5168
5169                 MK_SHARED_LIB='${LD} -Bshareable -soname=`basename $@` -o $@'
5170                 ;;
5171         netbsd*)
5172                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5173                 test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
5174                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5175                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5176                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5177                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5178                         if test "$cf_cv_shlib_version" = auto; then
5179                         if test -f /usr/libexec/ld.elf_so; then
5180                                 cf_cv_shlib_version=abi
5181                         else
5182                                 cf_cv_shlib_version=rel
5183                         fi
5184                         fi
5185
5186         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5187         if test "$cf_cv_shlib_version" = rel; then
5188                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5189         else
5190                 cf_cv_shared_soname='`basename $@`'
5191         fi
5192
5193                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5194                 else
5195                         MK_SHARED_LIB='${LD} -Bshareable -o $@'
5196                 fi
5197                 ;;
5198         osf*|mls+*)
5199                 # tested with OSF/1 V3.2 and 'cc'
5200                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5201                 # link with shared libs).
5202                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5203                 case $host_os in
5204                 osf4*)
5205                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5206                         ;;
5207                 esac
5208                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5209                 if test "$DFT_LWR_MODEL" = "shared" ; then
5210                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5211                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5212                 fi
5213                 if test "$cf_cv_ld_rpath" = yes ; then
5214                         cf_ld_rpath_opt="-rpath"
5215                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5216                 fi
5217                 cf_cv_rm_so_locs=yes
5218                 ;;
5219         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
5220                 # tested with osr5.0.5
5221                 if test "$GCC" != yes; then
5222                         CC_SHARED_OPTS='-belf -KPIC'
5223                 fi
5224                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5225                 if test "$cf_cv_ld_rpath" = yes ; then
5226                         # only way is to set LD_RUN_PATH but no switch for it
5227                         RUN_PATH=$libdir
5228                 fi
5229                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5230                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5231                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5232                 ;;
5233         sunos4*)
5234                 # tested with SunOS 4.1.1 and gcc 2.7.0
5235                 if test "$GCC" != yes; then
5236                         CC_SHARED_OPTS='-KPIC'
5237                 fi
5238                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5239                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5240                 ;;
5241         solaris2*)
5242                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5243                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5244                 if test "$DFT_LWR_MODEL" = "shared" ; then
5245                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5246                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5247                 fi
5248                 if test "$cf_cv_ld_rpath" = yes ; then
5249                         cf_ld_rpath_opt="-R"
5250                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5251                 fi
5252
5253         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5254         if test "$cf_cv_shlib_version" = rel; then
5255                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5256         else
5257                 cf_cv_shared_soname='`basename $@`'
5258         fi
5259
5260                 if test "$GCC" != yes; then
5261                         CC_SHARED_OPTS='-xcode=pic32'
5262                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5263                 else
5264                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5265                 fi
5266                 ;;
5267         sysv5uw7*|unix_sv*)
5268                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5269                 if test "$GCC" != yes; then
5270                         CC_SHARED_OPTS='-KPIC'
5271                 fi
5272                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5273                 ;;
5274         *)
5275                 CC_SHARED_OPTS='unknown'
5276                 MK_SHARED_LIB='echo unknown'
5277                 ;;
5278         esac
5279
5280         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5281         case "$cf_cv_shlib_version" in #(vi
5282         rel|abi)
5283                 case "$MK_SHARED_LIB" in #(vi
5284                 *'-o $@')
5285                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5286                         ;;
5287                 *)
5288                         { echo "$as_me:5288: WARNING: ignored --with-shlib-version" >&5
5289 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5290                         ;;
5291                 esac
5292                 ;;
5293         esac
5294
5295         if test -n "$cf_ld_rpath_opt" ; then
5296                 echo "$as_me:5296: checking if we need a space after rpath option" >&5
5297 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5298                 cf_save_LIBS="$LIBS"
5299                 LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
5300                 cat >conftest.$ac_ext <<_ACEOF
5301 #line 5301 "configure"
5302 #include "confdefs.h"
5303
5304 int
5305 main ()
5306 {
5307
5308   ;
5309   return 0;
5310 }
5311 _ACEOF
5312 rm -f conftest.$ac_objext conftest$ac_exeext
5313 if { (eval echo "$as_me:5313: \"$ac_link\"") >&5
5314   (eval $ac_link) 2>&5
5315   ac_status=$?
5316   echo "$as_me:5316: \$? = $ac_status" >&5
5317   (exit $ac_status); } &&
5318          { ac_try='test -s conftest$ac_exeext'
5319   { (eval echo "$as_me:5319: \"$ac_try\"") >&5
5320   (eval $ac_try) 2>&5
5321   ac_status=$?
5322   echo "$as_me:5322: \$? = $ac_status" >&5
5323   (exit $ac_status); }; }; then
5324   cf_rpath_space=no
5325 else
5326   echo "$as_me: failed program was:" >&5
5327 cat conftest.$ac_ext >&5
5328 cf_rpath_space=yes
5329 fi
5330 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5331                 LIBS="$cf_save_LIBS"
5332                 echo "$as_me:5332: result: $cf_rpath_space" >&5
5333 echo "${ECHO_T}$cf_rpath_space" >&6
5334                 test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
5335                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5336         fi
5337
5338 if test "$CC_SHARED_OPTS" = "unknown"; then
5339         for model in $cf_list_models; do
5340                 if test "$model" = "shared"; then
5341                         { { echo "$as_me:5341: error: Shared libraries are not supported in this version" >&5
5342 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5343    { (exit 1); exit 1; }; }
5344                 fi
5345         done
5346 fi
5347
5348 ###############################################################################
5349
5350 ###     use option --disable-overwrite to leave out the link to -lcurses
5351 echo "$as_me:5351: checking if you wish to install ncurses overwriting curses" >&5
5352 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5353
5354 # Check whether --enable-overwrite or --disable-overwrite was given.
5355 if test "${enable_overwrite+set}" = set; then
5356   enableval="$enable_overwrite"
5357   with_overwrite=$enableval
5358 else
5359   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5360 fi;
5361 echo "$as_me:5361: result: $with_overwrite" >&5
5362 echo "${ECHO_T}$with_overwrite" >&6
5363
5364 echo "$as_me:5364: checking if external terminfo-database is used" >&5
5365 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5366
5367 # Check whether --enable-database or --disable-database was given.
5368 if test "${enable_database+set}" = set; then
5369   enableval="$enable_database"
5370   use_database=$enableval
5371 else
5372   use_database=yes
5373 fi;
5374 echo "$as_me:5374: result: $use_database" >&5
5375 echo "${ECHO_T}$use_database" >&6
5376
5377 case $host_os in #(vi
5378 os2*) #(vi
5379         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5380         ;;
5381 *) #(vi
5382         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5383         ;;
5384 esac
5385
5386         case $cf_cv_system_name in
5387         os2*)   PATHSEP=';'  ;;
5388         *)      PATHSEP=':'  ;;
5389         esac
5390
5391 if test "$use_database" != no ; then
5392         cat >>confdefs.h <<\EOF
5393 #define USE_DATABASE 1
5394 EOF
5395
5396         echo "$as_me:5396: checking which terminfo source-file will be installed" >&5
5397 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5398
5399 # Check whether --enable-database or --disable-database was given.
5400 if test "${enable_database+set}" = set; then
5401   enableval="$enable_database"
5402   TERMINFO_SRC=$withval
5403 fi;
5404         echo "$as_me:5404: result: $TERMINFO_SRC" >&5
5405 echo "${ECHO_T}$TERMINFO_SRC" >&6
5406
5407         echo "$as_me:5407: checking whether to use hashed database instead of directory/tree" >&5
5408 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5409
5410 # Check whether --with-hashed-db or --without-hashed-db was given.
5411 if test "${with_hashed_db+set}" = set; then
5412   withval="$with_hashed_db"
5413
5414 else
5415   with_hashed_db=no
5416 fi;
5417         echo "$as_me:5417: result: $with_hashed_db" >&5
5418 echo "${ECHO_T}$with_hashed_db" >&6
5419 fi
5420
5421 echo "$as_me:5421: checking for list of fallback descriptions" >&5
5422 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5423
5424 # Check whether --with-fallbacks or --without-fallbacks was given.
5425 if test "${with_fallbacks+set}" = set; then
5426   withval="$with_fallbacks"
5427   with_fallback=$withval
5428 else
5429   with_fallback=
5430 fi;
5431 echo "$as_me:5431: result: $with_fallback" >&5
5432 echo "${ECHO_T}$with_fallback" >&6
5433 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5434
5435 echo "$as_me:5435: checking if you want modern xterm or antique" >&5
5436 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5437
5438 # Check whether --with-xterm-new or --without-xterm-new was given.
5439 if test "${with_xterm_new+set}" = set; then
5440   withval="$with_xterm_new"
5441   with_xterm_new=$withval
5442 else
5443   with_xterm_new=yes
5444 fi;
5445 case $with_xterm_new in
5446 no)     with_xterm_new=xterm-old;;
5447 *)      with_xterm_new=xterm-new;;
5448 esac
5449 echo "$as_me:5449: result: $with_xterm_new" >&5
5450 echo "${ECHO_T}$with_xterm_new" >&6
5451 WHICH_XTERM=$with_xterm_new
5452
5453 MAKE_TERMINFO=
5454 if test "$use_database" = no ; then
5455         TERMINFO="${datadir}/terminfo"
5456         MAKE_TERMINFO="#"
5457 else
5458
5459 echo "$as_me:5459: checking for list of terminfo directories" >&5
5460 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5461
5462 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5463 if test "${with_terminfo_dirs+set}" = set; then
5464   withval="$with_terminfo_dirs"
5465
5466 else
5467   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5468 fi;
5469 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5470 cf_dst_path=
5471 for cf_src_path in $withval
5472 do
5473
5474 if test "x$prefix" != xNONE; then
5475   cf_path_syntax="$prefix"
5476 else
5477   cf_path_syntax="$ac_default_prefix"
5478 fi
5479
5480 case ".$cf_src_path" in #(vi
5481 .\$\(*\)*|.\'*\'*) #(vi
5482   ;;
5483 ..|./*|.\\*) #(vi
5484   ;;
5485 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5486   ;;
5487 .\${*prefix}*) #(vi
5488   eval cf_src_path="$cf_src_path"
5489   case ".$cf_src_path" in #(vi
5490   .NONE/*)
5491     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5492     ;;
5493   esac
5494   ;; #(vi
5495 .no|.NONE/*)
5496   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5497   ;;
5498 *)
5499   { { echo "$as_me:5499: error: expected a pathname, not \"$cf_src_path\"" >&5
5500 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5501    { (exit 1); exit 1; }; }
5502   ;;
5503 esac
5504
5505   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5506   cf_dst_path="${cf_dst_path}${cf_src_path}"
5507 done
5508 IFS="$ac_save_ifs"
5509
5510 eval 'TERMINFO_DIRS="$cf_dst_path"'
5511
5512 echo "$as_me:5512: result: $TERMINFO_DIRS" >&5
5513 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5514 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5515 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5516 EOF
5517
5518 echo "$as_me:5518: checking for default terminfo directory" >&5
5519 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5520
5521 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5522 if test "${with_default_terminfo_dir+set}" = set; then
5523   withval="$with_default_terminfo_dir"
5524
5525 else
5526   withval="${TERMINFO-${datadir}/terminfo}"
5527 fi; if test -n "${datadir}/terminfo" ; then
5528
5529 if test "x$prefix" != xNONE; then
5530   cf_path_syntax="$prefix"
5531 else
5532   cf_path_syntax="$ac_default_prefix"
5533 fi
5534
5535 case ".$withval" in #(vi
5536 .\$\(*\)*|.\'*\'*) #(vi
5537   ;;
5538 ..|./*|.\\*) #(vi
5539   ;;
5540 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5541   ;;
5542 .\${*prefix}*) #(vi
5543   eval withval="$withval"
5544   case ".$withval" in #(vi
5545   .NONE/*)
5546     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5547     ;;
5548   esac
5549   ;; #(vi
5550 .no|.NONE/*)
5551   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5552   ;;
5553 *)
5554   { { echo "$as_me:5554: error: expected a pathname, not \"$withval\"" >&5
5555 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5556    { (exit 1); exit 1; }; }
5557   ;;
5558 esac
5559
5560 fi
5561 TERMINFO="$withval"
5562
5563 echo "$as_me:5563: result: $TERMINFO" >&5
5564 echo "${ECHO_T}$TERMINFO" >&6
5565 cat >>confdefs.h <<EOF
5566 #define TERMINFO "$TERMINFO"
5567 EOF
5568
5569 fi
5570
5571 ###     use option --disable-big-core to make tic run on small machines
5572 ###     We need 4Mb, check if we can allocate 50% more than that.
5573 echo "$as_me:5573: checking if big-core option selected" >&5
5574 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5575
5576 # Check whether --enable-big-core or --disable-big-core was given.
5577 if test "${enable_big_core+set}" = set; then
5578   enableval="$enable_big_core"
5579   with_big_core=$enableval
5580 else
5581   if test "$cross_compiling" = yes; then
5582   with_big_core=no
5583 else
5584   cat >conftest.$ac_ext <<_ACEOF
5585 #line 5585 "configure"
5586 #include "confdefs.h"
5587
5588 #include <stdlib.h>
5589 #include <string.h>
5590 int main() {
5591         unsigned long n = 6000000L;
5592         char *s = malloc(n);
5593         if (s != 0)
5594                 s[0] = s[n-1] = 0;
5595         ${cf_cv_main_return:-return}(s == 0);
5596 }
5597 _ACEOF
5598 rm -f conftest$ac_exeext
5599 if { (eval echo "$as_me:5599: \"$ac_link\"") >&5
5600   (eval $ac_link) 2>&5
5601   ac_status=$?
5602   echo "$as_me:5602: \$? = $ac_status" >&5
5603   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5604   { (eval echo "$as_me:5604: \"$ac_try\"") >&5
5605   (eval $ac_try) 2>&5
5606   ac_status=$?
5607   echo "$as_me:5607: \$? = $ac_status" >&5
5608   (exit $ac_status); }; }; then
5609   with_big_core=yes
5610 else
5611   echo "$as_me: program exited with status $ac_status" >&5
5612 echo "$as_me: failed program was:" >&5
5613 cat conftest.$ac_ext >&5
5614 with_big_core=no
5615 fi
5616 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5617 fi
5618 fi;
5619 echo "$as_me:5619: result: $with_big_core" >&5
5620 echo "${ECHO_T}$with_big_core" >&6
5621 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
5622 #define HAVE_BIG_CORE 1
5623 EOF
5624
5625 ### ISO C only guarantees 512-char strings, we have tables which load faster
5626 ### when constructed using "big" strings.  More than the C compiler, the awk
5627 ### program is a limit on most vendor UNIX systems.  Check that we can build.
5628 echo "$as_me:5628: checking if big-strings option selected" >&5
5629 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
5630
5631 # Check whether --enable-big-strings or --disable-big-strings was given.
5632 if test "${enable_big_strings+set}" = set; then
5633   enableval="$enable_big_strings"
5634   with_big_strings=$enableval
5635 else
5636
5637     case x$AWK in #(vi
5638     x)
5639         eval with_big_strings=no
5640         ;;
5641     *) #(vi
5642         if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
5643             | $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
5644             eval with_big_strings=yes
5645         else
5646             eval with_big_strings=no
5647         fi
5648         ;;
5649     esac
5650
5651 fi;
5652 echo "$as_me:5652: result: $with_big_strings" >&5
5653 echo "${ECHO_T}$with_big_strings" >&6
5654
5655 USE_BIG_STRINGS=0
5656 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
5657
5658 ###     use option --enable-termcap to compile in the termcap fallback support
5659 echo "$as_me:5659: checking if you want termcap-fallback support" >&5
5660 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
5661
5662 # Check whether --enable-termcap or --disable-termcap was given.
5663 if test "${enable_termcap+set}" = set; then
5664   enableval="$enable_termcap"
5665   with_termcap=$enableval
5666 else
5667   with_termcap=no
5668 fi;
5669 echo "$as_me:5669: result: $with_termcap" >&5
5670 echo "${ECHO_T}$with_termcap" >&6
5671
5672 if test "$with_termcap" != "yes" ; then
5673         if test "$use_database" = no ; then
5674                 if test -z "$with_fallback" ; then
5675                         { { echo "$as_me:5675: error: You have disabled the database w/o specifying fallbacks" >&5
5676 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
5677    { (exit 1); exit 1; }; }
5678                 fi
5679         fi
5680         cat >>confdefs.h <<\EOF
5681 #define PURE_TERMINFO 1
5682 EOF
5683
5684 else
5685
5686 if test "$with_ticlib" != no ; then
5687         { { echo "$as_me:5687: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
5688 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
5689    { (exit 1); exit 1; }; }
5690 fi
5691
5692 cat >>confdefs.h <<\EOF
5693 #define USE_TERMCAP 1
5694 EOF
5695
5696 echo "$as_me:5696: checking for list of termcap files" >&5
5697 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
5698
5699 # Check whether --with-termpath or --without-termpath was given.
5700 if test "${with_termpath+set}" = set; then
5701   withval="$with_termpath"
5702
5703 else
5704   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
5705 fi;
5706 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5707 cf_dst_path=
5708 for cf_src_path in $withval
5709 do
5710
5711 if test "x$prefix" != xNONE; then
5712   cf_path_syntax="$prefix"
5713 else
5714   cf_path_syntax="$ac_default_prefix"
5715 fi
5716
5717 case ".$cf_src_path" in #(vi
5718 .\$\(*\)*|.\'*\'*) #(vi
5719   ;;
5720 ..|./*|.\\*) #(vi
5721   ;;
5722 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5723   ;;
5724 .\${*prefix}*) #(vi
5725   eval cf_src_path="$cf_src_path"
5726   case ".$cf_src_path" in #(vi
5727   .NONE/*)
5728     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5729     ;;
5730   esac
5731   ;; #(vi
5732 .no|.NONE/*)
5733   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5734   ;;
5735 *)
5736   { { echo "$as_me:5736: error: expected a pathname, not \"$cf_src_path\"" >&5
5737 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5738    { (exit 1); exit 1; }; }
5739   ;;
5740 esac
5741
5742   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5743   cf_dst_path="${cf_dst_path}${cf_src_path}"
5744 done
5745 IFS="$ac_save_ifs"
5746
5747 eval 'TERMPATH="$cf_dst_path"'
5748
5749 echo "$as_me:5749: result: $TERMPATH" >&5
5750 echo "${ECHO_T}$TERMPATH" >&6
5751 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
5752 #define TERMPATH "$TERMPATH"
5753 EOF
5754
5755 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
5756 echo "$as_me:5756: checking if fast termcap-loader is needed" >&5
5757 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
5758
5759 # Check whether --enable-getcap or --disable-getcap was given.
5760 if test "${enable_getcap+set}" = set; then
5761   enableval="$enable_getcap"
5762   with_getcap=$enableval
5763 else
5764   with_getcap=no
5765 fi;
5766 echo "$as_me:5766: result: $with_getcap" >&5
5767 echo "${ECHO_T}$with_getcap" >&6
5768 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
5769 #define USE_GETCAP 1
5770 EOF
5771
5772 echo "$as_me:5772: checking if translated termcaps will be cached in ~/.terminfo" >&5
5773 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
5774
5775 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
5776 if test "${enable_getcap_cache+set}" = set; then
5777   enableval="$enable_getcap_cache"
5778   with_getcap_cache=$enableval
5779 else
5780   with_getcap_cache=no
5781 fi;
5782 echo "$as_me:5782: result: $with_getcap_cache" >&5
5783 echo "${ECHO_T}$with_getcap_cache" >&6
5784 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
5785 #define USE_GETCAP_CACHE 1
5786 EOF
5787
5788 fi
5789
5790 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
5791 echo "$as_me:5791: checking if ~/.terminfo is wanted" >&5
5792 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
5793
5794 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
5795 if test "${enable_home_terminfo+set}" = set; then
5796   enableval="$enable_home_terminfo"
5797   with_home_terminfo=$enableval
5798 else
5799   with_home_terminfo=yes
5800 fi;
5801 echo "$as_me:5801: result: $with_home_terminfo" >&5
5802 echo "${ECHO_T}$with_home_terminfo" >&6
5803 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
5804 #define USE_HOME_TERMINFO 1
5805 EOF
5806
5807 echo "$as_me:5807: checking if you want to use restricted environment when running as root" >&5
5808 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
5809
5810 # Check whether --enable-root-environ or --disable-root-environ was given.
5811 if test "${enable_root_environ+set}" = set; then
5812   enableval="$enable_root_environ"
5813   with_root_environ=$enableval
5814 else
5815   with_root_environ=yes
5816 fi;
5817 echo "$as_me:5817: result: $with_root_environ" >&5
5818 echo "${ECHO_T}$with_root_environ" >&6
5819 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
5820 #define USE_ROOT_ENVIRON 1
5821 EOF
5822
5823 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
5824 ###   to reduce storage requirements for the terminfo database.
5825
5826 for ac_func in \
5827         remove \
5828         unlink
5829 do
5830 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5831 echo "$as_me:5831: checking for $ac_func" >&5
5832 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5833 if eval "test \"\${$as_ac_var+set}\" = set"; then
5834   echo $ECHO_N "(cached) $ECHO_C" >&6
5835 else
5836   cat >conftest.$ac_ext <<_ACEOF
5837 #line 5837 "configure"
5838 #include "confdefs.h"
5839 /* System header to define __stub macros and hopefully few prototypes,
5840     which can conflict with char $ac_func (); below.  */
5841 #include <assert.h>
5842 /* Override any gcc2 internal prototype to avoid an error.  */
5843 #ifdef __cplusplus
5844 extern "C"
5845 #endif
5846 /* We use char because int might match the return type of a gcc2
5847    builtin and then its argument prototype would still apply.  */
5848 char $ac_func ();
5849 char (*f) ();
5850
5851 int
5852 main ()
5853 {
5854 /* The GNU C library defines this for functions which it implements
5855     to always fail with ENOSYS.  Some functions are actually named
5856     something starting with __ and the normal name is an alias.  */
5857 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5858 choke me
5859 #else
5860 f = $ac_func;
5861 #endif
5862
5863   ;
5864   return 0;
5865 }
5866 _ACEOF
5867 rm -f conftest.$ac_objext conftest$ac_exeext
5868 if { (eval echo "$as_me:5868: \"$ac_link\"") >&5
5869   (eval $ac_link) 2>&5
5870   ac_status=$?
5871   echo "$as_me:5871: \$? = $ac_status" >&5
5872   (exit $ac_status); } &&
5873          { ac_try='test -s conftest$ac_exeext'
5874   { (eval echo "$as_me:5874: \"$ac_try\"") >&5
5875   (eval $ac_try) 2>&5
5876   ac_status=$?
5877   echo "$as_me:5877: \$? = $ac_status" >&5
5878   (exit $ac_status); }; }; then
5879   eval "$as_ac_var=yes"
5880 else
5881   echo "$as_me: failed program was:" >&5
5882 cat conftest.$ac_ext >&5
5883 eval "$as_ac_var=no"
5884 fi
5885 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5886 fi
5887 echo "$as_me:5887: result: `eval echo '${'$as_ac_var'}'`" >&5
5888 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5889 if test `eval echo '${'$as_ac_var'}'` = yes; then
5890   cat >>confdefs.h <<EOF
5891 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5892 EOF
5893
5894 fi
5895 done
5896
5897 if test "$cross_compiling" = yes ; then
5898
5899 for ac_func in \
5900                 link \
5901                 symlink
5902 do
5903 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5904 echo "$as_me:5904: checking for $ac_func" >&5
5905 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5906 if eval "test \"\${$as_ac_var+set}\" = set"; then
5907   echo $ECHO_N "(cached) $ECHO_C" >&6
5908 else
5909   cat >conftest.$ac_ext <<_ACEOF
5910 #line 5910 "configure"
5911 #include "confdefs.h"
5912 /* System header to define __stub macros and hopefully few prototypes,
5913     which can conflict with char $ac_func (); below.  */
5914 #include <assert.h>
5915 /* Override any gcc2 internal prototype to avoid an error.  */
5916 #ifdef __cplusplus
5917 extern "C"
5918 #endif
5919 /* We use char because int might match the return type of a gcc2
5920    builtin and then its argument prototype would still apply.  */
5921 char $ac_func ();
5922 char (*f) ();
5923
5924 int
5925 main ()
5926 {
5927 /* The GNU C library defines this for functions which it implements
5928     to always fail with ENOSYS.  Some functions are actually named
5929     something starting with __ and the normal name is an alias.  */
5930 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5931 choke me
5932 #else
5933 f = $ac_func;
5934 #endif
5935
5936   ;
5937   return 0;
5938 }
5939 _ACEOF
5940 rm -f conftest.$ac_objext conftest$ac_exeext
5941 if { (eval echo "$as_me:5941: \"$ac_link\"") >&5
5942   (eval $ac_link) 2>&5
5943   ac_status=$?
5944   echo "$as_me:5944: \$? = $ac_status" >&5
5945   (exit $ac_status); } &&
5946          { ac_try='test -s conftest$ac_exeext'
5947   { (eval echo "$as_me:5947: \"$ac_try\"") >&5
5948   (eval $ac_try) 2>&5
5949   ac_status=$?
5950   echo "$as_me:5950: \$? = $ac_status" >&5
5951   (exit $ac_status); }; }; then
5952   eval "$as_ac_var=yes"
5953 else
5954   echo "$as_me: failed program was:" >&5
5955 cat conftest.$ac_ext >&5
5956 eval "$as_ac_var=no"
5957 fi
5958 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5959 fi
5960 echo "$as_me:5960: result: `eval echo '${'$as_ac_var'}'`" >&5
5961 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5962 if test `eval echo '${'$as_ac_var'}'` = yes; then
5963   cat >>confdefs.h <<EOF
5964 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5965 EOF
5966
5967 fi
5968 done
5969
5970 else
5971         echo "$as_me:5971: checking if link/symlink functions work" >&5
5972 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
5973 if test "${cf_cv_link_funcs+set}" = set; then
5974   echo $ECHO_N "(cached) $ECHO_C" >&6
5975 else
5976
5977                 cf_cv_link_funcs=
5978                 for cf_func in link symlink ; do
5979                         if test "$cross_compiling" = yes; then
5980
5981                         eval 'ac_cv_func_'$cf_func'=error'
5982 else
5983   cat >conftest.$ac_ext <<_ACEOF
5984 #line 5984 "configure"
5985 #include "confdefs.h"
5986
5987 #include <sys/types.h>
5988 #include <sys/stat.h>
5989 #ifdef HAVE_UNISTD_H
5990 #include <unistd.h>
5991 #endif
5992 int main()
5993 {
5994         int fail = 0;
5995         char *src = "config.log";
5996         char *dst = "conftest.chk";
5997         struct stat src_sb;
5998         struct stat dst_sb;
5999
6000         stat(src, &src_sb);
6001         fail = ($cf_func("config.log", "conftest.chk") < 0)
6002             || (stat(dst, &dst_sb) < 0)
6003             || (dst_sb.st_mtime != src_sb.st_mtime);
6004 #ifdef HAVE_UNLINK
6005         unlink(dst);
6006 #else
6007         remove(dst);
6008 #endif
6009         ${cf_cv_main_return:-return} (fail);
6010 }
6011
6012 _ACEOF
6013 rm -f conftest$ac_exeext
6014 if { (eval echo "$as_me:6014: \"$ac_link\"") >&5
6015   (eval $ac_link) 2>&5
6016   ac_status=$?
6017   echo "$as_me:6017: \$? = $ac_status" >&5
6018   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6019   { (eval echo "$as_me:6019: \"$ac_try\"") >&5
6020   (eval $ac_try) 2>&5
6021   ac_status=$?
6022   echo "$as_me:6022: \$? = $ac_status" >&5
6023   (exit $ac_status); }; }; then
6024
6025                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6026                         eval 'ac_cv_func_'$cf_func'=yes'
6027 else
6028   echo "$as_me: program exited with status $ac_status" >&5
6029 echo "$as_me: failed program was:" >&5
6030 cat conftest.$ac_ext >&5
6031
6032                         eval 'ac_cv_func_'$cf_func'=no'
6033 fi
6034 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6035 fi
6036                 done
6037                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6038
6039 fi
6040 echo "$as_me:6040: result: $cf_cv_link_funcs" >&5
6041 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6042         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6043 #define HAVE_LINK 1
6044 EOF
6045
6046         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6047 #define HAVE_SYMLINK 1
6048 EOF
6049
6050 fi
6051
6052 with_links=no
6053 with_symlinks=no
6054
6055 # soft links (symbolic links) are useful for some systems where hard links do
6056 # not work, or to make it simpler to copy terminfo trees around.
6057 if test "$ac_cv_func_symlink" = yes ; then
6058     echo "$as_me:6058: checking if tic should use symbolic links" >&5
6059 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6060
6061 # Check whether --enable-symlinks or --disable-symlinks was given.
6062 if test "${enable_symlinks+set}" = set; then
6063   enableval="$enable_symlinks"
6064   with_symlinks=$enableval
6065 else
6066   with_symlinks=no
6067 fi;
6068     echo "$as_me:6068: result: $with_symlinks" >&5
6069 echo "${ECHO_T}$with_symlinks" >&6
6070 fi
6071
6072 # If we have hard links and did not choose to use soft links instead, there is
6073 # no reason to make this choice optional - use the hard links.
6074 if test "$with_symlinks" = no ; then
6075     echo "$as_me:6075: checking if tic should use hard links" >&5
6076 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6077     if test "$ac_cv_func_link" = yes ; then
6078         with_links=yes
6079     else
6080         with_links=no
6081     fi
6082     echo "$as_me:6082: result: $with_links" >&5
6083 echo "${ECHO_T}$with_links" >&6
6084 fi
6085
6086 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6087 #define USE_LINKS 1
6088 EOF
6089
6090 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6091 #define USE_SYMLINKS 1
6092 EOF
6093
6094 ###   use option --enable-broken-linker to force on use of broken-linker support
6095 echo "$as_me:6095: checking if you want broken-linker support code" >&5
6096 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6097
6098 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6099 if test "${enable_broken_linker+set}" = set; then
6100   enableval="$enable_broken_linker"
6101   with_broken_linker=$enableval
6102 else
6103   with_broken_linker=${BROKEN_LINKER-no}
6104 fi;
6105 echo "$as_me:6105: result: $with_broken_linker" >&5
6106 echo "${ECHO_T}$with_broken_linker" >&6
6107
6108 BROKEN_LINKER=0
6109 if test "$with_broken_linker" = yes ; then
6110         cat >>confdefs.h <<\EOF
6111 #define BROKEN_LINKER 1
6112 EOF
6113
6114         BROKEN_LINKER=1
6115 elif test "$DFT_LWR_MODEL" = shared ; then
6116         case $cf_cv_system_name in #(vi
6117         cygwin*)
6118                 cat >>confdefs.h <<\EOF
6119 #define BROKEN_LINKER 1
6120 EOF
6121
6122                 BROKEN_LINKER=1
6123                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6124
6125 echo "${as_me-configure}:6125: testing cygwin linker is broken anyway ..." 1>&5
6126
6127                 ;;
6128         esac
6129 fi
6130
6131 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6132 echo "$as_me:6132: checking if tputs should process BSD-style prefix padding" >&5
6133 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6134
6135 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6136 if test "${enable_bsdpad+set}" = set; then
6137   enableval="$enable_bsdpad"
6138   with_bsdpad=$enableval
6139 else
6140   with_bsdpad=no
6141 fi;
6142 echo "$as_me:6142: result: $with_bsdpad" >&5
6143 echo "${ECHO_T}$with_bsdpad" >&6
6144 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6145 #define BSD_TPUTS 1
6146 EOF
6147
6148 ###   use option --enable-widec to turn on use of wide-character support
6149 NCURSES_CH_T=chtype
6150 NCURSES_LIBUTF8=0
6151
6152 NEED_WCHAR_H=0
6153 NCURSES_MBSTATE_T=0
6154 NCURSES_WCHAR_T=0
6155 NCURSES_WINT_T=0
6156
6157 # Check to define _XOPEN_SOURCE "automatically"
6158
6159 echo "$as_me:6159: checking if $CC -U and -D options work together" >&5
6160 echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
6161 if test "${cf_cv_cc_u_d_options+set}" = set; then
6162   echo $ECHO_N "(cached) $ECHO_C" >&6
6163 else
6164
6165         cf_save_CPPFLAGS="$CPPFLAGS"
6166         CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
6167         cat >conftest.$ac_ext <<_ACEOF
6168 #line 6168 "configure"
6169 #include "confdefs.h"
6170
6171 int
6172 main ()
6173 {
6174
6175 #ifndef U_D_OPTIONS
6176 make an undefined-error
6177 #endif
6178 #ifdef  D_U_OPTIONS
6179 make a defined-error
6180 #endif
6181
6182   ;
6183   return 0;
6184 }
6185 _ACEOF
6186 rm -f conftest.$ac_objext
6187 if { (eval echo "$as_me:6187: \"$ac_compile\"") >&5
6188   (eval $ac_compile) 2>&5
6189   ac_status=$?
6190   echo "$as_me:6190: \$? = $ac_status" >&5
6191   (exit $ac_status); } &&
6192          { ac_try='test -s conftest.$ac_objext'
6193   { (eval echo "$as_me:6193: \"$ac_try\"") >&5
6194   (eval $ac_try) 2>&5
6195   ac_status=$?
6196   echo "$as_me:6196: \$? = $ac_status" >&5
6197   (exit $ac_status); }; }; then
6198
6199         cf_cv_cc_u_d_options=yes
6200 else
6201   echo "$as_me: failed program was:" >&5
6202 cat conftest.$ac_ext >&5
6203
6204         cf_cv_cc_u_d_options=no
6205 fi
6206 rm -f conftest.$ac_objext conftest.$ac_ext
6207         CPPFLAGS="$cf_save_CPPFLAGS"
6208
6209 fi
6210 echo "$as_me:6210: result: $cf_cv_cc_u_d_options" >&5
6211 echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
6212
6213 cf_XOPEN_SOURCE=500
6214 cf_POSIX_C_SOURCE=199506L
6215
6216 case $host_os in #(vi
6217 aix[45]*) #(vi
6218         CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
6219         ;;
6220 freebsd*|dragonfly*) #(vi
6221         # 5.x headers associate
6222         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6223         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6224         cf_POSIX_C_SOURCE=200112L
6225         cf_XOPEN_SOURCE=600
6226         CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6227         ;;
6228 hpux*) #(vi
6229         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
6230         ;;
6231 irix[56].*) #(vi
6232         CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
6233         ;;
6234 linux*|gnu*|k*bsd*-gnu) #(vi
6235
6236 echo "$as_me:6236: checking if we must define _GNU_SOURCE" >&5
6237 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6238 if test "${cf_cv_gnu_source+set}" = set; then
6239   echo $ECHO_N "(cached) $ECHO_C" >&6
6240 else
6241
6242 cat >conftest.$ac_ext <<_ACEOF
6243 #line 6243 "configure"
6244 #include "confdefs.h"
6245 #include <sys/types.h>
6246 int
6247 main ()
6248 {
6249
6250 #ifndef _XOPEN_SOURCE
6251 make an error
6252 #endif
6253   ;
6254   return 0;
6255 }
6256 _ACEOF
6257 rm -f conftest.$ac_objext
6258 if { (eval echo "$as_me:6258: \"$ac_compile\"") >&5
6259   (eval $ac_compile) 2>&5
6260   ac_status=$?
6261   echo "$as_me:6261: \$? = $ac_status" >&5
6262   (exit $ac_status); } &&
6263          { ac_try='test -s conftest.$ac_objext'
6264   { (eval echo "$as_me:6264: \"$ac_try\"") >&5
6265   (eval $ac_try) 2>&5
6266   ac_status=$?
6267   echo "$as_me:6267: \$? = $ac_status" >&5
6268   (exit $ac_status); }; }; then
6269   cf_cv_gnu_source=no
6270 else
6271   echo "$as_me: failed program was:" >&5
6272 cat conftest.$ac_ext >&5
6273 cf_save="$CPPFLAGS"
6274          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6275          cat >conftest.$ac_ext <<_ACEOF
6276 #line 6276 "configure"
6277 #include "confdefs.h"
6278 #include <sys/types.h>
6279 int
6280 main ()
6281 {
6282
6283 #ifdef _XOPEN_SOURCE
6284 make an error
6285 #endif
6286   ;
6287   return 0;
6288 }
6289 _ACEOF
6290 rm -f conftest.$ac_objext
6291 if { (eval echo "$as_me:6291: \"$ac_compile\"") >&5
6292   (eval $ac_compile) 2>&5
6293   ac_status=$?
6294   echo "$as_me:6294: \$? = $ac_status" >&5
6295   (exit $ac_status); } &&
6296          { ac_try='test -s conftest.$ac_objext'
6297   { (eval echo "$as_me:6297: \"$ac_try\"") >&5
6298   (eval $ac_try) 2>&5
6299   ac_status=$?
6300   echo "$as_me:6300: \$? = $ac_status" >&5
6301   (exit $ac_status); }; }; then
6302   cf_cv_gnu_source=no
6303 else
6304   echo "$as_me: failed program was:" >&5
6305 cat conftest.$ac_ext >&5
6306 cf_cv_gnu_source=yes
6307 fi
6308 rm -f conftest.$ac_objext conftest.$ac_ext
6309         CPPFLAGS="$cf_save"
6310
6311 fi
6312 rm -f conftest.$ac_objext conftest.$ac_ext
6313
6314 fi
6315 echo "$as_me:6315: result: $cf_cv_gnu_source" >&5
6316 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6317 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6318
6319         ;;
6320 mirbsd*) #(vi
6321         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6322         ;;
6323 netbsd*) #(vi
6324         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6325         ;;
6326 openbsd*) #(vi
6327         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6328         ;;
6329 osf[45]*) #(vi
6330         CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
6331         ;;
6332 nto-qnx*) #(vi
6333         CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
6334         ;;
6335 sco*) #(vi
6336         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6337         ;;
6338 solaris*) #(vi
6339         CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
6340         ;;
6341 *)
6342         echo "$as_me:6342: checking if we should define _XOPEN_SOURCE" >&5
6343 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6344 if test "${cf_cv_xopen_source+set}" = set; then
6345   echo $ECHO_N "(cached) $ECHO_C" >&6
6346 else
6347
6348         cat >conftest.$ac_ext <<_ACEOF
6349 #line 6349 "configure"
6350 #include "confdefs.h"
6351 #include <sys/types.h>
6352 int
6353 main ()
6354 {
6355
6356 #ifndef _XOPEN_SOURCE
6357 make an error
6358 #endif
6359   ;
6360   return 0;
6361 }
6362 _ACEOF
6363 rm -f conftest.$ac_objext
6364 if { (eval echo "$as_me:6364: \"$ac_compile\"") >&5
6365   (eval $ac_compile) 2>&5
6366   ac_status=$?
6367   echo "$as_me:6367: \$? = $ac_status" >&5
6368   (exit $ac_status); } &&
6369          { ac_try='test -s conftest.$ac_objext'
6370   { (eval echo "$as_me:6370: \"$ac_try\"") >&5
6371   (eval $ac_try) 2>&5
6372   ac_status=$?
6373   echo "$as_me:6373: \$? = $ac_status" >&5
6374   (exit $ac_status); }; }; then
6375   cf_cv_xopen_source=no
6376 else
6377   echo "$as_me: failed program was:" >&5
6378 cat conftest.$ac_ext >&5
6379 cf_save="$CPPFLAGS"
6380          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6381          cat >conftest.$ac_ext <<_ACEOF
6382 #line 6382 "configure"
6383 #include "confdefs.h"
6384 #include <sys/types.h>
6385 int
6386 main ()
6387 {
6388
6389 #ifdef _XOPEN_SOURCE
6390 make an error
6391 #endif
6392   ;
6393   return 0;
6394 }
6395 _ACEOF
6396 rm -f conftest.$ac_objext
6397 if { (eval echo "$as_me:6397: \"$ac_compile\"") >&5
6398   (eval $ac_compile) 2>&5
6399   ac_status=$?
6400   echo "$as_me:6400: \$? = $ac_status" >&5
6401   (exit $ac_status); } &&
6402          { ac_try='test -s conftest.$ac_objext'
6403   { (eval echo "$as_me:6403: \"$ac_try\"") >&5
6404   (eval $ac_try) 2>&5
6405   ac_status=$?
6406   echo "$as_me:6406: \$? = $ac_status" >&5
6407   (exit $ac_status); }; }; then
6408   cf_cv_xopen_source=no
6409 else
6410   echo "$as_me: failed program was:" >&5
6411 cat conftest.$ac_ext >&5
6412 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6413 fi
6414 rm -f conftest.$ac_objext conftest.$ac_ext
6415         CPPFLAGS="$cf_save"
6416
6417 fi
6418 rm -f conftest.$ac_objext conftest.$ac_ext
6419
6420 fi
6421 echo "$as_me:6421: result: $cf_cv_xopen_source" >&5
6422 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6423         if test "$cf_cv_xopen_source" != no ; then
6424
6425 # remove _XOPEN_SOURCE symbol from $CFLAGS
6426 CFLAGS=`echo "$CFLAGS" | \
6427         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6428                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6429
6430 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
6431 CPPFLAGS=`echo "$CPPFLAGS" | \
6432         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6433                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6434
6435                 test "$cf_cv_cc_u_d_options" = yes && \
6436                         CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
6437                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
6438         fi
6439
6440 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6441
6442 cf_save_CFLAGS="$CFLAGS"
6443 cf_save_CPPFLAGS="$CPPFLAGS"
6444
6445 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
6446 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6447         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6448                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6449
6450 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
6451 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6452         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6453                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6454
6455 echo "$as_me:6455: checking if we should define _POSIX_C_SOURCE" >&5
6456 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6457 if test "${cf_cv_posix_c_source+set}" = set; then
6458   echo $ECHO_N "(cached) $ECHO_C" >&6
6459 else
6460
6461 echo "${as_me-configure}:6461: testing if the symbol is already defined go no further ..." 1>&5
6462
6463         cat >conftest.$ac_ext <<_ACEOF
6464 #line 6464 "configure"
6465 #include "confdefs.h"
6466 #include <sys/types.h>
6467 int
6468 main ()
6469 {
6470
6471 #ifndef _POSIX_C_SOURCE
6472 make an error
6473 #endif
6474   ;
6475   return 0;
6476 }
6477 _ACEOF
6478 rm -f conftest.$ac_objext
6479 if { (eval echo "$as_me:6479: \"$ac_compile\"") >&5
6480   (eval $ac_compile) 2>&5
6481   ac_status=$?
6482   echo "$as_me:6482: \$? = $ac_status" >&5
6483   (exit $ac_status); } &&
6484          { ac_try='test -s conftest.$ac_objext'
6485   { (eval echo "$as_me:6485: \"$ac_try\"") >&5
6486   (eval $ac_try) 2>&5
6487   ac_status=$?
6488   echo "$as_me:6488: \$? = $ac_status" >&5
6489   (exit $ac_status); }; }; then
6490   cf_cv_posix_c_source=no
6491 else
6492   echo "$as_me: failed program was:" >&5
6493 cat conftest.$ac_ext >&5
6494 cf_want_posix_source=no
6495          case .$cf_POSIX_C_SOURCE in #(vi
6496          .[12]??*) #(vi
6497                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6498                 ;;
6499          .2) #(vi
6500                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6501                 cf_want_posix_source=yes
6502                 ;;
6503          .*)
6504                 cf_want_posix_source=yes
6505                 ;;
6506          esac
6507          if test "$cf_want_posix_source" = yes ; then
6508                 cat >conftest.$ac_ext <<_ACEOF
6509 #line 6509 "configure"
6510 #include "confdefs.h"
6511 #include <sys/types.h>
6512 int
6513 main ()
6514 {
6515
6516 #ifdef _POSIX_SOURCE
6517 make an error
6518 #endif
6519   ;
6520   return 0;
6521 }
6522 _ACEOF
6523 rm -f conftest.$ac_objext
6524 if { (eval echo "$as_me:6524: \"$ac_compile\"") >&5
6525   (eval $ac_compile) 2>&5
6526   ac_status=$?
6527   echo "$as_me:6527: \$? = $ac_status" >&5
6528   (exit $ac_status); } &&
6529          { ac_try='test -s conftest.$ac_objext'
6530   { (eval echo "$as_me:6530: \"$ac_try\"") >&5
6531   (eval $ac_try) 2>&5
6532   ac_status=$?
6533   echo "$as_me:6533: \$? = $ac_status" >&5
6534   (exit $ac_status); }; }; then
6535   :
6536 else
6537   echo "$as_me: failed program was:" >&5
6538 cat conftest.$ac_ext >&5
6539 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6540 fi
6541 rm -f conftest.$ac_objext conftest.$ac_ext
6542          fi
6543
6544 echo "${as_me-configure}:6544: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6545
6546          CFLAGS="$cf_trim_CFLAGS"
6547          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6548
6549 echo "${as_me-configure}:6549: testing if the second compile does not leave our definition intact error ..." 1>&5
6550
6551          cat >conftest.$ac_ext <<_ACEOF
6552 #line 6552 "configure"
6553 #include "confdefs.h"
6554 #include <sys/types.h>
6555 int
6556 main ()
6557 {
6558
6559 #ifndef _POSIX_C_SOURCE
6560 make an error
6561 #endif
6562   ;
6563   return 0;
6564 }
6565 _ACEOF
6566 rm -f conftest.$ac_objext
6567 if { (eval echo "$as_me:6567: \"$ac_compile\"") >&5
6568   (eval $ac_compile) 2>&5
6569   ac_status=$?
6570   echo "$as_me:6570: \$? = $ac_status" >&5
6571   (exit $ac_status); } &&
6572          { ac_try='test -s conftest.$ac_objext'
6573   { (eval echo "$as_me:6573: \"$ac_try\"") >&5
6574   (eval $ac_try) 2>&5
6575   ac_status=$?
6576   echo "$as_me:6576: \$? = $ac_status" >&5
6577   (exit $ac_status); }; }; then
6578   :
6579 else
6580   echo "$as_me: failed program was:" >&5
6581 cat conftest.$ac_ext >&5
6582 cf_cv_posix_c_source=no
6583 fi
6584 rm -f conftest.$ac_objext conftest.$ac_ext
6585          CFLAGS="$cf_save_CFLAGS"
6586          CPPFLAGS="$cf_save_CPPFLAGS"
6587
6588 fi
6589 rm -f conftest.$ac_objext conftest.$ac_ext
6590
6591 fi
6592 echo "$as_me:6592: result: $cf_cv_posix_c_source" >&5
6593 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6594
6595 if test "$cf_cv_posix_c_source" != no ; then
6596         CFLAGS="$cf_trim_CFLAGS"
6597         CPPFLAGS="$cf_trim_CPPFLAGS"
6598         if test "$cf_cv_cc_u_d_options" = yes ; then
6599                 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
6600                                 sed -e 's/-D/-U/g' -e 's/=[^    ]*//g'`
6601                 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
6602         fi
6603         CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
6604 fi
6605
6606         ;;
6607 esac
6608
6609 # Work around breakage on OS X
6610
6611 echo "$as_me:6611: checking if SIGWINCH is defined" >&5
6612 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
6613 if test "${cf_cv_define_sigwinch+set}" = set; then
6614   echo $ECHO_N "(cached) $ECHO_C" >&6
6615 else
6616
6617         cat >conftest.$ac_ext <<_ACEOF
6618 #line 6618 "configure"
6619 #include "confdefs.h"
6620
6621 #include <sys/types.h>
6622 #include <sys/signal.h>
6623
6624 int
6625 main ()
6626 {
6627 int x = SIGWINCH
6628   ;
6629   return 0;
6630 }
6631 _ACEOF
6632 rm -f conftest.$ac_objext
6633 if { (eval echo "$as_me:6633: \"$ac_compile\"") >&5
6634   (eval $ac_compile) 2>&5
6635   ac_status=$?
6636   echo "$as_me:6636: \$? = $ac_status" >&5
6637   (exit $ac_status); } &&
6638          { ac_try='test -s conftest.$ac_objext'
6639   { (eval echo "$as_me:6639: \"$ac_try\"") >&5
6640   (eval $ac_try) 2>&5
6641   ac_status=$?
6642   echo "$as_me:6642: \$? = $ac_status" >&5
6643   (exit $ac_status); }; }; then
6644   cf_cv_define_sigwinch=yes
6645 else
6646   echo "$as_me: failed program was:" >&5
6647 cat conftest.$ac_ext >&5
6648 cat >conftest.$ac_ext <<_ACEOF
6649 #line 6649 "configure"
6650 #include "confdefs.h"
6651
6652 #undef _XOPEN_SOURCE
6653 #undef _POSIX_SOURCE
6654 #undef _POSIX_C_SOURCE
6655 #include <sys/types.h>
6656 #include <sys/signal.h>
6657
6658 int
6659 main ()
6660 {
6661 int x = SIGWINCH
6662   ;
6663   return 0;
6664 }
6665 _ACEOF
6666 rm -f conftest.$ac_objext
6667 if { (eval echo "$as_me:6667: \"$ac_compile\"") >&5
6668   (eval $ac_compile) 2>&5
6669   ac_status=$?
6670   echo "$as_me:6670: \$? = $ac_status" >&5
6671   (exit $ac_status); } &&
6672          { ac_try='test -s conftest.$ac_objext'
6673   { (eval echo "$as_me:6673: \"$ac_try\"") >&5
6674   (eval $ac_try) 2>&5
6675   ac_status=$?
6676   echo "$as_me:6676: \$? = $ac_status" >&5
6677   (exit $ac_status); }; }; then
6678   cf_cv_define_sigwinch=maybe
6679 else
6680   echo "$as_me: failed program was:" >&5
6681 cat conftest.$ac_ext >&5
6682 cf_cv_define_sigwinch=no
6683 fi
6684 rm -f conftest.$ac_objext conftest.$ac_ext
6685
6686 fi
6687 rm -f conftest.$ac_objext conftest.$ac_ext
6688
6689 fi
6690 echo "$as_me:6690: result: $cf_cv_define_sigwinch" >&5
6691 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6692
6693 if test "$cf_cv_define_sigwinch" = maybe ; then
6694 echo "$as_me:6694: checking for actual SIGWINCH definition" >&5
6695 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
6696 if test "${cf_cv_fixup_sigwinch+set}" = set; then
6697   echo $ECHO_N "(cached) $ECHO_C" >&6
6698 else
6699
6700 cf_cv_fixup_sigwinch=unknown
6701 cf_sigwinch=32
6702 while test $cf_sigwinch != 1
6703 do
6704         cat >conftest.$ac_ext <<_ACEOF
6705 #line 6705 "configure"
6706 #include "confdefs.h"
6707
6708 #undef _XOPEN_SOURCE
6709 #undef _POSIX_SOURCE
6710 #undef _POSIX_C_SOURCE
6711 #include <sys/types.h>
6712 #include <sys/signal.h>
6713
6714 int
6715 main ()
6716 {
6717
6718 #if SIGWINCH != $cf_sigwinch
6719 make an error
6720 #endif
6721 int x = SIGWINCH
6722   ;
6723   return 0;
6724 }
6725 _ACEOF
6726 rm -f conftest.$ac_objext
6727 if { (eval echo "$as_me:6727: \"$ac_compile\"") >&5
6728   (eval $ac_compile) 2>&5
6729   ac_status=$?
6730   echo "$as_me:6730: \$? = $ac_status" >&5
6731   (exit $ac_status); } &&
6732          { ac_try='test -s conftest.$ac_objext'
6733   { (eval echo "$as_me:6733: \"$ac_try\"") >&5
6734   (eval $ac_try) 2>&5
6735   ac_status=$?
6736   echo "$as_me:6736: \$? = $ac_status" >&5
6737   (exit $ac_status); }; }; then
6738   cf_cv_fixup_sigwinch=$cf_sigwinch
6739          break
6740 else
6741   echo "$as_me: failed program was:" >&5
6742 cat conftest.$ac_ext >&5
6743 fi
6744 rm -f conftest.$ac_objext conftest.$ac_ext
6745
6746 cf_sigwinch=`expr $cf_sigwinch - 1`
6747 done
6748
6749 fi
6750 echo "$as_me:6750: result: $cf_cv_fixup_sigwinch" >&5
6751 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
6752
6753         if test "$cf_cv_fixup_sigwinch" != unknown ; then
6754                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
6755         fi
6756 fi
6757
6758 # Checks for CODESET support.
6759
6760   echo "$as_me:6760: checking for nl_langinfo and CODESET" >&5
6761 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
6762 if test "${am_cv_langinfo_codeset+set}" = set; then
6763   echo $ECHO_N "(cached) $ECHO_C" >&6
6764 else
6765   cat >conftest.$ac_ext <<_ACEOF
6766 #line 6766 "configure"
6767 #include "confdefs.h"
6768 #include <langinfo.h>
6769 int
6770 main ()
6771 {
6772 char* cs = nl_langinfo(CODESET);
6773   ;
6774   return 0;
6775 }
6776 _ACEOF
6777 rm -f conftest.$ac_objext conftest$ac_exeext
6778 if { (eval echo "$as_me:6778: \"$ac_link\"") >&5
6779   (eval $ac_link) 2>&5
6780   ac_status=$?
6781   echo "$as_me:6781: \$? = $ac_status" >&5
6782   (exit $ac_status); } &&
6783          { ac_try='test -s conftest$ac_exeext'
6784   { (eval echo "$as_me:6784: \"$ac_try\"") >&5
6785   (eval $ac_try) 2>&5
6786   ac_status=$?
6787   echo "$as_me:6787: \$? = $ac_status" >&5
6788   (exit $ac_status); }; }; then
6789   am_cv_langinfo_codeset=yes
6790 else
6791   echo "$as_me: failed program was:" >&5
6792 cat conftest.$ac_ext >&5
6793 am_cv_langinfo_codeset=no
6794 fi
6795 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6796
6797 fi
6798 echo "$as_me:6798: result: $am_cv_langinfo_codeset" >&5
6799 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
6800   if test $am_cv_langinfo_codeset = yes; then
6801
6802 cat >>confdefs.h <<\EOF
6803 #define HAVE_LANGINFO_CODESET 1
6804 EOF
6805
6806   fi
6807
6808 # use these variables to work around a defect in gcc's fixincludes.
6809 NCURSES_OK_WCHAR_T=
6810 NCURSES_OK_WINT_T=
6811
6812 echo "$as_me:6812: checking if you want wide-character code" >&5
6813 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6814
6815 # Check whether --enable-widec or --disable-widec was given.
6816 if test "${enable_widec+set}" = set; then
6817   enableval="$enable_widec"
6818   with_widec=$enableval
6819 else
6820   with_widec=no
6821 fi;
6822 echo "$as_me:6822: result: $with_widec" >&5
6823 echo "${ECHO_T}$with_widec" >&6
6824 if test "$with_widec" = yes ; then
6825         LIB_SUFFIX="w${LIB_SUFFIX}"
6826         cat >>confdefs.h <<\EOF
6827 #define USE_WIDEC_SUPPORT 1
6828 EOF
6829
6830 echo "$as_me:6830: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
6831 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
6832 cat >conftest.$ac_ext <<_ACEOF
6833 #line 6833 "configure"
6834 #include "confdefs.h"
6835 #include <sys/types.h>
6836
6837 int
6838 main ()
6839 {
6840
6841 #ifndef _XOPEN_SOURCE_EXTENDED
6842 make an error
6843 #endif
6844   ;
6845   return 0;
6846 }
6847 _ACEOF
6848 rm -f conftest.$ac_objext
6849 if { (eval echo "$as_me:6849: \"$ac_compile\"") >&5
6850   (eval $ac_compile) 2>&5
6851   ac_status=$?
6852   echo "$as_me:6852: \$? = $ac_status" >&5
6853   (exit $ac_status); } &&
6854          { ac_try='test -s conftest.$ac_objext'
6855   { (eval echo "$as_me:6855: \"$ac_try\"") >&5
6856   (eval $ac_try) 2>&5
6857   ac_status=$?
6858   echo "$as_me:6858: \$? = $ac_status" >&5
6859   (exit $ac_status); }; }; then
6860   cf_result=no
6861 else
6862   echo "$as_me: failed program was:" >&5
6863 cat conftest.$ac_ext >&5
6864 cf_result=yes
6865 fi
6866 rm -f conftest.$ac_objext conftest.$ac_ext
6867 echo "$as_me:6867: result: $cf_result" >&5
6868 echo "${ECHO_T}$cf_result" >&6
6869
6870 if test "$cf_result" = yes ; then
6871         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
6872 elif test "x" != "x" ; then
6873         echo "$as_me:6873: checking checking for compatible value versus " >&5
6874 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
6875         cat >conftest.$ac_ext <<_ACEOF
6876 #line 6876 "configure"
6877 #include "confdefs.h"
6878 #include <sys/types.h>
6879
6880 int
6881 main ()
6882 {
6883
6884 #if _XOPEN_SOURCE_EXTENDED- < 0
6885 make an error
6886 #endif
6887   ;
6888   return 0;
6889 }
6890 _ACEOF
6891 rm -f conftest.$ac_objext
6892 if { (eval echo "$as_me:6892: \"$ac_compile\"") >&5
6893   (eval $ac_compile) 2>&5
6894   ac_status=$?
6895   echo "$as_me:6895: \$? = $ac_status" >&5
6896   (exit $ac_status); } &&
6897          { ac_try='test -s conftest.$ac_objext'
6898   { (eval echo "$as_me:6898: \"$ac_try\"") >&5
6899   (eval $ac_try) 2>&5
6900   ac_status=$?
6901   echo "$as_me:6901: \$? = $ac_status" >&5
6902   (exit $ac_status); }; }; then
6903   cf_result=yes
6904 else
6905   echo "$as_me: failed program was:" >&5
6906 cat conftest.$ac_ext >&5
6907 cf_result=no
6908 fi
6909 rm -f conftest.$ac_objext conftest.$ac_ext
6910         echo "$as_me:6910: result: $cf_result" >&5
6911 echo "${ECHO_T}$cf_result" >&6
6912         if test "$cf_result" = no ; then
6913                 # perhaps we can override it - try...
6914                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
6915         fi
6916 fi
6917
6918         # with_overwrite=no
6919         NCURSES_CH_T=cchar_t
6920
6921 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
6922 do
6923 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6924 echo "$as_me:6924: checking for $ac_func" >&5
6925 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6926 if eval "test \"\${$as_ac_var+set}\" = set"; then
6927   echo $ECHO_N "(cached) $ECHO_C" >&6
6928 else
6929   cat >conftest.$ac_ext <<_ACEOF
6930 #line 6930 "configure"
6931 #include "confdefs.h"
6932 /* System header to define __stub macros and hopefully few prototypes,
6933     which can conflict with char $ac_func (); below.  */
6934 #include <assert.h>
6935 /* Override any gcc2 internal prototype to avoid an error.  */
6936 #ifdef __cplusplus
6937 extern "C"
6938 #endif
6939 /* We use char because int might match the return type of a gcc2
6940    builtin and then its argument prototype would still apply.  */
6941 char $ac_func ();
6942 char (*f) ();
6943
6944 int
6945 main ()
6946 {
6947 /* The GNU C library defines this for functions which it implements
6948     to always fail with ENOSYS.  Some functions are actually named
6949     something starting with __ and the normal name is an alias.  */
6950 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6951 choke me
6952 #else
6953 f = $ac_func;
6954 #endif
6955
6956   ;
6957   return 0;
6958 }
6959 _ACEOF
6960 rm -f conftest.$ac_objext conftest$ac_exeext
6961 if { (eval echo "$as_me:6961: \"$ac_link\"") >&5
6962   (eval $ac_link) 2>&5
6963   ac_status=$?
6964   echo "$as_me:6964: \$? = $ac_status" >&5
6965   (exit $ac_status); } &&
6966          { ac_try='test -s conftest$ac_exeext'
6967   { (eval echo "$as_me:6967: \"$ac_try\"") >&5
6968   (eval $ac_try) 2>&5
6969   ac_status=$?
6970   echo "$as_me:6970: \$? = $ac_status" >&5
6971   (exit $ac_status); }; }; then
6972   eval "$as_ac_var=yes"
6973 else
6974   echo "$as_me: failed program was:" >&5
6975 cat conftest.$ac_ext >&5
6976 eval "$as_ac_var=no"
6977 fi
6978 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6979 fi
6980 echo "$as_me:6980: result: `eval echo '${'$as_ac_var'}'`" >&5
6981 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6982 if test `eval echo '${'$as_ac_var'}'` = yes; then
6983   cat >>confdefs.h <<EOF
6984 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6985 EOF
6986
6987 fi
6988 done
6989
6990         if test "$ac_cv_func_putwc" != yes ; then
6991
6992 echo "$as_me:6992: checking for putwc in libutf8" >&5
6993 echo $ECHO_N "checking for putwc in libutf8... $ECHO_C" >&6
6994 if test "${cf_cv_libutf8+set}" = set; then
6995   echo $ECHO_N "(cached) $ECHO_C" >&6
6996 else
6997
6998         cf_save_LIBS="$LIBS"
6999         LIBS="-lutf8 $LIBS"
7000 cat >conftest.$ac_ext <<_ACEOF
7001 #line 7001 "configure"
7002 #include "confdefs.h"
7003
7004 #include <libutf8.h>
7005 int
7006 main ()
7007 {
7008 putwc(0,0);
7009   ;
7010   return 0;
7011 }
7012 _ACEOF
7013 rm -f conftest.$ac_objext conftest$ac_exeext
7014 if { (eval echo "$as_me:7014: \"$ac_link\"") >&5
7015   (eval $ac_link) 2>&5
7016   ac_status=$?
7017   echo "$as_me:7017: \$? = $ac_status" >&5
7018   (exit $ac_status); } &&
7019          { ac_try='test -s conftest$ac_exeext'
7020   { (eval echo "$as_me:7020: \"$ac_try\"") >&5
7021   (eval $ac_try) 2>&5
7022   ac_status=$?
7023   echo "$as_me:7023: \$? = $ac_status" >&5
7024   (exit $ac_status); }; }; then
7025   cf_cv_libutf8=yes
7026 else
7027   echo "$as_me: failed program was:" >&5
7028 cat conftest.$ac_ext >&5
7029 cf_cv_libutf8=no
7030 fi
7031 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7032         LIBS="$cf_save_LIBS"
7033
7034 fi
7035 echo "$as_me:7035: result: $cf_cv_libutf8" >&5
7036 echo "${ECHO_T}$cf_cv_libutf8" >&6
7037
7038 if test "$cf_cv_libutf8" = yes ; then
7039         cat >>confdefs.h <<\EOF
7040 #define HAVE_LIBUTF8_H 1
7041 EOF
7042
7043         LIBS="-lutf8 $LIBS"
7044 fi
7045
7046                 if test "$cf_cv_libutf8" = yes ; then
7047                         NCURSES_LIBUTF8=1
7048                 fi
7049         fi
7050
7051 # This is needed on Tru64 5.0 to declare mbstate_t
7052 echo "$as_me:7052: checking if we must include wchar.h to declare mbstate_t" >&5
7053 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
7054 if test "${cf_cv_mbstate_t+set}" = set; then
7055   echo $ECHO_N "(cached) $ECHO_C" >&6
7056 else
7057
7058 cat >conftest.$ac_ext <<_ACEOF
7059 #line 7059 "configure"
7060 #include "confdefs.h"
7061
7062 #include <stdlib.h>
7063 #include <stdarg.h>
7064 #include <stdio.h>
7065 #ifdef HAVE_LIBUTF8_H
7066 #include <libutf8.h>
7067 #endif
7068 int
7069 main ()
7070 {
7071 mbstate_t state
7072   ;
7073   return 0;
7074 }
7075 _ACEOF
7076 rm -f conftest.$ac_objext
7077 if { (eval echo "$as_me:7077: \"$ac_compile\"") >&5
7078   (eval $ac_compile) 2>&5
7079   ac_status=$?
7080   echo "$as_me:7080: \$? = $ac_status" >&5
7081   (exit $ac_status); } &&
7082          { ac_try='test -s conftest.$ac_objext'
7083   { (eval echo "$as_me:7083: \"$ac_try\"") >&5
7084   (eval $ac_try) 2>&5
7085   ac_status=$?
7086   echo "$as_me:7086: \$? = $ac_status" >&5
7087   (exit $ac_status); }; }; then
7088   cf_cv_mbstate_t=no
7089 else
7090   echo "$as_me: failed program was:" >&5
7091 cat conftest.$ac_ext >&5
7092 cat >conftest.$ac_ext <<_ACEOF
7093 #line 7093 "configure"
7094 #include "confdefs.h"
7095
7096 #include <stdlib.h>
7097 #include <stdarg.h>
7098 #include <stdio.h>
7099 #include <wchar.h>
7100 #ifdef HAVE_LIBUTF8_H
7101 #include <libutf8.h>
7102 #endif
7103 int
7104 main ()
7105 {
7106 mbstate_t value
7107   ;
7108   return 0;
7109 }
7110 _ACEOF
7111 rm -f conftest.$ac_objext
7112 if { (eval echo "$as_me:7112: \"$ac_compile\"") >&5
7113   (eval $ac_compile) 2>&5
7114   ac_status=$?
7115   echo "$as_me:7115: \$? = $ac_status" >&5
7116   (exit $ac_status); } &&
7117          { ac_try='test -s conftest.$ac_objext'
7118   { (eval echo "$as_me:7118: \"$ac_try\"") >&5
7119   (eval $ac_try) 2>&5
7120   ac_status=$?
7121   echo "$as_me:7121: \$? = $ac_status" >&5
7122   (exit $ac_status); }; }; then
7123   cf_cv_mbstate_t=yes
7124 else
7125   echo "$as_me: failed program was:" >&5
7126 cat conftest.$ac_ext >&5
7127 cf_cv_mbstate_t=unknown
7128 fi
7129 rm -f conftest.$ac_objext conftest.$ac_ext
7130 fi
7131 rm -f conftest.$ac_objext conftest.$ac_ext
7132 fi
7133 echo "$as_me:7133: result: $cf_cv_mbstate_t" >&5
7134 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
7135
7136 if test "$cf_cv_mbstate_t" = yes ; then
7137         cat >>confdefs.h <<\EOF
7138 #define NEED_WCHAR_H 1
7139 EOF
7140
7141         NEED_WCHAR_H=1
7142 fi
7143
7144 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
7145 if test "$cf_cv_mbstate_t" = unknown ; then
7146         NCURSES_MBSTATE_T=1
7147 fi
7148
7149 # This is needed on Tru64 5.0 to declare wchar_t
7150 echo "$as_me:7150: checking if we must include wchar.h to declare wchar_t" >&5
7151 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
7152 if test "${cf_cv_wchar_t+set}" = set; then
7153   echo $ECHO_N "(cached) $ECHO_C" >&6
7154 else
7155
7156 cat >conftest.$ac_ext <<_ACEOF
7157 #line 7157 "configure"
7158 #include "confdefs.h"
7159
7160 #include <stdlib.h>
7161 #include <stdarg.h>
7162 #include <stdio.h>
7163 #ifdef HAVE_LIBUTF8_H
7164 #include <libutf8.h>
7165 #endif
7166 int
7167 main ()
7168 {
7169 wchar_t state
7170   ;
7171   return 0;
7172 }
7173 _ACEOF
7174 rm -f conftest.$ac_objext
7175 if { (eval echo "$as_me:7175: \"$ac_compile\"") >&5
7176   (eval $ac_compile) 2>&5
7177   ac_status=$?
7178   echo "$as_me:7178: \$? = $ac_status" >&5
7179   (exit $ac_status); } &&
7180          { ac_try='test -s conftest.$ac_objext'
7181   { (eval echo "$as_me:7181: \"$ac_try\"") >&5
7182   (eval $ac_try) 2>&5
7183   ac_status=$?
7184   echo "$as_me:7184: \$? = $ac_status" >&5
7185   (exit $ac_status); }; }; then
7186   cf_cv_wchar_t=no
7187 else
7188   echo "$as_me: failed program was:" >&5
7189 cat conftest.$ac_ext >&5
7190 cat >conftest.$ac_ext <<_ACEOF
7191 #line 7191 "configure"
7192 #include "confdefs.h"
7193
7194 #include <stdlib.h>
7195 #include <stdarg.h>
7196 #include <stdio.h>
7197 #include <wchar.h>
7198 #ifdef HAVE_LIBUTF8_H
7199 #include <libutf8.h>
7200 #endif
7201 int
7202 main ()
7203 {
7204 wchar_t value
7205   ;
7206   return 0;
7207 }
7208 _ACEOF
7209 rm -f conftest.$ac_objext
7210 if { (eval echo "$as_me:7210: \"$ac_compile\"") >&5
7211   (eval $ac_compile) 2>&5
7212   ac_status=$?
7213   echo "$as_me:7213: \$? = $ac_status" >&5
7214   (exit $ac_status); } &&
7215          { ac_try='test -s conftest.$ac_objext'
7216   { (eval echo "$as_me:7216: \"$ac_try\"") >&5
7217   (eval $ac_try) 2>&5
7218   ac_status=$?
7219   echo "$as_me:7219: \$? = $ac_status" >&5
7220   (exit $ac_status); }; }; then
7221   cf_cv_wchar_t=yes
7222 else
7223   echo "$as_me: failed program was:" >&5
7224 cat conftest.$ac_ext >&5
7225 cf_cv_wchar_t=unknown
7226 fi
7227 rm -f conftest.$ac_objext conftest.$ac_ext
7228 fi
7229 rm -f conftest.$ac_objext conftest.$ac_ext
7230 fi
7231 echo "$as_me:7231: result: $cf_cv_wchar_t" >&5
7232 echo "${ECHO_T}$cf_cv_wchar_t" >&6
7233
7234 if test "$cf_cv_wchar_t" = yes ; then
7235         cat >>confdefs.h <<\EOF
7236 #define NEED_WCHAR_H 1
7237 EOF
7238
7239         NEED_WCHAR_H=1
7240 fi
7241
7242 # if we do not find wchar_t in either place, use substitution to provide a fallback.
7243 if test "$cf_cv_wchar_t" = unknown ; then
7244         NCURSES_WCHAR_T=1
7245 fi
7246
7247 # if we find wchar_t in either place, use substitution to provide a fallback.
7248 if test "$cf_cv_wchar_t" != unknown ; then
7249         NCURSES_OK_WCHAR_T=1
7250 fi
7251
7252 # This is needed on Tru64 5.0 to declare wint_t
7253 echo "$as_me:7253: checking if we must include wchar.h to declare wint_t" >&5
7254 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
7255 if test "${cf_cv_wint_t+set}" = set; then
7256   echo $ECHO_N "(cached) $ECHO_C" >&6
7257 else
7258
7259 cat >conftest.$ac_ext <<_ACEOF
7260 #line 7260 "configure"
7261 #include "confdefs.h"
7262
7263 #include <stdlib.h>
7264 #include <stdarg.h>
7265 #include <stdio.h>
7266 #ifdef HAVE_LIBUTF8_H
7267 #include <libutf8.h>
7268 #endif
7269 int
7270 main ()
7271 {
7272 wint_t state
7273   ;
7274   return 0;
7275 }
7276 _ACEOF
7277 rm -f conftest.$ac_objext
7278 if { (eval echo "$as_me:7278: \"$ac_compile\"") >&5
7279   (eval $ac_compile) 2>&5
7280   ac_status=$?
7281   echo "$as_me:7281: \$? = $ac_status" >&5
7282   (exit $ac_status); } &&
7283          { ac_try='test -s conftest.$ac_objext'
7284   { (eval echo "$as_me:7284: \"$ac_try\"") >&5
7285   (eval $ac_try) 2>&5
7286   ac_status=$?
7287   echo "$as_me:7287: \$? = $ac_status" >&5
7288   (exit $ac_status); }; }; then
7289   cf_cv_wint_t=no
7290 else
7291   echo "$as_me: failed program was:" >&5
7292 cat conftest.$ac_ext >&5
7293 cat >conftest.$ac_ext <<_ACEOF
7294 #line 7294 "configure"
7295 #include "confdefs.h"
7296
7297 #include <stdlib.h>
7298 #include <stdarg.h>
7299 #include <stdio.h>
7300 #include <wchar.h>
7301 #ifdef HAVE_LIBUTF8_H
7302 #include <libutf8.h>
7303 #endif
7304 int
7305 main ()
7306 {
7307 wint_t value
7308   ;
7309   return 0;
7310 }
7311 _ACEOF
7312 rm -f conftest.$ac_objext
7313 if { (eval echo "$as_me:7313: \"$ac_compile\"") >&5
7314   (eval $ac_compile) 2>&5
7315   ac_status=$?
7316   echo "$as_me:7316: \$? = $ac_status" >&5
7317   (exit $ac_status); } &&
7318          { ac_try='test -s conftest.$ac_objext'
7319   { (eval echo "$as_me:7319: \"$ac_try\"") >&5
7320   (eval $ac_try) 2>&5
7321   ac_status=$?
7322   echo "$as_me:7322: \$? = $ac_status" >&5
7323   (exit $ac_status); }; }; then
7324   cf_cv_wint_t=yes
7325 else
7326   echo "$as_me: failed program was:" >&5
7327 cat conftest.$ac_ext >&5
7328 cf_cv_wint_t=unknown
7329 fi
7330 rm -f conftest.$ac_objext conftest.$ac_ext
7331 fi
7332 rm -f conftest.$ac_objext conftest.$ac_ext
7333 fi
7334 echo "$as_me:7334: result: $cf_cv_wint_t" >&5
7335 echo "${ECHO_T}$cf_cv_wint_t" >&6
7336
7337 if test "$cf_cv_wint_t" = yes ; then
7338         cat >>confdefs.h <<\EOF
7339 #define NEED_WCHAR_H 1
7340 EOF
7341
7342         NEED_WCHAR_H=1
7343 fi
7344
7345 # if we do not find wint_t in either place, use substitution to provide a fallback.
7346 if test "$cf_cv_wint_t" = unknown ; then
7347         NCURSES_WINT_T=1
7348 fi
7349
7350 # if we find wint_t in either place, use substitution to provide a fallback.
7351 if test "$cf_cv_wint_t" != unknown ; then
7352         NCURSES_OK_WINT_T=1
7353 fi
7354
7355         if test "$NCURSES_MBSTATE_T" != 0; then
7356                 cat >>confdefs.h <<\EOF
7357 #define NEED_MBSTATE_T_DEF 1
7358 EOF
7359
7360         fi
7361 fi
7362
7363 ###   use option --disable-lp64 to allow long chtype
7364 case $cf_cv_abi_version in
7365 [345]*)
7366         default_with_lp64=no
7367         ;;
7368 *)
7369         default_with_lp64=yes
7370         ;;
7371 esac
7372
7373 echo "$as_me:7373: checking whether to enable _LP64 definition in curses.h" >&5
7374 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
7375
7376 # Check whether --enable-lp64 or --disable-lp64 was given.
7377 if test "${enable_lp64+set}" = set; then
7378   enableval="$enable_lp64"
7379   with_lp64=$enableval
7380 else
7381   with_lp64=$default_with_lp64
7382 fi;
7383 echo "$as_me:7383: result: $with_lp64" >&5
7384 echo "${ECHO_T}$with_lp64" >&6
7385
7386 if test "$with_lp64" = yes ; then
7387         cf_cv_enable_lp64=1
7388 else
7389         cf_cv_enable_lp64=0
7390 fi
7391
7392 # Check whether --enable-largefile or --disable-largefile was given.
7393 if test "${enable_largefile+set}" = set; then
7394   enableval="$enable_largefile"
7395
7396 fi;
7397 if test "$enable_largefile" != no; then
7398
7399   echo "$as_me:7399: checking for special C compiler options needed for large files" >&5
7400 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
7401 if test "${ac_cv_sys_largefile_CC+set}" = set; then
7402   echo $ECHO_N "(cached) $ECHO_C" >&6
7403 else
7404   ac_cv_sys_largefile_CC=no
7405      if test "$GCC" != yes; then
7406        ac_save_CC=$CC
7407        while :; do
7408          # IRIX 6.2 and later do not support large files by default,
7409          # so use the C compiler's -n32 option if that helps.
7410          cat >conftest.$ac_ext <<_ACEOF
7411 #line 7411 "configure"
7412 #include "confdefs.h"
7413 #include <sys/types.h>
7414  /* Check that off_t can represent 2**63 - 1 correctly.
7415     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7416     since some C++ compilers masquerading as C compilers
7417     incorrectly reject 9223372036854775807.  */
7418 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7419   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7420                        && LARGE_OFF_T % 2147483647 == 1)
7421                       ? 1 : -1];
7422 int
7423 main ()
7424 {
7425
7426   ;
7427   return 0;
7428 }
7429 _ACEOF
7430          rm -f conftest.$ac_objext
7431 if { (eval echo "$as_me:7431: \"$ac_compile\"") >&5
7432   (eval $ac_compile) 2>&5
7433   ac_status=$?
7434   echo "$as_me:7434: \$? = $ac_status" >&5
7435   (exit $ac_status); } &&
7436          { ac_try='test -s conftest.$ac_objext'
7437   { (eval echo "$as_me:7437: \"$ac_try\"") >&5
7438   (eval $ac_try) 2>&5
7439   ac_status=$?
7440   echo "$as_me:7440: \$? = $ac_status" >&5
7441   (exit $ac_status); }; }; then
7442   break
7443 else
7444   echo "$as_me: failed program was:" >&5
7445 cat conftest.$ac_ext >&5
7446 fi
7447 rm -f conftest.$ac_objext
7448          CC="$CC -n32"
7449          rm -f conftest.$ac_objext
7450 if { (eval echo "$as_me:7450: \"$ac_compile\"") >&5
7451   (eval $ac_compile) 2>&5
7452   ac_status=$?
7453   echo "$as_me:7453: \$? = $ac_status" >&5
7454   (exit $ac_status); } &&
7455          { ac_try='test -s conftest.$ac_objext'
7456   { (eval echo "$as_me:7456: \"$ac_try\"") >&5
7457   (eval $ac_try) 2>&5
7458   ac_status=$?
7459   echo "$as_me:7459: \$? = $ac_status" >&5
7460   (exit $ac_status); }; }; then
7461   ac_cv_sys_largefile_CC=' -n32'; break
7462 else
7463   echo "$as_me: failed program was:" >&5
7464 cat conftest.$ac_ext >&5
7465 fi
7466 rm -f conftest.$ac_objext
7467          break
7468        done
7469        CC=$ac_save_CC
7470        rm -f conftest.$ac_ext
7471     fi
7472 fi
7473 echo "$as_me:7473: result: $ac_cv_sys_largefile_CC" >&5
7474 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
7475   if test "$ac_cv_sys_largefile_CC" != no; then
7476     CC=$CC$ac_cv_sys_largefile_CC
7477   fi
7478
7479   echo "$as_me:7479: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7480 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
7481 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
7482   echo $ECHO_N "(cached) $ECHO_C" >&6
7483 else
7484   while :; do
7485   ac_cv_sys_file_offset_bits=no
7486   cat >conftest.$ac_ext <<_ACEOF
7487 #line 7487 "configure"
7488 #include "confdefs.h"
7489 #include <sys/types.h>
7490  /* Check that off_t can represent 2**63 - 1 correctly.
7491     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7492     since some C++ compilers masquerading as C compilers
7493     incorrectly reject 9223372036854775807.  */
7494 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7495   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7496                        && LARGE_OFF_T % 2147483647 == 1)
7497                       ? 1 : -1];
7498 int
7499 main ()
7500 {
7501
7502   ;
7503   return 0;
7504 }
7505 _ACEOF
7506 rm -f conftest.$ac_objext
7507 if { (eval echo "$as_me:7507: \"$ac_compile\"") >&5
7508   (eval $ac_compile) 2>&5
7509   ac_status=$?
7510   echo "$as_me:7510: \$? = $ac_status" >&5
7511   (exit $ac_status); } &&
7512          { ac_try='test -s conftest.$ac_objext'
7513   { (eval echo "$as_me:7513: \"$ac_try\"") >&5
7514   (eval $ac_try) 2>&5
7515   ac_status=$?
7516   echo "$as_me:7516: \$? = $ac_status" >&5
7517   (exit $ac_status); }; }; then
7518   break
7519 else
7520   echo "$as_me: failed program was:" >&5
7521 cat conftest.$ac_ext >&5
7522 fi
7523 rm -f conftest.$ac_objext conftest.$ac_ext
7524   cat >conftest.$ac_ext <<_ACEOF
7525 #line 7525 "configure"
7526 #include "confdefs.h"
7527 #define _FILE_OFFSET_BITS 64
7528 #include <sys/types.h>
7529  /* Check that off_t can represent 2**63 - 1 correctly.
7530     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7531     since some C++ compilers masquerading as C compilers
7532     incorrectly reject 9223372036854775807.  */
7533 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7534   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7535                        && LARGE_OFF_T % 2147483647 == 1)
7536                       ? 1 : -1];
7537 int
7538 main ()
7539 {
7540
7541   ;
7542   return 0;
7543 }
7544 _ACEOF
7545 rm -f conftest.$ac_objext
7546 if { (eval echo "$as_me:7546: \"$ac_compile\"") >&5
7547   (eval $ac_compile) 2>&5
7548   ac_status=$?
7549   echo "$as_me:7549: \$? = $ac_status" >&5
7550   (exit $ac_status); } &&
7551          { ac_try='test -s conftest.$ac_objext'
7552   { (eval echo "$as_me:7552: \"$ac_try\"") >&5
7553   (eval $ac_try) 2>&5
7554   ac_status=$?
7555   echo "$as_me:7555: \$? = $ac_status" >&5
7556   (exit $ac_status); }; }; then
7557   ac_cv_sys_file_offset_bits=64; break
7558 else
7559   echo "$as_me: failed program was:" >&5
7560 cat conftest.$ac_ext >&5
7561 fi
7562 rm -f conftest.$ac_objext conftest.$ac_ext
7563   break
7564 done
7565 fi
7566 echo "$as_me:7566: result: $ac_cv_sys_file_offset_bits" >&5
7567 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
7568 if test "$ac_cv_sys_file_offset_bits" != no; then
7569
7570 cat >>confdefs.h <<EOF
7571 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7572 EOF
7573
7574 fi
7575 rm -f conftest*
7576   echo "$as_me:7576: checking for _LARGE_FILES value needed for large files" >&5
7577 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
7578 if test "${ac_cv_sys_large_files+set}" = set; then
7579   echo $ECHO_N "(cached) $ECHO_C" >&6
7580 else
7581   while :; do
7582   ac_cv_sys_large_files=no
7583   cat >conftest.$ac_ext <<_ACEOF
7584 #line 7584 "configure"
7585 #include "confdefs.h"
7586 #include <sys/types.h>
7587  /* Check that off_t can represent 2**63 - 1 correctly.
7588     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7589     since some C++ compilers masquerading as C compilers
7590     incorrectly reject 9223372036854775807.  */
7591 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7592   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7593                        && LARGE_OFF_T % 2147483647 == 1)
7594                       ? 1 : -1];
7595 int
7596 main ()
7597 {
7598
7599   ;
7600   return 0;
7601 }
7602 _ACEOF
7603 rm -f conftest.$ac_objext
7604 if { (eval echo "$as_me:7604: \"$ac_compile\"") >&5
7605   (eval $ac_compile) 2>&5
7606   ac_status=$?
7607   echo "$as_me:7607: \$? = $ac_status" >&5
7608   (exit $ac_status); } &&
7609          { ac_try='test -s conftest.$ac_objext'
7610   { (eval echo "$as_me:7610: \"$ac_try\"") >&5
7611   (eval $ac_try) 2>&5
7612   ac_status=$?
7613   echo "$as_me:7613: \$? = $ac_status" >&5
7614   (exit $ac_status); }; }; then
7615   break
7616 else
7617   echo "$as_me: failed program was:" >&5
7618 cat conftest.$ac_ext >&5
7619 fi
7620 rm -f conftest.$ac_objext conftest.$ac_ext
7621   cat >conftest.$ac_ext <<_ACEOF
7622 #line 7622 "configure"
7623 #include "confdefs.h"
7624 #define _LARGE_FILES 1
7625 #include <sys/types.h>
7626  /* Check that off_t can represent 2**63 - 1 correctly.
7627     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7628     since some C++ compilers masquerading as C compilers
7629     incorrectly reject 9223372036854775807.  */
7630 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7631   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7632                        && LARGE_OFF_T % 2147483647 == 1)
7633                       ? 1 : -1];
7634 int
7635 main ()
7636 {
7637
7638   ;
7639   return 0;
7640 }
7641 _ACEOF
7642 rm -f conftest.$ac_objext
7643 if { (eval echo "$as_me:7643: \"$ac_compile\"") >&5
7644   (eval $ac_compile) 2>&5
7645   ac_status=$?
7646   echo "$as_me:7646: \$? = $ac_status" >&5
7647   (exit $ac_status); } &&
7648          { ac_try='test -s conftest.$ac_objext'
7649   { (eval echo "$as_me:7649: \"$ac_try\"") >&5
7650   (eval $ac_try) 2>&5
7651   ac_status=$?
7652   echo "$as_me:7652: \$? = $ac_status" >&5
7653   (exit $ac_status); }; }; then
7654   ac_cv_sys_large_files=1; break
7655 else
7656   echo "$as_me: failed program was:" >&5
7657 cat conftest.$ac_ext >&5
7658 fi
7659 rm -f conftest.$ac_objext conftest.$ac_ext
7660   break
7661 done
7662 fi
7663 echo "$as_me:7663: result: $ac_cv_sys_large_files" >&5
7664 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
7665 if test "$ac_cv_sys_large_files" != no; then
7666
7667 cat >>confdefs.h <<EOF
7668 #define _LARGE_FILES $ac_cv_sys_large_files
7669 EOF
7670
7671 fi
7672 rm -f conftest*
7673 fi
7674
7675     if test "$enable_largefile" != no ; then
7676         echo "$as_me:7676: checking for _LARGEFILE_SOURCE value needed for large files" >&5
7677 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
7678 if test "${ac_cv_sys_largefile_source+set}" = set; then
7679   echo $ECHO_N "(cached) $ECHO_C" >&6
7680 else
7681   while :; do
7682   ac_cv_sys_largefile_source=no
7683   cat >conftest.$ac_ext <<_ACEOF
7684 #line 7684 "configure"
7685 #include "confdefs.h"
7686 #include <stdio.h>
7687 int
7688 main ()
7689 {
7690 return !fseeko;
7691   ;
7692   return 0;
7693 }
7694 _ACEOF
7695 rm -f conftest.$ac_objext
7696 if { (eval echo "$as_me:7696: \"$ac_compile\"") >&5
7697   (eval $ac_compile) 2>&5
7698   ac_status=$?
7699   echo "$as_me:7699: \$? = $ac_status" >&5
7700   (exit $ac_status); } &&
7701          { ac_try='test -s conftest.$ac_objext'
7702   { (eval echo "$as_me:7702: \"$ac_try\"") >&5
7703   (eval $ac_try) 2>&5
7704   ac_status=$?
7705   echo "$as_me:7705: \$? = $ac_status" >&5
7706   (exit $ac_status); }; }; then
7707   break
7708 else
7709   echo "$as_me: failed program was:" >&5
7710 cat conftest.$ac_ext >&5
7711 fi
7712 rm -f conftest.$ac_objext conftest.$ac_ext
7713   cat >conftest.$ac_ext <<_ACEOF
7714 #line 7714 "configure"
7715 #include "confdefs.h"
7716 #define _LARGEFILE_SOURCE 1
7717 #include <stdio.h>
7718 int
7719 main ()
7720 {
7721 return !fseeko;
7722   ;
7723   return 0;
7724 }
7725 _ACEOF
7726 rm -f conftest.$ac_objext
7727 if { (eval echo "$as_me:7727: \"$ac_compile\"") >&5
7728   (eval $ac_compile) 2>&5
7729   ac_status=$?
7730   echo "$as_me:7730: \$? = $ac_status" >&5
7731   (exit $ac_status); } &&
7732          { ac_try='test -s conftest.$ac_objext'
7733   { (eval echo "$as_me:7733: \"$ac_try\"") >&5
7734   (eval $ac_try) 2>&5
7735   ac_status=$?
7736   echo "$as_me:7736: \$? = $ac_status" >&5
7737   (exit $ac_status); }; }; then
7738   ac_cv_sys_largefile_source=1; break
7739 else
7740   echo "$as_me: failed program was:" >&5
7741 cat conftest.$ac_ext >&5
7742 fi
7743 rm -f conftest.$ac_objext conftest.$ac_ext
7744   break
7745 done
7746 fi
7747 echo "$as_me:7747: result: $ac_cv_sys_largefile_source" >&5
7748 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
7749 if test "$ac_cv_sys_largefile_source" != no; then
7750
7751 cat >>confdefs.h <<EOF
7752 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
7753 EOF
7754
7755 fi
7756 rm -f conftest*
7757
7758 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
7759 # in glibc 2.1.3, but that breaks too many other things.
7760 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
7761 echo "$as_me:7761: checking for fseeko" >&5
7762 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
7763 if test "${ac_cv_func_fseeko+set}" = set; then
7764   echo $ECHO_N "(cached) $ECHO_C" >&6
7765 else
7766   cat >conftest.$ac_ext <<_ACEOF
7767 #line 7767 "configure"
7768 #include "confdefs.h"
7769 #include <stdio.h>
7770 int
7771 main ()
7772 {
7773 return fseeko && fseeko (stdin, 0, 0);
7774   ;
7775   return 0;
7776 }
7777 _ACEOF
7778 rm -f conftest.$ac_objext conftest$ac_exeext
7779 if { (eval echo "$as_me:7779: \"$ac_link\"") >&5
7780   (eval $ac_link) 2>&5
7781   ac_status=$?
7782   echo "$as_me:7782: \$? = $ac_status" >&5
7783   (exit $ac_status); } &&
7784          { ac_try='test -s conftest$ac_exeext'
7785   { (eval echo "$as_me:7785: \"$ac_try\"") >&5
7786   (eval $ac_try) 2>&5
7787   ac_status=$?
7788   echo "$as_me:7788: \$? = $ac_status" >&5
7789   (exit $ac_status); }; }; then
7790   ac_cv_func_fseeko=yes
7791 else
7792   echo "$as_me: failed program was:" >&5
7793 cat conftest.$ac_ext >&5
7794 ac_cv_func_fseeko=no
7795 fi
7796 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7797 fi
7798 echo "$as_me:7798: result: $ac_cv_func_fseeko" >&5
7799 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
7800 if test $ac_cv_func_fseeko = yes; then
7801
7802 cat >>confdefs.h <<\EOF
7803 #define HAVE_FSEEKO 1
7804 EOF
7805
7806 fi
7807
7808         # Normally we would collect these definitions in the config.h,
7809         # but (like _XOPEN_SOURCE), some environments rely on having these
7810         # defined before any of the system headers are included.  Another
7811         # case comes up with C++, e.g., on AIX the compiler compiles the
7812         # header files by themselves before looking at the body files it is
7813         # told to compile.  For ncurses, those header files do not include
7814         # the config.h
7815         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
7816         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
7817         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
7818
7819         echo "$as_me:7819: checking whether to use struct dirent64" >&5
7820 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
7821 if test "${cf_cv_struct_dirent64+set}" = set; then
7822   echo $ECHO_N "(cached) $ECHO_C" >&6
7823 else
7824
7825                 cat >conftest.$ac_ext <<_ACEOF
7826 #line 7826 "configure"
7827 #include "confdefs.h"
7828
7829 #include <sys/types.h>
7830 #include <dirent.h>
7831
7832 int
7833 main ()
7834 {
7835
7836                 /* if transitional largefile support is setup, this is true */
7837                 extern struct dirent64 * readdir(DIR *);
7838                 struct dirent64 *x = readdir((DIR *)0);
7839                 struct dirent *y = readdir((DIR *)0);
7840                 int z = x - y;
7841
7842   ;
7843   return 0;
7844 }
7845 _ACEOF
7846 rm -f conftest.$ac_objext
7847 if { (eval echo "$as_me:7847: \"$ac_compile\"") >&5
7848   (eval $ac_compile) 2>&5
7849   ac_status=$?
7850   echo "$as_me:7850: \$? = $ac_status" >&5
7851   (exit $ac_status); } &&
7852          { ac_try='test -s conftest.$ac_objext'
7853   { (eval echo "$as_me:7853: \"$ac_try\"") >&5
7854   (eval $ac_try) 2>&5
7855   ac_status=$?
7856   echo "$as_me:7856: \$? = $ac_status" >&5
7857   (exit $ac_status); }; }; then
7858   cf_cv_struct_dirent64=yes
7859 else
7860   echo "$as_me: failed program was:" >&5
7861 cat conftest.$ac_ext >&5
7862 cf_cv_struct_dirent64=no
7863 fi
7864 rm -f conftest.$ac_objext conftest.$ac_ext
7865
7866 fi
7867 echo "$as_me:7867: result: $cf_cv_struct_dirent64" >&5
7868 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
7869         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
7870 #define HAVE_STRUCT_DIRENT64 1
7871 EOF
7872
7873     fi
7874
7875 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
7876 echo "$as_me:7876: checking if you want tparm not to use X/Open fixed-parameter list" >&5
7877 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
7878
7879 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
7880 if test "${enable_tparm_varargs+set}" = set; then
7881   enableval="$enable_tparm_varargs"
7882   with_tparm_varargs=$enableval
7883 else
7884   with_tparm_varargs=yes
7885 fi;
7886 echo "$as_me:7886: result: $with_tparm_varargs" >&5
7887 echo "${ECHO_T}$with_tparm_varargs" >&6
7888 NCURSES_TPARM_VARARGS=0
7889 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
7890
7891 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
7892 if test "$with_ticlib" != no ; then
7893 echo "$as_me:7893: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
7894 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
7895
7896 # Check whether --enable-tic-depends or --disable-tic-depends was given.
7897 if test "${enable_tic_depends+set}" = set; then
7898   enableval="$enable_tic_depends"
7899   with_tic_depends=$enableval
7900 else
7901   with_tic_depends=yes
7902 fi;
7903 echo "$as_me:7903: result: $with_tic_depends" >&5
7904 echo "${ECHO_T}$with_tic_depends" >&6
7905 else
7906         with_tic_depends=no
7907 fi
7908
7909 ###   use option --with-bool to override bool's type
7910 echo "$as_me:7910: checking for type of bool" >&5
7911 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
7912
7913 # Check whether --with-bool or --without-bool was given.
7914 if test "${with_bool+set}" = set; then
7915   withval="$with_bool"
7916   NCURSES_BOOL="$withval"
7917 else
7918   NCURSES_BOOL=auto
7919 fi;
7920 echo "$as_me:7920: result: $NCURSES_BOOL" >&5
7921 echo "${ECHO_T}$NCURSES_BOOL" >&6
7922
7923 echo "$as_me:7923: checking for alternate terminal capabilities file" >&5
7924 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
7925
7926 # Check whether --with-caps or --without-caps was given.
7927 if test "${with_caps+set}" = set; then
7928   withval="$with_caps"
7929   TERMINFO_CAPS=Caps.$withval
7930 else
7931   TERMINFO_CAPS=Caps
7932 fi;
7933 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
7934 echo "$as_me:7934: result: $TERMINFO_CAPS" >&5
7935 echo "${ECHO_T}$TERMINFO_CAPS" >&6
7936
7937 ###   use option --with-chtype to override chtype's type
7938 echo "$as_me:7938: checking for type of chtype" >&5
7939 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
7940
7941 # Check whether --with-chtype or --without-chtype was given.
7942 if test "${with_chtype+set}" = set; then
7943   withval="$with_chtype"
7944   NCURSES_CHTYPE="$withval"
7945 else
7946   NCURSES_CHTYPE=auto
7947 fi;
7948 echo "$as_me:7948: result: $NCURSES_CHTYPE" >&5
7949 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
7950
7951 ###   use option --with-ospeed to override ospeed's type
7952 echo "$as_me:7952: checking for type of ospeed" >&5
7953 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
7954
7955 # Check whether --with-ospeed or --without-ospeed was given.
7956 if test "${with_ospeed+set}" = set; then
7957   withval="$with_ospeed"
7958   NCURSES_OSPEED="$withval"
7959 else
7960   NCURSES_OSPEED=short
7961 fi;
7962 echo "$as_me:7962: result: $NCURSES_OSPEED" >&5
7963 echo "${ECHO_T}$NCURSES_OSPEED" >&6
7964
7965 ###   use option --with-mmask-t to override mmask_t's type
7966 echo "$as_me:7966: checking for type of mmask_t" >&5
7967 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
7968
7969 # Check whether --with-mmask-t or --without-mmask-t was given.
7970 if test "${with_mmask_t+set}" = set; then
7971   withval="$with_mmask_t"
7972   NCURSES_MMASK_T="$withval"
7973 else
7974   NCURSES_MMASK_T=auto
7975 fi;
7976 echo "$as_me:7976: result: $NCURSES_MMASK_T" >&5
7977 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
7978
7979 ### Enable compiling-in rcs id's
7980 echo "$as_me:7980: checking if RCS identifiers should be compiled-in" >&5
7981 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
7982
7983 # Check whether --with-rcs-ids or --without-rcs-ids was given.
7984 if test "${with_rcs_ids+set}" = set; then
7985   withval="$with_rcs_ids"
7986   with_rcs_ids=$withval
7987 else
7988   with_rcs_ids=no
7989 fi;
7990 echo "$as_me:7990: result: $with_rcs_ids" >&5
7991 echo "${ECHO_T}$with_rcs_ids" >&6
7992 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
7993 #define USE_RCS_IDS 1
7994 EOF
7995
7996 ###############################################################################
7997
7998 echo "$as_me:7998: checking format of man-pages" >&5
7999 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
8000
8001 # Check whether --with-manpage-format or --without-manpage-format was given.
8002 if test "${with_manpage_format+set}" = set; then
8003   withval="$with_manpage_format"
8004   MANPAGE_FORMAT=$withval
8005 else
8006   MANPAGE_FORMAT=unknown
8007 fi;
8008
8009 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
8010 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
8011
8012 cf_unknown=
8013
8014 case $MANPAGE_FORMAT in
8015 unknown)
8016   if test -z "$MANPATH" ; then
8017     MANPATH="/usr/man:/usr/share/man"
8018   fi
8019
8020   # look for the 'date' man-page (it's most likely to be installed!)
8021   MANPAGE_FORMAT=
8022   cf_preform=no
8023   cf_catonly=yes
8024   cf_example=date
8025
8026   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
8027   for cf_dir in $MANPATH; do
8028     test -z "$cf_dir" && cf_dir=/usr/man
8029     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
8030     do
8031       cf_test=`echo $cf_name | sed -e 's/*//'`
8032       if test "x$cf_test" = "x$cf_name" ; then
8033
8034         case "$cf_name" in
8035         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
8036         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
8037         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
8038         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
8039         esac
8040
8041         case "$cf_name" in
8042         $cf_dir/man*)
8043           cf_catonly=no
8044           ;;
8045         $cf_dir/cat*)
8046           cf_preform=yes
8047           ;;
8048         esac
8049         break
8050       fi
8051
8052       # if we found a match in either man* or cat*, stop looking
8053       if test -n "$MANPAGE_FORMAT" ; then
8054         cf_found=no
8055         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
8056         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
8057         case "$cf_name" in
8058         $cf_dir/cat*)
8059           cf_found=yes
8060           ;;
8061         esac
8062         test $cf_found=yes && break
8063       fi
8064     done
8065     # only check the first directory in $MANPATH where we find manpages
8066     if test -n "$MANPAGE_FORMAT" ; then
8067        break
8068     fi
8069   done
8070   # if we did not find the example, just assume it is normal
8071   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
8072   IFS="$ac_save_ifs"
8073   ;;
8074 *)
8075   for cf_option in $MANPAGE_FORMAT; do
8076      case $cf_option in #(vi
8077      gzip|compress|BSDI|normal|formatted|catonly)
8078        ;;
8079      *)
8080        cf_unknown="$cf_unknown $cf_option"
8081        ;;
8082      esac
8083   done
8084   ;;
8085 esac
8086
8087 echo "$as_me:8087: result: $MANPAGE_FORMAT" >&5
8088 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
8089 if test -n "$cf_unknown" ; then
8090   { echo "$as_me:8090: WARNING: Unexpected manpage-format $cf_unknown" >&5
8091 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
8092 fi
8093
8094 echo "$as_me:8094: checking for manpage renaming" >&5
8095 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
8096
8097 # Check whether --with-manpage-renames or --without-manpage-renames was given.
8098 if test "${with_manpage_renames+set}" = set; then
8099   withval="$with_manpage_renames"
8100   MANPAGE_RENAMES=$withval
8101 else
8102   MANPAGE_RENAMES=yes
8103 fi;
8104
8105 case ".$MANPAGE_RENAMES" in #(vi
8106 .no) #(vi
8107   ;;
8108 .|.yes)
8109   # Debian 'man' program?
8110   if test -f /etc/debian_version ; then
8111     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
8112   else
8113     MANPAGE_RENAMES=no
8114   fi
8115   ;;
8116 esac
8117
8118 if test "$MANPAGE_RENAMES" != no ; then
8119   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
8120     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
8121   elif test ! -f $MANPAGE_RENAMES ; then
8122     { { echo "$as_me:8122: error: not a filename: $MANPAGE_RENAMES" >&5
8123 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
8124    { (exit 1); exit 1; }; }
8125   fi
8126
8127   test ! -d man && mkdir man
8128
8129   # Construct a sed-script to perform renaming within man-pages
8130   if test -n "$MANPAGE_RENAMES" ; then
8131     test ! -d man && mkdir man
8132     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
8133   fi
8134 fi
8135
8136 echo "$as_me:8136: result: $MANPAGE_RENAMES" >&5
8137 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
8138
8139 echo "$as_me:8139: checking if manpage aliases will be installed" >&5
8140 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
8141
8142 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
8143 if test "${with_manpage_aliases+set}" = set; then
8144   withval="$with_manpage_aliases"
8145   MANPAGE_ALIASES=$withval
8146 else
8147   MANPAGE_ALIASES=yes
8148 fi;
8149
8150 echo "$as_me:8150: result: $MANPAGE_ALIASES" >&5
8151 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
8152
8153 if test "$LN_S" = "ln -s"; then
8154         cf_use_symlinks=yes
8155 else
8156         cf_use_symlinks=no
8157 fi
8158
8159 MANPAGE_SYMLINKS=no
8160 if test "$MANPAGE_ALIASES" = yes ; then
8161 echo "$as_me:8161: checking if manpage symlinks should be used" >&5
8162 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
8163
8164 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
8165 if test "${with_manpage_symlinks+set}" = set; then
8166   withval="$with_manpage_symlinks"
8167   MANPAGE_SYMLINKS=$withval
8168 else
8169   MANPAGE_SYMLINKS=$cf_use_symlinks
8170 fi;
8171
8172 if test "$$cf_use_symlinks" = no; then
8173 if test "$MANPAGE_SYMLINKS" = yes ; then
8174         { echo "$as_me:8174: WARNING: cannot make symlinks" >&5
8175 echo "$as_me: WARNING: cannot make symlinks" >&2;}
8176         MANPAGE_SYMLINKS=no
8177 fi
8178 fi
8179
8180 echo "$as_me:8180: result: $MANPAGE_SYMLINKS" >&5
8181 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
8182 fi
8183
8184 echo "$as_me:8184: checking for manpage tbl" >&5
8185 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
8186
8187 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
8188 if test "${with_manpage_tbl+set}" = set; then
8189   withval="$with_manpage_tbl"
8190   MANPAGE_TBL=$withval
8191 else
8192   MANPAGE_TBL=no
8193 fi;
8194
8195 echo "$as_me:8195: result: $MANPAGE_TBL" >&5
8196 echo "${ECHO_T}$MANPAGE_TBL" >&6
8197
8198   if test "$prefix" = "NONE" ; then
8199      cf_prefix="$ac_default_prefix"
8200   else
8201      cf_prefix="$prefix"
8202   fi
8203
8204   case "$MANPAGE_FORMAT" in # (vi
8205   *catonly*) # (vi
8206     cf_format=yes
8207     cf_inboth=no
8208     ;;
8209   *formatted*) # (vi
8210     cf_format=yes
8211     cf_inboth=yes
8212     ;;
8213   *)
8214     cf_format=no
8215     cf_inboth=no
8216     ;;
8217   esac
8218
8219 test ! -d man && mkdir man
8220
8221 cf_so_strip=
8222 cf_compress=
8223 case "$MANPAGE_FORMAT" in #(vi
8224 *compress*) #(vi
8225         cf_so_strip="Z"
8226         cf_compress=compress
8227   ;;
8228 *gzip*) #(vi
8229         cf_so_strip="gz"
8230         cf_compress=gzip
8231   ;;
8232 esac
8233
8234 cf_edit_man=./edit_man.sh
8235 cf_man_alias=`pwd`/man_alias.sed
8236
8237 cat >$cf_edit_man <<CF_EOF
8238 #! /bin/sh
8239 # this script is generated by the configure-script CF_MAN_PAGES macro.
8240
8241 prefix="$cf_prefix"
8242 datadir="$datadir"
8243
8244 NCURSES_MAJOR="$NCURSES_MAJOR"
8245 NCURSES_MINOR="$NCURSES_MINOR"
8246 NCURSES_PATCH="$NCURSES_PATCH"
8247
8248 NCURSES_OSPEED="$NCURSES_OSPEED"
8249 TERMINFO="$TERMINFO"
8250
8251 MKDIRS="sh `cd $srcdir && pwd`/mkdirs.sh"
8252
8253 INSTALL="$INSTALL"
8254 INSTALL_DATA="$INSTALL_DATA"
8255
8256 transform="$program_transform_name"
8257
8258 TMP=\${TMPDIR-/tmp}/man\$\$
8259 trap "rm -f \$TMP" 0 1 2 5 15
8260
8261 form=\$1
8262 shift || exit 1
8263
8264 verb=\$1
8265 shift || exit 1
8266
8267 mandir=\$1
8268 shift || exit 1
8269
8270 srcdir=\$1
8271 top_srcdir=\$srcdir/..
8272 shift || exit 1
8273
8274 if test "\$form" = normal ; then
8275         if test "$cf_format" = yes ; then
8276         if test "$cf_inboth" = no ; then
8277                 sh \$0 format \$verb \$mandir \$srcdir \$*
8278                 exit $?
8279         fi
8280         fi
8281         cf_subdir=\$mandir/man
8282         cf_tables=$MANPAGE_TBL
8283 else
8284         cf_subdir=\$mandir/cat
8285         cf_tables=yes
8286 fi
8287
8288 # process the list of source-files
8289 for i in \$* ; do
8290 case \$i in #(vi
8291 *.orig|*.rej) ;; #(vi
8292 *.[0-9]*)
8293         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
8294         if test \$verb = installing ; then
8295         if test ! -d \$cf_subdir\${section} ; then
8296                 \$MKDIRS \$cf_subdir\$section
8297         fi
8298         fi
8299
8300         # replace variables in man page
8301         if test ! -f $cf_man_alias ; then
8302 cat >>$cf_man_alias <<-CF_EOF2
8303                 s,@DATADIR@,\$datadir,g
8304                 s,@TERMINFO@,\$TERMINFO,g
8305                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
8306                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
8307                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
8308                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
8309 CF_EOF
8310
8311         for cf_name in  captoinfo clear infocmp infotocap tic toe tput
8312         do
8313                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8314                 cf_name=`echo $cf_name|sed "$program_transform_name"`
8315 cat >>$cf_edit_man <<-CF_EOF
8316                 s,@$cf_NAME@,$cf_name,
8317 CF_EOF
8318         done
8319
8320 cat >>$cf_edit_man <<CF_EOF
8321 CF_EOF2
8322                 echo "...made $cf_man_alias"
8323         fi
8324
8325         aliases=
8326         cf_source=\`basename \$i\`
8327         inalias=\$cf_source
8328         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
8329         if test ! -f \$inalias ; then
8330                 echo .. skipped \$cf_source
8331                 continue
8332         fi
8333 CF_EOF
8334
8335 if test "$MANPAGE_ALIASES" != no ; then
8336 cat >>$cf_edit_man <<CF_EOF
8337         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
8338 CF_EOF
8339 fi
8340
8341 if test "$MANPAGE_RENAMES" = no ; then
8342 cat >>$cf_edit_man <<CF_EOF
8343         # perform program transformations for section 1 man pages
8344         if test \$section = 1 ; then
8345                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
8346         else
8347                 cf_target=\$cf_subdir\${section}/\$cf_source
8348         fi
8349 CF_EOF
8350 else
8351 cat >>$cf_edit_man <<CF_EOF
8352         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
8353         if test -z "\$cf_target" ; then
8354                 echo '? missing rename for '\$cf_source
8355                 cf_target="\$cf_source"
8356         fi
8357         cf_target="\$cf_subdir\${section}/\${cf_target}"
8358
8359 CF_EOF
8360 fi
8361
8362 cat >>$cf_edit_man <<CF_EOF
8363         sed     -f $cf_man_alias \\
8364 CF_EOF
8365
8366 if test -f $MANPAGE_RENAMES ; then
8367 cat >>$cf_edit_man <<CF_EOF
8368                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
8369 CF_EOF
8370 else
8371 cat >>$cf_edit_man <<CF_EOF
8372                 < \$i >\$TMP
8373 CF_EOF
8374 fi
8375
8376 cat >>$cf_edit_man <<CF_EOF
8377 if test \$cf_tables = yes ; then
8378         tbl \$TMP >\$TMP.out
8379         mv \$TMP.out \$TMP
8380 fi
8381 CF_EOF
8382
8383 if test $with_curses_h != yes ; then
8384 cat >>$cf_edit_man <<CF_EOF
8385         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
8386         mv \$TMP.out \$TMP
8387 CF_EOF
8388 fi
8389
8390 cat >>$cf_edit_man <<CF_EOF
8391         if test \$form = format ; then
8392                 nroff -man \$TMP >\$TMP.out
8393                 mv \$TMP.out \$TMP
8394         fi
8395 CF_EOF
8396
8397 if test -n "$cf_compress" ; then
8398 cat >>$cf_edit_man <<CF_EOF
8399         if test \$verb = installing ; then
8400         if ( $cf_compress -f \$TMP )
8401         then
8402                 mv \$TMP.$cf_so_strip \$TMP
8403         fi
8404         fi
8405         cf_target="\$cf_target.$cf_so_strip"
8406 CF_EOF
8407 fi
8408
8409 case "$MANPAGE_FORMAT" in #(vi
8410 *BSDI*)
8411 cat >>$cf_edit_man <<CF_EOF
8412         if test \$form = format ; then
8413                 # BSDI installs only .0 suffixes in the cat directories
8414                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
8415         fi
8416 CF_EOF
8417   ;;
8418 esac
8419
8420 cat >>$cf_edit_man <<CF_EOF
8421         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
8422         if test \$verb = installing ; then
8423                 echo \$verb \$cf_target
8424                 \$INSTALL_DATA \$TMP \$cf_target
8425                 test -d \$cf_subdir\${section} &&
8426                 test -n "\$aliases" && (
8427                         cd \$cf_subdir\${section} && (
8428                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
8429                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
8430                                 cf_target=\`basename \$cf_target\`
8431                                 for cf_alias in \$aliases
8432                                 do
8433                                         if test \$section = 1 ; then
8434                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8435                                         fi
8436
8437                                         if test "$MANPAGE_SYMLINKS" = yes ; then
8438                                                 if test -f \$cf_alias\${suffix} ; then
8439                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
8440                                                         then
8441                                                                 continue
8442                                                         fi
8443                                                 fi
8444                                                 echo .. \$verb alias \$cf_alias\${suffix}
8445                                                 rm -f \$cf_alias\${suffix}
8446                                                 $LN_S \$cf_target \$cf_alias\${suffix}
8447                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
8448                                                 echo ".so \$cf_source" >\$TMP
8449 CF_EOF
8450 if test -n "$cf_compress" ; then
8451 cat >>$cf_edit_man <<CF_EOF
8452                                                 if test -n "$cf_so_strip" ; then
8453                                                         $cf_compress -f \$TMP
8454                                                         mv \$TMP.$cf_so_strip \$TMP
8455                                                 fi
8456 CF_EOF
8457 fi
8458 cat >>$cf_edit_man <<CF_EOF
8459                                                 echo .. \$verb alias \$cf_alias\${suffix}
8460                                                 rm -f \$cf_alias\${suffix}
8461                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
8462                                         fi
8463                                 done
8464                         )
8465                 )
8466         elif test \$verb = removing ; then
8467                 test -f \$cf_target && (
8468                         echo \$verb \$cf_target
8469                         rm -f \$cf_target
8470                 )
8471                 test -d \$cf_subdir\${section} &&
8472                 test -n "\$aliases" && (
8473                         cd \$cf_subdir\${section} && (
8474                                 for cf_alias in \$aliases
8475                                 do
8476                                         if test \$section = 1 ; then
8477                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8478                                         fi
8479
8480                                         echo .. \$verb alias \$cf_alias\${suffix}
8481                                         rm -f \$cf_alias\${suffix}
8482                                 done
8483                         )
8484                 )
8485         else
8486 #               echo ".hy 0"
8487                 cat \$TMP
8488         fi
8489         ;;
8490 esac
8491 done
8492
8493 if test $cf_inboth = yes ; then
8494 if test \$form != format ; then
8495         sh \$0 format \$verb \$mandir \$srcdir \$*
8496 fi
8497 fi
8498
8499 exit 0
8500 CF_EOF
8501 chmod 755 $cf_edit_man
8502
8503 ###############################################################################
8504
8505 ### Note that some functions (such as const) are normally disabled anyway.
8506 echo "$as_me:8506: checking if you want to build with function extensions" >&5
8507 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
8508
8509 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
8510 if test "${enable_ext_funcs+set}" = set; then
8511   enableval="$enable_ext_funcs"
8512   with_ext_funcs=$enableval
8513 else
8514   with_ext_funcs=yes
8515 fi;
8516 echo "$as_me:8516: result: $with_ext_funcs" >&5
8517 echo "${ECHO_T}$with_ext_funcs" >&6
8518 if test "$with_ext_funcs" = yes ; then
8519         NCURSES_EXT_FUNCS=1
8520         cat >>confdefs.h <<\EOF
8521 #define HAVE_CURSES_VERSION 1
8522 EOF
8523
8524         cat >>confdefs.h <<\EOF
8525 #define HAVE_HAS_KEY 1
8526 EOF
8527
8528         cat >>confdefs.h <<\EOF
8529 #define HAVE_RESIZETERM 1
8530 EOF
8531
8532         cat >>confdefs.h <<\EOF
8533 #define HAVE_RESIZE_TERM 1
8534 EOF
8535
8536         cat >>confdefs.h <<\EOF
8537 #define HAVE_USE_DEFAULT_COLORS 1
8538 EOF
8539
8540         cat >>confdefs.h <<\EOF
8541 #define HAVE_WRESIZE 1
8542 EOF
8543
8544         cat >>confdefs.h <<\EOF
8545 #define NCURSES_EXT_FUNCS 1
8546 EOF
8547
8548 else
8549         NCURSES_EXT_FUNCS=0
8550 fi
8551
8552 ###   use option --enable-const to turn on use of const beyond that in XSI.
8553 echo "$as_me:8553: checking for extended use of const keyword" >&5
8554 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
8555
8556 # Check whether --enable-const or --disable-const was given.
8557 if test "${enable_const+set}" = set; then
8558   enableval="$enable_const"
8559   with_ext_const=$enableval
8560 else
8561   with_ext_const=no
8562 fi;
8563 echo "$as_me:8563: result: $with_ext_const" >&5
8564 echo "${ECHO_T}$with_ext_const" >&6
8565 NCURSES_CONST='/*nothing*/'
8566 if test "$with_ext_const" = yes ; then
8567         NCURSES_CONST=const
8568 fi
8569
8570 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
8571 echo "$as_me:8571: checking if you want to use extended colors" >&5
8572 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
8573
8574 # Check whether --enable-ext-colors or --disable-ext-colors was given.
8575 if test "${enable_ext_colors+set}" = set; then
8576   enableval="$enable_ext_colors"
8577   with_ext_colors=$enableval
8578 else
8579   with_ext_colors=no
8580 fi;
8581 echo "$as_me:8581: result: $with_ext_colors" >&5
8582 echo "${ECHO_T}$with_ext_colors" >&6
8583 NCURSES_EXT_COLORS=0
8584 if test "$with_ext_colors" = yes ; then
8585         if test "$with_widec" != yes ; then
8586                 { { echo "$as_me:8586: error: This option applies only to wide-character library" >&5
8587 echo "$as_me: error: This option applies only to wide-character library" >&2;}
8588    { (exit 1); exit 1; }; }
8589         else
8590                 # cannot be ABI 5 since it changes sizeof(cchar_t)
8591
8592 if test "${with_abi_version+set}" != set; then
8593         case $cf_cv_rel_version in
8594         5.*)
8595                 cf_cv_rel_version=6.0
8596                 cf_cv_abi_version=6
8597                 { echo "$as_me:8597: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
8598 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
8599                 ;;
8600         esac
8601 fi
8602
8603         fi
8604         NCURSES_EXT_COLORS=1
8605         cat >>confdefs.h <<\EOF
8606 #define NCURSES_EXT_COLORS 1
8607 EOF
8608
8609 fi
8610
8611 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
8612 echo "$as_me:8612: checking if you want to use extended mouse encoding" >&5
8613 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
8614
8615 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
8616 if test "${enable_ext_mouse+set}" = set; then
8617   enableval="$enable_ext_mouse"
8618   with_ext_mouse=$enableval
8619 else
8620   with_ext_mouse=no
8621 fi;
8622 echo "$as_me:8622: result: $with_ext_mouse" >&5
8623 echo "${ECHO_T}$with_ext_mouse" >&6
8624 NCURSES_MOUSE_VERSION=1
8625 if test "$with_ext_mouse" = yes ; then
8626         NCURSES_MOUSE_VERSION=2
8627
8628 if test "${with_abi_version+set}" != set; then
8629         case $cf_cv_rel_version in
8630         5.*)
8631                 cf_cv_rel_version=6.0
8632                 cf_cv_abi_version=6
8633                 { echo "$as_me:8633: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
8634 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
8635                 ;;
8636         esac
8637 fi
8638
8639 fi
8640
8641 echo "$as_me:8641: checking if you want \$NCURSES_NO_PADDING code" >&5
8642 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
8643
8644 # Check whether --enable-no-padding or --disable-no-padding was given.
8645 if test "${enable_no_padding+set}" = set; then
8646   enableval="$enable_no_padding"
8647   with_no_padding=$enableval
8648 else
8649   with_no_padding=$with_ext_funcs
8650 fi;
8651 echo "$as_me:8651: result: $with_no_padding" >&5
8652 echo "${ECHO_T}$with_no_padding" >&6
8653 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
8654 #define NCURSES_NO_PADDING 1
8655 EOF
8656
8657 echo "$as_me:8657: checking for ANSI C header files" >&5
8658 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
8659 if test "${ac_cv_header_stdc+set}" = set; then
8660   echo $ECHO_N "(cached) $ECHO_C" >&6
8661 else
8662   cat >conftest.$ac_ext <<_ACEOF
8663 #line 8663 "configure"
8664 #include "confdefs.h"
8665 #include <stdlib.h>
8666 #include <stdarg.h>
8667 #include <string.h>
8668 #include <float.h>
8669
8670 _ACEOF
8671 if { (eval echo "$as_me:8671: \"$ac_cpp conftest.$ac_ext\"") >&5
8672   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8673   ac_status=$?
8674   egrep -v '^ *\+' conftest.er1 >conftest.err
8675   rm -f conftest.er1
8676   cat conftest.err >&5
8677   echo "$as_me:8677: \$? = $ac_status" >&5
8678   (exit $ac_status); } >/dev/null; then
8679   if test -s conftest.err; then
8680     ac_cpp_err=$ac_c_preproc_warn_flag
8681   else
8682     ac_cpp_err=
8683   fi
8684 else
8685   ac_cpp_err=yes
8686 fi
8687 if test -z "$ac_cpp_err"; then
8688   ac_cv_header_stdc=yes
8689 else
8690   echo "$as_me: failed program was:" >&5
8691   cat conftest.$ac_ext >&5
8692   ac_cv_header_stdc=no
8693 fi
8694 rm -f conftest.err conftest.$ac_ext
8695
8696 if test $ac_cv_header_stdc = yes; then
8697   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8698   cat >conftest.$ac_ext <<_ACEOF
8699 #line 8699 "configure"
8700 #include "confdefs.h"
8701 #include <string.h>
8702
8703 _ACEOF
8704 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8705   egrep "memchr" >/dev/null 2>&1; then
8706   :
8707 else
8708   ac_cv_header_stdc=no
8709 fi
8710 rm -f conftest*
8711
8712 fi
8713
8714 if test $ac_cv_header_stdc = yes; then
8715   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8716   cat >conftest.$ac_ext <<_ACEOF
8717 #line 8717 "configure"
8718 #include "confdefs.h"
8719 #include <stdlib.h>
8720
8721 _ACEOF
8722 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8723   egrep "free" >/dev/null 2>&1; then
8724   :
8725 else
8726   ac_cv_header_stdc=no
8727 fi
8728 rm -f conftest*
8729
8730 fi
8731
8732 if test $ac_cv_header_stdc = yes; then
8733   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8734   if test "$cross_compiling" = yes; then
8735   :
8736 else
8737   cat >conftest.$ac_ext <<_ACEOF
8738 #line 8738 "configure"
8739 #include "confdefs.h"
8740 #include <ctype.h>
8741 #if ((' ' & 0x0FF) == 0x020)
8742 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8743 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8744 #else
8745 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8746                      || ('j' <= (c) && (c) <= 'r') \
8747                      || ('s' <= (c) && (c) <= 'z'))
8748 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8749 #endif
8750
8751 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8752 int
8753 main ()
8754 {
8755   int i;
8756   for (i = 0; i < 256; i++)
8757     if (XOR (islower (i), ISLOWER (i))
8758         || toupper (i) != TOUPPER (i))
8759       $ac_main_return(2);
8760   $ac_main_return (0);
8761 }
8762 _ACEOF
8763 rm -f conftest$ac_exeext
8764 if { (eval echo "$as_me:8764: \"$ac_link\"") >&5
8765   (eval $ac_link) 2>&5
8766   ac_status=$?
8767   echo "$as_me:8767: \$? = $ac_status" >&5
8768   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8769   { (eval echo "$as_me:8769: \"$ac_try\"") >&5
8770   (eval $ac_try) 2>&5
8771   ac_status=$?
8772   echo "$as_me:8772: \$? = $ac_status" >&5
8773   (exit $ac_status); }; }; then
8774   :
8775 else
8776   echo "$as_me: program exited with status $ac_status" >&5
8777 echo "$as_me: failed program was:" >&5
8778 cat conftest.$ac_ext >&5
8779 ac_cv_header_stdc=no
8780 fi
8781 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8782 fi
8783 fi
8784 fi
8785 echo "$as_me:8785: result: $ac_cv_header_stdc" >&5
8786 echo "${ECHO_T}$ac_cv_header_stdc" >&6
8787 if test $ac_cv_header_stdc = yes; then
8788
8789 cat >>confdefs.h <<\EOF
8790 #define STDC_HEADERS 1
8791 EOF
8792
8793 fi
8794
8795 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8796
8797 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8798                   inttypes.h stdint.h unistd.h
8799 do
8800 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8801 echo "$as_me:8801: checking for $ac_header" >&5
8802 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8803 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8804   echo $ECHO_N "(cached) $ECHO_C" >&6
8805 else
8806   cat >conftest.$ac_ext <<_ACEOF
8807 #line 8807 "configure"
8808 #include "confdefs.h"
8809 $ac_includes_default
8810 #include <$ac_header>
8811 _ACEOF
8812 rm -f conftest.$ac_objext
8813 if { (eval echo "$as_me:8813: \"$ac_compile\"") >&5
8814   (eval $ac_compile) 2>&5
8815   ac_status=$?
8816   echo "$as_me:8816: \$? = $ac_status" >&5
8817   (exit $ac_status); } &&
8818          { ac_try='test -s conftest.$ac_objext'
8819   { (eval echo "$as_me:8819: \"$ac_try\"") >&5
8820   (eval $ac_try) 2>&5
8821   ac_status=$?
8822   echo "$as_me:8822: \$? = $ac_status" >&5
8823   (exit $ac_status); }; }; then
8824   eval "$as_ac_Header=yes"
8825 else
8826   echo "$as_me: failed program was:" >&5
8827 cat conftest.$ac_ext >&5
8828 eval "$as_ac_Header=no"
8829 fi
8830 rm -f conftest.$ac_objext conftest.$ac_ext
8831 fi
8832 echo "$as_me:8832: result: `eval echo '${'$as_ac_Header'}'`" >&5
8833 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8834 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8835   cat >>confdefs.h <<EOF
8836 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8837 EOF
8838
8839 fi
8840 done
8841
8842 echo "$as_me:8842: checking for signed char" >&5
8843 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
8844 if test "${ac_cv_type_signed_char+set}" = set; then
8845   echo $ECHO_N "(cached) $ECHO_C" >&6
8846 else
8847   cat >conftest.$ac_ext <<_ACEOF
8848 #line 8848 "configure"
8849 #include "confdefs.h"
8850 $ac_includes_default
8851 int
8852 main ()
8853 {
8854 if ((signed char *) 0)
8855   return 0;
8856 if (sizeof (signed char))
8857   return 0;
8858   ;
8859   return 0;
8860 }
8861 _ACEOF
8862 rm -f conftest.$ac_objext
8863 if { (eval echo "$as_me:8863: \"$ac_compile\"") >&5
8864   (eval $ac_compile) 2>&5
8865   ac_status=$?
8866   echo "$as_me:8866: \$? = $ac_status" >&5
8867   (exit $ac_status); } &&
8868          { ac_try='test -s conftest.$ac_objext'
8869   { (eval echo "$as_me:8869: \"$ac_try\"") >&5
8870   (eval $ac_try) 2>&5
8871   ac_status=$?
8872   echo "$as_me:8872: \$? = $ac_status" >&5
8873   (exit $ac_status); }; }; then
8874   ac_cv_type_signed_char=yes
8875 else
8876   echo "$as_me: failed program was:" >&5
8877 cat conftest.$ac_ext >&5
8878 ac_cv_type_signed_char=no
8879 fi
8880 rm -f conftest.$ac_objext conftest.$ac_ext
8881 fi
8882 echo "$as_me:8882: result: $ac_cv_type_signed_char" >&5
8883 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
8884
8885 echo "$as_me:8885: checking size of signed char" >&5
8886 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
8887 if test "${ac_cv_sizeof_signed_char+set}" = set; then
8888   echo $ECHO_N "(cached) $ECHO_C" >&6
8889 else
8890   if test "$ac_cv_type_signed_char" = yes; then
8891   if test "$cross_compiling" = yes; then
8892   # Depending upon the size, compute the lo and hi bounds.
8893 cat >conftest.$ac_ext <<_ACEOF
8894 #line 8894 "configure"
8895 #include "confdefs.h"
8896 $ac_includes_default
8897 int
8898 main ()
8899 {
8900 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
8901   ;
8902   return 0;
8903 }
8904 _ACEOF
8905 rm -f conftest.$ac_objext
8906 if { (eval echo "$as_me:8906: \"$ac_compile\"") >&5
8907   (eval $ac_compile) 2>&5
8908   ac_status=$?
8909   echo "$as_me:8909: \$? = $ac_status" >&5
8910   (exit $ac_status); } &&
8911          { ac_try='test -s conftest.$ac_objext'
8912   { (eval echo "$as_me:8912: \"$ac_try\"") >&5
8913   (eval $ac_try) 2>&5
8914   ac_status=$?
8915   echo "$as_me:8915: \$? = $ac_status" >&5
8916   (exit $ac_status); }; }; then
8917   ac_lo=0 ac_mid=0
8918   while :; do
8919     cat >conftest.$ac_ext <<_ACEOF
8920 #line 8920 "configure"
8921 #include "confdefs.h"
8922 $ac_includes_default
8923 int
8924 main ()
8925 {
8926 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8927   ;
8928   return 0;
8929 }
8930 _ACEOF
8931 rm -f conftest.$ac_objext
8932 if { (eval echo "$as_me:8932: \"$ac_compile\"") >&5
8933   (eval $ac_compile) 2>&5
8934   ac_status=$?
8935   echo "$as_me:8935: \$? = $ac_status" >&5
8936   (exit $ac_status); } &&
8937          { ac_try='test -s conftest.$ac_objext'
8938   { (eval echo "$as_me:8938: \"$ac_try\"") >&5
8939   (eval $ac_try) 2>&5
8940   ac_status=$?
8941   echo "$as_me:8941: \$? = $ac_status" >&5
8942   (exit $ac_status); }; }; then
8943   ac_hi=$ac_mid; break
8944 else
8945   echo "$as_me: failed program was:" >&5
8946 cat conftest.$ac_ext >&5
8947 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
8948 fi
8949 rm -f conftest.$ac_objext conftest.$ac_ext
8950   done
8951 else
8952   echo "$as_me: failed program was:" >&5
8953 cat conftest.$ac_ext >&5
8954 ac_hi=-1 ac_mid=-1
8955   while :; do
8956     cat >conftest.$ac_ext <<_ACEOF
8957 #line 8957 "configure"
8958 #include "confdefs.h"
8959 $ac_includes_default
8960 int
8961 main ()
8962 {
8963 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
8964   ;
8965   return 0;
8966 }
8967 _ACEOF
8968 rm -f conftest.$ac_objext
8969 if { (eval echo "$as_me:8969: \"$ac_compile\"") >&5
8970   (eval $ac_compile) 2>&5
8971   ac_status=$?
8972   echo "$as_me:8972: \$? = $ac_status" >&5
8973   (exit $ac_status); } &&
8974          { ac_try='test -s conftest.$ac_objext'
8975   { (eval echo "$as_me:8975: \"$ac_try\"") >&5
8976   (eval $ac_try) 2>&5
8977   ac_status=$?
8978   echo "$as_me:8978: \$? = $ac_status" >&5
8979   (exit $ac_status); }; }; then
8980   ac_lo=$ac_mid; break
8981 else
8982   echo "$as_me: failed program was:" >&5
8983 cat conftest.$ac_ext >&5
8984 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
8985 fi
8986 rm -f conftest.$ac_objext conftest.$ac_ext
8987   done
8988 fi
8989 rm -f conftest.$ac_objext conftest.$ac_ext
8990 # Binary search between lo and hi bounds.
8991 while test "x$ac_lo" != "x$ac_hi"; do
8992   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8993   cat >conftest.$ac_ext <<_ACEOF
8994 #line 8994 "configure"
8995 #include "confdefs.h"
8996 $ac_includes_default
8997 int
8998 main ()
8999 {
9000 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
9001   ;
9002   return 0;
9003 }
9004 _ACEOF
9005 rm -f conftest.$ac_objext
9006 if { (eval echo "$as_me:9006: \"$ac_compile\"") >&5
9007   (eval $ac_compile) 2>&5
9008   ac_status=$?
9009   echo "$as_me:9009: \$? = $ac_status" >&5
9010   (exit $ac_status); } &&
9011          { ac_try='test -s conftest.$ac_objext'
9012   { (eval echo "$as_me:9012: \"$ac_try\"") >&5
9013   (eval $ac_try) 2>&5
9014   ac_status=$?
9015   echo "$as_me:9015: \$? = $ac_status" >&5
9016   (exit $ac_status); }; }; then
9017   ac_hi=$ac_mid
9018 else
9019   echo "$as_me: failed program was:" >&5
9020 cat conftest.$ac_ext >&5
9021 ac_lo=`expr $ac_mid + 1`
9022 fi
9023 rm -f conftest.$ac_objext conftest.$ac_ext
9024 done
9025 ac_cv_sizeof_signed_char=$ac_lo
9026 else
9027   if test "$cross_compiling" = yes; then
9028   { { echo "$as_me:9028: error: cannot run test program while cross compiling" >&5
9029 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
9030    { (exit 1); exit 1; }; }
9031 else
9032   cat >conftest.$ac_ext <<_ACEOF
9033 #line 9033 "configure"
9034 #include "confdefs.h"
9035 $ac_includes_default
9036 int
9037 main ()
9038 {
9039 FILE *f = fopen ("conftest.val", "w");
9040 if (!f)
9041   $ac_main_return (1);
9042 fprintf (f, "%d", (sizeof (signed char)));
9043 fclose (f);
9044   ;
9045   return 0;
9046 }
9047 _ACEOF
9048 rm -f conftest$ac_exeext
9049 if { (eval echo "$as_me:9049: \"$ac_link\"") >&5
9050   (eval $ac_link) 2>&5
9051   ac_status=$?
9052   echo "$as_me:9052: \$? = $ac_status" >&5
9053   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9054   { (eval echo "$as_me:9054: \"$ac_try\"") >&5
9055   (eval $ac_try) 2>&5
9056   ac_status=$?
9057   echo "$as_me:9057: \$? = $ac_status" >&5
9058   (exit $ac_status); }; }; then
9059   ac_cv_sizeof_signed_char=`cat conftest.val`
9060 else
9061   echo "$as_me: program exited with status $ac_status" >&5
9062 echo "$as_me: failed program was:" >&5
9063 cat conftest.$ac_ext >&5
9064 fi
9065 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9066 fi
9067 fi
9068 rm -f conftest.val
9069 else
9070   ac_cv_sizeof_signed_char=0
9071 fi
9072 fi
9073 echo "$as_me:9073: result: $ac_cv_sizeof_signed_char" >&5
9074 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
9075 cat >>confdefs.h <<EOF
9076 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
9077 EOF
9078
9079 if test "$ac_cv_sizeof_signed_char" = 1 ; then
9080         NCURSES_SBOOL="signed char"
9081 else
9082         NCURSES_SBOOL="char"
9083 fi
9084 echo "$as_me:9084: checking if you want to use signed Boolean array in term.h" >&5
9085 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
9086
9087 # Check whether --enable-signed-char or --disable-signed-char was given.
9088 if test "${enable_signed_char+set}" = set; then
9089   enableval="$enable_signed_char"
9090   with_signed_char=$enableval
9091 else
9092   with_signed_char=no
9093 fi;
9094 echo "$as_me:9094: result: $with_signed_char" >&5
9095 echo "${ECHO_T}$with_signed_char" >&6
9096 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
9097
9098 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
9099 echo "$as_me:9099: checking if you want SIGWINCH handler" >&5
9100 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
9101
9102 # Check whether --enable-sigwinch or --disable-sigwinch was given.
9103 if test "${enable_sigwinch+set}" = set; then
9104   enableval="$enable_sigwinch"
9105   with_sigwinch=$enableval
9106 else
9107   with_sigwinch=$with_ext_funcs
9108 fi;
9109 echo "$as_me:9109: result: $with_sigwinch" >&5
9110 echo "${ECHO_T}$with_sigwinch" >&6
9111 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
9112 #define USE_SIGWINCH 1
9113 EOF
9114
9115 ###   use option --enable-tcap-names to allow user to define new capabilities
9116 echo "$as_me:9116: checking if you want user-definable terminal capabilities like termcap" >&5
9117 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
9118
9119 # Check whether --enable-tcap-names or --disable-tcap-names was given.
9120 if test "${enable_tcap_names+set}" = set; then
9121   enableval="$enable_tcap_names"
9122   with_tcap_names=$enableval
9123 else
9124   with_tcap_names=$with_ext_funcs
9125 fi;
9126 echo "$as_me:9126: result: $with_tcap_names" >&5
9127 echo "${ECHO_T}$with_tcap_names" >&6
9128 NCURSES_XNAMES=0
9129 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
9130
9131 ###############################################################################
9132 # These options are relatively safe to experiment with.
9133
9134 echo "$as_me:9134: checking if you want all development code" >&5
9135 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
9136
9137 # Check whether --with-develop or --without-develop was given.
9138 if test "${with_develop+set}" = set; then
9139   withval="$with_develop"
9140   with_develop=$withval
9141 else
9142   with_develop=no
9143 fi;
9144 echo "$as_me:9144: result: $with_develop" >&5
9145 echo "${ECHO_T}$with_develop" >&6
9146
9147 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
9148 echo "$as_me:9148: checking if you want hard-tabs code" >&5
9149 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
9150
9151 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
9152 if test "${enable_hard_tabs+set}" = set; then
9153   enableval="$enable_hard_tabs"
9154
9155 else
9156   enable_hard_tabs=$with_develop
9157 fi;
9158 echo "$as_me:9158: result: $enable_hard_tabs" >&5
9159 echo "${ECHO_T}$enable_hard_tabs" >&6
9160 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
9161 #define USE_HARD_TABS 1
9162 EOF
9163
9164 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
9165 echo "$as_me:9165: checking if you want limited support for xmc" >&5
9166 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
9167
9168 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
9169 if test "${enable_xmc_glitch+set}" = set; then
9170   enableval="$enable_xmc_glitch"
9171
9172 else
9173   enable_xmc_glitch=$with_develop
9174 fi;
9175 echo "$as_me:9175: result: $enable_xmc_glitch" >&5
9176 echo "${ECHO_T}$enable_xmc_glitch" >&6
9177 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
9178 #define USE_XMC_SUPPORT 1
9179 EOF
9180
9181 ###############################################################################
9182 # These are just experimental, probably should not be in a package:
9183
9184 echo "$as_me:9184: checking if you do not want to assume colors are white-on-black" >&5
9185 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
9186
9187 # Check whether --enable-assumed-color or --disable-assumed-color was given.
9188 if test "${enable_assumed_color+set}" = set; then
9189   enableval="$enable_assumed_color"
9190   with_assumed_color=$enableval
9191 else
9192   with_assumed_color=yes
9193 fi;
9194 echo "$as_me:9194: result: $with_assumed_color" >&5
9195 echo "${ECHO_T}$with_assumed_color" >&6
9196 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
9197 #define USE_ASSUMED_COLOR 1
9198 EOF
9199
9200 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
9201 echo "$as_me:9201: checking if you want hashmap scrolling-optimization code" >&5
9202 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
9203
9204 # Check whether --enable-hashmap or --disable-hashmap was given.
9205 if test "${enable_hashmap+set}" = set; then
9206   enableval="$enable_hashmap"
9207   with_hashmap=$enableval
9208 else
9209   with_hashmap=yes
9210 fi;
9211 echo "$as_me:9211: result: $with_hashmap" >&5
9212 echo "${ECHO_T}$with_hashmap" >&6
9213 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
9214 #define USE_HASHMAP 1
9215 EOF
9216
9217 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
9218 echo "$as_me:9218: checking if you want colorfgbg code" >&5
9219 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
9220
9221 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
9222 if test "${enable_colorfgbg+set}" = set; then
9223   enableval="$enable_colorfgbg"
9224   with_colorfgbg=$enableval
9225 else
9226   with_colorfgbg=no
9227 fi;
9228 echo "$as_me:9228: result: $with_colorfgbg" >&5
9229 echo "${ECHO_T}$with_colorfgbg" >&6
9230 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
9231 #define USE_COLORFGBG 1
9232 EOF
9233
9234 # This is still experimental (20080329), but should ultimately be moved to
9235 # the script-block --with-normal, etc.
9236
9237 echo "$as_me:9237: checking if you want to link with the pthread library" >&5
9238 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
9239
9240 # Check whether --with-pthread or --without-pthread was given.
9241 if test "${with_pthread+set}" = set; then
9242   withval="$with_pthread"
9243   with_pthread=$withval
9244 else
9245   with_pthread=no
9246 fi;
9247 echo "$as_me:9247: result: $with_pthread" >&5
9248 echo "${ECHO_T}$with_pthread" >&6
9249
9250 if test "$with_pthread" != no ; then
9251     echo "$as_me:9251: checking for pthread.h" >&5
9252 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
9253 if test "${ac_cv_header_pthread_h+set}" = set; then
9254   echo $ECHO_N "(cached) $ECHO_C" >&6
9255 else
9256   cat >conftest.$ac_ext <<_ACEOF
9257 #line 9257 "configure"
9258 #include "confdefs.h"
9259 #include <pthread.h>
9260 _ACEOF
9261 if { (eval echo "$as_me:9261: \"$ac_cpp conftest.$ac_ext\"") >&5
9262   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9263   ac_status=$?
9264   egrep -v '^ *\+' conftest.er1 >conftest.err
9265   rm -f conftest.er1
9266   cat conftest.err >&5
9267   echo "$as_me:9267: \$? = $ac_status" >&5
9268   (exit $ac_status); } >/dev/null; then
9269   if test -s conftest.err; then
9270     ac_cpp_err=$ac_c_preproc_warn_flag
9271   else
9272     ac_cpp_err=
9273   fi
9274 else
9275   ac_cpp_err=yes
9276 fi
9277 if test -z "$ac_cpp_err"; then
9278   ac_cv_header_pthread_h=yes
9279 else
9280   echo "$as_me: failed program was:" >&5
9281   cat conftest.$ac_ext >&5
9282   ac_cv_header_pthread_h=no
9283 fi
9284 rm -f conftest.err conftest.$ac_ext
9285 fi
9286 echo "$as_me:9286: result: $ac_cv_header_pthread_h" >&5
9287 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
9288 if test $ac_cv_header_pthread_h = yes; then
9289
9290         cat >>confdefs.h <<\EOF
9291 #define HAVE_PTHREADS_H 1
9292 EOF
9293
9294         echo "$as_me:9294: checking if we can link with the pthread library" >&5
9295 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
9296         cf_save_LIBS="$LIBS"
9297         LIBS="-lpthread $LIBS"
9298         cat >conftest.$ac_ext <<_ACEOF
9299 #line 9299 "configure"
9300 #include "confdefs.h"
9301
9302 #include <pthread.h>
9303
9304 int
9305 main ()
9306 {
9307
9308         int rc = pthread_create(0,0,0,0);
9309
9310   ;
9311   return 0;
9312 }
9313 _ACEOF
9314 rm -f conftest.$ac_objext conftest$ac_exeext
9315 if { (eval echo "$as_me:9315: \"$ac_link\"") >&5
9316   (eval $ac_link) 2>&5
9317   ac_status=$?
9318   echo "$as_me:9318: \$? = $ac_status" >&5
9319   (exit $ac_status); } &&
9320          { ac_try='test -s conftest$ac_exeext'
9321   { (eval echo "$as_me:9321: \"$ac_try\"") >&5
9322   (eval $ac_try) 2>&5
9323   ac_status=$?
9324   echo "$as_me:9324: \$? = $ac_status" >&5
9325   (exit $ac_status); }; }; then
9326   with_pthread=yes
9327 else
9328   echo "$as_me: failed program was:" >&5
9329 cat conftest.$ac_ext >&5
9330 with_pthread=no
9331 fi
9332 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9333         LIBS="$cf_save_LIBS"
9334         echo "$as_me:9334: result: $with_pthread" >&5
9335 echo "${ECHO_T}$with_pthread" >&6
9336
9337         if test "$with_pthread" = yes ; then
9338             LIBS="-lpthread $LIBS"
9339             cat >>confdefs.h <<\EOF
9340 #define HAVE_LIBPTHREADS 1
9341 EOF
9342
9343         else
9344             { { echo "$as_me:9344: error: Cannot link with pthread library" >&5
9345 echo "$as_me: error: Cannot link with pthread library" >&2;}
9346    { (exit 1); exit 1; }; }
9347         fi
9348
9349 fi
9350
9351 fi
9352
9353 echo "$as_me:9353: checking if you want to use weak-symbols for pthreads" >&5
9354 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
9355
9356 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
9357 if test "${enable_weak_symbols+set}" = set; then
9358   enableval="$enable_weak_symbols"
9359   use_weak_symbols=$withval
9360 else
9361   use_weak_symbols=no
9362 fi;
9363 echo "$as_me:9363: result: $use_weak_symbols" >&5
9364 echo "${ECHO_T}$use_weak_symbols" >&6
9365 if test "$use_weak_symbols" = yes ; then
9366
9367 echo "$as_me:9367: checking if $CC supports weak symbols" >&5
9368 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
9369 if test "${cf_cv_weak_symbols+set}" = set; then
9370   echo $ECHO_N "(cached) $ECHO_C" >&6
9371 else
9372
9373 cat >conftest.$ac_ext <<_ACEOF
9374 #line 9374 "configure"
9375 #include "confdefs.h"
9376
9377 #include <stdio.h>
9378 int
9379 main ()
9380 {
9381
9382 #if defined(__GNUC__)
9383 #  if defined __USE_ISOC99
9384 #    define _cat_pragma(exp)    _Pragma(#exp)
9385 #    define _weak_pragma(exp)   _cat_pragma(weak name)
9386 #  else
9387 #    define _weak_pragma(exp)
9388 #  endif
9389 #  define _declare(name)        __extension__ extern __typeof__(name) name
9390 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
9391 #endif
9392
9393 weak_symbol(fopen);
9394
9395   ;
9396   return 0;
9397 }
9398 _ACEOF
9399 rm -f conftest.$ac_objext
9400 if { (eval echo "$as_me:9400: \"$ac_compile\"") >&5
9401   (eval $ac_compile) 2>&5
9402   ac_status=$?
9403   echo "$as_me:9403: \$? = $ac_status" >&5
9404   (exit $ac_status); } &&
9405          { ac_try='test -s conftest.$ac_objext'
9406   { (eval echo "$as_me:9406: \"$ac_try\"") >&5
9407   (eval $ac_try) 2>&5
9408   ac_status=$?
9409   echo "$as_me:9409: \$? = $ac_status" >&5
9410   (exit $ac_status); }; }; then
9411   cf_cv_weak_symbols=yes
9412 else
9413   echo "$as_me: failed program was:" >&5
9414 cat conftest.$ac_ext >&5
9415 cf_cv_weak_symbols=no
9416 fi
9417 rm -f conftest.$ac_objext conftest.$ac_ext
9418
9419 fi
9420 echo "$as_me:9420: result: $cf_cv_weak_symbols" >&5
9421 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
9422
9423 else
9424     cf_cv_weak_symbols=no
9425 fi
9426
9427 if test $cf_cv_weak_symbols = yes ; then
9428     cat >>confdefs.h <<\EOF
9429 #define USE_WEAK_SYMBOLS 1
9430 EOF
9431
9432 fi
9433
9434 PTHREAD=
9435 if test "$with_pthread" = "yes" ; then
9436     cat >>confdefs.h <<\EOF
9437 #define USE_PTHREADS 1
9438 EOF
9439
9440     enable_reentrant=yes
9441     if test $cf_cv_weak_symbols = yes ; then
9442         PTHREAD=-lpthread
9443     fi
9444 fi
9445
9446 # Reentrant code has to be opaque; there's little advantage to making ncurses
9447 # opaque outside of that, so there is no --enable-opaque option.  We can use
9448 # this option without --with-pthreads, but this will be always set for
9449 # pthreads.
9450 echo "$as_me:9450: checking if you want experimental reentrant code" >&5
9451 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
9452
9453 # Check whether --enable-reentrant or --disable-reentrant was given.
9454 if test "${enable_reentrant+set}" = set; then
9455   enableval="$enable_reentrant"
9456   with_reentrant=$enableval
9457 else
9458   with_reentrant=no
9459 fi;
9460 echo "$as_me:9460: result: $with_reentrant" >&5
9461 echo "${ECHO_T}$with_reentrant" >&6
9462 if test "$with_reentrant" = yes ; then
9463         cf_cv_enable_reentrant=1
9464         cf_cv_enable_opaque="NCURSES_INTERNALS"
9465         NCURSES_OPAQUE=1
9466         NCURSES_SIZE_T=int
9467     if test $cf_cv_weak_symbols = yes ; then
9468
9469 # remove pthread library from $LIBS
9470 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
9471
9472     else
9473         LIB_SUFFIX="t${LIB_SUFFIX}"
9474     fi
9475         cat >>confdefs.h <<\EOF
9476 #define USE_REENTRANT 1
9477 EOF
9478
9479 if test "${with_abi_version+set}" != set; then
9480         case $cf_cv_rel_version in
9481         5.*)
9482                 cf_cv_rel_version=6.0
9483                 cf_cv_abi_version=6
9484                 { echo "$as_me:9484: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9485 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9486                 ;;
9487         esac
9488 fi
9489
9490 else
9491         cf_cv_enable_reentrant=0
9492         cf_cv_enable_opaque="NCURSES_OPAQUE"
9493         NCURSES_OPAQUE=0
9494         NCURSES_SIZE_T=short
9495 fi
9496
9497 echo "$as_me:9497: checking if you want experimental safe-sprintf code" >&5
9498 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
9499
9500 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
9501 if test "${enable_safe_sprintf+set}" = set; then
9502   enableval="$enable_safe_sprintf"
9503   with_safe_sprintf=$enableval
9504 else
9505   with_safe_sprintf=no
9506 fi;
9507 echo "$as_me:9507: result: $with_safe_sprintf" >&5
9508 echo "${ECHO_T}$with_safe_sprintf" >&6
9509 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
9510 #define USE_SAFE_SPRINTF 1
9511 EOF
9512
9513 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
9514 # when hashmap is used scroll hints are useless
9515 if test "$with_hashmap" = no ; then
9516 echo "$as_me:9516: checking if you want to experiment without scrolling-hints code" >&5
9517 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
9518
9519 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
9520 if test "${enable_scroll_hints+set}" = set; then
9521   enableval="$enable_scroll_hints"
9522   with_scroll_hints=$enableval
9523 else
9524   with_scroll_hints=yes
9525 fi;
9526 echo "$as_me:9526: result: $with_scroll_hints" >&5
9527 echo "${ECHO_T}$with_scroll_hints" >&6
9528 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
9529 #define USE_SCROLL_HINTS 1
9530 EOF
9531
9532 fi
9533
9534 echo "$as_me:9534: checking if you want experimental wgetch-events code" >&5
9535 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
9536
9537 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
9538 if test "${enable_wgetch_events+set}" = set; then
9539   enableval="$enable_wgetch_events"
9540   with_wgetch_events=$enableval
9541 else
9542   with_wgetch_events=no
9543 fi;
9544 echo "$as_me:9544: result: $with_wgetch_events" >&5
9545 echo "${ECHO_T}$with_wgetch_events" >&6
9546 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
9547 #define NCURSES_WGETCH_EVENTS 1
9548 EOF
9549
9550 ###############################################################################
9551
9552 ###     use option --disable-echo to suppress full display compiling commands
9553 echo "$as_me:9553: checking if you want to display full commands during build" >&5
9554 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
9555
9556 # Check whether --enable-echo or --disable-echo was given.
9557 if test "${enable_echo+set}" = set; then
9558   enableval="$enable_echo"
9559   with_echo=$enableval
9560 else
9561   with_echo=yes
9562 fi;
9563 if test "$with_echo" = yes; then
9564         ECHO_LINK=
9565 else
9566         ECHO_LINK='@ echo linking $@ ... ;'
9567         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
9568         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
9569 fi
9570 echo "$as_me:9570: result: $with_echo" >&5
9571 echo "${ECHO_T}$with_echo" >&6
9572
9573 ###     use option --enable-warnings to turn on all gcc warnings
9574 echo "$as_me:9574: checking if you want to see compiler warnings" >&5
9575 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
9576
9577 # Check whether --enable-warnings or --disable-warnings was given.
9578 if test "${enable_warnings+set}" = set; then
9579   enableval="$enable_warnings"
9580   with_warnings=$enableval
9581 fi;
9582 echo "$as_me:9582: result: $with_warnings" >&5
9583 echo "${ECHO_T}$with_warnings" >&6
9584
9585 if test "x$with_warnings" = "xyes"; then
9586         ADAFLAGS="$ADAFLAGS -gnatg"
9587
9588 INTEL_COMPILER=no
9589
9590 if test "$GCC" = yes ; then
9591         case $host_os in
9592         linux*|gnu*)
9593                 echo "$as_me:9593: checking if this is really Intel C compiler" >&5
9594 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
9595                 cf_save_CFLAGS="$CFLAGS"
9596                 CFLAGS="$CFLAGS -no-gcc"
9597                 cat >conftest.$ac_ext <<_ACEOF
9598 #line 9598 "configure"
9599 #include "confdefs.h"
9600
9601 int
9602 main ()
9603 {
9604
9605 #ifdef __INTEL_COMPILER
9606 #else
9607 make an error
9608 #endif
9609
9610   ;
9611   return 0;
9612 }
9613 _ACEOF
9614 rm -f conftest.$ac_objext
9615 if { (eval echo "$as_me:9615: \"$ac_compile\"") >&5
9616   (eval $ac_compile) 2>&5
9617   ac_status=$?
9618   echo "$as_me:9618: \$? = $ac_status" >&5
9619   (exit $ac_status); } &&
9620          { ac_try='test -s conftest.$ac_objext'
9621   { (eval echo "$as_me:9621: \"$ac_try\"") >&5
9622   (eval $ac_try) 2>&5
9623   ac_status=$?
9624   echo "$as_me:9624: \$? = $ac_status" >&5
9625   (exit $ac_status); }; }; then
9626   INTEL_COMPILER=yes
9627 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9628
9629 else
9630   echo "$as_me: failed program was:" >&5
9631 cat conftest.$ac_ext >&5
9632 fi
9633 rm -f conftest.$ac_objext conftest.$ac_ext
9634                 CFLAGS="$cf_save_CFLAGS"
9635                 echo "$as_me:9635: result: $INTEL_COMPILER" >&5
9636 echo "${ECHO_T}$INTEL_COMPILER" >&6
9637                 ;;
9638         esac
9639 fi
9640
9641 cat > conftest.$ac_ext <<EOF
9642 #line 9642 "${as_me-configure}"
9643 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9644 EOF
9645
9646 if test "$INTEL_COMPILER" = yes
9647 then
9648 # The "-wdXXX" options suppress warnings:
9649 # remark #1419: external declaration in primary source file
9650 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9651 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9652 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9653 # remark #193: zero used for undefined preprocessing identifier
9654 # remark #593: variable "curs_sb_left_arrow" was set but never used
9655 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9656 # remark #869: parameter "tw" was never referenced
9657 # remark #981: operands are evaluated in unspecified order
9658 # warning #269: invalid format string conversion
9659
9660         { echo "$as_me:9660: checking for $CC warning options..." >&5
9661 echo "$as_me: checking for $CC warning options..." >&6;}
9662         cf_save_CFLAGS="$CFLAGS"
9663         EXTRA_CFLAGS="-Wall"
9664         for cf_opt in \
9665                 wd1419 \
9666                 wd1682 \
9667                 wd1683 \
9668                 wd1684 \
9669                 wd193 \
9670                 wd279 \
9671                 wd593 \
9672                 wd810 \
9673                 wd869 \
9674                 wd981
9675         do
9676                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9677                 if { (eval echo "$as_me:9677: \"$ac_compile\"") >&5
9678   (eval $ac_compile) 2>&5
9679   ac_status=$?
9680   echo "$as_me:9680: \$? = $ac_status" >&5
9681   (exit $ac_status); }; then
9682                         test -n "$verbose" && echo "$as_me:9682: result: ... -$cf_opt" >&5
9683 echo "${ECHO_T}... -$cf_opt" >&6
9684                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9685                 fi
9686         done
9687         CFLAGS="$cf_save_CFLAGS"
9688
9689 elif test "$GCC" = yes
9690 then
9691         { echo "$as_me:9691: checking for $CC warning options..." >&5
9692 echo "$as_me: checking for $CC warning options..." >&6;}
9693         cf_save_CFLAGS="$CFLAGS"
9694         EXTRA_CFLAGS="-W -Wall"
9695         cf_warn_CONST=""
9696         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
9697         for cf_opt in \
9698                 Wbad-function-cast \
9699                 Wcast-align \
9700                 Wcast-qual \
9701                 Winline \
9702                 Wmissing-declarations \
9703                 Wmissing-prototypes \
9704                 Wnested-externs \
9705                 Wpointer-arith \
9706                 Wshadow \
9707                 Wstrict-prototypes \
9708                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
9709         do
9710                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9711                 if { (eval echo "$as_me:9711: \"$ac_compile\"") >&5
9712   (eval $ac_compile) 2>&5
9713   ac_status=$?
9714   echo "$as_me:9714: \$? = $ac_status" >&5
9715   (exit $ac_status); }; then
9716                         test -n "$verbose" && echo "$as_me:9716: result: ... -$cf_opt" >&5
9717 echo "${ECHO_T}... -$cf_opt" >&6
9718                         case $cf_opt in #(vi
9719                         Wcast-qual) #(vi
9720                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
9721                                 ;;
9722                         Winline) #(vi
9723                                 case $GCC_VERSION in
9724                                 [34].*)
9725                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
9726
9727 echo "${as_me-configure}:9727: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
9728
9729                                         continue;;
9730                                 esac
9731                                 ;;
9732                         esac
9733                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9734                 fi
9735         done
9736         CFLAGS="$cf_save_CFLAGS"
9737 fi
9738 rm -f conftest*
9739
9740         if test "$cf_with_cxx" = yes ; then
9741
9742 INTEL_CPLUSPLUS=no
9743
9744 if test "$GCC" = yes ; then
9745         case $host_os in
9746         linux*|gnu*)
9747                 echo "$as_me:9747: checking if this is really Intel C++ compiler" >&5
9748 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
9749                 cf_save_CFLAGS="$CXXFLAGS"
9750                 CXXFLAGS="$CXXFLAGS -no-gcc"
9751                 cat >conftest.$ac_ext <<_ACEOF
9752 #line 9752 "configure"
9753 #include "confdefs.h"
9754
9755 int
9756 main ()
9757 {
9758
9759 #ifdef __INTEL_COMPILER
9760 #else
9761 make an error
9762 #endif
9763
9764   ;
9765   return 0;
9766 }
9767 _ACEOF
9768 rm -f conftest.$ac_objext
9769 if { (eval echo "$as_me:9769: \"$ac_compile\"") >&5
9770   (eval $ac_compile) 2>&5
9771   ac_status=$?
9772   echo "$as_me:9772: \$? = $ac_status" >&5
9773   (exit $ac_status); } &&
9774          { ac_try='test -s conftest.$ac_objext'
9775   { (eval echo "$as_me:9775: \"$ac_try\"") >&5
9776   (eval $ac_try) 2>&5
9777   ac_status=$?
9778   echo "$as_me:9778: \$? = $ac_status" >&5
9779   (exit $ac_status); }; }; then
9780   INTEL_CPLUSPLUS=yes
9781 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9782
9783 else
9784   echo "$as_me: failed program was:" >&5
9785 cat conftest.$ac_ext >&5
9786 fi
9787 rm -f conftest.$ac_objext conftest.$ac_ext
9788                 CXXFLAGS="$cf_save_CFLAGS"
9789                 echo "$as_me:9789: result: $INTEL_CPLUSPLUS" >&5
9790 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
9791                 ;;
9792         esac
9793 fi
9794
9795 ac_ext=cc
9796 ac_cpp='$CXXCPP $CPPFLAGS'
9797 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9798 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9799 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9800 ac_main_return=return
9801
9802 cat > conftest.$ac_ext <<EOF
9803 #line 9803 "configure"
9804 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9805 EOF
9806
9807 if test "$INTEL_CPLUSPLUS" = yes
9808 then
9809 # The "-wdXXX" options suppress warnings:
9810 # remark #1419: external declaration in primary source file
9811 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9812 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9813 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9814 # remark #193: zero used for undefined preprocessing identifier
9815 # remark #593: variable "curs_sb_left_arrow" was set but never used
9816 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9817 # remark #869: parameter "tw" was never referenced
9818 # remark #981: operands are evaluated in unspecified order
9819 # warning #269: invalid format string conversion
9820
9821         { echo "$as_me:9821: checking for $CC warning options..." >&5
9822 echo "$as_me: checking for $CC warning options..." >&6;}
9823         cf_save_CXXFLAGS="$CXXFLAGS"
9824         EXTRA_CXXFLAGS="-Wall"
9825         for cf_opt in \
9826                 wd1419 \
9827                 wd1682 \
9828                 wd1683 \
9829                 wd1684 \
9830                 wd193 \
9831                 wd279 \
9832                 wd593 \
9833                 wd810 \
9834                 wd869 \
9835                 wd981
9836         do
9837                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
9838                 if { (eval echo "$as_me:9838: \"$ac_compile\"") >&5
9839   (eval $ac_compile) 2>&5
9840   ac_status=$?
9841   echo "$as_me:9841: \$? = $ac_status" >&5
9842   (exit $ac_status); }; then
9843                         test -n "$verbose" && echo "$as_me:9843: result: ... -$cf_opt" >&5
9844 echo "${ECHO_T}... -$cf_opt" >&6
9845                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9846                 fi
9847         done
9848         CXXFLAGS="$cf_save_CXXFLAGS"
9849
9850 elif test "$GXX" = yes
9851 then
9852         { echo "$as_me:9852: checking for $CXX warning options..." >&5
9853 echo "$as_me: checking for $CXX warning options..." >&6;}
9854         cf_save_CXXFLAGS="$CXXFLAGS"
9855         EXTRA_CXXFLAGS="-W -Wall"
9856         cf_gxx_extra_warnings=""
9857         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
9858         case "$GCC_VERSION" in
9859         [1-2].*)
9860                 ;;
9861         *)
9862                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
9863                 ;;
9864         esac
9865         for cf_opt in \
9866                 Wabi \
9867                 fabi-version=0 \
9868                 Woverloaded-virtual \
9869                 Wsign-promo \
9870                 Wsynth \
9871                 Wold-style-cast \
9872                 Wcast-align \
9873                 Wcast-qual \
9874                 Wmissing-prototypes \
9875                 Wpointer-arith \
9876                 Wshadow \
9877                 Wstrict-prototypes \
9878                 Wundef $cf_gxx_extra_warnings Wno-unused
9879         do
9880                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
9881                 if { (eval echo "$as_me:9881: \"$ac_compile\"") >&5
9882   (eval $ac_compile) 2>&5
9883   ac_status=$?
9884   echo "$as_me:9884: \$? = $ac_status" >&5
9885   (exit $ac_status); }; then
9886                         test -n "$verbose" && echo "$as_me:9886: result: ... -$cf_opt" >&5
9887 echo "${ECHO_T}... -$cf_opt" >&6
9888                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9889                 else
9890                         test -n "$verbose" && echo "$as_me:9890: result: ... no -$cf_opt" >&5
9891 echo "${ECHO_T}... no -$cf_opt" >&6
9892                 fi
9893         done
9894         CXXFLAGS="$cf_save_CXXFLAGS"
9895 fi
9896
9897 rm -f conftest*
9898 ac_ext=c
9899 ac_cpp='$CPP $CPPFLAGS'
9900 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9901 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9902 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9903 ac_main_return=return
9904
9905         fi
9906 fi
9907
9908 if test "$GCC" = yes
9909 then
9910 cat > conftest.i <<EOF
9911 #ifndef GCC_PRINTF
9912 #define GCC_PRINTF 0
9913 #endif
9914 #ifndef GCC_SCANF
9915 #define GCC_SCANF 0
9916 #endif
9917 #ifndef GCC_NORETURN
9918 #define GCC_NORETURN /* nothing */
9919 #endif
9920 #ifndef GCC_UNUSED
9921 #define GCC_UNUSED /* nothing */
9922 #endif
9923 EOF
9924 if test "$GCC" = yes
9925 then
9926         { echo "$as_me:9926: checking for $CC __attribute__ directives..." >&5
9927 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
9928 cat > conftest.$ac_ext <<EOF
9929 #line 9929 "${as_me-configure}"
9930 #include "confdefs.h"
9931 #include "conftest.h"
9932 #include "conftest.i"
9933 #if     GCC_PRINTF
9934 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9935 #else
9936 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
9937 #endif
9938 #if     GCC_SCANF
9939 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9940 #else
9941 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
9942 #endif
9943 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
9944 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
9945 extern void foo(void) GCC_NORETURN;
9946 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
9947 EOF
9948         for cf_attribute in scanf printf unused noreturn
9949         do
9950
9951 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9952
9953                 cf_directive="__attribute__(($cf_attribute))"
9954                 echo "checking for $CC $cf_directive" 1>&5
9955                 case $cf_attribute in
9956                 scanf|printf)
9957                 cat >conftest.h <<EOF
9958 #define GCC_$cf_ATTRIBUTE 1
9959 EOF
9960                         ;;
9961                 *)
9962                 cat >conftest.h <<EOF
9963 #define GCC_$cf_ATTRIBUTE $cf_directive
9964 EOF
9965                         ;;
9966                 esac
9967                 if { (eval echo "$as_me:9967: \"$ac_compile\"") >&5
9968   (eval $ac_compile) 2>&5
9969   ac_status=$?
9970   echo "$as_me:9970: \$? = $ac_status" >&5
9971   (exit $ac_status); }; then
9972                         test -n "$verbose" && echo "$as_me:9972: result: ... $cf_attribute" >&5
9973 echo "${ECHO_T}... $cf_attribute" >&6
9974                         cat conftest.h >>confdefs.h
9975                 fi
9976         done
9977 else
9978         fgrep define conftest.i >>confdefs.h
9979 fi
9980 rm -rf conftest*
9981 fi
9982
9983 ###     use option --enable-assertions to turn on generation of assertion code
9984 echo "$as_me:9984: checking if you want to enable runtime assertions" >&5
9985 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
9986
9987 # Check whether --enable-assertions or --disable-assertions was given.
9988 if test "${enable_assertions+set}" = set; then
9989   enableval="$enable_assertions"
9990   with_assertions=$enableval
9991 else
9992   with_assertions=no
9993 fi;
9994 echo "$as_me:9994: result: $with_assertions" >&5
9995 echo "${ECHO_T}$with_assertions" >&6
9996 if test -n "$GCC"
9997 then
9998         if test "$with_assertions" = no
9999         then
10000                 cat >>confdefs.h <<\EOF
10001 #define NDEBUG 1
10002 EOF
10003
10004                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
10005         else
10006                 ADAFLAGS="$ADAFLAGS -gnata"
10007         fi
10008 fi
10009
10010 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
10011
10012 echo "$as_me:10012: checking if you want to use dmalloc for testing" >&5
10013 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
10014
10015 # Check whether --with-dmalloc or --without-dmalloc was given.
10016 if test "${with_dmalloc+set}" = set; then
10017   withval="$with_dmalloc"
10018   cat >>confdefs.h <<\EOF
10019 #define USE_DMALLOC 1
10020 EOF
10021
10022         : ${with_cflags:=-g}
10023         : ${with_no_leaks:=yes}
10024          with_dmalloc=yes
10025 else
10026   with_dmalloc=
10027 fi;
10028 echo "$as_me:10028: result: ${with_dmalloc:-no}" >&5
10029 echo "${ECHO_T}${with_dmalloc:-no}" >&6
10030
10031 case .$with_cflags in #(vi
10032 .*-g*)
10033         case .$CFLAGS in #(vi
10034         .*-g*) #(vi
10035                 ;;
10036         *)
10037
10038 cf_fix_cppflags=no
10039 cf_new_cflags=
10040 cf_new_cppflags=
10041 cf_new_extra_cppflags=
10042
10043 for cf_add_cflags in -g
10044 do
10045 case $cf_fix_cppflags in
10046 no)
10047         case $cf_add_cflags in #(vi
10048         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10049                 case $cf_add_cflags in
10050                 -D*)
10051                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10052
10053                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10054                         && test -z "${cf_tst_cflags}" \
10055                         && cf_fix_cppflags=yes
10056
10057                         if test $cf_fix_cppflags = yes ; then
10058                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10059                                 continue
10060                         elif test "${cf_tst_cflags}" = "\"'" ; then
10061                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10062                                 continue
10063                         fi
10064                         ;;
10065                 esac
10066                 case "$CPPFLAGS" in
10067                 *$cf_add_cflags) #(vi
10068                         ;;
10069                 *) #(vi
10070                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10071                         ;;
10072                 esac
10073                 ;;
10074         *)
10075                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10076                 ;;
10077         esac
10078         ;;
10079 yes)
10080         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10081
10082         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10083
10084         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10085         && test -z "${cf_tst_cflags}" \
10086         && cf_fix_cppflags=no
10087         ;;
10088 esac
10089 done
10090
10091 if test -n "$cf_new_cflags" ; then
10092
10093         CFLAGS="$CFLAGS $cf_new_cflags"
10094 fi
10095
10096 if test -n "$cf_new_cppflags" ; then
10097
10098         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10099 fi
10100
10101 if test -n "$cf_new_extra_cppflags" ; then
10102
10103         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10104 fi
10105
10106                 ;;
10107         esac
10108         ;;
10109 esac
10110
10111 if test "$with_dmalloc" = yes ; then
10112         echo "$as_me:10112: checking for dmalloc.h" >&5
10113 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
10114 if test "${ac_cv_header_dmalloc_h+set}" = set; then
10115   echo $ECHO_N "(cached) $ECHO_C" >&6
10116 else
10117   cat >conftest.$ac_ext <<_ACEOF
10118 #line 10118 "configure"
10119 #include "confdefs.h"
10120 #include <dmalloc.h>
10121 _ACEOF
10122 if { (eval echo "$as_me:10122: \"$ac_cpp conftest.$ac_ext\"") >&5
10123   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10124   ac_status=$?
10125   egrep -v '^ *\+' conftest.er1 >conftest.err
10126   rm -f conftest.er1
10127   cat conftest.err >&5
10128   echo "$as_me:10128: \$? = $ac_status" >&5
10129   (exit $ac_status); } >/dev/null; then
10130   if test -s conftest.err; then
10131     ac_cpp_err=$ac_c_preproc_warn_flag
10132   else
10133     ac_cpp_err=
10134   fi
10135 else
10136   ac_cpp_err=yes
10137 fi
10138 if test -z "$ac_cpp_err"; then
10139   ac_cv_header_dmalloc_h=yes
10140 else
10141   echo "$as_me: failed program was:" >&5
10142   cat conftest.$ac_ext >&5
10143   ac_cv_header_dmalloc_h=no
10144 fi
10145 rm -f conftest.err conftest.$ac_ext
10146 fi
10147 echo "$as_me:10147: result: $ac_cv_header_dmalloc_h" >&5
10148 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
10149 if test $ac_cv_header_dmalloc_h = yes; then
10150
10151 echo "$as_me:10151: checking for dmalloc_debug in -ldmalloc" >&5
10152 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
10153 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
10154   echo $ECHO_N "(cached) $ECHO_C" >&6
10155 else
10156   ac_check_lib_save_LIBS=$LIBS
10157 LIBS="-ldmalloc  $LIBS"
10158 cat >conftest.$ac_ext <<_ACEOF
10159 #line 10159 "configure"
10160 #include "confdefs.h"
10161
10162 /* Override any gcc2 internal prototype to avoid an error.  */
10163 #ifdef __cplusplus
10164 extern "C"
10165 #endif
10166 /* We use char because int might match the return type of a gcc2
10167    builtin and then its argument prototype would still apply.  */
10168 char dmalloc_debug ();
10169 int
10170 main ()
10171 {
10172 dmalloc_debug ();
10173   ;
10174   return 0;
10175 }
10176 _ACEOF
10177 rm -f conftest.$ac_objext conftest$ac_exeext
10178 if { (eval echo "$as_me:10178: \"$ac_link\"") >&5
10179   (eval $ac_link) 2>&5
10180   ac_status=$?
10181   echo "$as_me:10181: \$? = $ac_status" >&5
10182   (exit $ac_status); } &&
10183          { ac_try='test -s conftest$ac_exeext'
10184   { (eval echo "$as_me:10184: \"$ac_try\"") >&5
10185   (eval $ac_try) 2>&5
10186   ac_status=$?
10187   echo "$as_me:10187: \$? = $ac_status" >&5
10188   (exit $ac_status); }; }; then
10189   ac_cv_lib_dmalloc_dmalloc_debug=yes
10190 else
10191   echo "$as_me: failed program was:" >&5
10192 cat conftest.$ac_ext >&5
10193 ac_cv_lib_dmalloc_dmalloc_debug=no
10194 fi
10195 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10196 LIBS=$ac_check_lib_save_LIBS
10197 fi
10198 echo "$as_me:10198: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
10199 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
10200 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
10201   cat >>confdefs.h <<EOF
10202 #define HAVE_LIBDMALLOC 1
10203 EOF
10204
10205   LIBS="-ldmalloc $LIBS"
10206
10207 fi
10208
10209 fi
10210
10211 fi
10212
10213 echo "$as_me:10213: checking if you want to use dbmalloc for testing" >&5
10214 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
10215
10216 # Check whether --with-dbmalloc or --without-dbmalloc was given.
10217 if test "${with_dbmalloc+set}" = set; then
10218   withval="$with_dbmalloc"
10219   cat >>confdefs.h <<\EOF
10220 #define USE_DBMALLOC 1
10221 EOF
10222
10223         : ${with_cflags:=-g}
10224         : ${with_no_leaks:=yes}
10225          with_dbmalloc=yes
10226 else
10227   with_dbmalloc=
10228 fi;
10229 echo "$as_me:10229: result: ${with_dbmalloc:-no}" >&5
10230 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
10231
10232 case .$with_cflags in #(vi
10233 .*-g*)
10234         case .$CFLAGS in #(vi
10235         .*-g*) #(vi
10236                 ;;
10237         *)
10238
10239 cf_fix_cppflags=no
10240 cf_new_cflags=
10241 cf_new_cppflags=
10242 cf_new_extra_cppflags=
10243
10244 for cf_add_cflags in -g
10245 do
10246 case $cf_fix_cppflags in
10247 no)
10248         case $cf_add_cflags in #(vi
10249         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10250                 case $cf_add_cflags in
10251                 -D*)
10252                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10253
10254                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10255                         && test -z "${cf_tst_cflags}" \
10256                         && cf_fix_cppflags=yes
10257
10258                         if test $cf_fix_cppflags = yes ; then
10259                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10260                                 continue
10261                         elif test "${cf_tst_cflags}" = "\"'" ; then
10262                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10263                                 continue
10264                         fi
10265                         ;;
10266                 esac
10267                 case "$CPPFLAGS" in
10268                 *$cf_add_cflags) #(vi
10269                         ;;
10270                 *) #(vi
10271                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10272                         ;;
10273                 esac
10274                 ;;
10275         *)
10276                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10277                 ;;
10278         esac
10279         ;;
10280 yes)
10281         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10282
10283         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10284
10285         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10286         && test -z "${cf_tst_cflags}" \
10287         && cf_fix_cppflags=no
10288         ;;
10289 esac
10290 done
10291
10292 if test -n "$cf_new_cflags" ; then
10293
10294         CFLAGS="$CFLAGS $cf_new_cflags"
10295 fi
10296
10297 if test -n "$cf_new_cppflags" ; then
10298
10299         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10300 fi
10301
10302 if test -n "$cf_new_extra_cppflags" ; then
10303
10304         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10305 fi
10306
10307                 ;;
10308         esac
10309         ;;
10310 esac
10311
10312 if test "$with_dbmalloc" = yes ; then
10313         echo "$as_me:10313: checking for dbmalloc.h" >&5
10314 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
10315 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
10316   echo $ECHO_N "(cached) $ECHO_C" >&6
10317 else
10318   cat >conftest.$ac_ext <<_ACEOF
10319 #line 10319 "configure"
10320 #include "confdefs.h"
10321 #include <dbmalloc.h>
10322 _ACEOF
10323 if { (eval echo "$as_me:10323: \"$ac_cpp conftest.$ac_ext\"") >&5
10324   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10325   ac_status=$?
10326   egrep -v '^ *\+' conftest.er1 >conftest.err
10327   rm -f conftest.er1
10328   cat conftest.err >&5
10329   echo "$as_me:10329: \$? = $ac_status" >&5
10330   (exit $ac_status); } >/dev/null; then
10331   if test -s conftest.err; then
10332     ac_cpp_err=$ac_c_preproc_warn_flag
10333   else
10334     ac_cpp_err=
10335   fi
10336 else
10337   ac_cpp_err=yes
10338 fi
10339 if test -z "$ac_cpp_err"; then
10340   ac_cv_header_dbmalloc_h=yes
10341 else
10342   echo "$as_me: failed program was:" >&5
10343   cat conftest.$ac_ext >&5
10344   ac_cv_header_dbmalloc_h=no
10345 fi
10346 rm -f conftest.err conftest.$ac_ext
10347 fi
10348 echo "$as_me:10348: result: $ac_cv_header_dbmalloc_h" >&5
10349 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
10350 if test $ac_cv_header_dbmalloc_h = yes; then
10351
10352 echo "$as_me:10352: checking for debug_malloc in -ldbmalloc" >&5
10353 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
10354 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
10355   echo $ECHO_N "(cached) $ECHO_C" >&6
10356 else
10357   ac_check_lib_save_LIBS=$LIBS
10358 LIBS="-ldbmalloc  $LIBS"
10359 cat >conftest.$ac_ext <<_ACEOF
10360 #line 10360 "configure"
10361 #include "confdefs.h"
10362
10363 /* Override any gcc2 internal prototype to avoid an error.  */
10364 #ifdef __cplusplus
10365 extern "C"
10366 #endif
10367 /* We use char because int might match the return type of a gcc2
10368    builtin and then its argument prototype would still apply.  */
10369 char debug_malloc ();
10370 int
10371 main ()
10372 {
10373 debug_malloc ();
10374   ;
10375   return 0;
10376 }
10377 _ACEOF
10378 rm -f conftest.$ac_objext conftest$ac_exeext
10379 if { (eval echo "$as_me:10379: \"$ac_link\"") >&5
10380   (eval $ac_link) 2>&5
10381   ac_status=$?
10382   echo "$as_me:10382: \$? = $ac_status" >&5
10383   (exit $ac_status); } &&
10384          { ac_try='test -s conftest$ac_exeext'
10385   { (eval echo "$as_me:10385: \"$ac_try\"") >&5
10386   (eval $ac_try) 2>&5
10387   ac_status=$?
10388   echo "$as_me:10388: \$? = $ac_status" >&5
10389   (exit $ac_status); }; }; then
10390   ac_cv_lib_dbmalloc_debug_malloc=yes
10391 else
10392   echo "$as_me: failed program was:" >&5
10393 cat conftest.$ac_ext >&5
10394 ac_cv_lib_dbmalloc_debug_malloc=no
10395 fi
10396 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10397 LIBS=$ac_check_lib_save_LIBS
10398 fi
10399 echo "$as_me:10399: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
10400 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
10401 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
10402   cat >>confdefs.h <<EOF
10403 #define HAVE_LIBDBMALLOC 1
10404 EOF
10405
10406   LIBS="-ldbmalloc $LIBS"
10407
10408 fi
10409
10410 fi
10411
10412 fi
10413
10414 echo "$as_me:10414: checking if you want to use valgrind for testing" >&5
10415 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
10416
10417 # Check whether --with-valgrind or --without-valgrind was given.
10418 if test "${with_valgrind+set}" = set; then
10419   withval="$with_valgrind"
10420   cat >>confdefs.h <<\EOF
10421 #define USE_VALGRIND 1
10422 EOF
10423
10424         : ${with_cflags:=-g}
10425         : ${with_no_leaks:=yes}
10426          with_valgrind=yes
10427 else
10428   with_valgrind=
10429 fi;
10430 echo "$as_me:10430: result: ${with_valgrind:-no}" >&5
10431 echo "${ECHO_T}${with_valgrind:-no}" >&6
10432
10433 case .$with_cflags in #(vi
10434 .*-g*)
10435         case .$CFLAGS in #(vi
10436         .*-g*) #(vi
10437                 ;;
10438         *)
10439
10440 cf_fix_cppflags=no
10441 cf_new_cflags=
10442 cf_new_cppflags=
10443 cf_new_extra_cppflags=
10444
10445 for cf_add_cflags in -g
10446 do
10447 case $cf_fix_cppflags in
10448 no)
10449         case $cf_add_cflags in #(vi
10450         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10451                 case $cf_add_cflags in
10452                 -D*)
10453                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10454
10455                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10456                         && test -z "${cf_tst_cflags}" \
10457                         && cf_fix_cppflags=yes
10458
10459                         if test $cf_fix_cppflags = yes ; then
10460                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10461                                 continue
10462                         elif test "${cf_tst_cflags}" = "\"'" ; then
10463                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10464                                 continue
10465                         fi
10466                         ;;
10467                 esac
10468                 case "$CPPFLAGS" in
10469                 *$cf_add_cflags) #(vi
10470                         ;;
10471                 *) #(vi
10472                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10473                         ;;
10474                 esac
10475                 ;;
10476         *)
10477                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10478                 ;;
10479         esac
10480         ;;
10481 yes)
10482         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10483
10484         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10485
10486         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10487         && test -z "${cf_tst_cflags}" \
10488         && cf_fix_cppflags=no
10489         ;;
10490 esac
10491 done
10492
10493 if test -n "$cf_new_cflags" ; then
10494
10495         CFLAGS="$CFLAGS $cf_new_cflags"
10496 fi
10497
10498 if test -n "$cf_new_cppflags" ; then
10499
10500         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10501 fi
10502
10503 if test -n "$cf_new_extra_cppflags" ; then
10504
10505         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10506 fi
10507
10508                 ;;
10509         esac
10510         ;;
10511 esac
10512
10513 echo "$as_me:10513: checking if you want to perform memory-leak testing" >&5
10514 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
10515
10516 # Check whether --enable-leaks or --disable-leaks was given.
10517 if test "${enable_leaks+set}" = set; then
10518   enableval="$enable_leaks"
10519   with_no_leaks=yes
10520 else
10521   : ${with_no_leaks:=no}
10522 fi;
10523 echo "$as_me:10523: result: $with_no_leaks" >&5
10524 echo "${ECHO_T}$with_no_leaks" >&6
10525
10526 if test "$with_no_leaks" = yes ; then
10527         cat >>confdefs.h <<\EOF
10528 #define NO_LEAKS 1
10529 EOF
10530
10531 fi
10532
10533 cat >>confdefs.h <<\EOF
10534 #define HAVE_NC_ALLOC_H 1
10535 EOF
10536
10537 ###     use option --enable-expanded to generate certain macros as functions
10538
10539 # Check whether --enable-expanded or --disable-expanded was given.
10540 if test "${enable_expanded+set}" = set; then
10541   enableval="$enable_expanded"
10542   test "$enableval" = yes && cat >>confdefs.h <<\EOF
10543 #define NCURSES_EXPANDED 1
10544 EOF
10545
10546 fi;
10547
10548 ###     use option --disable-macros to suppress macros in favor of functions
10549
10550 # Check whether --enable-macros or --disable-macros was given.
10551 if test "${enable_macros+set}" = set; then
10552   enableval="$enable_macros"
10553   test "$enableval" = no && cat >>confdefs.h <<\EOF
10554 #define NCURSES_NOMACROS 1
10555 EOF
10556
10557 fi;
10558
10559 # Normally we only add trace() to the debug-library.  Allow this to be
10560 # extended to all models of the ncurses library:
10561 cf_all_traces=no
10562 case "$CFLAGS $CPPFLAGS" in
10563 *-DTRACE*)
10564         cf_all_traces=yes
10565         ;;
10566 esac
10567
10568 echo "$as_me:10568: checking whether to add trace feature to all models" >&5
10569 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
10570
10571 # Check whether --with-trace or --without-trace was given.
10572 if test "${with_trace+set}" = set; then
10573   withval="$with_trace"
10574   cf_with_trace=$withval
10575 else
10576   cf_with_trace=$cf_all_traces
10577 fi;
10578 echo "$as_me:10578: result: $cf_with_trace" >&5
10579 echo "${ECHO_T}$cf_with_trace" >&6
10580
10581 if test "$cf_with_trace" = yes ; then
10582         LIB_TRACING=all
10583         ADA_TRACE=TRUE
10584
10585 cf_fix_cppflags=no
10586 cf_new_cflags=
10587 cf_new_cppflags=
10588 cf_new_extra_cppflags=
10589
10590 for cf_add_cflags in -DTRACE
10591 do
10592 case $cf_fix_cppflags in
10593 no)
10594         case $cf_add_cflags in #(vi
10595         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10596                 case $cf_add_cflags in
10597                 -D*)
10598                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10599
10600                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10601                         && test -z "${cf_tst_cflags}" \
10602                         && cf_fix_cppflags=yes
10603
10604                         if test $cf_fix_cppflags = yes ; then
10605                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10606                                 continue
10607                         elif test "${cf_tst_cflags}" = "\"'" ; then
10608                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10609                                 continue
10610                         fi
10611                         ;;
10612                 esac
10613                 case "$CPPFLAGS" in
10614                 *$cf_add_cflags) #(vi
10615                         ;;
10616                 *) #(vi
10617                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10618                         ;;
10619                 esac
10620                 ;;
10621         *)
10622                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10623                 ;;
10624         esac
10625         ;;
10626 yes)
10627         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10628
10629         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10630
10631         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10632         && test -z "${cf_tst_cflags}" \
10633         && cf_fix_cppflags=no
10634         ;;
10635 esac
10636 done
10637
10638 if test -n "$cf_new_cflags" ; then
10639
10640         CFLAGS="$CFLAGS $cf_new_cflags"
10641 fi
10642
10643 if test -n "$cf_new_cppflags" ; then
10644
10645         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10646 fi
10647
10648 if test -n "$cf_new_extra_cppflags" ; then
10649
10650         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10651 fi
10652
10653 else
10654         LIB_TRACING=DEBUG
10655         ADA_TRACE=FALSE
10656 fi
10657
10658 ###     Checks for libraries.
10659 echo "$as_me:10659: checking for gettimeofday" >&5
10660 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
10661 if test "${ac_cv_func_gettimeofday+set}" = set; then
10662   echo $ECHO_N "(cached) $ECHO_C" >&6
10663 else
10664   cat >conftest.$ac_ext <<_ACEOF
10665 #line 10665 "configure"
10666 #include "confdefs.h"
10667 /* System header to define __stub macros and hopefully few prototypes,
10668     which can conflict with char gettimeofday (); below.  */
10669 #include <assert.h>
10670 /* Override any gcc2 internal prototype to avoid an error.  */
10671 #ifdef __cplusplus
10672 extern "C"
10673 #endif
10674 /* We use char because int might match the return type of a gcc2
10675    builtin and then its argument prototype would still apply.  */
10676 char gettimeofday ();
10677 char (*f) ();
10678
10679 int
10680 main ()
10681 {
10682 /* The GNU C library defines this for functions which it implements
10683     to always fail with ENOSYS.  Some functions are actually named
10684     something starting with __ and the normal name is an alias.  */
10685 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
10686 choke me
10687 #else
10688 f = gettimeofday;
10689 #endif
10690
10691   ;
10692   return 0;
10693 }
10694 _ACEOF
10695 rm -f conftest.$ac_objext conftest$ac_exeext
10696 if { (eval echo "$as_me:10696: \"$ac_link\"") >&5
10697   (eval $ac_link) 2>&5
10698   ac_status=$?
10699   echo "$as_me:10699: \$? = $ac_status" >&5
10700   (exit $ac_status); } &&
10701          { ac_try='test -s conftest$ac_exeext'
10702   { (eval echo "$as_me:10702: \"$ac_try\"") >&5
10703   (eval $ac_try) 2>&5
10704   ac_status=$?
10705   echo "$as_me:10705: \$? = $ac_status" >&5
10706   (exit $ac_status); }; }; then
10707   ac_cv_func_gettimeofday=yes
10708 else
10709   echo "$as_me: failed program was:" >&5
10710 cat conftest.$ac_ext >&5
10711 ac_cv_func_gettimeofday=no
10712 fi
10713 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10714 fi
10715 echo "$as_me:10715: result: $ac_cv_func_gettimeofday" >&5
10716 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
10717 if test $ac_cv_func_gettimeofday = yes; then
10718   cat >>confdefs.h <<\EOF
10719 #define HAVE_GETTIMEOFDAY 1
10720 EOF
10721
10722 else
10723
10724 echo "$as_me:10724: checking for gettimeofday in -lbsd" >&5
10725 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
10726 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
10727   echo $ECHO_N "(cached) $ECHO_C" >&6
10728 else
10729   ac_check_lib_save_LIBS=$LIBS
10730 LIBS="-lbsd  $LIBS"
10731 cat >conftest.$ac_ext <<_ACEOF
10732 #line 10732 "configure"
10733 #include "confdefs.h"
10734
10735 /* Override any gcc2 internal prototype to avoid an error.  */
10736 #ifdef __cplusplus
10737 extern "C"
10738 #endif
10739 /* We use char because int might match the return type of a gcc2
10740    builtin and then its argument prototype would still apply.  */
10741 char gettimeofday ();
10742 int
10743 main ()
10744 {
10745 gettimeofday ();
10746   ;
10747   return 0;
10748 }
10749 _ACEOF
10750 rm -f conftest.$ac_objext conftest$ac_exeext
10751 if { (eval echo "$as_me:10751: \"$ac_link\"") >&5
10752   (eval $ac_link) 2>&5
10753   ac_status=$?
10754   echo "$as_me:10754: \$? = $ac_status" >&5
10755   (exit $ac_status); } &&
10756          { ac_try='test -s conftest$ac_exeext'
10757   { (eval echo "$as_me:10757: \"$ac_try\"") >&5
10758   (eval $ac_try) 2>&5
10759   ac_status=$?
10760   echo "$as_me:10760: \$? = $ac_status" >&5
10761   (exit $ac_status); }; }; then
10762   ac_cv_lib_bsd_gettimeofday=yes
10763 else
10764   echo "$as_me: failed program was:" >&5
10765 cat conftest.$ac_ext >&5
10766 ac_cv_lib_bsd_gettimeofday=no
10767 fi
10768 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10769 LIBS=$ac_check_lib_save_LIBS
10770 fi
10771 echo "$as_me:10771: result: $ac_cv_lib_bsd_gettimeofday" >&5
10772 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
10773 if test $ac_cv_lib_bsd_gettimeofday = yes; then
10774   cat >>confdefs.h <<\EOF
10775 #define HAVE_GETTIMEOFDAY 1
10776 EOF
10777
10778         LIBS="$LIBS -lbsd"
10779 fi
10780
10781 fi
10782
10783 echo "$as_me:10783: checking if -lm needed for math functions" >&5
10784 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
10785 if test "${cf_cv_need_libm+set}" = set; then
10786   echo $ECHO_N "(cached) $ECHO_C" >&6
10787 else
10788
10789         cat >conftest.$ac_ext <<_ACEOF
10790 #line 10790 "configure"
10791 #include "confdefs.h"
10792
10793         #include <stdio.h>
10794         #include <math.h>
10795
10796 int
10797 main ()
10798 {
10799 double x = rand(); printf("result = %g\n", sin(x))
10800   ;
10801   return 0;
10802 }
10803 _ACEOF
10804 rm -f conftest.$ac_objext conftest$ac_exeext
10805 if { (eval echo "$as_me:10805: \"$ac_link\"") >&5
10806   (eval $ac_link) 2>&5
10807   ac_status=$?
10808   echo "$as_me:10808: \$? = $ac_status" >&5
10809   (exit $ac_status); } &&
10810          { ac_try='test -s conftest$ac_exeext'
10811   { (eval echo "$as_me:10811: \"$ac_try\"") >&5
10812   (eval $ac_try) 2>&5
10813   ac_status=$?
10814   echo "$as_me:10814: \$? = $ac_status" >&5
10815   (exit $ac_status); }; }; then
10816   cf_cv_need_libm=no
10817 else
10818   echo "$as_me: failed program was:" >&5
10819 cat conftest.$ac_ext >&5
10820 cf_cv_need_libm=yes
10821 fi
10822 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10823 fi
10824 echo "$as_me:10824: result: $cf_cv_need_libm" >&5
10825 echo "${ECHO_T}$cf_cv_need_libm" >&6
10826 if test "$cf_cv_need_libm" = yes
10827 then
10828 MATH_LIB=-lm
10829 fi
10830
10831 ###     Checks for header files.
10832 echo "$as_me:10832: checking for ANSI C header files" >&5
10833 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10834 if test "${ac_cv_header_stdc+set}" = set; then
10835   echo $ECHO_N "(cached) $ECHO_C" >&6
10836 else
10837   cat >conftest.$ac_ext <<_ACEOF
10838 #line 10838 "configure"
10839 #include "confdefs.h"
10840 #include <stdlib.h>
10841 #include <stdarg.h>
10842 #include <string.h>
10843 #include <float.h>
10844
10845 _ACEOF
10846 if { (eval echo "$as_me:10846: \"$ac_cpp conftest.$ac_ext\"") >&5
10847   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10848   ac_status=$?
10849   egrep -v '^ *\+' conftest.er1 >conftest.err
10850   rm -f conftest.er1
10851   cat conftest.err >&5
10852   echo "$as_me:10852: \$? = $ac_status" >&5
10853   (exit $ac_status); } >/dev/null; then
10854   if test -s conftest.err; then
10855     ac_cpp_err=$ac_c_preproc_warn_flag
10856   else
10857     ac_cpp_err=
10858   fi
10859 else
10860   ac_cpp_err=yes
10861 fi
10862 if test -z "$ac_cpp_err"; then
10863   ac_cv_header_stdc=yes
10864 else
10865   echo "$as_me: failed program was:" >&5
10866   cat conftest.$ac_ext >&5
10867   ac_cv_header_stdc=no
10868 fi
10869 rm -f conftest.err conftest.$ac_ext
10870
10871 if test $ac_cv_header_stdc = yes; then
10872   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10873   cat >conftest.$ac_ext <<_ACEOF
10874 #line 10874 "configure"
10875 #include "confdefs.h"
10876 #include <string.h>
10877
10878 _ACEOF
10879 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10880   egrep "memchr" >/dev/null 2>&1; then
10881   :
10882 else
10883   ac_cv_header_stdc=no
10884 fi
10885 rm -f conftest*
10886
10887 fi
10888
10889 if test $ac_cv_header_stdc = yes; then
10890   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10891   cat >conftest.$ac_ext <<_ACEOF
10892 #line 10892 "configure"
10893 #include "confdefs.h"
10894 #include <stdlib.h>
10895
10896 _ACEOF
10897 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10898   egrep "free" >/dev/null 2>&1; then
10899   :
10900 else
10901   ac_cv_header_stdc=no
10902 fi
10903 rm -f conftest*
10904
10905 fi
10906
10907 if test $ac_cv_header_stdc = yes; then
10908   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10909   if test "$cross_compiling" = yes; then
10910   :
10911 else
10912   cat >conftest.$ac_ext <<_ACEOF
10913 #line 10913 "configure"
10914 #include "confdefs.h"
10915 #include <ctype.h>
10916 #if ((' ' & 0x0FF) == 0x020)
10917 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10918 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10919 #else
10920 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10921                      || ('j' <= (c) && (c) <= 'r') \
10922                      || ('s' <= (c) && (c) <= 'z'))
10923 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10924 #endif
10925
10926 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10927 int
10928 main ()
10929 {
10930   int i;
10931   for (i = 0; i < 256; i++)
10932     if (XOR (islower (i), ISLOWER (i))
10933         || toupper (i) != TOUPPER (i))
10934       $ac_main_return(2);
10935   $ac_main_return (0);
10936 }
10937 _ACEOF
10938 rm -f conftest$ac_exeext
10939 if { (eval echo "$as_me:10939: \"$ac_link\"") >&5
10940   (eval $ac_link) 2>&5
10941   ac_status=$?
10942   echo "$as_me:10942: \$? = $ac_status" >&5
10943   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10944   { (eval echo "$as_me:10944: \"$ac_try\"") >&5
10945   (eval $ac_try) 2>&5
10946   ac_status=$?
10947   echo "$as_me:10947: \$? = $ac_status" >&5
10948   (exit $ac_status); }; }; then
10949   :
10950 else
10951   echo "$as_me: program exited with status $ac_status" >&5
10952 echo "$as_me: failed program was:" >&5
10953 cat conftest.$ac_ext >&5
10954 ac_cv_header_stdc=no
10955 fi
10956 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10957 fi
10958 fi
10959 fi
10960 echo "$as_me:10960: result: $ac_cv_header_stdc" >&5
10961 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10962 if test $ac_cv_header_stdc = yes; then
10963
10964 cat >>confdefs.h <<\EOF
10965 #define STDC_HEADERS 1
10966 EOF
10967
10968 fi
10969
10970 ac_header_dirent=no
10971 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10972   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10973 echo "$as_me:10973: checking for $ac_hdr that defines DIR" >&5
10974 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10975 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10976   echo $ECHO_N "(cached) $ECHO_C" >&6
10977 else
10978   cat >conftest.$ac_ext <<_ACEOF
10979 #line 10979 "configure"
10980 #include "confdefs.h"
10981 #include <sys/types.h>
10982 #include <$ac_hdr>
10983
10984 int
10985 main ()
10986 {
10987 if ((DIR *) 0)
10988 return 0;
10989   ;
10990   return 0;
10991 }
10992 _ACEOF
10993 rm -f conftest.$ac_objext
10994 if { (eval echo "$as_me:10994: \"$ac_compile\"") >&5
10995   (eval $ac_compile) 2>&5
10996   ac_status=$?
10997   echo "$as_me:10997: \$? = $ac_status" >&5
10998   (exit $ac_status); } &&
10999          { ac_try='test -s conftest.$ac_objext'
11000   { (eval echo "$as_me:11000: \"$ac_try\"") >&5
11001   (eval $ac_try) 2>&5
11002   ac_status=$?
11003   echo "$as_me:11003: \$? = $ac_status" >&5
11004   (exit $ac_status); }; }; then
11005   eval "$as_ac_Header=yes"
11006 else
11007   echo "$as_me: failed program was:" >&5
11008 cat conftest.$ac_ext >&5
11009 eval "$as_ac_Header=no"
11010 fi
11011 rm -f conftest.$ac_objext conftest.$ac_ext
11012 fi
11013 echo "$as_me:11013: result: `eval echo '${'$as_ac_Header'}'`" >&5
11014 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11015 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11016   cat >>confdefs.h <<EOF
11017 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
11018 EOF
11019
11020 ac_header_dirent=$ac_hdr; break
11021 fi
11022
11023 done
11024 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11025 if test $ac_header_dirent = dirent.h; then
11026   echo "$as_me:11026: checking for opendir in -ldir" >&5
11027 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
11028 if test "${ac_cv_lib_dir_opendir+set}" = set; then
11029   echo $ECHO_N "(cached) $ECHO_C" >&6
11030 else
11031   ac_check_lib_save_LIBS=$LIBS
11032 LIBS="-ldir  $LIBS"
11033 cat >conftest.$ac_ext <<_ACEOF
11034 #line 11034 "configure"
11035 #include "confdefs.h"
11036
11037 /* Override any gcc2 internal prototype to avoid an error.  */
11038 #ifdef __cplusplus
11039 extern "C"
11040 #endif
11041 /* We use char because int might match the return type of a gcc2
11042    builtin and then its argument prototype would still apply.  */
11043 char opendir ();
11044 int
11045 main ()
11046 {
11047 opendir ();
11048   ;
11049   return 0;
11050 }
11051 _ACEOF
11052 rm -f conftest.$ac_objext conftest$ac_exeext
11053 if { (eval echo "$as_me:11053: \"$ac_link\"") >&5
11054   (eval $ac_link) 2>&5
11055   ac_status=$?
11056   echo "$as_me:11056: \$? = $ac_status" >&5
11057   (exit $ac_status); } &&
11058          { ac_try='test -s conftest$ac_exeext'
11059   { (eval echo "$as_me:11059: \"$ac_try\"") >&5
11060   (eval $ac_try) 2>&5
11061   ac_status=$?
11062   echo "$as_me:11062: \$? = $ac_status" >&5
11063   (exit $ac_status); }; }; then
11064   ac_cv_lib_dir_opendir=yes
11065 else
11066   echo "$as_me: failed program was:" >&5
11067 cat conftest.$ac_ext >&5
11068 ac_cv_lib_dir_opendir=no
11069 fi
11070 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11071 LIBS=$ac_check_lib_save_LIBS
11072 fi
11073 echo "$as_me:11073: result: $ac_cv_lib_dir_opendir" >&5
11074 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
11075 if test $ac_cv_lib_dir_opendir = yes; then
11076   LIBS="$LIBS -ldir"
11077 fi
11078
11079 else
11080   echo "$as_me:11080: checking for opendir in -lx" >&5
11081 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
11082 if test "${ac_cv_lib_x_opendir+set}" = set; then
11083   echo $ECHO_N "(cached) $ECHO_C" >&6
11084 else
11085   ac_check_lib_save_LIBS=$LIBS
11086 LIBS="-lx  $LIBS"
11087 cat >conftest.$ac_ext <<_ACEOF
11088 #line 11088 "configure"
11089 #include "confdefs.h"
11090
11091 /* Override any gcc2 internal prototype to avoid an error.  */
11092 #ifdef __cplusplus
11093 extern "C"
11094 #endif
11095 /* We use char because int might match the return type of a gcc2
11096    builtin and then its argument prototype would still apply.  */
11097 char opendir ();
11098 int
11099 main ()
11100 {
11101 opendir ();
11102   ;
11103   return 0;
11104 }
11105 _ACEOF
11106 rm -f conftest.$ac_objext conftest$ac_exeext
11107 if { (eval echo "$as_me:11107: \"$ac_link\"") >&5
11108   (eval $ac_link) 2>&5
11109   ac_status=$?
11110   echo "$as_me:11110: \$? = $ac_status" >&5
11111   (exit $ac_status); } &&
11112          { ac_try='test -s conftest$ac_exeext'
11113   { (eval echo "$as_me:11113: \"$ac_try\"") >&5
11114   (eval $ac_try) 2>&5
11115   ac_status=$?
11116   echo "$as_me:11116: \$? = $ac_status" >&5
11117   (exit $ac_status); }; }; then
11118   ac_cv_lib_x_opendir=yes
11119 else
11120   echo "$as_me: failed program was:" >&5
11121 cat conftest.$ac_ext >&5
11122 ac_cv_lib_x_opendir=no
11123 fi
11124 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11125 LIBS=$ac_check_lib_save_LIBS
11126 fi
11127 echo "$as_me:11127: result: $ac_cv_lib_x_opendir" >&5
11128 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
11129 if test $ac_cv_lib_x_opendir = yes; then
11130   LIBS="$LIBS -lx"
11131 fi
11132
11133 fi
11134
11135 echo "$as_me:11135: checking whether time.h and sys/time.h may both be included" >&5
11136 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
11137 if test "${ac_cv_header_time+set}" = set; then
11138   echo $ECHO_N "(cached) $ECHO_C" >&6
11139 else
11140   cat >conftest.$ac_ext <<_ACEOF
11141 #line 11141 "configure"
11142 #include "confdefs.h"
11143 #include <sys/types.h>
11144 #include <sys/time.h>
11145 #include <time.h>
11146
11147 int
11148 main ()
11149 {
11150 if ((struct tm *) 0)
11151 return 0;
11152   ;
11153   return 0;
11154 }
11155 _ACEOF
11156 rm -f conftest.$ac_objext
11157 if { (eval echo "$as_me:11157: \"$ac_compile\"") >&5
11158   (eval $ac_compile) 2>&5
11159   ac_status=$?
11160   echo "$as_me:11160: \$? = $ac_status" >&5
11161   (exit $ac_status); } &&
11162          { ac_try='test -s conftest.$ac_objext'
11163   { (eval echo "$as_me:11163: \"$ac_try\"") >&5
11164   (eval $ac_try) 2>&5
11165   ac_status=$?
11166   echo "$as_me:11166: \$? = $ac_status" >&5
11167   (exit $ac_status); }; }; then
11168   ac_cv_header_time=yes
11169 else
11170   echo "$as_me: failed program was:" >&5
11171 cat conftest.$ac_ext >&5
11172 ac_cv_header_time=no
11173 fi
11174 rm -f conftest.$ac_objext conftest.$ac_ext
11175 fi
11176 echo "$as_me:11176: result: $ac_cv_header_time" >&5
11177 echo "${ECHO_T}$ac_cv_header_time" >&6
11178 if test $ac_cv_header_time = yes; then
11179
11180 cat >>confdefs.h <<\EOF
11181 #define TIME_WITH_SYS_TIME 1
11182 EOF
11183
11184 fi
11185
11186 echo "$as_me:11186: checking for regular-expression headers" >&5
11187 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
11188 if test "${cf_cv_regex+set}" = set; then
11189   echo $ECHO_N "(cached) $ECHO_C" >&6
11190 else
11191
11192 cat >conftest.$ac_ext <<_ACEOF
11193 #line 11193 "configure"
11194 #include "confdefs.h"
11195 #include <sys/types.h>
11196 #include <regex.h>
11197 int
11198 main ()
11199 {
11200
11201         regex_t *p;
11202         int x = regcomp(p, "", 0);
11203         int y = regexec(p, "", 0, 0, 0);
11204         regfree(p);
11205
11206   ;
11207   return 0;
11208 }
11209 _ACEOF
11210 rm -f conftest.$ac_objext conftest$ac_exeext
11211 if { (eval echo "$as_me:11211: \"$ac_link\"") >&5
11212   (eval $ac_link) 2>&5
11213   ac_status=$?
11214   echo "$as_me:11214: \$? = $ac_status" >&5
11215   (exit $ac_status); } &&
11216          { ac_try='test -s conftest$ac_exeext'
11217   { (eval echo "$as_me:11217: \"$ac_try\"") >&5
11218   (eval $ac_try) 2>&5
11219   ac_status=$?
11220   echo "$as_me:11220: \$? = $ac_status" >&5
11221   (exit $ac_status); }; }; then
11222   cf_cv_regex="regex.h"
11223 else
11224   echo "$as_me: failed program was:" >&5
11225 cat conftest.$ac_ext >&5
11226
11227         cat >conftest.$ac_ext <<_ACEOF
11228 #line 11228 "configure"
11229 #include "confdefs.h"
11230 #include <regexp.h>
11231 int
11232 main ()
11233 {
11234
11235                 char *p = compile("", "", "", 0);
11236                 int x = step("", "");
11237
11238   ;
11239   return 0;
11240 }
11241 _ACEOF
11242 rm -f conftest.$ac_objext conftest$ac_exeext
11243 if { (eval echo "$as_me:11243: \"$ac_link\"") >&5
11244   (eval $ac_link) 2>&5
11245   ac_status=$?
11246   echo "$as_me:11246: \$? = $ac_status" >&5
11247   (exit $ac_status); } &&
11248          { ac_try='test -s conftest$ac_exeext'
11249   { (eval echo "$as_me:11249: \"$ac_try\"") >&5
11250   (eval $ac_try) 2>&5
11251   ac_status=$?
11252   echo "$as_me:11252: \$? = $ac_status" >&5
11253   (exit $ac_status); }; }; then
11254   cf_cv_regex="regexp.h"
11255 else
11256   echo "$as_me: failed program was:" >&5
11257 cat conftest.$ac_ext >&5
11258
11259                 cf_save_LIBS="$LIBS"
11260                 LIBS="-lgen $LIBS"
11261                 cat >conftest.$ac_ext <<_ACEOF
11262 #line 11262 "configure"
11263 #include "confdefs.h"
11264 #include <regexpr.h>
11265 int
11266 main ()
11267 {
11268
11269                         char *p = compile("", "", "");
11270                         int x = step("", "");
11271
11272   ;
11273   return 0;
11274 }
11275 _ACEOF
11276 rm -f conftest.$ac_objext conftest$ac_exeext
11277 if { (eval echo "$as_me:11277: \"$ac_link\"") >&5
11278   (eval $ac_link) 2>&5
11279   ac_status=$?
11280   echo "$as_me:11280: \$? = $ac_status" >&5
11281   (exit $ac_status); } &&
11282          { ac_try='test -s conftest$ac_exeext'
11283   { (eval echo "$as_me:11283: \"$ac_try\"") >&5
11284   (eval $ac_try) 2>&5
11285   ac_status=$?
11286   echo "$as_me:11286: \$? = $ac_status" >&5
11287   (exit $ac_status); }; }; then
11288   cf_cv_regex="regexpr.h"
11289 else
11290   echo "$as_me: failed program was:" >&5
11291 cat conftest.$ac_ext >&5
11292 LIBS="$cf_save_LIBS"
11293 fi
11294 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11295 fi
11296 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11297 fi
11298 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11299
11300 fi
11301
11302 echo "$as_me:11302: result: $cf_cv_regex" >&5
11303 echo "${ECHO_T}$cf_cv_regex" >&6
11304 case $cf_cv_regex in
11305         regex.h)   cat >>confdefs.h <<\EOF
11306 #define HAVE_REGEX_H_FUNCS 1
11307 EOF
11308  ;;
11309         regexp.h)  cat >>confdefs.h <<\EOF
11310 #define HAVE_REGEXP_H_FUNCS 1
11311 EOF
11312  ;;
11313         regexpr.h) cat >>confdefs.h <<\EOF
11314 #define HAVE_REGEXPR_H_FUNCS 1
11315 EOF
11316  ;;
11317 esac
11318
11319 for ac_header in \
11320 fcntl.h \
11321 getopt.h \
11322 limits.h \
11323 locale.h \
11324 poll.h \
11325 sys/bsdtypes.h \
11326 sys/ioctl.h \
11327 sys/param.h \
11328 sys/poll.h \
11329 sys/select.h \
11330 sys/time.h \
11331 sys/times.h \
11332 ttyent.h \
11333 unistd.h \
11334 wctype.h \
11335
11336 do
11337 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11338 echo "$as_me:11338: checking for $ac_header" >&5
11339 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11340 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11341   echo $ECHO_N "(cached) $ECHO_C" >&6
11342 else
11343   cat >conftest.$ac_ext <<_ACEOF
11344 #line 11344 "configure"
11345 #include "confdefs.h"
11346 #include <$ac_header>
11347 _ACEOF
11348 if { (eval echo "$as_me:11348: \"$ac_cpp conftest.$ac_ext\"") >&5
11349   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11350   ac_status=$?
11351   egrep -v '^ *\+' conftest.er1 >conftest.err
11352   rm -f conftest.er1
11353   cat conftest.err >&5
11354   echo "$as_me:11354: \$? = $ac_status" >&5
11355   (exit $ac_status); } >/dev/null; then
11356   if test -s conftest.err; then
11357     ac_cpp_err=$ac_c_preproc_warn_flag
11358   else
11359     ac_cpp_err=
11360   fi
11361 else
11362   ac_cpp_err=yes
11363 fi
11364 if test -z "$ac_cpp_err"; then
11365   eval "$as_ac_Header=yes"
11366 else
11367   echo "$as_me: failed program was:" >&5
11368   cat conftest.$ac_ext >&5
11369   eval "$as_ac_Header=no"
11370 fi
11371 rm -f conftest.err conftest.$ac_ext
11372 fi
11373 echo "$as_me:11373: result: `eval echo '${'$as_ac_Header'}'`" >&5
11374 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11375 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11376   cat >>confdefs.h <<EOF
11377 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11378 EOF
11379
11380 fi
11381 done
11382
11383 # check for ISC (this may also define _POSIX_SOURCE)
11384 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
11385 if test "$ISC" = yes ; then
11386
11387 echo "$as_me:11387: checking for main in -lcposix" >&5
11388 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
11389 if test "${ac_cv_lib_cposix_main+set}" = set; then
11390   echo $ECHO_N "(cached) $ECHO_C" >&6
11391 else
11392   ac_check_lib_save_LIBS=$LIBS
11393 LIBS="-lcposix  $LIBS"
11394 cat >conftest.$ac_ext <<_ACEOF
11395 #line 11395 "configure"
11396 #include "confdefs.h"
11397
11398 int
11399 main ()
11400 {
11401 main ();
11402   ;
11403   return 0;
11404 }
11405 _ACEOF
11406 rm -f conftest.$ac_objext conftest$ac_exeext
11407 if { (eval echo "$as_me:11407: \"$ac_link\"") >&5
11408   (eval $ac_link) 2>&5
11409   ac_status=$?
11410   echo "$as_me:11410: \$? = $ac_status" >&5
11411   (exit $ac_status); } &&
11412          { ac_try='test -s conftest$ac_exeext'
11413   { (eval echo "$as_me:11413: \"$ac_try\"") >&5
11414   (eval $ac_try) 2>&5
11415   ac_status=$?
11416   echo "$as_me:11416: \$? = $ac_status" >&5
11417   (exit $ac_status); }; }; then
11418   ac_cv_lib_cposix_main=yes
11419 else
11420   echo "$as_me: failed program was:" >&5
11421 cat conftest.$ac_ext >&5
11422 ac_cv_lib_cposix_main=no
11423 fi
11424 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11425 LIBS=$ac_check_lib_save_LIBS
11426 fi
11427 echo "$as_me:11427: result: $ac_cv_lib_cposix_main" >&5
11428 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
11429 if test $ac_cv_lib_cposix_main = yes; then
11430   cat >>confdefs.h <<EOF
11431 #define HAVE_LIBCPOSIX 1
11432 EOF
11433
11434   LIBS="-lcposix $LIBS"
11435
11436 fi
11437
11438         echo "$as_me:11438: checking for bzero in -linet" >&5
11439 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
11440 if test "${ac_cv_lib_inet_bzero+set}" = set; then
11441   echo $ECHO_N "(cached) $ECHO_C" >&6
11442 else
11443   ac_check_lib_save_LIBS=$LIBS
11444 LIBS="-linet  $LIBS"
11445 cat >conftest.$ac_ext <<_ACEOF
11446 #line 11446 "configure"
11447 #include "confdefs.h"
11448
11449 /* Override any gcc2 internal prototype to avoid an error.  */
11450 #ifdef __cplusplus
11451 extern "C"
11452 #endif
11453 /* We use char because int might match the return type of a gcc2
11454    builtin and then its argument prototype would still apply.  */
11455 char bzero ();
11456 int
11457 main ()
11458 {
11459 bzero ();
11460   ;
11461   return 0;
11462 }
11463 _ACEOF
11464 rm -f conftest.$ac_objext conftest$ac_exeext
11465 if { (eval echo "$as_me:11465: \"$ac_link\"") >&5
11466   (eval $ac_link) 2>&5
11467   ac_status=$?
11468   echo "$as_me:11468: \$? = $ac_status" >&5
11469   (exit $ac_status); } &&
11470          { ac_try='test -s conftest$ac_exeext'
11471   { (eval echo "$as_me:11471: \"$ac_try\"") >&5
11472   (eval $ac_try) 2>&5
11473   ac_status=$?
11474   echo "$as_me:11474: \$? = $ac_status" >&5
11475   (exit $ac_status); }; }; then
11476   ac_cv_lib_inet_bzero=yes
11477 else
11478   echo "$as_me: failed program was:" >&5
11479 cat conftest.$ac_ext >&5
11480 ac_cv_lib_inet_bzero=no
11481 fi
11482 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11483 LIBS=$ac_check_lib_save_LIBS
11484 fi
11485 echo "$as_me:11485: result: $ac_cv_lib_inet_bzero" >&5
11486 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
11487 if test $ac_cv_lib_inet_bzero = yes; then
11488   LIBS="$LIBS -linet"
11489 fi
11490 fi
11491
11492 echo "$as_me:11492: checking if sys/time.h works with sys/select.h" >&5
11493 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
11494 if test "${cf_cv_sys_time_select+set}" = set; then
11495   echo $ECHO_N "(cached) $ECHO_C" >&6
11496 else
11497
11498 cat >conftest.$ac_ext <<_ACEOF
11499 #line 11499 "configure"
11500 #include "confdefs.h"
11501
11502 #include <sys/types.h>
11503 #ifdef HAVE_SYS_TIME_H
11504 #include <sys/time.h>
11505 #endif
11506 #ifdef HAVE_SYS_SELECT_H
11507 #include <sys/select.h>
11508 #endif
11509
11510 int
11511 main ()
11512 {
11513
11514   ;
11515   return 0;
11516 }
11517 _ACEOF
11518 rm -f conftest.$ac_objext
11519 if { (eval echo "$as_me:11519: \"$ac_compile\"") >&5
11520   (eval $ac_compile) 2>&5
11521   ac_status=$?
11522   echo "$as_me:11522: \$? = $ac_status" >&5
11523   (exit $ac_status); } &&
11524          { ac_try='test -s conftest.$ac_objext'
11525   { (eval echo "$as_me:11525: \"$ac_try\"") >&5
11526   (eval $ac_try) 2>&5
11527   ac_status=$?
11528   echo "$as_me:11528: \$? = $ac_status" >&5
11529   (exit $ac_status); }; }; then
11530   cf_cv_sys_time_select=yes
11531 else
11532   echo "$as_me: failed program was:" >&5
11533 cat conftest.$ac_ext >&5
11534 cf_cv_sys_time_select=no
11535 fi
11536 rm -f conftest.$ac_objext conftest.$ac_ext
11537
11538 fi
11539
11540 echo "$as_me:11540: result: $cf_cv_sys_time_select" >&5
11541 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
11542 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
11543 #define HAVE_SYS_TIME_SELECT 1
11544 EOF
11545
11546 ###     checks for compiler characteristics
11547 ac_ext=c
11548 ac_cpp='$CPP $CPPFLAGS'
11549 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11550 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11551 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11552 ac_main_return=return
11553
11554 echo "$as_me:11554: checking for $CC option to accept ANSI C" >&5
11555 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
11556 if test "${ac_cv_prog_cc_stdc+set}" = set; then
11557   echo $ECHO_N "(cached) $ECHO_C" >&6
11558 else
11559   ac_cv_prog_cc_stdc=no
11560 ac_save_CC=$CC
11561 cat >conftest.$ac_ext <<_ACEOF
11562 #line 11562 "configure"
11563 #include "confdefs.h"
11564 #include <stdarg.h>
11565 #include <stdio.h>
11566 #include <sys/types.h>
11567 #include <sys/stat.h>
11568 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
11569 struct buf { int x; };
11570 FILE * (*rcsopen) (struct buf *, struct stat *, int);
11571 static char *e (p, i)
11572      char **p;
11573      int i;
11574 {
11575   return p[i];
11576 }
11577 static char *f (char * (*g) (char **, int), char **p, ...)
11578 {
11579   char *s;
11580   va_list v;
11581   va_start (v,p);
11582   s = g (p, va_arg (v,int));
11583   va_end (v);
11584   return s;
11585 }
11586 int test (int i, double x);
11587 struct s1 {int (*f) (int a);};
11588 struct s2 {int (*f) (double a);};
11589 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
11590 int argc;
11591 char **argv;
11592 int
11593 main ()
11594 {
11595 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
11596   ;
11597   return 0;
11598 }
11599 _ACEOF
11600 # Don't try gcc -ansi; that turns off useful extensions and
11601 # breaks some systems' header files.
11602 # AIX                   -qlanglvl=ansi
11603 # Ultrix and OSF/1      -std1
11604 # HP-UX 10.20 and later -Ae
11605 # HP-UX older versions  -Aa -D_HPUX_SOURCE
11606 # SVR4                  -Xc -D__EXTENSIONS__
11607 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
11608 do
11609   CC="$ac_save_CC $ac_arg"
11610   rm -f conftest.$ac_objext
11611 if { (eval echo "$as_me:11611: \"$ac_compile\"") >&5
11612   (eval $ac_compile) 2>&5
11613   ac_status=$?
11614   echo "$as_me:11614: \$? = $ac_status" >&5
11615   (exit $ac_status); } &&
11616          { ac_try='test -s conftest.$ac_objext'
11617   { (eval echo "$as_me:11617: \"$ac_try\"") >&5
11618   (eval $ac_try) 2>&5
11619   ac_status=$?
11620   echo "$as_me:11620: \$? = $ac_status" >&5
11621   (exit $ac_status); }; }; then
11622   ac_cv_prog_cc_stdc=$ac_arg
11623 break
11624 else
11625   echo "$as_me: failed program was:" >&5
11626 cat conftest.$ac_ext >&5
11627 fi
11628 rm -f conftest.$ac_objext
11629 done
11630 rm -f conftest.$ac_ext conftest.$ac_objext
11631 CC=$ac_save_CC
11632
11633 fi
11634
11635 case "x$ac_cv_prog_cc_stdc" in
11636   x|xno)
11637     echo "$as_me:11637: result: none needed" >&5
11638 echo "${ECHO_T}none needed" >&6 ;;
11639   *)
11640     echo "$as_me:11640: result: $ac_cv_prog_cc_stdc" >&5
11641 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
11642     CC="$CC $ac_cv_prog_cc_stdc" ;;
11643 esac
11644
11645 echo "$as_me:11645: checking for an ANSI C-conforming const" >&5
11646 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
11647 if test "${ac_cv_c_const+set}" = set; then
11648   echo $ECHO_N "(cached) $ECHO_C" >&6
11649 else
11650   cat >conftest.$ac_ext <<_ACEOF
11651 #line 11651 "configure"
11652 #include "confdefs.h"
11653
11654 int
11655 main ()
11656 {
11657 /* FIXME: Include the comments suggested by Paul. */
11658 #ifndef __cplusplus
11659   /* Ultrix mips cc rejects this.  */
11660   typedef int charset[2];
11661   const charset x;
11662   /* SunOS 4.1.1 cc rejects this.  */
11663   char const *const *ccp;
11664   char **p;
11665   /* NEC SVR4.0.2 mips cc rejects this.  */
11666   struct point {int x, y;};
11667   static struct point const zero = {0,0};
11668   /* AIX XL C 1.02.0.0 rejects this.
11669      It does not let you subtract one const X* pointer from another in
11670      an arm of an if-expression whose if-part is not a constant
11671      expression */
11672   const char *g = "string";
11673   ccp = &g + (g ? g-g : 0);
11674   /* HPUX 7.0 cc rejects these. */
11675   ++ccp;
11676   p = (char**) ccp;
11677   ccp = (char const *const *) p;
11678   { /* SCO 3.2v4 cc rejects this.  */
11679     char *t;
11680     char const *s = 0 ? (char *) 0 : (char const *) 0;
11681
11682     *t++ = 0;
11683   }
11684   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11685     int x[] = {25, 17};
11686     const int *foo = &x[0];
11687     ++foo;
11688   }
11689   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11690     typedef const int *iptr;
11691     iptr p = 0;
11692     ++p;
11693   }
11694   { /* AIX XL C 1.02.0.0 rejects this saying
11695        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11696     struct s { int j; const int *ap[3]; };
11697     struct s *b; b->j = 5;
11698   }
11699   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11700     const int foo = 10;
11701   }
11702 #endif
11703
11704   ;
11705   return 0;
11706 }
11707 _ACEOF
11708 rm -f conftest.$ac_objext
11709 if { (eval echo "$as_me:11709: \"$ac_compile\"") >&5
11710   (eval $ac_compile) 2>&5
11711   ac_status=$?
11712   echo "$as_me:11712: \$? = $ac_status" >&5
11713   (exit $ac_status); } &&
11714          { ac_try='test -s conftest.$ac_objext'
11715   { (eval echo "$as_me:11715: \"$ac_try\"") >&5
11716   (eval $ac_try) 2>&5
11717   ac_status=$?
11718   echo "$as_me:11718: \$? = $ac_status" >&5
11719   (exit $ac_status); }; }; then
11720   ac_cv_c_const=yes
11721 else
11722   echo "$as_me: failed program was:" >&5
11723 cat conftest.$ac_ext >&5
11724 ac_cv_c_const=no
11725 fi
11726 rm -f conftest.$ac_objext conftest.$ac_ext
11727 fi
11728 echo "$as_me:11728: result: $ac_cv_c_const" >&5
11729 echo "${ECHO_T}$ac_cv_c_const" >&6
11730 if test $ac_cv_c_const = no; then
11731
11732 cat >>confdefs.h <<\EOF
11733 #define const
11734 EOF
11735
11736 fi
11737
11738 echo "$as_me:11738: checking for inline" >&5
11739 echo $ECHO_N "checking for inline... $ECHO_C" >&6
11740 if test "${ac_cv_c_inline+set}" = set; then
11741   echo $ECHO_N "(cached) $ECHO_C" >&6
11742 else
11743   ac_cv_c_inline=no
11744 for ac_kw in inline __inline__ __inline; do
11745   cat >conftest.$ac_ext <<_ACEOF
11746 #line 11746 "configure"
11747 #include "confdefs.h"
11748 #ifndef __cplusplus
11749 static $ac_kw int static_foo () {return 0; }
11750 $ac_kw int foo () {return 0; }
11751 #endif
11752
11753 _ACEOF
11754 rm -f conftest.$ac_objext
11755 if { (eval echo "$as_me:11755: \"$ac_compile\"") >&5
11756   (eval $ac_compile) 2>&5
11757   ac_status=$?
11758   echo "$as_me:11758: \$? = $ac_status" >&5
11759   (exit $ac_status); } &&
11760          { ac_try='test -s conftest.$ac_objext'
11761   { (eval echo "$as_me:11761: \"$ac_try\"") >&5
11762   (eval $ac_try) 2>&5
11763   ac_status=$?
11764   echo "$as_me:11764: \$? = $ac_status" >&5
11765   (exit $ac_status); }; }; then
11766   ac_cv_c_inline=$ac_kw; break
11767 else
11768   echo "$as_me: failed program was:" >&5
11769 cat conftest.$ac_ext >&5
11770 fi
11771 rm -f conftest.$ac_objext conftest.$ac_ext
11772 done
11773
11774 fi
11775 echo "$as_me:11775: result: $ac_cv_c_inline" >&5
11776 echo "${ECHO_T}$ac_cv_c_inline" >&6
11777 case $ac_cv_c_inline in
11778   inline | yes) ;;
11779   no)
11780 cat >>confdefs.h <<\EOF
11781 #define inline
11782 EOF
11783  ;;
11784   *)  cat >>confdefs.h <<EOF
11785 #define inline $ac_cv_c_inline
11786 EOF
11787  ;;
11788 esac
11789
11790 NCURSES_INLINE=
11791 if test "$ac_cv_c_inline" != no ; then
11792   NCURSES_INLINE=inline
11793   if test "$INTEL_COMPILER" = yes
11794   then
11795     :
11796   elif test "$GCC" = yes
11797   then
11798     echo "$as_me:11798: checking if gcc supports options to tune inlining" >&5
11799 echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6
11800 if test "${cf_cv_gcc_inline+set}" = set; then
11801   echo $ECHO_N "(cached) $ECHO_C" >&6
11802 else
11803
11804       cf_save_CFLAGS=$CFLAGS
11805       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
11806       cat >conftest.$ac_ext <<_ACEOF
11807 #line 11807 "configure"
11808 #include "confdefs.h"
11809 inline int foo(void) { return 1; }
11810 int
11811 main ()
11812 {
11813 ${cf_cv_main_return:-return} foo()
11814   ;
11815   return 0;
11816 }
11817 _ACEOF
11818 rm -f conftest.$ac_objext
11819 if { (eval echo "$as_me:11819: \"$ac_compile\"") >&5
11820   (eval $ac_compile) 2>&5
11821   ac_status=$?
11822   echo "$as_me:11822: \$? = $ac_status" >&5
11823   (exit $ac_status); } &&
11824          { ac_try='test -s conftest.$ac_objext'
11825   { (eval echo "$as_me:11825: \"$ac_try\"") >&5
11826   (eval $ac_try) 2>&5
11827   ac_status=$?
11828   echo "$as_me:11828: \$? = $ac_status" >&5
11829   (exit $ac_status); }; }; then
11830   cf_cv_gcc_inline=yes
11831 else
11832   echo "$as_me: failed program was:" >&5
11833 cat conftest.$ac_ext >&5
11834 cf_cv_gcc_inline=no
11835 fi
11836 rm -f conftest.$ac_objext conftest.$ac_ext
11837       CFLAGS=$cf_save_CFLAGS
11838
11839 fi
11840 echo "$as_me:11840: result: $cf_cv_gcc_inline" >&5
11841 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
11842     if test "$cf_cv_gcc_inline" = yes ; then
11843
11844 cf_fix_cppflags=no
11845 cf_new_cflags=
11846 cf_new_cppflags=
11847 cf_new_extra_cppflags=
11848
11849 for cf_add_cflags in --param max-inline-insns-single=1200
11850 do
11851 case $cf_fix_cppflags in
11852 no)
11853         case $cf_add_cflags in #(vi
11854         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11855                 case $cf_add_cflags in
11856                 -D*)
11857                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11858
11859                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11860                         && test -z "${cf_tst_cflags}" \
11861                         && cf_fix_cppflags=yes
11862
11863                         if test $cf_fix_cppflags = yes ; then
11864                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11865                                 continue
11866                         elif test "${cf_tst_cflags}" = "\"'" ; then
11867                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11868                                 continue
11869                         fi
11870                         ;;
11871                 esac
11872                 case "$CPPFLAGS" in
11873                 *$cf_add_cflags) #(vi
11874                         ;;
11875                 *) #(vi
11876                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11877                         ;;
11878                 esac
11879                 ;;
11880         *)
11881                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11882                 ;;
11883         esac
11884         ;;
11885 yes)
11886         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11887
11888         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11889
11890         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11891         && test -z "${cf_tst_cflags}" \
11892         && cf_fix_cppflags=no
11893         ;;
11894 esac
11895 done
11896
11897 if test -n "$cf_new_cflags" ; then
11898
11899         CFLAGS="$CFLAGS $cf_new_cflags"
11900 fi
11901
11902 if test -n "$cf_new_cppflags" ; then
11903
11904         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
11905 fi
11906
11907 if test -n "$cf_new_extra_cppflags" ; then
11908
11909         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11910 fi
11911
11912     fi
11913   fi
11914 fi
11915
11916 echo "$as_me:11916: checking for signal global datatype" >&5
11917 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
11918 if test "${cf_cv_sig_atomic_t+set}" = set; then
11919   echo $ECHO_N "(cached) $ECHO_C" >&6
11920 else
11921
11922         for cf_type in \
11923                 "volatile sig_atomic_t" \
11924                 "sig_atomic_t" \
11925                 "int"
11926         do
11927         cat >conftest.$ac_ext <<_ACEOF
11928 #line 11928 "configure"
11929 #include "confdefs.h"
11930
11931 #include <sys/types.h>
11932 #include <signal.h>
11933 #include <stdio.h>
11934
11935 extern $cf_type x;
11936 $cf_type x;
11937 static void handler(int sig)
11938 {
11939         x = 5;
11940 }
11941 int
11942 main ()
11943 {
11944 signal(SIGINT, handler);
11945                  x = 1
11946   ;
11947   return 0;
11948 }
11949 _ACEOF
11950 rm -f conftest.$ac_objext
11951 if { (eval echo "$as_me:11951: \"$ac_compile\"") >&5
11952   (eval $ac_compile) 2>&5
11953   ac_status=$?
11954   echo "$as_me:11954: \$? = $ac_status" >&5
11955   (exit $ac_status); } &&
11956          { ac_try='test -s conftest.$ac_objext'
11957   { (eval echo "$as_me:11957: \"$ac_try\"") >&5
11958   (eval $ac_try) 2>&5
11959   ac_status=$?
11960   echo "$as_me:11960: \$? = $ac_status" >&5
11961   (exit $ac_status); }; }; then
11962   cf_cv_sig_atomic_t=$cf_type
11963 else
11964   echo "$as_me: failed program was:" >&5
11965 cat conftest.$ac_ext >&5
11966 cf_cv_sig_atomic_t=no
11967 fi
11968 rm -f conftest.$ac_objext conftest.$ac_ext
11969                 test "$cf_cv_sig_atomic_t" != no && break
11970         done
11971
11972 fi
11973
11974 echo "$as_me:11974: result: $cf_cv_sig_atomic_t" >&5
11975 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
11976 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
11977 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
11978 EOF
11979
11980 if test $NCURSES_CHTYPE = auto ; then
11981
11982 echo "$as_me:11982: checking for type of chtype" >&5
11983 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11984 if test "${cf_cv_typeof_chtype+set}" = set; then
11985   echo $ECHO_N "(cached) $ECHO_C" >&6
11986 else
11987
11988                 if test "$cross_compiling" = yes; then
11989   cf_cv_typeof_chtype=long
11990 else
11991   cat >conftest.$ac_ext <<_ACEOF
11992 #line 11992 "configure"
11993 #include "confdefs.h"
11994
11995 #define WANT_BITS 31
11996 #include <stdio.h>
11997 int main()
11998 {
11999         FILE *fp = fopen("cf_test.out", "w");
12000         if (fp != 0) {
12001                 char *result = "long";
12002                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
12003                         int n;
12004                         unsigned int x, y;
12005                         for (n = 0; n < WANT_BITS; n++) {
12006                                 x = (1 << n);
12007                                 y = (x >> n);
12008                                 if (y != 1 || x == 0) {
12009                                         x = 0;
12010                                         break;
12011                                 }
12012                         }
12013                         /*
12014                          * If x is nonzero, an int is big enough for the bits
12015                          * that we want.
12016                          */
12017                         result = (x != 0) ? "int" : "long";
12018                 }
12019                 fputs(result, fp);
12020                 fclose(fp);
12021         }
12022         ${cf_cv_main_return:-return}(0);
12023 }
12024
12025 _ACEOF
12026 rm -f conftest$ac_exeext
12027 if { (eval echo "$as_me:12027: \"$ac_link\"") >&5
12028   (eval $ac_link) 2>&5
12029   ac_status=$?
12030   echo "$as_me:12030: \$? = $ac_status" >&5
12031   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12032   { (eval echo "$as_me:12032: \"$ac_try\"") >&5
12033   (eval $ac_try) 2>&5
12034   ac_status=$?
12035   echo "$as_me:12035: \$? = $ac_status" >&5
12036   (exit $ac_status); }; }; then
12037   cf_cv_typeof_chtype=`cat cf_test.out`
12038 else
12039   echo "$as_me: program exited with status $ac_status" >&5
12040 echo "$as_me: failed program was:" >&5
12041 cat conftest.$ac_ext >&5
12042 cf_cv_typeof_chtype=long
12043 fi
12044 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12045 fi
12046                 rm -f cf_test.out
12047
12048 fi
12049
12050 echo "$as_me:12050: result: $cf_cv_typeof_chtype" >&5
12051 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
12052
12053 cat >>confdefs.h <<EOF
12054 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
12055 EOF
12056
12057 else
12058         cf_cv_typeof_chtype=$NCURSES_CHTYPE
12059 fi
12060 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
12061
12062 echo "$as_me:12062: checking if unsigned literals are legal" >&5
12063 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
12064 if test "${cf_cv_unsigned_literals+set}" = set; then
12065   echo $ECHO_N "(cached) $ECHO_C" >&6
12066 else
12067
12068         cat >conftest.$ac_ext <<_ACEOF
12069 #line 12069 "configure"
12070 #include "confdefs.h"
12071
12072 int
12073 main ()
12074 {
12075 long x = 1L + 1UL + 1U + 1
12076   ;
12077   return 0;
12078 }
12079 _ACEOF
12080 rm -f conftest.$ac_objext
12081 if { (eval echo "$as_me:12081: \"$ac_compile\"") >&5
12082   (eval $ac_compile) 2>&5
12083   ac_status=$?
12084   echo "$as_me:12084: \$? = $ac_status" >&5
12085   (exit $ac_status); } &&
12086          { ac_try='test -s conftest.$ac_objext'
12087   { (eval echo "$as_me:12087: \"$ac_try\"") >&5
12088   (eval $ac_try) 2>&5
12089   ac_status=$?
12090   echo "$as_me:12090: \$? = $ac_status" >&5
12091   (exit $ac_status); }; }; then
12092   cf_cv_unsigned_literals=yes
12093 else
12094   echo "$as_me: failed program was:" >&5
12095 cat conftest.$ac_ext >&5
12096 cf_cv_unsigned_literals=no
12097 fi
12098 rm -f conftest.$ac_objext conftest.$ac_ext
12099
12100 fi
12101
12102 echo "$as_me:12102: result: $cf_cv_unsigned_literals" >&5
12103 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
12104
12105 cf_cv_1UL="1"
12106 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
12107 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
12108
12109 if test $NCURSES_MMASK_T = auto ; then
12110         cf_cv_typeof_mmask_t=long
12111 else
12112         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
12113 fi
12114 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
12115
12116 ###     Checks for external-data
12117
12118 echo "$as_me:12118: checking if external errno is declared" >&5
12119 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
12120 if test "${cf_cv_dcl_errno+set}" = set; then
12121   echo $ECHO_N "(cached) $ECHO_C" >&6
12122 else
12123
12124     cat >conftest.$ac_ext <<_ACEOF
12125 #line 12125 "configure"
12126 #include "confdefs.h"
12127
12128 #ifdef HAVE_STDLIB_H
12129 #include <stdlib.h>
12130 #endif
12131 #include <stdio.h>
12132 #include <sys/types.h>
12133 #include <errno.h>
12134 int
12135 main ()
12136 {
12137 int x = (int) errno
12138   ;
12139   return 0;
12140 }
12141 _ACEOF
12142 rm -f conftest.$ac_objext
12143 if { (eval echo "$as_me:12143: \"$ac_compile\"") >&5
12144   (eval $ac_compile) 2>&5
12145   ac_status=$?
12146   echo "$as_me:12146: \$? = $ac_status" >&5
12147   (exit $ac_status); } &&
12148          { ac_try='test -s conftest.$ac_objext'
12149   { (eval echo "$as_me:12149: \"$ac_try\"") >&5
12150   (eval $ac_try) 2>&5
12151   ac_status=$?
12152   echo "$as_me:12152: \$? = $ac_status" >&5
12153   (exit $ac_status); }; }; then
12154   cf_cv_dcl_errno=yes
12155 else
12156   echo "$as_me: failed program was:" >&5
12157 cat conftest.$ac_ext >&5
12158 cf_cv_dcl_errno=no
12159 fi
12160 rm -f conftest.$ac_objext conftest.$ac_ext
12161
12162 fi
12163 echo "$as_me:12163: result: $cf_cv_dcl_errno" >&5
12164 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
12165
12166 if test "$cf_cv_dcl_errno" = no ; then
12167
12168 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12169
12170     cat >>confdefs.h <<EOF
12171 #define $cf_result 1
12172 EOF
12173
12174 fi
12175
12176 # It's possible (for near-UNIX clones) that the data doesn't exist
12177
12178 echo "$as_me:12178: checking if external errno exists" >&5
12179 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
12180 if test "${cf_cv_have_errno+set}" = set; then
12181   echo $ECHO_N "(cached) $ECHO_C" >&6
12182 else
12183
12184     cat >conftest.$ac_ext <<_ACEOF
12185 #line 12185 "configure"
12186 #include "confdefs.h"
12187
12188 #undef errno
12189 extern int errno;
12190
12191 int
12192 main ()
12193 {
12194 errno = 2
12195   ;
12196   return 0;
12197 }
12198 _ACEOF
12199 rm -f conftest.$ac_objext conftest$ac_exeext
12200 if { (eval echo "$as_me:12200: \"$ac_link\"") >&5
12201   (eval $ac_link) 2>&5
12202   ac_status=$?
12203   echo "$as_me:12203: \$? = $ac_status" >&5
12204   (exit $ac_status); } &&
12205          { ac_try='test -s conftest$ac_exeext'
12206   { (eval echo "$as_me:12206: \"$ac_try\"") >&5
12207   (eval $ac_try) 2>&5
12208   ac_status=$?
12209   echo "$as_me:12209: \$? = $ac_status" >&5
12210   (exit $ac_status); }; }; then
12211   cf_cv_have_errno=yes
12212 else
12213   echo "$as_me: failed program was:" >&5
12214 cat conftest.$ac_ext >&5
12215 cf_cv_have_errno=no
12216 fi
12217 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12218
12219 fi
12220 echo "$as_me:12220: result: $cf_cv_have_errno" >&5
12221 echo "${ECHO_T}$cf_cv_have_errno" >&6
12222
12223 if test "$cf_cv_have_errno" = yes ; then
12224
12225 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12226
12227     cat >>confdefs.h <<EOF
12228 #define $cf_result 1
12229 EOF
12230
12231 fi
12232
12233 echo "$as_me:12233: checking if data-only library module links" >&5
12234 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
12235 if test "${cf_cv_link_dataonly+set}" = set; then
12236   echo $ECHO_N "(cached) $ECHO_C" >&6
12237 else
12238
12239         rm -f conftest.a
12240         cat >conftest.$ac_ext <<EOF
12241 #line 12241 "configure"
12242 int     testdata[3] = { 123, 456, 789 };
12243 EOF
12244         if { (eval echo "$as_me:12244: \"$ac_compile\"") >&5
12245   (eval $ac_compile) 2>&5
12246   ac_status=$?
12247   echo "$as_me:12247: \$? = $ac_status" >&5
12248   (exit $ac_status); } ; then
12249                 mv conftest.o data.o && \
12250                 ( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
12251         fi
12252         rm -f conftest.$ac_ext data.o
12253         cat >conftest.$ac_ext <<EOF
12254 #line 12254 "configure"
12255 int     testfunc()
12256 {
12257 #if defined(NeXT)
12258         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
12259 #else
12260         extern int testdata[3];
12261         return testdata[0] == 123
12262            &&  testdata[1] == 456
12263            &&  testdata[2] == 789;
12264 #endif
12265 }
12266 EOF
12267         if { (eval echo "$as_me:12267: \"$ac_compile\"") >&5
12268   (eval $ac_compile) 2>&5
12269   ac_status=$?
12270   echo "$as_me:12270: \$? = $ac_status" >&5
12271   (exit $ac_status); }; then
12272                 mv conftest.o func.o && \
12273                 ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
12274         fi
12275         rm -f conftest.$ac_ext func.o
12276         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
12277         cf_saveLIBS="$LIBS"
12278         LIBS="conftest.a $LIBS"
12279         if test "$cross_compiling" = yes; then
12280   cf_cv_link_dataonly=unknown
12281 else
12282   cat >conftest.$ac_ext <<_ACEOF
12283 #line 12283 "configure"
12284 #include "confdefs.h"
12285
12286         int main()
12287         {
12288                 extern int testfunc();
12289                 ${cf_cv_main_return:-return} (!testfunc());
12290         }
12291
12292 _ACEOF
12293 rm -f conftest$ac_exeext
12294 if { (eval echo "$as_me:12294: \"$ac_link\"") >&5
12295   (eval $ac_link) 2>&5
12296   ac_status=$?
12297   echo "$as_me:12297: \$? = $ac_status" >&5
12298   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12299   { (eval echo "$as_me:12299: \"$ac_try\"") >&5
12300   (eval $ac_try) 2>&5
12301   ac_status=$?
12302   echo "$as_me:12302: \$? = $ac_status" >&5
12303   (exit $ac_status); }; }; then
12304   cf_cv_link_dataonly=yes
12305 else
12306   echo "$as_me: program exited with status $ac_status" >&5
12307 echo "$as_me: failed program was:" >&5
12308 cat conftest.$ac_ext >&5
12309 cf_cv_link_dataonly=no
12310 fi
12311 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12312 fi
12313         LIBS="$cf_saveLIBS"
12314
12315 fi
12316
12317 echo "$as_me:12317: result: $cf_cv_link_dataonly" >&5
12318 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
12319
12320 if test "$cf_cv_link_dataonly" = no ; then
12321         cat >>confdefs.h <<\EOF
12322 #define BROKEN_LINKER 1
12323 EOF
12324
12325         BROKEN_LINKER=1
12326 fi
12327
12328 ###     Checks for library functions.
12329
12330 for ac_func in \
12331 getcwd \
12332 getegid \
12333 geteuid \
12334 getttynam \
12335 issetugid \
12336 poll \
12337 remove \
12338 select \
12339 setbuf \
12340 setbuffer \
12341 setvbuf \
12342 sigaction \
12343 sigvec \
12344 strdup \
12345 strstr \
12346 tcgetpgrp \
12347 times \
12348 vsnprintf \
12349
12350 do
12351 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12352 echo "$as_me:12352: checking for $ac_func" >&5
12353 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12354 if eval "test \"\${$as_ac_var+set}\" = set"; then
12355   echo $ECHO_N "(cached) $ECHO_C" >&6
12356 else
12357   cat >conftest.$ac_ext <<_ACEOF
12358 #line 12358 "configure"
12359 #include "confdefs.h"
12360 /* System header to define __stub macros and hopefully few prototypes,
12361     which can conflict with char $ac_func (); below.  */
12362 #include <assert.h>
12363 /* Override any gcc2 internal prototype to avoid an error.  */
12364 #ifdef __cplusplus
12365 extern "C"
12366 #endif
12367 /* We use char because int might match the return type of a gcc2
12368    builtin and then its argument prototype would still apply.  */
12369 char $ac_func ();
12370 char (*f) ();
12371
12372 int
12373 main ()
12374 {
12375 /* The GNU C library defines this for functions which it implements
12376     to always fail with ENOSYS.  Some functions are actually named
12377     something starting with __ and the normal name is an alias.  */
12378 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12379 choke me
12380 #else
12381 f = $ac_func;
12382 #endif
12383
12384   ;
12385   return 0;
12386 }
12387 _ACEOF
12388 rm -f conftest.$ac_objext conftest$ac_exeext
12389 if { (eval echo "$as_me:12389: \"$ac_link\"") >&5
12390   (eval $ac_link) 2>&5
12391   ac_status=$?
12392   echo "$as_me:12392: \$? = $ac_status" >&5
12393   (exit $ac_status); } &&
12394          { ac_try='test -s conftest$ac_exeext'
12395   { (eval echo "$as_me:12395: \"$ac_try\"") >&5
12396   (eval $ac_try) 2>&5
12397   ac_status=$?
12398   echo "$as_me:12398: \$? = $ac_status" >&5
12399   (exit $ac_status); }; }; then
12400   eval "$as_ac_var=yes"
12401 else
12402   echo "$as_me: failed program was:" >&5
12403 cat conftest.$ac_ext >&5
12404 eval "$as_ac_var=no"
12405 fi
12406 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12407 fi
12408 echo "$as_me:12408: result: `eval echo '${'$as_ac_var'}'`" >&5
12409 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12410 if test `eval echo '${'$as_ac_var'}'` = yes; then
12411   cat >>confdefs.h <<EOF
12412 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12413 EOF
12414
12415 fi
12416 done
12417
12418 if test "$with_getcap" = "yes" ; then
12419
12420 echo "$as_me:12420: checking for terminal-capability database functions" >&5
12421 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
12422 if test "${cf_cv_cgetent+set}" = set; then
12423   echo $ECHO_N "(cached) $ECHO_C" >&6
12424 else
12425
12426 cat >conftest.$ac_ext <<_ACEOF
12427 #line 12427 "configure"
12428 #include "confdefs.h"
12429
12430 #include <stdlib.h>
12431 int
12432 main ()
12433 {
12434
12435         char temp[128];
12436         char *buf = temp;
12437         char *db_array = temp;
12438         cgetent(&buf, /* int *, */ &db_array, "vt100");
12439         cgetcap(buf, "tc", '=');
12440         cgetmatch(buf, "tc");
12441
12442   ;
12443   return 0;
12444 }
12445 _ACEOF
12446 rm -f conftest.$ac_objext conftest$ac_exeext
12447 if { (eval echo "$as_me:12447: \"$ac_link\"") >&5
12448   (eval $ac_link) 2>&5
12449   ac_status=$?
12450   echo "$as_me:12450: \$? = $ac_status" >&5
12451   (exit $ac_status); } &&
12452          { ac_try='test -s conftest$ac_exeext'
12453   { (eval echo "$as_me:12453: \"$ac_try\"") >&5
12454   (eval $ac_try) 2>&5
12455   ac_status=$?
12456   echo "$as_me:12456: \$? = $ac_status" >&5
12457   (exit $ac_status); }; }; then
12458   cf_cv_cgetent=yes
12459 else
12460   echo "$as_me: failed program was:" >&5
12461 cat conftest.$ac_ext >&5
12462 cf_cv_cgetent=no
12463 fi
12464 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12465
12466 fi
12467
12468 echo "$as_me:12468: result: $cf_cv_cgetent" >&5
12469 echo "${ECHO_T}$cf_cv_cgetent" >&6
12470 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
12471 #define HAVE_BSD_CGETENT 1
12472 EOF
12473
12474 fi
12475
12476 echo "$as_me:12476: checking for isascii" >&5
12477 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
12478 if test "${cf_cv_have_isascii+set}" = set; then
12479   echo $ECHO_N "(cached) $ECHO_C" >&6
12480 else
12481
12482         cat >conftest.$ac_ext <<_ACEOF
12483 #line 12483 "configure"
12484 #include "confdefs.h"
12485 #include <ctype.h>
12486 int
12487 main ()
12488 {
12489 int x = isascii(' ')
12490   ;
12491   return 0;
12492 }
12493 _ACEOF
12494 rm -f conftest.$ac_objext conftest$ac_exeext
12495 if { (eval echo "$as_me:12495: \"$ac_link\"") >&5
12496   (eval $ac_link) 2>&5
12497   ac_status=$?
12498   echo "$as_me:12498: \$? = $ac_status" >&5
12499   (exit $ac_status); } &&
12500          { ac_try='test -s conftest$ac_exeext'
12501   { (eval echo "$as_me:12501: \"$ac_try\"") >&5
12502   (eval $ac_try) 2>&5
12503   ac_status=$?
12504   echo "$as_me:12504: \$? = $ac_status" >&5
12505   (exit $ac_status); }; }; then
12506   cf_cv_have_isascii=yes
12507 else
12508   echo "$as_me: failed program was:" >&5
12509 cat conftest.$ac_ext >&5
12510 cf_cv_have_isascii=no
12511 fi
12512 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12513
12514 fi
12515 echo "$as_me:12515: result: $cf_cv_have_isascii" >&5
12516 echo "${ECHO_T}$cf_cv_have_isascii" >&6
12517 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
12518 #define HAVE_ISASCII 1
12519 EOF
12520
12521 if test "$ac_cv_func_sigaction" = yes; then
12522 echo "$as_me:12522: checking whether sigaction needs _POSIX_SOURCE" >&5
12523 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
12524 cat >conftest.$ac_ext <<_ACEOF
12525 #line 12525 "configure"
12526 #include "confdefs.h"
12527
12528 #include <sys/types.h>
12529 #include <signal.h>
12530 int
12531 main ()
12532 {
12533 struct sigaction act
12534   ;
12535   return 0;
12536 }
12537 _ACEOF
12538 rm -f conftest.$ac_objext
12539 if { (eval echo "$as_me:12539: \"$ac_compile\"") >&5
12540   (eval $ac_compile) 2>&5
12541   ac_status=$?
12542   echo "$as_me:12542: \$? = $ac_status" >&5
12543   (exit $ac_status); } &&
12544          { ac_try='test -s conftest.$ac_objext'
12545   { (eval echo "$as_me:12545: \"$ac_try\"") >&5
12546   (eval $ac_try) 2>&5
12547   ac_status=$?
12548   echo "$as_me:12548: \$? = $ac_status" >&5
12549   (exit $ac_status); }; }; then
12550   sigact_bad=no
12551 else
12552   echo "$as_me: failed program was:" >&5
12553 cat conftest.$ac_ext >&5
12554
12555 cat >conftest.$ac_ext <<_ACEOF
12556 #line 12556 "configure"
12557 #include "confdefs.h"
12558
12559 #define _POSIX_SOURCE
12560 #include <sys/types.h>
12561 #include <signal.h>
12562 int
12563 main ()
12564 {
12565 struct sigaction act
12566   ;
12567   return 0;
12568 }
12569 _ACEOF
12570 rm -f conftest.$ac_objext
12571 if { (eval echo "$as_me:12571: \"$ac_compile\"") >&5
12572   (eval $ac_compile) 2>&5
12573   ac_status=$?
12574   echo "$as_me:12574: \$? = $ac_status" >&5
12575   (exit $ac_status); } &&
12576          { ac_try='test -s conftest.$ac_objext'
12577   { (eval echo "$as_me:12577: \"$ac_try\"") >&5
12578   (eval $ac_try) 2>&5
12579   ac_status=$?
12580   echo "$as_me:12580: \$? = $ac_status" >&5
12581   (exit $ac_status); }; }; then
12582   sigact_bad=yes
12583          cat >>confdefs.h <<\EOF
12584 #define SVR4_ACTION 1
12585 EOF
12586
12587 else
12588   echo "$as_me: failed program was:" >&5
12589 cat conftest.$ac_ext >&5
12590 sigact_bad=unknown
12591 fi
12592 rm -f conftest.$ac_objext conftest.$ac_ext
12593 fi
12594 rm -f conftest.$ac_objext conftest.$ac_ext
12595 echo "$as_me:12595: result: $sigact_bad" >&5
12596 echo "${ECHO_T}$sigact_bad" >&6
12597 fi
12598
12599 echo "$as_me:12599: checking if nanosleep really works" >&5
12600 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
12601 if test "${cf_cv_func_nanosleep+set}" = set; then
12602   echo $ECHO_N "(cached) $ECHO_C" >&6
12603 else
12604
12605 if test "$cross_compiling" = yes; then
12606   cf_cv_func_nanosleep=unknown
12607 else
12608   cat >conftest.$ac_ext <<_ACEOF
12609 #line 12609 "configure"
12610 #include "confdefs.h"
12611
12612 #include <stdio.h>
12613 #include <errno.h>
12614 #include <time.h>
12615
12616 #ifdef HAVE_SYS_TIME_H
12617 #include <sys/time.h>
12618 #endif
12619
12620 int main() {
12621         struct timespec ts1, ts2;
12622         int code;
12623         ts1.tv_sec  = 0;
12624         ts1.tv_nsec = 750000000;
12625         ts2.tv_sec  = 0;
12626         ts2.tv_nsec = 0;
12627         errno = 0;
12628         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
12629         ${cf_cv_main_return:-return}(code != 0);
12630 }
12631
12632 _ACEOF
12633 rm -f conftest$ac_exeext
12634 if { (eval echo "$as_me:12634: \"$ac_link\"") >&5
12635   (eval $ac_link) 2>&5
12636   ac_status=$?
12637   echo "$as_me:12637: \$? = $ac_status" >&5
12638   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12639   { (eval echo "$as_me:12639: \"$ac_try\"") >&5
12640   (eval $ac_try) 2>&5
12641   ac_status=$?
12642   echo "$as_me:12642: \$? = $ac_status" >&5
12643   (exit $ac_status); }; }; then
12644   cf_cv_func_nanosleep=yes
12645 else
12646   echo "$as_me: program exited with status $ac_status" >&5
12647 echo "$as_me: failed program was:" >&5
12648 cat conftest.$ac_ext >&5
12649 cf_cv_func_nanosleep=no
12650 fi
12651 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12652 fi
12653 fi
12654 echo "$as_me:12654: result: $cf_cv_func_nanosleep" >&5
12655 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
12656
12657 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
12658 #define HAVE_NANOSLEEP 1
12659 EOF
12660
12661 for ac_header in \
12662 termio.h \
12663 termios.h \
12664 unistd.h \
12665
12666 do
12667 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12668 echo "$as_me:12668: checking for $ac_header" >&5
12669 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12670 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12671   echo $ECHO_N "(cached) $ECHO_C" >&6
12672 else
12673   cat >conftest.$ac_ext <<_ACEOF
12674 #line 12674 "configure"
12675 #include "confdefs.h"
12676 #include <$ac_header>
12677 _ACEOF
12678 if { (eval echo "$as_me:12678: \"$ac_cpp conftest.$ac_ext\"") >&5
12679   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12680   ac_status=$?
12681   egrep -v '^ *\+' conftest.er1 >conftest.err
12682   rm -f conftest.er1
12683   cat conftest.err >&5
12684   echo "$as_me:12684: \$? = $ac_status" >&5
12685   (exit $ac_status); } >/dev/null; then
12686   if test -s conftest.err; then
12687     ac_cpp_err=$ac_c_preproc_warn_flag
12688   else
12689     ac_cpp_err=
12690   fi
12691 else
12692   ac_cpp_err=yes
12693 fi
12694 if test -z "$ac_cpp_err"; then
12695   eval "$as_ac_Header=yes"
12696 else
12697   echo "$as_me: failed program was:" >&5
12698   cat conftest.$ac_ext >&5
12699   eval "$as_ac_Header=no"
12700 fi
12701 rm -f conftest.err conftest.$ac_ext
12702 fi
12703 echo "$as_me:12703: result: `eval echo '${'$as_ac_Header'}'`" >&5
12704 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12705 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12706   cat >>confdefs.h <<EOF
12707 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12708 EOF
12709
12710 fi
12711 done
12712
12713 if test "$ISC" = yes ; then
12714
12715 for ac_header in sys/termio.h
12716 do
12717 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12718 echo "$as_me:12718: checking for $ac_header" >&5
12719 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12720 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12721   echo $ECHO_N "(cached) $ECHO_C" >&6
12722 else
12723   cat >conftest.$ac_ext <<_ACEOF
12724 #line 12724 "configure"
12725 #include "confdefs.h"
12726 #include <$ac_header>
12727 _ACEOF
12728 if { (eval echo "$as_me:12728: \"$ac_cpp conftest.$ac_ext\"") >&5
12729   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12730   ac_status=$?
12731   egrep -v '^ *\+' conftest.er1 >conftest.err
12732   rm -f conftest.er1
12733   cat conftest.err >&5
12734   echo "$as_me:12734: \$? = $ac_status" >&5
12735   (exit $ac_status); } >/dev/null; then
12736   if test -s conftest.err; then
12737     ac_cpp_err=$ac_c_preproc_warn_flag
12738   else
12739     ac_cpp_err=
12740   fi
12741 else
12742   ac_cpp_err=yes
12743 fi
12744 if test -z "$ac_cpp_err"; then
12745   eval "$as_ac_Header=yes"
12746 else
12747   echo "$as_me: failed program was:" >&5
12748   cat conftest.$ac_ext >&5
12749   eval "$as_ac_Header=no"
12750 fi
12751 rm -f conftest.err conftest.$ac_ext
12752 fi
12753 echo "$as_me:12753: result: `eval echo '${'$as_ac_Header'}'`" >&5
12754 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12755 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12756   cat >>confdefs.h <<EOF
12757 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12758 EOF
12759
12760 fi
12761 done
12762
12763 fi
12764 if test "$ac_cv_header_termios_h" = yes ; then
12765         case "$CFLAGS $CPPFLAGS" in
12766         *-D_POSIX_SOURCE*)
12767                 termios_bad=dunno ;;
12768         *)      termios_bad=maybe ;;
12769         esac
12770         if test "$termios_bad" = maybe ; then
12771         echo "$as_me:12771: checking whether termios.h needs _POSIX_SOURCE" >&5
12772 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
12773         cat >conftest.$ac_ext <<_ACEOF
12774 #line 12774 "configure"
12775 #include "confdefs.h"
12776 #include <termios.h>
12777 int
12778 main ()
12779 {
12780 struct termios foo; int x = foo.c_iflag
12781   ;
12782   return 0;
12783 }
12784 _ACEOF
12785 rm -f conftest.$ac_objext
12786 if { (eval echo "$as_me:12786: \"$ac_compile\"") >&5
12787   (eval $ac_compile) 2>&5
12788   ac_status=$?
12789   echo "$as_me:12789: \$? = $ac_status" >&5
12790   (exit $ac_status); } &&
12791          { ac_try='test -s conftest.$ac_objext'
12792   { (eval echo "$as_me:12792: \"$ac_try\"") >&5
12793   (eval $ac_try) 2>&5
12794   ac_status=$?
12795   echo "$as_me:12795: \$? = $ac_status" >&5
12796   (exit $ac_status); }; }; then
12797   termios_bad=no
12798 else
12799   echo "$as_me: failed program was:" >&5
12800 cat conftest.$ac_ext >&5
12801
12802                 cat >conftest.$ac_ext <<_ACEOF
12803 #line 12803 "configure"
12804 #include "confdefs.h"
12805
12806 #define _POSIX_SOURCE
12807 #include <termios.h>
12808 int
12809 main ()
12810 {
12811 struct termios foo; int x = foo.c_iflag
12812   ;
12813   return 0;
12814 }
12815 _ACEOF
12816 rm -f conftest.$ac_objext
12817 if { (eval echo "$as_me:12817: \"$ac_compile\"") >&5
12818   (eval $ac_compile) 2>&5
12819   ac_status=$?
12820   echo "$as_me:12820: \$? = $ac_status" >&5
12821   (exit $ac_status); } &&
12822          { ac_try='test -s conftest.$ac_objext'
12823   { (eval echo "$as_me:12823: \"$ac_try\"") >&5
12824   (eval $ac_try) 2>&5
12825   ac_status=$?
12826   echo "$as_me:12826: \$? = $ac_status" >&5
12827   (exit $ac_status); }; }; then
12828   termios_bad=unknown
12829 else
12830   echo "$as_me: failed program was:" >&5
12831 cat conftest.$ac_ext >&5
12832 termios_bad=yes cat >>confdefs.h <<\EOF
12833 #define SVR4_TERMIO 1
12834 EOF
12835
12836 fi
12837 rm -f conftest.$ac_objext conftest.$ac_ext
12838
12839 fi
12840 rm -f conftest.$ac_objext conftest.$ac_ext
12841         echo "$as_me:12841: result: $termios_bad" >&5
12842 echo "${ECHO_T}$termios_bad" >&6
12843         fi
12844 fi
12845
12846 echo "$as_me:12846: checking for tcgetattr" >&5
12847 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
12848 if test "${cf_cv_have_tcgetattr+set}" = set; then
12849   echo $ECHO_N "(cached) $ECHO_C" >&6
12850 else
12851
12852 cat >conftest.$ac_ext <<_ACEOF
12853 #line 12853 "configure"
12854 #include "confdefs.h"
12855
12856 #include <sys/types.h>
12857 #ifdef HAVE_UNISTD_H
12858 #include <unistd.h>
12859 #endif
12860 #ifdef HAVE_TERMIOS_H
12861 #include <termios.h>
12862 #define TTY struct termios
12863 #else
12864 #ifdef HAVE_TERMIO_H
12865 #include <termio.h>
12866 #define TTY struct termio
12867 #endif
12868 #endif
12869
12870 int
12871 main ()
12872 {
12873
12874 TTY foo;
12875 tcgetattr(1, &foo);
12876   ;
12877   return 0;
12878 }
12879 _ACEOF
12880 rm -f conftest.$ac_objext conftest$ac_exeext
12881 if { (eval echo "$as_me:12881: \"$ac_link\"") >&5
12882   (eval $ac_link) 2>&5
12883   ac_status=$?
12884   echo "$as_me:12884: \$? = $ac_status" >&5
12885   (exit $ac_status); } &&
12886          { ac_try='test -s conftest$ac_exeext'
12887   { (eval echo "$as_me:12887: \"$ac_try\"") >&5
12888   (eval $ac_try) 2>&5
12889   ac_status=$?
12890   echo "$as_me:12890: \$? = $ac_status" >&5
12891   (exit $ac_status); }; }; then
12892   cf_cv_have_tcgetattr=yes
12893 else
12894   echo "$as_me: failed program was:" >&5
12895 cat conftest.$ac_ext >&5
12896 cf_cv_have_tcgetattr=no
12897 fi
12898 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12899 fi
12900 echo "$as_me:12900: result: $cf_cv_have_tcgetattr" >&5
12901 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
12902 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
12903 #define HAVE_TCGETATTR 1
12904 EOF
12905
12906 echo "$as_me:12906: checking for vsscanf function or workaround" >&5
12907 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
12908 if test "${cf_cv_func_vsscanf+set}" = set; then
12909   echo $ECHO_N "(cached) $ECHO_C" >&6
12910 else
12911
12912 cat >conftest.$ac_ext <<_ACEOF
12913 #line 12913 "configure"
12914 #include "confdefs.h"
12915
12916 #include <stdarg.h>
12917 #include <stdio.h>
12918 int
12919 main ()
12920 {
12921
12922         va_list ap;
12923         vsscanf("from", "%d", ap)
12924   ;
12925   return 0;
12926 }
12927 _ACEOF
12928 rm -f conftest.$ac_objext conftest$ac_exeext
12929 if { (eval echo "$as_me:12929: \"$ac_link\"") >&5
12930   (eval $ac_link) 2>&5
12931   ac_status=$?
12932   echo "$as_me:12932: \$? = $ac_status" >&5
12933   (exit $ac_status); } &&
12934          { ac_try='test -s conftest$ac_exeext'
12935   { (eval echo "$as_me:12935: \"$ac_try\"") >&5
12936   (eval $ac_try) 2>&5
12937   ac_status=$?
12938   echo "$as_me:12938: \$? = $ac_status" >&5
12939   (exit $ac_status); }; }; then
12940   cf_cv_func_vsscanf=vsscanf
12941 else
12942   echo "$as_me: failed program was:" >&5
12943 cat conftest.$ac_ext >&5
12944
12945 cat >conftest.$ac_ext <<_ACEOF
12946 #line 12946 "configure"
12947 #include "confdefs.h"
12948
12949 #include <stdarg.h>
12950 #include <stdio.h>
12951 int
12952 main ()
12953 {
12954
12955     FILE strbuf;
12956     char *str = "from";
12957
12958     strbuf._flag = _IOREAD;
12959     strbuf._ptr = strbuf._base = (unsigned char *) str;
12960     strbuf._cnt = strlen(str);
12961     strbuf._file = _NFILE;
12962     return (vfscanf(&strbuf, "%d", ap))
12963   ;
12964   return 0;
12965 }
12966 _ACEOF
12967 rm -f conftest.$ac_objext conftest$ac_exeext
12968 if { (eval echo "$as_me:12968: \"$ac_link\"") >&5
12969   (eval $ac_link) 2>&5
12970   ac_status=$?
12971   echo "$as_me:12971: \$? = $ac_status" >&5
12972   (exit $ac_status); } &&
12973          { ac_try='test -s conftest$ac_exeext'
12974   { (eval echo "$as_me:12974: \"$ac_try\"") >&5
12975   (eval $ac_try) 2>&5
12976   ac_status=$?
12977   echo "$as_me:12977: \$? = $ac_status" >&5
12978   (exit $ac_status); }; }; then
12979   cf_cv_func_vsscanf=vfscanf
12980 else
12981   echo "$as_me: failed program was:" >&5
12982 cat conftest.$ac_ext >&5
12983
12984 cat >conftest.$ac_ext <<_ACEOF
12985 #line 12985 "configure"
12986 #include "confdefs.h"
12987
12988 #include <stdarg.h>
12989 #include <stdio.h>
12990 int
12991 main ()
12992 {
12993
12994     FILE strbuf;
12995     char *str = "from";
12996
12997     strbuf._flag = _IOREAD;
12998     strbuf._ptr = strbuf._base = (unsigned char *) str;
12999     strbuf._cnt = strlen(str);
13000     strbuf._file = _NFILE;
13001     return (_doscan(&strbuf, "%d", ap))
13002   ;
13003   return 0;
13004 }
13005 _ACEOF
13006 rm -f conftest.$ac_objext conftest$ac_exeext
13007 if { (eval echo "$as_me:13007: \"$ac_link\"") >&5
13008   (eval $ac_link) 2>&5
13009   ac_status=$?
13010   echo "$as_me:13010: \$? = $ac_status" >&5
13011   (exit $ac_status); } &&
13012          { ac_try='test -s conftest$ac_exeext'
13013   { (eval echo "$as_me:13013: \"$ac_try\"") >&5
13014   (eval $ac_try) 2>&5
13015   ac_status=$?
13016   echo "$as_me:13016: \$? = $ac_status" >&5
13017   (exit $ac_status); }; }; then
13018   cf_cv_func_vsscanf=_doscan
13019 else
13020   echo "$as_me: failed program was:" >&5
13021 cat conftest.$ac_ext >&5
13022
13023 cf_cv_func_vsscanf=no
13024 fi
13025 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13026 fi
13027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13028 fi
13029 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13030 fi
13031 echo "$as_me:13031: result: $cf_cv_func_vsscanf" >&5
13032 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
13033
13034 case $cf_cv_func_vsscanf in #(vi
13035 vsscanf) cat >>confdefs.h <<\EOF
13036 #define HAVE_VSSCANF 1
13037 EOF
13038 ;; #(vi
13039 vfscanf) cat >>confdefs.h <<\EOF
13040 #define HAVE_VFSCANF 1
13041 EOF
13042 ;; #(vi
13043 _doscan) cat >>confdefs.h <<\EOF
13044 #define HAVE__DOSCAN 1
13045 EOF
13046 ;;
13047 esac
13048
13049 echo "$as_me:13049: checking for working mkstemp" >&5
13050 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
13051 if test "${cf_cv_func_mkstemp+set}" = set; then
13052   echo $ECHO_N "(cached) $ECHO_C" >&6
13053 else
13054
13055 rm -f conftest*
13056 if test "$cross_compiling" = yes; then
13057   echo "$as_me:13057: checking for mkstemp" >&5
13058 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
13059 if test "${ac_cv_func_mkstemp+set}" = set; then
13060   echo $ECHO_N "(cached) $ECHO_C" >&6
13061 else
13062   cat >conftest.$ac_ext <<_ACEOF
13063 #line 13063 "configure"
13064 #include "confdefs.h"
13065 /* System header to define __stub macros and hopefully few prototypes,
13066     which can conflict with char mkstemp (); below.  */
13067 #include <assert.h>
13068 /* Override any gcc2 internal prototype to avoid an error.  */
13069 #ifdef __cplusplus
13070 extern "C"
13071 #endif
13072 /* We use char because int might match the return type of a gcc2
13073    builtin and then its argument prototype would still apply.  */
13074 char mkstemp ();
13075 char (*f) ();
13076
13077 int
13078 main ()
13079 {
13080 /* The GNU C library defines this for functions which it implements
13081     to always fail with ENOSYS.  Some functions are actually named
13082     something starting with __ and the normal name is an alias.  */
13083 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
13084 choke me
13085 #else
13086 f = mkstemp;
13087 #endif
13088
13089   ;
13090   return 0;
13091 }
13092 _ACEOF
13093 rm -f conftest.$ac_objext conftest$ac_exeext
13094 if { (eval echo "$as_me:13094: \"$ac_link\"") >&5
13095   (eval $ac_link) 2>&5
13096   ac_status=$?
13097   echo "$as_me:13097: \$? = $ac_status" >&5
13098   (exit $ac_status); } &&
13099          { ac_try='test -s conftest$ac_exeext'
13100   { (eval echo "$as_me:13100: \"$ac_try\"") >&5
13101   (eval $ac_try) 2>&5
13102   ac_status=$?
13103   echo "$as_me:13103: \$? = $ac_status" >&5
13104   (exit $ac_status); }; }; then
13105   ac_cv_func_mkstemp=yes
13106 else
13107   echo "$as_me: failed program was:" >&5
13108 cat conftest.$ac_ext >&5
13109 ac_cv_func_mkstemp=no
13110 fi
13111 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13112 fi
13113 echo "$as_me:13113: result: $ac_cv_func_mkstemp" >&5
13114 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
13115
13116 else
13117   cat >conftest.$ac_ext <<_ACEOF
13118 #line 13118 "configure"
13119 #include "confdefs.h"
13120
13121 #include <sys/types.h>
13122 #include <stdlib.h>
13123 #include <stdio.h>
13124 #include <string.h>
13125 #include <sys/stat.h>
13126 int main()
13127 {
13128         char *tmpl = "conftestXXXXXX";
13129         char name[2][80];
13130         int n;
13131         int result = 0;
13132         int fd;
13133         struct stat sb;
13134
13135         umask(077);
13136         for (n = 0; n < 2; ++n) {
13137                 strcpy(name[n], tmpl);
13138                 if ((fd = mkstemp(name[n])) >= 0) {
13139                         if (!strcmp(name[n], tmpl)
13140                          || stat(name[n], &sb) != 0
13141                          || (sb.st_mode & S_IFMT) != S_IFREG
13142                          || (sb.st_mode & 077) != 0) {
13143                                 result = 1;
13144                         }
13145                         close(fd);
13146                 }
13147         }
13148         if (result == 0
13149          && !strcmp(name[0], name[1]))
13150                 result = 1;
13151         ${cf_cv_main_return:-return}(result);
13152 }
13153
13154 _ACEOF
13155 rm -f conftest$ac_exeext
13156 if { (eval echo "$as_me:13156: \"$ac_link\"") >&5
13157   (eval $ac_link) 2>&5
13158   ac_status=$?
13159   echo "$as_me:13159: \$? = $ac_status" >&5
13160   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13161   { (eval echo "$as_me:13161: \"$ac_try\"") >&5
13162   (eval $ac_try) 2>&5
13163   ac_status=$?
13164   echo "$as_me:13164: \$? = $ac_status" >&5
13165   (exit $ac_status); }; }; then
13166   cf_cv_func_mkstemp=yes
13167
13168 else
13169   echo "$as_me: program exited with status $ac_status" >&5
13170 echo "$as_me: failed program was:" >&5
13171 cat conftest.$ac_ext >&5
13172 cf_cv_func_mkstemp=no
13173
13174 fi
13175 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13176 fi
13177
13178 fi
13179 echo "$as_me:13179: result: $cf_cv_func_mkstemp" >&5
13180 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
13181 if test "$cf_cv_func_mkstemp" = yes ; then
13182         cat >>confdefs.h <<\EOF
13183 #define HAVE_MKSTEMP 1
13184 EOF
13185
13186 fi
13187
13188 # setup for prototype of fallback for vsscanf()
13189
13190 if test "$cf_cv_func_vsscanf" = vsscanf ; then
13191         HAVE_VSSCANF=1
13192 else
13193         HAVE_VSSCANF=0
13194 fi
13195
13196 if test "$cross_compiling" = yes ; then
13197         { echo "$as_me:13197: WARNING: cross compiling: assume setvbuf params not reversed" >&5
13198 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
13199 else
13200         echo "$as_me:13200: checking whether setvbuf arguments are reversed" >&5
13201 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
13202 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
13203   echo $ECHO_N "(cached) $ECHO_C" >&6
13204 else
13205   if test "$cross_compiling" = yes; then
13206   { { echo "$as_me:13206: error: cannot run test program while cross compiling" >&5
13207 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13208    { (exit 1); exit 1; }; }
13209 else
13210   cat >conftest.$ac_ext <<_ACEOF
13211 #line 13211 "configure"
13212 #include "confdefs.h"
13213 #include <stdio.h>
13214 /* If setvbuf has the reversed format, exit 0. */
13215 int
13216 main ()
13217 {
13218   /* This call has the arguments reversed.
13219      A reversed system may check and see that the address of main
13220      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
13221   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
13222     $ac_main_return(1);
13223   putc('\r', stdout);
13224   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
13225 }
13226 _ACEOF
13227 rm -f conftest$ac_exeext
13228 if { (eval echo "$as_me:13228: \"$ac_link\"") >&5
13229   (eval $ac_link) 2>&5
13230   ac_status=$?
13231   echo "$as_me:13231: \$? = $ac_status" >&5
13232   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13233   { (eval echo "$as_me:13233: \"$ac_try\"") >&5
13234   (eval $ac_try) 2>&5
13235   ac_status=$?
13236   echo "$as_me:13236: \$? = $ac_status" >&5
13237   (exit $ac_status); }; }; then
13238   ac_cv_func_setvbuf_reversed=yes
13239 else
13240   echo "$as_me: program exited with status $ac_status" >&5
13241 echo "$as_me: failed program was:" >&5
13242 cat conftest.$ac_ext >&5
13243 ac_cv_func_setvbuf_reversed=no
13244 fi
13245 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13246 fi
13247 rm -f core core.* *.core
13248 fi
13249 echo "$as_me:13249: result: $ac_cv_func_setvbuf_reversed" >&5
13250 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
13251 if test $ac_cv_func_setvbuf_reversed = yes; then
13252
13253 cat >>confdefs.h <<\EOF
13254 #define SETVBUF_REVERSED 1
13255 EOF
13256
13257 fi
13258
13259 fi
13260 echo "$as_me:13260: checking return type of signal handlers" >&5
13261 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
13262 if test "${ac_cv_type_signal+set}" = set; then
13263   echo $ECHO_N "(cached) $ECHO_C" >&6
13264 else
13265   cat >conftest.$ac_ext <<_ACEOF
13266 #line 13266 "configure"
13267 #include "confdefs.h"
13268 #include <sys/types.h>
13269 #include <signal.h>
13270 #ifdef signal
13271 # undef signal
13272 #endif
13273 #ifdef __cplusplus
13274 extern "C" void (*signal (int, void (*)(int)))(int);
13275 #else
13276 void (*signal ()) ();
13277 #endif
13278
13279 int
13280 main ()
13281 {
13282 int i;
13283   ;
13284   return 0;
13285 }
13286 _ACEOF
13287 rm -f conftest.$ac_objext
13288 if { (eval echo "$as_me:13288: \"$ac_compile\"") >&5
13289   (eval $ac_compile) 2>&5
13290   ac_status=$?
13291   echo "$as_me:13291: \$? = $ac_status" >&5
13292   (exit $ac_status); } &&
13293          { ac_try='test -s conftest.$ac_objext'
13294   { (eval echo "$as_me:13294: \"$ac_try\"") >&5
13295   (eval $ac_try) 2>&5
13296   ac_status=$?
13297   echo "$as_me:13297: \$? = $ac_status" >&5
13298   (exit $ac_status); }; }; then
13299   ac_cv_type_signal=void
13300 else
13301   echo "$as_me: failed program was:" >&5
13302 cat conftest.$ac_ext >&5
13303 ac_cv_type_signal=int
13304 fi
13305 rm -f conftest.$ac_objext conftest.$ac_ext
13306 fi
13307 echo "$as_me:13307: result: $ac_cv_type_signal" >&5
13308 echo "${ECHO_T}$ac_cv_type_signal" >&6
13309
13310 cat >>confdefs.h <<EOF
13311 #define RETSIGTYPE $ac_cv_type_signal
13312 EOF
13313
13314 echo "$as_me:13314: checking for type sigaction_t" >&5
13315 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
13316 if test "${cf_cv_type_sigaction+set}" = set; then
13317   echo $ECHO_N "(cached) $ECHO_C" >&6
13318 else
13319
13320         cat >conftest.$ac_ext <<_ACEOF
13321 #line 13321 "configure"
13322 #include "confdefs.h"
13323
13324 #include <signal.h>
13325 int
13326 main ()
13327 {
13328 sigaction_t x
13329   ;
13330   return 0;
13331 }
13332 _ACEOF
13333 rm -f conftest.$ac_objext
13334 if { (eval echo "$as_me:13334: \"$ac_compile\"") >&5
13335   (eval $ac_compile) 2>&5
13336   ac_status=$?
13337   echo "$as_me:13337: \$? = $ac_status" >&5
13338   (exit $ac_status); } &&
13339          { ac_try='test -s conftest.$ac_objext'
13340   { (eval echo "$as_me:13340: \"$ac_try\"") >&5
13341   (eval $ac_try) 2>&5
13342   ac_status=$?
13343   echo "$as_me:13343: \$? = $ac_status" >&5
13344   (exit $ac_status); }; }; then
13345   cf_cv_type_sigaction=yes
13346 else
13347   echo "$as_me: failed program was:" >&5
13348 cat conftest.$ac_ext >&5
13349 cf_cv_type_sigaction=no
13350 fi
13351 rm -f conftest.$ac_objext conftest.$ac_ext
13352 fi
13353
13354 echo "$as_me:13354: result: $cf_cv_type_sigaction" >&5
13355 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
13356 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
13357 #define HAVE_TYPE_SIGACTION 1
13358 EOF
13359
13360 echo "$as_me:13360: checking declaration of size-change" >&5
13361 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
13362 if test "${cf_cv_sizechange+set}" = set; then
13363   echo $ECHO_N "(cached) $ECHO_C" >&6
13364 else
13365
13366     cf_cv_sizechange=unknown
13367     cf_save_CPPFLAGS="$CPPFLAGS"
13368
13369 for cf_opts in "" "NEED_PTEM_H"
13370 do
13371
13372     CPPFLAGS="$cf_save_CPPFLAGS"
13373     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
13374     cat >conftest.$ac_ext <<_ACEOF
13375 #line 13375 "configure"
13376 #include "confdefs.h"
13377 #include <sys/types.h>
13378 #ifdef HAVE_TERMIOS_H
13379 #include <termios.h>
13380 #else
13381 #ifdef HAVE_TERMIO_H
13382 #include <termio.h>
13383 #endif
13384 #endif
13385 #ifdef NEED_PTEM_H
13386 /* This is a workaround for SCO:  they neglected to define struct winsize in
13387  * termios.h -- it's only in termio.h and ptem.h
13388  */
13389 #include        <sys/stream.h>
13390 #include        <sys/ptem.h>
13391 #endif
13392 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
13393 #include <sys/ioctl.h>
13394 #endif
13395
13396 int
13397 main ()
13398 {
13399
13400 #ifdef TIOCGSIZE
13401         struct ttysize win;     /* FIXME: what system is this? */
13402         int y = win.ts_lines;
13403         int x = win.ts_cols;
13404 #else
13405 #ifdef TIOCGWINSZ
13406         struct winsize win;
13407         int y = win.ws_row;
13408         int x = win.ws_col;
13409 #else
13410         no TIOCGSIZE or TIOCGWINSZ
13411 #endif /* TIOCGWINSZ */
13412 #endif /* TIOCGSIZE */
13413
13414   ;
13415   return 0;
13416 }
13417 _ACEOF
13418 rm -f conftest.$ac_objext
13419 if { (eval echo "$as_me:13419: \"$ac_compile\"") >&5
13420   (eval $ac_compile) 2>&5
13421   ac_status=$?
13422   echo "$as_me:13422: \$? = $ac_status" >&5
13423   (exit $ac_status); } &&
13424          { ac_try='test -s conftest.$ac_objext'
13425   { (eval echo "$as_me:13425: \"$ac_try\"") >&5
13426   (eval $ac_try) 2>&5
13427   ac_status=$?
13428   echo "$as_me:13428: \$? = $ac_status" >&5
13429   (exit $ac_status); }; }; then
13430   cf_cv_sizechange=yes
13431 else
13432   echo "$as_me: failed program was:" >&5
13433 cat conftest.$ac_ext >&5
13434 cf_cv_sizechange=no
13435 fi
13436 rm -f conftest.$ac_objext conftest.$ac_ext
13437
13438         CPPFLAGS="$cf_save_CPPFLAGS"
13439         if test "$cf_cv_sizechange" = yes ; then
13440                 echo "size-change succeeded ($cf_opts)" >&5
13441                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
13442                 break
13443         fi
13444 done
13445
13446 fi
13447 echo "$as_me:13447: result: $cf_cv_sizechange" >&5
13448 echo "${ECHO_T}$cf_cv_sizechange" >&6
13449 if test "$cf_cv_sizechange" != no ; then
13450         cat >>confdefs.h <<\EOF
13451 #define HAVE_SIZECHANGE 1
13452 EOF
13453
13454         case $cf_cv_sizechange in #(vi
13455         NEED*)
13456                 cat >>confdefs.h <<EOF
13457 #define $cf_cv_sizechange  1
13458 EOF
13459
13460                 ;;
13461         esac
13462 fi
13463
13464 echo "$as_me:13464: checking for memmove" >&5
13465 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
13466 if test "${ac_cv_func_memmove+set}" = set; then
13467   echo $ECHO_N "(cached) $ECHO_C" >&6
13468 else
13469   cat >conftest.$ac_ext <<_ACEOF
13470 #line 13470 "configure"
13471 #include "confdefs.h"
13472 /* System header to define __stub macros and hopefully few prototypes,
13473     which can conflict with char memmove (); below.  */
13474 #include <assert.h>
13475 /* Override any gcc2 internal prototype to avoid an error.  */
13476 #ifdef __cplusplus
13477 extern "C"
13478 #endif
13479 /* We use char because int might match the return type of a gcc2
13480    builtin and then its argument prototype would still apply.  */
13481 char memmove ();
13482 char (*f) ();
13483
13484 int
13485 main ()
13486 {
13487 /* The GNU C library defines this for functions which it implements
13488     to always fail with ENOSYS.  Some functions are actually named
13489     something starting with __ and the normal name is an alias.  */
13490 #if defined (__stub_memmove) || defined (__stub___memmove)
13491 choke me
13492 #else
13493 f = memmove;
13494 #endif
13495
13496   ;
13497   return 0;
13498 }
13499 _ACEOF
13500 rm -f conftest.$ac_objext conftest$ac_exeext
13501 if { (eval echo "$as_me:13501: \"$ac_link\"") >&5
13502   (eval $ac_link) 2>&5
13503   ac_status=$?
13504   echo "$as_me:13504: \$? = $ac_status" >&5
13505   (exit $ac_status); } &&
13506          { ac_try='test -s conftest$ac_exeext'
13507   { (eval echo "$as_me:13507: \"$ac_try\"") >&5
13508   (eval $ac_try) 2>&5
13509   ac_status=$?
13510   echo "$as_me:13510: \$? = $ac_status" >&5
13511   (exit $ac_status); }; }; then
13512   ac_cv_func_memmove=yes
13513 else
13514   echo "$as_me: failed program was:" >&5
13515 cat conftest.$ac_ext >&5
13516 ac_cv_func_memmove=no
13517 fi
13518 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13519 fi
13520 echo "$as_me:13520: result: $ac_cv_func_memmove" >&5
13521 echo "${ECHO_T}$ac_cv_func_memmove" >&6
13522 if test $ac_cv_func_memmove = yes; then
13523   :
13524 else
13525
13526 echo "$as_me:13526: checking for bcopy" >&5
13527 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
13528 if test "${ac_cv_func_bcopy+set}" = set; then
13529   echo $ECHO_N "(cached) $ECHO_C" >&6
13530 else
13531   cat >conftest.$ac_ext <<_ACEOF
13532 #line 13532 "configure"
13533 #include "confdefs.h"
13534 /* System header to define __stub macros and hopefully few prototypes,
13535     which can conflict with char bcopy (); below.  */
13536 #include <assert.h>
13537 /* Override any gcc2 internal prototype to avoid an error.  */
13538 #ifdef __cplusplus
13539 extern "C"
13540 #endif
13541 /* We use char because int might match the return type of a gcc2
13542    builtin and then its argument prototype would still apply.  */
13543 char bcopy ();
13544 char (*f) ();
13545
13546 int
13547 main ()
13548 {
13549 /* The GNU C library defines this for functions which it implements
13550     to always fail with ENOSYS.  Some functions are actually named
13551     something starting with __ and the normal name is an alias.  */
13552 #if defined (__stub_bcopy) || defined (__stub___bcopy)
13553 choke me
13554 #else
13555 f = bcopy;
13556 #endif
13557
13558   ;
13559   return 0;
13560 }
13561 _ACEOF
13562 rm -f conftest.$ac_objext conftest$ac_exeext
13563 if { (eval echo "$as_me:13563: \"$ac_link\"") >&5
13564   (eval $ac_link) 2>&5
13565   ac_status=$?
13566   echo "$as_me:13566: \$? = $ac_status" >&5
13567   (exit $ac_status); } &&
13568          { ac_try='test -s conftest$ac_exeext'
13569   { (eval echo "$as_me:13569: \"$ac_try\"") >&5
13570   (eval $ac_try) 2>&5
13571   ac_status=$?
13572   echo "$as_me:13572: \$? = $ac_status" >&5
13573   (exit $ac_status); }; }; then
13574   ac_cv_func_bcopy=yes
13575 else
13576   echo "$as_me: failed program was:" >&5
13577 cat conftest.$ac_ext >&5
13578 ac_cv_func_bcopy=no
13579 fi
13580 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13581 fi
13582 echo "$as_me:13582: result: $ac_cv_func_bcopy" >&5
13583 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
13584 if test $ac_cv_func_bcopy = yes; then
13585
13586         echo "$as_me:13586: checking if bcopy does overlapping moves" >&5
13587 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
13588 if test "${cf_cv_good_bcopy+set}" = set; then
13589   echo $ECHO_N "(cached) $ECHO_C" >&6
13590 else
13591
13592                 if test "$cross_compiling" = yes; then
13593   cf_cv_good_bcopy=unknown
13594 else
13595   cat >conftest.$ac_ext <<_ACEOF
13596 #line 13596 "configure"
13597 #include "confdefs.h"
13598
13599 int main() {
13600         static char data[] = "abcdefghijklmnopqrstuwwxyz";
13601         char temp[40];
13602         bcopy(data, temp, sizeof(data));
13603         bcopy(temp+10, temp, 15);
13604         bcopy(temp+5, temp+15, 10);
13605         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
13606 }
13607
13608 _ACEOF
13609 rm -f conftest$ac_exeext
13610 if { (eval echo "$as_me:13610: \"$ac_link\"") >&5
13611   (eval $ac_link) 2>&5
13612   ac_status=$?
13613   echo "$as_me:13613: \$? = $ac_status" >&5
13614   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13615   { (eval echo "$as_me:13615: \"$ac_try\"") >&5
13616   (eval $ac_try) 2>&5
13617   ac_status=$?
13618   echo "$as_me:13618: \$? = $ac_status" >&5
13619   (exit $ac_status); }; }; then
13620   cf_cv_good_bcopy=yes
13621 else
13622   echo "$as_me: program exited with status $ac_status" >&5
13623 echo "$as_me: failed program was:" >&5
13624 cat conftest.$ac_ext >&5
13625 cf_cv_good_bcopy=no
13626 fi
13627 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13628 fi
13629
13630 fi
13631 echo "$as_me:13631: result: $cf_cv_good_bcopy" >&5
13632 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
13633
13634 else
13635   cf_cv_good_bcopy=no
13636 fi
13637
13638         if test "$cf_cv_good_bcopy" = yes ; then
13639                 cat >>confdefs.h <<\EOF
13640 #define USE_OK_BCOPY 1
13641 EOF
13642
13643         else
13644                 cat >>confdefs.h <<\EOF
13645 #define USE_MY_MEMMOVE 1
13646 EOF
13647
13648         fi
13649
13650 fi
13651
13652 echo "$as_me:13652: checking if poll really works" >&5
13653 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
13654 if test "${cf_cv_working_poll+set}" = set; then
13655   echo $ECHO_N "(cached) $ECHO_C" >&6
13656 else
13657
13658 if test "$cross_compiling" = yes; then
13659   cf_cv_working_poll=unknown
13660 else
13661   cat >conftest.$ac_ext <<_ACEOF
13662 #line 13662 "configure"
13663 #include "confdefs.h"
13664
13665 #include <stdio.h>
13666 #ifdef HAVE_POLL_H
13667 #include <poll.h>
13668 #else
13669 #include <sys/poll.h>
13670 #endif
13671 int main() {
13672         struct pollfd myfds;
13673         int ret;
13674
13675         myfds.fd = 0;
13676         myfds.events = POLLIN;
13677
13678         ret = poll(&myfds, 1, 100);
13679         ${cf_cv_main_return:-return}(ret != 0);
13680 }
13681 _ACEOF
13682 rm -f conftest$ac_exeext
13683 if { (eval echo "$as_me:13683: \"$ac_link\"") >&5
13684   (eval $ac_link) 2>&5
13685   ac_status=$?
13686   echo "$as_me:13686: \$? = $ac_status" >&5
13687   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13688   { (eval echo "$as_me:13688: \"$ac_try\"") >&5
13689   (eval $ac_try) 2>&5
13690   ac_status=$?
13691   echo "$as_me:13691: \$? = $ac_status" >&5
13692   (exit $ac_status); }; }; then
13693   cf_cv_working_poll=yes
13694 else
13695   echo "$as_me: program exited with status $ac_status" >&5
13696 echo "$as_me: failed program was:" >&5
13697 cat conftest.$ac_ext >&5
13698 cf_cv_working_poll=no
13699 fi
13700 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13701 fi
13702 fi
13703 echo "$as_me:13703: result: $cf_cv_working_poll" >&5
13704 echo "${ECHO_T}$cf_cv_working_poll" >&6
13705 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
13706 #define HAVE_WORKING_POLL 1
13707 EOF
13708
13709 # special check for test/ditto.c
13710
13711 echo "$as_me:13711: checking for openpty in -lutil" >&5
13712 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
13713 if test "${ac_cv_lib_util_openpty+set}" = set; then
13714   echo $ECHO_N "(cached) $ECHO_C" >&6
13715 else
13716   ac_check_lib_save_LIBS=$LIBS
13717 LIBS="-lutil  $LIBS"
13718 cat >conftest.$ac_ext <<_ACEOF
13719 #line 13719 "configure"
13720 #include "confdefs.h"
13721
13722 /* Override any gcc2 internal prototype to avoid an error.  */
13723 #ifdef __cplusplus
13724 extern "C"
13725 #endif
13726 /* We use char because int might match the return type of a gcc2
13727    builtin and then its argument prototype would still apply.  */
13728 char openpty ();
13729 int
13730 main ()
13731 {
13732 openpty ();
13733   ;
13734   return 0;
13735 }
13736 _ACEOF
13737 rm -f conftest.$ac_objext conftest$ac_exeext
13738 if { (eval echo "$as_me:13738: \"$ac_link\"") >&5
13739   (eval $ac_link) 2>&5
13740   ac_status=$?
13741   echo "$as_me:13741: \$? = $ac_status" >&5
13742   (exit $ac_status); } &&
13743          { ac_try='test -s conftest$ac_exeext'
13744   { (eval echo "$as_me:13744: \"$ac_try\"") >&5
13745   (eval $ac_try) 2>&5
13746   ac_status=$?
13747   echo "$as_me:13747: \$? = $ac_status" >&5
13748   (exit $ac_status); }; }; then
13749   ac_cv_lib_util_openpty=yes
13750 else
13751   echo "$as_me: failed program was:" >&5
13752 cat conftest.$ac_ext >&5
13753 ac_cv_lib_util_openpty=no
13754 fi
13755 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13756 LIBS=$ac_check_lib_save_LIBS
13757 fi
13758 echo "$as_me:13758: result: $ac_cv_lib_util_openpty" >&5
13759 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
13760 if test $ac_cv_lib_util_openpty = yes; then
13761   cf_cv_lib_util=yes
13762 else
13763   cf_cv_lib_util=no
13764 fi
13765
13766 echo "$as_me:13766: checking for openpty header" >&5
13767 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
13768 if test "${cf_cv_func_openpty+set}" = set; then
13769   echo $ECHO_N "(cached) $ECHO_C" >&6
13770 else
13771
13772     cf_save_LIBS="$LIBS"
13773     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
13774     for cf_header in pty.h libutil.h util.h
13775     do
13776     cat >conftest.$ac_ext <<_ACEOF
13777 #line 13777 "configure"
13778 #include "confdefs.h"
13779
13780 #include <$cf_header>
13781
13782 int
13783 main ()
13784 {
13785
13786     int x = openpty((int *)0, (int *)0, (char *)0,
13787                    (struct termios *)0, (struct winsize *)0);
13788
13789   ;
13790   return 0;
13791 }
13792 _ACEOF
13793 rm -f conftest.$ac_objext conftest$ac_exeext
13794 if { (eval echo "$as_me:13794: \"$ac_link\"") >&5
13795   (eval $ac_link) 2>&5
13796   ac_status=$?
13797   echo "$as_me:13797: \$? = $ac_status" >&5
13798   (exit $ac_status); } &&
13799          { ac_try='test -s conftest$ac_exeext'
13800   { (eval echo "$as_me:13800: \"$ac_try\"") >&5
13801   (eval $ac_try) 2>&5
13802   ac_status=$?
13803   echo "$as_me:13803: \$? = $ac_status" >&5
13804   (exit $ac_status); }; }; then
13805
13806         cf_cv_func_openpty=$cf_header
13807         break
13808
13809 else
13810   echo "$as_me: failed program was:" >&5
13811 cat conftest.$ac_ext >&5
13812
13813         cf_cv_func_openpty=no
13814
13815 fi
13816 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13817     done
13818     LIBS="$cf_save_LIBS"
13819
13820 fi
13821 echo "$as_me:13821: result: $cf_cv_func_openpty" >&5
13822 echo "${ECHO_T}$cf_cv_func_openpty" >&6
13823
13824 if test "$cf_cv_func_openpty" != no ; then
13825     cat >>confdefs.h <<EOF
13826 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
13827 EOF
13828
13829     cat >>confdefs.h <<\EOF
13830 #define USE_XTERM_PTY 1
13831 EOF
13832
13833     if test "$cf_cv_lib_util" = yes ; then
13834         TEST_LIBS="-lutil $TEST_LIBS"
13835     fi
13836 fi
13837
13838 if test "$with_hashed_db" != no ; then
13839         cat >>confdefs.h <<\EOF
13840 #define USE_HASHED_DB 1
13841 EOF
13842
13843 case $with_hashed_db in #(vi
13844 yes|*able*) #(vi
13845     ;;
13846 *)
13847     if test -d "$with_hashed_db" ; then
13848
13849 if test -n "$with_hashed_db/include" ; then
13850   for cf_add_incdir in $with_hashed_db/include
13851   do
13852         while test $cf_add_incdir != /usr/include
13853         do
13854           if test -d $cf_add_incdir
13855           then
13856                 cf_have_incdir=no
13857                 if test -n "$CFLAGS$CPPFLAGS" ; then
13858                   # a loop is needed to ensure we can add subdirs of existing dirs
13859                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13860                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13861                           cf_have_incdir=yes; break
13862                         fi
13863                   done
13864                 fi
13865
13866                 if test "$cf_have_incdir" = no ; then
13867           if test "$cf_add_incdir" = /usr/local/include ; then
13868                         if test "$GCC" = yes
13869                         then
13870                           cf_save_CPPFLAGS=$CPPFLAGS
13871                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13872                           cat >conftest.$ac_ext <<_ACEOF
13873 #line 13873 "configure"
13874 #include "confdefs.h"
13875 #include <stdio.h>
13876 int
13877 main ()
13878 {
13879 printf("Hello")
13880   ;
13881   return 0;
13882 }
13883 _ACEOF
13884 rm -f conftest.$ac_objext
13885 if { (eval echo "$as_me:13885: \"$ac_compile\"") >&5
13886   (eval $ac_compile) 2>&5
13887   ac_status=$?
13888   echo "$as_me:13888: \$? = $ac_status" >&5
13889   (exit $ac_status); } &&
13890          { ac_try='test -s conftest.$ac_objext'
13891   { (eval echo "$as_me:13891: \"$ac_try\"") >&5
13892   (eval $ac_try) 2>&5
13893   ac_status=$?
13894   echo "$as_me:13894: \$? = $ac_status" >&5
13895   (exit $ac_status); }; }; then
13896   :
13897 else
13898   echo "$as_me: failed program was:" >&5
13899 cat conftest.$ac_ext >&5
13900 cf_have_incdir=yes
13901 fi
13902 rm -f conftest.$ac_objext conftest.$ac_ext
13903                           CPPFLAGS=$cf_save_CPPFLAGS
13904                         fi
13905                   fi
13906                 fi
13907
13908                 if test "$cf_have_incdir" = no ; then
13909                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
13910
13911 echo "${as_me-configure}:13911: testing adding $cf_add_incdir to include-path ..." 1>&5
13912
13913                   CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
13914
13915           cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
13916           test "$cf_top_incdir" = "$cf_add_incdir" && break
13917           cf_add_incdir="$cf_top_incdir"
13918                 else
13919                   break
13920                 fi
13921           fi
13922         done
13923   done
13924 fi
13925
13926 if test -n "$with_hashed_db/lib" ; then
13927   for cf_add_libdir in $with_hashed_db/lib
13928   do
13929     if test $cf_add_libdir = /usr/lib ; then
13930       :
13931     elif test -d $cf_add_libdir
13932     then
13933       cf_have_libdir=no
13934       if test -n "$LDFLAGS$LIBS" ; then
13935         # a loop is needed to ensure we can add subdirs of existing dirs
13936         for cf_test_libdir in $LDFLAGS $LIBS ; do
13937           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13938             cf_have_libdir=yes; break
13939           fi
13940         done
13941       fi
13942       if test "$cf_have_libdir" = no ; then
13943         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
13944
13945 echo "${as_me-configure}:13945: testing adding $cf_add_libdir to library-path ..." 1>&5
13946
13947         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13948       fi
13949     fi
13950   done
13951 fi
13952
13953     fi
13954 esac
13955
13956 echo "$as_me:13956: checking for db.h" >&5
13957 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
13958 if test "${ac_cv_header_db_h+set}" = set; then
13959   echo $ECHO_N "(cached) $ECHO_C" >&6
13960 else
13961   cat >conftest.$ac_ext <<_ACEOF
13962 #line 13962 "configure"
13963 #include "confdefs.h"
13964 #include <db.h>
13965 _ACEOF
13966 if { (eval echo "$as_me:13966: \"$ac_cpp conftest.$ac_ext\"") >&5
13967   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13968   ac_status=$?
13969   egrep -v '^ *\+' conftest.er1 >conftest.err
13970   rm -f conftest.er1
13971   cat conftest.err >&5
13972   echo "$as_me:13972: \$? = $ac_status" >&5
13973   (exit $ac_status); } >/dev/null; then
13974   if test -s conftest.err; then
13975     ac_cpp_err=$ac_c_preproc_warn_flag
13976   else
13977     ac_cpp_err=
13978   fi
13979 else
13980   ac_cpp_err=yes
13981 fi
13982 if test -z "$ac_cpp_err"; then
13983   ac_cv_header_db_h=yes
13984 else
13985   echo "$as_me: failed program was:" >&5
13986   cat conftest.$ac_ext >&5
13987   ac_cv_header_db_h=no
13988 fi
13989 rm -f conftest.err conftest.$ac_ext
13990 fi
13991 echo "$as_me:13991: result: $ac_cv_header_db_h" >&5
13992 echo "${ECHO_T}$ac_cv_header_db_h" >&6
13993 if test $ac_cv_header_db_h = yes; then
13994
13995 echo "$as_me:13995: checking for version of db" >&5
13996 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
13997 if test "${cf_cv_hashed_db_version+set}" = set; then
13998   echo $ECHO_N "(cached) $ECHO_C" >&6
13999 else
14000
14001 cf_cv_hashed_db_version=unknown
14002
14003 for cf_db_version in 1 2 3 4 5
14004 do
14005
14006 echo "${as_me-configure}:14006: testing checking for db version $cf_db_version ..." 1>&5
14007
14008         cat >conftest.$ac_ext <<_ACEOF
14009 #line 14009 "configure"
14010 #include "confdefs.h"
14011
14012 $ac_includes_default
14013 #include <db.h>
14014
14015 #ifdef DB_VERSION_MAJOR
14016         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
14017 #if $cf_db_version == DB_VERSION_MAJOR
14018         /* ok */
14019 #else
14020         make an error
14021 #endif
14022 #else
14023 #if $cf_db_version == 1
14024         /* ok: assuming this is DB 1.8.5 */
14025 #else
14026         make an error
14027 #endif
14028 #endif
14029
14030 int
14031 main ()
14032 {
14033 DBT *foo = 0
14034   ;
14035   return 0;
14036 }
14037 _ACEOF
14038 rm -f conftest.$ac_objext
14039 if { (eval echo "$as_me:14039: \"$ac_compile\"") >&5
14040   (eval $ac_compile) 2>&5
14041   ac_status=$?
14042   echo "$as_me:14042: \$? = $ac_status" >&5
14043   (exit $ac_status); } &&
14044          { ac_try='test -s conftest.$ac_objext'
14045   { (eval echo "$as_me:14045: \"$ac_try\"") >&5
14046   (eval $ac_try) 2>&5
14047   ac_status=$?
14048   echo "$as_me:14048: \$? = $ac_status" >&5
14049   (exit $ac_status); }; }; then
14050
14051         cf_cv_hashed_db_version=$cf_db_version
14052         break
14053
14054 else
14055   echo "$as_me: failed program was:" >&5
14056 cat conftest.$ac_ext >&5
14057 fi
14058 rm -f conftest.$ac_objext conftest.$ac_ext
14059 done
14060
14061 fi
14062 echo "$as_me:14062: result: $cf_cv_hashed_db_version" >&5
14063 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
14064
14065 if test "$cf_cv_hashed_db_version" = unknown ; then
14066         { { echo "$as_me:14066: error: Cannot determine version of db" >&5
14067 echo "$as_me: error: Cannot determine version of db" >&2;}
14068    { (exit 1); exit 1; }; }
14069 else
14070
14071 echo "$as_me:14071: checking for db libraries" >&5
14072 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
14073 if test "${cf_cv_hashed_db_libs+set}" = set; then
14074   echo $ECHO_N "(cached) $ECHO_C" >&6
14075 else
14076
14077 cf_cv_hashed_db_libs=unknown
14078 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
14079 do
14080         cf_save_libs="$LIBS"
14081         if test -n "$cf_db_libs"; then
14082                 LIBS="-l$cf_db_libs $LIBS"
14083         fi
14084
14085 echo "${as_me-configure}:14085: testing checking for library "$cf_db_libs" ..." 1>&5
14086
14087         cat >conftest.$ac_ext <<_ACEOF
14088 #line 14088 "configure"
14089 #include "confdefs.h"
14090
14091 $ac_includes_default
14092 #include <db.h>
14093
14094 int
14095 main ()
14096 {
14097
14098         char *path = "/tmp/foo";
14099 #ifdef DB_VERSION_MAJOR
14100 #if DB_VERSION_MAJOR >= 4
14101         DB *result = 0;
14102         db_create(&result, NULL, 0);
14103         result->open(result,
14104                 NULL,
14105                 path,
14106                 path,
14107                 DB_HASH,
14108                 DB_CREATE,
14109                 0644);
14110 #elif DB_VERSION_MAJOR >= 3
14111         DB *result = 0;
14112         db_create(&result, NULL, 0);
14113         result->open(result,
14114                 path,
14115                 path,
14116                 DB_HASH,
14117                 DB_CREATE,
14118                 0644);
14119 #elif DB_VERSION_MAJOR >= 2
14120         DB *result = 0;
14121         db_open(path,
14122                 DB_HASH,
14123                 DB_CREATE,
14124                 0644,
14125                 (DB_ENV *) 0,
14126                 (DB_INFO *) 0,
14127                 &result);
14128 #endif /* DB_VERSION_MAJOR */
14129 #else
14130         DB *result = dbopen(path,
14131                      2,
14132                      0644,
14133                      DB_HASH,
14134                      0);
14135 #endif
14136         ${cf_cv_main_return:-return}(result != 0)
14137
14138   ;
14139   return 0;
14140 }
14141 _ACEOF
14142 rm -f conftest.$ac_objext conftest$ac_exeext
14143 if { (eval echo "$as_me:14143: \"$ac_link\"") >&5
14144   (eval $ac_link) 2>&5
14145   ac_status=$?
14146   echo "$as_me:14146: \$? = $ac_status" >&5
14147   (exit $ac_status); } &&
14148          { ac_try='test -s conftest$ac_exeext'
14149   { (eval echo "$as_me:14149: \"$ac_try\"") >&5
14150   (eval $ac_try) 2>&5
14151   ac_status=$?
14152   echo "$as_me:14152: \$? = $ac_status" >&5
14153   (exit $ac_status); }; }; then
14154
14155         if test -n "$cf_db_libs" ; then
14156                 cf_cv_hashed_db_libs=$cf_db_libs
14157         else
14158                 cf_cv_hashed_db_libs=default
14159         fi
14160         LIBS="$cf_save_libs"
14161         break
14162
14163 else
14164   echo "$as_me: failed program was:" >&5
14165 cat conftest.$ac_ext >&5
14166 fi
14167 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14168         LIBS="$cf_save_libs"
14169 done
14170
14171 fi
14172 echo "$as_me:14172: result: $cf_cv_hashed_db_libs" >&5
14173 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
14174
14175         if test "$cf_cv_hashed_db_libs" = unknown ; then
14176                 { { echo "$as_me:14176: error: Cannot determine library for db" >&5
14177 echo "$as_me: error: Cannot determine library for db" >&2;}
14178    { (exit 1); exit 1; }; }
14179         elif test "$cf_cv_hashed_db_libs" != default ; then
14180                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
14181         fi
14182 fi
14183
14184 else
14185
14186         { { echo "$as_me:14186: error: Cannot find db.h" >&5
14187 echo "$as_me: error: Cannot find db.h" >&2;}
14188    { (exit 1); exit 1; }; }
14189
14190 fi
14191
14192 fi
14193
14194 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
14195         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
14196         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
14197 fi
14198
14199 # Just in case, check if the C compiler has a bool type.
14200
14201 echo "$as_me:14201: checking if we should include stdbool.h" >&5
14202 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
14203
14204 if test "${cf_cv_header_stdbool_h+set}" = set; then
14205   echo $ECHO_N "(cached) $ECHO_C" >&6
14206 else
14207
14208         cat >conftest.$ac_ext <<_ACEOF
14209 #line 14209 "configure"
14210 #include "confdefs.h"
14211
14212 int
14213 main ()
14214 {
14215 bool foo = false
14216   ;
14217   return 0;
14218 }
14219 _ACEOF
14220 rm -f conftest.$ac_objext
14221 if { (eval echo "$as_me:14221: \"$ac_compile\"") >&5
14222   (eval $ac_compile) 2>&5
14223   ac_status=$?
14224   echo "$as_me:14224: \$? = $ac_status" >&5
14225   (exit $ac_status); } &&
14226          { ac_try='test -s conftest.$ac_objext'
14227   { (eval echo "$as_me:14227: \"$ac_try\"") >&5
14228   (eval $ac_try) 2>&5
14229   ac_status=$?
14230   echo "$as_me:14230: \$? = $ac_status" >&5
14231   (exit $ac_status); }; }; then
14232   cf_cv_header_stdbool_h=0
14233 else
14234   echo "$as_me: failed program was:" >&5
14235 cat conftest.$ac_ext >&5
14236 cat >conftest.$ac_ext <<_ACEOF
14237 #line 14237 "configure"
14238 #include "confdefs.h"
14239
14240 #ifndef __BEOS__
14241 #include <stdbool.h>
14242 #endif
14243
14244 int
14245 main ()
14246 {
14247 bool foo = false
14248   ;
14249   return 0;
14250 }
14251 _ACEOF
14252 rm -f conftest.$ac_objext
14253 if { (eval echo "$as_me:14253: \"$ac_compile\"") >&5
14254   (eval $ac_compile) 2>&5
14255   ac_status=$?
14256   echo "$as_me:14256: \$? = $ac_status" >&5
14257   (exit $ac_status); } &&
14258          { ac_try='test -s conftest.$ac_objext'
14259   { (eval echo "$as_me:14259: \"$ac_try\"") >&5
14260   (eval $ac_try) 2>&5
14261   ac_status=$?
14262   echo "$as_me:14262: \$? = $ac_status" >&5
14263   (exit $ac_status); }; }; then
14264   cf_cv_header_stdbool_h=1
14265 else
14266   echo "$as_me: failed program was:" >&5
14267 cat conftest.$ac_ext >&5
14268 cf_cv_header_stdbool_h=0
14269 fi
14270 rm -f conftest.$ac_objext conftest.$ac_ext
14271 fi
14272 rm -f conftest.$ac_objext conftest.$ac_ext
14273 fi
14274
14275 if test "$cf_cv_header_stdbool_h" = 1
14276 then    echo "$as_me:14276: result: yes" >&5
14277 echo "${ECHO_T}yes" >&6
14278 else    echo "$as_me:14278: result: no" >&5
14279 echo "${ECHO_T}no" >&6
14280 fi
14281
14282 echo "$as_me:14282: checking for builtin bool type" >&5
14283 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
14284
14285 if test "${cf_cv_cc_bool_type+set}" = set; then
14286   echo $ECHO_N "(cached) $ECHO_C" >&6
14287 else
14288
14289         cat >conftest.$ac_ext <<_ACEOF
14290 #line 14290 "configure"
14291 #include "confdefs.h"
14292
14293 #include <stdio.h>
14294 #include <sys/types.h>
14295
14296 int
14297 main ()
14298 {
14299 bool x = false
14300   ;
14301   return 0;
14302 }
14303 _ACEOF
14304 rm -f conftest.$ac_objext
14305 if { (eval echo "$as_me:14305: \"$ac_compile\"") >&5
14306   (eval $ac_compile) 2>&5
14307   ac_status=$?
14308   echo "$as_me:14308: \$? = $ac_status" >&5
14309   (exit $ac_status); } &&
14310          { ac_try='test -s conftest.$ac_objext'
14311   { (eval echo "$as_me:14311: \"$ac_try\"") >&5
14312   (eval $ac_try) 2>&5
14313   ac_status=$?
14314   echo "$as_me:14314: \$? = $ac_status" >&5
14315   (exit $ac_status); }; }; then
14316   cf_cv_cc_bool_type=1
14317 else
14318   echo "$as_me: failed program was:" >&5
14319 cat conftest.$ac_ext >&5
14320 cf_cv_cc_bool_type=0
14321 fi
14322 rm -f conftest.$ac_objext conftest.$ac_ext
14323
14324 fi
14325
14326 if test "$cf_cv_cc_bool_type" = 1
14327 then    echo "$as_me:14327: result: yes" >&5
14328 echo "${ECHO_T}yes" >&6
14329 else    echo "$as_me:14329: result: no" >&5
14330 echo "${ECHO_T}no" >&6
14331 fi
14332
14333 # Check for C++ compiler characteristics (and ensure that it's there!)
14334 if test -n "$CXX" ; then
14335         ac_ext=cc
14336 ac_cpp='$CXXCPP $CPPFLAGS'
14337 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14338 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14339 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14340 ac_main_return=return
14341
14342 if test -n "$GXX" ; then
14343 case $cf_cv_system_name in #(vi
14344 os2*) #(vi
14345         cf_stdcpp_libname=stdcpp
14346         ;;
14347 *)
14348         cf_stdcpp_libname=stdc++
14349         ;;
14350 esac
14351 echo "$as_me:14351: checking for library $cf_stdcpp_libname" >&5
14352 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
14353 if test "${cf_cv_libstdcpp+set}" = set; then
14354   echo $ECHO_N "(cached) $ECHO_C" >&6
14355 else
14356
14357         cf_save="$LIBS"
14358         LIBS="$LIBS -l$cf_stdcpp_libname"
14359 cat >conftest.$ac_ext <<_ACEOF
14360 #line 14360 "configure"
14361 #include "confdefs.h"
14362
14363 #include <strstream.h>
14364 int
14365 main ()
14366 {
14367
14368 char buf[80];
14369 strstreambuf foo(buf, sizeof(buf))
14370
14371   ;
14372   return 0;
14373 }
14374 _ACEOF
14375 rm -f conftest.$ac_objext conftest$ac_exeext
14376 if { (eval echo "$as_me:14376: \"$ac_link\"") >&5
14377   (eval $ac_link) 2>&5
14378   ac_status=$?
14379   echo "$as_me:14379: \$? = $ac_status" >&5
14380   (exit $ac_status); } &&
14381          { ac_try='test -s conftest$ac_exeext'
14382   { (eval echo "$as_me:14382: \"$ac_try\"") >&5
14383   (eval $ac_try) 2>&5
14384   ac_status=$?
14385   echo "$as_me:14385: \$? = $ac_status" >&5
14386   (exit $ac_status); }; }; then
14387   cf_cv_libstdcpp=yes
14388 else
14389   echo "$as_me: failed program was:" >&5
14390 cat conftest.$ac_ext >&5
14391 cf_cv_libstdcpp=no
14392 fi
14393 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14394         LIBS="$cf_save"
14395
14396 fi
14397 echo "$as_me:14397: result: $cf_cv_libstdcpp" >&5
14398 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
14399 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
14400 fi
14401
14402         echo "$as_me:14402: checking whether $CXX understands -c and -o together" >&5
14403 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
14404 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
14405   echo $ECHO_N "(cached) $ECHO_C" >&6
14406 else
14407
14408 cat > conftest.$ac_ext <<CF_EOF
14409 #include <stdio.h>
14410 int main()
14411 {
14412         ${cf_cv_main_return:-return}(0);
14413 }
14414 CF_EOF
14415 # We do the test twice because some compilers refuse to overwrite an
14416 # existing .o file with -o, though they will create one.
14417 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
14418 if { (eval echo "$as_me:14418: \"$ac_try\"") >&5
14419   (eval $ac_try) 2>&5
14420   ac_status=$?
14421   echo "$as_me:14421: \$? = $ac_status" >&5
14422   (exit $ac_status); } &&
14423   test -f conftest2.$ac_objext && { (eval echo "$as_me:14423: \"$ac_try\"") >&5
14424   (eval $ac_try) 2>&5
14425   ac_status=$?
14426   echo "$as_me:14426: \$? = $ac_status" >&5
14427   (exit $ac_status); };
14428 then
14429   eval cf_cv_prog_CXX_c_o=yes
14430 else
14431   eval cf_cv_prog_CXX_c_o=no
14432 fi
14433 rm -f conftest*
14434
14435 fi
14436 if test $cf_cv_prog_CXX_c_o = yes; then
14437   echo "$as_me:14437: result: yes" >&5
14438 echo "${ECHO_T}yes" >&6
14439 else
14440   echo "$as_me:14440: result: no" >&5
14441 echo "${ECHO_T}no" >&6
14442 fi
14443
14444         case $GXX_VERSION in
14445         1*|2.0-6*)
14446                 cf_cxx_library=yes
14447                 ;;
14448         *-2.7*|2.7*)
14449
14450 cf_cxx_library=unknown
14451 case $cf_cv_system_name in #(vi
14452 os2*) #(vi
14453         cf_gpp_libname=gpp
14454         ;;
14455 *)
14456         cf_gpp_libname=g++
14457         ;;
14458 esac
14459 if test "$GXX" = yes; then
14460         echo "$as_me:14460: checking for lib$cf_gpp_libname" >&5
14461 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
14462         cf_save="$LIBS"
14463         LIBS="$LIBS -l$cf_gpp_libname"
14464         cat >conftest.$ac_ext <<_ACEOF
14465 #line 14465 "configure"
14466 #include "confdefs.h"
14467
14468 #include <$cf_gpp_libname/builtin.h>
14469
14470 int
14471 main ()
14472 {
14473 two_arg_error_handler_t foo2 = lib_error_handler
14474   ;
14475   return 0;
14476 }
14477 _ACEOF
14478 rm -f conftest.$ac_objext conftest$ac_exeext
14479 if { (eval echo "$as_me:14479: \"$ac_link\"") >&5
14480   (eval $ac_link) 2>&5
14481   ac_status=$?
14482   echo "$as_me:14482: \$? = $ac_status" >&5
14483   (exit $ac_status); } &&
14484          { ac_try='test -s conftest$ac_exeext'
14485   { (eval echo "$as_me:14485: \"$ac_try\"") >&5
14486   (eval $ac_try) 2>&5
14487   ac_status=$?
14488   echo "$as_me:14488: \$? = $ac_status" >&5
14489   (exit $ac_status); }; }; then
14490   cf_cxx_library=yes
14491          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
14492          if test "$cf_gpp_libname" = cpp ; then
14493             cat >>confdefs.h <<\EOF
14494 #define HAVE_GPP_BUILTIN_H 1
14495 EOF
14496
14497          else
14498             cat >>confdefs.h <<\EOF
14499 #define HAVE_GXX_BUILTIN_H 1
14500 EOF
14501
14502          fi
14503 else
14504   echo "$as_me: failed program was:" >&5
14505 cat conftest.$ac_ext >&5
14506 cat >conftest.$ac_ext <<_ACEOF
14507 #line 14507 "configure"
14508 #include "confdefs.h"
14509
14510 #include <builtin.h>
14511
14512 int
14513 main ()
14514 {
14515 two_arg_error_handler_t foo2 = lib_error_handler
14516   ;
14517   return 0;
14518 }
14519 _ACEOF
14520 rm -f conftest.$ac_objext conftest$ac_exeext
14521 if { (eval echo "$as_me:14521: \"$ac_link\"") >&5
14522   (eval $ac_link) 2>&5
14523   ac_status=$?
14524   echo "$as_me:14524: \$? = $ac_status" >&5
14525   (exit $ac_status); } &&
14526          { ac_try='test -s conftest$ac_exeext'
14527   { (eval echo "$as_me:14527: \"$ac_try\"") >&5
14528   (eval $ac_try) 2>&5
14529   ac_status=$?
14530   echo "$as_me:14530: \$? = $ac_status" >&5
14531   (exit $ac_status); }; }; then
14532   cf_cxx_library=yes
14533          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
14534          cat >>confdefs.h <<\EOF
14535 #define HAVE_BUILTIN_H 1
14536 EOF
14537
14538 else
14539   echo "$as_me: failed program was:" >&5
14540 cat conftest.$ac_ext >&5
14541 cf_cxx_library=no
14542 fi
14543 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14544 fi
14545 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14546         LIBS="$cf_save"
14547         echo "$as_me:14547: result: $cf_cxx_library" >&5
14548 echo "${ECHO_T}$cf_cxx_library" >&6
14549 fi
14550
14551                 ;;
14552         *)
14553                 cf_cxx_library=no
14554                 ;;
14555         esac
14556
14557         ac_ext=cc
14558 ac_cpp='$CXXCPP $CPPFLAGS'
14559 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14560 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14561 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14562 ac_main_return=return
14563 echo "$as_me:14563: checking how to run the C++ preprocessor" >&5
14564 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
14565 if test -z "$CXXCPP"; then
14566   if test "${ac_cv_prog_CXXCPP+set}" = set; then
14567   echo $ECHO_N "(cached) $ECHO_C" >&6
14568 else
14569       # Double quotes because CXXCPP needs to be expanded
14570     for CXXCPP in "$CXX -E" "/lib/cpp"
14571     do
14572       ac_preproc_ok=false
14573 for ac_cxx_preproc_warn_flag in '' yes
14574 do
14575   # Use a header file that comes with gcc, so configuring glibc
14576   # with a fresh cross-compiler works.
14577   # On the NeXT, cc -E runs the code through the compiler's parser,
14578   # not just through cpp. "Syntax error" is here to catch this case.
14579   cat >conftest.$ac_ext <<_ACEOF
14580 #line 14580 "configure"
14581 #include "confdefs.h"
14582 #include <assert.h>
14583                      Syntax error
14584 _ACEOF
14585 if { (eval echo "$as_me:14585: \"$ac_cpp conftest.$ac_ext\"") >&5
14586   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14587   ac_status=$?
14588   egrep -v '^ *\+' conftest.er1 >conftest.err
14589   rm -f conftest.er1
14590   cat conftest.err >&5
14591   echo "$as_me:14591: \$? = $ac_status" >&5
14592   (exit $ac_status); } >/dev/null; then
14593   if test -s conftest.err; then
14594     ac_cpp_err=$ac_cxx_preproc_warn_flag
14595   else
14596     ac_cpp_err=
14597   fi
14598 else
14599   ac_cpp_err=yes
14600 fi
14601 if test -z "$ac_cpp_err"; then
14602   :
14603 else
14604   echo "$as_me: failed program was:" >&5
14605   cat conftest.$ac_ext >&5
14606   # Broken: fails on valid input.
14607 continue
14608 fi
14609 rm -f conftest.err conftest.$ac_ext
14610
14611   # OK, works on sane cases.  Now check whether non-existent headers
14612   # can be detected and how.
14613   cat >conftest.$ac_ext <<_ACEOF
14614 #line 14614 "configure"
14615 #include "confdefs.h"
14616 #include <ac_nonexistent.h>
14617 _ACEOF
14618 if { (eval echo "$as_me:14618: \"$ac_cpp conftest.$ac_ext\"") >&5
14619   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14620   ac_status=$?
14621   egrep -v '^ *\+' conftest.er1 >conftest.err
14622   rm -f conftest.er1
14623   cat conftest.err >&5
14624   echo "$as_me:14624: \$? = $ac_status" >&5
14625   (exit $ac_status); } >/dev/null; then
14626   if test -s conftest.err; then
14627     ac_cpp_err=$ac_cxx_preproc_warn_flag
14628   else
14629     ac_cpp_err=
14630   fi
14631 else
14632   ac_cpp_err=yes
14633 fi
14634 if test -z "$ac_cpp_err"; then
14635   # Broken: success on invalid input.
14636 continue
14637 else
14638   echo "$as_me: failed program was:" >&5
14639   cat conftest.$ac_ext >&5
14640   # Passes both tests.
14641 ac_preproc_ok=:
14642 break
14643 fi
14644 rm -f conftest.err conftest.$ac_ext
14645
14646 done
14647 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
14648 rm -f conftest.err conftest.$ac_ext
14649 if $ac_preproc_ok; then
14650   break
14651 fi
14652
14653     done
14654     ac_cv_prog_CXXCPP=$CXXCPP
14655
14656 fi
14657   CXXCPP=$ac_cv_prog_CXXCPP
14658 else
14659   ac_cv_prog_CXXCPP=$CXXCPP
14660 fi
14661 echo "$as_me:14661: result: $CXXCPP" >&5
14662 echo "${ECHO_T}$CXXCPP" >&6
14663 ac_preproc_ok=false
14664 for ac_cxx_preproc_warn_flag in '' yes
14665 do
14666   # Use a header file that comes with gcc, so configuring glibc
14667   # with a fresh cross-compiler works.
14668   # On the NeXT, cc -E runs the code through the compiler's parser,
14669   # not just through cpp. "Syntax error" is here to catch this case.
14670   cat >conftest.$ac_ext <<_ACEOF
14671 #line 14671 "configure"
14672 #include "confdefs.h"
14673 #include <assert.h>
14674                      Syntax error
14675 _ACEOF
14676 if { (eval echo "$as_me:14676: \"$ac_cpp conftest.$ac_ext\"") >&5
14677   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14678   ac_status=$?
14679   egrep -v '^ *\+' conftest.er1 >conftest.err
14680   rm -f conftest.er1
14681   cat conftest.err >&5
14682   echo "$as_me:14682: \$? = $ac_status" >&5
14683   (exit $ac_status); } >/dev/null; then
14684   if test -s conftest.err; then
14685     ac_cpp_err=$ac_cxx_preproc_warn_flag
14686   else
14687     ac_cpp_err=
14688   fi
14689 else
14690   ac_cpp_err=yes
14691 fi
14692 if test -z "$ac_cpp_err"; then
14693   :
14694 else
14695   echo "$as_me: failed program was:" >&5
14696   cat conftest.$ac_ext >&5
14697   # Broken: fails on valid input.
14698 continue
14699 fi
14700 rm -f conftest.err conftest.$ac_ext
14701
14702   # OK, works on sane cases.  Now check whether non-existent headers
14703   # can be detected and how.
14704   cat >conftest.$ac_ext <<_ACEOF
14705 #line 14705 "configure"
14706 #include "confdefs.h"
14707 #include <ac_nonexistent.h>
14708 _ACEOF
14709 if { (eval echo "$as_me:14709: \"$ac_cpp conftest.$ac_ext\"") >&5
14710   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14711   ac_status=$?
14712   egrep -v '^ *\+' conftest.er1 >conftest.err
14713   rm -f conftest.er1
14714   cat conftest.err >&5
14715   echo "$as_me:14715: \$? = $ac_status" >&5
14716   (exit $ac_status); } >/dev/null; then
14717   if test -s conftest.err; then
14718     ac_cpp_err=$ac_cxx_preproc_warn_flag
14719   else
14720     ac_cpp_err=
14721   fi
14722 else
14723   ac_cpp_err=yes
14724 fi
14725 if test -z "$ac_cpp_err"; then
14726   # Broken: success on invalid input.
14727 continue
14728 else
14729   echo "$as_me: failed program was:" >&5
14730   cat conftest.$ac_ext >&5
14731   # Passes both tests.
14732 ac_preproc_ok=:
14733 break
14734 fi
14735 rm -f conftest.err conftest.$ac_ext
14736
14737 done
14738 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
14739 rm -f conftest.err conftest.$ac_ext
14740 if $ac_preproc_ok; then
14741   :
14742 else
14743   { { echo "$as_me:14743: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
14744 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
14745    { (exit 1); exit 1; }; }
14746 fi
14747
14748 ac_ext=cc
14749 ac_cpp='$CXXCPP $CPPFLAGS'
14750 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14751 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14752 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14753 ac_main_return=return
14754
14755 for ac_header in iostream typeinfo
14756 do
14757 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14758 echo "$as_me:14758: checking for $ac_header" >&5
14759 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14760 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14761   echo $ECHO_N "(cached) $ECHO_C" >&6
14762 else
14763   cat >conftest.$ac_ext <<_ACEOF
14764 #line 14764 "configure"
14765 #include "confdefs.h"
14766 #include <$ac_header>
14767 _ACEOF
14768 if { (eval echo "$as_me:14768: \"$ac_cpp conftest.$ac_ext\"") >&5
14769   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14770   ac_status=$?
14771   egrep -v '^ *\+' conftest.er1 >conftest.err
14772   rm -f conftest.er1
14773   cat conftest.err >&5
14774   echo "$as_me:14774: \$? = $ac_status" >&5
14775   (exit $ac_status); } >/dev/null; then
14776   if test -s conftest.err; then
14777     ac_cpp_err=$ac_cxx_preproc_warn_flag
14778   else
14779     ac_cpp_err=
14780   fi
14781 else
14782   ac_cpp_err=yes
14783 fi
14784 if test -z "$ac_cpp_err"; then
14785   eval "$as_ac_Header=yes"
14786 else
14787   echo "$as_me: failed program was:" >&5
14788   cat conftest.$ac_ext >&5
14789   eval "$as_ac_Header=no"
14790 fi
14791 rm -f conftest.err conftest.$ac_ext
14792 fi
14793 echo "$as_me:14793: result: `eval echo '${'$as_ac_Header'}'`" >&5
14794 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14795 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14796   cat >>confdefs.h <<EOF
14797 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14798 EOF
14799
14800 fi
14801 done
14802
14803     if test x"$ac_cv_header_iostream" = xyes ; then
14804         echo "$as_me:14804: checking if iostream uses std-namespace" >&5
14805 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
14806         cat >conftest.$ac_ext <<_ACEOF
14807 #line 14807 "configure"
14808 #include "confdefs.h"
14809
14810 #include <iostream>
14811 using std::endl;
14812 using std::cerr;
14813 int
14814 main ()
14815 {
14816
14817 cerr << "testing" << endl;
14818
14819   ;
14820   return 0;
14821 }
14822 _ACEOF
14823 rm -f conftest.$ac_objext
14824 if { (eval echo "$as_me:14824: \"$ac_compile\"") >&5
14825   (eval $ac_compile) 2>&5
14826   ac_status=$?
14827   echo "$as_me:14827: \$? = $ac_status" >&5
14828   (exit $ac_status); } &&
14829          { ac_try='test -s conftest.$ac_objext'
14830   { (eval echo "$as_me:14830: \"$ac_try\"") >&5
14831   (eval $ac_try) 2>&5
14832   ac_status=$?
14833   echo "$as_me:14833: \$? = $ac_status" >&5
14834   (exit $ac_status); }; }; then
14835   cf_iostream_namespace=yes
14836 else
14837   echo "$as_me: failed program was:" >&5
14838 cat conftest.$ac_ext >&5
14839 cf_iostream_namespace=no
14840 fi
14841 rm -f conftest.$ac_objext conftest.$ac_ext
14842         echo "$as_me:14842: result: $cf_iostream_namespace" >&5
14843 echo "${ECHO_T}$cf_iostream_namespace" >&6
14844         if test "$cf_iostream_namespace" = yes ; then
14845             cat >>confdefs.h <<\EOF
14846 #define IOSTREAM_NAMESPACE 1
14847 EOF
14848
14849         fi
14850     fi
14851
14852 echo "$as_me:14852: checking if we should include stdbool.h" >&5
14853 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
14854
14855 if test "${cf_cv_header_stdbool_h+set}" = set; then
14856   echo $ECHO_N "(cached) $ECHO_C" >&6
14857 else
14858
14859         cat >conftest.$ac_ext <<_ACEOF
14860 #line 14860 "configure"
14861 #include "confdefs.h"
14862
14863 int
14864 main ()
14865 {
14866 bool foo = false
14867   ;
14868   return 0;
14869 }
14870 _ACEOF
14871 rm -f conftest.$ac_objext
14872 if { (eval echo "$as_me:14872: \"$ac_compile\"") >&5
14873   (eval $ac_compile) 2>&5
14874   ac_status=$?
14875   echo "$as_me:14875: \$? = $ac_status" >&5
14876   (exit $ac_status); } &&
14877          { ac_try='test -s conftest.$ac_objext'
14878   { (eval echo "$as_me:14878: \"$ac_try\"") >&5
14879   (eval $ac_try) 2>&5
14880   ac_status=$?
14881   echo "$as_me:14881: \$? = $ac_status" >&5
14882   (exit $ac_status); }; }; then
14883   cf_cv_header_stdbool_h=0
14884 else
14885   echo "$as_me: failed program was:" >&5
14886 cat conftest.$ac_ext >&5
14887 cat >conftest.$ac_ext <<_ACEOF
14888 #line 14888 "configure"
14889 #include "confdefs.h"
14890
14891 #ifndef __BEOS__
14892 #include <stdbool.h>
14893 #endif
14894
14895 int
14896 main ()
14897 {
14898 bool foo = false
14899   ;
14900   return 0;
14901 }
14902 _ACEOF
14903 rm -f conftest.$ac_objext
14904 if { (eval echo "$as_me:14904: \"$ac_compile\"") >&5
14905   (eval $ac_compile) 2>&5
14906   ac_status=$?
14907   echo "$as_me:14907: \$? = $ac_status" >&5
14908   (exit $ac_status); } &&
14909          { ac_try='test -s conftest.$ac_objext'
14910   { (eval echo "$as_me:14910: \"$ac_try\"") >&5
14911   (eval $ac_try) 2>&5
14912   ac_status=$?
14913   echo "$as_me:14913: \$? = $ac_status" >&5
14914   (exit $ac_status); }; }; then
14915   cf_cv_header_stdbool_h=1
14916 else
14917   echo "$as_me: failed program was:" >&5
14918 cat conftest.$ac_ext >&5
14919 cf_cv_header_stdbool_h=0
14920 fi
14921 rm -f conftest.$ac_objext conftest.$ac_ext
14922 fi
14923 rm -f conftest.$ac_objext conftest.$ac_ext
14924 fi
14925
14926 if test "$cf_cv_header_stdbool_h" = 1
14927 then    echo "$as_me:14927: result: yes" >&5
14928 echo "${ECHO_T}yes" >&6
14929 else    echo "$as_me:14929: result: no" >&5
14930 echo "${ECHO_T}no" >&6
14931 fi
14932
14933 echo "$as_me:14933: checking for builtin bool type" >&5
14934 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
14935
14936 if test "${cf_cv_builtin_bool+set}" = set; then
14937   echo $ECHO_N "(cached) $ECHO_C" >&6
14938 else
14939
14940         cat >conftest.$ac_ext <<_ACEOF
14941 #line 14941 "configure"
14942 #include "confdefs.h"
14943
14944 #include <stdio.h>
14945 #include <sys/types.h>
14946
14947 int
14948 main ()
14949 {
14950 bool x = false
14951   ;
14952   return 0;
14953 }
14954 _ACEOF
14955 rm -f conftest.$ac_objext
14956 if { (eval echo "$as_me:14956: \"$ac_compile\"") >&5
14957   (eval $ac_compile) 2>&5
14958   ac_status=$?
14959   echo "$as_me:14959: \$? = $ac_status" >&5
14960   (exit $ac_status); } &&
14961          { ac_try='test -s conftest.$ac_objext'
14962   { (eval echo "$as_me:14962: \"$ac_try\"") >&5
14963   (eval $ac_try) 2>&5
14964   ac_status=$?
14965   echo "$as_me:14965: \$? = $ac_status" >&5
14966   (exit $ac_status); }; }; then
14967   cf_cv_builtin_bool=1
14968 else
14969   echo "$as_me: failed program was:" >&5
14970 cat conftest.$ac_ext >&5
14971 cf_cv_builtin_bool=0
14972 fi
14973 rm -f conftest.$ac_objext conftest.$ac_ext
14974
14975 fi
14976
14977 if test "$cf_cv_builtin_bool" = 1
14978 then    echo "$as_me:14978: result: yes" >&5
14979 echo "${ECHO_T}yes" >&6
14980 else    echo "$as_me:14980: result: no" >&5
14981 echo "${ECHO_T}no" >&6
14982 fi
14983
14984 echo "$as_me:14984: checking for size of bool" >&5
14985 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
14986 if test "${cf_cv_type_of_bool+set}" = set; then
14987   echo $ECHO_N "(cached) $ECHO_C" >&6
14988 else
14989
14990         rm -f cf_test.out
14991         if test "$cross_compiling" = yes; then
14992   cf_cv_type_of_bool=unknown
14993 else
14994   cat >conftest.$ac_ext <<_ACEOF
14995 #line 14995 "configure"
14996 #include "confdefs.h"
14997
14998 #include <stdlib.h>
14999 #include <stdio.h>
15000
15001 #if defined(__cplusplus)
15002
15003 #ifdef HAVE_GXX_BUILTIN_H
15004 #include <g++/builtin.h>
15005 #elif HAVE_GPP_BUILTIN_H
15006 #include <gpp/builtin.h>
15007 #elif HAVE_BUILTIN_H
15008 #include <builtin.h>
15009 #endif
15010
15011 #else
15012
15013 #if $cf_cv_header_stdbool_h
15014 #include <stdbool.h>
15015 #endif
15016
15017 #endif
15018
15019 main()
15020 {
15021         FILE *fp = fopen("cf_test.out", "w");
15022         if (fp != 0) {
15023                 bool x = true;
15024                 if ((bool)(-x) >= 0)
15025                         fputs("unsigned ", fp);
15026                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
15027                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
15028                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
15029                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
15030                 fclose(fp);
15031         }
15032         ${cf_cv_main_return:-return}(0);
15033 }
15034
15035 _ACEOF
15036 rm -f conftest$ac_exeext
15037 if { (eval echo "$as_me:15037: \"$ac_link\"") >&5
15038   (eval $ac_link) 2>&5
15039   ac_status=$?
15040   echo "$as_me:15040: \$? = $ac_status" >&5
15041   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15042   { (eval echo "$as_me:15042: \"$ac_try\"") >&5
15043   (eval $ac_try) 2>&5
15044   ac_status=$?
15045   echo "$as_me:15045: \$? = $ac_status" >&5
15046   (exit $ac_status); }; }; then
15047   cf_cv_type_of_bool=`cat cf_test.out`
15048                  if test -z "$cf_cv_type_of_bool"; then
15049                    cf_cv_type_of_bool=unknown
15050                  fi
15051 else
15052   echo "$as_me: program exited with status $ac_status" >&5
15053 echo "$as_me: failed program was:" >&5
15054 cat conftest.$ac_ext >&5
15055 cf_cv_type_of_bool=unknown
15056 fi
15057 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15058 fi
15059
15060 fi
15061
15062         rm -f cf_test.out
15063 echo "$as_me:15063: result: $cf_cv_type_of_bool" >&5
15064 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15065 if test "$cf_cv_type_of_bool" = unknown ; then
15066         case .$NCURSES_BOOL in #(vi
15067         .auto|.) NCURSES_BOOL=unsigned;;
15068         esac
15069         { echo "$as_me:15069: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
15070 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
15071         cf_cv_type_of_bool=$NCURSES_BOOL
15072 fi
15073
15074 echo "$as_me:15074: checking for special defines needed for etip.h" >&5
15075 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
15076 cf_save_CXXFLAGS="$CXXFLAGS"
15077 cf_result="none"
15078 for cf_math in "" MATH_H
15079 do
15080 for cf_excp in "" MATH_EXCEPTION
15081 do
15082         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
15083         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
15084         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
15085 cat >conftest.$ac_ext <<_ACEOF
15086 #line 15086 "configure"
15087 #include "confdefs.h"
15088
15089 #include <etip.h.in>
15090
15091 int
15092 main ()
15093 {
15094
15095   ;
15096   return 0;
15097 }
15098 _ACEOF
15099 rm -f conftest.$ac_objext
15100 if { (eval echo "$as_me:15100: \"$ac_compile\"") >&5
15101   (eval $ac_compile) 2>&5
15102   ac_status=$?
15103   echo "$as_me:15103: \$? = $ac_status" >&5
15104   (exit $ac_status); } &&
15105          { ac_try='test -s conftest.$ac_objext'
15106   { (eval echo "$as_me:15106: \"$ac_try\"") >&5
15107   (eval $ac_try) 2>&5
15108   ac_status=$?
15109   echo "$as_me:15109: \$? = $ac_status" >&5
15110   (exit $ac_status); }; }; then
15111
15112         test -n "$cf_math" && cat >>confdefs.h <<EOF
15113 #define ETIP_NEEDS_${cf_math} 1
15114 EOF
15115
15116         test -n "$cf_excp" && cat >>confdefs.h <<EOF
15117 #define ETIP_NEEDS_${cf_excp} 1
15118 EOF
15119
15120         cf_result="$cf_math $cf_excp"
15121         break
15122
15123 else
15124   echo "$as_me: failed program was:" >&5
15125 cat conftest.$ac_ext >&5
15126 fi
15127 rm -f conftest.$ac_objext conftest.$ac_ext
15128 done
15129 done
15130 echo "$as_me:15130: result: $cf_result" >&5
15131 echo "${ECHO_T}$cf_result" >&6
15132 CXXFLAGS="$cf_save_CXXFLAGS"
15133
15134 if test -n "$CXX"; then
15135 echo "$as_me:15135: checking if $CXX accepts parameter initialization" >&5
15136 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
15137 if test "${cf_cv_cpp_param_init+set}" = set; then
15138   echo $ECHO_N "(cached) $ECHO_C" >&6
15139 else
15140
15141         ac_ext=cc
15142 ac_cpp='$CXXCPP $CPPFLAGS'
15143 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15144 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15145 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15146 ac_main_return=return
15147
15148         if test "$cross_compiling" = yes; then
15149   cf_cv_cpp_param_init=unknown
15150 else
15151   cat >conftest.$ac_ext <<_ACEOF
15152 #line 15152 "configure"
15153 #include "confdefs.h"
15154
15155 class TEST {
15156 private:
15157         int value;
15158 public:
15159         TEST(int x = 1);
15160         ~TEST();
15161 };
15162
15163 TEST::TEST(int x = 1)   // some compilers do not like second initializer
15164 {
15165         value = x;
15166 }
15167 void main() { }
15168
15169 _ACEOF
15170 rm -f conftest$ac_exeext
15171 if { (eval echo "$as_me:15171: \"$ac_link\"") >&5
15172   (eval $ac_link) 2>&5
15173   ac_status=$?
15174   echo "$as_me:15174: \$? = $ac_status" >&5
15175   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15176   { (eval echo "$as_me:15176: \"$ac_try\"") >&5
15177   (eval $ac_try) 2>&5
15178   ac_status=$?
15179   echo "$as_me:15179: \$? = $ac_status" >&5
15180   (exit $ac_status); }; }; then
15181   cf_cv_cpp_param_init=yes
15182 else
15183   echo "$as_me: program exited with status $ac_status" >&5
15184 echo "$as_me: failed program was:" >&5
15185 cat conftest.$ac_ext >&5
15186 cf_cv_cpp_param_init=no
15187 fi
15188 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15189 fi
15190         ac_ext=cc
15191 ac_cpp='$CXXCPP $CPPFLAGS'
15192 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15193 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15194 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15195 ac_main_return=return
15196
15197 fi
15198 echo "$as_me:15198: result: $cf_cv_cpp_param_init" >&5
15199 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
15200 fi
15201 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
15202 #define CPP_HAS_PARAM_INIT 1
15203 EOF
15204
15205 if test -n "$CXX"; then
15206
15207 echo "$as_me:15207: checking if $CXX accepts static_cast" >&5
15208 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
15209 if test "${cf_cv_cpp_static_cast+set}" = set; then
15210   echo $ECHO_N "(cached) $ECHO_C" >&6
15211 else
15212
15213         ac_ext=cc
15214 ac_cpp='$CXXCPP $CPPFLAGS'
15215 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15216 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15217 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15218 ac_main_return=return
15219
15220         cat >conftest.$ac_ext <<_ACEOF
15221 #line 15221 "configure"
15222 #include "confdefs.h"
15223
15224 class NCursesPanel
15225 {
15226 public:
15227   NCursesPanel(int nlines,
15228                int ncols,
15229                int begin_y = 0,
15230                int begin_x = 0)
15231   {
15232   }
15233
15234   ~NCursesPanel();
15235 };
15236
15237 template<class T> class NCursesUserPanel : public NCursesPanel
15238 {
15239 public:
15240   NCursesUserPanel (int nlines,
15241                     int ncols,
15242                     int begin_y = 0,
15243                     int begin_x = 0,
15244                     const T* p_UserData = static_cast<T*>(0))
15245     : NCursesPanel (nlines, ncols, begin_y, begin_x)
15246   {
15247   };
15248   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
15249   {
15250   };
15251
15252   virtual ~NCursesUserPanel() {};
15253 };
15254
15255 int
15256 main ()
15257 {
15258
15259         const char* p_UserData = static_cast<char*>(0)
15260   ;
15261   return 0;
15262 }
15263 _ACEOF
15264 rm -f conftest.$ac_objext
15265 if { (eval echo "$as_me:15265: \"$ac_compile\"") >&5
15266   (eval $ac_compile) 2>&5
15267   ac_status=$?
15268   echo "$as_me:15268: \$? = $ac_status" >&5
15269   (exit $ac_status); } &&
15270          { ac_try='test -s conftest.$ac_objext'
15271   { (eval echo "$as_me:15271: \"$ac_try\"") >&5
15272   (eval $ac_try) 2>&5
15273   ac_status=$?
15274   echo "$as_me:15274: \$? = $ac_status" >&5
15275   (exit $ac_status); }; }; then
15276   cf_cv_cpp_static_cast=yes
15277 else
15278   echo "$as_me: failed program was:" >&5
15279 cat conftest.$ac_ext >&5
15280 cf_cv_cpp_static_cast=no
15281 fi
15282 rm -f conftest.$ac_objext conftest.$ac_ext
15283
15284         ac_ext=cc
15285 ac_cpp='$CXXCPP $CPPFLAGS'
15286 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15287 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15288 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15289 ac_main_return=return
15290
15291 fi
15292 echo "$as_me:15292: result: $cf_cv_cpp_static_cast" >&5
15293 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
15294
15295 fi
15296
15297 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
15298 #define CPP_HAS_STATIC_CAST 1
15299 EOF
15300
15301         CXX_AR='$(AR)'
15302         CXX_AR_OPTS='$(AR_OPTS)'
15303         case $cf_cv_system_name in #(vi
15304         irix*) #(vi
15305             if test "$GXX" != yes ; then
15306                 CXX_AR='$(CXX)'
15307                 CXX_AR_OPTS='-ar -o'
15308             fi
15309             ;;
15310         sco3.2v5*) #(vi
15311             CXXLDFLAGS="-u main"
15312             ;;
15313         solaris2*)
15314             if test "$GXX" != yes ; then
15315                 CXX_AR='$(CXX)'
15316                 CXX_AR_OPTS='-xar -o'
15317             fi
15318             ;;
15319         esac
15320
15321 else
15322         cf_cxx_library=no
15323         cf_cv_builtin_bool=1
15324
15325         # Just because we are not configuring against C++ right now does not
15326         # mean that a user will not want to use C++.  Some distributors disable
15327         # the C++ portion of this configuration as a shortcut (or just to avoid
15328         # compiling the demo in the c++ directory).  So we need a reasonable
15329         # default for the 'bool' type.
15330         #
15331         # Caveat: since the storage of the bool type is not standardized, it
15332         # may change.
15333
15334         if test "$NCURSES_BOOL" != auto ; then
15335                 cf_cv_type_of_bool=$NCURSES_BOOL
15336                 cf_cv_header_stdbool_h=0
15337         else
15338                 if test "$cf_cv_header_stdbool_h" = 1 ; then
15339
15340 echo "$as_me:15340: checking for size of bool" >&5
15341 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
15342 if test "${cf_cv_type_of_bool+set}" = set; then
15343   echo $ECHO_N "(cached) $ECHO_C" >&6
15344 else
15345
15346         rm -f cf_test.out
15347         if test "$cross_compiling" = yes; then
15348   cf_cv_type_of_bool=unknown
15349 else
15350   cat >conftest.$ac_ext <<_ACEOF
15351 #line 15351 "configure"
15352 #include "confdefs.h"
15353
15354 #include <stdlib.h>
15355 #include <stdio.h>
15356
15357 #if defined(__cplusplus)
15358
15359 #ifdef HAVE_GXX_BUILTIN_H
15360 #include <g++/builtin.h>
15361 #elif HAVE_GPP_BUILTIN_H
15362 #include <gpp/builtin.h>
15363 #elif HAVE_BUILTIN_H
15364 #include <builtin.h>
15365 #endif
15366
15367 #else
15368
15369 #if $cf_cv_header_stdbool_h
15370 #include <stdbool.h>
15371 #endif
15372
15373 #endif
15374
15375 main()
15376 {
15377         FILE *fp = fopen("cf_test.out", "w");
15378         if (fp != 0) {
15379                 bool x = true;
15380                 if ((bool)(-x) >= 0)
15381                         fputs("unsigned ", fp);
15382                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
15383                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
15384                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
15385                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
15386                 fclose(fp);
15387         }
15388         ${cf_cv_main_return:-return}(0);
15389 }
15390
15391 _ACEOF
15392 rm -f conftest$ac_exeext
15393 if { (eval echo "$as_me:15393: \"$ac_link\"") >&5
15394   (eval $ac_link) 2>&5
15395   ac_status=$?
15396   echo "$as_me:15396: \$? = $ac_status" >&5
15397   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15398   { (eval echo "$as_me:15398: \"$ac_try\"") >&5
15399   (eval $ac_try) 2>&5
15400   ac_status=$?
15401   echo "$as_me:15401: \$? = $ac_status" >&5
15402   (exit $ac_status); }; }; then
15403   cf_cv_type_of_bool=`cat cf_test.out`
15404                  if test -z "$cf_cv_type_of_bool"; then
15405                    cf_cv_type_of_bool=unknown
15406                  fi
15407 else
15408   echo "$as_me: program exited with status $ac_status" >&5
15409 echo "$as_me: failed program was:" >&5
15410 cat conftest.$ac_ext >&5
15411 cf_cv_type_of_bool=unknown
15412 fi
15413 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15414 fi
15415
15416 fi
15417
15418         rm -f cf_test.out
15419 echo "$as_me:15419: result: $cf_cv_type_of_bool" >&5
15420 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15421 if test "$cf_cv_type_of_bool" = unknown ; then
15422         case .$NCURSES_BOOL in #(vi
15423         .auto|.) NCURSES_BOOL=unsigned;;
15424         esac
15425         { echo "$as_me:15425: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
15426 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
15427         cf_cv_type_of_bool=$NCURSES_BOOL
15428 fi
15429
15430                 else
15431                         echo "$as_me:15431: checking for fallback type of bool" >&5
15432 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
15433                         case "$host_cpu" in #(vi
15434                         i?86)   cf_cv_type_of_bool=char ;; #(vi
15435                         *)      cf_cv_type_of_bool=int  ;;
15436                         esac
15437                         echo "$as_me:15437: result: $cf_cv_type_of_bool" >&5
15438 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15439                 fi
15440         fi
15441 fi
15442
15443 # If the C compiler did not declare bool, and we did not determine that the C++
15444 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
15445 # ncurses library use the same type as C++ bool.  Note that this allows one to
15446 # specify the type of bool in a configure-script option and postpone
15447 # integration with the C++ compiler provided that the types are compatible.
15448 USE_CXX_BOOL=1
15449 if test $cf_cv_cc_bool_type = 1
15450 then
15451         # oops: C has a bool.  Unlikely, but C++ could differ.
15452         USE_CXX_BOOL=0
15453 elif test $cf_cv_builtin_bool = 0
15454 then
15455         # C++ has no bool
15456         USE_CXX_BOOL=0
15457 else
15458         # this is the normal case
15459         USE_CXX_BOOL='defined(__cplusplus)'
15460 fi
15461
15462 if test -f "${srcdir}/Ada95/Makefile.in" ; then
15463
15464 if test "$cf_with_ada" != "no" ; then
15465     if test "$with_libtool" != "no"; then
15466         { echo "$as_me:15466: WARNING: libtool does not support Ada - disabling feature" >&5
15467 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
15468         cf_with_ada=no
15469     fi
15470 fi
15471
15472 if test "$cf_with_ada" != "no" ; then
15473 cf_ada_make=gnatmake
15474 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
15475 set dummy $cf_ada_make; ac_word=$2
15476 echo "$as_me:15476: checking for $ac_word" >&5
15477 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15478 if test "${ac_cv_prog_gnat_exists+set}" = set; then
15479   echo $ECHO_N "(cached) $ECHO_C" >&6
15480 else
15481   if test -n "$gnat_exists"; then
15482   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
15483 else
15484   ac_save_IFS=$IFS; IFS=$ac_path_separator
15485 ac_dummy="$PATH"
15486 for ac_dir in $ac_dummy; do
15487   IFS=$ac_save_IFS
15488   test -z "$ac_dir" && ac_dir=.
15489   $as_executable_p "$ac_dir/$ac_word" || continue
15490 ac_cv_prog_gnat_exists="yes"
15491 echo "$as_me:15491: found $ac_dir/$ac_word" >&5
15492 break
15493 done
15494
15495   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
15496 fi
15497 fi
15498 gnat_exists=$ac_cv_prog_gnat_exists
15499 if test -n "$gnat_exists"; then
15500   echo "$as_me:15500: result: $gnat_exists" >&5
15501 echo "${ECHO_T}$gnat_exists" >&6
15502 else
15503   echo "$as_me:15503: result: no" >&5
15504 echo "${ECHO_T}no" >&6
15505 fi
15506
15507 if test "$ac_cv_prog_gnat_exists" = no; then
15508    cf_ada_make=
15509 else
15510
15511 echo "$as_me:15511: checking for gnat version" >&5
15512 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
15513 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
15514   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
15515 echo "$as_me:15515: result: $cf_gnat_version" >&5
15516 echo "${ECHO_T}$cf_gnat_version" >&6
15517
15518 case $cf_gnat_version in
15519   3.1[1-9]*|3.[2-9]*|[4-9].*)
15520     cf_cv_prog_gnat_correct=yes
15521     ;;
15522   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
15523      cf_cv_prog_gnat_correct=no
15524      ;;
15525 esac
15526 case $cf_gnat_version in
15527   3.[1-9]*|[4-9].*)
15528       cf_compile_generics=generics
15529       cf_generic_objects="\${GENOBJS}"
15530       ;;
15531   *)  cf_compile_generics=
15532       cf_generic_objects=
15533       ;;
15534 esac
15535
15536    # Extract the first word of "m4", so it can be a program name with args.
15537 set dummy m4; ac_word=$2
15538 echo "$as_me:15538: checking for $ac_word" >&5
15539 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15540 if test "${ac_cv_prog_M4_exists+set}" = set; then
15541   echo $ECHO_N "(cached) $ECHO_C" >&6
15542 else
15543   if test -n "$M4_exists"; then
15544   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
15545 else
15546   ac_save_IFS=$IFS; IFS=$ac_path_separator
15547 ac_dummy="$PATH"
15548 for ac_dir in $ac_dummy; do
15549   IFS=$ac_save_IFS
15550   test -z "$ac_dir" && ac_dir=.
15551   $as_executable_p "$ac_dir/$ac_word" || continue
15552 ac_cv_prog_M4_exists="yes"
15553 echo "$as_me:15553: found $ac_dir/$ac_word" >&5
15554 break
15555 done
15556
15557   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
15558 fi
15559 fi
15560 M4_exists=$ac_cv_prog_M4_exists
15561 if test -n "$M4_exists"; then
15562   echo "$as_me:15562: result: $M4_exists" >&5
15563 echo "${ECHO_T}$M4_exists" >&6
15564 else
15565   echo "$as_me:15565: result: no" >&5
15566 echo "${ECHO_T}no" >&6
15567 fi
15568
15569    if test "$ac_cv_prog_M4_exists" = no; then
15570       cf_cv_prog_gnat_correct=no
15571       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
15572    fi
15573    if test "$cf_cv_prog_gnat_correct" = yes; then
15574       echo "$as_me:15574: checking if GNAT works" >&5
15575 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
15576
15577 rm -f conftest*
15578 cat >>conftest.ads <<CF_EOF
15579 procedure conftest;
15580 CF_EOF
15581 cat >>conftest.adb <<CF_EOF
15582 with Text_IO;
15583 with GNAT.OS_Lib;
15584 procedure conftest is
15585 begin
15586    Text_IO.Put ("Hello World");
15587    Text_IO.New_Line;
15588    GNAT.OS_Lib.OS_Exit (0);
15589 end conftest;
15590 CF_EOF
15591 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
15592    if ( ./conftest 1>&5 2>&1 ) ; then
15593       cf_cv_prog_gnat_correct=yes
15594    else
15595       cf_cv_prog_gnat_correct=no
15596    fi
15597 else
15598    cf_cv_prog_gnat_correct=no
15599 fi
15600 rm -f conftest*
15601
15602       echo "$as_me:15602: result: $cf_cv_prog_gnat_correct" >&5
15603 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
15604    fi
15605 fi
15606 if test "$cf_cv_prog_gnat_correct" = yes; then
15607    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
15608
15609    echo "$as_me:15609: checking if GNAT pragma Unreferenced works" >&5
15610 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
15611
15612 rm -f conftest*
15613 cat >>conftest.ads <<CF_EOF
15614 procedure conftest;
15615 CF_EOF
15616 cat >>conftest.adb <<CF_EOF
15617 with Text_IO;
15618 with GNAT.OS_Lib;
15619 procedure conftest is
15620    test : Integer;
15621    pragma Unreferenced (test);
15622 begin
15623    test := 1;
15624    Text_IO.Put ("Hello World");
15625    Text_IO.New_Line;
15626    GNAT.OS_Lib.OS_Exit (0);
15627 end conftest;
15628 CF_EOF
15629 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
15630       cf_cv_pragma_unreferenced=yes
15631 else
15632    cf_cv_pragma_unreferenced=no
15633 fi
15634 rm -f conftest*
15635
15636    echo "$as_me:15636: result: $cf_cv_pragma_unreferenced" >&5
15637 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
15638
15639    # if the pragma is supported, use it (needed in the Trace code).
15640    if test $cf_cv_pragma_unreferenced = yes ; then
15641       PRAGMA_UNREF=TRUE
15642    else
15643       PRAGMA_UNREF=FALSE
15644    fi
15645
15646 # Check whether --with-ada-compiler or --without-ada-compiler was given.
15647 if test "${with_ada_compiler+set}" = set; then
15648   withval="$with_ada_compiler"
15649   cf_ada_compiler=$withval
15650 else
15651   cf_ada_compiler=gnatmake
15652 fi;
15653
15654    cf_ada_package=terminal_interface
15655
15656 # Check whether --with-ada-include or --without-ada-include was given.
15657 if test "${with_ada_include+set}" = set; then
15658   withval="$with_ada_include"
15659
15660 else
15661   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
15662 fi; if test -n "$prefix/lib/ada/adainclude" ; then
15663
15664 if test "x$prefix" != xNONE; then
15665   cf_path_syntax="$prefix"
15666 else
15667   cf_path_syntax="$ac_default_prefix"
15668 fi
15669
15670 case ".$withval" in #(vi
15671 .\$\(*\)*|.\'*\'*) #(vi
15672   ;;
15673 ..|./*|.\\*) #(vi
15674   ;;
15675 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
15676   ;;
15677 .\${*prefix}*) #(vi
15678   eval withval="$withval"
15679   case ".$withval" in #(vi
15680   .NONE/*)
15681     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15682     ;;
15683   esac
15684   ;; #(vi
15685 .no|.NONE/*)
15686   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15687   ;;
15688 *)
15689   { { echo "$as_me:15689: error: expected a pathname, not \"$withval\"" >&5
15690 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
15691    { (exit 1); exit 1; }; }
15692   ;;
15693 esac
15694
15695 fi
15696 ADA_INCLUDE="$withval"
15697
15698 # Check whether --with-ada-objects or --without-ada-objects was given.
15699 if test "${with_ada_objects+set}" = set; then
15700   withval="$with_ada_objects"
15701
15702 else
15703   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
15704 fi; if test -n "$prefix/lib/ada/adalib" ; then
15705
15706 if test "x$prefix" != xNONE; then
15707   cf_path_syntax="$prefix"
15708 else
15709   cf_path_syntax="$ac_default_prefix"
15710 fi
15711
15712 case ".$withval" in #(vi
15713 .\$\(*\)*|.\'*\'*) #(vi
15714   ;;
15715 ..|./*|.\\*) #(vi
15716   ;;
15717 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
15718   ;;
15719 .\${*prefix}*) #(vi
15720   eval withval="$withval"
15721   case ".$withval" in #(vi
15722   .NONE/*)
15723     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15724     ;;
15725   esac
15726   ;; #(vi
15727 .no|.NONE/*)
15728   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15729   ;;
15730 *)
15731   { { echo "$as_me:15731: error: expected a pathname, not \"$withval\"" >&5
15732 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
15733    { (exit 1); exit 1; }; }
15734   ;;
15735 esac
15736
15737 fi
15738 ADA_OBJECTS="$withval"
15739
15740 fi
15741 fi
15742 else
15743    cf_with_ada=no
15744 fi
15745
15746 ### Construct the ncurses library-subsets, if any, from this set of keywords:
15747 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
15748 ###
15749 ### ticlib modules may be a separate library, otherwise contained in termlib.
15750 ### termlib modules may be a separate library, otherwise contained in ncurses.
15751 ###
15752 ### The of "+" or " " between the tokens controls the way the script
15753 ### chooses to split module lists into libraries.
15754 ###
15755 ### (see CF_LIB_RULES).
15756 echo "$as_me:15756: checking for library subsets" >&5
15757 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
15758 LIB_SUBSETS=
15759
15760 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
15761         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
15762         if test "$with_ticlib" != no ; then
15763                 LIB_SUBSETS="${LIB_SUBSETS} "
15764         else
15765                 LIB_SUBSETS="${LIB_SUBSETS}+"
15766         fi
15767 fi
15768
15769 LIB_SUBSETS="${LIB_SUBSETS}termlib"
15770 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
15771 if test "$with_termlib" != no ; then
15772         LIB_SUBSETS="${LIB_SUBSETS} "
15773 else
15774         LIB_SUBSETS="${LIB_SUBSETS}+"
15775 fi
15776
15777 LIB_SUBSETS="${LIB_SUBSETS}base"
15778 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
15779 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
15780
15781 echo "$as_me:15781: result: $LIB_SUBSETS" >&5
15782 echo "${ECHO_T}$LIB_SUBSETS" >&6
15783
15784 ### Construct the list of include-directories to be generated
15785
15786 CPPFLAGS="-I. -I../include $CPPFLAGS"
15787 if test "$srcdir" != "."; then
15788         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
15789 fi
15790 if test "$GCC" != yes; then
15791         CPPFLAGS="$CPPFLAGS -I\${includedir}"
15792 elif test "$includedir" != "/usr/include"; then
15793         if test "$includedir" = '${prefix}/include' ; then
15794                 if test $prefix != /usr ; then
15795                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
15796                 fi
15797         else
15798                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
15799         fi
15800 fi
15801
15802 ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
15803 if test "$srcdir" != "."; then
15804         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
15805 fi
15806 if test "$GCC" != yes; then
15807         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15808 elif test "$includedir" != "/usr/include"; then
15809         if test "$includedir" = '${prefix}/include' ; then
15810                 if test $prefix != /usr ; then
15811                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15812                 fi
15813         else
15814                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15815         fi
15816 fi
15817
15818 ### Build up pieces for makefile rules
15819 echo "$as_me:15819: checking default library suffix" >&5
15820 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
15821
15822         case $DFT_LWR_MODEL in
15823         libtool) DFT_ARG_SUFFIX=''   ;;
15824         normal)  DFT_ARG_SUFFIX=''   ;;
15825         debug)   DFT_ARG_SUFFIX='_g' ;;
15826         profile) DFT_ARG_SUFFIX='_p' ;;
15827         shared)  DFT_ARG_SUFFIX=''   ;;
15828         esac
15829         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
15830 echo "$as_me:15830: result: $DFT_ARG_SUFFIX" >&5
15831 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
15832
15833 echo "$as_me:15833: checking default library-dependency suffix" >&5
15834 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
15835
15836         case $DFT_LWR_MODEL in
15837         libtool)
15838                 DFT_LIB_SUFFIX='.la'
15839                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
15840                 ;;
15841         normal)
15842                 DFT_LIB_SUFFIX='.a'
15843                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
15844                 ;;
15845         debug)
15846                 DFT_LIB_SUFFIX='_g.a'
15847                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
15848                 ;;
15849         profile)
15850                 DFT_LIB_SUFFIX='_p.a'
15851                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
15852                 ;;
15853         shared)
15854                 case $cf_cv_system_name in
15855                 cygwin*)
15856                         DFT_LIB_SUFFIX='.dll'
15857                         DFT_DEP_SUFFIX='.dll.a'
15858                         ;;
15859                 darwin*)
15860                         DFT_LIB_SUFFIX='.dylib'
15861                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
15862                         ;;
15863                 hpux*)
15864                         case $target in
15865                         ia64*)
15866                                 DFT_LIB_SUFFIX='.so'
15867                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
15868                                 ;;
15869                         *)
15870                                 DFT_LIB_SUFFIX='.sl'
15871                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
15872                                 ;;
15873                         esac
15874                         ;;
15875                 *)      DFT_LIB_SUFFIX='.so'
15876                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
15877                         ;;
15878                 esac
15879         esac
15880         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
15881         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
15882 echo "$as_me:15882: result: $DFT_DEP_SUFFIX" >&5
15883 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
15884
15885 echo "$as_me:15885: checking default object directory" >&5
15886 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
15887
15888         case $DFT_LWR_MODEL in
15889         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
15890         normal)  DFT_OBJ_SUBDIR='objects' ;;
15891         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
15892         profile) DFT_OBJ_SUBDIR='obj_p' ;;
15893         shared)
15894                 case $cf_cv_system_name in #(vi
15895                 cygwin) #(vi
15896                         DFT_OBJ_SUBDIR='objects' ;;
15897                 *)
15898                         DFT_OBJ_SUBDIR='obj_s' ;;
15899                 esac
15900         esac
15901 echo "$as_me:15901: result: $DFT_OBJ_SUBDIR" >&5
15902 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
15903
15904 # libtool thinks it can make c++ shared libraries (perhaps only g++)
15905 if test "$cf_with_cxx" = yes ; then
15906 echo "$as_me:15906: checking c++ library-dependency suffix" >&5
15907 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
15908 if test "$with_libtool" != "no"; then
15909         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
15910 else
15911
15912         case normal in
15913         libtool)
15914                 CXX_LIB_SUFFIX='.la'
15915                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
15916                 ;;
15917         normal)
15918                 CXX_LIB_SUFFIX='.a'
15919                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
15920                 ;;
15921         debug)
15922                 CXX_LIB_SUFFIX='_g.a'
15923                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
15924                 ;;
15925         profile)
15926                 CXX_LIB_SUFFIX='_p.a'
15927                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
15928                 ;;
15929         shared)
15930                 case $cf_cv_system_name in
15931                 cygwin*)
15932                         CXX_LIB_SUFFIX='.dll'
15933                         CXX_DEP_SUFFIX='.dll.a'
15934                         ;;
15935                 darwin*)
15936                         CXX_LIB_SUFFIX='.dylib'
15937                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
15938                         ;;
15939                 hpux*)
15940                         case $target in
15941                         ia64*)
15942                                 CXX_LIB_SUFFIX='.so'
15943                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
15944                                 ;;
15945                         *)
15946                                 CXX_LIB_SUFFIX='.sl'
15947                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
15948                                 ;;
15949                         esac
15950                         ;;
15951                 *)      CXX_LIB_SUFFIX='.so'
15952                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
15953                         ;;
15954                 esac
15955         esac
15956         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
15957         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
15958 fi
15959 echo "$as_me:15959: result: $CXX_LIB_SUFFIX" >&5
15960 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
15961
15962 fi
15963
15964 # do not want -ldl in build except as needed for -lncurses dependency
15965 if test "$with_dlsym" = yes ; then
15966 if test $DFT_LWR_MODEL = shared || \
15967    test $DFT_LWR_MODEL = libtool ; then
15968
15969 # remove dl library from $LIBS
15970 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
15971
15972 fi
15973 fi
15974 ### Set up low-level terminfo dependencies for makefiles.
15975
15976 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
15977 # do not need libdl
15978 TICS_LIST=
15979 if test "$with_dlsym" = yes ; then
15980
15981 # remove dl library from $SHLIB_LIST
15982 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
15983
15984 fi
15985
15986 if test "$with_ticlib" != no ; then
15987
15988         if test "$with_ticlib" != yes ; then
15989                 TICS_NAME=$with_ticlib
15990                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15991                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15992                 TICS_LIB_SUFFIX="${with_ticlib}"
15993         else
15994                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
15995                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
15996                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
15997         fi
15998         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
15999 else
16000         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16001 fi
16002
16003 if test "$with_termlib" != no ; then
16004
16005         if test "$with_termlib" != yes ; then
16006                 TINFO_NAME=$with_termlib
16007                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16008                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16009                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16010                 TINFO_LIB_SUFFIX="${with_termlib}"
16011         else
16012                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
16013                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
16014                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
16015                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
16016         fi
16017
16018         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
16019         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
16020         if test "$DFT_LWR_MODEL" = "libtool"; then
16021                 TEST_ARGS="${TEST_DEPS}"
16022                 TEST_ARG2="${TEST_DEP2}"
16023                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
16024         else
16025                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
16026                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
16027                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
16028                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
16029                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
16030         fi
16031 else
16032         # the next lines are needed for linking libtic over libncurses
16033         TINFO_NAME=${LIB_NAME}
16034         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
16035         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
16036         if test "$with_tic_depends" = yes ; then
16037                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16038         else
16039                 TICS_LIST="$SHLIB_LIST"
16040         fi
16041
16042         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16043 fi
16044
16045 if test "$DFT_LWR_MODEL" = shared ; then
16046         case $cf_cv_system_name in #(vi
16047         cygwin*)
16048                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
16049                 TINFO_SUFFIX=.dll
16050                 ;;
16051         esac
16052 fi
16053
16054 if test "$with_dlsym" = yes ; then
16055
16056 # remove dl library from $TICS_LIST
16057 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
16058
16059 fi
16060
16061 if test "$DFT_LWR_MODEL" = "libtool"; then
16062     OBJEXT=lo
16063 fi
16064
16065 # needed for Ada95
16066 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
16067
16068 case $DFT_LWR_MODEL in
16069 normal|debug|profile)
16070
16071 if test "$GCC" = yes ; then
16072         case $cf_cv_system_name in #(
16073         aix[45]*)       #( gcc 4.2.4 linkage on AIX is broken
16074                 LDFLAGS_STATIC=
16075                 LDFLAGS_SHARED=
16076                 ;;
16077     *)  #( normally, except when broken
16078         LDFLAGS_STATIC=-static
16079         LDFLAGS_SHARED=-dynamic
16080         ;;
16081     esac
16082 else
16083         case $cf_cv_system_name in #(
16084         aix[45]*)       #( from ld manpage
16085                 LDFLAGS_STATIC=-bstatic
16086                 LDFLAGS_SHARED=-bdynamic
16087                 ;;
16088         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
16089                 # We could also use just "archive" and "shared".
16090                 LDFLAGS_STATIC=-Wl,-a,archive_shared
16091                 LDFLAGS_SHARED=-Wl,-a,shared_archive
16092                 ;;
16093         irix*)          #( from ld manpage IRIX64
16094                 LDFLAGS_STATIC=-Bstatic
16095                 LDFLAGS_SHARED=-Bdynamic
16096                 ;;
16097         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
16098                 # alternative "-oldstyle_liblookup" (not in cc manpage)
16099                 LDFLAGS_STATIC=-noso
16100                 LDFLAGS_SHARED=-so_archive
16101                 ;;
16102         solaris2*)
16103                 LDFLAGS_STATIC=-Bstatic
16104                 LDFLAGS_SHARED=-Bdynamic
16105                 ;;
16106         esac
16107 fi
16108
16109         ;;
16110 esac
16111
16112 echo "$as_me:16112: checking where we will install curses.h" >&5
16113 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
16114 test "$with_overwrite" = no && \
16115 test "x$includedir" = 'x${prefix}/include' && \
16116         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
16117 echo "$as_me:16117: result: $includedir" >&5
16118 echo "${ECHO_T}$includedir" >&6
16119
16120 ### Resolve a conflict between normal and wide-curses by forcing applications
16121 ### that will need libutf8 to add it to their configure script.
16122 if test "$with_overwrite" != no ; then
16123 if test "$NCURSES_LIBUTF8" = 1 ; then
16124         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
16125         { echo "$as_me:16125: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
16126 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
16127 fi
16128 fi
16129
16130 # used to separate tack out of the tree
16131 NCURSES_TREE=
16132
16133 ### predefined stuff for the test programs
16134 cat >>confdefs.h <<\EOF
16135 #define HAVE_SLK_COLOR 1
16136 EOF
16137
16138 ### Construct the list of subdirectories for which we'll customize makefiles
16139 ### with the appropriate compile-rules.
16140
16141 echo "$as_me:16141: checking for src modules" >&5
16142 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
16143
16144 # dependencies and linker-arguments for test-programs
16145 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
16146 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
16147 if test "$DFT_LWR_MODEL" = "libtool"; then
16148         TEST_ARGS="${TEST_DEPS}"
16149         TEST_ARG2="${TEST_DEP2}"
16150 else
16151         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
16152         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
16153 fi
16154
16155 cf_cv_src_modules=
16156 for cf_dir in $modules_to_build
16157 do
16158         if test -f $srcdir/$cf_dir/modules; then
16159
16160                 # We may/may not have tack in the distribution, though the
16161                 # makefile is.
16162                 if test $cf_dir = tack ; then
16163                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
16164                                 continue
16165                         fi
16166                 fi
16167
16168                 if test -z "$cf_cv_src_modules"; then
16169                         cf_cv_src_modules=$cf_dir
16170                 else
16171                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
16172                 fi
16173
16174                 # Make the ncurses_cfg.h file record the library interface files as
16175                 # well.  These are header files that are the same name as their
16176                 # directory.  Ncurses is the only library that does not follow
16177                 # that pattern.
16178                 if test $cf_dir = tack ; then
16179                         continue
16180                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
16181
16182 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16183
16184                         cat >>confdefs.h <<EOF
16185 #define HAVE_${cf_have_include}_H 1
16186 EOF
16187
16188                         cat >>confdefs.h <<EOF
16189 #define HAVE_LIB${cf_have_include} 1
16190 EOF
16191
16192                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
16193                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
16194                         if test "$DFT_LWR_MODEL" = "libtool"; then
16195                                 TEST_ARGS="${TEST_DEPS}"
16196                                 TEST_ARG2="${TEST_DEP2}"
16197                         else
16198                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
16199                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
16200                         fi
16201                 fi
16202         fi
16203 done
16204 echo "$as_me:16204: result: $cf_cv_src_modules" >&5
16205 echo "${ECHO_T}$cf_cv_src_modules" >&6
16206
16207 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
16208 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
16209
16210 SRC_SUBDIRS="man include"
16211 for cf_dir in $cf_cv_src_modules
16212 do
16213         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
16214 done
16215 SRC_SUBDIRS="$SRC_SUBDIRS test"
16216 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
16217 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
16218
16219 ADA_SUBDIRS=
16220 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
16221    SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
16222    ADA_SUBDIRS="gen src samples"
16223 fi
16224
16225 SUB_MAKEFILES=
16226 for cf_dir in $SRC_SUBDIRS
16227 do
16228         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
16229 done
16230
16231 if test -n "$ADA_SUBDIRS"; then
16232    for cf_dir in $ADA_SUBDIRS
16233    do
16234       SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
16235    done
16236
16237 fi
16238
16239 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
16240    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses-config"
16241 fi
16242
16243 DIRS_TO_MAKE="lib"
16244 for cf_item in $cf_list_models
16245 do
16246
16247         case $cf_item in
16248         libtool) cf_subdir='obj_lo'  ;;
16249         normal)  cf_subdir='objects' ;;
16250         debug)   cf_subdir='obj_g' ;;
16251         profile) cf_subdir='obj_p' ;;
16252         shared)
16253                 case $cf_cv_system_name in #(vi
16254                 cygwin) #(vi
16255                         cf_subdir='objects' ;;
16256                 *)
16257                         cf_subdir='obj_s' ;;
16258                 esac
16259         esac
16260
16261         for cf_item2 in $DIRS_TO_MAKE
16262         do
16263                 test $cf_item2 = $cf_subdir && break
16264         done
16265         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
16266 done
16267 for cf_dir in $DIRS_TO_MAKE
16268 do
16269         test ! -d $cf_dir && mkdir $cf_dir
16270 done
16271
16272 cat >>confdefs.h <<EOF
16273 #define NCURSES_PATHSEP '$PATHSEP'
16274 EOF
16275
16276 cat >>confdefs.h <<EOF
16277 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
16278 EOF
16279
16280 ### Now that we're done running tests, add the compiler-warnings, if any
16281
16282 cf_fix_cppflags=no
16283 cf_new_cflags=
16284 cf_new_cppflags=
16285 cf_new_extra_cppflags=
16286
16287 for cf_add_cflags in $EXTRA_CFLAGS
16288 do
16289 case $cf_fix_cppflags in
16290 no)
16291         case $cf_add_cflags in #(vi
16292         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
16293                 case $cf_add_cflags in
16294                 -D*)
16295                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16296
16297                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
16298                         && test -z "${cf_tst_cflags}" \
16299                         && cf_fix_cppflags=yes
16300
16301                         if test $cf_fix_cppflags = yes ; then
16302                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16303                                 continue
16304                         elif test "${cf_tst_cflags}" = "\"'" ; then
16305                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16306                                 continue
16307                         fi
16308                         ;;
16309                 esac
16310                 case "$CPPFLAGS" in
16311                 *$cf_add_cflags) #(vi
16312                         ;;
16313                 *) #(vi
16314                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16315                         ;;
16316                 esac
16317                 ;;
16318         *)
16319                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16320                 ;;
16321         esac
16322         ;;
16323 yes)
16324         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16325
16326         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16327
16328         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
16329         && test -z "${cf_tst_cflags}" \
16330         && cf_fix_cppflags=no
16331         ;;
16332 esac
16333 done
16334
16335 if test -n "$cf_new_cflags" ; then
16336
16337         CFLAGS="$CFLAGS $cf_new_cflags"
16338 fi
16339
16340 if test -n "$cf_new_cppflags" ; then
16341
16342         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
16343 fi
16344
16345 if test -n "$cf_new_extra_cppflags" ; then
16346
16347         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
16348 fi
16349
16350 ### If we're building with rpath, try to link non-standard libs that way too.
16351 if test "$DFT_LWR_MODEL" = "shared"; then
16352
16353 echo "$as_me:16353: checking for updated LDFLAGS" >&5
16354 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
16355 if test -n "$LDFLAGS" ; then
16356 echo "$as_me:16356: result: maybe" >&5
16357 echo "${ECHO_T}maybe" >&6
16358 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
16359
16360 echo "${as_me-configure}:16360: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
16361
16362 test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
16363
16364 echo "${as_me-configure}:16364: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
16365
16366 case "$EXTRA_LDFLAGS" in #(vi
16367 -Wl,-rpath,*) #(vi
16368         cf_rpath_hack="-Wl,-rpath,"
16369         ;;
16370 -R\ *)
16371         cf_rpath_hack="-R "
16372         ;;
16373 -R*)
16374         cf_rpath_hack="-R"
16375         ;;
16376 *)
16377         cf_rpath_hack=
16378         ;;
16379 esac
16380 if test -n "$cf_rpath_hack" ; then
16381         cf_rpath_dst=
16382         for cf_rpath_src in $LDFLAGS
16383         do
16384                 test -n "$verbose" && echo "    Filtering $cf_rpath_src" 1>&6
16385
16386 echo "${as_me-configure}:16386: testing Filtering $cf_rpath_src ..." 1>&5
16387
16388                 case $cf_rpath_src in #(vi
16389                 -L*) #(vi
16390                         if test "$cf_rpath_hack" = "-R " ; then
16391                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e 's%-L%-R %'`
16392                         else
16393                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e s%-L%$cf_rpath_hack%`
16394                         fi
16395                         test -n "$verbose" && echo "    ...Filter $cf_rpath_tmp" 1>&6
16396
16397 echo "${as_me-configure}:16397: testing ...Filter $cf_rpath_tmp ..." 1>&5
16398
16399                         EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
16400                         ;;
16401                 esac
16402                 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
16403         done
16404         LDFLAGS=$cf_rpath_dst
16405         test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
16406
16407 echo "${as_me-configure}:16407: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
16408
16409         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
16410
16411 echo "${as_me-configure}:16411: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
16412
16413 fi
16414 else
16415 echo "$as_me:16415: result: no" >&5
16416 echo "${ECHO_T}no" >&6
16417 fi
16418
16419 fi
16420
16421 ### Define substitutions for header files to avoid name-pollution
16422
16423 if test "$cf_cv_have_tcgetattr" = yes ; then
16424         HAVE_TCGETATTR=1
16425 else
16426         HAVE_TCGETATTR=0
16427 fi
16428
16429 if test "$ac_cv_header_termio_h" = yes ; then
16430         HAVE_TERMIO_H=1
16431 else
16432         HAVE_TERMIO_H=0
16433 fi
16434
16435 if test "$ac_cv_header_termios_h" = yes ; then
16436         HAVE_TERMIOS_H=1
16437 else
16438         HAVE_TERMIOS_H=0
16439 fi
16440
16441 ################################################################################
16442 test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
16443 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
16444 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"
16445 ac_config_commands="$ac_config_commands default"
16446 cat >confcache <<\_ACEOF
16447 # This file is a shell script that caches the results of configure
16448 # tests run on this system so they can be shared between configure
16449 # scripts and configure runs, see configure's option --config-cache.
16450 # It is not useful on other systems.  If it contains results you don't
16451 # want to keep, you may remove or edit it.
16452 #
16453 # config.status only pays attention to the cache file if you give it
16454 # the --recheck option to rerun configure.
16455 #
16456 # `ac_cv_env_foo' variables (set or unset) will be overriden when
16457 # loading this file, other *unset* `ac_cv_foo' will be assigned the
16458 # following values.
16459
16460 _ACEOF
16461
16462 # The following way of writing the cache mishandles newlines in values,
16463 # but we know of no workaround that is simple, portable, and efficient.
16464 # So, don't put newlines in cache variables' values.
16465 # Ultrix sh set writes to stderr and can't be redirected directly,
16466 # and sets the high bit in the cache file unless we assign to the vars.
16467 {
16468   (set) 2>&1 |
16469     case `(ac_space=' '; set | grep ac_space) 2>&1` in
16470     *ac_space=\ *)
16471       # `set' does not quote correctly, so add quotes (double-quote
16472       # substitution turns \\\\ into \\, and sed turns \\ into \).
16473       sed -n \
16474         "s/'/'\\\\''/g;
16475           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16476       ;;
16477     *)
16478       # `set' quotes correctly as required by POSIX, so do not add quotes.
16479       sed -n \
16480         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16481       ;;
16482     esac;
16483 } |
16484   sed '
16485      t clear
16486      : clear
16487      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16488      t end
16489      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16490      : end' >>confcache
16491 if cmp -s $cache_file confcache; then :; else
16492   if test -w $cache_file; then
16493     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16494     cat confcache >$cache_file
16495   else
16496     echo "not updating unwritable cache $cache_file"
16497   fi
16498 fi
16499 rm -f confcache
16500
16501 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16502 # Let make expand exec_prefix.
16503 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16504
16505 # VPATH may cause trouble with some makes, so we remove $(srcdir),
16506 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16507 # trailing colons and then remove the whole line if VPATH becomes empty
16508 # (actually we leave an empty line to preserve line numbers).
16509 if test "x$srcdir" = x.; then
16510   ac_vpsub='/^[         ]*VPATH[        ]*=/{
16511 s/:*\$(srcdir):*/:/;
16512 s/:*\${srcdir}:*/:/;
16513 s/:*@srcdir@:*/:/;
16514 s/^\([^=]*=[    ]*\):*/\1/;
16515 s/:*$//;
16516 s/^[^=]*=[      ]*$//;
16517 }'
16518 fi
16519
16520 DEFS=-DHAVE_CONFIG_H
16521
16522 : ${CONFIG_STATUS=./config.status}
16523 ac_clean_files_save=$ac_clean_files
16524 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16525 { echo "$as_me:16525: creating $CONFIG_STATUS" >&5
16526 echo "$as_me: creating $CONFIG_STATUS" >&6;}
16527 cat >$CONFIG_STATUS <<_ACEOF
16528 #! $SHELL
16529 # Generated automatically by configure.
16530 # Run this file to recreate the current configuration.
16531 # Compiler output produced by configure, useful for debugging
16532 # configure, is in config.log if it exists.
16533
16534 debug=false
16535 SHELL=\${CONFIG_SHELL-$SHELL}
16536 ac_cs_invocation="\$0 \$@"
16537
16538 _ACEOF
16539
16540 cat >>$CONFIG_STATUS <<\_ACEOF
16541 # Be Bourne compatible
16542 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16543   emulate sh
16544   NULLCMD=:
16545 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16546   set -o posix
16547 fi
16548
16549 # Name of the executable.
16550 as_me=`echo "$0" |sed 's,.*[\\/],,'`
16551
16552 if expr a : '\(a\)' >/dev/null 2>&1; then
16553   as_expr=expr
16554 else
16555   as_expr=false
16556 fi
16557
16558 rm -f conf$$ conf$$.exe conf$$.file
16559 echo >conf$$.file
16560 if ln -s conf$$.file conf$$ 2>/dev/null; then
16561   # We could just check for DJGPP; but this test a) works b) is more generic
16562   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16563   if test -f conf$$.exe; then
16564     # Don't use ln at all; we don't have any links
16565     as_ln_s='cp -p'
16566   else
16567     as_ln_s='ln -s'
16568   fi
16569 elif ln conf$$.file conf$$ 2>/dev/null; then
16570   as_ln_s=ln
16571 else
16572   as_ln_s='cp -p'
16573 fi
16574 rm -f conf$$ conf$$.exe conf$$.file
16575
16576 as_executable_p="test -f"
16577
16578 # Support unset when possible.
16579 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16580   as_unset=unset
16581 else
16582   as_unset=false
16583 fi
16584
16585 # NLS nuisances.
16586 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
16587 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
16588 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
16589 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
16590 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
16591 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
16592 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
16593 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
16594
16595 # IFS
16596 # We need space, tab and new line, in precisely that order.
16597 as_nl='
16598 '
16599 IFS="   $as_nl"
16600
16601 # CDPATH.
16602 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
16603
16604 exec 6>&1
16605
16606 _ACEOF
16607
16608 # Files that config.status was made for.
16609 if test -n "$ac_config_files"; then
16610   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16611 fi
16612
16613 if test -n "$ac_config_headers"; then
16614   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16615 fi
16616
16617 if test -n "$ac_config_links"; then
16618   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16619 fi
16620
16621 if test -n "$ac_config_commands"; then
16622   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16623 fi
16624
16625 cat >>$CONFIG_STATUS <<\EOF
16626
16627 ac_cs_usage="\
16628 \`$as_me' instantiates files from templates according to the
16629 current configuration.
16630
16631 Usage: $0 [OPTIONS] [FILE]...
16632
16633   -h, --help       print this help, then exit
16634   -V, --version    print version number, then exit
16635   -d, --debug      don't remove temporary files
16636       --recheck    update $as_me by reconfiguring in the same conditions
16637   --file=FILE[:TEMPLATE]
16638                    instantiate the configuration file FILE
16639   --header=FILE[:TEMPLATE]
16640                    instantiate the configuration header FILE
16641
16642 Configuration files:
16643 $config_files
16644
16645 Configuration headers:
16646 $config_headers
16647
16648 Configuration commands:
16649 $config_commands
16650
16651 Report bugs to <bug-autoconf@gnu.org>."
16652 EOF
16653
16654 cat >>$CONFIG_STATUS <<EOF
16655 ac_cs_version="\\
16656 config.status
16657 configured by $0, generated by GNU Autoconf 2.52.20080325,
16658   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16659
16660 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16661 Free Software Foundation, Inc.
16662 This config.status script is free software; the Free Software Foundation
16663 gives unlimited permission to copy, distribute and modify it."
16664 srcdir=$srcdir
16665 INSTALL="$INSTALL"
16666 EOF
16667
16668 cat >>$CONFIG_STATUS <<\EOF
16669 # If no file are specified by the user, then we need to provide default
16670 # value.  By we need to know if files were specified by the user.
16671 ac_need_defaults=:
16672 while test $# != 0
16673 do
16674   case $1 in
16675   --*=*)
16676     ac_option=`expr "x$1" : 'x\([^=]*\)='`
16677     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16678     shift
16679     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16680     shift
16681     ;;
16682   -*);;
16683   *) # This is not an option, so the user has probably given explicit
16684      # arguments.
16685      ac_need_defaults=false;;
16686   esac
16687
16688   case $1 in
16689   # Handling of the options.
16690 EOF
16691 cat >>$CONFIG_STATUS <<EOF
16692   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16693     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16694     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16695 EOF
16696 cat >>$CONFIG_STATUS <<\EOF
16697   --version | --vers* | -V )
16698     echo "$ac_cs_version"; exit 0 ;;
16699   --he | --h)
16700     # Conflict between --help and --header
16701     { { echo "$as_me:16701: error: ambiguous option: $1
16702 Try \`$0 --help' for more information." >&5
16703 echo "$as_me: error: ambiguous option: $1
16704 Try \`$0 --help' for more information." >&2;}
16705    { (exit 1); exit 1; }; };;
16706   --help | --hel | -h )
16707     echo "$ac_cs_usage"; exit 0 ;;
16708   --debug | --d* | -d )
16709     debug=: ;;
16710   --file | --fil | --fi | --f )
16711     shift
16712     CONFIG_FILES="$CONFIG_FILES $1"
16713     ac_need_defaults=false;;
16714   --header | --heade | --head | --hea )
16715     shift
16716     CONFIG_HEADERS="$CONFIG_HEADERS $1"
16717     ac_need_defaults=false;;
16718
16719   # This is an error.
16720   -*) { { echo "$as_me:16720: error: unrecognized option: $1
16721 Try \`$0 --help' for more information." >&5
16722 echo "$as_me: error: unrecognized option: $1
16723 Try \`$0 --help' for more information." >&2;}
16724    { (exit 1); exit 1; }; } ;;
16725
16726   *) ac_config_targets="$ac_config_targets $1" ;;
16727
16728   esac
16729   shift
16730 done
16731
16732 exec 5>>config.log
16733 cat >&5 << _ACEOF
16734
16735 ## ----------------------- ##
16736 ## Running config.status.  ##
16737 ## ----------------------- ##
16738
16739 This file was extended by $as_me 2.52.20080325, executed with
16740   CONFIG_FILES    = $CONFIG_FILES
16741   CONFIG_HEADERS  = $CONFIG_HEADERS
16742   CONFIG_LINKS    = $CONFIG_LINKS
16743   CONFIG_COMMANDS = $CONFIG_COMMANDS
16744   > $ac_cs_invocation
16745 on `(hostname || uname -n) 2>/dev/null | sed 1q`
16746
16747 _ACEOF
16748 EOF
16749
16750 cat >>$CONFIG_STATUS <<EOF
16751 #
16752 # INIT-COMMANDS section.
16753 #
16754
16755 ### Special initialization commands, used to pass information from the
16756 ### configuration-run into config.status
16757
16758 AWK="$AWK"
16759 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
16760 DFT_LWR_MODEL="$DFT_LWR_MODEL"
16761 ECHO_LINK="$ECHO_LINK"
16762 LDCONFIG="$LDCONFIG"
16763 LIB_NAME="$LIB_NAME"
16764 LIB_SUBSETS="$LIB_SUBSETS"
16765 LIB_SUFFIX="$LIB_SUFFIX"
16766 LIB_TRACING="$LIB_TRACING"
16767 MAKE_TERMINFO="$MAKE_TERMINFO"
16768 NCURSES_MAJOR="$NCURSES_MAJOR"
16769 NCURSES_MINOR="$NCURSES_MINOR"
16770 NCURSES_OSPEED="$NCURSES_OSPEED"
16771 NCURSES_PATCH="$NCURSES_PATCH"
16772 SRC_SUBDIRS="$SRC_SUBDIRS"
16773 TERMINFO="$TERMINFO"
16774 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
16775 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
16776 TINFO_NAME="$TINFO_NAME"
16777 TINFO_SUFFIX="$TINFO_SUFFIX"
16778 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
16779 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
16780 TICS_NAME="$TICS_NAME"
16781 WITH_CURSES_H="$with_curses_h"
16782 WITH_ECHO="$with_echo"
16783 WITH_OVERWRITE="$with_overwrite"
16784 cf_LIST_MODELS="$cf_list_models"
16785 cf_cv_abi_version="$cf_cv_abi_version"
16786 cf_cv_do_relink="$cf_cv_do_relink"
16787 cf_cv_do_symlinks="$cf_cv_do_symlinks"
16788 cf_cv_enable_lp64="$cf_cv_enable_lp64"
16789 cf_cv_enable_opaque="$cf_cv_enable_opaque"
16790 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
16791 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
16792 cf_cv_rel_version="$cf_cv_rel_version"
16793 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
16794 cf_cv_shared_soname='$cf_cv_shared_soname'
16795 cf_cv_shlib_version="$cf_cv_shlib_version"
16796 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
16797 cf_cv_system_name="$cf_cv_system_name"
16798 cf_with_cxx_binding="$cf_with_cxx_binding"
16799 host="$host"
16800 target="$target"
16801
16802 EOF
16803
16804 cat >>$CONFIG_STATUS <<\EOF
16805 for ac_config_target in $ac_config_targets
16806 do
16807   case "$ac_config_target" in
16808   # Handling of arguments.
16809   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
16810   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
16811   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
16812   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
16813   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
16814   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16815   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16816   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
16817   *) { { echo "$as_me:16817: error: invalid argument: $ac_config_target" >&5
16818 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16819    { (exit 1); exit 1; }; };;
16820   esac
16821 done
16822
16823 # If the user did not use the arguments to specify the items to instantiate,
16824 # then the envvar interface is used.  Set only those that are not.
16825 # We use the long form for the default assignment because of an extremely
16826 # bizarre bug on SunOS 4.1.3.
16827 if $ac_need_defaults; then
16828   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16829   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16830   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16831 fi
16832
16833 # Create a temporary directory, and hook for its removal unless debugging.
16834 $debug ||
16835 {
16836   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16837   trap '{ (exit 1); exit 1; }' 1 2 13 15
16838 }
16839
16840 # Create a (secure) tmp directory for tmp files.
16841 : ${TMPDIR=/tmp}
16842 {
16843   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16844   test -n "$tmp" && test -d "$tmp"
16845 }  ||
16846 {
16847   tmp=$TMPDIR/cs$$-$RANDOM
16848   (umask 077 && mkdir $tmp)
16849 } ||
16850 {
16851    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16852    { (exit 1); exit 1; }
16853 }
16854
16855 EOF
16856
16857 cat >>$CONFIG_STATUS <<EOF
16858
16859 #
16860 # CONFIG_FILES section.
16861 #
16862
16863 # No need to generate the scripts if there are no CONFIG_FILES.
16864 # This happens for instance when ./config.status config.h
16865 if test -n "\$CONFIG_FILES"; then
16866   # Protect against being on the right side of a sed subst in config.status.
16867   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16868    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16869 s,@SHELL@,$SHELL,;t t
16870 s,@exec_prefix@,$exec_prefix,;t t
16871 s,@prefix@,$prefix,;t t
16872 s,@program_transform_name@,$program_transform_name,;t t
16873 s,@bindir@,$bindir,;t t
16874 s,@sbindir@,$sbindir,;t t
16875 s,@libexecdir@,$libexecdir,;t t
16876 s,@datadir@,$datadir,;t t
16877 s,@sysconfdir@,$sysconfdir,;t t
16878 s,@sharedstatedir@,$sharedstatedir,;t t
16879 s,@localstatedir@,$localstatedir,;t t
16880 s,@libdir@,$libdir,;t t
16881 s,@includedir@,$includedir,;t t
16882 s,@oldincludedir@,$oldincludedir,;t t
16883 s,@infodir@,$infodir,;t t
16884 s,@mandir@,$mandir,;t t
16885 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16886 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16887 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16888 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16889 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16890 s,@build_alias@,$build_alias,;t t
16891 s,@host_alias@,$host_alias,;t t
16892 s,@target_alias@,$target_alias,;t t
16893 s,@ECHO_C@,$ECHO_C,;t t
16894 s,@ECHO_N@,$ECHO_N,;t t
16895 s,@ECHO_T@,$ECHO_T,;t t
16896 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16897 s,@DEFS@,$DEFS,;t t
16898 s,@LIBS@,$LIBS,;t t
16899 s,@top_builddir@,$top_builddir,;t t
16900 s,@EGREP@,$EGREP,;t t
16901 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
16902 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
16903 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
16904 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
16905 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
16906 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
16907 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
16908 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
16909 s,@build@,$build,;t t
16910 s,@build_cpu@,$build_cpu,;t t
16911 s,@build_vendor@,$build_vendor,;t t
16912 s,@build_os@,$build_os,;t t
16913 s,@host@,$host,;t t
16914 s,@host_cpu@,$host_cpu,;t t
16915 s,@host_vendor@,$host_vendor,;t t
16916 s,@host_os@,$host_os,;t t
16917 s,@target@,$target,;t t
16918 s,@target_cpu@,$target_cpu,;t t
16919 s,@target_vendor@,$target_vendor,;t t
16920 s,@target_os@,$target_os,;t t
16921 s,@CC@,$CC,;t t
16922 s,@CFLAGS@,$CFLAGS,;t t
16923 s,@LDFLAGS@,$LDFLAGS,;t t
16924 s,@CPPFLAGS@,$CPPFLAGS,;t t
16925 s,@ac_ct_CC@,$ac_ct_CC,;t t
16926 s,@EXEEXT@,$EXEEXT,;t t
16927 s,@OBJEXT@,$OBJEXT,;t t
16928 s,@CPP@,$CPP,;t t
16929 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
16930 s,@PROG_EXT@,$PROG_EXT,;t t
16931 s,@LDCONFIG@,$LDCONFIG,;t t
16932 s,@CXX@,$CXX,;t t
16933 s,@CXXFLAGS@,$CXXFLAGS,;t t
16934 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
16935 s,@AWK@,$AWK,;t t
16936 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16937 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16938 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16939 s,@LINT@,$LINT,;t t
16940 s,@LINT_OPTS@,$LINT_OPTS,;t t
16941 s,@LN_S@,$LN_S,;t t
16942 s,@SET_MAKE@,$SET_MAKE,;t t
16943 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
16944 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
16945 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
16946 s,@RANLIB@,$RANLIB,;t t
16947 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16948 s,@LD@,$LD,;t t
16949 s,@ac_ct_LD@,$ac_ct_LD,;t t
16950 s,@AR@,$AR,;t t
16951 s,@ac_ct_AR@,$ac_ct_AR,;t t
16952 s,@AR_OPTS@,$AR_OPTS,;t t
16953 s,@DESTDIR@,$DESTDIR,;t t
16954 s,@BUILD_CC@,$BUILD_CC,;t t
16955 s,@BUILD_CPP@,$BUILD_CPP,;t t
16956 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
16957 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
16958 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
16959 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
16960 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
16961 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
16962 s,@cf_list_models@,$cf_list_models,;t t
16963 s,@LIBTOOL@,$LIBTOOL,;t t
16964 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
16965 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
16966 s,@LIB_CREATE@,$LIB_CREATE,;t t
16967 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
16968 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
16969 s,@LIB_PREP@,$LIB_PREP,;t t
16970 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
16971 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
16972 s,@LIB_LINK@,$LIB_LINK,;t t
16973 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
16974 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
16975 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
16976 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
16977 s,@TICS_NAME@,$TICS_NAME,;t t
16978 s,@TINFO_NAME@,$TINFO_NAME,;t t
16979 s,@LIB_NAME@,$LIB_NAME,;t t
16980 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
16981 s,@CC_G_OPT@,$CC_G_OPT,;t t
16982 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
16983 s,@LD_MODEL@,$LD_MODEL,;t t
16984 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
16985 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
16986 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
16987 s,@LINK_PROGS@,$LINK_PROGS,;t t
16988 s,@LINK_TESTS@,$LINK_TESTS,;t t
16989 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
16990 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
16991 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
16992 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
16993 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
16994 s,@PATHSEP@,$PATHSEP,;t t
16995 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
16996 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
16997 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
16998 s,@TERMINFO@,$TERMINFO,;t t
16999 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
17000 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
17001 s,@TERMPATH@,$TERMPATH,;t t
17002 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
17003 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
17004 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
17005 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
17006 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
17007 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
17008 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
17009 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
17010 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
17011 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
17012 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
17013 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
17014 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
17015 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
17016 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
17017 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
17018 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
17019 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
17020 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
17021 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
17022 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
17023 s,@PTHREAD@,$PTHREAD,;t t
17024 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
17025 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
17026 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
17027 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
17028 s,@ECHO_LINK@,$ECHO_LINK,;t t
17029 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
17030 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
17031 s,@ADA_TRACE@,$ADA_TRACE,;t t
17032 s,@MATH_LIB@,$MATH_LIB,;t t
17033 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
17034 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
17035 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
17036 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
17037 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
17038 s,@TEST_LIBS@,$TEST_LIBS,;t t
17039 s,@CXXCPP@,$CXXCPP,;t t
17040 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
17041 s,@CXX_AR@,$CXX_AR,;t t
17042 s,@CXX_AR_OPTS@,$CXX_AR_OPTS,;t t
17043 s,@CXXLIBS@,$CXXLIBS,;t t
17044 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
17045 s,@gnat_exists@,$gnat_exists,;t t
17046 s,@M4_exists@,$M4_exists,;t t
17047 s,@cf_ada_make@,$cf_ada_make,;t t
17048 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
17049 s,@cf_ada_package@,$cf_ada_package,;t t
17050 s,@ADAFLAGS@,$ADAFLAGS,;t t
17051 s,@cf_compile_generics@,$cf_compile_generics,;t t
17052 s,@cf_generic_objects@,$cf_generic_objects,;t t
17053 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
17054 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
17055 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
17056 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
17057 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
17058 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
17059 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
17060 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
17061 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
17062 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
17063 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
17064 s,@TICS_ARGS@,$TICS_ARGS,;t t
17065 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
17066 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
17067 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
17068 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
17069 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
17070 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
17071 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
17072 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
17073 s,@TICS_LIST@,$TICS_LIST,;t t
17074 s,@TINFO_LIST@,$TINFO_LIST,;t t
17075 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
17076 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
17077 s,@TEST_ARGS@,$TEST_ARGS,;t t
17078 s,@TEST_DEPS@,$TEST_DEPS,;t t
17079 s,@TEST_ARG2@,$TEST_ARG2,;t t
17080 s,@TEST_DEP2@,$TEST_DEP2,;t t
17081 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
17082 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
17083 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
17084 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
17085 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
17086 CEOF
17087
17088 EOF
17089
17090   cat >>$CONFIG_STATUS <<\EOF
17091   # Split the substitutions into bite-sized pieces for seds with
17092   # small command number limits, like on Digital OSF/1 and HP-UX.
17093   ac_max_sed_lines=48
17094   ac_sed_frag=1 # Number of current file.
17095   ac_beg=1 # First line for current file.
17096   ac_end=$ac_max_sed_lines # Line after last line for current file.
17097   ac_more_lines=:
17098   ac_sed_cmds=
17099   while $ac_more_lines; do
17100     if test $ac_beg -gt 1; then
17101       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17102     else
17103       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17104     fi
17105     if test ! -s $tmp/subs.frag; then
17106       ac_more_lines=false
17107     else
17108       # The purpose of the label and of the branching condition is to
17109       # speed up the sed processing (if there are no `@' at all, there
17110       # is no need to browse any of the substitutions).
17111       # These are the two extra sed commands mentioned above.
17112       (echo ':t
17113   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17114       if test -z "$ac_sed_cmds"; then
17115         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17116       else
17117         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17118       fi
17119       ac_sed_frag=`expr $ac_sed_frag + 1`
17120       ac_beg=$ac_end
17121       ac_end=`expr $ac_end + $ac_max_sed_lines`
17122     fi
17123   done
17124   if test -z "$ac_sed_cmds"; then
17125     ac_sed_cmds=cat
17126   fi
17127 fi # test -n "$CONFIG_FILES"
17128
17129 EOF
17130 cat >>$CONFIG_STATUS <<\EOF
17131 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17132   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17133   case $ac_file in
17134   - | *:- | *:-:* ) # input from stdin
17135         cat >$tmp/stdin
17136         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17137         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17138   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17139         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17140   * )   ac_file_in=$ac_file.in ;;
17141   esac
17142
17143   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17144   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17145          X"$ac_file" : 'X\(//\)[^/]' \| \
17146          X"$ac_file" : 'X\(//\)$' \| \
17147          X"$ac_file" : 'X\(/\)' \| \
17148          .     : '\(.\)' 2>/dev/null ||
17149 echo X"$ac_file" |
17150     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17151           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17152           /^X\(\/\/\)$/{ s//\1/; q; }
17153           /^X\(\/\).*/{ s//\1/; q; }
17154           s/.*/./; q'`
17155   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17156     { case "$ac_dir" in
17157   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17158   *)                      as_incr_dir=.;;
17159 esac
17160 as_dummy="$ac_dir"
17161 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17162   case $as_mkdir_dir in
17163     # Skip DOS drivespec
17164     ?:) as_incr_dir=$as_mkdir_dir ;;
17165     *)
17166       as_incr_dir=$as_incr_dir/$as_mkdir_dir
17167       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17168     ;;
17169   esac
17170 done; }
17171
17172     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
17173     # A "../" for each directory in $ac_dir_suffix.
17174     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
17175   else
17176     ac_dir_suffix= ac_dots=
17177   fi
17178
17179   case $srcdir in
17180   .)  ac_srcdir=.
17181       if test -z "$ac_dots"; then
17182          ac_top_srcdir=.
17183       else
17184          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
17185       fi ;;
17186   [\\/]* | ?:[\\/]* )
17187       ac_srcdir=$srcdir$ac_dir_suffix;
17188       ac_top_srcdir=$srcdir ;;
17189   *) # Relative path.
17190     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
17191     ac_top_srcdir=$ac_dots$srcdir ;;
17192   esac
17193
17194   case $INSTALL in
17195   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17196   *) ac_INSTALL=$ac_dots$INSTALL ;;
17197   esac
17198
17199   if test x"$ac_file" != x-; then
17200     { echo "$as_me:17200: creating $ac_file" >&5
17201 echo "$as_me: creating $ac_file" >&6;}
17202     rm -f "$ac_file"
17203   fi
17204   # Let's still pretend it is `configure' which instantiates (i.e., don't
17205   # use $as_me), people would be surprised to read:
17206   #    /* config.h.  Generated automatically by config.status.  */
17207   configure_input="Generated automatically from `echo $ac_file_in |
17208                                                  sed 's,.*/,,'` by configure."
17209
17210   # First look for the input files in the build tree, otherwise in the
17211   # src tree.
17212   ac_file_inputs=`IFS=:
17213     for f in $ac_file_in; do
17214       case $f in
17215       -) echo $tmp/stdin ;;
17216       [\\/$]*)
17217          # Absolute (can't be DOS-style, as IFS=:)
17218          test -f "$f" || { { echo "$as_me:17218: error: cannot find input file: $f" >&5
17219 echo "$as_me: error: cannot find input file: $f" >&2;}
17220    { (exit 1); exit 1; }; }
17221          echo $f;;
17222       *) # Relative
17223          if test -f "$f"; then
17224            # Build tree
17225            echo $f
17226          elif test -f "$srcdir/$f"; then
17227            # Source tree
17228            echo $srcdir/$f
17229          else
17230            # /dev/null tree
17231            { { echo "$as_me:17231: error: cannot find input file: $f" >&5
17232 echo "$as_me: error: cannot find input file: $f" >&2;}
17233    { (exit 1); exit 1; }; }
17234          fi;;
17235       esac
17236     done` || { (exit 1); exit 1; }
17237 EOF
17238 cat >>$CONFIG_STATUS <<EOF
17239   sed "$ac_vpsub
17240 $extrasub
17241 EOF
17242 cat >>$CONFIG_STATUS <<\EOF
17243 :t
17244 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17245 s,@configure_input@,$configure_input,;t t
17246 s,@srcdir@,$ac_srcdir,;t t
17247 s,@top_srcdir@,$ac_top_srcdir,;t t
17248 s,@INSTALL@,$ac_INSTALL,;t t
17249 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17250   rm -f $tmp/stdin
17251   if test x"$ac_file" != x-; then
17252     mv $tmp/out $ac_file
17253   else
17254     cat $tmp/out
17255     rm -f $tmp/out
17256   fi
17257
17258 done
17259 EOF
17260 cat >>$CONFIG_STATUS <<\EOF
17261
17262 #
17263 # CONFIG_HEADER section.
17264 #
17265
17266 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17267 # NAME is the cpp macro being defined and VALUE is the value it is being given.
17268 #
17269 # ac_d sets the value in "#define NAME VALUE" lines.
17270 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
17271 ac_dB='[        ].*$,\1#\2'
17272 ac_dC=' '
17273 ac_dD=',;t'
17274 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
17275 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17276 ac_iB='\([      ]\),\1#\2define\3'
17277 ac_iC=' '
17278 ac_iD='\4,;t'
17279 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17280 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17281 ac_uB='$,\1#\2define\3'
17282 ac_uC=' '
17283 ac_uD=',;t'
17284
17285 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
17286   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17287   case $ac_file in
17288   - | *:- | *:-:* ) # input from stdin
17289         cat >$tmp/stdin
17290         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17291         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17292   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17293         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17294   * )   ac_file_in=$ac_file.in ;;
17295   esac
17296
17297   test x"$ac_file" != x- && { echo "$as_me:17297: creating $ac_file" >&5
17298 echo "$as_me: creating $ac_file" >&6;}
17299
17300   # First look for the input files in the build tree, otherwise in the
17301   # src tree.
17302   ac_file_inputs=`IFS=:
17303     for f in $ac_file_in; do
17304       case $f in
17305       -) echo $tmp/stdin ;;
17306       [\\/$]*)
17307          # Absolute (can't be DOS-style, as IFS=:)
17308          test -f "$f" || { { echo "$as_me:17308: error: cannot find input file: $f" >&5
17309 echo "$as_me: error: cannot find input file: $f" >&2;}
17310    { (exit 1); exit 1; }; }
17311          echo $f;;
17312       *) # Relative
17313          if test -f "$f"; then
17314            # Build tree
17315            echo $f
17316          elif test -f "$srcdir/$f"; then
17317            # Source tree
17318            echo $srcdir/$f
17319          else
17320            # /dev/null tree
17321            { { echo "$as_me:17321: error: cannot find input file: $f" >&5
17322 echo "$as_me: error: cannot find input file: $f" >&2;}
17323    { (exit 1); exit 1; }; }
17324          fi;;
17325       esac
17326     done` || { (exit 1); exit 1; }
17327   # Remove the trailing spaces.
17328   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
17329
17330 EOF
17331
17332 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
17333 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
17334 # be either 'cat' or 'sort'.
17335 cat confdefs.h | uniq >conftest.vals
17336
17337 # Break up conftest.vals because some shells have a limit on
17338 # the size of here documents, and old seds have small limits too.
17339
17340 rm -f conftest.tail
17341 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
17342 while grep . conftest.vals >/dev/null
17343 do
17344   # Write chunks of a limited-size here document to conftest.frag.
17345   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
17346   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
17347   echo 'CEOF' >> $CONFIG_STATUS
17348   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
17349   rm -f conftest.vals
17350   mv conftest.tail conftest.vals
17351 done
17352 rm -f conftest.vals
17353
17354 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
17355 # marker @DEFS@.
17356 echo '  cat >> conftest.edit <<CEOF
17357 /@DEFS@/r conftest.frag
17358 /@DEFS@/d
17359 CEOF
17360 sed -f conftest.edit $tmp/in > $tmp/out
17361 rm -f $tmp/in
17362 mv $tmp/out $tmp/in
17363 rm -f conftest.edit conftest.frag
17364 ' >> $CONFIG_STATUS
17365
17366 cat >>$CONFIG_STATUS <<\EOF
17367   # Let's still pretend it is `configure' which instantiates (i.e., don't
17368   # use $as_me), people would be surprised to read:
17369   #    /* config.h.  Generated automatically by config.status.  */
17370   if test x"$ac_file" = x-; then
17371     echo "/* Generated automatically by configure.  */" >$tmp/config.h
17372   else
17373     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
17374   fi
17375   cat $tmp/in >>$tmp/config.h
17376   rm -f $tmp/in
17377   if test x"$ac_file" != x-; then
17378     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17379       { echo "$as_me:17379: $ac_file is unchanged" >&5
17380 echo "$as_me: $ac_file is unchanged" >&6;}
17381     else
17382       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17383          X"$ac_file" : 'X\(//\)[^/]' \| \
17384          X"$ac_file" : 'X\(//\)$' \| \
17385          X"$ac_file" : 'X\(/\)' \| \
17386          .     : '\(.\)' 2>/dev/null ||
17387 echo X"$ac_file" |
17388     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17389           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17390           /^X\(\/\/\)$/{ s//\1/; q; }
17391           /^X\(\/\).*/{ s//\1/; q; }
17392           s/.*/./; q'`
17393       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17394         { case "$ac_dir" in
17395   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17396   *)                      as_incr_dir=.;;
17397 esac
17398 as_dummy="$ac_dir"
17399 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17400   case $as_mkdir_dir in
17401     # Skip DOS drivespec
17402     ?:) as_incr_dir=$as_mkdir_dir ;;
17403     *)
17404       as_incr_dir=$as_incr_dir/$as_mkdir_dir
17405       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17406     ;;
17407   esac
17408 done; }
17409
17410       fi
17411       rm -f $ac_file
17412       mv $tmp/config.h $ac_file
17413     fi
17414   else
17415     cat $tmp/config.h
17416     rm -f $tmp/config.h
17417   fi
17418 done
17419 EOF
17420 cat >>$CONFIG_STATUS <<\EOF
17421
17422 #
17423 # CONFIG_COMMANDS section.
17424 #
17425 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
17426   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
17427   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
17428
17429   case $ac_dest in
17430     default )
17431
17432 for cf_dir in test
17433 do
17434         if test ! -d $srcdir/$cf_dir; then
17435                 continue
17436         elif test -f $srcdir/$cf_dir/programs; then
17437                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
17438         fi
17439 done
17440
17441         case $cf_cv_system_name in #(vi
17442         OS/2*|os2*) #(vi
17443         LIB_PREFIX=''
17444         ;;
17445         *)      LIB_PREFIX='lib'
17446         ;;
17447         esac
17448 cf_prefix=$LIB_PREFIX
17449
17450 if test $cf_cv_shlib_version = cygdll ; then
17451         TINFO_NAME=$TINFO_ARG_SUFFIX
17452         TINFO_SUFFIX=.dll
17453 fi
17454
17455 for cf_dir in $SRC_SUBDIRS
17456 do
17457         if test ! -d $srcdir/$cf_dir ; then
17458                 continue
17459         elif test -f $srcdir/$cf_dir/modules; then
17460
17461                 SHARED_LIB=
17462                 LIBS_TO_MAKE=
17463                 for cf_item in $cf_LIST_MODELS
17464                 do
17465
17466         case $cf_item in
17467         libtool)
17468                 cf_suffix='.la'
17469                 cf_depsuf=$cf_suffix
17470                 ;;
17471         normal)
17472                 cf_suffix='.a'
17473                 cf_depsuf=$cf_suffix
17474                 ;;
17475         debug)
17476                 cf_suffix='_g.a'
17477                 cf_depsuf=$cf_suffix
17478                 ;;
17479         profile)
17480                 cf_suffix='_p.a'
17481                 cf_depsuf=$cf_suffix
17482                 ;;
17483         shared)
17484                 case $cf_cv_system_name in
17485                 cygwin*)
17486                         cf_suffix='.dll'
17487                         cf_depsuf='.dll.a'
17488                         ;;
17489                 darwin*)
17490                         cf_suffix='.dylib'
17491                         cf_depsuf=$cf_suffix
17492                         ;;
17493                 hpux*)
17494                         case $target in
17495                         ia64*)
17496                                 cf_suffix='.so'
17497                                 cf_depsuf=$cf_suffix
17498                                 ;;
17499                         *)
17500                                 cf_suffix='.sl'
17501                                 cf_depsuf=$cf_suffix
17502                                 ;;
17503                         esac
17504                         ;;
17505                 *)      cf_suffix='.so'
17506                         cf_depsuf=$cf_suffix
17507                         ;;
17508                 esac
17509         esac
17510         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
17511         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
17512
17513                         if test $cf_item = shared ; then
17514                         if test "$cf_cv_do_symlinks" = yes ; then
17515                                 case "$cf_cv_shlib_version" in #(vi
17516                                 rel) #(vi
17517                                         case "$cf_cv_system_name" in #(vi
17518                                         darwin*)
17519                                         case .${LIB_SUFFIX} in
17520                                         .w*)
17521                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
17522                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
17523                                                 ;;
17524                                         *)
17525                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
17526                                                 ;;
17527                                         esac
17528                                         ;; #(vi
17529                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
17530                                         esac
17531                                         ;;
17532                                 abi)
17533                                         case "$cf_cv_system_name" in #(vi
17534                                         darwin*)
17535                                         case .${LIB_SUFFIX} in
17536                                         .w*)
17537                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
17538                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
17539                                                 ;;
17540                                         *)
17541                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
17542                                                 ;;
17543                                         esac
17544                                         ;; #(vi
17545                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
17546                                         esac
17547                                         ;;
17548                                 esac
17549                         fi
17550                         # cygwin needs import library, and has unique naming convention
17551                         # use autodetected ${cf_prefix} for import lib and static lib, but
17552                         # use 'cyg' prefix for shared lib.
17553                         if test $cf_cv_shlib_version = cygdll ; then
17554                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
17555                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
17556                                 continue
17557                         fi
17558                         fi
17559                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
17560                 done
17561
17562                 if test $cf_dir = ncurses ; then
17563                         cf_subsets="$LIB_SUBSETS"
17564                         cf_r_parts="$cf_subsets"
17565                         cf_liblist="$LIBS_TO_MAKE"
17566
17567                         while test -n "$cf_r_parts"
17568                         do
17569                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
17570                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
17571                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
17572                                         cf_item=
17573                                         case $cf_l_parts in #(vi
17574                                         *termlib*) #(vi
17575                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
17576                                                 ;;
17577                                         *ticlib*)
17578                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
17579                                                 ;;
17580                                         *)
17581                                                 break
17582                                                 ;;
17583                                         esac
17584                                         if test -n "$cf_item"; then
17585                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
17586                                         fi
17587                                 else
17588                                         break
17589                                 fi
17590                         done
17591                 else
17592                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
17593                 fi
17594
17595                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
17596                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
17597                         $cf_dir/Makefile >$cf_dir/Makefile.out
17598                 mv $cf_dir/Makefile.out $cf_dir/Makefile
17599
17600                 $AWK -f $srcdir/mk-0th.awk \
17601                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
17602                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
17603
17604                 for cf_subset in $cf_subsets
17605                 do
17606                         cf_subdirs=
17607                         for cf_item in $cf_LIST_MODELS
17608                         do
17609                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
17610
17611 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17612
17613         case $cf_item in
17614         libtool)
17615                 cf_suffix='.la'
17616                 cf_depsuf=$cf_suffix
17617                 ;;
17618         normal)
17619                 cf_suffix='.a'
17620                 cf_depsuf=$cf_suffix
17621                 ;;
17622         debug)
17623                 cf_suffix='_g.a'
17624                 cf_depsuf=$cf_suffix
17625                 ;;
17626         profile)
17627                 cf_suffix='_p.a'
17628                 cf_depsuf=$cf_suffix
17629                 ;;
17630         shared)
17631                 case $cf_cv_system_name in
17632                 cygwin*)
17633                         cf_suffix='.dll'
17634                         cf_depsuf='.dll.a'
17635                         ;;
17636                 darwin*)
17637                         cf_suffix='.dylib'
17638                         cf_depsuf=$cf_suffix
17639                         ;;
17640                 hpux*)
17641                         case $target in
17642                         ia64*)
17643                                 cf_suffix='.so'
17644                                 cf_depsuf=$cf_suffix
17645                                 ;;
17646                         *)
17647                                 cf_suffix='.sl'
17648                                 cf_depsuf=$cf_suffix
17649                                 ;;
17650                         esac
17651                         ;;
17652                 *)      cf_suffix='.so'
17653                         cf_depsuf=$cf_suffix
17654                         ;;
17655                 esac
17656         esac
17657         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
17658         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
17659
17660         case $cf_item in
17661         libtool) cf_subdir='obj_lo'  ;;
17662         normal)  cf_subdir='objects' ;;
17663         debug)   cf_subdir='obj_g' ;;
17664         profile) cf_subdir='obj_p' ;;
17665         shared)
17666                 case $cf_cv_system_name in #(vi
17667                 cygwin) #(vi
17668                         cf_subdir='objects' ;;
17669                 *)
17670                         cf_subdir='obj_s' ;;
17671                 esac
17672         esac
17673
17674                         # Test for case where we build libtinfo with a different name.
17675                         cf_libname=$cf_dir
17676                         if test $cf_dir = ncurses ; then
17677                                 case $cf_subset in
17678                                 *base*)
17679                                         cf_libname=${cf_libname}$LIB_SUFFIX
17680                                         ;;
17681                                 *termlib*)
17682                                         cf_libname=$TINFO_LIB_SUFFIX
17683                                         ;;
17684                                 ticlib*)
17685                                         cf_libname=$TICS_LIB_SUFFIX
17686                                         ;;
17687                                 esac
17688                         else
17689                                 cf_libname=${cf_libname}$LIB_SUFFIX
17690                         fi
17691                         if test -n "${DFT_ARG_SUFFIX}" ; then
17692                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
17693                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
17694                         fi
17695
17696                         # These dependencies really are for development, not
17697                         # builds, but they are useful in porting, too.
17698                         cf_depend="../include/ncurses_cfg.h"
17699                         if test "$srcdir" = "."; then
17700                                 cf_reldir="."
17701                         else
17702                                 cf_reldir="\${srcdir}"
17703                         fi
17704
17705                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
17706                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
17707                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
17708                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
17709                         fi
17710
17711                         cf_dir_suffix=
17712                         old_cf_suffix="$cf_suffix"
17713                         if test "$cf_cv_shlib_version_infix" = yes ; then
17714                         if test -n "$LIB_SUFFIX" ; then
17715                                 case $LIB_SUFFIX in
17716                                 w*)
17717                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
17718                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
17719                                         cf_dir_suffix=w
17720                                         ;;
17721                                 esac
17722                         fi
17723                         fi
17724
17725                         $AWK -f $srcdir/mk-1st.awk \
17726                                 name=${cf_libname}${cf_dir_suffix} \
17727                                 traces=$LIB_TRACING \
17728                                 MODEL=$cf_ITEM \
17729                                 model=$cf_subdir \
17730                                 prefix=$cf_prefix \
17731                                 suffix=$cf_suffix \
17732                                 subset=$cf_subset \
17733                                 TermlibRoot=$TINFO_NAME \
17734                                 TermlibSuffix=$TINFO_SUFFIX \
17735                                 ShlibVer=$cf_cv_shlib_version \
17736                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
17737                                 ReLink=${cf_cv_do_relink-no} \
17738                                 DoLinks=$cf_cv_do_symlinks \
17739                                 rmSoLocs=$cf_cv_rm_so_locs \
17740                                 ldconfig="$LDCONFIG" \
17741                                 overwrite=$WITH_OVERWRITE \
17742                                 depend="$cf_depend" \
17743                                 host="$host" \
17744                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
17745
17746                         cf_suffix="$old_cf_suffix"
17747
17748                         for cf_subdir2 in $cf_subdirs lib
17749                         do
17750                                 test $cf_subdir = $cf_subdir2 && break
17751                         done
17752                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
17753                         $AWK -f $srcdir/mk-2nd.awk \
17754                                 name=$cf_dir \
17755                                 traces=$LIB_TRACING \
17756                                 MODEL=$cf_ITEM \
17757                                 model=$cf_subdir \
17758                                 subset=$cf_subset \
17759                                 srcdir=$srcdir \
17760                                 echo=$WITH_ECHO \
17761                                 crenames=$cf_cv_prog_CC_c_o \
17762                                 cxxrenames=$cf_cv_prog_CXX_c_o \
17763                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
17764                         cf_subdirs="$cf_subdirs $cf_subdir"
17765                         done
17766                 done
17767         fi
17768
17769         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
17770 done
17771
17772 for cf_dir in $SRC_SUBDIRS
17773 do
17774         if test ! -d $srcdir/$cf_dir ; then
17775                 continue
17776         fi
17777
17778         if test -f $cf_dir/Makefile ; then
17779                 case "$cf_dir" in
17780                 Ada95) #(vi
17781                         echo 'libs \' >> Makefile
17782                         echo 'install.libs \' >> Makefile
17783                         echo 'uninstall.libs ::' >> Makefile
17784                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
17785                         ;;
17786                 esac
17787         fi
17788
17789         if test -f $srcdir/$cf_dir/modules; then
17790                 echo >> Makefile
17791                 if test -f $srcdir/$cf_dir/headers; then
17792 cat >> Makefile <<CF_EOF
17793 install.includes \\
17794 uninstall.includes \\
17795 CF_EOF
17796                 fi
17797 if test "$cf_dir" != "c++" ; then
17798 echo 'lint \' >> Makefile
17799 fi
17800 cat >> Makefile <<CF_EOF
17801 libs \\
17802 lintlib \\
17803 install.libs \\
17804 uninstall.libs \\
17805 install.$cf_dir \\
17806 uninstall.$cf_dir ::
17807         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
17808 CF_EOF
17809         elif test -f $srcdir/$cf_dir/headers; then
17810 cat >> Makefile <<CF_EOF
17811
17812 libs \\
17813 install.libs \\
17814 uninstall.libs \\
17815 install.includes \\
17816 uninstall.includes ::
17817         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
17818 CF_EOF
17819 fi
17820 done
17821
17822 cat >> Makefile <<CF_EOF
17823
17824 install.libs uninstall.libs \\
17825 install.data uninstall.data ::
17826 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
17827
17828 install.man \\
17829 uninstall.man ::
17830         cd man && \${MAKE} \${CF_MFLAGS} \$@
17831
17832 distclean ::
17833         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
17834         rm -f headers.sh headers.sed mk_shared_lib.sh
17835         rm -rf \${DIRS_TO_MAKE}
17836 CF_EOF
17837
17838 # Special case: tack's manpage lives in its own directory.
17839 if test -d tack ; then
17840 if test -f $srcdir/$tack.h; then
17841 cat >> Makefile <<CF_EOF
17842
17843 install.man \\
17844 uninstall.man ::
17845         cd tack && \${MAKE} \${CF_MFLAGS} \$@
17846 CF_EOF
17847 fi
17848 fi
17849
17850 rm -f headers.sed headers.sh
17851
17852 echo creating headers.sh
17853 cat >headers.sh <<CF_EOF
17854 #! /bin/sh
17855 # This shell script is generated by the 'configure' script.  It is invoked in a
17856 # subdirectory of the build tree.  It generates a sed-script in the parent
17857 # directory that is used to adjust includes for header files that reside in a
17858 # subdirectory of /usr/include, etc.
17859 PRG=""
17860 while test \$# != 3
17861 do
17862 PRG="\$PRG \$1"; shift
17863 done
17864 DST=\$1
17865 REF=\$2
17866 SRC=\$3
17867 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
17868 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
17869 echo installing \$SRC in \$DST
17870 CF_EOF
17871
17872 if test $WITH_CURSES_H = yes; then
17873         cat >>headers.sh <<CF_EOF
17874 case \$DST in
17875 /*/include/*)
17876         END=\`basename \$DST\`
17877         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
17878         do
17879                 NAME=\`basename \$i\`
17880                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
17881         done
17882         ;;
17883 *)
17884         echo "" >> \$TMPSED
17885         ;;
17886 esac
17887 CF_EOF
17888
17889 else
17890         cat >>headers.sh <<CF_EOF
17891 case \$DST in
17892 /*/include/*)
17893         END=\`basename \$DST\`
17894         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
17895         do
17896                 NAME=\`basename \$i\`
17897                 if test "\$NAME" = "curses.h"
17898                 then
17899                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
17900                         NAME=ncurses.h
17901                 fi
17902                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
17903         done
17904         ;;
17905 *)
17906         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
17907         ;;
17908 esac
17909 CF_EOF
17910 fi
17911 cat >>headers.sh <<CF_EOF
17912 rm -f \$TMPSRC
17913 sed -f \$TMPSED \$SRC > \$TMPSRC
17914 NAME=\`basename \$SRC\`
17915 CF_EOF
17916 if test $WITH_CURSES_H != yes; then
17917         cat >>headers.sh <<CF_EOF
17918 test "\$NAME" = "curses.h" && NAME=ncurses.h
17919 CF_EOF
17920 fi
17921 cat >>headers.sh <<CF_EOF
17922 # Just in case someone gzip'd manpages, remove the conflicting copy.
17923 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
17924
17925 eval \$PRG \$TMPSRC \$DST/\$NAME
17926 rm -f \$TMPSRC \$TMPSED
17927 CF_EOF
17928
17929 chmod 0755 headers.sh
17930
17931 for cf_dir in $SRC_SUBDIRS
17932 do
17933         if test ! -d $srcdir/$cf_dir ; then
17934                 continue
17935         fi
17936
17937         if test -f $srcdir/$cf_dir/headers; then
17938                 $AWK -f $srcdir/mk-hdr.awk \
17939                         subset="$LIB_SUBSETS" \
17940                         compat="$WITH_CURSES_H" \
17941                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
17942         fi
17943
17944         if test -f $srcdir/$cf_dir/modules; then
17945                 if test "$cf_dir" != "c++" ; then
17946                         cat >>$cf_dir/Makefile <<"CF_EOF"
17947 depend : ${AUTO_SRC}
17948         makedepend -- ${CPPFLAGS} -- ${C_SRC}
17949
17950 # DO NOT DELETE THIS LINE -- make depend depends on it.
17951 CF_EOF
17952                 fi
17953         fi
17954 done
17955
17956  ;;
17957   esac
17958 done
17959 EOF
17960
17961 cat >>$CONFIG_STATUS <<\EOF
17962
17963 { (exit 0); exit 0; }
17964 EOF
17965 chmod +x $CONFIG_STATUS
17966 ac_clean_files=$ac_clean_files_save
17967
17968 # configure is writing to config.log, and then calls config.status.
17969 # config.status does its own redirection, appending to config.log.
17970 # Unfortunately, on DOS this fails, as config.log is still kept open
17971 # by configure, so config.status won't be able to write to it; its
17972 # output is simply discarded.  So we exec the FD to /dev/null,
17973 # effectively closing config.log, so it can be properly (re)opened and
17974 # appended to by config.status.  When coming back to configure, we
17975 # need to make the FD available again.
17976 if test "$no_create" != yes; then
17977   ac_cs_success=:
17978   exec 5>/dev/null
17979   $SHELL $CONFIG_STATUS || ac_cs_success=false
17980   exec 5>>config.log
17981   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17982   # would make configure fail if this is the last instruction.
17983   $ac_cs_success || { (exit 1); exit 1; }
17984 fi
17985 ${MAKE-make} preinstall