]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.7 - patch 20100327
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.487 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20100320.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datadir='${prefix}/share'
175 sysconfdir='${prefix}/etc'
176 sharedstatedir='${prefix}/com'
177 localstatedir='${prefix}/var'
178 libdir='${exec_prefix}/lib'
179 includedir='${prefix}/include'
180 oldincludedir='/usr/include'
181 infodir='${prefix}/info'
182 mandir='${prefix}/man'
183
184 # Identity of this package.
185 PACKAGE_NAME=
186 PACKAGE_TARNAME=
187 PACKAGE_VERSION=
188 PACKAGE_STRING=
189 PACKAGE_BUGREPORT=
190
191 ac_prev=
192 for ac_option
193 do
194   # If the previous option needs an argument, assign it.
195   if test -n "$ac_prev"; then
196     eval "$ac_prev=\$ac_option"
197     ac_prev=
198     continue
199   fi
200
201   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case $ac_option in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir=$ac_optarg ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build_alias ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build_alias=$ac_optarg ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file=$ac_optarg ;;
223
224   --config-cache | -C)
225     cache_file=config.cache ;;
226
227   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228     ac_prev=datadir ;;
229   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230   | --da=*)
231     datadir=$ac_optarg ;;
232
233   -disable-* | --disable-*)
234     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
235     # Reject names that are not valid shell variable names.
236     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
237       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
238    { (exit 1); exit 1; }; }
239     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
240     eval "enable_$ac_feature=no" ;;
241
242   -enable-* | --enable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     case $ac_option in
250       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
251       *) ac_optarg=yes ;;
252     esac
253     eval "enable_$ac_feature='$ac_optarg'" ;;
254
255   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
256   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
257   | --exec | --exe | --ex)
258     ac_prev=exec_prefix ;;
259   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
260   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
261   | --exec=* | --exe=* | --ex=*)
262     exec_prefix=$ac_optarg ;;
263
264   -gas | --gas | --ga | --g)
265     # Obsolete; use --with-gas.
266     with_gas=yes ;;
267
268   -help | --help | --hel | --he | -h)
269     ac_init_help=long ;;
270   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
271     ac_init_help=recursive ;;
272   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
273     ac_init_help=short ;;
274
275   -host | --host | --hos | --ho)
276     ac_prev=host_alias ;;
277   -host=* | --host=* | --hos=* | --ho=*)
278     host_alias=$ac_optarg ;;
279
280   -includedir | --includedir | --includedi | --included | --include \
281   | --includ | --inclu | --incl | --inc)
282     ac_prev=includedir ;;
283   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
284   | --includ=* | --inclu=* | --incl=* | --inc=*)
285     includedir=$ac_optarg ;;
286
287   -infodir | --infodir | --infodi | --infod | --info | --inf)
288     ac_prev=infodir ;;
289   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
290     infodir=$ac_optarg ;;
291
292   -libdir | --libdir | --libdi | --libd)
293     ac_prev=libdir ;;
294   -libdir=* | --libdir=* | --libdi=* | --libd=*)
295     libdir=$ac_optarg ;;
296
297   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
298   | --libexe | --libex | --libe)
299     ac_prev=libexecdir ;;
300   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
301   | --libexe=* | --libex=* | --libe=*)
302     libexecdir=$ac_optarg ;;
303
304   -localstatedir | --localstatedir | --localstatedi | --localstated \
305   | --localstate | --localstat | --localsta | --localst \
306   | --locals | --local | --loca | --loc | --lo)
307     ac_prev=localstatedir ;;
308   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
309   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
310   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
311     localstatedir=$ac_optarg ;;
312
313   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
314     ac_prev=mandir ;;
315   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
316     mandir=$ac_optarg ;;
317
318   -nfp | --nfp | --nf)
319     # Obsolete; use --without-fp.
320     with_fp=no ;;
321
322   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
323   | --no-cr | --no-c)
324     no_create=yes ;;
325
326   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
327   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
328     no_recursion=yes ;;
329
330   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
331   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
332   | --oldin | --oldi | --old | --ol | --o)
333     ac_prev=oldincludedir ;;
334   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
335   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
336   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
337     oldincludedir=$ac_optarg ;;
338
339   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
340     ac_prev=prefix ;;
341   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
342     prefix=$ac_optarg ;;
343
344   -program-prefix | --program-prefix | --program-prefi | --program-pref \
345   | --program-pre | --program-pr | --program-p)
346     ac_prev=program_prefix ;;
347   -program-prefix=* | --program-prefix=* | --program-prefi=* \
348   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
349     program_prefix=$ac_optarg ;;
350
351   -program-suffix | --program-suffix | --program-suffi | --program-suff \
352   | --program-suf | --program-su | --program-s)
353     ac_prev=program_suffix ;;
354   -program-suffix=* | --program-suffix=* | --program-suffi=* \
355   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
356     program_suffix=$ac_optarg ;;
357
358   -program-transform-name | --program-transform-name \
359   | --program-transform-nam | --program-transform-na \
360   | --program-transform-n | --program-transform- \
361   | --program-transform | --program-transfor \
362   | --program-transfo | --program-transf \
363   | --program-trans | --program-tran \
364   | --progr-tra | --program-tr | --program-t)
365     ac_prev=program_transform_name ;;
366   -program-transform-name=* | --program-transform-name=* \
367   | --program-transform-nam=* | --program-transform-na=* \
368   | --program-transform-n=* | --program-transform-=* \
369   | --program-transform=* | --program-transfor=* \
370   | --program-transfo=* | --program-transf=* \
371   | --program-trans=* | --program-tran=* \
372   | --progr-tra=* | --program-tr=* | --program-t=*)
373     program_transform_name=$ac_optarg ;;
374
375   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
376   | -silent | --silent | --silen | --sile | --sil)
377     silent=yes ;;
378
379   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
380     ac_prev=sbindir ;;
381   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
382   | --sbi=* | --sb=*)
383     sbindir=$ac_optarg ;;
384
385   -sharedstatedir | --sharedstatedir | --sharedstatedi \
386   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
387   | --sharedst | --shareds | --shared | --share | --shar \
388   | --sha | --sh)
389     ac_prev=sharedstatedir ;;
390   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
391   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
392   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
393   | --sha=* | --sh=*)
394     sharedstatedir=$ac_optarg ;;
395
396   -site | --site | --sit)
397     ac_prev=site ;;
398   -site=* | --site=* | --sit=*)
399     site=$ac_optarg ;;
400
401   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
402     ac_prev=srcdir ;;
403   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
404     srcdir=$ac_optarg ;;
405
406   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
407   | --syscon | --sysco | --sysc | --sys | --sy)
408     ac_prev=sysconfdir ;;
409   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
410   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
411     sysconfdir=$ac_optarg ;;
412
413   -target | --target | --targe | --targ | --tar | --ta | --t)
414     ac_prev=target_alias ;;
415   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
416     target_alias=$ac_optarg ;;
417
418   -v | -verbose | --verbose | --verbos | --verbo | --verb)
419     verbose=yes ;;
420
421   -version | --version | --versio | --versi | --vers | -V)
422     ac_init_version=: ;;
423
424   -with-* | --with-*)
425     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
426     # Reject names that are not valid shell variable names.
427     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
428       { echo "$as_me: error: invalid package name: $ac_package" >&2
429    { (exit 1); exit 1; }; }
430     ac_package=`echo $ac_package| sed 's/-/_/g'`
431     case $ac_option in
432       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
433       *) ac_optarg=yes ;;
434     esac
435     eval "with_$ac_package='$ac_optarg'" ;;
436
437   -without-* | --without-*)
438     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
439     # Reject names that are not valid shell variable names.
440     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
441       { echo "$as_me: error: invalid package name: $ac_package" >&2
442    { (exit 1); exit 1; }; }
443     ac_package=`echo $ac_package | sed 's/-/_/g'`
444     eval "with_$ac_package=no" ;;
445
446   --x)
447     # Obsolete; use --with-x.
448     with_x=yes ;;
449
450   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451   | --x-incl | --x-inc | --x-in | --x-i)
452     ac_prev=x_includes ;;
453   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455     x_includes=$ac_optarg ;;
456
457   -x-libraries | --x-libraries | --x-librarie | --x-librari \
458   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459     ac_prev=x_libraries ;;
460   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462     x_libraries=$ac_optarg ;;
463
464   -*) { echo "$as_me: error: unrecognized option: $ac_option
465 Try \`$0 --help' for more information." >&2
466    { (exit 1); exit 1; }; }
467     ;;
468
469   *=*)
470     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
471     # Reject names that are not valid shell variable names.
472     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
473       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
474    { (exit 1); exit 1; }; }
475     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
476     eval "$ac_envvar='$ac_optarg'"
477     export $ac_envvar ;;
478
479   *)
480     # FIXME: should be removed in autoconf 3.0.
481     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
482     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
483       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
484     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
485     ;;
486
487   esac
488 done
489
490 if test -n "$ac_prev"; then
491   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
492   { echo "$as_me: error: missing argument to $ac_option" >&2
493    { (exit 1); exit 1; }; }
494 fi
495
496 # Be sure to have absolute paths.
497 for ac_var in exec_prefix prefix
498 do
499   eval ac_val=$`echo $ac_var`
500   case $ac_val in
501     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
502     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503    { (exit 1); exit 1; }; };;
504   esac
505 done
506
507 # Be sure to have absolute paths.
508 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
509               localstatedir libdir includedir oldincludedir infodir mandir
510 do
511   eval ac_val=$`echo $ac_var`
512   case $ac_val in
513     [\\/$]* | ?:[\\/]* ) ;;
514     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
515    { (exit 1); exit 1; }; };;
516   esac
517 done
518
519 # There might be people who depend on the old broken behavior: `$host'
520 # used to hold the argument of --host etc.
521 build=$build_alias
522 host=$host_alias
523 target=$target_alias
524
525 # FIXME: should be removed in autoconf 3.0.
526 if test "x$host_alias" != x; then
527   if test "x$build_alias" = x; then
528     cross_compiling=maybe
529     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
530     If a cross compiler is detected then cross compile mode will be used." >&2
531   elif test "x$build_alias" != "x$host_alias"; then
532     cross_compiling=yes
533   fi
534 fi
535
536 ac_tool_prefix=
537 test -n "$host_alias" && ac_tool_prefix=$host_alias-
538
539 test "$silent" = yes && exec 6>/dev/null
540
541 # Find the source files, if location was not specified.
542 if test -z "$srcdir"; then
543   ac_srcdir_defaulted=yes
544   # Try the directory containing this script, then its parent.
545   ac_prog=$0
546   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
547   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548   srcdir=$ac_confdir
549   if test ! -r $srcdir/$ac_unique_file; then
550     srcdir=..
551   fi
552 else
553   ac_srcdir_defaulted=no
554 fi
555 if test ! -r $srcdir/$ac_unique_file; then
556   if test "$ac_srcdir_defaulted" = yes; then
557     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
558    { (exit 1); exit 1; }; }
559   else
560     { echo "$as_me: error: cannot find sources in $srcdir" >&2
561    { (exit 1); exit 1; }; }
562   fi
563 fi
564 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
565 ac_env_build_alias_set=${build_alias+set}
566 ac_env_build_alias_value=$build_alias
567 ac_cv_env_build_alias_set=${build_alias+set}
568 ac_cv_env_build_alias_value=$build_alias
569 ac_env_host_alias_set=${host_alias+set}
570 ac_env_host_alias_value=$host_alias
571 ac_cv_env_host_alias_set=${host_alias+set}
572 ac_cv_env_host_alias_value=$host_alias
573 ac_env_target_alias_set=${target_alias+set}
574 ac_env_target_alias_value=$target_alias
575 ac_cv_env_target_alias_set=${target_alias+set}
576 ac_cv_env_target_alias_value=$target_alias
577 ac_env_CC_set=${CC+set}
578 ac_env_CC_value=$CC
579 ac_cv_env_CC_set=${CC+set}
580 ac_cv_env_CC_value=$CC
581 ac_env_CFLAGS_set=${CFLAGS+set}
582 ac_env_CFLAGS_value=$CFLAGS
583 ac_cv_env_CFLAGS_set=${CFLAGS+set}
584 ac_cv_env_CFLAGS_value=$CFLAGS
585 ac_env_LDFLAGS_set=${LDFLAGS+set}
586 ac_env_LDFLAGS_value=$LDFLAGS
587 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
588 ac_cv_env_LDFLAGS_value=$LDFLAGS
589 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
590 ac_env_CPPFLAGS_value=$CPPFLAGS
591 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
592 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
593 ac_env_CPP_set=${CPP+set}
594 ac_env_CPP_value=$CPP
595 ac_cv_env_CPP_set=${CPP+set}
596 ac_cv_env_CPP_value=$CPP
597 ac_env_CXX_set=${CXX+set}
598 ac_env_CXX_value=$CXX
599 ac_cv_env_CXX_set=${CXX+set}
600 ac_cv_env_CXX_value=$CXX
601 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
602 ac_env_CXXFLAGS_value=$CXXFLAGS
603 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
604 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
605 ac_env_CXXCPP_set=${CXXCPP+set}
606 ac_env_CXXCPP_value=$CXXCPP
607 ac_cv_env_CXXCPP_set=${CXXCPP+set}
608 ac_cv_env_CXXCPP_value=$CXXCPP
609
610 #
611 # Report the --help message.
612 #
613 if test "$ac_init_help" = "long"; then
614   # Omit some internal or obsolete options to make the list less imposing.
615   # This message is too long to be a string in the A/UX 3.1 sh.
616   cat <<EOF
617 \`configure' configures this package to adapt to many kinds of systems.
618
619 Usage: $0 [OPTION]... [VAR=VALUE]...
620
621 To assign environment variables (e.g., CC, CFLAGS...), specify them as
622 VAR=VALUE.  See below for descriptions of some of the useful variables.
623
624 Defaults for the options are specified in brackets.
625
626 Configuration:
627   -h, --help              display this help and exit
628       --help=short        display options specific to this package
629       --help=recursive    display the short help of all the included packages
630   -V, --version           display version information and exit
631   -q, --quiet, --silent   do not print \`checking...' messages
632       --cache-file=FILE   cache test results in FILE [disabled]
633   -C, --config-cache      alias for \`--cache-file=config.cache'
634   -n, --no-create         do not create output files
635       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
636
637 EOF
638
639   cat <<EOF
640 Installation directories:
641   --prefix=PREFIX         install architecture-independent files in PREFIX
642                           [$ac_default_prefix]
643   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
644                           [PREFIX]
645
646 By default, \`make install' will install all the files in
647 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
648 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
649 for instance \`--prefix=\$HOME'.
650
651 For better control, use the options below.
652
653 Fine tuning of the installation directories:
654   --bindir=DIR            user executables [EPREFIX/bin]
655   --sbindir=DIR           system admin executables [EPREFIX/sbin]
656   --libexecdir=DIR        program executables [EPREFIX/libexec]
657   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
658   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
659   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
660   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
661   --libdir=DIR            object code libraries [EPREFIX/lib]
662   --includedir=DIR        C header files [PREFIX/include]
663   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
664   --infodir=DIR           info documentation [PREFIX/info]
665   --mandir=DIR            man documentation [PREFIX/man]
666 EOF
667
668   cat <<\EOF
669
670 Program names:
671   --program-prefix=PREFIX            prepend PREFIX to installed program names
672   --program-suffix=SUFFIX            append SUFFIX to installed program names
673   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
674
675 System types:
676   --build=BUILD           configure for building on BUILD [guessed]
677   --host=HOST       build programs to run on HOST [BUILD]
678   --target=TARGET   configure for building compilers for TARGET [HOST]
679 EOF
680 fi
681
682 if test -n "$ac_init_help"; then
683
684   cat <<\EOF
685
686 Optional Packages:
687   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
688   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
689
690 Optional Features:
691   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
692   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
693
694   --with-rel-version=XXX  override derived release version
695   --with-abi-version=XXX  override derived ABI version
696   --with-system-type=XXX  test: override derived host system-type
697   --without-cxx           do not adjust ncurses bool to match C++
698   --without-cxx-binding   do not build C++ binding and demo
699   --without-ada           suppress check for Ada95, don't build demo
700   --without-manpages      suppress install of manpages
701   --without-progs         suppress build with programs (e.g., tic)
702   --without-curses-h      install curses.h as ncurses.h only
703   --with-pkg-config{=path} enable/disable use of pkg-config
704   --enable-pc-files       generate and install .pc files for pkg-config
705   --enable-mixed-case     tic should assume mixed-case filenames
706   --with-install-prefix   prefixes actual install-location ($DESTDIR)
707 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
708   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
709   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
710   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
711   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
712   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
713   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
714 Options to Specify the Libraries Built/Used:
715   --with-libtool          generate libraries with libtool
716   --with-shared           generate shared-libraries
717   --with-normal           generate normal-libraries (default)
718   --with-debug            generate debug-libraries (default)
719   --with-profile          generate profile-libraries
720   --with-termlib          generate separate terminfo library
721   --with-ticlib           generate separate tic library
722   --with-gpm              use Alessandro Rubini's GPM library
723   --without-dlsym         do not use dlsym() to load GPM dynamically
724   --with-sysmouse         use sysmouse (FreeBSD console)
725   --enable-rpath          use rpath option when generating shared libraries
726   --disable-relink        relink shared libraries during install
727   --with-shlib-version=X  Specify rel or abi version for shared libs
728 Fine-Tuning Your Configuration:
729   --disable-overwrite     leave out the link to -lcurses
730   --disable-database      do not use terminfo, only fallbacks/termcap
731   --with-database=XXX     specify terminfo source to install
732   --with-hashed-db        specify hashed-database library
733   --with-fallbacks=XXX    specify list of fallback terminal descriptions
734   --without-xterm-new     specify if xterm terminfo should be old version
735   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
736   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
737   --disable-big-core      assume machine has little memory
738   --disable-big-strings   assume compiler has only standard-size strings
739   --enable-termcap        compile in termcap fallback support
740   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
741   --enable-getcap         fast termcap load, no xrefs to terminfo
742   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
743   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
744   --disable-root-environ  restrict environment when running as root
745   --enable-symlinks       make tic use symbolic links not hard links
746   --enable-broken_linker  compile with broken-linker support code
747   --enable-bsdpad         recognize BSD-style prefix padding
748   --enable-widec          compile with wide-char/UTF-8 code
749   --disable-lp64          allow chtype to be long (ignore _LP64)
750   --disable-largefile     omit support for large files
751   --disable-tparm-varargs compile tparm() without varargs interface
752   --disable-tic-depends   link tic library without explicit dependency on ncurses library
753   --with-bool=TYPE        override fallback type of bool variable
754   --with-caps=alt         compile with alternate Caps file
755   --with-chtype=TYPE      override type of chtype
756   --with-ospeed=TYPE      override type of ospeed variable
757   --with-mmask-t=TYPE     override type of mmask_t
758   --with-ccharw-max=XXX   override size CCHARW_MAX
759   --with-rcs-ids          compile-in RCS identifiers
760 Options to Specify How Manpages are Installed:
761   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
762                           optionally formatted/catonly, e.g., gzip,formatted
763   --with-manpage-renames  specify manpage-renaming
764   --with-manpage-aliases  specify manpage-aliases using .so
765   --with-manpage-symlinks specify manpage-aliases using symlinks
766   --with-manpage-tbl      specify manpage processing with tbl
767 Extensions:
768   --disable-ext-funcs     disable function-extensions
769   --enable-sp-funcs       enable experimental SCREEN-extensions
770   --enable-term-driver    enable experimental terminal-driver
771   --enable-const          compile with extra/non-standard const
772   --enable-ext-colors     compile for 256-color support
773   --enable-ext-mouse      compile for extended mouse-encoding
774   --enable-no-padding     compile with $NCURSES_NO_PADDING code
775   --enable-signed-char    compile using signed Boolean's in term.h
776   --enable-sigwinch       compile with SIGWINCH handler
777   --enable-tcap-names     compile with user-definable terminal capabilities
778 Development Code:
779   --without-develop       disable development options
780   --enable-hard-tabs      compile with hard-tabs code
781   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
782 Experimental Code:
783   --disable-assumed-color do not assume anything about default-colors
784   --disable-hashmap       compile without hashmap scrolling-optimization
785   --enable-colorfgbg      compile-in experimental $COLORFGBG code
786   --enable-interop        compile-in experimental interop bindings
787   --with-pthread          use POSIX thread library
788   --enable-weak-symbols   enable weak-symbols for pthreads
789   --enable-reentrant      compile with experimental reentrant code
790   --with-wrap-prefix=XXX  override prefix used for public variables
791   --enable-safe-sprintf   compile with experimental safe-sprintf code
792   --disable-scroll-hints  compile without scroll-hints code
793   --enable-wgetch-events  compile with experimental wgetch-events code
794 Testing/development Options:
795   --enable-echo           build: display "compiling" commands (default)
796   --enable-warnings       build: turn on GCC compiler warnings
797   --enable-assertions     test: turn on generation of assertion code
798   --with-dmalloc          test: use Gray Watson's dmalloc library
799   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
800   --with-valgrind         test: use valgrind
801   --disable-leaks         test: free permanent memory, analyze leaks
802   --enable-expanded       test: generate functions for certain macros
803   --disable-macros        test: use functions rather than macros
804   --with-trace            test: add trace() function to all models of ncurses
805 Ada95 Binding Options:
806   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
807   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
808   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
809
810 Some influential environment variables:
811   CC          C compiler command
812   CFLAGS      C compiler flags
813   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
814               nonstandard directory <lib dir>
815   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
816               headers in a nonstandard directory <include dir>
817   CPP         C preprocessor
818   CXX         C++ compiler command
819   CXXFLAGS    C++ compiler flags
820   CXXCPP      C++ preprocessor
821
822 Use these variables to override the choices made by `configure' or to help
823 it to find libraries and programs with nonstandard names/locations.
824
825 EOF
826 fi
827
828 if test "$ac_init_help" = "recursive"; then
829   # If there are subdirs, report their specific --help.
830   ac_popdir=`pwd`
831   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
832     cd $ac_subdir
833     # A "../" for each directory in /$ac_subdir.
834     ac_dots=`echo $ac_subdir |
835              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
836
837     case $srcdir in
838     .) # No --srcdir option.  We are building in place.
839       ac_sub_srcdir=$srcdir ;;
840     [\\/]* | ?:[\\/]* ) # Absolute path.
841       ac_sub_srcdir=$srcdir/$ac_subdir ;;
842     *) # Relative path.
843       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
844     esac
845
846     # Check for guested configure; otherwise get Cygnus style configure.
847     if test -f $ac_sub_srcdir/configure.gnu; then
848       echo
849       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
850     elif test -f $ac_sub_srcdir/configure; then
851       echo
852       $SHELL $ac_sub_srcdir/configure  --help=recursive
853     elif test -f $ac_sub_srcdir/configure.ac ||
854            test -f $ac_sub_srcdir/configure.in; then
855       echo
856       $ac_configure --help
857     else
858       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
859     fi
860     cd $ac_popdir
861   done
862 fi
863
864 test -n "$ac_init_help" && exit 0
865 if $ac_init_version; then
866   cat <<\EOF
867
868 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
869 Free Software Foundation, Inc.
870 This configure script is free software; the Free Software Foundation
871 gives unlimited permission to copy, distribute and modify it.
872 EOF
873   exit 0
874 fi
875 exec 5>config.log
876 cat >&5 <<EOF
877 This file contains any messages produced by compilers while
878 running configure, to aid debugging if configure makes a mistake.
879
880 It was created by $as_me, which was
881 generated by GNU Autoconf 2.52.20100320.  Invocation command line was
882
883   $ $0 $@
884
885 EOF
886 {
887 cat <<_ASUNAME
888 ## ---------- ##
889 ## Platform.  ##
890 ## ---------- ##
891
892 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
893 uname -m = `(uname -m) 2>/dev/null || echo unknown`
894 uname -r = `(uname -r) 2>/dev/null || echo unknown`
895 uname -s = `(uname -s) 2>/dev/null || echo unknown`
896 uname -v = `(uname -v) 2>/dev/null || echo unknown`
897
898 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
899 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
900
901 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
902 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
903 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
904 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
905 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
906 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
907 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
908
909 PATH = $PATH
910
911 _ASUNAME
912 } >&5
913
914 cat >&5 <<EOF
915 ## ------------ ##
916 ## Core tests.  ##
917 ## ------------ ##
918
919 EOF
920
921 # Keep a trace of the command line.
922 # Strip out --no-create and --no-recursion so they do not pile up.
923 # Also quote any args containing shell meta-characters.
924 ac_configure_args=
925 ac_sep=
926 for ac_arg
927 do
928   case $ac_arg in
929   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
930   | --no-cr | --no-c) ;;
931   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
932   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
933   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
934     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
935     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
936     ac_sep=" " ;;
937   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
938      ac_sep=" " ;;
939   esac
940   # Get rid of the leading space.
941 done
942
943 # When interrupted or exit'd, cleanup temporary files, and complete
944 # config.log.  We remove comments because anyway the quotes in there
945 # would cause problems or look ugly.
946 trap 'exit_status=$?
947   # Save into config.log some information that might help in debugging.
948   echo >&5
949   echo "## ----------------- ##" >&5
950   echo "## Cache variables.  ##" >&5
951   echo "## ----------------- ##" >&5
952   echo >&5
953   # The following way of writing the cache mishandles newlines in values,
954 {
955   (set) 2>&1 |
956     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
957     *ac_space=\ *)
958       sed -n \
959         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
960           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
961       ;;
962     *)
963       sed -n \
964         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
965       ;;
966     esac;
967 } >&5
968   sed "/^$/d" confdefs.h >conftest.log
969   if test -s conftest.log; then
970     echo >&5
971     echo "## ------------ ##" >&5
972     echo "## confdefs.h.  ##" >&5
973     echo "## ------------ ##" >&5
974     echo >&5
975     cat conftest.log >&5
976   fi
977   (echo; echo) >&5
978   test "$ac_signal" != 0 &&
979     echo "$as_me: caught signal $ac_signal" >&5
980   echo "$as_me: exit $exit_status" >&5
981   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
982     exit $exit_status
983      ' 0
984 for ac_signal in 1 2 13 15; do
985   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
986 done
987 ac_signal=0
988
989 # confdefs.h avoids OS command line length limits that DEFS can exceed.
990 rm -rf conftest* confdefs.h
991 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
992 echo >confdefs.h
993
994 # Let the site file select an alternate cache file if it wants to.
995 # Prefer explicitly selected file to automatically selected ones.
996 if test -z "$CONFIG_SITE"; then
997   if test "x$prefix" != xNONE; then
998     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
999   else
1000     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1001   fi
1002 fi
1003 for ac_site_file in $CONFIG_SITE; do
1004   if test -r "$ac_site_file"; then
1005     { echo "$as_me:1005: loading site script $ac_site_file" >&5
1006 echo "$as_me: loading site script $ac_site_file" >&6;}
1007     cat "$ac_site_file" >&5
1008     . "$ac_site_file"
1009   fi
1010 done
1011
1012 if test -r "$cache_file"; then
1013   # Some versions of bash will fail to source /dev/null (special
1014   # files actually), so we avoid doing that.
1015   if test -f "$cache_file"; then
1016     { echo "$as_me:1016: loading cache $cache_file" >&5
1017 echo "$as_me: loading cache $cache_file" >&6;}
1018     case $cache_file in
1019       [\\/]* | ?:[\\/]* ) . $cache_file;;
1020       *)                      . ./$cache_file;;
1021     esac
1022   fi
1023 else
1024   { echo "$as_me:1024: creating cache $cache_file" >&5
1025 echo "$as_me: creating cache $cache_file" >&6;}
1026   >$cache_file
1027 fi
1028
1029 # Check that the precious variables saved in the cache have kept the same
1030 # value.
1031 ac_cache_corrupted=false
1032 for ac_var in `(set) 2>&1 |
1033                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1034   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1035   eval ac_new_set=\$ac_env_${ac_var}_set
1036   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1037   eval ac_new_val="\$ac_env_${ac_var}_value"
1038   case $ac_old_set,$ac_new_set in
1039     set,)
1040       { echo "$as_me:1040: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1041 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1042       ac_cache_corrupted=: ;;
1043     ,set)
1044       { echo "$as_me:1044: error: \`$ac_var' was not set in the previous run" >&5
1045 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1046       ac_cache_corrupted=: ;;
1047     ,);;
1048     *)
1049       if test "x$ac_old_val" != "x$ac_new_val"; then
1050         { echo "$as_me:1050: error: \`$ac_var' has changed since the previous run:" >&5
1051 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1052         { echo "$as_me:1052:   former value:  $ac_old_val" >&5
1053 echo "$as_me:   former value:  $ac_old_val" >&2;}
1054         { echo "$as_me:1054:   current value: $ac_new_val" >&5
1055 echo "$as_me:   current value: $ac_new_val" >&2;}
1056         ac_cache_corrupted=:
1057       fi;;
1058   esac
1059   # Pass precious variables to config.status.  It doesn't matter if
1060   # we pass some twice (in addition to the command line arguments).
1061   if test "$ac_new_set" = set; then
1062     case $ac_new_val in
1063     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1064       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1065       ac_configure_args="$ac_configure_args '$ac_arg'"
1066       ;;
1067     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1068        ;;
1069     esac
1070   fi
1071 done
1072 if $ac_cache_corrupted; then
1073   { echo "$as_me:1073: error: changes in the environment can compromise the build" >&5
1074 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1075   { { echo "$as_me:1075: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1076 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1077    { (exit 1); exit 1; }; }
1078 fi
1079
1080 ac_ext=c
1081 ac_cpp='$CPP $CPPFLAGS'
1082 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1083 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1084 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1085 ac_main_return=return
1086
1087 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1088   *c*,-n*) ECHO_N= ECHO_C='
1089 ' ECHO_T='      ' ;;
1090   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1091   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1092 esac
1093 echo "#! $SHELL" >conftest.sh
1094 echo  "exit 0"   >>conftest.sh
1095 chmod +x conftest.sh
1096 if { (echo "$as_me:1096: PATH=\".;.\"; conftest.sh") >&5
1097   (PATH=".;."; conftest.sh) 2>&5
1098   ac_status=$?
1099   echo "$as_me:1099: \$? = $ac_status" >&5
1100   (exit $ac_status); }; then
1101   ac_path_separator=';'
1102 else
1103   ac_path_separator=:
1104 fi
1105 PATH_SEPARATOR="$ac_path_separator"
1106 rm -f conftest.sh
1107
1108 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1109
1110 top_builddir=`pwd`
1111
1112 echo "$as_me:1112: checking for egrep" >&5
1113 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1114 if test "${ac_cv_prog_egrep+set}" = set; then
1115   echo $ECHO_N "(cached) $ECHO_C" >&6
1116 else
1117   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1118     then ac_cv_prog_egrep='grep -E'
1119     else ac_cv_prog_egrep='egrep'
1120     fi
1121 fi
1122 echo "$as_me:1122: result: $ac_cv_prog_egrep" >&5
1123 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1124  EGREP=$ac_cv_prog_egrep
1125
1126 test -z "$EGREP" && { { echo "$as_me:1126: error: No egrep program found" >&5
1127 echo "$as_me: error: No egrep program found" >&2;}
1128    { (exit 1); exit 1; }; }
1129
1130 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1131 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1132 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1133 cf_cv_abi_version=${NCURSES_MAJOR}
1134 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1135 cf_cv_timestamp=`date`
1136 echo "$as_me:1136: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1137 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1138
1139 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1140
1141 # Check whether --with-rel-version or --without-rel-version was given.
1142 if test "${with_rel_version+set}" = set; then
1143   withval="$with_rel_version"
1144   { echo "$as_me:1144: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1145 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1146  cf_cv_rel_version=$withval
1147 fi;
1148
1149  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1150  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1151
1152 if test -n "$NCURSES_MAJOR" ; then
1153   case $NCURSES_MAJOR in #(vi
1154   [0-9]*) #(vi
1155         ;;
1156   *)
1157         { { echo "$as_me:1157: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1158 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1159    { (exit 1); exit 1; }; }
1160         ;;
1161   esac
1162 else
1163   { { echo "$as_me:1163: error: Release major-version value is empty" >&5
1164 echo "$as_me: error: Release major-version value is empty" >&2;}
1165    { (exit 1); exit 1; }; }
1166 fi
1167
1168 if test -n "$NCURSES_MINOR" ; then
1169   case $NCURSES_MINOR in #(vi
1170   [0-9]*) #(vi
1171         ;;
1172   *)
1173         { { echo "$as_me:1173: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1174 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1175    { (exit 1); exit 1; }; }
1176         ;;
1177   esac
1178 else
1179   { { echo "$as_me:1179: error: Release minor-version value is empty" >&5
1180 echo "$as_me: error: Release minor-version value is empty" >&2;}
1181    { (exit 1); exit 1; }; }
1182 fi
1183
1184 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1185
1186 # Check whether --with-abi-version or --without-abi-version was given.
1187 if test "${with_abi_version+set}" = set; then
1188   withval="$with_abi_version"
1189   { echo "$as_me:1189: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1190 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1191  cf_cv_abi_version=$withval
1192 fi;
1193
1194 if test -n "$cf_cv_abi_version" ; then
1195   case $cf_cv_abi_version in #(vi
1196   [0-9]*) #(vi
1197         ;;
1198   *)
1199         { { echo "$as_me:1199: error: ABI version is not a number: $cf_cv_abi_version" >&5
1200 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1201    { (exit 1); exit 1; }; }
1202         ;;
1203   esac
1204 else
1205   { { echo "$as_me:1205: error: ABI version value is empty" >&5
1206 echo "$as_me: error: ABI version value is empty" >&2;}
1207    { (exit 1); exit 1; }; }
1208 fi
1209
1210 ac_aux_dir=
1211 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1212   if test -f $ac_dir/install-sh; then
1213     ac_aux_dir=$ac_dir
1214     ac_install_sh="$ac_aux_dir/install-sh -c"
1215     break
1216   elif test -f $ac_dir/install.sh; then
1217     ac_aux_dir=$ac_dir
1218     ac_install_sh="$ac_aux_dir/install.sh -c"
1219     break
1220   elif test -f $ac_dir/shtool; then
1221     ac_aux_dir=$ac_dir
1222     ac_install_sh="$ac_aux_dir/shtool install -c"
1223     break
1224   fi
1225 done
1226 if test -z "$ac_aux_dir"; then
1227   { { echo "$as_me:1227: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1228 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1229    { (exit 1); exit 1; }; }
1230 fi
1231 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1232 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1233 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1234
1235 # Make sure we can run config.sub.
1236 $ac_config_sub sun4 >/dev/null 2>&1 ||
1237   { { echo "$as_me:1237: error: cannot run $ac_config_sub" >&5
1238 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1239    { (exit 1); exit 1; }; }
1240
1241 echo "$as_me:1241: checking build system type" >&5
1242 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1243 if test "${ac_cv_build+set}" = set; then
1244   echo $ECHO_N "(cached) $ECHO_C" >&6
1245 else
1246   ac_cv_build_alias=$build_alias
1247 test -z "$ac_cv_build_alias" &&
1248   ac_cv_build_alias=`$ac_config_guess`
1249 test -z "$ac_cv_build_alias" &&
1250   { { echo "$as_me:1250: error: cannot guess build type; you must specify one" >&5
1251 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1252    { (exit 1); exit 1; }; }
1253 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1254   { { echo "$as_me:1254: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1255 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1256    { (exit 1); exit 1; }; }
1257
1258 fi
1259 echo "$as_me:1259: result: $ac_cv_build" >&5
1260 echo "${ECHO_T}$ac_cv_build" >&6
1261 build=$ac_cv_build
1262 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1263 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1264 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1265
1266 echo "$as_me:1266: checking host system type" >&5
1267 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1268 if test "${ac_cv_host+set}" = set; then
1269   echo $ECHO_N "(cached) $ECHO_C" >&6
1270 else
1271   ac_cv_host_alias=$host_alias
1272 test -z "$ac_cv_host_alias" &&
1273   ac_cv_host_alias=$ac_cv_build_alias
1274 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1275   { { echo "$as_me:1275: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1276 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1277    { (exit 1); exit 1; }; }
1278
1279 fi
1280 echo "$as_me:1280: result: $ac_cv_host" >&5
1281 echo "${ECHO_T}$ac_cv_host" >&6
1282 host=$ac_cv_host
1283 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1284 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1285 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1286
1287 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1288         echo "$as_me:1288: checking target system type" >&5
1289 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1290 if test "${ac_cv_target+set}" = set; then
1291   echo $ECHO_N "(cached) $ECHO_C" >&6
1292 else
1293   ac_cv_target_alias=$target_alias
1294 test "x$ac_cv_target_alias" = "x" &&
1295   ac_cv_target_alias=$ac_cv_host_alias
1296 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1297   { { echo "$as_me:1297: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1298 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1299    { (exit 1); exit 1; }; }
1300
1301 fi
1302 echo "$as_me:1302: result: $ac_cv_target" >&5
1303 echo "${ECHO_T}$ac_cv_target" >&6
1304 target=$ac_cv_target
1305 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1306 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1307 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1308
1309 # The aliases save the names the user supplied, while $host etc.
1310 # will get canonicalized.
1311 test -n "$target_alias" &&
1312   test "$program_prefix$program_suffix$program_transform_name" = \
1313     NONENONEs,x,x, &&
1314   program_prefix=${target_alias}-
1315         system_name="$host_os"
1316 else
1317         system_name="`(uname -s -r) 2>/dev/null`"
1318         if test -z "$system_name" ; then
1319                 system_name="`(hostname) 2>/dev/null`"
1320         fi
1321 fi
1322 test -n "$system_name" && cat >>confdefs.h <<EOF
1323 #define SYSTEM_NAME "$system_name"
1324 EOF
1325
1326 if test "${cf_cv_system_name+set}" = set; then
1327   echo $ECHO_N "(cached) $ECHO_C" >&6
1328 else
1329   cf_cv_system_name="$system_name"
1330 fi
1331
1332 test -z "$system_name" && system_name="$cf_cv_system_name"
1333 test -n "$cf_cv_system_name" && echo "$as_me:1333: result: Configuring for $cf_cv_system_name" >&5
1334 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1335
1336 if test ".$system_name" != ".$cf_cv_system_name" ; then
1337         echo "$as_me:1337: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1338 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1339         { { echo "$as_me:1339: error: \"Please remove config.cache and try again.\"" >&5
1340 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1341    { (exit 1); exit 1; }; }
1342 fi
1343
1344 # Check whether --with-system-type or --without-system-type was given.
1345 if test "${with_system_type+set}" = set; then
1346   withval="$with_system_type"
1347   { echo "$as_me:1347: WARNING: overriding system type to $withval" >&5
1348 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1349  cf_cv_system_name=$withval
1350 fi;
1351
1352 ###     Save the given $CFLAGS to allow user-override.
1353 cf_user_CFLAGS="$CFLAGS"
1354
1355 ###     Default install-location
1356
1357 echo "$as_me:1357: checking for prefix" >&5
1358 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1359 if test "x$prefix" = "xNONE" ; then
1360         case "$cf_cv_system_name" in
1361                 # non-vendor systems don't have a conflict
1362         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1363                 prefix=/usr
1364                 ;;
1365         *)      prefix=$ac_default_prefix
1366                 ;;
1367         esac
1368 fi
1369 echo "$as_me:1369: result: $prefix" >&5
1370 echo "${ECHO_T}$prefix" >&6
1371
1372 if test "x$prefix" = "xNONE" ; then
1373 echo "$as_me:1373: checking for default include-directory" >&5
1374 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1375 test -n "$verbose" && echo 1>&6
1376 for cf_symbol in \
1377         $includedir \
1378         $includedir/ncurses \
1379         $prefix/include \
1380         $prefix/include/ncurses \
1381         /usr/local/include \
1382         /usr/local/include/ncurses \
1383         /usr/include \
1384         /usr/include/ncurses
1385 do
1386         cf_dir=`eval echo $cf_symbol`
1387         if test -f $cf_dir/curses.h ; then
1388         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1389                 includedir="$cf_symbol"
1390                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1391                 break
1392         fi
1393         fi
1394         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1395 done
1396 echo "$as_me:1396: result: $includedir" >&5
1397 echo "${ECHO_T}$includedir" >&6
1398 fi
1399
1400 ###     Checks for programs.
1401 ac_ext=c
1402 ac_cpp='$CPP $CPPFLAGS'
1403 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1404 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1405 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1406 ac_main_return=return
1407 if test -n "$ac_tool_prefix"; then
1408   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1409 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1410 echo "$as_me:1410: checking for $ac_word" >&5
1411 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1412 if test "${ac_cv_prog_CC+set}" = set; then
1413   echo $ECHO_N "(cached) $ECHO_C" >&6
1414 else
1415   if test -n "$CC"; then
1416   ac_cv_prog_CC="$CC" # Let the user override the test.
1417 else
1418   ac_save_IFS=$IFS; IFS=$ac_path_separator
1419 ac_dummy="$PATH"
1420 for ac_dir in $ac_dummy; do
1421   IFS=$ac_save_IFS
1422   test -z "$ac_dir" && ac_dir=.
1423   $as_executable_p "$ac_dir/$ac_word" || continue
1424 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1425 echo "$as_me:1425: found $ac_dir/$ac_word" >&5
1426 break
1427 done
1428
1429 fi
1430 fi
1431 CC=$ac_cv_prog_CC
1432 if test -n "$CC"; then
1433   echo "$as_me:1433: result: $CC" >&5
1434 echo "${ECHO_T}$CC" >&6
1435 else
1436   echo "$as_me:1436: result: no" >&5
1437 echo "${ECHO_T}no" >&6
1438 fi
1439
1440 fi
1441 if test -z "$ac_cv_prog_CC"; then
1442   ac_ct_CC=$CC
1443   # Extract the first word of "gcc", so it can be a program name with args.
1444 set dummy gcc; ac_word=$2
1445 echo "$as_me:1445: checking for $ac_word" >&5
1446 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1447 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1448   echo $ECHO_N "(cached) $ECHO_C" >&6
1449 else
1450   if test -n "$ac_ct_CC"; then
1451   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1452 else
1453   ac_save_IFS=$IFS; IFS=$ac_path_separator
1454 ac_dummy="$PATH"
1455 for ac_dir in $ac_dummy; do
1456   IFS=$ac_save_IFS
1457   test -z "$ac_dir" && ac_dir=.
1458   $as_executable_p "$ac_dir/$ac_word" || continue
1459 ac_cv_prog_ac_ct_CC="gcc"
1460 echo "$as_me:1460: found $ac_dir/$ac_word" >&5
1461 break
1462 done
1463
1464 fi
1465 fi
1466 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1467 if test -n "$ac_ct_CC"; then
1468   echo "$as_me:1468: result: $ac_ct_CC" >&5
1469 echo "${ECHO_T}$ac_ct_CC" >&6
1470 else
1471   echo "$as_me:1471: result: no" >&5
1472 echo "${ECHO_T}no" >&6
1473 fi
1474
1475   CC=$ac_ct_CC
1476 else
1477   CC="$ac_cv_prog_CC"
1478 fi
1479
1480 if test -z "$CC"; then
1481   if test -n "$ac_tool_prefix"; then
1482   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1483 set dummy ${ac_tool_prefix}cc; ac_word=$2
1484 echo "$as_me:1484: checking for $ac_word" >&5
1485 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1486 if test "${ac_cv_prog_CC+set}" = set; then
1487   echo $ECHO_N "(cached) $ECHO_C" >&6
1488 else
1489   if test -n "$CC"; then
1490   ac_cv_prog_CC="$CC" # Let the user override the test.
1491 else
1492   ac_save_IFS=$IFS; IFS=$ac_path_separator
1493 ac_dummy="$PATH"
1494 for ac_dir in $ac_dummy; do
1495   IFS=$ac_save_IFS
1496   test -z "$ac_dir" && ac_dir=.
1497   $as_executable_p "$ac_dir/$ac_word" || continue
1498 ac_cv_prog_CC="${ac_tool_prefix}cc"
1499 echo "$as_me:1499: found $ac_dir/$ac_word" >&5
1500 break
1501 done
1502
1503 fi
1504 fi
1505 CC=$ac_cv_prog_CC
1506 if test -n "$CC"; then
1507   echo "$as_me:1507: result: $CC" >&5
1508 echo "${ECHO_T}$CC" >&6
1509 else
1510   echo "$as_me:1510: result: no" >&5
1511 echo "${ECHO_T}no" >&6
1512 fi
1513
1514 fi
1515 if test -z "$ac_cv_prog_CC"; then
1516   ac_ct_CC=$CC
1517   # Extract the first word of "cc", so it can be a program name with args.
1518 set dummy cc; ac_word=$2
1519 echo "$as_me:1519: checking for $ac_word" >&5
1520 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1521 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1522   echo $ECHO_N "(cached) $ECHO_C" >&6
1523 else
1524   if test -n "$ac_ct_CC"; then
1525   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1526 else
1527   ac_save_IFS=$IFS; IFS=$ac_path_separator
1528 ac_dummy="$PATH"
1529 for ac_dir in $ac_dummy; do
1530   IFS=$ac_save_IFS
1531   test -z "$ac_dir" && ac_dir=.
1532   $as_executable_p "$ac_dir/$ac_word" || continue
1533 ac_cv_prog_ac_ct_CC="cc"
1534 echo "$as_me:1534: found $ac_dir/$ac_word" >&5
1535 break
1536 done
1537
1538 fi
1539 fi
1540 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1541 if test -n "$ac_ct_CC"; then
1542   echo "$as_me:1542: result: $ac_ct_CC" >&5
1543 echo "${ECHO_T}$ac_ct_CC" >&6
1544 else
1545   echo "$as_me:1545: result: no" >&5
1546 echo "${ECHO_T}no" >&6
1547 fi
1548
1549   CC=$ac_ct_CC
1550 else
1551   CC="$ac_cv_prog_CC"
1552 fi
1553
1554 fi
1555 if test -z "$CC"; then
1556   # Extract the first word of "cc", so it can be a program name with args.
1557 set dummy cc; ac_word=$2
1558 echo "$as_me:1558: checking for $ac_word" >&5
1559 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1560 if test "${ac_cv_prog_CC+set}" = set; then
1561   echo $ECHO_N "(cached) $ECHO_C" >&6
1562 else
1563   if test -n "$CC"; then
1564   ac_cv_prog_CC="$CC" # Let the user override the test.
1565 else
1566   ac_prog_rejected=no
1567   ac_save_IFS=$IFS; IFS=$ac_path_separator
1568 ac_dummy="$PATH"
1569 for ac_dir in $ac_dummy; do
1570   IFS=$ac_save_IFS
1571   test -z "$ac_dir" && ac_dir=.
1572   $as_executable_p "$ac_dir/$ac_word" || continue
1573 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1574   ac_prog_rejected=yes
1575   continue
1576 fi
1577 ac_cv_prog_CC="cc"
1578 echo "$as_me:1578: found $ac_dir/$ac_word" >&5
1579 break
1580 done
1581
1582 if test $ac_prog_rejected = yes; then
1583   # We found a bogon in the path, so make sure we never use it.
1584   set dummy $ac_cv_prog_CC
1585   shift
1586   if test $# != 0; then
1587     # We chose a different compiler from the bogus one.
1588     # However, it has the same basename, so the bogon will be chosen
1589     # first if we set CC to just the basename; use the full file name.
1590     shift
1591     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1592     shift
1593     ac_cv_prog_CC="$@"
1594   fi
1595 fi
1596 fi
1597 fi
1598 CC=$ac_cv_prog_CC
1599 if test -n "$CC"; then
1600   echo "$as_me:1600: result: $CC" >&5
1601 echo "${ECHO_T}$CC" >&6
1602 else
1603   echo "$as_me:1603: result: no" >&5
1604 echo "${ECHO_T}no" >&6
1605 fi
1606
1607 fi
1608 if test -z "$CC"; then
1609   if test -n "$ac_tool_prefix"; then
1610   for ac_prog in cl
1611   do
1612     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1613 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1614 echo "$as_me:1614: checking for $ac_word" >&5
1615 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1616 if test "${ac_cv_prog_CC+set}" = set; then
1617   echo $ECHO_N "(cached) $ECHO_C" >&6
1618 else
1619   if test -n "$CC"; then
1620   ac_cv_prog_CC="$CC" # Let the user override the test.
1621 else
1622   ac_save_IFS=$IFS; IFS=$ac_path_separator
1623 ac_dummy="$PATH"
1624 for ac_dir in $ac_dummy; do
1625   IFS=$ac_save_IFS
1626   test -z "$ac_dir" && ac_dir=.
1627   $as_executable_p "$ac_dir/$ac_word" || continue
1628 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1629 echo "$as_me:1629: found $ac_dir/$ac_word" >&5
1630 break
1631 done
1632
1633 fi
1634 fi
1635 CC=$ac_cv_prog_CC
1636 if test -n "$CC"; then
1637   echo "$as_me:1637: result: $CC" >&5
1638 echo "${ECHO_T}$CC" >&6
1639 else
1640   echo "$as_me:1640: result: no" >&5
1641 echo "${ECHO_T}no" >&6
1642 fi
1643
1644     test -n "$CC" && break
1645   done
1646 fi
1647 if test -z "$CC"; then
1648   ac_ct_CC=$CC
1649   for ac_prog in cl
1650 do
1651   # Extract the first word of "$ac_prog", so it can be a program name with args.
1652 set dummy $ac_prog; ac_word=$2
1653 echo "$as_me:1653: checking for $ac_word" >&5
1654 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1655 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1656   echo $ECHO_N "(cached) $ECHO_C" >&6
1657 else
1658   if test -n "$ac_ct_CC"; then
1659   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1660 else
1661   ac_save_IFS=$IFS; IFS=$ac_path_separator
1662 ac_dummy="$PATH"
1663 for ac_dir in $ac_dummy; do
1664   IFS=$ac_save_IFS
1665   test -z "$ac_dir" && ac_dir=.
1666   $as_executable_p "$ac_dir/$ac_word" || continue
1667 ac_cv_prog_ac_ct_CC="$ac_prog"
1668 echo "$as_me:1668: found $ac_dir/$ac_word" >&5
1669 break
1670 done
1671
1672 fi
1673 fi
1674 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1675 if test -n "$ac_ct_CC"; then
1676   echo "$as_me:1676: result: $ac_ct_CC" >&5
1677 echo "${ECHO_T}$ac_ct_CC" >&6
1678 else
1679   echo "$as_me:1679: result: no" >&5
1680 echo "${ECHO_T}no" >&6
1681 fi
1682
1683   test -n "$ac_ct_CC" && break
1684 done
1685
1686   CC=$ac_ct_CC
1687 fi
1688
1689 fi
1690
1691 test -z "$CC" && { { echo "$as_me:1691: error: no acceptable cc found in \$PATH" >&5
1692 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1693    { (exit 1); exit 1; }; }
1694
1695 # Provide some information about the compiler.
1696 echo "$as_me:1696:" \
1697      "checking for C compiler version" >&5
1698 ac_compiler=`set X $ac_compile; echo $2`
1699 { (eval echo "$as_me:1699: \"$ac_compiler --version </dev/null >&5\"") >&5
1700   (eval $ac_compiler --version </dev/null >&5) 2>&5
1701   ac_status=$?
1702   echo "$as_me:1702: \$? = $ac_status" >&5
1703   (exit $ac_status); }
1704 { (eval echo "$as_me:1704: \"$ac_compiler -v </dev/null >&5\"") >&5
1705   (eval $ac_compiler -v </dev/null >&5) 2>&5
1706   ac_status=$?
1707   echo "$as_me:1707: \$? = $ac_status" >&5
1708   (exit $ac_status); }
1709 { (eval echo "$as_me:1709: \"$ac_compiler -V </dev/null >&5\"") >&5
1710   (eval $ac_compiler -V </dev/null >&5) 2>&5
1711   ac_status=$?
1712   echo "$as_me:1712: \$? = $ac_status" >&5
1713   (exit $ac_status); }
1714
1715 cat >conftest.$ac_ext <<_ACEOF
1716 #line 1716 "configure"
1717 #include "confdefs.h"
1718
1719 int
1720 main ()
1721 {
1722
1723   ;
1724   return 0;
1725 }
1726 _ACEOF
1727 ac_clean_files_save=$ac_clean_files
1728 ac_clean_files="$ac_clean_files a.out a.exe"
1729 # Try to create an executable without -o first, disregard a.out.
1730 # It will help us diagnose broken compilers, and finding out an intuition
1731 # of exeext.
1732 echo "$as_me:1732: checking for C compiler default output" >&5
1733 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1734 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1735 if { (eval echo "$as_me:1735: \"$ac_link_default\"") >&5
1736   (eval $ac_link_default) 2>&5
1737   ac_status=$?
1738   echo "$as_me:1738: \$? = $ac_status" >&5
1739   (exit $ac_status); }; then
1740   # Find the output, starting from the most likely.  This scheme is
1741 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1742 # resort.
1743 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1744                 ls a.out conftest 2>/dev/null;
1745                 ls a.* conftest.* 2>/dev/null`; do
1746   case $ac_file in
1747     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1748     a.out ) # We found the default executable, but exeext='' is most
1749             # certainly right.
1750             break;;
1751     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1752           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1753           export ac_cv_exeext
1754           break;;
1755     * ) break;;
1756   esac
1757 done
1758 else
1759   echo "$as_me: failed program was:" >&5
1760 cat conftest.$ac_ext >&5
1761 { { echo "$as_me:1761: error: C compiler cannot create executables" >&5
1762 echo "$as_me: error: C compiler cannot create executables" >&2;}
1763    { (exit 77); exit 77; }; }
1764 fi
1765
1766 ac_exeext=$ac_cv_exeext
1767 echo "$as_me:1767: result: $ac_file" >&5
1768 echo "${ECHO_T}$ac_file" >&6
1769
1770 # Check the compiler produces executables we can run.  If not, either
1771 # the compiler is broken, or we cross compile.
1772 echo "$as_me:1772: checking whether the C compiler works" >&5
1773 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1774 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1775 # If not cross compiling, check that we can run a simple program.
1776 if test "$cross_compiling" != yes; then
1777   if { ac_try='./$ac_file'
1778   { (eval echo "$as_me:1778: \"$ac_try\"") >&5
1779   (eval $ac_try) 2>&5
1780   ac_status=$?
1781   echo "$as_me:1781: \$? = $ac_status" >&5
1782   (exit $ac_status); }; }; then
1783     cross_compiling=no
1784   else
1785     if test "$cross_compiling" = maybe; then
1786         cross_compiling=yes
1787     else
1788         { { echo "$as_me:1788: error: cannot run C compiled programs.
1789 If you meant to cross compile, use \`--host'." >&5
1790 echo "$as_me: error: cannot run C compiled programs.
1791 If you meant to cross compile, use \`--host'." >&2;}
1792    { (exit 1); exit 1; }; }
1793     fi
1794   fi
1795 fi
1796 echo "$as_me:1796: result: yes" >&5
1797 echo "${ECHO_T}yes" >&6
1798
1799 rm -f a.out a.exe conftest$ac_cv_exeext
1800 ac_clean_files=$ac_clean_files_save
1801 # Check the compiler produces executables we can run.  If not, either
1802 # the compiler is broken, or we cross compile.
1803 echo "$as_me:1803: checking whether we are cross compiling" >&5
1804 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1805 echo "$as_me:1805: result: $cross_compiling" >&5
1806 echo "${ECHO_T}$cross_compiling" >&6
1807
1808 echo "$as_me:1808: checking for executable suffix" >&5
1809 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1810 if { (eval echo "$as_me:1810: \"$ac_link\"") >&5
1811   (eval $ac_link) 2>&5
1812   ac_status=$?
1813   echo "$as_me:1813: \$? = $ac_status" >&5
1814   (exit $ac_status); }; then
1815   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1816 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1817 # work properly (i.e., refer to `conftest.exe'), while it won't with
1818 # `rm'.
1819 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1820   case $ac_file in
1821     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1822     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1823           export ac_cv_exeext
1824           break;;
1825     * ) break;;
1826   esac
1827 done
1828 else
1829   { { echo "$as_me:1829: error: cannot compute EXEEXT: cannot compile and link" >&5
1830 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1831    { (exit 1); exit 1; }; }
1832 fi
1833
1834 rm -f conftest$ac_cv_exeext
1835 echo "$as_me:1835: result: $ac_cv_exeext" >&5
1836 echo "${ECHO_T}$ac_cv_exeext" >&6
1837
1838 rm -f conftest.$ac_ext
1839 EXEEXT=$ac_cv_exeext
1840 ac_exeext=$EXEEXT
1841 echo "$as_me:1841: checking for object suffix" >&5
1842 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1843 if test "${ac_cv_objext+set}" = set; then
1844   echo $ECHO_N "(cached) $ECHO_C" >&6
1845 else
1846   cat >conftest.$ac_ext <<_ACEOF
1847 #line 1847 "configure"
1848 #include "confdefs.h"
1849
1850 int
1851 main ()
1852 {
1853
1854   ;
1855   return 0;
1856 }
1857 _ACEOF
1858 rm -f conftest.o conftest.obj
1859 if { (eval echo "$as_me:1859: \"$ac_compile\"") >&5
1860   (eval $ac_compile) 2>&5
1861   ac_status=$?
1862   echo "$as_me:1862: \$? = $ac_status" >&5
1863   (exit $ac_status); }; then
1864   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1865   case $ac_file in
1866     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1867     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1868        break;;
1869   esac
1870 done
1871 else
1872   echo "$as_me: failed program was:" >&5
1873 cat conftest.$ac_ext >&5
1874 { { echo "$as_me:1874: error: cannot compute OBJEXT: cannot compile" >&5
1875 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1876    { (exit 1); exit 1; }; }
1877 fi
1878
1879 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1880 fi
1881 echo "$as_me:1881: result: $ac_cv_objext" >&5
1882 echo "${ECHO_T}$ac_cv_objext" >&6
1883 OBJEXT=$ac_cv_objext
1884 ac_objext=$OBJEXT
1885 echo "$as_me:1885: checking whether we are using the GNU C compiler" >&5
1886 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1887 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1888   echo $ECHO_N "(cached) $ECHO_C" >&6
1889 else
1890   cat >conftest.$ac_ext <<_ACEOF
1891 #line 1891 "configure"
1892 #include "confdefs.h"
1893
1894 int
1895 main ()
1896 {
1897 #ifndef __GNUC__
1898        choke me
1899 #endif
1900
1901   ;
1902   return 0;
1903 }
1904 _ACEOF
1905 rm -f conftest.$ac_objext
1906 if { (eval echo "$as_me:1906: \"$ac_compile\"") >&5
1907   (eval $ac_compile) 2>&5
1908   ac_status=$?
1909   echo "$as_me:1909: \$? = $ac_status" >&5
1910   (exit $ac_status); } &&
1911          { ac_try='test -s conftest.$ac_objext'
1912   { (eval echo "$as_me:1912: \"$ac_try\"") >&5
1913   (eval $ac_try) 2>&5
1914   ac_status=$?
1915   echo "$as_me:1915: \$? = $ac_status" >&5
1916   (exit $ac_status); }; }; then
1917   ac_compiler_gnu=yes
1918 else
1919   echo "$as_me: failed program was:" >&5
1920 cat conftest.$ac_ext >&5
1921 ac_compiler_gnu=no
1922 fi
1923 rm -f conftest.$ac_objext conftest.$ac_ext
1924 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1925
1926 fi
1927 echo "$as_me:1927: result: $ac_cv_c_compiler_gnu" >&5
1928 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1929 GCC=`test $ac_compiler_gnu = yes && echo yes`
1930 ac_test_CFLAGS=${CFLAGS+set}
1931 ac_save_CFLAGS=$CFLAGS
1932 CFLAGS="-g"
1933 echo "$as_me:1933: checking whether $CC accepts -g" >&5
1934 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1935 if test "${ac_cv_prog_cc_g+set}" = set; then
1936   echo $ECHO_N "(cached) $ECHO_C" >&6
1937 else
1938   cat >conftest.$ac_ext <<_ACEOF
1939 #line 1939 "configure"
1940 #include "confdefs.h"
1941
1942 int
1943 main ()
1944 {
1945
1946   ;
1947   return 0;
1948 }
1949 _ACEOF
1950 rm -f conftest.$ac_objext
1951 if { (eval echo "$as_me:1951: \"$ac_compile\"") >&5
1952   (eval $ac_compile) 2>&5
1953   ac_status=$?
1954   echo "$as_me:1954: \$? = $ac_status" >&5
1955   (exit $ac_status); } &&
1956          { ac_try='test -s conftest.$ac_objext'
1957   { (eval echo "$as_me:1957: \"$ac_try\"") >&5
1958   (eval $ac_try) 2>&5
1959   ac_status=$?
1960   echo "$as_me:1960: \$? = $ac_status" >&5
1961   (exit $ac_status); }; }; then
1962   ac_cv_prog_cc_g=yes
1963 else
1964   echo "$as_me: failed program was:" >&5
1965 cat conftest.$ac_ext >&5
1966 ac_cv_prog_cc_g=no
1967 fi
1968 rm -f conftest.$ac_objext conftest.$ac_ext
1969 fi
1970 echo "$as_me:1970: result: $ac_cv_prog_cc_g" >&5
1971 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1972 if test "$ac_test_CFLAGS" = set; then
1973   CFLAGS=$ac_save_CFLAGS
1974 elif test $ac_cv_prog_cc_g = yes; then
1975   if test "$GCC" = yes; then
1976     CFLAGS="-g -O2"
1977   else
1978     CFLAGS="-g"
1979   fi
1980 else
1981   if test "$GCC" = yes; then
1982     CFLAGS="-O2"
1983   else
1984     CFLAGS=
1985   fi
1986 fi
1987 # Some people use a C++ compiler to compile C.  Since we use `exit',
1988 # in C++ we need to declare it.  In case someone uses the same compiler
1989 # for both compiling C and C++ we need to have the C++ compiler decide
1990 # the declaration of exit, since it's the most demanding environment.
1991 cat >conftest.$ac_ext <<_ACEOF
1992 #ifndef __cplusplus
1993   choke me
1994 #endif
1995 _ACEOF
1996 rm -f conftest.$ac_objext
1997 if { (eval echo "$as_me:1997: \"$ac_compile\"") >&5
1998   (eval $ac_compile) 2>&5
1999   ac_status=$?
2000   echo "$as_me:2000: \$? = $ac_status" >&5
2001   (exit $ac_status); } &&
2002          { ac_try='test -s conftest.$ac_objext'
2003   { (eval echo "$as_me:2003: \"$ac_try\"") >&5
2004   (eval $ac_try) 2>&5
2005   ac_status=$?
2006   echo "$as_me:2006: \$? = $ac_status" >&5
2007   (exit $ac_status); }; }; then
2008   for ac_declaration in \
2009    ''\
2010    '#include <stdlib.h>' \
2011    'extern "C" void std::exit (int) throw (); using std::exit;' \
2012    'extern "C" void std::exit (int); using std::exit;' \
2013    'extern "C" void exit (int) throw ();' \
2014    'extern "C" void exit (int);' \
2015    'void exit (int);'
2016 do
2017   cat >conftest.$ac_ext <<_ACEOF
2018 #line 2018 "configure"
2019 #include "confdefs.h"
2020 #include <stdlib.h>
2021 $ac_declaration
2022 int
2023 main ()
2024 {
2025 exit (42);
2026   ;
2027   return 0;
2028 }
2029 _ACEOF
2030 rm -f conftest.$ac_objext
2031 if { (eval echo "$as_me:2031: \"$ac_compile\"") >&5
2032   (eval $ac_compile) 2>&5
2033   ac_status=$?
2034   echo "$as_me:2034: \$? = $ac_status" >&5
2035   (exit $ac_status); } &&
2036          { ac_try='test -s conftest.$ac_objext'
2037   { (eval echo "$as_me:2037: \"$ac_try\"") >&5
2038   (eval $ac_try) 2>&5
2039   ac_status=$?
2040   echo "$as_me:2040: \$? = $ac_status" >&5
2041   (exit $ac_status); }; }; then
2042   :
2043 else
2044   echo "$as_me: failed program was:" >&5
2045 cat conftest.$ac_ext >&5
2046 continue
2047 fi
2048 rm -f conftest.$ac_objext conftest.$ac_ext
2049   cat >conftest.$ac_ext <<_ACEOF
2050 #line 2050 "configure"
2051 #include "confdefs.h"
2052 $ac_declaration
2053 int
2054 main ()
2055 {
2056 exit (42);
2057   ;
2058   return 0;
2059 }
2060 _ACEOF
2061 rm -f conftest.$ac_objext
2062 if { (eval echo "$as_me:2062: \"$ac_compile\"") >&5
2063   (eval $ac_compile) 2>&5
2064   ac_status=$?
2065   echo "$as_me:2065: \$? = $ac_status" >&5
2066   (exit $ac_status); } &&
2067          { ac_try='test -s conftest.$ac_objext'
2068   { (eval echo "$as_me:2068: \"$ac_try\"") >&5
2069   (eval $ac_try) 2>&5
2070   ac_status=$?
2071   echo "$as_me:2071: \$? = $ac_status" >&5
2072   (exit $ac_status); }; }; then
2073   break
2074 else
2075   echo "$as_me: failed program was:" >&5
2076 cat conftest.$ac_ext >&5
2077 fi
2078 rm -f conftest.$ac_objext conftest.$ac_ext
2079 done
2080 rm -f conftest*
2081 if test -n "$ac_declaration"; then
2082   echo '#ifdef __cplusplus' >>confdefs.h
2083   echo $ac_declaration      >>confdefs.h
2084   echo '#endif'             >>confdefs.h
2085 fi
2086
2087 else
2088   echo "$as_me: failed program was:" >&5
2089 cat conftest.$ac_ext >&5
2090 fi
2091 rm -f conftest.$ac_objext conftest.$ac_ext
2092 ac_ext=c
2093 ac_cpp='$CPP $CPPFLAGS'
2094 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2095 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2096 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2097 ac_main_return=return
2098
2099 GCC_VERSION=none
2100 if test "$GCC" = yes ; then
2101         echo "$as_me:2101: checking version of $CC" >&5
2102 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2103         GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2104         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2105         echo "$as_me:2105: result: $GCC_VERSION" >&5
2106 echo "${ECHO_T}$GCC_VERSION" >&6
2107 fi
2108
2109 ac_ext=c
2110 ac_cpp='$CPP $CPPFLAGS'
2111 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2112 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2113 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2114 ac_main_return=return
2115 echo "$as_me:2115: checking how to run the C preprocessor" >&5
2116 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2117 # On Suns, sometimes $CPP names a directory.
2118 if test -n "$CPP" && test -d "$CPP"; then
2119   CPP=
2120 fi
2121 if test -z "$CPP"; then
2122   if test "${ac_cv_prog_CPP+set}" = set; then
2123   echo $ECHO_N "(cached) $ECHO_C" >&6
2124 else
2125       # Double quotes because CPP needs to be expanded
2126     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2127     do
2128       ac_preproc_ok=false
2129 for ac_c_preproc_warn_flag in '' yes
2130 do
2131   # Use a header file that comes with gcc, so configuring glibc
2132   # with a fresh cross-compiler works.
2133   # On the NeXT, cc -E runs the code through the compiler's parser,
2134   # not just through cpp. "Syntax error" is here to catch this case.
2135   cat >conftest.$ac_ext <<_ACEOF
2136 #line 2136 "configure"
2137 #include "confdefs.h"
2138 #include <assert.h>
2139                      Syntax error
2140 _ACEOF
2141 if { (eval echo "$as_me:2141: \"$ac_cpp conftest.$ac_ext\"") >&5
2142   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2143   ac_status=$?
2144   egrep -v '^ *\+' conftest.er1 >conftest.err
2145   rm -f conftest.er1
2146   cat conftest.err >&5
2147   echo "$as_me:2147: \$? = $ac_status" >&5
2148   (exit $ac_status); } >/dev/null; then
2149   if test -s conftest.err; then
2150     ac_cpp_err=$ac_c_preproc_warn_flag
2151   else
2152     ac_cpp_err=
2153   fi
2154 else
2155   ac_cpp_err=yes
2156 fi
2157 if test -z "$ac_cpp_err"; then
2158   :
2159 else
2160   echo "$as_me: failed program was:" >&5
2161   cat conftest.$ac_ext >&5
2162   # Broken: fails on valid input.
2163 continue
2164 fi
2165 rm -f conftest.err conftest.$ac_ext
2166
2167   # OK, works on sane cases.  Now check whether non-existent headers
2168   # can be detected and how.
2169   cat >conftest.$ac_ext <<_ACEOF
2170 #line 2170 "configure"
2171 #include "confdefs.h"
2172 #include <ac_nonexistent.h>
2173 _ACEOF
2174 if { (eval echo "$as_me:2174: \"$ac_cpp conftest.$ac_ext\"") >&5
2175   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2176   ac_status=$?
2177   egrep -v '^ *\+' conftest.er1 >conftest.err
2178   rm -f conftest.er1
2179   cat conftest.err >&5
2180   echo "$as_me:2180: \$? = $ac_status" >&5
2181   (exit $ac_status); } >/dev/null; then
2182   if test -s conftest.err; then
2183     ac_cpp_err=$ac_c_preproc_warn_flag
2184   else
2185     ac_cpp_err=
2186   fi
2187 else
2188   ac_cpp_err=yes
2189 fi
2190 if test -z "$ac_cpp_err"; then
2191   # Broken: success on invalid input.
2192 continue
2193 else
2194   echo "$as_me: failed program was:" >&5
2195   cat conftest.$ac_ext >&5
2196   # Passes both tests.
2197 ac_preproc_ok=:
2198 break
2199 fi
2200 rm -f conftest.err conftest.$ac_ext
2201
2202 done
2203 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2204 rm -f conftest.err conftest.$ac_ext
2205 if $ac_preproc_ok; then
2206   break
2207 fi
2208
2209     done
2210     ac_cv_prog_CPP=$CPP
2211
2212 fi
2213   CPP=$ac_cv_prog_CPP
2214 else
2215   ac_cv_prog_CPP=$CPP
2216 fi
2217 echo "$as_me:2217: result: $CPP" >&5
2218 echo "${ECHO_T}$CPP" >&6
2219 ac_preproc_ok=false
2220 for ac_c_preproc_warn_flag in '' yes
2221 do
2222   # Use a header file that comes with gcc, so configuring glibc
2223   # with a fresh cross-compiler works.
2224   # On the NeXT, cc -E runs the code through the compiler's parser,
2225   # not just through cpp. "Syntax error" is here to catch this case.
2226   cat >conftest.$ac_ext <<_ACEOF
2227 #line 2227 "configure"
2228 #include "confdefs.h"
2229 #include <assert.h>
2230                      Syntax error
2231 _ACEOF
2232 if { (eval echo "$as_me:2232: \"$ac_cpp conftest.$ac_ext\"") >&5
2233   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2234   ac_status=$?
2235   egrep -v '^ *\+' conftest.er1 >conftest.err
2236   rm -f conftest.er1
2237   cat conftest.err >&5
2238   echo "$as_me:2238: \$? = $ac_status" >&5
2239   (exit $ac_status); } >/dev/null; then
2240   if test -s conftest.err; then
2241     ac_cpp_err=$ac_c_preproc_warn_flag
2242   else
2243     ac_cpp_err=
2244   fi
2245 else
2246   ac_cpp_err=yes
2247 fi
2248 if test -z "$ac_cpp_err"; then
2249   :
2250 else
2251   echo "$as_me: failed program was:" >&5
2252   cat conftest.$ac_ext >&5
2253   # Broken: fails on valid input.
2254 continue
2255 fi
2256 rm -f conftest.err conftest.$ac_ext
2257
2258   # OK, works on sane cases.  Now check whether non-existent headers
2259   # can be detected and how.
2260   cat >conftest.$ac_ext <<_ACEOF
2261 #line 2261 "configure"
2262 #include "confdefs.h"
2263 #include <ac_nonexistent.h>
2264 _ACEOF
2265 if { (eval echo "$as_me:2265: \"$ac_cpp conftest.$ac_ext\"") >&5
2266   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2267   ac_status=$?
2268   egrep -v '^ *\+' conftest.er1 >conftest.err
2269   rm -f conftest.er1
2270   cat conftest.err >&5
2271   echo "$as_me:2271: \$? = $ac_status" >&5
2272   (exit $ac_status); } >/dev/null; then
2273   if test -s conftest.err; then
2274     ac_cpp_err=$ac_c_preproc_warn_flag
2275   else
2276     ac_cpp_err=
2277   fi
2278 else
2279   ac_cpp_err=yes
2280 fi
2281 if test -z "$ac_cpp_err"; then
2282   # Broken: success on invalid input.
2283 continue
2284 else
2285   echo "$as_me: failed program was:" >&5
2286   cat conftest.$ac_ext >&5
2287   # Passes both tests.
2288 ac_preproc_ok=:
2289 break
2290 fi
2291 rm -f conftest.err conftest.$ac_ext
2292
2293 done
2294 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2295 rm -f conftest.err conftest.$ac_ext
2296 if $ac_preproc_ok; then
2297   :
2298 else
2299   { { echo "$as_me:2299: error: C preprocessor \"$CPP\" fails sanity check" >&5
2300 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2301    { (exit 1); exit 1; }; }
2302 fi
2303
2304 ac_ext=c
2305 ac_cpp='$CPP $CPPFLAGS'
2306 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2307 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2308 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2309 ac_main_return=return
2310
2311 if test $ac_cv_c_compiler_gnu = yes; then
2312     echo "$as_me:2312: checking whether $CC needs -traditional" >&5
2313 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2314 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2315   echo $ECHO_N "(cached) $ECHO_C" >&6
2316 else
2317     ac_pattern="Autoconf.*'x'"
2318   cat >conftest.$ac_ext <<_ACEOF
2319 #line 2319 "configure"
2320 #include "confdefs.h"
2321 #include <sgtty.h>
2322 int Autoconf = TIOCGETP;
2323 _ACEOF
2324 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2325   egrep "$ac_pattern" >/dev/null 2>&1; then
2326   ac_cv_prog_gcc_traditional=yes
2327 else
2328   ac_cv_prog_gcc_traditional=no
2329 fi
2330 rm -f conftest*
2331
2332   if test $ac_cv_prog_gcc_traditional = no; then
2333     cat >conftest.$ac_ext <<_ACEOF
2334 #line 2334 "configure"
2335 #include "confdefs.h"
2336 #include <termio.h>
2337 int Autoconf = TCGETA;
2338 _ACEOF
2339 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2340   egrep "$ac_pattern" >/dev/null 2>&1; then
2341   ac_cv_prog_gcc_traditional=yes
2342 fi
2343 rm -f conftest*
2344
2345   fi
2346 fi
2347 echo "$as_me:2347: result: $ac_cv_prog_gcc_traditional" >&5
2348 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2349   if test $ac_cv_prog_gcc_traditional = yes; then
2350     CC="$CC -traditional"
2351   fi
2352 fi
2353
2354 echo "$as_me:2354: checking whether $CC understands -c and -o together" >&5
2355 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2356 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2357   echo $ECHO_N "(cached) $ECHO_C" >&6
2358 else
2359
2360 cat > conftest.$ac_ext <<CF_EOF
2361 #include <stdio.h>
2362 int main()
2363 {
2364         ${cf_cv_main_return:-return}(0);
2365 }
2366 CF_EOF
2367 # We do the test twice because some compilers refuse to overwrite an
2368 # existing .o file with -o, though they will create one.
2369 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2370 if { (eval echo "$as_me:2370: \"$ac_try\"") >&5
2371   (eval $ac_try) 2>&5
2372   ac_status=$?
2373   echo "$as_me:2373: \$? = $ac_status" >&5
2374   (exit $ac_status); } &&
2375   test -f conftest2.$ac_objext && { (eval echo "$as_me:2375: \"$ac_try\"") >&5
2376   (eval $ac_try) 2>&5
2377   ac_status=$?
2378   echo "$as_me:2378: \$? = $ac_status" >&5
2379   (exit $ac_status); };
2380 then
2381   eval cf_cv_prog_CC_c_o=yes
2382 else
2383   eval cf_cv_prog_CC_c_o=no
2384 fi
2385 rm -f conftest*
2386
2387 fi
2388 if test $cf_cv_prog_CC_c_o = yes; then
2389   echo "$as_me:2389: result: yes" >&5
2390 echo "${ECHO_T}yes" >&6
2391 else
2392   echo "$as_me:2392: result: no" >&5
2393 echo "${ECHO_T}no" >&6
2394 fi
2395
2396 echo "$as_me:2396: checking for POSIXized ISC" >&5
2397 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2398 if test -d /etc/conf/kconfig.d &&
2399    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2400 then
2401   echo "$as_me:2401: result: yes" >&5
2402 echo "${ECHO_T}yes" >&6
2403   ISC=yes # If later tests want to check for ISC.
2404
2405 cat >>confdefs.h <<\EOF
2406 #define _POSIX_SOURCE 1
2407 EOF
2408
2409   if test "$GCC" = yes; then
2410     CC="$CC -posix"
2411   else
2412     CC="$CC -Xp"
2413   fi
2414 else
2415   echo "$as_me:2415: result: no" >&5
2416 echo "${ECHO_T}no" >&6
2417   ISC=
2418 fi
2419
2420 echo "$as_me:2420: checking for ${CC-cc} option to accept ANSI C" >&5
2421 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2422 if test "${cf_cv_ansi_cc+set}" = set; then
2423   echo $ECHO_N "(cached) $ECHO_C" >&6
2424 else
2425
2426 cf_cv_ansi_cc=no
2427 cf_save_CFLAGS="$CFLAGS"
2428 cf_save_CPPFLAGS="$CPPFLAGS"
2429 # Don't try gcc -ansi; that turns off useful extensions and
2430 # breaks some systems' header files.
2431 # AIX                   -qlanglvl=ansi
2432 # Ultrix and OSF/1      -std1
2433 # HP-UX                 -Aa -D_HPUX_SOURCE
2434 # SVR4                  -Xc
2435 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2436 for cf_arg in "-DCC_HAS_PROTOS" \
2437         "" \
2438         -qlanglvl=ansi \
2439         -std1 \
2440         -Ae \
2441         "-Aa -D_HPUX_SOURCE" \
2442         -Xc
2443 do
2444
2445 cf_fix_cppflags=no
2446 cf_new_cflags=
2447 cf_new_cppflags=
2448 cf_new_extra_cppflags=
2449
2450 for cf_add_cflags in $cf_arg
2451 do
2452 case $cf_fix_cppflags in
2453 no)
2454         case $cf_add_cflags in #(vi
2455         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2456                 case $cf_add_cflags in
2457                 -D*)
2458                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2459
2460                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2461                                 && test -z "${cf_tst_cflags}" \
2462                                 && cf_fix_cppflags=yes
2463
2464                         if test $cf_fix_cppflags = yes ; then
2465                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2466                                 continue
2467                         elif test "${cf_tst_cflags}" = "\"'" ; then
2468                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2469                                 continue
2470                         fi
2471                         ;;
2472                 esac
2473                 case "$CPPFLAGS" in
2474                 *$cf_add_cflags) #(vi
2475                         ;;
2476                 *) #(vi
2477                         case $cf_add_cflags in #(vi
2478                         -D*)
2479                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2480
2481 CPPFLAGS=`echo "$CPPFLAGS" | \
2482         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2483                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2484
2485                                 ;;
2486                         esac
2487                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2488                         ;;
2489                 esac
2490                 ;;
2491         *)
2492                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2493                 ;;
2494         esac
2495         ;;
2496 yes)
2497         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2498
2499         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2500
2501         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2502                 && test -z "${cf_tst_cflags}" \
2503                 && cf_fix_cppflags=no
2504         ;;
2505 esac
2506 done
2507
2508 if test -n "$cf_new_cflags" ; then
2509
2510         CFLAGS="$CFLAGS $cf_new_cflags"
2511 fi
2512
2513 if test -n "$cf_new_cppflags" ; then
2514
2515         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2516 fi
2517
2518 if test -n "$cf_new_extra_cppflags" ; then
2519
2520         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2521 fi
2522
2523         cat >conftest.$ac_ext <<_ACEOF
2524 #line 2524 "configure"
2525 #include "confdefs.h"
2526
2527 #ifndef CC_HAS_PROTOS
2528 #if !defined(__STDC__) || (__STDC__ != 1)
2529 choke me
2530 #endif
2531 #endif
2532
2533 int
2534 main ()
2535 {
2536
2537         int test (int i, double x);
2538         struct s1 {int (*f) (int a);};
2539         struct s2 {int (*f) (double a);};
2540   ;
2541   return 0;
2542 }
2543 _ACEOF
2544 rm -f conftest.$ac_objext
2545 if { (eval echo "$as_me:2545: \"$ac_compile\"") >&5
2546   (eval $ac_compile) 2>&5
2547   ac_status=$?
2548   echo "$as_me:2548: \$? = $ac_status" >&5
2549   (exit $ac_status); } &&
2550          { ac_try='test -s conftest.$ac_objext'
2551   { (eval echo "$as_me:2551: \"$ac_try\"") >&5
2552   (eval $ac_try) 2>&5
2553   ac_status=$?
2554   echo "$as_me:2554: \$? = $ac_status" >&5
2555   (exit $ac_status); }; }; then
2556   cf_cv_ansi_cc="$cf_arg"; break
2557 else
2558   echo "$as_me: failed program was:" >&5
2559 cat conftest.$ac_ext >&5
2560 fi
2561 rm -f conftest.$ac_objext conftest.$ac_ext
2562 done
2563 CFLAGS="$cf_save_CFLAGS"
2564 CPPFLAGS="$cf_save_CPPFLAGS"
2565
2566 fi
2567 echo "$as_me:2567: result: $cf_cv_ansi_cc" >&5
2568 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2569
2570 if test "$cf_cv_ansi_cc" != "no"; then
2571 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2572
2573 cf_fix_cppflags=no
2574 cf_new_cflags=
2575 cf_new_cppflags=
2576 cf_new_extra_cppflags=
2577
2578 for cf_add_cflags in $cf_cv_ansi_cc
2579 do
2580 case $cf_fix_cppflags in
2581 no)
2582         case $cf_add_cflags in #(vi
2583         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2584                 case $cf_add_cflags in
2585                 -D*)
2586                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2587
2588                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2589                                 && test -z "${cf_tst_cflags}" \
2590                                 && cf_fix_cppflags=yes
2591
2592                         if test $cf_fix_cppflags = yes ; then
2593                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2594                                 continue
2595                         elif test "${cf_tst_cflags}" = "\"'" ; then
2596                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2597                                 continue
2598                         fi
2599                         ;;
2600                 esac
2601                 case "$CPPFLAGS" in
2602                 *$cf_add_cflags) #(vi
2603                         ;;
2604                 *) #(vi
2605                         case $cf_add_cflags in #(vi
2606                         -D*)
2607                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2608
2609 CPPFLAGS=`echo "$CPPFLAGS" | \
2610         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2611                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2612
2613                                 ;;
2614                         esac
2615                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2616                         ;;
2617                 esac
2618                 ;;
2619         *)
2620                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2621                 ;;
2622         esac
2623         ;;
2624 yes)
2625         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2626
2627         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2628
2629         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2630                 && test -z "${cf_tst_cflags}" \
2631                 && cf_fix_cppflags=no
2632         ;;
2633 esac
2634 done
2635
2636 if test -n "$cf_new_cflags" ; then
2637
2638         CFLAGS="$CFLAGS $cf_new_cflags"
2639 fi
2640
2641 if test -n "$cf_new_cppflags" ; then
2642
2643         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2644 fi
2645
2646 if test -n "$cf_new_extra_cppflags" ; then
2647
2648         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2649 fi
2650
2651 else
2652         cat >>confdefs.h <<\EOF
2653 #define CC_HAS_PROTOS 1
2654 EOF
2655
2656 fi
2657 fi
2658
2659 if test "$cf_cv_ansi_cc" = "no"; then
2660         { { echo "$as_me:2660: error: Your compiler does not appear to recognize prototypes.
2661 You have the following choices:
2662         a. adjust your compiler options
2663         b. get an up-to-date compiler
2664         c. use a wrapper such as unproto" >&5
2665 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2666 You have the following choices:
2667         a. adjust your compiler options
2668         b. get an up-to-date compiler
2669         c. use a wrapper such as unproto" >&2;}
2670    { (exit 1); exit 1; }; }
2671 fi
2672
2673 case $cf_cv_system_name in
2674 os2*)
2675     CFLAGS="$CFLAGS -Zmt"
2676     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2677     CXXFLAGS="$CXXFLAGS -Zmt"
2678     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2679     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2680     ac_cv_exeext=.exe
2681     ;;
2682 esac
2683
2684 PROG_EXT="$EXEEXT"
2685
2686 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2687 #define PROG_EXT "$PROG_EXT"
2688 EOF
2689
2690 if test "$cross_compiling" = yes ; then
2691   LDCONFIG=:
2692 else
2693 case "$cf_cv_system_name" in #(vi
2694 dragonfly*|freebsd*) #(vi
2695   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2696   ;;
2697 *) LDPATH=$PATH:/sbin:/usr/sbin
2698   # Extract the first word of "ldconfig", so it can be a program name with args.
2699 set dummy ldconfig; ac_word=$2
2700 echo "$as_me:2700: checking for $ac_word" >&5
2701 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2702 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2703   echo $ECHO_N "(cached) $ECHO_C" >&6
2704 else
2705   case $LDCONFIG in
2706   [\\/]* | ?:[\\/]*)
2707   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2708   ;;
2709   *)
2710   ac_save_IFS=$IFS; IFS=$ac_path_separator
2711 ac_dummy="$LDPATH"
2712 for ac_dir in $ac_dummy; do
2713   IFS=$ac_save_IFS
2714   test -z "$ac_dir" && ac_dir=.
2715   if $as_executable_p "$ac_dir/$ac_word"; then
2716    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2717    echo "$as_me:2717: found $ac_dir/$ac_word" >&5
2718    break
2719 fi
2720 done
2721
2722   ;;
2723 esac
2724 fi
2725 LDCONFIG=$ac_cv_path_LDCONFIG
2726
2727 if test -n "$LDCONFIG"; then
2728   echo "$as_me:2728: result: $LDCONFIG" >&5
2729 echo "${ECHO_T}$LDCONFIG" >&6
2730 else
2731   echo "$as_me:2731: result: no" >&5
2732 echo "${ECHO_T}no" >&6
2733 fi
2734
2735   ;;
2736 esac
2737 fi
2738
2739 echo "$as_me:2739: checking if you want to ensure bool is consistent with C++" >&5
2740 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2741
2742 # Check whether --with-cxx or --without-cxx was given.
2743 if test "${with_cxx+set}" = set; then
2744   withval="$with_cxx"
2745   cf_with_cxx=$withval
2746 else
2747   cf_with_cxx=yes
2748 fi;
2749 echo "$as_me:2749: result: $cf_with_cxx" >&5
2750 echo "${ECHO_T}$cf_with_cxx" >&6
2751 if test "X$cf_with_cxx" = Xno ; then
2752         CXX=""
2753         GXX=""
2754 else
2755         # with autoconf 2.13, we can change the error to a warning:
2756                 ac_ext=cc
2757 ac_cpp='$CXXCPP $CPPFLAGS'
2758 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2759 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2760 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2761 ac_main_return=return
2762 if test -n "$ac_tool_prefix"; then
2763   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2764   do
2765     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2766 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2767 echo "$as_me:2767: checking for $ac_word" >&5
2768 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2769 if test "${ac_cv_prog_CXX+set}" = set; then
2770   echo $ECHO_N "(cached) $ECHO_C" >&6
2771 else
2772   if test -n "$CXX"; then
2773   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2774 else
2775   ac_save_IFS=$IFS; IFS=$ac_path_separator
2776 ac_dummy="$PATH"
2777 for ac_dir in $ac_dummy; do
2778   IFS=$ac_save_IFS
2779   test -z "$ac_dir" && ac_dir=.
2780   $as_executable_p "$ac_dir/$ac_word" || continue
2781 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2782 echo "$as_me:2782: found $ac_dir/$ac_word" >&5
2783 break
2784 done
2785
2786 fi
2787 fi
2788 CXX=$ac_cv_prog_CXX
2789 if test -n "$CXX"; then
2790   echo "$as_me:2790: result: $CXX" >&5
2791 echo "${ECHO_T}$CXX" >&6
2792 else
2793   echo "$as_me:2793: result: no" >&5
2794 echo "${ECHO_T}no" >&6
2795 fi
2796
2797     test -n "$CXX" && break
2798   done
2799 fi
2800 if test -z "$CXX"; then
2801   ac_ct_CXX=$CXX
2802   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2803 do
2804   # Extract the first word of "$ac_prog", so it can be a program name with args.
2805 set dummy $ac_prog; ac_word=$2
2806 echo "$as_me:2806: checking for $ac_word" >&5
2807 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2808 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2809   echo $ECHO_N "(cached) $ECHO_C" >&6
2810 else
2811   if test -n "$ac_ct_CXX"; then
2812   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2813 else
2814   ac_save_IFS=$IFS; IFS=$ac_path_separator
2815 ac_dummy="$PATH"
2816 for ac_dir in $ac_dummy; do
2817   IFS=$ac_save_IFS
2818   test -z "$ac_dir" && ac_dir=.
2819   $as_executable_p "$ac_dir/$ac_word" || continue
2820 ac_cv_prog_ac_ct_CXX="$ac_prog"
2821 echo "$as_me:2821: found $ac_dir/$ac_word" >&5
2822 break
2823 done
2824
2825 fi
2826 fi
2827 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2828 if test -n "$ac_ct_CXX"; then
2829   echo "$as_me:2829: result: $ac_ct_CXX" >&5
2830 echo "${ECHO_T}$ac_ct_CXX" >&6
2831 else
2832   echo "$as_me:2832: result: no" >&5
2833 echo "${ECHO_T}no" >&6
2834 fi
2835
2836   test -n "$ac_ct_CXX" && break
2837 done
2838 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2839
2840   CXX=$ac_ct_CXX
2841 fi
2842
2843 # Provide some information about the compiler.
2844 echo "$as_me:2844:" \
2845      "checking for C++ compiler version" >&5
2846 ac_compiler=`set X $ac_compile; echo $2`
2847 { (eval echo "$as_me:2847: \"$ac_compiler --version </dev/null >&5\"") >&5
2848   (eval $ac_compiler --version </dev/null >&5) 2>&5
2849   ac_status=$?
2850   echo "$as_me:2850: \$? = $ac_status" >&5
2851   (exit $ac_status); }
2852 { (eval echo "$as_me:2852: \"$ac_compiler -v </dev/null >&5\"") >&5
2853   (eval $ac_compiler -v </dev/null >&5) 2>&5
2854   ac_status=$?
2855   echo "$as_me:2855: \$? = $ac_status" >&5
2856   (exit $ac_status); }
2857 { (eval echo "$as_me:2857: \"$ac_compiler -V </dev/null >&5\"") >&5
2858   (eval $ac_compiler -V </dev/null >&5) 2>&5
2859   ac_status=$?
2860   echo "$as_me:2860: \$? = $ac_status" >&5
2861   (exit $ac_status); }
2862
2863 echo "$as_me:2863: checking whether we are using the GNU C++ compiler" >&5
2864 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2865 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2866   echo $ECHO_N "(cached) $ECHO_C" >&6
2867 else
2868   cat >conftest.$ac_ext <<_ACEOF
2869 #line 2869 "configure"
2870 #include "confdefs.h"
2871
2872 int
2873 main ()
2874 {
2875 #ifndef __GNUC__
2876        choke me
2877 #endif
2878
2879   ;
2880   return 0;
2881 }
2882 _ACEOF
2883 rm -f conftest.$ac_objext
2884 if { (eval echo "$as_me:2884: \"$ac_compile\"") >&5
2885   (eval $ac_compile) 2>&5
2886   ac_status=$?
2887   echo "$as_me:2887: \$? = $ac_status" >&5
2888   (exit $ac_status); } &&
2889          { ac_try='test -s conftest.$ac_objext'
2890   { (eval echo "$as_me:2890: \"$ac_try\"") >&5
2891   (eval $ac_try) 2>&5
2892   ac_status=$?
2893   echo "$as_me:2893: \$? = $ac_status" >&5
2894   (exit $ac_status); }; }; then
2895   ac_compiler_gnu=yes
2896 else
2897   echo "$as_me: failed program was:" >&5
2898 cat conftest.$ac_ext >&5
2899 ac_compiler_gnu=no
2900 fi
2901 rm -f conftest.$ac_objext conftest.$ac_ext
2902 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2903
2904 fi
2905 echo "$as_me:2905: result: $ac_cv_cxx_compiler_gnu" >&5
2906 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2907 GXX=`test $ac_compiler_gnu = yes && echo yes`
2908 ac_test_CXXFLAGS=${CXXFLAGS+set}
2909 ac_save_CXXFLAGS=$CXXFLAGS
2910 CXXFLAGS="-g"
2911 echo "$as_me:2911: checking whether $CXX accepts -g" >&5
2912 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2913 if test "${ac_cv_prog_cxx_g+set}" = set; then
2914   echo $ECHO_N "(cached) $ECHO_C" >&6
2915 else
2916   cat >conftest.$ac_ext <<_ACEOF
2917 #line 2917 "configure"
2918 #include "confdefs.h"
2919
2920 int
2921 main ()
2922 {
2923
2924   ;
2925   return 0;
2926 }
2927 _ACEOF
2928 rm -f conftest.$ac_objext
2929 if { (eval echo "$as_me:2929: \"$ac_compile\"") >&5
2930   (eval $ac_compile) 2>&5
2931   ac_status=$?
2932   echo "$as_me:2932: \$? = $ac_status" >&5
2933   (exit $ac_status); } &&
2934          { ac_try='test -s conftest.$ac_objext'
2935   { (eval echo "$as_me:2935: \"$ac_try\"") >&5
2936   (eval $ac_try) 2>&5
2937   ac_status=$?
2938   echo "$as_me:2938: \$? = $ac_status" >&5
2939   (exit $ac_status); }; }; then
2940   ac_cv_prog_cxx_g=yes
2941 else
2942   echo "$as_me: failed program was:" >&5
2943 cat conftest.$ac_ext >&5
2944 ac_cv_prog_cxx_g=no
2945 fi
2946 rm -f conftest.$ac_objext conftest.$ac_ext
2947 fi
2948 echo "$as_me:2948: result: $ac_cv_prog_cxx_g" >&5
2949 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2950 if test "$ac_test_CXXFLAGS" = set; then
2951   CXXFLAGS=$ac_save_CXXFLAGS
2952 elif test $ac_cv_prog_cxx_g = yes; then
2953   if test "$GXX" = yes; then
2954     CXXFLAGS="-g -O2"
2955   else
2956     CXXFLAGS="-g"
2957   fi
2958 else
2959   if test "$GXX" = yes; then
2960     CXXFLAGS="-O2"
2961   else
2962     CXXFLAGS=
2963   fi
2964 fi
2965 for ac_declaration in \
2966    ''\
2967    '#include <stdlib.h>' \
2968    'extern "C" void std::exit (int) throw (); using std::exit;' \
2969    'extern "C" void std::exit (int); using std::exit;' \
2970    'extern "C" void exit (int) throw ();' \
2971    'extern "C" void exit (int);' \
2972    'void exit (int);'
2973 do
2974   cat >conftest.$ac_ext <<_ACEOF
2975 #line 2975 "configure"
2976 #include "confdefs.h"
2977 #include <stdlib.h>
2978 $ac_declaration
2979 int
2980 main ()
2981 {
2982 exit (42);
2983   ;
2984   return 0;
2985 }
2986 _ACEOF
2987 rm -f conftest.$ac_objext
2988 if { (eval echo "$as_me:2988: \"$ac_compile\"") >&5
2989   (eval $ac_compile) 2>&5
2990   ac_status=$?
2991   echo "$as_me:2991: \$? = $ac_status" >&5
2992   (exit $ac_status); } &&
2993          { ac_try='test -s conftest.$ac_objext'
2994   { (eval echo "$as_me:2994: \"$ac_try\"") >&5
2995   (eval $ac_try) 2>&5
2996   ac_status=$?
2997   echo "$as_me:2997: \$? = $ac_status" >&5
2998   (exit $ac_status); }; }; then
2999   :
3000 else
3001   echo "$as_me: failed program was:" >&5
3002 cat conftest.$ac_ext >&5
3003 continue
3004 fi
3005 rm -f conftest.$ac_objext conftest.$ac_ext
3006   cat >conftest.$ac_ext <<_ACEOF
3007 #line 3007 "configure"
3008 #include "confdefs.h"
3009 $ac_declaration
3010 int
3011 main ()
3012 {
3013 exit (42);
3014   ;
3015   return 0;
3016 }
3017 _ACEOF
3018 rm -f conftest.$ac_objext
3019 if { (eval echo "$as_me:3019: \"$ac_compile\"") >&5
3020   (eval $ac_compile) 2>&5
3021   ac_status=$?
3022   echo "$as_me:3022: \$? = $ac_status" >&5
3023   (exit $ac_status); } &&
3024          { ac_try='test -s conftest.$ac_objext'
3025   { (eval echo "$as_me:3025: \"$ac_try\"") >&5
3026   (eval $ac_try) 2>&5
3027   ac_status=$?
3028   echo "$as_me:3028: \$? = $ac_status" >&5
3029   (exit $ac_status); }; }; then
3030   break
3031 else
3032   echo "$as_me: failed program was:" >&5
3033 cat conftest.$ac_ext >&5
3034 fi
3035 rm -f conftest.$ac_objext conftest.$ac_ext
3036 done
3037 rm -f conftest*
3038 if test -n "$ac_declaration"; then
3039   echo '#ifdef __cplusplus' >>confdefs.h
3040   echo $ac_declaration      >>confdefs.h
3041   echo '#endif'             >>confdefs.h
3042 fi
3043
3044 ac_ext=c
3045 ac_cpp='$CPP $CPPFLAGS'
3046 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3047 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3048 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3049 ac_main_return=return
3050
3051                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3052         if test "$CXX" = "g++" ; then
3053                 # Extract the first word of "g++", so it can be a program name with args.
3054 set dummy g++; ac_word=$2
3055 echo "$as_me:3055: checking for $ac_word" >&5
3056 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3057 if test "${ac_cv_path_CXX+set}" = set; then
3058   echo $ECHO_N "(cached) $ECHO_C" >&6
3059 else
3060   case $CXX in
3061   [\\/]* | ?:[\\/]*)
3062   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3063   ;;
3064   *)
3065   ac_save_IFS=$IFS; IFS=$ac_path_separator
3066 ac_dummy="$PATH"
3067 for ac_dir in $ac_dummy; do
3068   IFS=$ac_save_IFS
3069   test -z "$ac_dir" && ac_dir=.
3070   if $as_executable_p "$ac_dir/$ac_word"; then
3071    ac_cv_path_CXX="$ac_dir/$ac_word"
3072    echo "$as_me:3072: found $ac_dir/$ac_word" >&5
3073    break
3074 fi
3075 done
3076
3077   ;;
3078 esac
3079 fi
3080 CXX=$ac_cv_path_CXX
3081
3082 if test -n "$CXX"; then
3083   echo "$as_me:3083: result: $CXX" >&5
3084 echo "${ECHO_T}$CXX" >&6
3085 else
3086   echo "$as_me:3086: result: no" >&5
3087 echo "${ECHO_T}no" >&6
3088 fi
3089
3090         fi
3091         if test "$CXX" = "g++" ; then
3092                 { echo "$as_me:3092: WARNING: ignoring hardcoded g++" >&5
3093 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3094                 cf_with_cxx=no; CXX=""; GXX="";
3095         fi
3096 fi
3097
3098 GXX_VERSION=none
3099 if test "$GXX" = yes; then
3100         echo "$as_me:3100: checking version of g++" >&5
3101 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3102         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3103         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3104         echo "$as_me:3104: result: $GXX_VERSION" >&5
3105 echo "${ECHO_T}$GXX_VERSION" >&6
3106 fi
3107
3108 case $GXX_VERSION in
3109 1*|2.[0-6]*)
3110         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3111         # cf_cxx_library=no
3112         { echo "$as_me:3112: WARNING: templates do not work" >&5
3113 echo "$as_me: WARNING: templates do not work" >&2;}
3114         ;;
3115 esac
3116
3117 echo "$as_me:3117: checking if you want to build C++ binding and demo" >&5
3118 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3119
3120 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3121 if test "${with_cxx_binding+set}" = set; then
3122   withval="$with_cxx_binding"
3123   cf_with_cxx_binding=$withval
3124 else
3125   cf_with_cxx_binding=$cf_with_cxx
3126 fi;
3127 echo "$as_me:3127: result: $cf_with_cxx_binding" >&5
3128 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3129
3130 echo "$as_me:3130: checking if you want to build with Ada95" >&5
3131 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3132
3133 # Check whether --with-ada or --without-ada was given.
3134 if test "${with_ada+set}" = set; then
3135   withval="$with_ada"
3136   cf_with_ada=$withval
3137 else
3138   cf_with_ada=yes
3139 fi;
3140 echo "$as_me:3140: result: $cf_with_ada" >&5
3141 echo "${ECHO_T}$cf_with_ada" >&6
3142
3143 echo "$as_me:3143: checking if you want to install manpages" >&5
3144 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3145
3146 # Check whether --with-manpages or --without-manpages was given.
3147 if test "${with_manpages+set}" = set; then
3148   withval="$with_manpages"
3149   cf_with_manpages=$withval
3150 else
3151   cf_with_manpages=yes
3152 fi;
3153 echo "$as_me:3153: result: $cf_with_manpages" >&5
3154 echo "${ECHO_T}$cf_with_manpages" >&6
3155
3156 echo "$as_me:3156: checking if you want to build programs such as tic" >&5
3157 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3158
3159 # Check whether --with-progs or --without-progs was given.
3160 if test "${with_progs+set}" = set; then
3161   withval="$with_progs"
3162   cf_with_progs=$withval
3163 else
3164   cf_with_progs=yes
3165 fi;
3166 echo "$as_me:3166: result: $cf_with_progs" >&5
3167 echo "${ECHO_T}$cf_with_progs" >&6
3168
3169 echo "$as_me:3169: checking if you wish to install curses.h" >&5
3170 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3171
3172 # Check whether --with-curses-h or --without-curses-h was given.
3173 if test "${with_curses_h+set}" = set; then
3174   withval="$with_curses_h"
3175   with_curses_h=$withval
3176 else
3177   with_curses_h=yes
3178 fi;
3179 echo "$as_me:3179: result: $with_curses_h" >&5
3180 echo "${ECHO_T}$with_curses_h" >&6
3181
3182 modules_to_build="ncurses"
3183 if test "X$cf_with_progs" != Xno ; then
3184 modules_to_build="$modules_to_build progs tack"
3185 fi
3186 modules_to_build="$modules_to_build panel menu form"
3187
3188 test "$program_prefix" != NONE &&
3189   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3190 # Use a double $ so make ignores it.
3191 test "$program_suffix" != NONE &&
3192   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3193 # Double any \ or $.  echo might interpret backslashes.
3194 # By default was `s,x,x', remove it if useless.
3195 cat <<\_ACEOF >conftest.sed
3196 s/[\\$]/&&/g;s/;s,x,x,$//
3197 _ACEOF
3198 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3199 rm conftest.sed
3200
3201 for ac_prog in mawk gawk nawk awk
3202 do
3203   # Extract the first word of "$ac_prog", so it can be a program name with args.
3204 set dummy $ac_prog; ac_word=$2
3205 echo "$as_me:3205: checking for $ac_word" >&5
3206 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3207 if test "${ac_cv_prog_AWK+set}" = set; then
3208   echo $ECHO_N "(cached) $ECHO_C" >&6
3209 else
3210   if test -n "$AWK"; then
3211   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3212 else
3213   ac_save_IFS=$IFS; IFS=$ac_path_separator
3214 ac_dummy="$PATH"
3215 for ac_dir in $ac_dummy; do
3216   IFS=$ac_save_IFS
3217   test -z "$ac_dir" && ac_dir=.
3218   $as_executable_p "$ac_dir/$ac_word" || continue
3219 ac_cv_prog_AWK="$ac_prog"
3220 echo "$as_me:3220: found $ac_dir/$ac_word" >&5
3221 break
3222 done
3223
3224 fi
3225 fi
3226 AWK=$ac_cv_prog_AWK
3227 if test -n "$AWK"; then
3228   echo "$as_me:3228: result: $AWK" >&5
3229 echo "${ECHO_T}$AWK" >&6
3230 else
3231   echo "$as_me:3231: result: no" >&5
3232 echo "${ECHO_T}no" >&6
3233 fi
3234
3235   test -n "$AWK" && break
3236 done
3237
3238 test -z "$AWK" && { { echo "$as_me:3238: error: No awk program found" >&5
3239 echo "$as_me: error: No awk program found" >&2;}
3240    { (exit 1); exit 1; }; }
3241
3242 echo "$as_me:3242: checking for egrep" >&5
3243 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3244 if test "${ac_cv_prog_egrep+set}" = set; then
3245   echo $ECHO_N "(cached) $ECHO_C" >&6
3246 else
3247   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3248     then ac_cv_prog_egrep='grep -E'
3249     else ac_cv_prog_egrep='egrep'
3250     fi
3251 fi
3252 echo "$as_me:3252: result: $ac_cv_prog_egrep" >&5
3253 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3254  EGREP=$ac_cv_prog_egrep
3255
3256 test -z "$EGREP" && { { echo "$as_me:3256: error: No egrep program found" >&5
3257 echo "$as_me: error: No egrep program found" >&2;}
3258    { (exit 1); exit 1; }; }
3259
3260 # Find a good install program.  We prefer a C program (faster),
3261 # so one script is as good as another.  But avoid the broken or
3262 # incompatible versions:
3263 # SysV /etc/install, /usr/sbin/install
3264 # SunOS /usr/etc/install
3265 # IRIX /sbin/install
3266 # AIX /bin/install
3267 # AmigaOS /C/install, which installs bootblocks on floppy discs
3268 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3269 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3270 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3271 # ./install, which can be erroneously created by make from ./install.sh.
3272 echo "$as_me:3272: checking for a BSD compatible install" >&5
3273 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3274 if test -z "$INSTALL"; then
3275 if test "${ac_cv_path_install+set}" = set; then
3276   echo $ECHO_N "(cached) $ECHO_C" >&6
3277 else
3278     ac_save_IFS=$IFS; IFS=$ac_path_separator
3279   for ac_dir in $PATH; do
3280     IFS=$ac_save_IFS
3281     # Account for people who put trailing slashes in PATH elements.
3282     case $ac_dir/ in
3283     / | ./ | .// | /cC/* \
3284     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3285     | /usr/ucb/* ) ;;
3286     *)
3287       # OSF1 and SCO ODT 3.0 have their own names for install.
3288       # Don't use installbsd from OSF since it installs stuff as root
3289       # by default.
3290       for ac_prog in ginstall scoinst install; do
3291         if $as_executable_p "$ac_dir/$ac_prog"; then
3292           if test $ac_prog = install &&
3293             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3294             # AIX install.  It has an incompatible calling convention.
3295             :
3296           elif test $ac_prog = install &&
3297             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3298             # program-specific install script used by HP pwplus--don't use.
3299             :
3300           else
3301             ac_cv_path_install="$ac_dir/$ac_prog -c"
3302             break 2
3303           fi
3304         fi
3305       done
3306       ;;
3307     esac
3308   done
3309
3310 fi
3311   if test "${ac_cv_path_install+set}" = set; then
3312     INSTALL=$ac_cv_path_install
3313   else
3314     # As a last resort, use the slow shell script.  We don't cache a
3315     # path for INSTALL within a source directory, because that will
3316     # break other packages using the cache if that directory is
3317     # removed, or if the path is relative.
3318     INSTALL=$ac_install_sh
3319   fi
3320 fi
3321 echo "$as_me:3321: result: $INSTALL" >&5
3322 echo "${ECHO_T}$INSTALL" >&6
3323
3324 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3325 # It thinks the first close brace ends the variable substitution.
3326 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3327
3328 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3329
3330 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3331
3332 case $INSTALL in
3333 /*)
3334   ;;
3335 *)
3336   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3337   test -z "$cf_dir" && cf_dir=.
3338   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3339   ;;
3340 esac
3341
3342 for ac_prog in tdlint lint alint splint lclint
3343 do
3344   # Extract the first word of "$ac_prog", so it can be a program name with args.
3345 set dummy $ac_prog; ac_word=$2
3346 echo "$as_me:3346: checking for $ac_word" >&5
3347 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3348 if test "${ac_cv_prog_LINT+set}" = set; then
3349   echo $ECHO_N "(cached) $ECHO_C" >&6
3350 else
3351   if test -n "$LINT"; then
3352   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3353 else
3354   ac_save_IFS=$IFS; IFS=$ac_path_separator
3355 ac_dummy="$PATH"
3356 for ac_dir in $ac_dummy; do
3357   IFS=$ac_save_IFS
3358   test -z "$ac_dir" && ac_dir=.
3359   $as_executable_p "$ac_dir/$ac_word" || continue
3360 ac_cv_prog_LINT="$ac_prog"
3361 echo "$as_me:3361: found $ac_dir/$ac_word" >&5
3362 break
3363 done
3364
3365 fi
3366 fi
3367 LINT=$ac_cv_prog_LINT
3368 if test -n "$LINT"; then
3369   echo "$as_me:3369: result: $LINT" >&5
3370 echo "${ECHO_T}$LINT" >&6
3371 else
3372   echo "$as_me:3372: result: no" >&5
3373 echo "${ECHO_T}no" >&6
3374 fi
3375
3376   test -n "$LINT" && break
3377 done
3378
3379 echo "$as_me:3379: checking whether ln -s works" >&5
3380 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3381 LN_S=$as_ln_s
3382 if test "$LN_S" = "ln -s"; then
3383   echo "$as_me:3383: result: yes" >&5
3384 echo "${ECHO_T}yes" >&6
3385 else
3386   echo "$as_me:3386: result: no, using $LN_S" >&5
3387 echo "${ECHO_T}no, using $LN_S" >&6
3388 fi
3389
3390 echo "$as_me:3390: checking for long file names" >&5
3391 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3392 if test "${ac_cv_sys_long_file_names+set}" = set; then
3393   echo $ECHO_N "(cached) $ECHO_C" >&6
3394 else
3395   ac_cv_sys_long_file_names=yes
3396 # Test for long file names in all the places we know might matter:
3397 #      .                the current directory, where building will happen
3398 #      $prefix/lib      where we will be installing things
3399 #      $exec_prefix/lib likewise
3400 # eval it to expand exec_prefix.
3401 #      $TMPDIR          if set, where it might want to write temporary files
3402 # if $TMPDIR is not set:
3403 #      /tmp             where it might want to write temporary files
3404 #      /var/tmp         likewise
3405 #      /usr/tmp         likewise
3406 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3407   ac_tmpdirs=$TMPDIR
3408 else
3409   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3410 fi
3411 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3412   test -d $ac_dir || continue
3413   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3414   ac_xdir=$ac_dir/cf$$
3415   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3416   ac_tf1=$ac_xdir/conftest9012345
3417   ac_tf2=$ac_xdir/conftest9012346
3418   (echo 1 >$ac_tf1) 2>/dev/null
3419   (echo 2 >$ac_tf2) 2>/dev/null
3420   ac_val=`cat $ac_tf1 2>/dev/null`
3421   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3422     ac_cv_sys_long_file_names=no
3423     rm -rf $ac_xdir 2>/dev/null
3424     break
3425   fi
3426   rm -rf $ac_xdir 2>/dev/null
3427 done
3428 fi
3429 echo "$as_me:3429: result: $ac_cv_sys_long_file_names" >&5
3430 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3431 if test $ac_cv_sys_long_file_names = yes; then
3432
3433 cat >>confdefs.h <<\EOF
3434 #define HAVE_LONG_FILE_NAMES 1
3435 EOF
3436
3437 fi
3438
3439 # if we find pkg-config, check if we should install the ".pc" files.
3440
3441 echo "$as_me:3441: checking if you want to use pkg-config" >&5
3442 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3443
3444 # Check whether --with-pkg-config or --without-pkg-config was given.
3445 if test "${with_pkg_config+set}" = set; then
3446   withval="$with_pkg_config"
3447   cf_pkg_config=$withval
3448 else
3449   cf_pkg_config=yes
3450 fi;
3451 echo "$as_me:3451: result: $cf_pkg_config" >&5
3452 echo "${ECHO_T}$cf_pkg_config" >&6
3453
3454 case $cf_pkg_config in #(vi
3455 no) #(vi
3456         PKG_CONFIG=none
3457         ;;
3458 yes) #(vi
3459         # Extract the first word of "pkg-config", so it can be a program name with args.
3460 set dummy pkg-config; ac_word=$2
3461 echo "$as_me:3461: checking for $ac_word" >&5
3462 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3463 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3464   echo $ECHO_N "(cached) $ECHO_C" >&6
3465 else
3466   case $PKG_CONFIG in
3467   [\\/]* | ?:[\\/]*)
3468   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3469   ;;
3470   *)
3471   ac_save_IFS=$IFS; IFS=$ac_path_separator
3472 ac_dummy="$PATH"
3473 for ac_dir in $ac_dummy; do
3474   IFS=$ac_save_IFS
3475   test -z "$ac_dir" && ac_dir=.
3476   if $as_executable_p "$ac_dir/$ac_word"; then
3477    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3478    echo "$as_me:3478: found $ac_dir/$ac_word" >&5
3479    break
3480 fi
3481 done
3482
3483   test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="none"
3484   ;;
3485 esac
3486 fi
3487 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3488
3489 if test -n "$PKG_CONFIG"; then
3490   echo "$as_me:3490: result: $PKG_CONFIG" >&5
3491 echo "${ECHO_T}$PKG_CONFIG" >&6
3492 else
3493   echo "$as_me:3493: result: no" >&5
3494 echo "${ECHO_T}no" >&6
3495 fi
3496
3497         ;;
3498 *)
3499         PKG_CONFIG=$withval
3500         ;;
3501 esac
3502
3503 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3504 if test "$PKG_CONFIG" != none ; then
3505
3506 if test "x$prefix" != xNONE; then
3507   cf_path_syntax="$prefix"
3508 else
3509   cf_path_syntax="$ac_default_prefix"
3510 fi
3511
3512 case ".$PKG_CONFIG" in #(vi
3513 .\$\(*\)*|.\'*\'*) #(vi
3514   ;;
3515 ..|./*|.\\*) #(vi
3516   ;;
3517 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3518   ;;
3519 .\${*prefix}*) #(vi
3520   eval PKG_CONFIG="$PKG_CONFIG"
3521   case ".$PKG_CONFIG" in #(vi
3522   .NONE/*)
3523     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3524     ;;
3525   esac
3526   ;; #(vi
3527 .no|.NONE/*)
3528   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3529   ;;
3530 *)
3531   { { echo "$as_me:3531: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3532 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3533    { (exit 1); exit 1; }; }
3534   ;;
3535 esac
3536
3537 fi
3538
3539 if test "$PKG_CONFIG" != no ; then
3540         echo "$as_me:3540: checking if we should install .pc files for $PKG_CONFIG" >&5
3541 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3542
3543         # Leave this as something that can be overridden in the environment.
3544         if test -z "$PKG_CONFIG_LIBDIR" ; then
3545                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
3546         fi
3547         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
3548         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
3549
3550 # Check whether --enable-pc-files or --disable-pc-files was given.
3551 if test "${enable_pc_files+set}" = set; then
3552   enableval="$enable_pc_files"
3553   enable_pc_files=$enableval
3554 else
3555   enable_pc_files=no
3556 fi;
3557                 echo "$as_me:3557: result: $enable_pc_files" >&5
3558 echo "${ECHO_T}$enable_pc_files" >&6
3559         else
3560                 echo "$as_me:3560: result: no" >&5
3561 echo "${ECHO_T}no" >&6
3562                 { echo "$as_me:3562: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
3563 echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
3564                 enable_pc_files=no
3565         fi
3566 fi
3567
3568 echo "$as_me:3568: checking if we should assume mixed-case filenames" >&5
3569 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3570
3571 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3572 if test "${enable_mixed_case+set}" = set; then
3573   enableval="$enable_mixed_case"
3574   enable_mixedcase=$enableval
3575 else
3576   enable_mixedcase=auto
3577 fi;
3578 echo "$as_me:3578: result: $enable_mixedcase" >&5
3579 echo "${ECHO_T}$enable_mixedcase" >&6
3580 if test "$enable_mixedcase" = "auto" ; then
3581
3582 echo "$as_me:3582: checking if filesystem supports mixed-case filenames" >&5
3583 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3584 if test "${cf_cv_mixedcase+set}" = set; then
3585   echo $ECHO_N "(cached) $ECHO_C" >&6
3586 else
3587
3588 if test "$cross_compiling" = yes ; then
3589         case $target_alias in #(vi
3590         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3591                 cf_cv_mixedcase=no
3592                 ;;
3593         *)
3594                 cf_cv_mixedcase=yes
3595                 ;;
3596         esac
3597 else
3598         rm -f conftest CONFTEST
3599         echo test >conftest
3600         if test -f CONFTEST ; then
3601                 cf_cv_mixedcase=no
3602         else
3603                 cf_cv_mixedcase=yes
3604         fi
3605         rm -f conftest CONFTEST
3606 fi
3607
3608 fi
3609 echo "$as_me:3609: result: $cf_cv_mixedcase" >&5
3610 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3611 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3612 #define MIXEDCASE_FILENAMES 1
3613 EOF
3614
3615 else
3616     cf_cv_mixedcase=$enable_mixedcase
3617     if test "$enable_mixedcase" = "yes" ; then
3618         cat >>confdefs.h <<\EOF
3619 #define MIXEDCASE_FILENAMES 1
3620 EOF
3621
3622     fi
3623 fi
3624
3625 # do this after mixed-case option (tags/TAGS is not as important as tic).
3626 echo "$as_me:3626: checking whether ${MAKE-make} sets \${MAKE}" >&5
3627 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3628 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3629 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3630   echo $ECHO_N "(cached) $ECHO_C" >&6
3631 else
3632   cat >conftest.make <<\EOF
3633 all:
3634         @echo 'ac_maketemp="${MAKE}"'
3635 EOF
3636 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3637 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3638 if test -n "$ac_maketemp"; then
3639   eval ac_cv_prog_make_${ac_make}_set=yes
3640 else
3641   eval ac_cv_prog_make_${ac_make}_set=no
3642 fi
3643 rm -f conftest.make
3644 fi
3645 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3646   echo "$as_me:3646: result: yes" >&5
3647 echo "${ECHO_T}yes" >&6
3648   SET_MAKE=
3649 else
3650   echo "$as_me:3650: result: no" >&5
3651 echo "${ECHO_T}no" >&6
3652   SET_MAKE="MAKE=${MAKE-make}"
3653 fi
3654
3655 # Extract the first word of "ctags", so it can be a program name with args.
3656 set dummy ctags; ac_word=$2
3657 echo "$as_me:3657: checking for $ac_word" >&5
3658 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3659 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3660   echo $ECHO_N "(cached) $ECHO_C" >&6
3661 else
3662   if test -n "$MAKE_LOWER_TAGS"; then
3663   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3664 else
3665   ac_save_IFS=$IFS; IFS=$ac_path_separator
3666 ac_dummy="$PATH"
3667 for ac_dir in $ac_dummy; do
3668   IFS=$ac_save_IFS
3669   test -z "$ac_dir" && ac_dir=.
3670   $as_executable_p "$ac_dir/$ac_word" || continue
3671 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3672 echo "$as_me:3672: found $ac_dir/$ac_word" >&5
3673 break
3674 done
3675
3676   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3677 fi
3678 fi
3679 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3680 if test -n "$MAKE_LOWER_TAGS"; then
3681   echo "$as_me:3681: result: $MAKE_LOWER_TAGS" >&5
3682 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3683 else
3684   echo "$as_me:3684: result: no" >&5
3685 echo "${ECHO_T}no" >&6
3686 fi
3687
3688 if test "$cf_cv_mixedcase" = yes ; then
3689         # Extract the first word of "etags", so it can be a program name with args.
3690 set dummy etags; ac_word=$2
3691 echo "$as_me:3691: checking for $ac_word" >&5
3692 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3693 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3694   echo $ECHO_N "(cached) $ECHO_C" >&6
3695 else
3696   if test -n "$MAKE_UPPER_TAGS"; then
3697   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3698 else
3699   ac_save_IFS=$IFS; IFS=$ac_path_separator
3700 ac_dummy="$PATH"
3701 for ac_dir in $ac_dummy; do
3702   IFS=$ac_save_IFS
3703   test -z "$ac_dir" && ac_dir=.
3704   $as_executable_p "$ac_dir/$ac_word" || continue
3705 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3706 echo "$as_me:3706: found $ac_dir/$ac_word" >&5
3707 break
3708 done
3709
3710   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3711 fi
3712 fi
3713 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3714 if test -n "$MAKE_UPPER_TAGS"; then
3715   echo "$as_me:3715: result: $MAKE_UPPER_TAGS" >&5
3716 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3717 else
3718   echo "$as_me:3718: result: no" >&5
3719 echo "${ECHO_T}no" >&6
3720 fi
3721
3722 else
3723         MAKE_UPPER_TAGS=no
3724 fi
3725
3726 if test "$MAKE_UPPER_TAGS" = yes ; then
3727         MAKE_UPPER_TAGS=
3728 else
3729         MAKE_UPPER_TAGS="#"
3730 fi
3731
3732 if test "$MAKE_LOWER_TAGS" = yes ; then
3733         MAKE_LOWER_TAGS=
3734 else
3735         MAKE_LOWER_TAGS="#"
3736 fi
3737
3738 echo "$as_me:3738: checking for makeflags variable" >&5
3739 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3740 if test "${cf_cv_makeflags+set}" = set; then
3741   echo $ECHO_N "(cached) $ECHO_C" >&6
3742 else
3743
3744         cf_cv_makeflags=''
3745         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3746         do
3747                 cat >cf_makeflags.tmp <<CF_EOF
3748 SHELL = /bin/sh
3749 all :
3750         @ echo '.$cf_option'
3751 CF_EOF
3752                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3753                 case "$cf_result" in
3754                 .*k)
3755                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3756                         case "$cf_result" in
3757                         .*CC=*) cf_cv_makeflags=
3758                                 ;;
3759                         *)      cf_cv_makeflags=$cf_option
3760                                 ;;
3761                         esac
3762                         break
3763                         ;;
3764                 .-)     ;;
3765                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3766                         ;;
3767                 esac
3768         done
3769         rm -f cf_makeflags.tmp
3770
3771 fi
3772 echo "$as_me:3772: result: $cf_cv_makeflags" >&5
3773 echo "${ECHO_T}$cf_cv_makeflags" >&6
3774
3775 if test -n "$ac_tool_prefix"; then
3776   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3777 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3778 echo "$as_me:3778: checking for $ac_word" >&5
3779 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3780 if test "${ac_cv_prog_RANLIB+set}" = set; then
3781   echo $ECHO_N "(cached) $ECHO_C" >&6
3782 else
3783   if test -n "$RANLIB"; then
3784   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3785 else
3786   ac_save_IFS=$IFS; IFS=$ac_path_separator
3787 ac_dummy="$PATH"
3788 for ac_dir in $ac_dummy; do
3789   IFS=$ac_save_IFS
3790   test -z "$ac_dir" && ac_dir=.
3791   $as_executable_p "$ac_dir/$ac_word" || continue
3792 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3793 echo "$as_me:3793: found $ac_dir/$ac_word" >&5
3794 break
3795 done
3796
3797 fi
3798 fi
3799 RANLIB=$ac_cv_prog_RANLIB
3800 if test -n "$RANLIB"; then
3801   echo "$as_me:3801: result: $RANLIB" >&5
3802 echo "${ECHO_T}$RANLIB" >&6
3803 else
3804   echo "$as_me:3804: result: no" >&5
3805 echo "${ECHO_T}no" >&6
3806 fi
3807
3808 fi
3809 if test -z "$ac_cv_prog_RANLIB"; then
3810   ac_ct_RANLIB=$RANLIB
3811   # Extract the first word of "ranlib", so it can be a program name with args.
3812 set dummy ranlib; ac_word=$2
3813 echo "$as_me:3813: checking for $ac_word" >&5
3814 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3815 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3816   echo $ECHO_N "(cached) $ECHO_C" >&6
3817 else
3818   if test -n "$ac_ct_RANLIB"; then
3819   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3820 else
3821   ac_save_IFS=$IFS; IFS=$ac_path_separator
3822 ac_dummy="$PATH"
3823 for ac_dir in $ac_dummy; do
3824   IFS=$ac_save_IFS
3825   test -z "$ac_dir" && ac_dir=.
3826   $as_executable_p "$ac_dir/$ac_word" || continue
3827 ac_cv_prog_ac_ct_RANLIB="ranlib"
3828 echo "$as_me:3828: found $ac_dir/$ac_word" >&5
3829 break
3830 done
3831
3832   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3833 fi
3834 fi
3835 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3836 if test -n "$ac_ct_RANLIB"; then
3837   echo "$as_me:3837: result: $ac_ct_RANLIB" >&5
3838 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3839 else
3840   echo "$as_me:3840: result: no" >&5
3841 echo "${ECHO_T}no" >&6
3842 fi
3843
3844   RANLIB=$ac_ct_RANLIB
3845 else
3846   RANLIB="$ac_cv_prog_RANLIB"
3847 fi
3848
3849 if test -n "$ac_tool_prefix"; then
3850   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3851 set dummy ${ac_tool_prefix}ld; ac_word=$2
3852 echo "$as_me:3852: checking for $ac_word" >&5
3853 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3854 if test "${ac_cv_prog_LD+set}" = set; then
3855   echo $ECHO_N "(cached) $ECHO_C" >&6
3856 else
3857   if test -n "$LD"; then
3858   ac_cv_prog_LD="$LD" # Let the user override the test.
3859 else
3860   ac_save_IFS=$IFS; IFS=$ac_path_separator
3861 ac_dummy="$PATH"
3862 for ac_dir in $ac_dummy; do
3863   IFS=$ac_save_IFS
3864   test -z "$ac_dir" && ac_dir=.
3865   $as_executable_p "$ac_dir/$ac_word" || continue
3866 ac_cv_prog_LD="${ac_tool_prefix}ld"
3867 echo "$as_me:3867: found $ac_dir/$ac_word" >&5
3868 break
3869 done
3870
3871 fi
3872 fi
3873 LD=$ac_cv_prog_LD
3874 if test -n "$LD"; then
3875   echo "$as_me:3875: result: $LD" >&5
3876 echo "${ECHO_T}$LD" >&6
3877 else
3878   echo "$as_me:3878: result: no" >&5
3879 echo "${ECHO_T}no" >&6
3880 fi
3881
3882 fi
3883 if test -z "$ac_cv_prog_LD"; then
3884   ac_ct_LD=$LD
3885   # Extract the first word of "ld", so it can be a program name with args.
3886 set dummy ld; ac_word=$2
3887 echo "$as_me:3887: checking for $ac_word" >&5
3888 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3889 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3890   echo $ECHO_N "(cached) $ECHO_C" >&6
3891 else
3892   if test -n "$ac_ct_LD"; then
3893   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3894 else
3895   ac_save_IFS=$IFS; IFS=$ac_path_separator
3896 ac_dummy="$PATH"
3897 for ac_dir in $ac_dummy; do
3898   IFS=$ac_save_IFS
3899   test -z "$ac_dir" && ac_dir=.
3900   $as_executable_p "$ac_dir/$ac_word" || continue
3901 ac_cv_prog_ac_ct_LD="ld"
3902 echo "$as_me:3902: found $ac_dir/$ac_word" >&5
3903 break
3904 done
3905
3906   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3907 fi
3908 fi
3909 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3910 if test -n "$ac_ct_LD"; then
3911   echo "$as_me:3911: result: $ac_ct_LD" >&5
3912 echo "${ECHO_T}$ac_ct_LD" >&6
3913 else
3914   echo "$as_me:3914: result: no" >&5
3915 echo "${ECHO_T}no" >&6
3916 fi
3917
3918   LD=$ac_ct_LD
3919 else
3920   LD="$ac_cv_prog_LD"
3921 fi
3922
3923 if test -n "$ac_tool_prefix"; then
3924   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3925 set dummy ${ac_tool_prefix}ar; ac_word=$2
3926 echo "$as_me:3926: checking for $ac_word" >&5
3927 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3928 if test "${ac_cv_prog_AR+set}" = set; then
3929   echo $ECHO_N "(cached) $ECHO_C" >&6
3930 else
3931   if test -n "$AR"; then
3932   ac_cv_prog_AR="$AR" # Let the user override the test.
3933 else
3934   ac_save_IFS=$IFS; IFS=$ac_path_separator
3935 ac_dummy="$PATH"
3936 for ac_dir in $ac_dummy; do
3937   IFS=$ac_save_IFS
3938   test -z "$ac_dir" && ac_dir=.
3939   $as_executable_p "$ac_dir/$ac_word" || continue
3940 ac_cv_prog_AR="${ac_tool_prefix}ar"
3941 echo "$as_me:3941: found $ac_dir/$ac_word" >&5
3942 break
3943 done
3944
3945 fi
3946 fi
3947 AR=$ac_cv_prog_AR
3948 if test -n "$AR"; then
3949   echo "$as_me:3949: result: $AR" >&5
3950 echo "${ECHO_T}$AR" >&6
3951 else
3952   echo "$as_me:3952: result: no" >&5
3953 echo "${ECHO_T}no" >&6
3954 fi
3955
3956 fi
3957 if test -z "$ac_cv_prog_AR"; then
3958   ac_ct_AR=$AR
3959   # Extract the first word of "ar", so it can be a program name with args.
3960 set dummy ar; ac_word=$2
3961 echo "$as_me:3961: checking for $ac_word" >&5
3962 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3963 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3964   echo $ECHO_N "(cached) $ECHO_C" >&6
3965 else
3966   if test -n "$ac_ct_AR"; then
3967   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3968 else
3969   ac_save_IFS=$IFS; IFS=$ac_path_separator
3970 ac_dummy="$PATH"
3971 for ac_dir in $ac_dummy; do
3972   IFS=$ac_save_IFS
3973   test -z "$ac_dir" && ac_dir=.
3974   $as_executable_p "$ac_dir/$ac_word" || continue
3975 ac_cv_prog_ac_ct_AR="ar"
3976 echo "$as_me:3976: found $ac_dir/$ac_word" >&5
3977 break
3978 done
3979
3980   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3981 fi
3982 fi
3983 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3984 if test -n "$ac_ct_AR"; then
3985   echo "$as_me:3985: result: $ac_ct_AR" >&5
3986 echo "${ECHO_T}$ac_ct_AR" >&6
3987 else
3988   echo "$as_me:3988: result: no" >&5
3989 echo "${ECHO_T}no" >&6
3990 fi
3991
3992   AR=$ac_ct_AR
3993 else
3994   AR="$ac_cv_prog_AR"
3995 fi
3996
3997 if test -n "$ac_tool_prefix"; then
3998   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3999 set dummy ${ac_tool_prefix}ar; ac_word=$2
4000 echo "$as_me:4000: checking for $ac_word" >&5
4001 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4002 if test "${ac_cv_prog_AR+set}" = set; then
4003   echo $ECHO_N "(cached) $ECHO_C" >&6
4004 else
4005   if test -n "$AR"; then
4006   ac_cv_prog_AR="$AR" # Let the user override the test.
4007 else
4008   ac_save_IFS=$IFS; IFS=$ac_path_separator
4009 ac_dummy="$PATH"
4010 for ac_dir in $ac_dummy; do
4011   IFS=$ac_save_IFS
4012   test -z "$ac_dir" && ac_dir=.
4013   $as_executable_p "$ac_dir/$ac_word" || continue
4014 ac_cv_prog_AR="${ac_tool_prefix}ar"
4015 echo "$as_me:4015: found $ac_dir/$ac_word" >&5
4016 break
4017 done
4018
4019 fi
4020 fi
4021 AR=$ac_cv_prog_AR
4022 if test -n "$AR"; then
4023   echo "$as_me:4023: result: $AR" >&5
4024 echo "${ECHO_T}$AR" >&6
4025 else
4026   echo "$as_me:4026: result: no" >&5
4027 echo "${ECHO_T}no" >&6
4028 fi
4029
4030 fi
4031 if test -z "$ac_cv_prog_AR"; then
4032   ac_ct_AR=$AR
4033   # Extract the first word of "ar", so it can be a program name with args.
4034 set dummy ar; ac_word=$2
4035 echo "$as_me:4035: checking for $ac_word" >&5
4036 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4037 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4038   echo $ECHO_N "(cached) $ECHO_C" >&6
4039 else
4040   if test -n "$ac_ct_AR"; then
4041   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4042 else
4043   ac_save_IFS=$IFS; IFS=$ac_path_separator
4044 ac_dummy="$PATH"
4045 for ac_dir in $ac_dummy; do
4046   IFS=$ac_save_IFS
4047   test -z "$ac_dir" && ac_dir=.
4048   $as_executable_p "$ac_dir/$ac_word" || continue
4049 ac_cv_prog_ac_ct_AR="ar"
4050 echo "$as_me:4050: found $ac_dir/$ac_word" >&5
4051 break
4052 done
4053
4054   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4055 fi
4056 fi
4057 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4058 if test -n "$ac_ct_AR"; then
4059   echo "$as_me:4059: result: $ac_ct_AR" >&5
4060 echo "${ECHO_T}$ac_ct_AR" >&6
4061 else
4062   echo "$as_me:4062: result: no" >&5
4063 echo "${ECHO_T}no" >&6
4064 fi
4065
4066   AR=$ac_ct_AR
4067 else
4068   AR="$ac_cv_prog_AR"
4069 fi
4070
4071 echo "$as_me:4071: checking for options to update archives" >&5
4072 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4073 if test "${cf_cv_ar_flags+set}" = set; then
4074   echo $ECHO_N "(cached) $ECHO_C" >&6
4075 else
4076
4077         cf_cv_ar_flags=unknown
4078         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4079         do
4080                 rm -f conftest.$ac_cv_objext
4081                 rm -f conftest.a
4082
4083                 cat >conftest.$ac_ext <<EOF
4084 #line 4084 "configure"
4085 int     testdata[3] = { 123, 456, 789 };
4086 EOF
4087                 if { (eval echo "$as_me:4087: \"$ac_compile\"") >&5
4088   (eval $ac_compile) 2>&5
4089   ac_status=$?
4090   echo "$as_me:4090: \$? = $ac_status" >&5
4091   (exit $ac_status); } ; then
4092                         $AR $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4093                         if test -f conftest.a ; then
4094                                 cf_cv_ar_flags=$cf_ar_flags
4095                                 break
4096                         fi
4097                 else
4098                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4099
4100 echo "${as_me-configure}:4100: testing cannot compile test-program ..." 1>&5
4101
4102                         break
4103                 fi
4104         done
4105         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4106
4107 fi
4108 echo "$as_me:4108: result: $cf_cv_ar_flags" >&5
4109 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4110 test -z "$ARFLAGS" && ARFLAGS=$cf_cv_ar_flags
4111 ARFLAGS=$cf_cv_ar_flags
4112
4113 echo "$as_me:4113: checking if you have specified an install-prefix" >&5
4114 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4115
4116 # Check whether --with-install-prefix or --without-install-prefix was given.
4117 if test "${with_install_prefix+set}" = set; then
4118   withval="$with_install_prefix"
4119   case "$withval" in #(vi
4120         yes|no) #(vi
4121                 ;;
4122         *)      DESTDIR="$withval"
4123                 ;;
4124         esac
4125 fi;
4126 echo "$as_me:4126: result: $DESTDIR" >&5
4127 echo "${ECHO_T}$DESTDIR" >&6
4128
4129 ###############################################################################
4130
4131 # If we're cross-compiling, allow the user to override the tools and their
4132 # options.  The configure script is oriented toward identifying the host
4133 # compiler, etc., but we need a build compiler to generate parts of the source.
4134
4135 if test "$cross_compiling" = yes ; then
4136
4137         # defaults that we might want to override
4138         : ${BUILD_CFLAGS:=''}
4139         : ${BUILD_CPPFLAGS:=''}
4140         : ${BUILD_LDFLAGS:=''}
4141         : ${BUILD_LIBS:=''}
4142         : ${BUILD_EXEEXT:='$x'}
4143         : ${BUILD_OBJEXT:='o'}
4144
4145 # Check whether --with-build-cc or --without-build-cc was given.
4146 if test "${with_build_cc+set}" = set; then
4147   withval="$with_build_cc"
4148   BUILD_CC="$withval"
4149 else
4150   for ac_prog in gcc cc cl
4151 do
4152   # Extract the first word of "$ac_prog", so it can be a program name with args.
4153 set dummy $ac_prog; ac_word=$2
4154 echo "$as_me:4154: checking for $ac_word" >&5
4155 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4156 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4157   echo $ECHO_N "(cached) $ECHO_C" >&6
4158 else
4159   if test -n "$BUILD_CC"; then
4160   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4161 else
4162   ac_save_IFS=$IFS; IFS=$ac_path_separator
4163 ac_dummy="$PATH"
4164 for ac_dir in $ac_dummy; do
4165   IFS=$ac_save_IFS
4166   test -z "$ac_dir" && ac_dir=.
4167   $as_executable_p "$ac_dir/$ac_word" || continue
4168 ac_cv_prog_BUILD_CC="$ac_prog"
4169 echo "$as_me:4169: found $ac_dir/$ac_word" >&5
4170 break
4171 done
4172
4173 fi
4174 fi
4175 BUILD_CC=$ac_cv_prog_BUILD_CC
4176 if test -n "$BUILD_CC"; then
4177   echo "$as_me:4177: result: $BUILD_CC" >&5
4178 echo "${ECHO_T}$BUILD_CC" >&6
4179 else
4180   echo "$as_me:4180: result: no" >&5
4181 echo "${ECHO_T}no" >&6
4182 fi
4183
4184   test -n "$BUILD_CC" && break
4185 done
4186
4187 fi;
4188         echo "$as_me:4188: checking for native build C compiler" >&5
4189 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4190         echo "$as_me:4190: result: $BUILD_CC" >&5
4191 echo "${ECHO_T}$BUILD_CC" >&6
4192
4193         echo "$as_me:4193: checking for native build C preprocessor" >&5
4194 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4195
4196 # Check whether --with-build-cpp or --without-build-cpp was given.
4197 if test "${with_build_cpp+set}" = set; then
4198   withval="$with_build_cpp"
4199   BUILD_CPP="$withval"
4200 else
4201   BUILD_CPP='${BUILD_CC} -E'
4202 fi;
4203         echo "$as_me:4203: result: $BUILD_CPP" >&5
4204 echo "${ECHO_T}$BUILD_CPP" >&6
4205
4206         echo "$as_me:4206: checking for native build C flags" >&5
4207 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4208
4209 # Check whether --with-build-cflags or --without-build-cflags was given.
4210 if test "${with_build_cflags+set}" = set; then
4211   withval="$with_build_cflags"
4212   BUILD_CFLAGS="$withval"
4213 fi;
4214         echo "$as_me:4214: result: $BUILD_CFLAGS" >&5
4215 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4216
4217         echo "$as_me:4217: checking for native build C preprocessor-flags" >&5
4218 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4219
4220 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4221 if test "${with_build_cppflags+set}" = set; then
4222   withval="$with_build_cppflags"
4223   BUILD_CPPFLAGS="$withval"
4224 fi;
4225         echo "$as_me:4225: result: $BUILD_CPPFLAGS" >&5
4226 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4227
4228         echo "$as_me:4228: checking for native build linker-flags" >&5
4229 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4230
4231 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4232 if test "${with_build_ldflags+set}" = set; then
4233   withval="$with_build_ldflags"
4234   BUILD_LDFLAGS="$withval"
4235 fi;
4236         echo "$as_me:4236: result: $BUILD_LDFLAGS" >&5
4237 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4238
4239         echo "$as_me:4239: checking for native build linker-libraries" >&5
4240 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4241
4242 # Check whether --with-build-libs or --without-build-libs was given.
4243 if test "${with_build_libs+set}" = set; then
4244   withval="$with_build_libs"
4245   BUILD_LIBS="$withval"
4246 fi;
4247         echo "$as_me:4247: result: $BUILD_LIBS" >&5
4248 echo "${ECHO_T}$BUILD_LIBS" >&6
4249
4250         # this assumes we're on Unix.
4251         BUILD_EXEEXT=
4252         BUILD_OBJEXT=o
4253
4254         : ${BUILD_CC:='${CC}'}
4255
4256         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4257                 { { echo "$as_me:4257: error: Cross-build requires two compilers.
4258 Use --with-build-cc to specify the native compiler." >&5
4259 echo "$as_me: error: Cross-build requires two compilers.
4260 Use --with-build-cc to specify the native compiler." >&2;}
4261    { (exit 1); exit 1; }; }
4262         fi
4263
4264 else
4265         : ${BUILD_CC:='${CC}'}
4266         : ${BUILD_CPP:='${CPP}'}
4267         : ${BUILD_CFLAGS:='${CFLAGS}'}
4268         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4269         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4270         : ${BUILD_LIBS:='${LIBS}'}
4271         : ${BUILD_EXEEXT:='$x'}
4272         : ${BUILD_OBJEXT:='o'}
4273 fi
4274
4275 ###############################################################################
4276
4277 ### Options to allow the user to specify the set of libraries which are used.
4278 ### Use "--without-normal --with-shared" to allow the default model to be
4279 ### shared, for example.
4280 cf_list_models=""
4281
4282 LIBTOOL=
4283
4284 # common library maintenance symbols that are convenient for libtool scripts:
4285 LIB_CREATE='${AR} -cr'
4286 LIB_OBJECT='${OBJECTS}'
4287 LIB_SUFFIX=.a
4288 LIB_PREP="$RANLIB"
4289
4290 # symbols used to prop libtool up to enable it to determine what it should be
4291 # doing:
4292 LIB_CLEAN=
4293 LIB_COMPILE=
4294 LIB_LINK='${CC}'
4295 LIB_INSTALL=
4296 LIB_UNINSTALL=
4297
4298 echo "$as_me:4298: checking if you want to build libraries with libtool" >&5
4299 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4300
4301 # Check whether --with-libtool or --without-libtool was given.
4302 if test "${with_libtool+set}" = set; then
4303   withval="$with_libtool"
4304   with_libtool=$withval
4305 else
4306   with_libtool=no
4307 fi;
4308 echo "$as_me:4308: result: $with_libtool" >&5
4309 echo "${ECHO_T}$with_libtool" >&6
4310 if test "$with_libtool" != "no"; then
4311
4312         if test "$with_libtool" != "yes" ; then
4313
4314 if test "x$prefix" != xNONE; then
4315   cf_path_syntax="$prefix"
4316 else
4317   cf_path_syntax="$ac_default_prefix"
4318 fi
4319
4320 case ".$with_libtool" in #(vi
4321 .\$\(*\)*|.\'*\'*) #(vi
4322   ;;
4323 ..|./*|.\\*) #(vi
4324   ;;
4325 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4326   ;;
4327 .\${*prefix}*) #(vi
4328   eval with_libtool="$with_libtool"
4329   case ".$with_libtool" in #(vi
4330   .NONE/*)
4331     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4332     ;;
4333   esac
4334   ;; #(vi
4335 .no|.NONE/*)
4336   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4337   ;;
4338 *)
4339   { { echo "$as_me:4339: error: expected a pathname, not \"$with_libtool\"" >&5
4340 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4341    { (exit 1); exit 1; }; }
4342   ;;
4343 esac
4344
4345                 LIBTOOL=$with_libtool
4346         else
4347                 # Extract the first word of "libtool", so it can be a program name with args.
4348 set dummy libtool; ac_word=$2
4349 echo "$as_me:4349: checking for $ac_word" >&5
4350 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4351 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4352   echo $ECHO_N "(cached) $ECHO_C" >&6
4353 else
4354   case $LIBTOOL in
4355   [\\/]* | ?:[\\/]*)
4356   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4357   ;;
4358   *)
4359   ac_save_IFS=$IFS; IFS=$ac_path_separator
4360 ac_dummy="$PATH"
4361 for ac_dir in $ac_dummy; do
4362   IFS=$ac_save_IFS
4363   test -z "$ac_dir" && ac_dir=.
4364   if $as_executable_p "$ac_dir/$ac_word"; then
4365    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4366    echo "$as_me:4366: found $ac_dir/$ac_word" >&5
4367    break
4368 fi
4369 done
4370
4371   ;;
4372 esac
4373 fi
4374 LIBTOOL=$ac_cv_path_LIBTOOL
4375
4376 if test -n "$LIBTOOL"; then
4377   echo "$as_me:4377: result: $LIBTOOL" >&5
4378 echo "${ECHO_T}$LIBTOOL" >&6
4379 else
4380   echo "$as_me:4380: result: no" >&5
4381 echo "${ECHO_T}no" >&6
4382 fi
4383
4384         fi
4385         if test -z "$LIBTOOL" ; then
4386                 { { echo "$as_me:4386: error: Cannot find libtool" >&5
4387 echo "$as_me: error: Cannot find libtool" >&2;}
4388    { (exit 1); exit 1; }; }
4389         fi
4390         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} -o'
4391         LIB_OBJECT='${OBJECTS:.o=.lo}'
4392         LIB_SUFFIX=.la
4393         LIB_CLEAN='${LIBTOOL} --mode=clean'
4394         LIB_COMPILE='${LIBTOOL} --mode=compile'
4395         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4396         LIB_INSTALL='${LIBTOOL} --mode=install'
4397         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4398         LIB_PREP=:
4399
4400         # Show the version of libtool
4401         echo "$as_me:4401: checking version of libtool" >&5
4402 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4403
4404         # Save the version in a cache variable - this is not entirely a good
4405         # thing, but the version string from libtool is very ugly, and for
4406         # bug reports it might be useful to have the original string. "("
4407         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.].*//'`
4408         echo "$as_me:4408: result: $cf_cv_libtool_version" >&5
4409 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4410         if test -z "$cf_cv_libtool_version" ; then
4411                 { { echo "$as_me:4411: error: This is not GNU libtool" >&5
4412 echo "$as_me: error: This is not GNU libtool" >&2;}
4413    { (exit 1); exit 1; }; }
4414         fi
4415
4416         # special hack to add -no-undefined (which libtool should do for itself)
4417         LT_UNDEF=
4418         case "$cf_cv_system_name" in #(vi
4419         cygwin*|mingw32*|uwin*|aix[456]) #(vi
4420                 LT_UNDEF=-no-undefined
4421                 ;;
4422         esac
4423
4424         # special hack to add --tag option for C++ compiler
4425         case $cf_cv_libtool_version in #(vi
4426         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4427                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4428                 LIBTOOL="$LIBTOOL --tag=CC"
4429                 ;;
4430         *)
4431                 LIBTOOL_CXX="$LIBTOOL"
4432                 ;;
4433         esac
4434 else
4435         LIBTOOL=""
4436         LIBTOOL_CXX=""
4437 fi
4438
4439 test -z "$LIBTOOL" && ECHO_LT=
4440
4441 if test "$with_libtool" != "no" ; then
4442
4443 cf_list_models="$cf_list_models libtool"
4444
4445 else
4446
4447 echo "$as_me:4447: checking if you want to build shared libraries" >&5
4448 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4449
4450 # Check whether --with-shared or --without-shared was given.
4451 if test "${with_shared+set}" = set; then
4452   withval="$with_shared"
4453   with_shared=$withval
4454 else
4455   with_shared=no
4456 fi;
4457 echo "$as_me:4457: result: $with_shared" >&5
4458 echo "${ECHO_T}$with_shared" >&6
4459 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4460
4461 echo "$as_me:4461: checking if you want to build static libraries" >&5
4462 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4463
4464 # Check whether --with-normal or --without-normal was given.
4465 if test "${with_normal+set}" = set; then
4466   withval="$with_normal"
4467   with_normal=$withval
4468 else
4469   with_normal=yes
4470 fi;
4471 echo "$as_me:4471: result: $with_normal" >&5
4472 echo "${ECHO_T}$with_normal" >&6
4473 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4474
4475 echo "$as_me:4475: checking if you want to build debug libraries" >&5
4476 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4477
4478 # Check whether --with-debug or --without-debug was given.
4479 if test "${with_debug+set}" = set; then
4480   withval="$with_debug"
4481   with_debug=$withval
4482 else
4483   with_debug=yes
4484 fi;
4485 echo "$as_me:4485: result: $with_debug" >&5
4486 echo "${ECHO_T}$with_debug" >&6
4487 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4488
4489 echo "$as_me:4489: checking if you want to build profiling libraries" >&5
4490 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4491
4492 # Check whether --with-profile or --without-profile was given.
4493 if test "${with_profile+set}" = set; then
4494   withval="$with_profile"
4495   with_profile=$withval
4496 else
4497   with_profile=no
4498 fi;
4499 echo "$as_me:4499: result: $with_profile" >&5
4500 echo "${ECHO_T}$with_profile" >&6
4501 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4502
4503 fi
4504
4505 ###############################################################################
4506
4507 echo "$as_me:4507: checking for specified models" >&5
4508 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4509 test -z "$cf_list_models" && cf_list_models=normal
4510 test "$with_libtool" != "no" && cf_list_models=libtool
4511 echo "$as_me:4511: result: $cf_list_models" >&5
4512 echo "${ECHO_T}$cf_list_models" >&6
4513
4514 ### Use the first model as the default, and save its suffix for use in building
4515 ### up test-applications.
4516 echo "$as_me:4516: checking for default model" >&5
4517 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4518 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4519 echo "$as_me:4519: result: $DFT_LWR_MODEL" >&5
4520 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4521
4522 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4523
4524 TICS_NAME=tic
4525
4526 TINFO_NAME=tinfo
4527
4528 LIB_NAME=ncurses
4529
4530 LIB_DIR=../lib
4531 LIB_2ND=../../lib
4532
4533         case $cf_cv_system_name in #(vi
4534         OS/2*|os2*) #(vi
4535         LIB_PREFIX=''
4536         ;;
4537         *)      LIB_PREFIX='lib'
4538         ;;
4539         esac
4540 cf_prefix=$LIB_PREFIX
4541
4542 LIB_PREFIX=$cf_prefix
4543
4544 LIB_SUFFIX=
4545
4546 ###############################################################################
4547
4548 echo "$as_me:4548: checking if you want to build a separate terminfo library" >&5
4549 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4550
4551 # Check whether --with-termlib or --without-termlib was given.
4552 if test "${with_termlib+set}" = set; then
4553   withval="$with_termlib"
4554   with_termlib=$withval
4555 else
4556   with_termlib=no
4557 fi;
4558 echo "$as_me:4558: result: $with_termlib" >&5
4559 echo "${ECHO_T}$with_termlib" >&6
4560
4561 echo "$as_me:4561: checking if you want to build a separate tic library" >&5
4562 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4563
4564 # Check whether --with-ticlib or --without-ticlib was given.
4565 if test "${with_ticlib+set}" = set; then
4566   withval="$with_ticlib"
4567   with_ticlib=$withval
4568 else
4569   with_ticlib=no
4570 fi;
4571 echo "$as_me:4571: result: $with_ticlib" >&5
4572 echo "${ECHO_T}$with_ticlib" >&6
4573
4574 ### Checks for special libraries, must be done up-front.
4575 SHLIB_LIST=""
4576
4577 echo "$as_me:4577: checking if you want to link with the GPM mouse library" >&5
4578 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4579
4580 # Check whether --with-gpm or --without-gpm was given.
4581 if test "${with_gpm+set}" = set; then
4582   withval="$with_gpm"
4583   with_gpm=$withval
4584 else
4585   with_gpm=maybe
4586 fi;
4587 echo "$as_me:4587: result: $with_gpm" >&5
4588 echo "${ECHO_T}$with_gpm" >&6
4589
4590 if test "$with_gpm" != no ; then
4591         echo "$as_me:4591: checking for gpm.h" >&5
4592 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4593 if test "${ac_cv_header_gpm_h+set}" = set; then
4594   echo $ECHO_N "(cached) $ECHO_C" >&6
4595 else
4596   cat >conftest.$ac_ext <<_ACEOF
4597 #line 4597 "configure"
4598 #include "confdefs.h"
4599 #include <gpm.h>
4600 _ACEOF
4601 if { (eval echo "$as_me:4601: \"$ac_cpp conftest.$ac_ext\"") >&5
4602   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4603   ac_status=$?
4604   egrep -v '^ *\+' conftest.er1 >conftest.err
4605   rm -f conftest.er1
4606   cat conftest.err >&5
4607   echo "$as_me:4607: \$? = $ac_status" >&5
4608   (exit $ac_status); } >/dev/null; then
4609   if test -s conftest.err; then
4610     ac_cpp_err=$ac_c_preproc_warn_flag
4611   else
4612     ac_cpp_err=
4613   fi
4614 else
4615   ac_cpp_err=yes
4616 fi
4617 if test -z "$ac_cpp_err"; then
4618   ac_cv_header_gpm_h=yes
4619 else
4620   echo "$as_me: failed program was:" >&5
4621   cat conftest.$ac_ext >&5
4622   ac_cv_header_gpm_h=no
4623 fi
4624 rm -f conftest.err conftest.$ac_ext
4625 fi
4626 echo "$as_me:4626: result: $ac_cv_header_gpm_h" >&5
4627 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4628 if test $ac_cv_header_gpm_h = yes; then
4629
4630                 cat >>confdefs.h <<\EOF
4631 #define HAVE_GPM_H 1
4632 EOF
4633
4634                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4635                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4636
4637 echo "${as_me-configure}:4637: testing assuming we really have GPM library ..." 1>&5
4638
4639                         cat >>confdefs.h <<\EOF
4640 #define HAVE_LIBGPM 1
4641 EOF
4642
4643                 else
4644                         echo "$as_me:4644: checking for Gpm_Open in -lgpm" >&5
4645 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4646 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4647   echo $ECHO_N "(cached) $ECHO_C" >&6
4648 else
4649   ac_check_lib_save_LIBS=$LIBS
4650 LIBS="-lgpm  $LIBS"
4651 cat >conftest.$ac_ext <<_ACEOF
4652 #line 4652 "configure"
4653 #include "confdefs.h"
4654
4655 /* Override any gcc2 internal prototype to avoid an error.  */
4656 #ifdef __cplusplus
4657 extern "C"
4658 #endif
4659 /* We use char because int might match the return type of a gcc2
4660    builtin and then its argument prototype would still apply.  */
4661 char Gpm_Open ();
4662 int
4663 main ()
4664 {
4665 Gpm_Open ();
4666   ;
4667   return 0;
4668 }
4669 _ACEOF
4670 rm -f conftest.$ac_objext conftest$ac_exeext
4671 if { (eval echo "$as_me:4671: \"$ac_link\"") >&5
4672   (eval $ac_link) 2>&5
4673   ac_status=$?
4674   echo "$as_me:4674: \$? = $ac_status" >&5
4675   (exit $ac_status); } &&
4676          { ac_try='test -s conftest$ac_exeext'
4677   { (eval echo "$as_me:4677: \"$ac_try\"") >&5
4678   (eval $ac_try) 2>&5
4679   ac_status=$?
4680   echo "$as_me:4680: \$? = $ac_status" >&5
4681   (exit $ac_status); }; }; then
4682   ac_cv_lib_gpm_Gpm_Open=yes
4683 else
4684   echo "$as_me: failed program was:" >&5
4685 cat conftest.$ac_ext >&5
4686 ac_cv_lib_gpm_Gpm_Open=no
4687 fi
4688 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4689 LIBS=$ac_check_lib_save_LIBS
4690 fi
4691 echo "$as_me:4691: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4692 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4693 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4694   :
4695 else
4696
4697                                 { { echo "$as_me:4697: error: Cannot link with GPM library" >&5
4698 echo "$as_me: error: Cannot link with GPM library" >&2;}
4699    { (exit 1); exit 1; }; }
4700                 fi
4701                 with_gpm=yes
4702
4703 fi
4704
4705 else
4706
4707                 test "$with_gpm" != maybe && { echo "$as_me:4707: WARNING: Cannot find GPM header" >&5
4708 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4709                 with_gpm=no
4710
4711 fi
4712
4713 fi
4714
4715 if test "$with_gpm" != no ; then
4716         echo "$as_me:4716: checking if you want to load GPM dynamically" >&5
4717 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4718
4719 # Check whether --with-dlsym or --without-dlsym was given.
4720 if test "${with_dlsym+set}" = set; then
4721   withval="$with_dlsym"
4722   with_dlsym=$withval
4723 else
4724   with_dlsym=yes
4725 fi;
4726         echo "$as_me:4726: result: $with_dlsym" >&5
4727 echo "${ECHO_T}$with_dlsym" >&6
4728         if test "$with_dlsym" = yes ; then
4729
4730 cf_have_dlsym=no
4731 echo "$as_me:4731: checking for dlsym" >&5
4732 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4733 if test "${ac_cv_func_dlsym+set}" = set; then
4734   echo $ECHO_N "(cached) $ECHO_C" >&6
4735 else
4736   cat >conftest.$ac_ext <<_ACEOF
4737 #line 4737 "configure"
4738 #include "confdefs.h"
4739 /* System header to define __stub macros and hopefully few prototypes,
4740     which can conflict with char dlsym (); below.  */
4741 #include <assert.h>
4742 /* Override any gcc2 internal prototype to avoid an error.  */
4743 #ifdef __cplusplus
4744 extern "C"
4745 #endif
4746 /* We use char because int might match the return type of a gcc2
4747    builtin and then its argument prototype would still apply.  */
4748 char dlsym ();
4749 char (*f) ();
4750
4751 int
4752 main ()
4753 {
4754 /* The GNU C library defines this for functions which it implements
4755     to always fail with ENOSYS.  Some functions are actually named
4756     something starting with __ and the normal name is an alias.  */
4757 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4758 choke me
4759 #else
4760 f = dlsym;
4761 #endif
4762
4763   ;
4764   return 0;
4765 }
4766 _ACEOF
4767 rm -f conftest.$ac_objext conftest$ac_exeext
4768 if { (eval echo "$as_me:4768: \"$ac_link\"") >&5
4769   (eval $ac_link) 2>&5
4770   ac_status=$?
4771   echo "$as_me:4771: \$? = $ac_status" >&5
4772   (exit $ac_status); } &&
4773          { ac_try='test -s conftest$ac_exeext'
4774   { (eval echo "$as_me:4774: \"$ac_try\"") >&5
4775   (eval $ac_try) 2>&5
4776   ac_status=$?
4777   echo "$as_me:4777: \$? = $ac_status" >&5
4778   (exit $ac_status); }; }; then
4779   ac_cv_func_dlsym=yes
4780 else
4781   echo "$as_me: failed program was:" >&5
4782 cat conftest.$ac_ext >&5
4783 ac_cv_func_dlsym=no
4784 fi
4785 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4786 fi
4787 echo "$as_me:4787: result: $ac_cv_func_dlsym" >&5
4788 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4789 if test $ac_cv_func_dlsym = yes; then
4790   cf_have_dlsym=yes
4791 else
4792
4793 cf_have_libdl=no
4794 echo "$as_me:4794: checking for dlsym in -ldl" >&5
4795 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4796 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4797   echo $ECHO_N "(cached) $ECHO_C" >&6
4798 else
4799   ac_check_lib_save_LIBS=$LIBS
4800 LIBS="-ldl  $LIBS"
4801 cat >conftest.$ac_ext <<_ACEOF
4802 #line 4802 "configure"
4803 #include "confdefs.h"
4804
4805 /* Override any gcc2 internal prototype to avoid an error.  */
4806 #ifdef __cplusplus
4807 extern "C"
4808 #endif
4809 /* We use char because int might match the return type of a gcc2
4810    builtin and then its argument prototype would still apply.  */
4811 char dlsym ();
4812 int
4813 main ()
4814 {
4815 dlsym ();
4816   ;
4817   return 0;
4818 }
4819 _ACEOF
4820 rm -f conftest.$ac_objext conftest$ac_exeext
4821 if { (eval echo "$as_me:4821: \"$ac_link\"") >&5
4822   (eval $ac_link) 2>&5
4823   ac_status=$?
4824   echo "$as_me:4824: \$? = $ac_status" >&5
4825   (exit $ac_status); } &&
4826          { ac_try='test -s conftest$ac_exeext'
4827   { (eval echo "$as_me:4827: \"$ac_try\"") >&5
4828   (eval $ac_try) 2>&5
4829   ac_status=$?
4830   echo "$as_me:4830: \$? = $ac_status" >&5
4831   (exit $ac_status); }; }; then
4832   ac_cv_lib_dl_dlsym=yes
4833 else
4834   echo "$as_me: failed program was:" >&5
4835 cat conftest.$ac_ext >&5
4836 ac_cv_lib_dl_dlsym=no
4837 fi
4838 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4839 LIBS=$ac_check_lib_save_LIBS
4840 fi
4841 echo "$as_me:4841: result: $ac_cv_lib_dl_dlsym" >&5
4842 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4843 if test $ac_cv_lib_dl_dlsym = yes; then
4844
4845         cf_have_dlsym=yes
4846         cf_have_libdl=yes
4847 fi
4848
4849 fi
4850
4851 if test "$cf_have_dlsym" = yes ; then
4852         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4853
4854         echo "$as_me:4854: checking whether able to link to dl*() functions" >&5
4855 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4856         cat >conftest.$ac_ext <<_ACEOF
4857 #line 4857 "configure"
4858 #include "confdefs.h"
4859 #include <dlfcn.h>
4860 int
4861 main ()
4862 {
4863
4864                 void *obj;
4865                 if ((obj = dlopen("filename", 0)) != 0) {
4866                         if (dlsym(obj, "symbolname") == 0) {
4867                         dlclose(obj);
4868                         }
4869                 }
4870   ;
4871   return 0;
4872 }
4873 _ACEOF
4874 rm -f conftest.$ac_objext conftest$ac_exeext
4875 if { (eval echo "$as_me:4875: \"$ac_link\"") >&5
4876   (eval $ac_link) 2>&5
4877   ac_status=$?
4878   echo "$as_me:4878: \$? = $ac_status" >&5
4879   (exit $ac_status); } &&
4880          { ac_try='test -s conftest$ac_exeext'
4881   { (eval echo "$as_me:4881: \"$ac_try\"") >&5
4882   (eval $ac_try) 2>&5
4883   ac_status=$?
4884   echo "$as_me:4884: \$? = $ac_status" >&5
4885   (exit $ac_status); }; }; then
4886
4887                 cat >>confdefs.h <<\EOF
4888 #define HAVE_LIBDL 1
4889 EOF
4890
4891 else
4892   echo "$as_me: failed program was:" >&5
4893 cat conftest.$ac_ext >&5
4894
4895                 { { echo "$as_me:4895: error: Cannot link test program for libdl" >&5
4896 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4897    { (exit 1); exit 1; }; }
4898 fi
4899 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4900         echo "$as_me:4900: result: ok" >&5
4901 echo "${ECHO_T}ok" >&6
4902 else
4903         { { echo "$as_me:4903: error: Cannot find dlsym function" >&5
4904 echo "$as_me: error: Cannot find dlsym function" >&2;}
4905    { (exit 1); exit 1; }; }
4906 fi
4907
4908                 if test "$with_gpm" != yes ; then
4909                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4910
4911 echo "${as_me-configure}:4911: testing assuming soname for gpm is $with_gpm ..." 1>&5
4912
4913                         cf_cv_gpm_soname="$with_gpm"
4914                 else
4915
4916 echo "$as_me:4916: checking for soname of gpm library" >&5
4917 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4918 if test "${cf_cv_gpm_soname+set}" = set; then
4919   echo $ECHO_N "(cached) $ECHO_C" >&6
4920 else
4921
4922 cf_cv_gpm_soname=unknown
4923 if test "$cross_compiling" != yes ; then
4924 cat >conftest.$ac_ext <<CF_EOF
4925 #include <gpm.h>
4926 int main()
4927 {
4928 if (Gpm_Open(0,0)) Gpm_Close();
4929         ${cf_cv_main_return:-return}(0);
4930 }
4931 CF_EOF
4932 cf_save_LIBS="$LIBS"
4933         LIBS="-lgpm $LIBS"
4934         if { (eval echo "$as_me:4934: \"$ac_compile\"") >&5
4935   (eval $ac_compile) 2>&5
4936   ac_status=$?
4937   echo "$as_me:4937: \$? = $ac_status" >&5
4938   (exit $ac_status); } ; then
4939                 if { (eval echo "$as_me:4939: \"$ac_link\"") >&5
4940   (eval $ac_link) 2>&5
4941   ac_status=$?
4942   echo "$as_me:4942: \$? = $ac_status" >&5
4943   (exit $ac_status); } ; then
4944                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4945                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4946                 fi
4947         fi
4948 rm -f conftest*
4949 LIBS="$cf_save_LIBS"
4950 fi
4951
4952 fi
4953 echo "$as_me:4953: result: $cf_cv_gpm_soname" >&5
4954 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4955
4956                 fi
4957                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
4958 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4959 EOF
4960
4961                 SHLIB_LIST="-ldl $SHLIB_LIST"
4962         else
4963                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4964                 TEST_LIBS="-lgpm $TEST_LIBS"
4965         fi
4966         cat >>confdefs.h <<\EOF
4967 #define HAVE_LIBGPM 1
4968 EOF
4969
4970 echo "$as_me:4970: checking for Gpm_Wgetch in -lgpm" >&5
4971 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4972 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4973   echo $ECHO_N "(cached) $ECHO_C" >&6
4974 else
4975   ac_check_lib_save_LIBS=$LIBS
4976 LIBS="-lgpm  $LIBS"
4977 cat >conftest.$ac_ext <<_ACEOF
4978 #line 4978 "configure"
4979 #include "confdefs.h"
4980
4981 /* Override any gcc2 internal prototype to avoid an error.  */
4982 #ifdef __cplusplus
4983 extern "C"
4984 #endif
4985 /* We use char because int might match the return type of a gcc2
4986    builtin and then its argument prototype would still apply.  */
4987 char Gpm_Wgetch ();
4988 int
4989 main ()
4990 {
4991 Gpm_Wgetch ();
4992   ;
4993   return 0;
4994 }
4995 _ACEOF
4996 rm -f conftest.$ac_objext conftest$ac_exeext
4997 if { (eval echo "$as_me:4997: \"$ac_link\"") >&5
4998   (eval $ac_link) 2>&5
4999   ac_status=$?
5000   echo "$as_me:5000: \$? = $ac_status" >&5
5001   (exit $ac_status); } &&
5002          { ac_try='test -s conftest$ac_exeext'
5003   { (eval echo "$as_me:5003: \"$ac_try\"") >&5
5004   (eval $ac_try) 2>&5
5005   ac_status=$?
5006   echo "$as_me:5006: \$? = $ac_status" >&5
5007   (exit $ac_status); }; }; then
5008   ac_cv_lib_gpm_Gpm_Wgetch=yes
5009 else
5010   echo "$as_me: failed program was:" >&5
5011 cat conftest.$ac_ext >&5
5012 ac_cv_lib_gpm_Gpm_Wgetch=no
5013 fi
5014 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5015 LIBS=$ac_check_lib_save_LIBS
5016 fi
5017 echo "$as_me:5017: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5018 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5019 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5020
5021 echo "$as_me:5021: checking if GPM is weakly bound to curses library" >&5
5022 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5023 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5024   echo $ECHO_N "(cached) $ECHO_C" >&6
5025 else
5026
5027 cf_cv_check_gpm_wgetch=unknown
5028 if test "$cross_compiling" != yes ; then
5029
5030 cat >conftest.$ac_ext <<CF_EOF
5031 #include <gpm.h>
5032 int main()
5033 {
5034         Gpm_Wgetch();
5035         ${cf_cv_main_return:-return}(0);
5036 }
5037 CF_EOF
5038
5039         cf_save_LIBS="$LIBS"
5040         # This only works if we can look at the symbol table.  If a shared
5041         # library is stripped for install, we cannot use that.  So we're forced
5042         # to rely on the static library, noting that some packagers may not
5043         # include it.
5044         LIBS="-static -lgpm -dynamic $LIBS"
5045         if { (eval echo "$as_me:5045: \"$ac_compile\"") >&5
5046   (eval $ac_compile) 2>&5
5047   ac_status=$?
5048   echo "$as_me:5048: \$? = $ac_status" >&5
5049   (exit $ac_status); } ; then
5050                 if { (eval echo "$as_me:5050: \"$ac_link\"") >&5
5051   (eval $ac_link) 2>&5
5052   ac_status=$?
5053   echo "$as_me:5053: \$? = $ac_status" >&5
5054   (exit $ac_status); } ; then
5055                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5056                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5057                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5058                 fi
5059         fi
5060         rm -f conftest*
5061         LIBS="$cf_save_LIBS"
5062 fi
5063
5064 fi
5065 echo "$as_me:5065: result: $cf_cv_check_gpm_wgetch" >&5
5066 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5067
5068 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5069         { echo "$as_me:5069: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5070 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5071 fi
5072
5073 fi
5074
5075 fi
5076
5077 # not everyone has "test -c"
5078 if test -c /dev/sysmouse 2>/dev/null ; then
5079 echo "$as_me:5079: checking if you want to use sysmouse" >&5
5080 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5081
5082 # Check whether --with-sysmouse or --without-sysmouse was given.
5083 if test "${with_sysmouse+set}" = set; then
5084   withval="$with_sysmouse"
5085   cf_with_sysmouse=$withval
5086 else
5087   cf_with_sysmouse=maybe
5088 fi;
5089         if test "$cf_with_sysmouse" != no ; then
5090         cat >conftest.$ac_ext <<_ACEOF
5091 #line 5091 "configure"
5092 #include "confdefs.h"
5093
5094 #include <osreldate.h>
5095 #if (__FreeBSD_version >= 400017)
5096 #include <sys/consio.h>
5097 #include <sys/fbio.h>
5098 #else
5099 #include <machine/console.h>
5100 #endif
5101
5102 int
5103 main ()
5104 {
5105
5106         struct mouse_info the_mouse;
5107         ioctl(0, CONS_MOUSECTL, &the_mouse);
5108
5109   ;
5110   return 0;
5111 }
5112 _ACEOF
5113 rm -f conftest.$ac_objext
5114 if { (eval echo "$as_me:5114: \"$ac_compile\"") >&5
5115   (eval $ac_compile) 2>&5
5116   ac_status=$?
5117   echo "$as_me:5117: \$? = $ac_status" >&5
5118   (exit $ac_status); } &&
5119          { ac_try='test -s conftest.$ac_objext'
5120   { (eval echo "$as_me:5120: \"$ac_try\"") >&5
5121   (eval $ac_try) 2>&5
5122   ac_status=$?
5123   echo "$as_me:5123: \$? = $ac_status" >&5
5124   (exit $ac_status); }; }; then
5125   cf_with_sysmouse=yes
5126 else
5127   echo "$as_me: failed program was:" >&5
5128 cat conftest.$ac_ext >&5
5129 cf_with_sysmouse=no
5130 fi
5131 rm -f conftest.$ac_objext conftest.$ac_ext
5132         fi
5133 echo "$as_me:5133: result: $cf_with_sysmouse" >&5
5134 echo "${ECHO_T}$cf_with_sysmouse" >&6
5135 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5136 #define USE_SYSMOUSE 1
5137 EOF
5138
5139 fi
5140
5141 if test X"$CC_G_OPT" = X"" ; then
5142         CC_G_OPT='-g'
5143         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5144 fi
5145
5146 if test X"$CXX_G_OPT" = X"" ; then
5147         CXX_G_OPT='-g'
5148         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5149 fi
5150
5151 echo "$as_me:5151: checking for default loader flags" >&5
5152 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5153 case $DFT_LWR_MODEL in
5154 libtool) LD_MODEL=''   ;;
5155 normal)  LD_MODEL=''   ;;
5156 debug)   LD_MODEL=$CC_G_OPT ;;
5157 profile) LD_MODEL='-pg';;
5158 shared)  LD_MODEL=''   ;;
5159 esac
5160 echo "$as_me:5160: result: $LD_MODEL" >&5
5161 echo "${ECHO_T}$LD_MODEL" >&6
5162
5163 case $DFT_LWR_MODEL in
5164 shared)
5165
5166 echo "$as_me:5166: checking if rpath option should be used" >&5
5167 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5168
5169 # Check whether --enable-rpath or --disable-rpath was given.
5170 if test "${enable_rpath+set}" = set; then
5171   enableval="$enable_rpath"
5172   cf_cv_enable_rpath=$enableval
5173 else
5174   cf_cv_enable_rpath=no
5175 fi;
5176 echo "$as_me:5176: result: $cf_cv_enable_rpath" >&5
5177 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5178
5179 echo "$as_me:5179: checking if shared libraries should be relinked during install" >&5
5180 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5181
5182 # Check whether --enable-relink or --disable-relink was given.
5183 if test "${enable_relink+set}" = set; then
5184   enableval="$enable_relink"
5185   cf_cv_do_relink=$enableval
5186 else
5187   cf_cv_do_relink=yes
5188 fi;
5189 echo "$as_me:5189: result: $cf_cv_do_relink" >&5
5190 echo "${ECHO_T}$cf_cv_do_relink" >&6
5191         ;;
5192 esac
5193
5194 LD_RPATH_OPT=
5195 echo "$as_me:5195: checking for an rpath option" >&5
5196 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5197 case $cf_cv_system_name in #(vi
5198 irix*) #(vi
5199         if test "$GCC" = yes; then
5200                 LD_RPATH_OPT="-Wl,-rpath,"
5201         else
5202                 LD_RPATH_OPT="-rpath "
5203         fi
5204         ;;
5205 linux*|gnu*|k*bsd*-gnu) #(vi
5206         LD_RPATH_OPT="-Wl,-rpath,"
5207         ;;
5208 openbsd[2-9].*) #(vi
5209         LD_RPATH_OPT="-Wl,-rpath,"
5210         ;;
5211 freebsd*) #(vi
5212         LD_RPATH_OPT="-rpath "
5213         ;;
5214 netbsd*) #(vi
5215         LD_RPATH_OPT="-Wl,-rpath,"
5216         ;;
5217 osf*|mls+*) #(vi
5218         LD_RPATH_OPT="-rpath "
5219         ;;
5220 solaris2*) #(vi
5221         LD_RPATH_OPT="-R"
5222         ;;
5223 *)
5224         ;;
5225 esac
5226 echo "$as_me:5226: result: $LD_RPATH_OPT" >&5
5227 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5228
5229 case "x$LD_RPATH_OPT" in #(vi
5230 x-R*)
5231         echo "$as_me:5231: checking if we need a space after rpath option" >&5
5232 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5233         cf_save_LIBS="$LIBS"
5234         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5235         cat >conftest.$ac_ext <<_ACEOF
5236 #line 5236 "configure"
5237 #include "confdefs.h"
5238
5239 int
5240 main ()
5241 {
5242
5243   ;
5244   return 0;
5245 }
5246 _ACEOF
5247 rm -f conftest.$ac_objext conftest$ac_exeext
5248 if { (eval echo "$as_me:5248: \"$ac_link\"") >&5
5249   (eval $ac_link) 2>&5
5250   ac_status=$?
5251   echo "$as_me:5251: \$? = $ac_status" >&5
5252   (exit $ac_status); } &&
5253          { ac_try='test -s conftest$ac_exeext'
5254   { (eval echo "$as_me:5254: \"$ac_try\"") >&5
5255   (eval $ac_try) 2>&5
5256   ac_status=$?
5257   echo "$as_me:5257: \$? = $ac_status" >&5
5258   (exit $ac_status); }; }; then
5259   cf_rpath_space=no
5260 else
5261   echo "$as_me: failed program was:" >&5
5262 cat conftest.$ac_ext >&5
5263 cf_rpath_space=yes
5264 fi
5265 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5266         LIBS="$cf_save_LIBS"
5267         echo "$as_me:5267: result: $cf_rpath_space" >&5
5268 echo "${ECHO_T}$cf_rpath_space" >&6
5269         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5270         ;;
5271 esac
5272
5273         LOCAL_LDFLAGS=
5274         LOCAL_LDFLAGS2=
5275         LD_SHARED_OPTS=
5276         INSTALL_LIB="-m 644"
5277
5278         cf_cv_do_symlinks=no
5279         cf_ld_rpath_opt=
5280         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5281
5282         echo "$as_me:5282: checking if release/abi version should be used for shared libs" >&5
5283 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5284
5285 # Check whether --with-shlib-version or --without-shlib-version was given.
5286 if test "${with_shlib_version+set}" = set; then
5287   withval="$with_shlib_version"
5288   test -z "$withval" && withval=auto
5289         case $withval in #(vi
5290         yes) #(vi
5291                 cf_cv_shlib_version=auto
5292                 ;;
5293         rel|abi|auto|no) #(vi
5294                 cf_cv_shlib_version=$withval
5295                 ;;
5296         *)
5297                 { { echo "$as_me:5297: error: option value must be one of: rel, abi, auto or no" >&5
5298 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5299    { (exit 1); exit 1; }; }
5300                 ;;
5301         esac
5302
5303 else
5304   cf_cv_shlib_version=auto
5305 fi;
5306         echo "$as_me:5306: result: $cf_cv_shlib_version" >&5
5307 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5308
5309         cf_cv_rm_so_locs=no
5310
5311         # Some less-capable ports of gcc support only -fpic
5312         CC_SHARED_OPTS=
5313         if test "$GCC" = yes
5314         then
5315                 echo "$as_me:5315: checking which $CC option to use" >&5
5316 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5317                 cf_save_CFLAGS="$CFLAGS"
5318                 for CC_SHARED_OPTS in -fPIC -fpic ''
5319                 do
5320                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5321                         cat >conftest.$ac_ext <<_ACEOF
5322 #line 5322 "configure"
5323 #include "confdefs.h"
5324 #include <stdio.h>
5325 int
5326 main ()
5327 {
5328 int x = 1
5329   ;
5330   return 0;
5331 }
5332 _ACEOF
5333 rm -f conftest.$ac_objext
5334 if { (eval echo "$as_me:5334: \"$ac_compile\"") >&5
5335   (eval $ac_compile) 2>&5
5336   ac_status=$?
5337   echo "$as_me:5337: \$? = $ac_status" >&5
5338   (exit $ac_status); } &&
5339          { ac_try='test -s conftest.$ac_objext'
5340   { (eval echo "$as_me:5340: \"$ac_try\"") >&5
5341   (eval $ac_try) 2>&5
5342   ac_status=$?
5343   echo "$as_me:5343: \$? = $ac_status" >&5
5344   (exit $ac_status); }; }; then
5345   break
5346 else
5347   echo "$as_me: failed program was:" >&5
5348 cat conftest.$ac_ext >&5
5349 fi
5350 rm -f conftest.$ac_objext conftest.$ac_ext
5351                 done
5352                 echo "$as_me:5352: result: $CC_SHARED_OPTS" >&5
5353 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5354                 CFLAGS="$cf_save_CFLAGS"
5355         fi
5356
5357         cf_cv_shlib_version_infix=no
5358
5359         case $cf_cv_system_name in #(vi
5360         aix[56]*) #(vi
5361                 if test "$GCC" = yes; then
5362                         CC_SHARED_OPTS=
5363                         MK_SHARED_LIB="$(CC) -shared"
5364                 fi
5365                 ;;
5366         beos*) #(vi
5367                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5368                 ;;
5369         cygwin*) #(vi
5370                 CC_SHARED_OPTS=
5371                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5372                 cf_cv_shlib_version=cygdll
5373                 cf_cv_shlib_version_infix=cygdll
5374                 cat >mk_shared_lib.sh <<-CF_EOF
5375                 #!/bin/sh
5376                 SHARED_LIB=\$1
5377                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5378                 shift
5379                 cat <<-EOF
5380                 Linking shared library
5381                 ** SHARED_LIB \$SHARED_LIB
5382                 ** IMPORT_LIB \$IMPORT_LIB
5383 EOF
5384                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5385 CF_EOF
5386                 chmod +x mk_shared_lib.sh
5387                 ;;
5388         darwin*) #(vi
5389                 EXTRA_CFLAGS="-no-cpp-precomp"
5390                 CC_SHARED_OPTS="-dynamic"
5391                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5392                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5393                 cf_cv_shlib_version_infix=yes
5394                 echo "$as_me:5394: checking if ld -search_paths_first works" >&5
5395 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5396 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5397   echo $ECHO_N "(cached) $ECHO_C" >&6
5398 else
5399
5400                         cf_save_LDFLAGS=$LDFLAGS
5401                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5402                         cat >conftest.$ac_ext <<_ACEOF
5403 #line 5403 "configure"
5404 #include "confdefs.h"
5405
5406 int
5407 main ()
5408 {
5409 int i;
5410   ;
5411   return 0;
5412 }
5413 _ACEOF
5414 rm -f conftest.$ac_objext conftest$ac_exeext
5415 if { (eval echo "$as_me:5415: \"$ac_link\"") >&5
5416   (eval $ac_link) 2>&5
5417   ac_status=$?
5418   echo "$as_me:5418: \$? = $ac_status" >&5
5419   (exit $ac_status); } &&
5420          { ac_try='test -s conftest$ac_exeext'
5421   { (eval echo "$as_me:5421: \"$ac_try\"") >&5
5422   (eval $ac_try) 2>&5
5423   ac_status=$?
5424   echo "$as_me:5424: \$? = $ac_status" >&5
5425   (exit $ac_status); }; }; then
5426   cf_cv_ldflags_search_paths_first=yes
5427 else
5428   echo "$as_me: failed program was:" >&5
5429 cat conftest.$ac_ext >&5
5430 cf_cv_ldflags_search_paths_first=no
5431 fi
5432 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5433                                 LDFLAGS=$cf_save_LDFLAGS
5434 fi
5435 echo "$as_me:5435: result: $cf_cv_ldflags_search_paths_first" >&5
5436 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5437                 if test $cf_cv_ldflags_search_paths_first = yes; then
5438                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5439                 fi
5440                 ;;
5441         hpux*) #(vi
5442                 # (tested with gcc 2.7.2 -- I don't have c89)
5443                 if test "$GCC" = yes; then
5444                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5445                 else
5446                         CC_SHARED_OPTS='+Z'
5447                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5448                 fi
5449                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5450                 # HP-UX shared libraries must be executable, and should be
5451                 # readonly to exploit a quirk in the memory manager.
5452                 INSTALL_LIB="-m 555"
5453                 ;;
5454         irix*) #(vi
5455                 if test "$cf_cv_enable_rpath" = yes ; then
5456                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5457                 fi
5458                 # tested with IRIX 5.2 and 'cc'.
5459                 if test "$GCC" != yes; then
5460                         CC_SHARED_OPTS='-KPIC'
5461                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5462                 else
5463                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5464                 fi
5465                 cf_cv_rm_so_locs=yes
5466                 ;;
5467         linux*|gnu*|k*bsd*-gnu) #(vi
5468                 if test "$DFT_LWR_MODEL" = "shared" ; then
5469                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5470                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5471                 fi
5472                 if test "$cf_cv_enable_rpath" = yes ; then
5473                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5474                 fi
5475
5476         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5477         if test "$cf_cv_shlib_version" = rel; then
5478                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5479         else
5480                 cf_cv_shared_soname='`basename $@`'
5481         fi
5482
5483                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5484                 ;;
5485         openbsd[2-9].*) #(vi
5486                 if test "$DFT_LWR_MODEL" = "shared" ; then
5487                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5488                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5489                 fi
5490                 if test "$cf_cv_enable_rpath" = yes ; then
5491                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5492                 fi
5493                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5494
5495         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5496         if test "$cf_cv_shlib_version" = rel; then
5497                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5498         else
5499                 cf_cv_shared_soname='`basename $@`'
5500         fi
5501
5502                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5503                 ;;
5504         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5505                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5506                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5507                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5508                 ;;
5509         freebsd*) #(vi
5510                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5511                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5512                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5513                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${libdir} $LOCAL_LDFLAGS"
5514                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5515                 fi
5516
5517         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5518         if test "$cf_cv_shlib_version" = rel; then
5519                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5520         else
5521                 cf_cv_shared_soname='`basename $@`'
5522         fi
5523
5524                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5525                 ;;
5526         netbsd*) #(vi
5527                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5528                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5529                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5530                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5531                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5532                         if test "$cf_cv_shlib_version" = auto; then
5533                         if test -f /usr/libexec/ld.elf_so; then
5534                                 cf_cv_shlib_version=abi
5535                         else
5536                                 cf_cv_shlib_version=rel
5537                         fi
5538                         fi
5539
5540         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5541         if test "$cf_cv_shlib_version" = rel; then
5542                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5543         else
5544                 cf_cv_shared_soname='`basename $@`'
5545         fi
5546
5547                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5548                 else
5549                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5550                 fi
5551                 ;;
5552         osf*|mls+*) #(vi
5553                 # tested with OSF/1 V3.2 and 'cc'
5554                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5555                 # link with shared libs).
5556                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5557                 case $host_os in #(vi
5558                 osf4*)
5559                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5560                         ;;
5561                 esac
5562                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5563                 if test "$DFT_LWR_MODEL" = "shared" ; then
5564                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5565                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5566                 fi
5567                 cf_cv_rm_so_locs=yes
5568                 ;;
5569         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5570                 # tested with osr5.0.5
5571                 if test "$GCC" != yes; then
5572                         CC_SHARED_OPTS='-belf -KPIC'
5573                 fi
5574                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5575                 if test "$cf_cv_enable_rpath" = yes ; then
5576                         # only way is to set LD_RUN_PATH but no switch for it
5577                         RUN_PATH=$libdir
5578                 fi
5579                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5580                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5581                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5582                 ;;
5583         sunos4*) #(vi
5584                 # tested with SunOS 4.1.1 and gcc 2.7.0
5585                 if test "$GCC" != yes; then
5586                         CC_SHARED_OPTS='-KPIC'
5587                 fi
5588                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5589                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5590                 ;;
5591         solaris2*) #(vi
5592                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5593                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5594                 if test "$DFT_LWR_MODEL" = "shared" ; then
5595                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5596                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5597                 fi
5598                 if test "$cf_cv_enable_rpath" = yes ; then
5599                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5600                 fi
5601
5602         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5603         if test "$cf_cv_shlib_version" = rel; then
5604                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5605         else
5606                 cf_cv_shared_soname='`basename $@`'
5607         fi
5608
5609                 if test "$GCC" != yes; then
5610                         cf_save_CFLAGS="$CFLAGS"
5611                         for cf_shared_opts in -xcode=pic13 -xcode=pic32 -Kpic -KPIC -O
5612                         do
5613                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5614                                 cat >conftest.$ac_ext <<_ACEOF
5615 #line 5615 "configure"
5616 #include "confdefs.h"
5617 #include <stdio.h>
5618 int
5619 main ()
5620 {
5621 printf("Hello\n");
5622   ;
5623   return 0;
5624 }
5625 _ACEOF
5626 rm -f conftest.$ac_objext
5627 if { (eval echo "$as_me:5627: \"$ac_compile\"") >&5
5628   (eval $ac_compile) 2>&5
5629   ac_status=$?
5630   echo "$as_me:5630: \$? = $ac_status" >&5
5631   (exit $ac_status); } &&
5632          { ac_try='test -s conftest.$ac_objext'
5633   { (eval echo "$as_me:5633: \"$ac_try\"") >&5
5634   (eval $ac_try) 2>&5
5635   ac_status=$?
5636   echo "$as_me:5636: \$? = $ac_status" >&5
5637   (exit $ac_status); }; }; then
5638   break
5639 else
5640   echo "$as_me: failed program was:" >&5
5641 cat conftest.$ac_ext >&5
5642 fi
5643 rm -f conftest.$ac_objext conftest.$ac_ext
5644                         done
5645                         CFLAGS="$cf_save_CFLAGS"
5646                         CC_SHARED_OPTS=$cf_shared_opts
5647                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5648                 else
5649                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5650                 fi
5651                 ;;
5652         sysv5uw7*|unix_sv*) #(vi
5653                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5654                 if test "$GCC" != yes; then
5655                         CC_SHARED_OPTS='-KPIC'
5656                 fi
5657                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5658                 ;;
5659         *)
5660                 CC_SHARED_OPTS='unknown'
5661                 MK_SHARED_LIB='echo unknown'
5662                 ;;
5663         esac
5664
5665         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5666         case "$cf_cv_shlib_version" in #(vi
5667         rel|abi)
5668                 case "$MK_SHARED_LIB" in #(vi
5669                 *'-o $@') #(vi
5670                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5671                         ;;
5672                 *)
5673                         { echo "$as_me:5673: WARNING: ignored --with-shlib-version" >&5
5674 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5675                         ;;
5676                 esac
5677                 ;;
5678         esac
5679
5680         if test -n "$cf_ld_rpath_opt" ; then
5681                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5682         fi
5683
5684 if test "$CC_SHARED_OPTS" = "unknown"; then
5685         for model in $cf_list_models; do
5686                 if test "$model" = "shared"; then
5687                         { { echo "$as_me:5687: error: Shared libraries are not supported in this version" >&5
5688 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5689    { (exit 1); exit 1; }; }
5690                 fi
5691         done
5692 fi
5693
5694 ###############################################################################
5695
5696 ###     use option --disable-overwrite to leave out the link to -lcurses
5697 echo "$as_me:5697: checking if you wish to install ncurses overwriting curses" >&5
5698 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5699
5700 # Check whether --enable-overwrite or --disable-overwrite was given.
5701 if test "${enable_overwrite+set}" = set; then
5702   enableval="$enable_overwrite"
5703   with_overwrite=$enableval
5704 else
5705   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5706 fi;
5707 echo "$as_me:5707: result: $with_overwrite" >&5
5708 echo "${ECHO_T}$with_overwrite" >&6
5709
5710 echo "$as_me:5710: checking if external terminfo-database is used" >&5
5711 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5712
5713 # Check whether --enable-database or --disable-database was given.
5714 if test "${enable_database+set}" = set; then
5715   enableval="$enable_database"
5716   use_database=$enableval
5717 else
5718   use_database=yes
5719 fi;
5720 echo "$as_me:5720: result: $use_database" >&5
5721 echo "${ECHO_T}$use_database" >&6
5722
5723 case $host_os in #(vi
5724 os2*) #(vi
5725         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5726         ;;
5727 *) #(vi
5728         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5729         ;;
5730 esac
5731
5732         case $cf_cv_system_name in
5733         os2*)   PATH_SEPARATOR=';'  ;;
5734         *)      PATH_SEPARATOR=':'  ;;
5735         esac
5736
5737 if test "$use_database" != no ; then
5738         cat >>confdefs.h <<\EOF
5739 #define USE_DATABASE 1
5740 EOF
5741
5742         echo "$as_me:5742: checking which terminfo source-file will be installed" >&5
5743 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5744
5745 # Check whether --with-database or --without-database was given.
5746 if test "${with_database+set}" = set; then
5747   withval="$with_database"
5748   TERMINFO_SRC=$withval
5749 fi;
5750         echo "$as_me:5750: result: $TERMINFO_SRC" >&5
5751 echo "${ECHO_T}$TERMINFO_SRC" >&6
5752
5753         echo "$as_me:5753: checking whether to use hashed database instead of directory/tree" >&5
5754 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5755
5756 # Check whether --with-hashed-db or --without-hashed-db was given.
5757 if test "${with_hashed_db+set}" = set; then
5758   withval="$with_hashed_db"
5759
5760 else
5761   with_hashed_db=no
5762 fi;
5763         echo "$as_me:5763: result: $with_hashed_db" >&5
5764 echo "${ECHO_T}$with_hashed_db" >&6
5765 else
5766         with_hashed_db=no
5767 fi
5768
5769 echo "$as_me:5769: checking for list of fallback descriptions" >&5
5770 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5771
5772 # Check whether --with-fallbacks or --without-fallbacks was given.
5773 if test "${with_fallbacks+set}" = set; then
5774   withval="$with_fallbacks"
5775   with_fallback=$withval
5776 else
5777   with_fallback=
5778 fi;
5779 echo "$as_me:5779: result: $with_fallback" >&5
5780 echo "${ECHO_T}$with_fallback" >&6
5781 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5782
5783 echo "$as_me:5783: checking if you want modern xterm or antique" >&5
5784 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5785
5786 # Check whether --with-xterm-new or --without-xterm-new was given.
5787 if test "${with_xterm_new+set}" = set; then
5788   withval="$with_xterm_new"
5789   with_xterm_new=$withval
5790 else
5791   with_xterm_new=yes
5792 fi;
5793 case $with_xterm_new in
5794 no)     with_xterm_new=xterm-old;;
5795 *)      with_xterm_new=xterm-new;;
5796 esac
5797 echo "$as_me:5797: result: $with_xterm_new" >&5
5798 echo "${ECHO_T}$with_xterm_new" >&6
5799 WHICH_XTERM=$with_xterm_new
5800
5801 MAKE_TERMINFO=
5802 if test "$use_database" = no ; then
5803         TERMINFO="${datadir}/terminfo"
5804         MAKE_TERMINFO="#"
5805 else
5806
5807 echo "$as_me:5807: checking for list of terminfo directories" >&5
5808 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5809
5810 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5811 if test "${with_terminfo_dirs+set}" = set; then
5812   withval="$with_terminfo_dirs"
5813
5814 else
5815   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5816 fi;
5817 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
5818 cf_dst_path=
5819 for cf_src_path in $withval
5820 do
5821
5822 if test "x$prefix" != xNONE; then
5823   cf_path_syntax="$prefix"
5824 else
5825   cf_path_syntax="$ac_default_prefix"
5826 fi
5827
5828 case ".$cf_src_path" in #(vi
5829 .\$\(*\)*|.\'*\'*) #(vi
5830   ;;
5831 ..|./*|.\\*) #(vi
5832   ;;
5833 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5834   ;;
5835 .\${*prefix}*) #(vi
5836   eval cf_src_path="$cf_src_path"
5837   case ".$cf_src_path" in #(vi
5838   .NONE/*)
5839     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5840     ;;
5841   esac
5842   ;; #(vi
5843 .no|.NONE/*)
5844   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5845   ;;
5846 *)
5847   { { echo "$as_me:5847: error: expected a pathname, not \"$cf_src_path\"" >&5
5848 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5849    { (exit 1); exit 1; }; }
5850   ;;
5851 esac
5852
5853   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5854   cf_dst_path="${cf_dst_path}${cf_src_path}"
5855 done
5856 IFS="$ac_save_ifs"
5857
5858 eval 'TERMINFO_DIRS="$cf_dst_path"'
5859
5860 echo "$as_me:5860: result: $TERMINFO_DIRS" >&5
5861 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5862 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5863 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5864 EOF
5865
5866 echo "$as_me:5866: checking for default terminfo directory" >&5
5867 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5868
5869 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5870 if test "${with_default_terminfo_dir+set}" = set; then
5871   withval="$with_default_terminfo_dir"
5872
5873 else
5874   withval="${TERMINFO-${datadir}/terminfo}"
5875 fi; if test -n "${datadir}/terminfo" ; then
5876
5877 if test "x$prefix" != xNONE; then
5878   cf_path_syntax="$prefix"
5879 else
5880   cf_path_syntax="$ac_default_prefix"
5881 fi
5882
5883 case ".$withval" in #(vi
5884 .\$\(*\)*|.\'*\'*) #(vi
5885   ;;
5886 ..|./*|.\\*) #(vi
5887   ;;
5888 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5889   ;;
5890 .\${*prefix}*) #(vi
5891   eval withval="$withval"
5892   case ".$withval" in #(vi
5893   .NONE/*)
5894     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5895     ;;
5896   esac
5897   ;; #(vi
5898 .no|.NONE/*)
5899   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5900   ;;
5901 *)
5902   { { echo "$as_me:5902: error: expected a pathname, not \"$withval\"" >&5
5903 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5904    { (exit 1); exit 1; }; }
5905   ;;
5906 esac
5907
5908 fi
5909 TERMINFO="$withval"
5910
5911 echo "$as_me:5911: result: $TERMINFO" >&5
5912 echo "${ECHO_T}$TERMINFO" >&6
5913 cat >>confdefs.h <<EOF
5914 #define TERMINFO "$TERMINFO"
5915 EOF
5916
5917 fi
5918
5919 ###     use option --disable-big-core to make tic run on small machines
5920 ###     We need 4Mb, check if we can allocate 50% more than that.
5921 echo "$as_me:5921: checking if big-core option selected" >&5
5922 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5923
5924 # Check whether --enable-big-core or --disable-big-core was given.
5925 if test "${enable_big_core+set}" = set; then
5926   enableval="$enable_big_core"
5927   with_big_core=$enableval
5928 else
5929   if test "$cross_compiling" = yes; then
5930   with_big_core=no
5931 else
5932   cat >conftest.$ac_ext <<_ACEOF
5933 #line 5933 "configure"
5934 #include "confdefs.h"
5935
5936 #include <stdlib.h>
5937 #include <string.h>
5938 int main() {
5939         unsigned long n = 6000000L;
5940         char *s = malloc(n);
5941         if (s != 0)
5942                 s[0] = s[n-1] = 0;
5943         ${cf_cv_main_return:-return}(s == 0);
5944 }
5945 _ACEOF
5946 rm -f conftest$ac_exeext
5947 if { (eval echo "$as_me:5947: \"$ac_link\"") >&5
5948   (eval $ac_link) 2>&5
5949   ac_status=$?
5950   echo "$as_me:5950: \$? = $ac_status" >&5
5951   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5952   { (eval echo "$as_me:5952: \"$ac_try\"") >&5
5953   (eval $ac_try) 2>&5
5954   ac_status=$?
5955   echo "$as_me:5955: \$? = $ac_status" >&5
5956   (exit $ac_status); }; }; then
5957   with_big_core=yes
5958 else
5959   echo "$as_me: program exited with status $ac_status" >&5
5960 echo "$as_me: failed program was:" >&5
5961 cat conftest.$ac_ext >&5
5962 with_big_core=no
5963 fi
5964 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5965 fi
5966 fi;
5967 echo "$as_me:5967: result: $with_big_core" >&5
5968 echo "${ECHO_T}$with_big_core" >&6
5969 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
5970 #define HAVE_BIG_CORE 1
5971 EOF
5972
5973 ### ISO C only guarantees 512-char strings, we have tables which load faster
5974 ### when constructed using "big" strings.  More than the C compiler, the awk
5975 ### program is a limit on most vendor UNIX systems.  Check that we can build.
5976 echo "$as_me:5976: checking if big-strings option selected" >&5
5977 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
5978
5979 # Check whether --enable-big-strings or --disable-big-strings was given.
5980 if test "${enable_big_strings+set}" = set; then
5981   enableval="$enable_big_strings"
5982   with_big_strings=$enableval
5983 else
5984
5985         case x$AWK in #(vi
5986         x)
5987                 eval with_big_strings=no
5988                 ;;
5989         *) #(vi
5990                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
5991                         | $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
5992                         eval with_big_strings=yes
5993                 else
5994                         eval with_big_strings=no
5995                 fi
5996                 ;;
5997         esac
5998
5999 fi;
6000 echo "$as_me:6000: result: $with_big_strings" >&5
6001 echo "${ECHO_T}$with_big_strings" >&6
6002
6003 USE_BIG_STRINGS=0
6004 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
6005
6006 ###     use option --enable-termcap to compile in the termcap fallback support
6007 echo "$as_me:6007: checking if you want termcap-fallback support" >&5
6008 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6009
6010 # Check whether --enable-termcap or --disable-termcap was given.
6011 if test "${enable_termcap+set}" = set; then
6012   enableval="$enable_termcap"
6013   with_termcap=$enableval
6014 else
6015   with_termcap=no
6016 fi;
6017 echo "$as_me:6017: result: $with_termcap" >&5
6018 echo "${ECHO_T}$with_termcap" >&6
6019
6020 if test "$with_termcap" != "yes" ; then
6021         if test "$use_database" = no ; then
6022                 if test -z "$with_fallback" ; then
6023                         { { echo "$as_me:6023: error: You have disabled the database w/o specifying fallbacks" >&5
6024 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6025    { (exit 1); exit 1; }; }
6026                 fi
6027         fi
6028         cat >>confdefs.h <<\EOF
6029 #define PURE_TERMINFO 1
6030 EOF
6031
6032 else
6033
6034 if test "$with_ticlib" != no ; then
6035         { { echo "$as_me:6035: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6036 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6037    { (exit 1); exit 1; }; }
6038 fi
6039
6040 cat >>confdefs.h <<\EOF
6041 #define USE_TERMCAP 1
6042 EOF
6043
6044 echo "$as_me:6044: checking for list of termcap files" >&5
6045 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6046
6047 # Check whether --with-termpath or --without-termpath was given.
6048 if test "${with_termpath+set}" = set; then
6049   withval="$with_termpath"
6050
6051 else
6052   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
6053 fi;
6054 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6055 cf_dst_path=
6056 for cf_src_path in $withval
6057 do
6058
6059 if test "x$prefix" != xNONE; then
6060   cf_path_syntax="$prefix"
6061 else
6062   cf_path_syntax="$ac_default_prefix"
6063 fi
6064
6065 case ".$cf_src_path" in #(vi
6066 .\$\(*\)*|.\'*\'*) #(vi
6067   ;;
6068 ..|./*|.\\*) #(vi
6069   ;;
6070 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6071   ;;
6072 .\${*prefix}*) #(vi
6073   eval cf_src_path="$cf_src_path"
6074   case ".$cf_src_path" in #(vi
6075   .NONE/*)
6076     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6077     ;;
6078   esac
6079   ;; #(vi
6080 .no|.NONE/*)
6081   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6082   ;;
6083 *)
6084   { { echo "$as_me:6084: error: expected a pathname, not \"$cf_src_path\"" >&5
6085 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6086    { (exit 1); exit 1; }; }
6087   ;;
6088 esac
6089
6090   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6091   cf_dst_path="${cf_dst_path}${cf_src_path}"
6092 done
6093 IFS="$ac_save_ifs"
6094
6095 eval 'TERMPATH="$cf_dst_path"'
6096
6097 echo "$as_me:6097: result: $TERMPATH" >&5
6098 echo "${ECHO_T}$TERMPATH" >&6
6099 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6100 #define TERMPATH "$TERMPATH"
6101 EOF
6102
6103 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6104 echo "$as_me:6104: checking if fast termcap-loader is needed" >&5
6105 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6106
6107 # Check whether --enable-getcap or --disable-getcap was given.
6108 if test "${enable_getcap+set}" = set; then
6109   enableval="$enable_getcap"
6110   with_getcap=$enableval
6111 else
6112   with_getcap=no
6113 fi;
6114 echo "$as_me:6114: result: $with_getcap" >&5
6115 echo "${ECHO_T}$with_getcap" >&6
6116 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6117 #define USE_GETCAP 1
6118 EOF
6119
6120 echo "$as_me:6120: checking if translated termcaps will be cached in ~/.terminfo" >&5
6121 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6122
6123 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6124 if test "${enable_getcap_cache+set}" = set; then
6125   enableval="$enable_getcap_cache"
6126   with_getcap_cache=$enableval
6127 else
6128   with_getcap_cache=no
6129 fi;
6130 echo "$as_me:6130: result: $with_getcap_cache" >&5
6131 echo "${ECHO_T}$with_getcap_cache" >&6
6132 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6133 #define USE_GETCAP_CACHE 1
6134 EOF
6135
6136 fi
6137
6138 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6139 echo "$as_me:6139: checking if ~/.terminfo is wanted" >&5
6140 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6141
6142 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6143 if test "${enable_home_terminfo+set}" = set; then
6144   enableval="$enable_home_terminfo"
6145   with_home_terminfo=$enableval
6146 else
6147   with_home_terminfo=yes
6148 fi;
6149 echo "$as_me:6149: result: $with_home_terminfo" >&5
6150 echo "${ECHO_T}$with_home_terminfo" >&6
6151 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6152 #define USE_HOME_TERMINFO 1
6153 EOF
6154
6155 echo "$as_me:6155: checking if you want to use restricted environment when running as root" >&5
6156 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6157
6158 # Check whether --enable-root-environ or --disable-root-environ was given.
6159 if test "${enable_root_environ+set}" = set; then
6160   enableval="$enable_root_environ"
6161   with_root_environ=$enableval
6162 else
6163   with_root_environ=yes
6164 fi;
6165 echo "$as_me:6165: result: $with_root_environ" >&5
6166 echo "${ECHO_T}$with_root_environ" >&6
6167 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6168 #define USE_ROOT_ENVIRON 1
6169 EOF
6170
6171 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6172 ###   to reduce storage requirements for the terminfo database.
6173
6174 for ac_func in \
6175         remove \
6176         unlink
6177 do
6178 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6179 echo "$as_me:6179: checking for $ac_func" >&5
6180 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6181 if eval "test \"\${$as_ac_var+set}\" = set"; then
6182   echo $ECHO_N "(cached) $ECHO_C" >&6
6183 else
6184   cat >conftest.$ac_ext <<_ACEOF
6185 #line 6185 "configure"
6186 #include "confdefs.h"
6187 /* System header to define __stub macros and hopefully few prototypes,
6188     which can conflict with char $ac_func (); below.  */
6189 #include <assert.h>
6190 /* Override any gcc2 internal prototype to avoid an error.  */
6191 #ifdef __cplusplus
6192 extern "C"
6193 #endif
6194 /* We use char because int might match the return type of a gcc2
6195    builtin and then its argument prototype would still apply.  */
6196 char $ac_func ();
6197 char (*f) ();
6198
6199 int
6200 main ()
6201 {
6202 /* The GNU C library defines this for functions which it implements
6203     to always fail with ENOSYS.  Some functions are actually named
6204     something starting with __ and the normal name is an alias.  */
6205 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6206 choke me
6207 #else
6208 f = $ac_func;
6209 #endif
6210
6211   ;
6212   return 0;
6213 }
6214 _ACEOF
6215 rm -f conftest.$ac_objext conftest$ac_exeext
6216 if { (eval echo "$as_me:6216: \"$ac_link\"") >&5
6217   (eval $ac_link) 2>&5
6218   ac_status=$?
6219   echo "$as_me:6219: \$? = $ac_status" >&5
6220   (exit $ac_status); } &&
6221          { ac_try='test -s conftest$ac_exeext'
6222   { (eval echo "$as_me:6222: \"$ac_try\"") >&5
6223   (eval $ac_try) 2>&5
6224   ac_status=$?
6225   echo "$as_me:6225: \$? = $ac_status" >&5
6226   (exit $ac_status); }; }; then
6227   eval "$as_ac_var=yes"
6228 else
6229   echo "$as_me: failed program was:" >&5
6230 cat conftest.$ac_ext >&5
6231 eval "$as_ac_var=no"
6232 fi
6233 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6234 fi
6235 echo "$as_me:6235: result: `eval echo '${'$as_ac_var'}'`" >&5
6236 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6237 if test `eval echo '${'$as_ac_var'}'` = yes; then
6238   cat >>confdefs.h <<EOF
6239 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6240 EOF
6241
6242 fi
6243 done
6244
6245 if test "$cross_compiling" = yes ; then
6246
6247 for ac_func in \
6248                 link \
6249                 symlink
6250 do
6251 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6252 echo "$as_me:6252: checking for $ac_func" >&5
6253 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6254 if eval "test \"\${$as_ac_var+set}\" = set"; then
6255   echo $ECHO_N "(cached) $ECHO_C" >&6
6256 else
6257   cat >conftest.$ac_ext <<_ACEOF
6258 #line 6258 "configure"
6259 #include "confdefs.h"
6260 /* System header to define __stub macros and hopefully few prototypes,
6261     which can conflict with char $ac_func (); below.  */
6262 #include <assert.h>
6263 /* Override any gcc2 internal prototype to avoid an error.  */
6264 #ifdef __cplusplus
6265 extern "C"
6266 #endif
6267 /* We use char because int might match the return type of a gcc2
6268    builtin and then its argument prototype would still apply.  */
6269 char $ac_func ();
6270 char (*f) ();
6271
6272 int
6273 main ()
6274 {
6275 /* The GNU C library defines this for functions which it implements
6276     to always fail with ENOSYS.  Some functions are actually named
6277     something starting with __ and the normal name is an alias.  */
6278 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6279 choke me
6280 #else
6281 f = $ac_func;
6282 #endif
6283
6284   ;
6285   return 0;
6286 }
6287 _ACEOF
6288 rm -f conftest.$ac_objext conftest$ac_exeext
6289 if { (eval echo "$as_me:6289: \"$ac_link\"") >&5
6290   (eval $ac_link) 2>&5
6291   ac_status=$?
6292   echo "$as_me:6292: \$? = $ac_status" >&5
6293   (exit $ac_status); } &&
6294          { ac_try='test -s conftest$ac_exeext'
6295   { (eval echo "$as_me:6295: \"$ac_try\"") >&5
6296   (eval $ac_try) 2>&5
6297   ac_status=$?
6298   echo "$as_me:6298: \$? = $ac_status" >&5
6299   (exit $ac_status); }; }; then
6300   eval "$as_ac_var=yes"
6301 else
6302   echo "$as_me: failed program was:" >&5
6303 cat conftest.$ac_ext >&5
6304 eval "$as_ac_var=no"
6305 fi
6306 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6307 fi
6308 echo "$as_me:6308: result: `eval echo '${'$as_ac_var'}'`" >&5
6309 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6310 if test `eval echo '${'$as_ac_var'}'` = yes; then
6311   cat >>confdefs.h <<EOF
6312 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6313 EOF
6314
6315 fi
6316 done
6317
6318 else
6319         echo "$as_me:6319: checking if link/symlink functions work" >&5
6320 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6321 if test "${cf_cv_link_funcs+set}" = set; then
6322   echo $ECHO_N "(cached) $ECHO_C" >&6
6323 else
6324
6325                 cf_cv_link_funcs=
6326                 for cf_func in link symlink ; do
6327                         if test "$cross_compiling" = yes; then
6328
6329                         eval 'ac_cv_func_'$cf_func'=error'
6330 else
6331   cat >conftest.$ac_ext <<_ACEOF
6332 #line 6332 "configure"
6333 #include "confdefs.h"
6334
6335 #include <sys/types.h>
6336 #include <sys/stat.h>
6337 #ifdef HAVE_UNISTD_H
6338 #include <unistd.h>
6339 #endif
6340 int main()
6341 {
6342         int fail = 0;
6343         char *src = "config.log";
6344         char *dst = "conftest.chk";
6345         struct stat src_sb;
6346         struct stat dst_sb;
6347
6348         stat(src, &src_sb);
6349         fail = ($cf_func("config.log", "conftest.chk") < 0)
6350             || (stat(dst, &dst_sb) < 0)
6351             || (dst_sb.st_mtime != src_sb.st_mtime);
6352 #ifdef HAVE_UNLINK
6353         unlink(dst);
6354 #else
6355         remove(dst);
6356 #endif
6357         ${cf_cv_main_return:-return} (fail);
6358 }
6359
6360 _ACEOF
6361 rm -f conftest$ac_exeext
6362 if { (eval echo "$as_me:6362: \"$ac_link\"") >&5
6363   (eval $ac_link) 2>&5
6364   ac_status=$?
6365   echo "$as_me:6365: \$? = $ac_status" >&5
6366   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6367   { (eval echo "$as_me:6367: \"$ac_try\"") >&5
6368   (eval $ac_try) 2>&5
6369   ac_status=$?
6370   echo "$as_me:6370: \$? = $ac_status" >&5
6371   (exit $ac_status); }; }; then
6372
6373                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6374                         eval 'ac_cv_func_'$cf_func'=yes'
6375 else
6376   echo "$as_me: program exited with status $ac_status" >&5
6377 echo "$as_me: failed program was:" >&5
6378 cat conftest.$ac_ext >&5
6379
6380                         eval 'ac_cv_func_'$cf_func'=no'
6381 fi
6382 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6383 fi
6384                 done
6385                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6386
6387 fi
6388 echo "$as_me:6388: result: $cf_cv_link_funcs" >&5
6389 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6390         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6391 #define HAVE_LINK 1
6392 EOF
6393
6394         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6395 #define HAVE_SYMLINK 1
6396 EOF
6397
6398 fi
6399
6400 with_links=no
6401 with_symlinks=no
6402
6403 # soft links (symbolic links) are useful for some systems where hard links do
6404 # not work, or to make it simpler to copy terminfo trees around.
6405 if test "$ac_cv_func_symlink" = yes ; then
6406     echo "$as_me:6406: checking if tic should use symbolic links" >&5
6407 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6408
6409 # Check whether --enable-symlinks or --disable-symlinks was given.
6410 if test "${enable_symlinks+set}" = set; then
6411   enableval="$enable_symlinks"
6412   with_symlinks=$enableval
6413 else
6414   with_symlinks=no
6415 fi;
6416     echo "$as_me:6416: result: $with_symlinks" >&5
6417 echo "${ECHO_T}$with_symlinks" >&6
6418 fi
6419
6420 # If we have hard links and did not choose to use soft links instead, there is
6421 # no reason to make this choice optional - use the hard links.
6422 if test "$with_symlinks" = no ; then
6423     echo "$as_me:6423: checking if tic should use hard links" >&5
6424 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6425     if test "$ac_cv_func_link" = yes ; then
6426         with_links=yes
6427     else
6428         with_links=no
6429     fi
6430     echo "$as_me:6430: result: $with_links" >&5
6431 echo "${ECHO_T}$with_links" >&6
6432 fi
6433
6434 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6435 #define USE_LINKS 1
6436 EOF
6437
6438 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6439 #define USE_SYMLINKS 1
6440 EOF
6441
6442 ###   use option --enable-broken-linker to force on use of broken-linker support
6443 echo "$as_me:6443: checking if you want broken-linker support code" >&5
6444 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6445
6446 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6447 if test "${enable_broken_linker+set}" = set; then
6448   enableval="$enable_broken_linker"
6449   with_broken_linker=$enableval
6450 else
6451   with_broken_linker=${BROKEN_LINKER-no}
6452 fi;
6453 echo "$as_me:6453: result: $with_broken_linker" >&5
6454 echo "${ECHO_T}$with_broken_linker" >&6
6455
6456 BROKEN_LINKER=0
6457 if test "$with_broken_linker" = yes ; then
6458         cat >>confdefs.h <<\EOF
6459 #define BROKEN_LINKER 1
6460 EOF
6461
6462         BROKEN_LINKER=1
6463 elif test "$DFT_LWR_MODEL" = shared ; then
6464         case $cf_cv_system_name in #(vi
6465         cygwin*)
6466                 cat >>confdefs.h <<\EOF
6467 #define BROKEN_LINKER 1
6468 EOF
6469
6470                 BROKEN_LINKER=1
6471                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6472
6473 echo "${as_me-configure}:6473: testing cygwin linker is broken anyway ..." 1>&5
6474
6475                 ;;
6476         esac
6477 fi
6478
6479 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6480 echo "$as_me:6480: checking if tputs should process BSD-style prefix padding" >&5
6481 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6482
6483 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6484 if test "${enable_bsdpad+set}" = set; then
6485   enableval="$enable_bsdpad"
6486   with_bsdpad=$enableval
6487 else
6488   with_bsdpad=no
6489 fi;
6490 echo "$as_me:6490: result: $with_bsdpad" >&5
6491 echo "${ECHO_T}$with_bsdpad" >&6
6492 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6493 #define BSD_TPUTS 1
6494 EOF
6495
6496 ###   use option --enable-widec to turn on use of wide-character support
6497 NCURSES_CH_T=chtype
6498 NCURSES_LIBUTF8=0
6499
6500 NEED_WCHAR_H=0
6501 NCURSES_MBSTATE_T=0
6502 NCURSES_WCHAR_T=0
6503 NCURSES_WINT_T=0
6504
6505 # Check to define _XOPEN_SOURCE "automatically"
6506
6507 cf_XOPEN_SOURCE=500
6508 cf_POSIX_C_SOURCE=199506L
6509 cf_xopen_source=
6510
6511 case $host_os in #(vi
6512 aix[456]*) #(vi
6513         cf_xopen_source="-D_ALL_SOURCE"
6514         ;;
6515 darwin[0-8].*) #(vi
6516         cf_xopen_source="-D_APPLE_C_SOURCE"
6517         ;;
6518 darwin*) #(vi
6519         cf_xopen_source="-D_DARWIN_C_SOURCE"
6520         ;;
6521 freebsd*|dragonfly*) #(vi
6522         # 5.x headers associate
6523         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6524         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6525         cf_POSIX_C_SOURCE=200112L
6526         cf_XOPEN_SOURCE=600
6527         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6528         ;;
6529 hpux11*) #(vi
6530         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
6531         ;;
6532 hpux*) #(vi
6533         cf_xopen_source="-D_HPUX_SOURCE"
6534         ;;
6535 irix[56].*) #(vi
6536         cf_xopen_source="-D_SGI_SOURCE"
6537         ;;
6538 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
6539
6540 echo "$as_me:6540: checking if we must define _GNU_SOURCE" >&5
6541 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6542 if test "${cf_cv_gnu_source+set}" = set; then
6543   echo $ECHO_N "(cached) $ECHO_C" >&6
6544 else
6545
6546 cat >conftest.$ac_ext <<_ACEOF
6547 #line 6547 "configure"
6548 #include "confdefs.h"
6549 #include <sys/types.h>
6550 int
6551 main ()
6552 {
6553
6554 #ifndef _XOPEN_SOURCE
6555 make an error
6556 #endif
6557   ;
6558   return 0;
6559 }
6560 _ACEOF
6561 rm -f conftest.$ac_objext
6562 if { (eval echo "$as_me:6562: \"$ac_compile\"") >&5
6563   (eval $ac_compile) 2>&5
6564   ac_status=$?
6565   echo "$as_me:6565: \$? = $ac_status" >&5
6566   (exit $ac_status); } &&
6567          { ac_try='test -s conftest.$ac_objext'
6568   { (eval echo "$as_me:6568: \"$ac_try\"") >&5
6569   (eval $ac_try) 2>&5
6570   ac_status=$?
6571   echo "$as_me:6571: \$? = $ac_status" >&5
6572   (exit $ac_status); }; }; then
6573   cf_cv_gnu_source=no
6574 else
6575   echo "$as_me: failed program was:" >&5
6576 cat conftest.$ac_ext >&5
6577 cf_save="$CPPFLAGS"
6578          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6579          cat >conftest.$ac_ext <<_ACEOF
6580 #line 6580 "configure"
6581 #include "confdefs.h"
6582 #include <sys/types.h>
6583 int
6584 main ()
6585 {
6586
6587 #ifdef _XOPEN_SOURCE
6588 make an error
6589 #endif
6590   ;
6591   return 0;
6592 }
6593 _ACEOF
6594 rm -f conftest.$ac_objext
6595 if { (eval echo "$as_me:6595: \"$ac_compile\"") >&5
6596   (eval $ac_compile) 2>&5
6597   ac_status=$?
6598   echo "$as_me:6598: \$? = $ac_status" >&5
6599   (exit $ac_status); } &&
6600          { ac_try='test -s conftest.$ac_objext'
6601   { (eval echo "$as_me:6601: \"$ac_try\"") >&5
6602   (eval $ac_try) 2>&5
6603   ac_status=$?
6604   echo "$as_me:6604: \$? = $ac_status" >&5
6605   (exit $ac_status); }; }; then
6606   cf_cv_gnu_source=no
6607 else
6608   echo "$as_me: failed program was:" >&5
6609 cat conftest.$ac_ext >&5
6610 cf_cv_gnu_source=yes
6611 fi
6612 rm -f conftest.$ac_objext conftest.$ac_ext
6613         CPPFLAGS="$cf_save"
6614
6615 fi
6616 rm -f conftest.$ac_objext conftest.$ac_ext
6617
6618 fi
6619 echo "$as_me:6619: result: $cf_cv_gnu_source" >&5
6620 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6621 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6622
6623         ;;
6624 mirbsd*) #(vi
6625         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6626         ;;
6627 netbsd*) #(vi
6628         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6629         ;;
6630 openbsd*) #(vi
6631         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6632         ;;
6633 osf[45]*) #(vi
6634         cf_xopen_source="-D_OSF_SOURCE"
6635         ;;
6636 nto-qnx*) #(vi
6637         cf_xopen_source="-D_QNX_SOURCE"
6638         ;;
6639 sco*) #(vi
6640         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6641         ;;
6642 solaris*) #(vi
6643         cf_xopen_source="-D__EXTENSIONS__"
6644         ;;
6645 *)
6646         echo "$as_me:6646: checking if we should define _XOPEN_SOURCE" >&5
6647 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6648 if test "${cf_cv_xopen_source+set}" = set; then
6649   echo $ECHO_N "(cached) $ECHO_C" >&6
6650 else
6651
6652         cat >conftest.$ac_ext <<_ACEOF
6653 #line 6653 "configure"
6654 #include "confdefs.h"
6655 #include <sys/types.h>
6656 int
6657 main ()
6658 {
6659
6660 #ifndef _XOPEN_SOURCE
6661 make an error
6662 #endif
6663   ;
6664   return 0;
6665 }
6666 _ACEOF
6667 rm -f conftest.$ac_objext
6668 if { (eval echo "$as_me:6668: \"$ac_compile\"") >&5
6669   (eval $ac_compile) 2>&5
6670   ac_status=$?
6671   echo "$as_me:6671: \$? = $ac_status" >&5
6672   (exit $ac_status); } &&
6673          { ac_try='test -s conftest.$ac_objext'
6674   { (eval echo "$as_me:6674: \"$ac_try\"") >&5
6675   (eval $ac_try) 2>&5
6676   ac_status=$?
6677   echo "$as_me:6677: \$? = $ac_status" >&5
6678   (exit $ac_status); }; }; then
6679   cf_cv_xopen_source=no
6680 else
6681   echo "$as_me: failed program was:" >&5
6682 cat conftest.$ac_ext >&5
6683 cf_save="$CPPFLAGS"
6684          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6685          cat >conftest.$ac_ext <<_ACEOF
6686 #line 6686 "configure"
6687 #include "confdefs.h"
6688 #include <sys/types.h>
6689 int
6690 main ()
6691 {
6692
6693 #ifdef _XOPEN_SOURCE
6694 make an error
6695 #endif
6696   ;
6697   return 0;
6698 }
6699 _ACEOF
6700 rm -f conftest.$ac_objext
6701 if { (eval echo "$as_me:6701: \"$ac_compile\"") >&5
6702   (eval $ac_compile) 2>&5
6703   ac_status=$?
6704   echo "$as_me:6704: \$? = $ac_status" >&5
6705   (exit $ac_status); } &&
6706          { ac_try='test -s conftest.$ac_objext'
6707   { (eval echo "$as_me:6707: \"$ac_try\"") >&5
6708   (eval $ac_try) 2>&5
6709   ac_status=$?
6710   echo "$as_me:6710: \$? = $ac_status" >&5
6711   (exit $ac_status); }; }; then
6712   cf_cv_xopen_source=no
6713 else
6714   echo "$as_me: failed program was:" >&5
6715 cat conftest.$ac_ext >&5
6716 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6717 fi
6718 rm -f conftest.$ac_objext conftest.$ac_ext
6719         CPPFLAGS="$cf_save"
6720
6721 fi
6722 rm -f conftest.$ac_objext conftest.$ac_ext
6723
6724 fi
6725 echo "$as_me:6725: result: $cf_cv_xopen_source" >&5
6726 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6727         if test "$cf_cv_xopen_source" != no ; then
6728
6729 CFLAGS=`echo "$CFLAGS" | \
6730         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
6731                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
6732
6733 CPPFLAGS=`echo "$CPPFLAGS" | \
6734         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
6735                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
6736
6737                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
6738
6739 cf_fix_cppflags=no
6740 cf_new_cflags=
6741 cf_new_cppflags=
6742 cf_new_extra_cppflags=
6743
6744 for cf_add_cflags in $cf_temp_xopen_source
6745 do
6746 case $cf_fix_cppflags in
6747 no)
6748         case $cf_add_cflags in #(vi
6749         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
6750                 case $cf_add_cflags in
6751                 -D*)
6752                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6753
6754                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
6755                                 && test -z "${cf_tst_cflags}" \
6756                                 && cf_fix_cppflags=yes
6757
6758                         if test $cf_fix_cppflags = yes ; then
6759                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6760                                 continue
6761                         elif test "${cf_tst_cflags}" = "\"'" ; then
6762                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6763                                 continue
6764                         fi
6765                         ;;
6766                 esac
6767                 case "$CPPFLAGS" in
6768                 *$cf_add_cflags) #(vi
6769                         ;;
6770                 *) #(vi
6771                         case $cf_add_cflags in #(vi
6772                         -D*)
6773                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
6774
6775 CPPFLAGS=`echo "$CPPFLAGS" | \
6776         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
6777                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
6778
6779                                 ;;
6780                         esac
6781                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
6782                         ;;
6783                 esac
6784                 ;;
6785         *)
6786                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
6787                 ;;
6788         esac
6789         ;;
6790 yes)
6791         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6792
6793         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
6794
6795         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
6796                 && test -z "${cf_tst_cflags}" \
6797                 && cf_fix_cppflags=no
6798         ;;
6799 esac
6800 done
6801
6802 if test -n "$cf_new_cflags" ; then
6803
6804         CFLAGS="$CFLAGS $cf_new_cflags"
6805 fi
6806
6807 if test -n "$cf_new_cppflags" ; then
6808
6809         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
6810 fi
6811
6812 if test -n "$cf_new_extra_cppflags" ; then
6813
6814         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
6815 fi
6816
6817         fi
6818
6819 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6820
6821 cf_save_CFLAGS="$CFLAGS"
6822 cf_save_CPPFLAGS="$CPPFLAGS"
6823
6824 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6825         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
6826                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
6827
6828 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6829         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
6830                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
6831
6832 echo "$as_me:6832: checking if we should define _POSIX_C_SOURCE" >&5
6833 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6834 if test "${cf_cv_posix_c_source+set}" = set; then
6835   echo $ECHO_N "(cached) $ECHO_C" >&6
6836 else
6837
6838 echo "${as_me-configure}:6838: testing if the symbol is already defined go no further ..." 1>&5
6839
6840         cat >conftest.$ac_ext <<_ACEOF
6841 #line 6841 "configure"
6842 #include "confdefs.h"
6843 #include <sys/types.h>
6844 int
6845 main ()
6846 {
6847
6848 #ifndef _POSIX_C_SOURCE
6849 make an error
6850 #endif
6851   ;
6852   return 0;
6853 }
6854 _ACEOF
6855 rm -f conftest.$ac_objext
6856 if { (eval echo "$as_me:6856: \"$ac_compile\"") >&5
6857   (eval $ac_compile) 2>&5
6858   ac_status=$?
6859   echo "$as_me:6859: \$? = $ac_status" >&5
6860   (exit $ac_status); } &&
6861          { ac_try='test -s conftest.$ac_objext'
6862   { (eval echo "$as_me:6862: \"$ac_try\"") >&5
6863   (eval $ac_try) 2>&5
6864   ac_status=$?
6865   echo "$as_me:6865: \$? = $ac_status" >&5
6866   (exit $ac_status); }; }; then
6867   cf_cv_posix_c_source=no
6868 else
6869   echo "$as_me: failed program was:" >&5
6870 cat conftest.$ac_ext >&5
6871 cf_want_posix_source=no
6872          case .$cf_POSIX_C_SOURCE in #(vi
6873          .[12]??*) #(vi
6874                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6875                 ;;
6876          .2) #(vi
6877                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6878                 cf_want_posix_source=yes
6879                 ;;
6880          .*)
6881                 cf_want_posix_source=yes
6882                 ;;
6883          esac
6884          if test "$cf_want_posix_source" = yes ; then
6885                 cat >conftest.$ac_ext <<_ACEOF
6886 #line 6886 "configure"
6887 #include "confdefs.h"
6888 #include <sys/types.h>
6889 int
6890 main ()
6891 {
6892
6893 #ifdef _POSIX_SOURCE
6894 make an error
6895 #endif
6896   ;
6897   return 0;
6898 }
6899 _ACEOF
6900 rm -f conftest.$ac_objext
6901 if { (eval echo "$as_me:6901: \"$ac_compile\"") >&5
6902   (eval $ac_compile) 2>&5
6903   ac_status=$?
6904   echo "$as_me:6904: \$? = $ac_status" >&5
6905   (exit $ac_status); } &&
6906          { ac_try='test -s conftest.$ac_objext'
6907   { (eval echo "$as_me:6907: \"$ac_try\"") >&5
6908   (eval $ac_try) 2>&5
6909   ac_status=$?
6910   echo "$as_me:6910: \$? = $ac_status" >&5
6911   (exit $ac_status); }; }; then
6912   :
6913 else
6914   echo "$as_me: failed program was:" >&5
6915 cat conftest.$ac_ext >&5
6916 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6917 fi
6918 rm -f conftest.$ac_objext conftest.$ac_ext
6919          fi
6920
6921 echo "${as_me-configure}:6921: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6922
6923          CFLAGS="$cf_trim_CFLAGS"
6924          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6925
6926 echo "${as_me-configure}:6926: testing if the second compile does not leave our definition intact error ..." 1>&5
6927
6928          cat >conftest.$ac_ext <<_ACEOF
6929 #line 6929 "configure"
6930 #include "confdefs.h"
6931 #include <sys/types.h>
6932 int
6933 main ()
6934 {
6935
6936 #ifndef _POSIX_C_SOURCE
6937 make an error
6938 #endif
6939   ;
6940   return 0;
6941 }
6942 _ACEOF
6943 rm -f conftest.$ac_objext
6944 if { (eval echo "$as_me:6944: \"$ac_compile\"") >&5
6945   (eval $ac_compile) 2>&5
6946   ac_status=$?
6947   echo "$as_me:6947: \$? = $ac_status" >&5
6948   (exit $ac_status); } &&
6949          { ac_try='test -s conftest.$ac_objext'
6950   { (eval echo "$as_me:6950: \"$ac_try\"") >&5
6951   (eval $ac_try) 2>&5
6952   ac_status=$?
6953   echo "$as_me:6953: \$? = $ac_status" >&5
6954   (exit $ac_status); }; }; then
6955   :
6956 else
6957   echo "$as_me: failed program was:" >&5
6958 cat conftest.$ac_ext >&5
6959 cf_cv_posix_c_source=no
6960 fi
6961 rm -f conftest.$ac_objext conftest.$ac_ext
6962          CFLAGS="$cf_save_CFLAGS"
6963          CPPFLAGS="$cf_save_CPPFLAGS"
6964
6965 fi
6966 rm -f conftest.$ac_objext conftest.$ac_ext
6967
6968 fi
6969 echo "$as_me:6969: result: $cf_cv_posix_c_source" >&5
6970 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6971
6972 if test "$cf_cv_posix_c_source" != no ; then
6973         CFLAGS="$cf_trim_CFLAGS"
6974         CPPFLAGS="$cf_trim_CPPFLAGS"
6975
6976 cf_fix_cppflags=no
6977 cf_new_cflags=
6978 cf_new_cppflags=
6979 cf_new_extra_cppflags=
6980
6981 for cf_add_cflags in $cf_cv_posix_c_source
6982 do
6983 case $cf_fix_cppflags in
6984 no)
6985         case $cf_add_cflags in #(vi
6986         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
6987                 case $cf_add_cflags in
6988                 -D*)
6989                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6990
6991                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
6992                                 && test -z "${cf_tst_cflags}" \
6993                                 && cf_fix_cppflags=yes
6994
6995                         if test $cf_fix_cppflags = yes ; then
6996                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6997                                 continue
6998                         elif test "${cf_tst_cflags}" = "\"'" ; then
6999                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7000                                 continue
7001                         fi
7002                         ;;
7003                 esac
7004                 case "$CPPFLAGS" in
7005                 *$cf_add_cflags) #(vi
7006                         ;;
7007                 *) #(vi
7008                         case $cf_add_cflags in #(vi
7009                         -D*)
7010                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7011
7012 CPPFLAGS=`echo "$CPPFLAGS" | \
7013         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7014                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7015
7016                                 ;;
7017                         esac
7018                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7019                         ;;
7020                 esac
7021                 ;;
7022         *)
7023                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7024                 ;;
7025         esac
7026         ;;
7027 yes)
7028         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7029
7030         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7031
7032         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7033                 && test -z "${cf_tst_cflags}" \
7034                 && cf_fix_cppflags=no
7035         ;;
7036 esac
7037 done
7038
7039 if test -n "$cf_new_cflags" ; then
7040
7041         CFLAGS="$CFLAGS $cf_new_cflags"
7042 fi
7043
7044 if test -n "$cf_new_cppflags" ; then
7045
7046         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7047 fi
7048
7049 if test -n "$cf_new_extra_cppflags" ; then
7050
7051         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7052 fi
7053
7054 fi
7055
7056         ;;
7057 esac
7058
7059 if test -n "$cf_xopen_source" ; then
7060
7061 cf_fix_cppflags=no
7062 cf_new_cflags=
7063 cf_new_cppflags=
7064 cf_new_extra_cppflags=
7065
7066 for cf_add_cflags in $cf_xopen_source
7067 do
7068 case $cf_fix_cppflags in
7069 no)
7070         case $cf_add_cflags in #(vi
7071         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7072                 case $cf_add_cflags in
7073                 -D*)
7074                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7075
7076                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7077                                 && test -z "${cf_tst_cflags}" \
7078                                 && cf_fix_cppflags=yes
7079
7080                         if test $cf_fix_cppflags = yes ; then
7081                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7082                                 continue
7083                         elif test "${cf_tst_cflags}" = "\"'" ; then
7084                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7085                                 continue
7086                         fi
7087                         ;;
7088                 esac
7089                 case "$CPPFLAGS" in
7090                 *$cf_add_cflags) #(vi
7091                         ;;
7092                 *) #(vi
7093                         case $cf_add_cflags in #(vi
7094                         -D*)
7095                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7096
7097 CPPFLAGS=`echo "$CPPFLAGS" | \
7098         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7099                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7100
7101                                 ;;
7102                         esac
7103                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7104                         ;;
7105                 esac
7106                 ;;
7107         *)
7108                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7109                 ;;
7110         esac
7111         ;;
7112 yes)
7113         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7114
7115         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7116
7117         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7118                 && test -z "${cf_tst_cflags}" \
7119                 && cf_fix_cppflags=no
7120         ;;
7121 esac
7122 done
7123
7124 if test -n "$cf_new_cflags" ; then
7125
7126         CFLAGS="$CFLAGS $cf_new_cflags"
7127 fi
7128
7129 if test -n "$cf_new_cppflags" ; then
7130
7131         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7132 fi
7133
7134 if test -n "$cf_new_extra_cppflags" ; then
7135
7136         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7137 fi
7138
7139 fi
7140
7141 # Work around breakage on OS X
7142
7143 echo "$as_me:7143: checking if SIGWINCH is defined" >&5
7144 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
7145 if test "${cf_cv_define_sigwinch+set}" = set; then
7146   echo $ECHO_N "(cached) $ECHO_C" >&6
7147 else
7148
7149         cat >conftest.$ac_ext <<_ACEOF
7150 #line 7150 "configure"
7151 #include "confdefs.h"
7152
7153 #include <sys/types.h>
7154 #include <sys/signal.h>
7155
7156 int
7157 main ()
7158 {
7159 int x = SIGWINCH
7160   ;
7161   return 0;
7162 }
7163 _ACEOF
7164 rm -f conftest.$ac_objext
7165 if { (eval echo "$as_me:7165: \"$ac_compile\"") >&5
7166   (eval $ac_compile) 2>&5
7167   ac_status=$?
7168   echo "$as_me:7168: \$? = $ac_status" >&5
7169   (exit $ac_status); } &&
7170          { ac_try='test -s conftest.$ac_objext'
7171   { (eval echo "$as_me:7171: \"$ac_try\"") >&5
7172   (eval $ac_try) 2>&5
7173   ac_status=$?
7174   echo "$as_me:7174: \$? = $ac_status" >&5
7175   (exit $ac_status); }; }; then
7176   cf_cv_define_sigwinch=yes
7177 else
7178   echo "$as_me: failed program was:" >&5
7179 cat conftest.$ac_ext >&5
7180 cat >conftest.$ac_ext <<_ACEOF
7181 #line 7181 "configure"
7182 #include "confdefs.h"
7183
7184 #undef _XOPEN_SOURCE
7185 #undef _POSIX_SOURCE
7186 #undef _POSIX_C_SOURCE
7187 #include <sys/types.h>
7188 #include <sys/signal.h>
7189
7190 int
7191 main ()
7192 {
7193 int x = SIGWINCH
7194   ;
7195   return 0;
7196 }
7197 _ACEOF
7198 rm -f conftest.$ac_objext
7199 if { (eval echo "$as_me:7199: \"$ac_compile\"") >&5
7200   (eval $ac_compile) 2>&5
7201   ac_status=$?
7202   echo "$as_me:7202: \$? = $ac_status" >&5
7203   (exit $ac_status); } &&
7204          { ac_try='test -s conftest.$ac_objext'
7205   { (eval echo "$as_me:7205: \"$ac_try\"") >&5
7206   (eval $ac_try) 2>&5
7207   ac_status=$?
7208   echo "$as_me:7208: \$? = $ac_status" >&5
7209   (exit $ac_status); }; }; then
7210   cf_cv_define_sigwinch=maybe
7211 else
7212   echo "$as_me: failed program was:" >&5
7213 cat conftest.$ac_ext >&5
7214 cf_cv_define_sigwinch=no
7215 fi
7216 rm -f conftest.$ac_objext conftest.$ac_ext
7217
7218 fi
7219 rm -f conftest.$ac_objext conftest.$ac_ext
7220
7221 fi
7222 echo "$as_me:7222: result: $cf_cv_define_sigwinch" >&5
7223 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
7224
7225 if test "$cf_cv_define_sigwinch" = maybe ; then
7226 echo "$as_me:7226: checking for actual SIGWINCH definition" >&5
7227 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
7228 if test "${cf_cv_fixup_sigwinch+set}" = set; then
7229   echo $ECHO_N "(cached) $ECHO_C" >&6
7230 else
7231
7232 cf_cv_fixup_sigwinch=unknown
7233 cf_sigwinch=32
7234 while test $cf_sigwinch != 1
7235 do
7236         cat >conftest.$ac_ext <<_ACEOF
7237 #line 7237 "configure"
7238 #include "confdefs.h"
7239
7240 #undef _XOPEN_SOURCE
7241 #undef _POSIX_SOURCE
7242 #undef _POSIX_C_SOURCE
7243 #include <sys/types.h>
7244 #include <sys/signal.h>
7245
7246 int
7247 main ()
7248 {
7249
7250 #if SIGWINCH != $cf_sigwinch
7251 make an error
7252 #endif
7253 int x = SIGWINCH
7254   ;
7255   return 0;
7256 }
7257 _ACEOF
7258 rm -f conftest.$ac_objext
7259 if { (eval echo "$as_me:7259: \"$ac_compile\"") >&5
7260   (eval $ac_compile) 2>&5
7261   ac_status=$?
7262   echo "$as_me:7262: \$? = $ac_status" >&5
7263   (exit $ac_status); } &&
7264          { ac_try='test -s conftest.$ac_objext'
7265   { (eval echo "$as_me:7265: \"$ac_try\"") >&5
7266   (eval $ac_try) 2>&5
7267   ac_status=$?
7268   echo "$as_me:7268: \$? = $ac_status" >&5
7269   (exit $ac_status); }; }; then
7270   cf_cv_fixup_sigwinch=$cf_sigwinch
7271          break
7272 else
7273   echo "$as_me: failed program was:" >&5
7274 cat conftest.$ac_ext >&5
7275 fi
7276 rm -f conftest.$ac_objext conftest.$ac_ext
7277
7278 cf_sigwinch=`expr $cf_sigwinch - 1`
7279 done
7280
7281 fi
7282 echo "$as_me:7282: result: $cf_cv_fixup_sigwinch" >&5
7283 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
7284
7285         if test "$cf_cv_fixup_sigwinch" != unknown ; then
7286                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
7287         fi
7288 fi
7289
7290 # Checks for CODESET support.
7291
7292   echo "$as_me:7292: checking for nl_langinfo and CODESET" >&5
7293 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
7294 if test "${am_cv_langinfo_codeset+set}" = set; then
7295   echo $ECHO_N "(cached) $ECHO_C" >&6
7296 else
7297   cat >conftest.$ac_ext <<_ACEOF
7298 #line 7298 "configure"
7299 #include "confdefs.h"
7300 #include <langinfo.h>
7301 int
7302 main ()
7303 {
7304 char* cs = nl_langinfo(CODESET);
7305   ;
7306   return 0;
7307 }
7308 _ACEOF
7309 rm -f conftest.$ac_objext conftest$ac_exeext
7310 if { (eval echo "$as_me:7310: \"$ac_link\"") >&5
7311   (eval $ac_link) 2>&5
7312   ac_status=$?
7313   echo "$as_me:7313: \$? = $ac_status" >&5
7314   (exit $ac_status); } &&
7315          { ac_try='test -s conftest$ac_exeext'
7316   { (eval echo "$as_me:7316: \"$ac_try\"") >&5
7317   (eval $ac_try) 2>&5
7318   ac_status=$?
7319   echo "$as_me:7319: \$? = $ac_status" >&5
7320   (exit $ac_status); }; }; then
7321   am_cv_langinfo_codeset=yes
7322 else
7323   echo "$as_me: failed program was:" >&5
7324 cat conftest.$ac_ext >&5
7325 am_cv_langinfo_codeset=no
7326 fi
7327 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7328
7329 fi
7330 echo "$as_me:7330: result: $am_cv_langinfo_codeset" >&5
7331 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
7332   if test $am_cv_langinfo_codeset = yes; then
7333
7334 cat >>confdefs.h <<\EOF
7335 #define HAVE_LANGINFO_CODESET 1
7336 EOF
7337
7338   fi
7339
7340 # use these variables to work around a defect in gcc's fixincludes.
7341 NCURSES_OK_WCHAR_T=
7342 NCURSES_OK_WINT_T=
7343
7344 echo "$as_me:7344: checking if you want wide-character code" >&5
7345 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
7346
7347 # Check whether --enable-widec or --disable-widec was given.
7348 if test "${enable_widec+set}" = set; then
7349   enableval="$enable_widec"
7350   with_widec=$enableval
7351 else
7352   with_widec=no
7353 fi;
7354 echo "$as_me:7354: result: $with_widec" >&5
7355 echo "${ECHO_T}$with_widec" >&6
7356 if test "$with_widec" = yes ; then
7357         LIB_SUFFIX="w${LIB_SUFFIX}"
7358         cat >>confdefs.h <<\EOF
7359 #define USE_WIDEC_SUPPORT 1
7360 EOF
7361
7362 echo "$as_me:7362: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
7363 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
7364 cat >conftest.$ac_ext <<_ACEOF
7365 #line 7365 "configure"
7366 #include "confdefs.h"
7367 #include <sys/types.h>
7368
7369 int
7370 main ()
7371 {
7372
7373 #ifndef _XOPEN_SOURCE_EXTENDED
7374 make an error
7375 #endif
7376   ;
7377   return 0;
7378 }
7379 _ACEOF
7380 rm -f conftest.$ac_objext
7381 if { (eval echo "$as_me:7381: \"$ac_compile\"") >&5
7382   (eval $ac_compile) 2>&5
7383   ac_status=$?
7384   echo "$as_me:7384: \$? = $ac_status" >&5
7385   (exit $ac_status); } &&
7386          { ac_try='test -s conftest.$ac_objext'
7387   { (eval echo "$as_me:7387: \"$ac_try\"") >&5
7388   (eval $ac_try) 2>&5
7389   ac_status=$?
7390   echo "$as_me:7390: \$? = $ac_status" >&5
7391   (exit $ac_status); }; }; then
7392   cf_result=no
7393 else
7394   echo "$as_me: failed program was:" >&5
7395 cat conftest.$ac_ext >&5
7396 cf_result=yes
7397 fi
7398 rm -f conftest.$ac_objext conftest.$ac_ext
7399 echo "$as_me:7399: result: $cf_result" >&5
7400 echo "${ECHO_T}$cf_result" >&6
7401
7402 if test "$cf_result" = yes ; then
7403         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
7404 elif test "x" != "x" ; then
7405         echo "$as_me:7405: checking checking for compatible value versus " >&5
7406 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
7407         cat >conftest.$ac_ext <<_ACEOF
7408 #line 7408 "configure"
7409 #include "confdefs.h"
7410 #include <sys/types.h>
7411
7412 int
7413 main ()
7414 {
7415
7416 #if _XOPEN_SOURCE_EXTENDED- < 0
7417 make an error
7418 #endif
7419   ;
7420   return 0;
7421 }
7422 _ACEOF
7423 rm -f conftest.$ac_objext
7424 if { (eval echo "$as_me:7424: \"$ac_compile\"") >&5
7425   (eval $ac_compile) 2>&5
7426   ac_status=$?
7427   echo "$as_me:7427: \$? = $ac_status" >&5
7428   (exit $ac_status); } &&
7429          { ac_try='test -s conftest.$ac_objext'
7430   { (eval echo "$as_me:7430: \"$ac_try\"") >&5
7431   (eval $ac_try) 2>&5
7432   ac_status=$?
7433   echo "$as_me:7433: \$? = $ac_status" >&5
7434   (exit $ac_status); }; }; then
7435   cf_result=yes
7436 else
7437   echo "$as_me: failed program was:" >&5
7438 cat conftest.$ac_ext >&5
7439 cf_result=no
7440 fi
7441 rm -f conftest.$ac_objext conftest.$ac_ext
7442         echo "$as_me:7442: result: $cf_result" >&5
7443 echo "${ECHO_T}$cf_result" >&6
7444         if test "$cf_result" = no ; then
7445                 # perhaps we can override it - try...
7446                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
7447         fi
7448 fi
7449
7450         # with_overwrite=no
7451         NCURSES_CH_T=cchar_t
7452
7453 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
7454 do
7455 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7456 echo "$as_me:7456: checking for $ac_func" >&5
7457 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7458 if eval "test \"\${$as_ac_var+set}\" = set"; then
7459   echo $ECHO_N "(cached) $ECHO_C" >&6
7460 else
7461   cat >conftest.$ac_ext <<_ACEOF
7462 #line 7462 "configure"
7463 #include "confdefs.h"
7464 /* System header to define __stub macros and hopefully few prototypes,
7465     which can conflict with char $ac_func (); below.  */
7466 #include <assert.h>
7467 /* Override any gcc2 internal prototype to avoid an error.  */
7468 #ifdef __cplusplus
7469 extern "C"
7470 #endif
7471 /* We use char because int might match the return type of a gcc2
7472    builtin and then its argument prototype would still apply.  */
7473 char $ac_func ();
7474 char (*f) ();
7475
7476 int
7477 main ()
7478 {
7479 /* The GNU C library defines this for functions which it implements
7480     to always fail with ENOSYS.  Some functions are actually named
7481     something starting with __ and the normal name is an alias.  */
7482 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7483 choke me
7484 #else
7485 f = $ac_func;
7486 #endif
7487
7488   ;
7489   return 0;
7490 }
7491 _ACEOF
7492 rm -f conftest.$ac_objext conftest$ac_exeext
7493 if { (eval echo "$as_me:7493: \"$ac_link\"") >&5
7494   (eval $ac_link) 2>&5
7495   ac_status=$?
7496   echo "$as_me:7496: \$? = $ac_status" >&5
7497   (exit $ac_status); } &&
7498          { ac_try='test -s conftest$ac_exeext'
7499   { (eval echo "$as_me:7499: \"$ac_try\"") >&5
7500   (eval $ac_try) 2>&5
7501   ac_status=$?
7502   echo "$as_me:7502: \$? = $ac_status" >&5
7503   (exit $ac_status); }; }; then
7504   eval "$as_ac_var=yes"
7505 else
7506   echo "$as_me: failed program was:" >&5
7507 cat conftest.$ac_ext >&5
7508 eval "$as_ac_var=no"
7509 fi
7510 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7511 fi
7512 echo "$as_me:7512: result: `eval echo '${'$as_ac_var'}'`" >&5
7513 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7514 if test `eval echo '${'$as_ac_var'}'` = yes; then
7515   cat >>confdefs.h <<EOF
7516 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7517 EOF
7518
7519 fi
7520 done
7521
7522         if test "$ac_cv_func_putwc" != yes ; then
7523
7524 echo "$as_me:7524: checking for multibyte character support" >&5
7525 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7526 if test "${cf_cv_utf8_lib+set}" = set; then
7527   echo $ECHO_N "(cached) $ECHO_C" >&6
7528 else
7529
7530         cf_save_LIBS="$LIBS"
7531         cat >conftest.$ac_ext <<_ACEOF
7532 #line 7532 "configure"
7533 #include "confdefs.h"
7534
7535 #include <stdlib.h>
7536 int
7537 main ()
7538 {
7539 putwc(0,0);
7540   ;
7541   return 0;
7542 }
7543 _ACEOF
7544 rm -f conftest.$ac_objext conftest$ac_exeext
7545 if { (eval echo "$as_me:7545: \"$ac_link\"") >&5
7546   (eval $ac_link) 2>&5
7547   ac_status=$?
7548   echo "$as_me:7548: \$? = $ac_status" >&5
7549   (exit $ac_status); } &&
7550          { ac_try='test -s conftest$ac_exeext'
7551   { (eval echo "$as_me:7551: \"$ac_try\"") >&5
7552   (eval $ac_try) 2>&5
7553   ac_status=$?
7554   echo "$as_me:7554: \$? = $ac_status" >&5
7555   (exit $ac_status); }; }; then
7556   cf_cv_utf8_lib=yes
7557 else
7558   echo "$as_me: failed program was:" >&5
7559 cat conftest.$ac_ext >&5
7560
7561 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7562 # will be set on completion of the AC_TRY_LINK below.
7563 cf_cv_header_path_utf8=
7564 cf_cv_library_path_utf8=
7565
7566 echo "${as_me-configure}:7566: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7567
7568 cat >conftest.$ac_ext <<_ACEOF
7569 #line 7569 "configure"
7570 #include "confdefs.h"
7571
7572 #include <libutf8.h>
7573 int
7574 main ()
7575 {
7576 putwc(0,0);
7577   ;
7578   return 0;
7579 }
7580 _ACEOF
7581 rm -f conftest.$ac_objext conftest$ac_exeext
7582 if { (eval echo "$as_me:7582: \"$ac_link\"") >&5
7583   (eval $ac_link) 2>&5
7584   ac_status=$?
7585   echo "$as_me:7585: \$? = $ac_status" >&5
7586   (exit $ac_status); } &&
7587          { ac_try='test -s conftest$ac_exeext'
7588   { (eval echo "$as_me:7588: \"$ac_try\"") >&5
7589   (eval $ac_try) 2>&5
7590   ac_status=$?
7591   echo "$as_me:7591: \$? = $ac_status" >&5
7592   (exit $ac_status); }; }; then
7593
7594         cf_cv_find_linkage_utf8=yes
7595
7596 else
7597   echo "$as_me: failed program was:" >&5
7598 cat conftest.$ac_ext >&5
7599
7600 cf_save_LIBS="$LIBS"
7601 LIBS="-lutf8  $cf_save_LIBS"
7602
7603 cat >conftest.$ac_ext <<_ACEOF
7604 #line 7604 "configure"
7605 #include "confdefs.h"
7606
7607 #include <libutf8.h>
7608 int
7609 main ()
7610 {
7611 putwc(0,0);
7612   ;
7613   return 0;
7614 }
7615 _ACEOF
7616 rm -f conftest.$ac_objext conftest$ac_exeext
7617 if { (eval echo "$as_me:7617: \"$ac_link\"") >&5
7618   (eval $ac_link) 2>&5
7619   ac_status=$?
7620   echo "$as_me:7620: \$? = $ac_status" >&5
7621   (exit $ac_status); } &&
7622          { ac_try='test -s conftest$ac_exeext'
7623   { (eval echo "$as_me:7623: \"$ac_try\"") >&5
7624   (eval $ac_try) 2>&5
7625   ac_status=$?
7626   echo "$as_me:7626: \$? = $ac_status" >&5
7627   (exit $ac_status); }; }; then
7628
7629         cf_cv_find_linkage_utf8=yes
7630
7631 else
7632   echo "$as_me: failed program was:" >&5
7633 cat conftest.$ac_ext >&5
7634
7635     cf_cv_find_linkage_utf8=no
7636         LIBS="$cf_save_LIBS"
7637
7638     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
7639
7640 echo "${as_me-configure}:7640: testing find linkage for utf8 library ..." 1>&5
7641
7642 echo "${as_me-configure}:7642: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7643
7644     cf_save_CPPFLAGS="$CPPFLAGS"
7645     cf_test_CPPFLAGS="$CPPFLAGS"
7646
7647 cf_search=
7648 cf_header_path_list=""
7649 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7650         for cf_header_path in $CPPFLAGS $CFLAGS
7651         do
7652                 case $cf_header_path in #(vi
7653                 -I*)
7654                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7655
7656 test "$cf_header_path" != "NONE" && \
7657 test -d "$cf_header_path" && \
7658  {
7659         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
7660         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
7661         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
7662         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
7663         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
7664         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7665 }
7666
7667                         cf_header_path_list="$cf_header_path_list $cf_search"
7668                         ;;
7669                 esac
7670         done
7671 fi
7672
7673 cf_search=""
7674
7675 test "/usr" != "$prefix" && \
7676 test -d "/usr" && \
7677 (test $prefix = NONE || test -d $prefix) && {
7678         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
7679         test -d /usr/include &&          cf_search="$cf_search /usr/include"
7680         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
7681         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
7682         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
7683         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
7684 }
7685
7686 test "$prefix" != "NONE" && \
7687 test -d "$prefix" && \
7688  {
7689         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
7690         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
7691         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
7692         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
7693         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
7694         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
7695 }
7696
7697 test "/usr/local" != "$prefix" && \
7698 test -d "/usr/local" && \
7699 (test $prefix = NONE || test -d $prefix) && {
7700         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
7701         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
7702         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
7703         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
7704         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
7705         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
7706 }
7707
7708 test "/opt" != "$prefix" && \
7709 test -d "/opt" && \
7710 (test $prefix = NONE || test -d $prefix) && {
7711         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
7712         test -d /opt/include &&          cf_search="$cf_search /opt/include"
7713         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
7714         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
7715         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
7716         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
7717 }
7718
7719 test "$HOME" != "$prefix" && \
7720 test -d "$HOME" && \
7721 (test $prefix = NONE || test -d $prefix) && {
7722         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
7723         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
7724         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
7725         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
7726         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
7727         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
7728 }
7729
7730 test "$includedir" != NONE && \
7731 test "$includedir" != "/usr/include" && \
7732 test -d "$includedir" && {
7733         test -d $includedir &&    cf_search="$cf_search $includedir"
7734         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7735 }
7736
7737 test "$oldincludedir" != NONE && \
7738 test "$oldincludedir" != "/usr/include" && \
7739 test -d "$oldincludedir" && {
7740         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
7741         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7742 }
7743
7744 cf_search="$cf_header_path_list $cf_search"
7745
7746     for cf_cv_header_path_utf8 in $cf_search
7747     do
7748       if test -d $cf_cv_header_path_utf8 ; then
7749         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
7750
7751 echo "${as_me-configure}:7751: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7752
7753         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
7754         cat >conftest.$ac_ext <<_ACEOF
7755 #line 7755 "configure"
7756 #include "confdefs.h"
7757
7758 #include <libutf8.h>
7759 int
7760 main ()
7761 {
7762 putwc(0,0);
7763   ;
7764   return 0;
7765 }
7766 _ACEOF
7767 rm -f conftest.$ac_objext
7768 if { (eval echo "$as_me:7768: \"$ac_compile\"") >&5
7769   (eval $ac_compile) 2>&5
7770   ac_status=$?
7771   echo "$as_me:7771: \$? = $ac_status" >&5
7772   (exit $ac_status); } &&
7773          { ac_try='test -s conftest.$ac_objext'
7774   { (eval echo "$as_me:7774: \"$ac_try\"") >&5
7775   (eval $ac_try) 2>&5
7776   ac_status=$?
7777   echo "$as_me:7777: \$? = $ac_status" >&5
7778   (exit $ac_status); }; }; then
7779
7780             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7781
7782 echo "${as_me-configure}:7782: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7783
7784             cf_cv_find_linkage_utf8=maybe
7785             cf_test_CPPFLAGS="$CPPFLAGS"
7786             break
7787 else
7788   echo "$as_me: failed program was:" >&5
7789 cat conftest.$ac_ext >&5
7790
7791             CPPFLAGS="$cf_save_CPPFLAGS"
7792
7793 fi
7794 rm -f conftest.$ac_objext conftest.$ac_ext
7795       fi
7796     done
7797
7798     if test "$cf_cv_find_linkage_utf8" = maybe ; then
7799
7800 echo "${as_me-configure}:7800: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7801
7802       cf_save_LIBS="$LIBS"
7803       cf_save_LDFLAGS="$LDFLAGS"
7804
7805       if test "$cf_cv_find_linkage_utf8" != yes ; then
7806
7807 cf_library_path_list=""
7808 if test -n "${LDFLAGS}${LIBS}" ; then
7809         for cf_library_path in $LDFLAGS $LIBS
7810         do
7811                 case $cf_library_path in #(vi
7812                 -L*)
7813                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7814
7815 test "$cf_library_path" != "NONE" && \
7816 test -d "$cf_library_path" && \
7817  {
7818         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7819         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7820         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
7821         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7822         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
7823         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7824 }
7825
7826                         cf_library_path_list="$cf_library_path_list $cf_search"
7827                         ;;
7828                 esac
7829         done
7830 fi
7831
7832 cf_search=""
7833
7834 test "/usr" != "$prefix" && \
7835 test -d "/usr" && \
7836 (test $prefix = NONE || test -d $prefix) && {
7837         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7838         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7839         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
7840         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
7841         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
7842         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
7843 }
7844
7845 test "$prefix" != "NONE" && \
7846 test -d "$prefix" && \
7847  {
7848         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7849         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7850         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
7851         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
7852         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
7853         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
7854 }
7855
7856 test "/usr/local" != "$prefix" && \
7857 test -d "/usr/local" && \
7858 (test $prefix = NONE || test -d $prefix) && {
7859         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7860         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7861         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
7862         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
7863         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
7864         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
7865 }
7866
7867 test "/opt" != "$prefix" && \
7868 test -d "/opt" && \
7869 (test $prefix = NONE || test -d $prefix) && {
7870         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7871         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7872         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
7873         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
7874         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
7875         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
7876 }
7877
7878 test "$HOME" != "$prefix" && \
7879 test -d "$HOME" && \
7880 (test $prefix = NONE || test -d $prefix) && {
7881         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7882         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7883         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
7884         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
7885         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
7886         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
7887 }
7888
7889 cf_search="$cf_library_path_list $cf_search"
7890
7891         for cf_cv_library_path_utf8 in $cf_search
7892         do
7893           if test -d $cf_cv_library_path_utf8 ; then
7894             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
7895
7896 echo "${as_me-configure}:7896: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7897
7898             CPPFLAGS="$cf_test_CPPFLAGS"
7899             LIBS="-lutf8  $cf_save_LIBS"
7900             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7901             cat >conftest.$ac_ext <<_ACEOF
7902 #line 7902 "configure"
7903 #include "confdefs.h"
7904
7905 #include <libutf8.h>
7906 int
7907 main ()
7908 {
7909 putwc(0,0);
7910   ;
7911   return 0;
7912 }
7913 _ACEOF
7914 rm -f conftest.$ac_objext conftest$ac_exeext
7915 if { (eval echo "$as_me:7915: \"$ac_link\"") >&5
7916   (eval $ac_link) 2>&5
7917   ac_status=$?
7918   echo "$as_me:7918: \$? = $ac_status" >&5
7919   (exit $ac_status); } &&
7920          { ac_try='test -s conftest$ac_exeext'
7921   { (eval echo "$as_me:7921: \"$ac_try\"") >&5
7922   (eval $ac_try) 2>&5
7923   ac_status=$?
7924   echo "$as_me:7924: \$? = $ac_status" >&5
7925   (exit $ac_status); }; }; then
7926
7927                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7928
7929 echo "${as_me-configure}:7929: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7930
7931                 cf_cv_find_linkage_utf8=yes
7932                 cf_cv_library_file_utf8="-lutf8"
7933                 break
7934 else
7935   echo "$as_me: failed program was:" >&5
7936 cat conftest.$ac_ext >&5
7937
7938                 CPPFLAGS="$cf_save_CPPFLAGS"
7939                 LIBS="$cf_save_LIBS"
7940                 LDFLAGS="$cf_save_LDFLAGS"
7941
7942 fi
7943 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7944           fi
7945         done
7946         LIBS="$cf_save_LIBS"
7947         CPPFLAGS="$cf_save_CPPFLAGS"
7948         LDFLAGS="$cf_save_LDFLAGS"
7949       fi
7950
7951     else
7952       cf_cv_find_linkage_utf8=no
7953     fi
7954
7955 fi
7956 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7957
7958 fi
7959 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7960
7961 if test "$cf_cv_find_linkage_utf8" = yes ; then
7962 cf_cv_utf8_lib=add-on
7963 else
7964 cf_cv_utf8_lib=no
7965 fi
7966
7967 fi
7968 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7969 fi
7970 echo "$as_me:7970: result: $cf_cv_utf8_lib" >&5
7971 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7972
7973 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7974 # ncurses/ncursesw:
7975 if test "$cf_cv_utf8_lib" = "add-on" ; then
7976         cat >>confdefs.h <<\EOF
7977 #define HAVE_LIBUTF8_H 1
7978 EOF
7979
7980 if test -n "$cf_cv_header_path_utf8" ; then
7981   for cf_add_incdir in $cf_cv_header_path_utf8
7982   do
7983         while test $cf_add_incdir != /usr/include
7984         do
7985           if test -d $cf_add_incdir
7986           then
7987                 cf_have_incdir=no
7988                 if test -n "$CFLAGS$CPPFLAGS" ; then
7989                   # a loop is needed to ensure we can add subdirs of existing dirs
7990                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7991                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7992                           cf_have_incdir=yes; break
7993                         fi
7994                   done
7995                 fi
7996
7997                 if test "$cf_have_incdir" = no ; then
7998                   if test "$cf_add_incdir" = /usr/local/include ; then
7999                         if test "$GCC" = yes
8000                         then
8001                           cf_save_CPPFLAGS=$CPPFLAGS
8002                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8003                           cat >conftest.$ac_ext <<_ACEOF
8004 #line 8004 "configure"
8005 #include "confdefs.h"
8006 #include <stdio.h>
8007 int
8008 main ()
8009 {
8010 printf("Hello")
8011   ;
8012   return 0;
8013 }
8014 _ACEOF
8015 rm -f conftest.$ac_objext
8016 if { (eval echo "$as_me:8016: \"$ac_compile\"") >&5
8017   (eval $ac_compile) 2>&5
8018   ac_status=$?
8019   echo "$as_me:8019: \$? = $ac_status" >&5
8020   (exit $ac_status); } &&
8021          { ac_try='test -s conftest.$ac_objext'
8022   { (eval echo "$as_me:8022: \"$ac_try\"") >&5
8023   (eval $ac_try) 2>&5
8024   ac_status=$?
8025   echo "$as_me:8025: \$? = $ac_status" >&5
8026   (exit $ac_status); }; }; then
8027   :
8028 else
8029   echo "$as_me: failed program was:" >&5
8030 cat conftest.$ac_ext >&5
8031 cf_have_incdir=yes
8032 fi
8033 rm -f conftest.$ac_objext conftest.$ac_ext
8034                           CPPFLAGS=$cf_save_CPPFLAGS
8035                         fi
8036                   fi
8037                 fi
8038
8039                 if test "$cf_have_incdir" = no ; then
8040                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8041
8042 echo "${as_me-configure}:8042: testing adding $cf_add_incdir to include-path ..." 1>&5
8043
8044                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8045
8046                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8047                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8048                   cf_add_incdir="$cf_top_incdir"
8049                 else
8050                   break
8051                 fi
8052           fi
8053         done
8054   done
8055 fi
8056
8057 if test -n "$cf_cv_library_path_utf8" ; then
8058   for cf_add_libdir in $cf_cv_library_path_utf8
8059   do
8060     if test $cf_add_libdir = /usr/lib ; then
8061       :
8062     elif test -d $cf_add_libdir
8063     then
8064       cf_have_libdir=no
8065       if test -n "$LDFLAGS$LIBS" ; then
8066         # a loop is needed to ensure we can add subdirs of existing dirs
8067         for cf_test_libdir in $LDFLAGS $LIBS ; do
8068           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8069             cf_have_libdir=yes; break
8070           fi
8071         done
8072       fi
8073       if test "$cf_have_libdir" = no ; then
8074         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
8075
8076 echo "${as_me-configure}:8076: testing adding $cf_add_libdir to library-path ..." 1>&5
8077
8078         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8079       fi
8080     fi
8081   done
8082 fi
8083
8084         LIBS="-lutf8 $LIBS"
8085 fi
8086
8087                 if test "$cf_cv_utf8_lib" != no ; then
8088                         NCURSES_LIBUTF8=1
8089                 fi
8090         fi
8091
8092 # This is needed on Tru64 5.0 to declare mbstate_t
8093 echo "$as_me:8093: checking if we must include wchar.h to declare mbstate_t" >&5
8094 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
8095 if test "${cf_cv_mbstate_t+set}" = set; then
8096   echo $ECHO_N "(cached) $ECHO_C" >&6
8097 else
8098
8099 cat >conftest.$ac_ext <<_ACEOF
8100 #line 8100 "configure"
8101 #include "confdefs.h"
8102
8103 #include <stdlib.h>
8104 #include <stdarg.h>
8105 #include <stdio.h>
8106 #ifdef HAVE_LIBUTF8_H
8107 #include <libutf8.h>
8108 #endif
8109 int
8110 main ()
8111 {
8112 mbstate_t state
8113   ;
8114   return 0;
8115 }
8116 _ACEOF
8117 rm -f conftest.$ac_objext
8118 if { (eval echo "$as_me:8118: \"$ac_compile\"") >&5
8119   (eval $ac_compile) 2>&5
8120   ac_status=$?
8121   echo "$as_me:8121: \$? = $ac_status" >&5
8122   (exit $ac_status); } &&
8123          { ac_try='test -s conftest.$ac_objext'
8124   { (eval echo "$as_me:8124: \"$ac_try\"") >&5
8125   (eval $ac_try) 2>&5
8126   ac_status=$?
8127   echo "$as_me:8127: \$? = $ac_status" >&5
8128   (exit $ac_status); }; }; then
8129   cf_cv_mbstate_t=no
8130 else
8131   echo "$as_me: failed program was:" >&5
8132 cat conftest.$ac_ext >&5
8133 cat >conftest.$ac_ext <<_ACEOF
8134 #line 8134 "configure"
8135 #include "confdefs.h"
8136
8137 #include <stdlib.h>
8138 #include <stdarg.h>
8139 #include <stdio.h>
8140 #include <wchar.h>
8141 #ifdef HAVE_LIBUTF8_H
8142 #include <libutf8.h>
8143 #endif
8144 int
8145 main ()
8146 {
8147 mbstate_t value
8148   ;
8149   return 0;
8150 }
8151 _ACEOF
8152 rm -f conftest.$ac_objext
8153 if { (eval echo "$as_me:8153: \"$ac_compile\"") >&5
8154   (eval $ac_compile) 2>&5
8155   ac_status=$?
8156   echo "$as_me:8156: \$? = $ac_status" >&5
8157   (exit $ac_status); } &&
8158          { ac_try='test -s conftest.$ac_objext'
8159   { (eval echo "$as_me:8159: \"$ac_try\"") >&5
8160   (eval $ac_try) 2>&5
8161   ac_status=$?
8162   echo "$as_me:8162: \$? = $ac_status" >&5
8163   (exit $ac_status); }; }; then
8164   cf_cv_mbstate_t=yes
8165 else
8166   echo "$as_me: failed program was:" >&5
8167 cat conftest.$ac_ext >&5
8168 cf_cv_mbstate_t=unknown
8169 fi
8170 rm -f conftest.$ac_objext conftest.$ac_ext
8171 fi
8172 rm -f conftest.$ac_objext conftest.$ac_ext
8173 fi
8174 echo "$as_me:8174: result: $cf_cv_mbstate_t" >&5
8175 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
8176
8177 if test "$cf_cv_mbstate_t" = yes ; then
8178         cat >>confdefs.h <<\EOF
8179 #define NEED_WCHAR_H 1
8180 EOF
8181
8182         NEED_WCHAR_H=1
8183 fi
8184
8185 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
8186 if test "$cf_cv_mbstate_t" = unknown ; then
8187         NCURSES_MBSTATE_T=1
8188 fi
8189
8190 # This is needed on Tru64 5.0 to declare wchar_t
8191 echo "$as_me:8191: checking if we must include wchar.h to declare wchar_t" >&5
8192 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
8193 if test "${cf_cv_wchar_t+set}" = set; then
8194   echo $ECHO_N "(cached) $ECHO_C" >&6
8195 else
8196
8197 cat >conftest.$ac_ext <<_ACEOF
8198 #line 8198 "configure"
8199 #include "confdefs.h"
8200
8201 #include <stdlib.h>
8202 #include <stdarg.h>
8203 #include <stdio.h>
8204 #ifdef HAVE_LIBUTF8_H
8205 #include <libutf8.h>
8206 #endif
8207 int
8208 main ()
8209 {
8210 wchar_t state
8211   ;
8212   return 0;
8213 }
8214 _ACEOF
8215 rm -f conftest.$ac_objext
8216 if { (eval echo "$as_me:8216: \"$ac_compile\"") >&5
8217   (eval $ac_compile) 2>&5
8218   ac_status=$?
8219   echo "$as_me:8219: \$? = $ac_status" >&5
8220   (exit $ac_status); } &&
8221          { ac_try='test -s conftest.$ac_objext'
8222   { (eval echo "$as_me:8222: \"$ac_try\"") >&5
8223   (eval $ac_try) 2>&5
8224   ac_status=$?
8225   echo "$as_me:8225: \$? = $ac_status" >&5
8226   (exit $ac_status); }; }; then
8227   cf_cv_wchar_t=no
8228 else
8229   echo "$as_me: failed program was:" >&5
8230 cat conftest.$ac_ext >&5
8231 cat >conftest.$ac_ext <<_ACEOF
8232 #line 8232 "configure"
8233 #include "confdefs.h"
8234
8235 #include <stdlib.h>
8236 #include <stdarg.h>
8237 #include <stdio.h>
8238 #include <wchar.h>
8239 #ifdef HAVE_LIBUTF8_H
8240 #include <libutf8.h>
8241 #endif
8242 int
8243 main ()
8244 {
8245 wchar_t value
8246   ;
8247   return 0;
8248 }
8249 _ACEOF
8250 rm -f conftest.$ac_objext
8251 if { (eval echo "$as_me:8251: \"$ac_compile\"") >&5
8252   (eval $ac_compile) 2>&5
8253   ac_status=$?
8254   echo "$as_me:8254: \$? = $ac_status" >&5
8255   (exit $ac_status); } &&
8256          { ac_try='test -s conftest.$ac_objext'
8257   { (eval echo "$as_me:8257: \"$ac_try\"") >&5
8258   (eval $ac_try) 2>&5
8259   ac_status=$?
8260   echo "$as_me:8260: \$? = $ac_status" >&5
8261   (exit $ac_status); }; }; then
8262   cf_cv_wchar_t=yes
8263 else
8264   echo "$as_me: failed program was:" >&5
8265 cat conftest.$ac_ext >&5
8266 cf_cv_wchar_t=unknown
8267 fi
8268 rm -f conftest.$ac_objext conftest.$ac_ext
8269 fi
8270 rm -f conftest.$ac_objext conftest.$ac_ext
8271 fi
8272 echo "$as_me:8272: result: $cf_cv_wchar_t" >&5
8273 echo "${ECHO_T}$cf_cv_wchar_t" >&6
8274
8275 if test "$cf_cv_wchar_t" = yes ; then
8276         cat >>confdefs.h <<\EOF
8277 #define NEED_WCHAR_H 1
8278 EOF
8279
8280         NEED_WCHAR_H=1
8281 fi
8282
8283 # if we do not find wchar_t in either place, use substitution to provide a fallback.
8284 if test "$cf_cv_wchar_t" = unknown ; then
8285         NCURSES_WCHAR_T=1
8286 fi
8287
8288 # if we find wchar_t in either place, use substitution to provide a fallback.
8289 if test "$cf_cv_wchar_t" != unknown ; then
8290         NCURSES_OK_WCHAR_T=1
8291 fi
8292
8293 # This is needed on Tru64 5.0 to declare wint_t
8294 echo "$as_me:8294: checking if we must include wchar.h to declare wint_t" >&5
8295 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
8296 if test "${cf_cv_wint_t+set}" = set; then
8297   echo $ECHO_N "(cached) $ECHO_C" >&6
8298 else
8299
8300 cat >conftest.$ac_ext <<_ACEOF
8301 #line 8301 "configure"
8302 #include "confdefs.h"
8303
8304 #include <stdlib.h>
8305 #include <stdarg.h>
8306 #include <stdio.h>
8307 #ifdef HAVE_LIBUTF8_H
8308 #include <libutf8.h>
8309 #endif
8310 int
8311 main ()
8312 {
8313 wint_t state
8314   ;
8315   return 0;
8316 }
8317 _ACEOF
8318 rm -f conftest.$ac_objext
8319 if { (eval echo "$as_me:8319: \"$ac_compile\"") >&5
8320   (eval $ac_compile) 2>&5
8321   ac_status=$?
8322   echo "$as_me:8322: \$? = $ac_status" >&5
8323   (exit $ac_status); } &&
8324          { ac_try='test -s conftest.$ac_objext'
8325   { (eval echo "$as_me:8325: \"$ac_try\"") >&5
8326   (eval $ac_try) 2>&5
8327   ac_status=$?
8328   echo "$as_me:8328: \$? = $ac_status" >&5
8329   (exit $ac_status); }; }; then
8330   cf_cv_wint_t=no
8331 else
8332   echo "$as_me: failed program was:" >&5
8333 cat conftest.$ac_ext >&5
8334 cat >conftest.$ac_ext <<_ACEOF
8335 #line 8335 "configure"
8336 #include "confdefs.h"
8337
8338 #include <stdlib.h>
8339 #include <stdarg.h>
8340 #include <stdio.h>
8341 #include <wchar.h>
8342 #ifdef HAVE_LIBUTF8_H
8343 #include <libutf8.h>
8344 #endif
8345 int
8346 main ()
8347 {
8348 wint_t value
8349   ;
8350   return 0;
8351 }
8352 _ACEOF
8353 rm -f conftest.$ac_objext
8354 if { (eval echo "$as_me:8354: \"$ac_compile\"") >&5
8355   (eval $ac_compile) 2>&5
8356   ac_status=$?
8357   echo "$as_me:8357: \$? = $ac_status" >&5
8358   (exit $ac_status); } &&
8359          { ac_try='test -s conftest.$ac_objext'
8360   { (eval echo "$as_me:8360: \"$ac_try\"") >&5
8361   (eval $ac_try) 2>&5
8362   ac_status=$?
8363   echo "$as_me:8363: \$? = $ac_status" >&5
8364   (exit $ac_status); }; }; then
8365   cf_cv_wint_t=yes
8366 else
8367   echo "$as_me: failed program was:" >&5
8368 cat conftest.$ac_ext >&5
8369 cf_cv_wint_t=unknown
8370 fi
8371 rm -f conftest.$ac_objext conftest.$ac_ext
8372 fi
8373 rm -f conftest.$ac_objext conftest.$ac_ext
8374 fi
8375 echo "$as_me:8375: result: $cf_cv_wint_t" >&5
8376 echo "${ECHO_T}$cf_cv_wint_t" >&6
8377
8378 if test "$cf_cv_wint_t" = yes ; then
8379         cat >>confdefs.h <<\EOF
8380 #define NEED_WCHAR_H 1
8381 EOF
8382
8383         NEED_WCHAR_H=1
8384 fi
8385
8386 # if we do not find wint_t in either place, use substitution to provide a fallback.
8387 if test "$cf_cv_wint_t" = unknown ; then
8388         NCURSES_WINT_T=1
8389 fi
8390
8391 # if we find wint_t in either place, use substitution to provide a fallback.
8392 if test "$cf_cv_wint_t" != unknown ; then
8393         NCURSES_OK_WINT_T=1
8394 fi
8395
8396         if test "$NCURSES_MBSTATE_T" != 0; then
8397                 cat >>confdefs.h <<\EOF
8398 #define NEED_MBSTATE_T_DEF 1
8399 EOF
8400
8401         fi
8402 fi
8403
8404 ###   use option --disable-lp64 to allow long chtype
8405 case $cf_cv_abi_version in
8406 [345]*)
8407         default_with_lp64=no
8408         ;;
8409 *)
8410         default_with_lp64=yes
8411         ;;
8412 esac
8413
8414 echo "$as_me:8414: checking whether to enable _LP64 definition in curses.h" >&5
8415 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
8416
8417 # Check whether --enable-lp64 or --disable-lp64 was given.
8418 if test "${enable_lp64+set}" = set; then
8419   enableval="$enable_lp64"
8420   with_lp64=$enableval
8421 else
8422   with_lp64=$default_with_lp64
8423 fi;
8424 echo "$as_me:8424: result: $with_lp64" >&5
8425 echo "${ECHO_T}$with_lp64" >&6
8426
8427 if test "$with_lp64" = yes ; then
8428         cf_cv_enable_lp64=1
8429 else
8430         cf_cv_enable_lp64=0
8431 fi
8432
8433 # Check whether --enable-largefile or --disable-largefile was given.
8434 if test "${enable_largefile+set}" = set; then
8435   enableval="$enable_largefile"
8436
8437 fi;
8438 if test "$enable_largefile" != no; then
8439
8440   echo "$as_me:8440: checking for special C compiler options needed for large files" >&5
8441 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
8442 if test "${ac_cv_sys_largefile_CC+set}" = set; then
8443   echo $ECHO_N "(cached) $ECHO_C" >&6
8444 else
8445   ac_cv_sys_largefile_CC=no
8446      if test "$GCC" != yes; then
8447        ac_save_CC=$CC
8448        while :; do
8449          # IRIX 6.2 and later do not support large files by default,
8450          # so use the C compiler's -n32 option if that helps.
8451          cat >conftest.$ac_ext <<_ACEOF
8452 #line 8452 "configure"
8453 #include "confdefs.h"
8454 #include <sys/types.h>
8455  /* Check that off_t can represent 2**63 - 1 correctly.
8456     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8457     since some C++ compilers masquerading as C compilers
8458     incorrectly reject 9223372036854775807.  */
8459 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8460   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8461                        && LARGE_OFF_T % 2147483647 == 1)
8462                       ? 1 : -1];
8463 int
8464 main ()
8465 {
8466
8467   ;
8468   return 0;
8469 }
8470 _ACEOF
8471          rm -f conftest.$ac_objext
8472 if { (eval echo "$as_me:8472: \"$ac_compile\"") >&5
8473   (eval $ac_compile) 2>&5
8474   ac_status=$?
8475   echo "$as_me:8475: \$? = $ac_status" >&5
8476   (exit $ac_status); } &&
8477          { ac_try='test -s conftest.$ac_objext'
8478   { (eval echo "$as_me:8478: \"$ac_try\"") >&5
8479   (eval $ac_try) 2>&5
8480   ac_status=$?
8481   echo "$as_me:8481: \$? = $ac_status" >&5
8482   (exit $ac_status); }; }; then
8483   break
8484 else
8485   echo "$as_me: failed program was:" >&5
8486 cat conftest.$ac_ext >&5
8487 fi
8488 rm -f conftest.$ac_objext
8489          CC="$CC -n32"
8490          rm -f conftest.$ac_objext
8491 if { (eval echo "$as_me:8491: \"$ac_compile\"") >&5
8492   (eval $ac_compile) 2>&5
8493   ac_status=$?
8494   echo "$as_me:8494: \$? = $ac_status" >&5
8495   (exit $ac_status); } &&
8496          { ac_try='test -s conftest.$ac_objext'
8497   { (eval echo "$as_me:8497: \"$ac_try\"") >&5
8498   (eval $ac_try) 2>&5
8499   ac_status=$?
8500   echo "$as_me:8500: \$? = $ac_status" >&5
8501   (exit $ac_status); }; }; then
8502   ac_cv_sys_largefile_CC=' -n32'; break
8503 else
8504   echo "$as_me: failed program was:" >&5
8505 cat conftest.$ac_ext >&5
8506 fi
8507 rm -f conftest.$ac_objext
8508          break
8509        done
8510        CC=$ac_save_CC
8511        rm -f conftest.$ac_ext
8512     fi
8513 fi
8514 echo "$as_me:8514: result: $ac_cv_sys_largefile_CC" >&5
8515 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
8516   if test "$ac_cv_sys_largefile_CC" != no; then
8517     CC=$CC$ac_cv_sys_largefile_CC
8518   fi
8519
8520   echo "$as_me:8520: checking for _FILE_OFFSET_BITS value needed for large files" >&5
8521 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
8522 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
8523   echo $ECHO_N "(cached) $ECHO_C" >&6
8524 else
8525   while :; do
8526   ac_cv_sys_file_offset_bits=no
8527   cat >conftest.$ac_ext <<_ACEOF
8528 #line 8528 "configure"
8529 #include "confdefs.h"
8530 #include <sys/types.h>
8531  /* Check that off_t can represent 2**63 - 1 correctly.
8532     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8533     since some C++ compilers masquerading as C compilers
8534     incorrectly reject 9223372036854775807.  */
8535 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8536   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8537                        && LARGE_OFF_T % 2147483647 == 1)
8538                       ? 1 : -1];
8539 int
8540 main ()
8541 {
8542
8543   ;
8544   return 0;
8545 }
8546 _ACEOF
8547 rm -f conftest.$ac_objext
8548 if { (eval echo "$as_me:8548: \"$ac_compile\"") >&5
8549   (eval $ac_compile) 2>&5
8550   ac_status=$?
8551   echo "$as_me:8551: \$? = $ac_status" >&5
8552   (exit $ac_status); } &&
8553          { ac_try='test -s conftest.$ac_objext'
8554   { (eval echo "$as_me:8554: \"$ac_try\"") >&5
8555   (eval $ac_try) 2>&5
8556   ac_status=$?
8557   echo "$as_me:8557: \$? = $ac_status" >&5
8558   (exit $ac_status); }; }; then
8559   break
8560 else
8561   echo "$as_me: failed program was:" >&5
8562 cat conftest.$ac_ext >&5
8563 fi
8564 rm -f conftest.$ac_objext conftest.$ac_ext
8565   cat >conftest.$ac_ext <<_ACEOF
8566 #line 8566 "configure"
8567 #include "confdefs.h"
8568 #define _FILE_OFFSET_BITS 64
8569 #include <sys/types.h>
8570  /* Check that off_t can represent 2**63 - 1 correctly.
8571     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8572     since some C++ compilers masquerading as C compilers
8573     incorrectly reject 9223372036854775807.  */
8574 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8575   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8576                        && LARGE_OFF_T % 2147483647 == 1)
8577                       ? 1 : -1];
8578 int
8579 main ()
8580 {
8581
8582   ;
8583   return 0;
8584 }
8585 _ACEOF
8586 rm -f conftest.$ac_objext
8587 if { (eval echo "$as_me:8587: \"$ac_compile\"") >&5
8588   (eval $ac_compile) 2>&5
8589   ac_status=$?
8590   echo "$as_me:8590: \$? = $ac_status" >&5
8591   (exit $ac_status); } &&
8592          { ac_try='test -s conftest.$ac_objext'
8593   { (eval echo "$as_me:8593: \"$ac_try\"") >&5
8594   (eval $ac_try) 2>&5
8595   ac_status=$?
8596   echo "$as_me:8596: \$? = $ac_status" >&5
8597   (exit $ac_status); }; }; then
8598   ac_cv_sys_file_offset_bits=64; break
8599 else
8600   echo "$as_me: failed program was:" >&5
8601 cat conftest.$ac_ext >&5
8602 fi
8603 rm -f conftest.$ac_objext conftest.$ac_ext
8604   break
8605 done
8606 fi
8607 echo "$as_me:8607: result: $ac_cv_sys_file_offset_bits" >&5
8608 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
8609 if test "$ac_cv_sys_file_offset_bits" != no; then
8610
8611 cat >>confdefs.h <<EOF
8612 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
8613 EOF
8614
8615 fi
8616 rm -f conftest*
8617   echo "$as_me:8617: checking for _LARGE_FILES value needed for large files" >&5
8618 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
8619 if test "${ac_cv_sys_large_files+set}" = set; then
8620   echo $ECHO_N "(cached) $ECHO_C" >&6
8621 else
8622   while :; do
8623   ac_cv_sys_large_files=no
8624   cat >conftest.$ac_ext <<_ACEOF
8625 #line 8625 "configure"
8626 #include "confdefs.h"
8627 #include <sys/types.h>
8628  /* Check that off_t can represent 2**63 - 1 correctly.
8629     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8630     since some C++ compilers masquerading as C compilers
8631     incorrectly reject 9223372036854775807.  */
8632 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8633   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8634                        && LARGE_OFF_T % 2147483647 == 1)
8635                       ? 1 : -1];
8636 int
8637 main ()
8638 {
8639
8640   ;
8641   return 0;
8642 }
8643 _ACEOF
8644 rm -f conftest.$ac_objext
8645 if { (eval echo "$as_me:8645: \"$ac_compile\"") >&5
8646   (eval $ac_compile) 2>&5
8647   ac_status=$?
8648   echo "$as_me:8648: \$? = $ac_status" >&5
8649   (exit $ac_status); } &&
8650          { ac_try='test -s conftest.$ac_objext'
8651   { (eval echo "$as_me:8651: \"$ac_try\"") >&5
8652   (eval $ac_try) 2>&5
8653   ac_status=$?
8654   echo "$as_me:8654: \$? = $ac_status" >&5
8655   (exit $ac_status); }; }; then
8656   break
8657 else
8658   echo "$as_me: failed program was:" >&5
8659 cat conftest.$ac_ext >&5
8660 fi
8661 rm -f conftest.$ac_objext conftest.$ac_ext
8662   cat >conftest.$ac_ext <<_ACEOF
8663 #line 8663 "configure"
8664 #include "confdefs.h"
8665 #define _LARGE_FILES 1
8666 #include <sys/types.h>
8667  /* Check that off_t can represent 2**63 - 1 correctly.
8668     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8669     since some C++ compilers masquerading as C compilers
8670     incorrectly reject 9223372036854775807.  */
8671 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8672   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8673                        && LARGE_OFF_T % 2147483647 == 1)
8674                       ? 1 : -1];
8675 int
8676 main ()
8677 {
8678
8679   ;
8680   return 0;
8681 }
8682 _ACEOF
8683 rm -f conftest.$ac_objext
8684 if { (eval echo "$as_me:8684: \"$ac_compile\"") >&5
8685   (eval $ac_compile) 2>&5
8686   ac_status=$?
8687   echo "$as_me:8687: \$? = $ac_status" >&5
8688   (exit $ac_status); } &&
8689          { ac_try='test -s conftest.$ac_objext'
8690   { (eval echo "$as_me:8690: \"$ac_try\"") >&5
8691   (eval $ac_try) 2>&5
8692   ac_status=$?
8693   echo "$as_me:8693: \$? = $ac_status" >&5
8694   (exit $ac_status); }; }; then
8695   ac_cv_sys_large_files=1; break
8696 else
8697   echo "$as_me: failed program was:" >&5
8698 cat conftest.$ac_ext >&5
8699 fi
8700 rm -f conftest.$ac_objext conftest.$ac_ext
8701   break
8702 done
8703 fi
8704 echo "$as_me:8704: result: $ac_cv_sys_large_files" >&5
8705 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
8706 if test "$ac_cv_sys_large_files" != no; then
8707
8708 cat >>confdefs.h <<EOF
8709 #define _LARGE_FILES $ac_cv_sys_large_files
8710 EOF
8711
8712 fi
8713 rm -f conftest*
8714 fi
8715
8716     if test "$enable_largefile" != no ; then
8717         echo "$as_me:8717: checking for _LARGEFILE_SOURCE value needed for large files" >&5
8718 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
8719 if test "${ac_cv_sys_largefile_source+set}" = set; then
8720   echo $ECHO_N "(cached) $ECHO_C" >&6
8721 else
8722   while :; do
8723   ac_cv_sys_largefile_source=no
8724   cat >conftest.$ac_ext <<_ACEOF
8725 #line 8725 "configure"
8726 #include "confdefs.h"
8727 #include <stdio.h>
8728 int
8729 main ()
8730 {
8731 return !fseeko;
8732   ;
8733   return 0;
8734 }
8735 _ACEOF
8736 rm -f conftest.$ac_objext
8737 if { (eval echo "$as_me:8737: \"$ac_compile\"") >&5
8738   (eval $ac_compile) 2>&5
8739   ac_status=$?
8740   echo "$as_me:8740: \$? = $ac_status" >&5
8741   (exit $ac_status); } &&
8742          { ac_try='test -s conftest.$ac_objext'
8743   { (eval echo "$as_me:8743: \"$ac_try\"") >&5
8744   (eval $ac_try) 2>&5
8745   ac_status=$?
8746   echo "$as_me:8746: \$? = $ac_status" >&5
8747   (exit $ac_status); }; }; then
8748   break
8749 else
8750   echo "$as_me: failed program was:" >&5
8751 cat conftest.$ac_ext >&5
8752 fi
8753 rm -f conftest.$ac_objext conftest.$ac_ext
8754   cat >conftest.$ac_ext <<_ACEOF
8755 #line 8755 "configure"
8756 #include "confdefs.h"
8757 #define _LARGEFILE_SOURCE 1
8758 #include <stdio.h>
8759 int
8760 main ()
8761 {
8762 return !fseeko;
8763   ;
8764   return 0;
8765 }
8766 _ACEOF
8767 rm -f conftest.$ac_objext
8768 if { (eval echo "$as_me:8768: \"$ac_compile\"") >&5
8769   (eval $ac_compile) 2>&5
8770   ac_status=$?
8771   echo "$as_me:8771: \$? = $ac_status" >&5
8772   (exit $ac_status); } &&
8773          { ac_try='test -s conftest.$ac_objext'
8774   { (eval echo "$as_me:8774: \"$ac_try\"") >&5
8775   (eval $ac_try) 2>&5
8776   ac_status=$?
8777   echo "$as_me:8777: \$? = $ac_status" >&5
8778   (exit $ac_status); }; }; then
8779   ac_cv_sys_largefile_source=1; break
8780 else
8781   echo "$as_me: failed program was:" >&5
8782 cat conftest.$ac_ext >&5
8783 fi
8784 rm -f conftest.$ac_objext conftest.$ac_ext
8785   break
8786 done
8787 fi
8788 echo "$as_me:8788: result: $ac_cv_sys_largefile_source" >&5
8789 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
8790 if test "$ac_cv_sys_largefile_source" != no; then
8791
8792 cat >>confdefs.h <<EOF
8793 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
8794 EOF
8795
8796 fi
8797 rm -f conftest*
8798
8799 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
8800 # in glibc 2.1.3, but that breaks too many other things.
8801 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
8802 echo "$as_me:8802: checking for fseeko" >&5
8803 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
8804 if test "${ac_cv_func_fseeko+set}" = set; then
8805   echo $ECHO_N "(cached) $ECHO_C" >&6
8806 else
8807   cat >conftest.$ac_ext <<_ACEOF
8808 #line 8808 "configure"
8809 #include "confdefs.h"
8810 #include <stdio.h>
8811 int
8812 main ()
8813 {
8814 return fseeko && fseeko (stdin, 0, 0);
8815   ;
8816   return 0;
8817 }
8818 _ACEOF
8819 rm -f conftest.$ac_objext conftest$ac_exeext
8820 if { (eval echo "$as_me:8820: \"$ac_link\"") >&5
8821   (eval $ac_link) 2>&5
8822   ac_status=$?
8823   echo "$as_me:8823: \$? = $ac_status" >&5
8824   (exit $ac_status); } &&
8825          { ac_try='test -s conftest$ac_exeext'
8826   { (eval echo "$as_me:8826: \"$ac_try\"") >&5
8827   (eval $ac_try) 2>&5
8828   ac_status=$?
8829   echo "$as_me:8829: \$? = $ac_status" >&5
8830   (exit $ac_status); }; }; then
8831   ac_cv_func_fseeko=yes
8832 else
8833   echo "$as_me: failed program was:" >&5
8834 cat conftest.$ac_ext >&5
8835 ac_cv_func_fseeko=no
8836 fi
8837 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8838 fi
8839 echo "$as_me:8839: result: $ac_cv_func_fseeko" >&5
8840 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
8841 if test $ac_cv_func_fseeko = yes; then
8842
8843 cat >>confdefs.h <<\EOF
8844 #define HAVE_FSEEKO 1
8845 EOF
8846
8847 fi
8848
8849         # Normally we would collect these definitions in the config.h,
8850         # but (like _XOPEN_SOURCE), some environments rely on having these
8851         # defined before any of the system headers are included.  Another
8852         # case comes up with C++, e.g., on AIX the compiler compiles the
8853         # header files by themselves before looking at the body files it is
8854         # told to compile.  For ncurses, those header files do not include
8855         # the config.h
8856         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
8857         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
8858         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
8859
8860         echo "$as_me:8860: checking whether to use struct dirent64" >&5
8861 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
8862 if test "${cf_cv_struct_dirent64+set}" = set; then
8863   echo $ECHO_N "(cached) $ECHO_C" >&6
8864 else
8865
8866                 cat >conftest.$ac_ext <<_ACEOF
8867 #line 8867 "configure"
8868 #include "confdefs.h"
8869
8870 #include <sys/types.h>
8871 #include <dirent.h>
8872
8873 int
8874 main ()
8875 {
8876
8877                 /* if transitional largefile support is setup, this is true */
8878                 extern struct dirent64 * readdir(DIR *);
8879                 struct dirent64 *x = readdir((DIR *)0);
8880                 struct dirent *y = readdir((DIR *)0);
8881                 int z = x - y;
8882
8883   ;
8884   return 0;
8885 }
8886 _ACEOF
8887 rm -f conftest.$ac_objext
8888 if { (eval echo "$as_me:8888: \"$ac_compile\"") >&5
8889   (eval $ac_compile) 2>&5
8890   ac_status=$?
8891   echo "$as_me:8891: \$? = $ac_status" >&5
8892   (exit $ac_status); } &&
8893          { ac_try='test -s conftest.$ac_objext'
8894   { (eval echo "$as_me:8894: \"$ac_try\"") >&5
8895   (eval $ac_try) 2>&5
8896   ac_status=$?
8897   echo "$as_me:8897: \$? = $ac_status" >&5
8898   (exit $ac_status); }; }; then
8899   cf_cv_struct_dirent64=yes
8900 else
8901   echo "$as_me: failed program was:" >&5
8902 cat conftest.$ac_ext >&5
8903 cf_cv_struct_dirent64=no
8904 fi
8905 rm -f conftest.$ac_objext conftest.$ac_ext
8906
8907 fi
8908 echo "$as_me:8908: result: $cf_cv_struct_dirent64" >&5
8909 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
8910         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
8911 #define HAVE_STRUCT_DIRENT64 1
8912 EOF
8913
8914     fi
8915
8916 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
8917 echo "$as_me:8917: checking if you want tparm not to use X/Open fixed-parameter list" >&5
8918 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
8919
8920 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
8921 if test "${enable_tparm_varargs+set}" = set; then
8922   enableval="$enable_tparm_varargs"
8923   with_tparm_varargs=$enableval
8924 else
8925   with_tparm_varargs=yes
8926 fi;
8927 echo "$as_me:8927: result: $with_tparm_varargs" >&5
8928 echo "${ECHO_T}$with_tparm_varargs" >&6
8929 NCURSES_TPARM_VARARGS=0
8930 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
8931
8932 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
8933 if test "$with_ticlib" != no ; then
8934 echo "$as_me:8934: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
8935 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
8936
8937 # Check whether --enable-tic-depends or --disable-tic-depends was given.
8938 if test "${enable_tic_depends+set}" = set; then
8939   enableval="$enable_tic_depends"
8940   with_tic_depends=$enableval
8941 else
8942   with_tic_depends=yes
8943 fi;
8944 echo "$as_me:8944: result: $with_tic_depends" >&5
8945 echo "${ECHO_T}$with_tic_depends" >&6
8946 else
8947         with_tic_depends=no
8948 fi
8949
8950 ###   use option --with-bool to override bool's type
8951 echo "$as_me:8951: checking for type of bool" >&5
8952 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
8953
8954 # Check whether --with-bool or --without-bool was given.
8955 if test "${with_bool+set}" = set; then
8956   withval="$with_bool"
8957   NCURSES_BOOL="$withval"
8958 else
8959   NCURSES_BOOL=auto
8960 fi;
8961 echo "$as_me:8961: result: $NCURSES_BOOL" >&5
8962 echo "${ECHO_T}$NCURSES_BOOL" >&6
8963
8964 echo "$as_me:8964: checking for alternate terminal capabilities file" >&5
8965 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
8966
8967 # Check whether --with-caps or --without-caps was given.
8968 if test "${with_caps+set}" = set; then
8969   withval="$with_caps"
8970   TERMINFO_CAPS=Caps.$withval
8971 else
8972   TERMINFO_CAPS=Caps
8973 fi;
8974 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
8975 echo "$as_me:8975: result: $TERMINFO_CAPS" >&5
8976 echo "${ECHO_T}$TERMINFO_CAPS" >&6
8977
8978 ###   use option --with-chtype to override chtype's type
8979 echo "$as_me:8979: checking for type of chtype" >&5
8980 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
8981
8982 # Check whether --with-chtype or --without-chtype was given.
8983 if test "${with_chtype+set}" = set; then
8984   withval="$with_chtype"
8985   NCURSES_CHTYPE="$withval"
8986 else
8987   NCURSES_CHTYPE=auto
8988 fi;
8989 echo "$as_me:8989: result: $NCURSES_CHTYPE" >&5
8990 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
8991
8992 ###   use option --with-ospeed to override ospeed's type
8993 echo "$as_me:8993: checking for type of ospeed" >&5
8994 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
8995
8996 # Check whether --with-ospeed or --without-ospeed was given.
8997 if test "${with_ospeed+set}" = set; then
8998   withval="$with_ospeed"
8999   NCURSES_OSPEED="$withval"
9000 else
9001   NCURSES_OSPEED=short
9002 fi;
9003 echo "$as_me:9003: result: $NCURSES_OSPEED" >&5
9004 echo "${ECHO_T}$NCURSES_OSPEED" >&6
9005
9006 ###   use option --with-mmask-t to override mmask_t's type
9007 echo "$as_me:9007: checking for type of mmask_t" >&5
9008 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
9009
9010 # Check whether --with-mmask-t or --without-mmask-t was given.
9011 if test "${with_mmask_t+set}" = set; then
9012   withval="$with_mmask_t"
9013   NCURSES_MMASK_T="$withval"
9014 else
9015   NCURSES_MMASK_T=auto
9016 fi;
9017 echo "$as_me:9017: result: $NCURSES_MMASK_T" >&5
9018 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
9019
9020 ###   use option --with-ccharw-max to override CCHARW_MAX size
9021 echo "$as_me:9021: checking for size CCHARW_MAX" >&5
9022 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
9023
9024 # Check whether --with-ccharw-max or --without-ccharw-max was given.
9025 if test "${with_ccharw_max+set}" = set; then
9026   withval="$with_ccharw_max"
9027   NCURSES_CCHARW_MAX="$withval"
9028 else
9029   NCURSES_CCHARW_MAX=5
9030 fi;
9031 echo "$as_me:9031: result: $NCURSES_CCHARW_MAX" >&5
9032 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
9033
9034 ### Enable compiling-in rcs id's
9035 echo "$as_me:9035: checking if RCS identifiers should be compiled-in" >&5
9036 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
9037
9038 # Check whether --with-rcs-ids or --without-rcs-ids was given.
9039 if test "${with_rcs_ids+set}" = set; then
9040   withval="$with_rcs_ids"
9041   with_rcs_ids=$withval
9042 else
9043   with_rcs_ids=no
9044 fi;
9045 echo "$as_me:9045: result: $with_rcs_ids" >&5
9046 echo "${ECHO_T}$with_rcs_ids" >&6
9047 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
9048 #define USE_RCS_IDS 1
9049 EOF
9050
9051 ###############################################################################
9052
9053 echo "$as_me:9053: checking format of man-pages" >&5
9054 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
9055
9056 # Check whether --with-manpage-format or --without-manpage-format was given.
9057 if test "${with_manpage_format+set}" = set; then
9058   withval="$with_manpage_format"
9059   MANPAGE_FORMAT=$withval
9060 else
9061   MANPAGE_FORMAT=unknown
9062 fi;
9063
9064 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
9065 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
9066
9067 cf_unknown=
9068
9069 case $MANPAGE_FORMAT in
9070 unknown)
9071   if test -z "$MANPATH" ; then
9072     MANPATH="/usr/man:/usr/share/man"
9073   fi
9074
9075   # look for the 'date' man-page (it's most likely to be installed!)
9076   MANPAGE_FORMAT=
9077   cf_preform=no
9078   cf_catonly=yes
9079   cf_example=date
9080
9081   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
9082   for cf_dir in $MANPATH; do
9083     test -z "$cf_dir" && cf_dir=/usr/man
9084     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
9085     do
9086       cf_test=`echo $cf_name | sed -e 's/*//'`
9087       if test "x$cf_test" = "x$cf_name" ; then
9088
9089         case "$cf_name" in
9090         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
9091         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
9092         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
9093         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
9094         esac
9095
9096         case "$cf_name" in
9097         $cf_dir/man*)
9098           cf_catonly=no
9099           ;;
9100         $cf_dir/cat*)
9101           cf_preform=yes
9102           ;;
9103         esac
9104         break
9105       fi
9106
9107       # if we found a match in either man* or cat*, stop looking
9108       if test -n "$MANPAGE_FORMAT" ; then
9109         cf_found=no
9110         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
9111         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
9112         case "$cf_name" in
9113         $cf_dir/cat*)
9114           cf_found=yes
9115           ;;
9116         esac
9117         test $cf_found=yes && break
9118       fi
9119     done
9120     # only check the first directory in $MANPATH where we find manpages
9121     if test -n "$MANPAGE_FORMAT" ; then
9122        break
9123     fi
9124   done
9125   # if we did not find the example, just assume it is normal
9126   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
9127   IFS="$ac_save_ifs"
9128   ;;
9129 *)
9130   for cf_option in $MANPAGE_FORMAT; do
9131      case $cf_option in #(vi
9132      gzip|compress|BSDI|normal|formatted|catonly)
9133        ;;
9134      *)
9135        cf_unknown="$cf_unknown $cf_option"
9136        ;;
9137      esac
9138   done
9139   ;;
9140 esac
9141
9142 echo "$as_me:9142: result: $MANPAGE_FORMAT" >&5
9143 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
9144 if test -n "$cf_unknown" ; then
9145   { echo "$as_me:9145: WARNING: Unexpected manpage-format $cf_unknown" >&5
9146 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
9147 fi
9148
9149 echo "$as_me:9149: checking for manpage renaming" >&5
9150 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
9151
9152 # Check whether --with-manpage-renames or --without-manpage-renames was given.
9153 if test "${with_manpage_renames+set}" = set; then
9154   withval="$with_manpage_renames"
9155   MANPAGE_RENAMES=$withval
9156 else
9157   MANPAGE_RENAMES=yes
9158 fi;
9159
9160 case ".$MANPAGE_RENAMES" in #(vi
9161 .no) #(vi
9162   ;;
9163 .|.yes)
9164   # Debian 'man' program?
9165   if test -f /etc/debian_version ; then
9166     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
9167   else
9168     MANPAGE_RENAMES=no
9169   fi
9170   ;;
9171 esac
9172
9173 if test "$MANPAGE_RENAMES" != no ; then
9174   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
9175     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
9176   elif test ! -f $MANPAGE_RENAMES ; then
9177     { { echo "$as_me:9177: error: not a filename: $MANPAGE_RENAMES" >&5
9178 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
9179    { (exit 1); exit 1; }; }
9180   fi
9181
9182   test ! -d man && mkdir man
9183
9184   # Construct a sed-script to perform renaming within man-pages
9185   if test -n "$MANPAGE_RENAMES" ; then
9186     test ! -d man && mkdir man
9187     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
9188   fi
9189 fi
9190
9191 echo "$as_me:9191: result: $MANPAGE_RENAMES" >&5
9192 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
9193
9194 echo "$as_me:9194: checking if manpage aliases will be installed" >&5
9195 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
9196
9197 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
9198 if test "${with_manpage_aliases+set}" = set; then
9199   withval="$with_manpage_aliases"
9200   MANPAGE_ALIASES=$withval
9201 else
9202   MANPAGE_ALIASES=yes
9203 fi;
9204
9205 echo "$as_me:9205: result: $MANPAGE_ALIASES" >&5
9206 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
9207
9208 if test "$LN_S" = "ln -s"; then
9209         cf_use_symlinks=yes
9210 else
9211         cf_use_symlinks=no
9212 fi
9213
9214 MANPAGE_SYMLINKS=no
9215 if test "$MANPAGE_ALIASES" = yes ; then
9216 echo "$as_me:9216: checking if manpage symlinks should be used" >&5
9217 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
9218
9219 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
9220 if test "${with_manpage_symlinks+set}" = set; then
9221   withval="$with_manpage_symlinks"
9222   MANPAGE_SYMLINKS=$withval
9223 else
9224   MANPAGE_SYMLINKS=$cf_use_symlinks
9225 fi;
9226
9227 if test "$$cf_use_symlinks" = no; then
9228 if test "$MANPAGE_SYMLINKS" = yes ; then
9229         { echo "$as_me:9229: WARNING: cannot make symlinks" >&5
9230 echo "$as_me: WARNING: cannot make symlinks" >&2;}
9231         MANPAGE_SYMLINKS=no
9232 fi
9233 fi
9234
9235 echo "$as_me:9235: result: $MANPAGE_SYMLINKS" >&5
9236 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
9237 fi
9238
9239 echo "$as_me:9239: checking for manpage tbl" >&5
9240 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
9241
9242 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
9243 if test "${with_manpage_tbl+set}" = set; then
9244   withval="$with_manpage_tbl"
9245   MANPAGE_TBL=$withval
9246 else
9247   MANPAGE_TBL=no
9248 fi;
9249
9250 echo "$as_me:9250: result: $MANPAGE_TBL" >&5
9251 echo "${ECHO_T}$MANPAGE_TBL" >&6
9252
9253   if test "$prefix" = "NONE" ; then
9254      cf_prefix="$ac_default_prefix"
9255   else
9256      cf_prefix="$prefix"
9257   fi
9258
9259   case "$MANPAGE_FORMAT" in # (vi
9260   *catonly*) # (vi
9261     cf_format=yes
9262     cf_inboth=no
9263     ;;
9264   *formatted*) # (vi
9265     cf_format=yes
9266     cf_inboth=yes
9267     ;;
9268   *)
9269     cf_format=no
9270     cf_inboth=no
9271     ;;
9272   esac
9273
9274 test ! -d man && mkdir man
9275
9276 cf_so_strip=
9277 cf_compress=
9278 case "$MANPAGE_FORMAT" in #(vi
9279 *compress*) #(vi
9280         cf_so_strip="Z"
9281         cf_compress=compress
9282   ;;
9283 *gzip*) #(vi
9284         cf_so_strip="gz"
9285         cf_compress=gzip
9286   ;;
9287 esac
9288
9289 cf_edit_man=./edit_man.sh
9290 cf_man_alias=`pwd`/man_alias.sed
9291
9292 cat >$cf_edit_man <<CF_EOF
9293 #! /bin/sh
9294 # this script is generated by the configure-script CF_MAN_PAGES macro.
9295
9296 prefix="$cf_prefix"
9297 datadir="$datadir"
9298
9299 NCURSES_MAJOR="$NCURSES_MAJOR"
9300 NCURSES_MINOR="$NCURSES_MINOR"
9301 NCURSES_PATCH="$NCURSES_PATCH"
9302
9303 NCURSES_OSPEED="$NCURSES_OSPEED"
9304 TERMINFO="$TERMINFO"
9305
9306 MKDIRS="sh `cd $srcdir && pwd`/mkdirs.sh"
9307
9308 INSTALL="$INSTALL"
9309 INSTALL_DATA="$INSTALL_DATA"
9310
9311 transform="$program_transform_name"
9312
9313 TMP=\${TMPDIR-/tmp}/man\$\$
9314 trap "rm -f \$TMP" 0 1 2 5 15
9315
9316 form=\$1
9317 shift || exit 1
9318
9319 verb=\$1
9320 shift || exit 1
9321
9322 mandir=\$1
9323 shift || exit 1
9324
9325 srcdir=\$1
9326 top_srcdir=\$srcdir/..
9327 shift || exit 1
9328
9329 if test "\$form" = normal ; then
9330         if test "$cf_format" = yes ; then
9331         if test "$cf_inboth" = no ; then
9332                 sh \$0 format \$verb \$mandir \$srcdir \$*
9333                 exit $?
9334         fi
9335         fi
9336         cf_subdir=\$mandir/man
9337         cf_tables=$MANPAGE_TBL
9338 else
9339         cf_subdir=\$mandir/cat
9340         cf_tables=yes
9341 fi
9342
9343 # process the list of source-files
9344 for i in \$* ; do
9345 case \$i in #(vi
9346 *.orig|*.rej) ;; #(vi
9347 *.[0-9]*)
9348         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
9349         if test \$verb = installing ; then
9350         if test ! -d \$cf_subdir\${section} ; then
9351                 \$MKDIRS \$cf_subdir\$section
9352         fi
9353         fi
9354
9355         # replace variables in man page
9356         if test ! -f $cf_man_alias ; then
9357 cat >>$cf_man_alias <<-CF_EOF2
9358                 s,@DATADIR@,\$datadir,g
9359                 s,@TERMINFO@,\$TERMINFO,g
9360                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
9361                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
9362                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
9363                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
9364 CF_EOF
9365
9366         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
9367         do
9368                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9369                 cf_name=`echo $cf_name|sed "$program_transform_name"`
9370 cat >>$cf_edit_man <<-CF_EOF
9371                 s,@$cf_NAME@,$cf_name,g
9372 CF_EOF
9373         done
9374
9375 cat >>$cf_edit_man <<CF_EOF
9376 CF_EOF2
9377                 echo "...made $cf_man_alias"
9378         fi
9379
9380         aliases=
9381         cf_source=\`basename \$i\`
9382         inalias=\$cf_source
9383         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
9384         if test ! -f \$inalias ; then
9385                 echo .. skipped \$cf_source
9386                 continue
9387         fi
9388 CF_EOF
9389
9390 if test "$MANPAGE_ALIASES" != no ; then
9391 cat >>$cf_edit_man <<CF_EOF
9392         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
9393 CF_EOF
9394 fi
9395
9396 if test "$MANPAGE_RENAMES" = no ; then
9397 cat >>$cf_edit_man <<CF_EOF
9398         # perform program transformations for section 1 man pages
9399         if test \$section = 1 ; then
9400                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
9401         else
9402                 cf_target=\$cf_subdir\${section}/\$cf_source
9403         fi
9404 CF_EOF
9405 else
9406 cat >>$cf_edit_man <<CF_EOF
9407         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
9408         if test -z "\$cf_target" ; then
9409                 echo '? missing rename for '\$cf_source
9410                 cf_target="\$cf_source"
9411         fi
9412         cf_target="\$cf_subdir\${section}/\${cf_target}"
9413
9414 CF_EOF
9415 fi
9416
9417 cat >>$cf_edit_man <<CF_EOF
9418         sed     -f $cf_man_alias \\
9419 CF_EOF
9420
9421 if test -f $MANPAGE_RENAMES ; then
9422 cat >>$cf_edit_man <<CF_EOF
9423                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
9424 CF_EOF
9425 else
9426 cat >>$cf_edit_man <<CF_EOF
9427                 < \$i >\$TMP
9428 CF_EOF
9429 fi
9430
9431 cat >>$cf_edit_man <<CF_EOF
9432 if test \$cf_tables = yes ; then
9433         tbl \$TMP >\$TMP.out
9434         mv \$TMP.out \$TMP
9435 fi
9436 CF_EOF
9437
9438 if test $with_curses_h != yes ; then
9439 cat >>$cf_edit_man <<CF_EOF
9440         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
9441         mv \$TMP.out \$TMP
9442 CF_EOF
9443 fi
9444
9445 cat >>$cf_edit_man <<CF_EOF
9446         if test \$form = format ; then
9447                 nroff -man \$TMP >\$TMP.out
9448                 mv \$TMP.out \$TMP
9449         fi
9450 CF_EOF
9451
9452 if test -n "$cf_compress" ; then
9453 cat >>$cf_edit_man <<CF_EOF
9454         if test \$verb = installing ; then
9455         if ( $cf_compress -f \$TMP )
9456         then
9457                 mv \$TMP.$cf_so_strip \$TMP
9458         fi
9459         fi
9460         cf_target="\$cf_target.$cf_so_strip"
9461 CF_EOF
9462 fi
9463
9464 case "$MANPAGE_FORMAT" in #(vi
9465 *BSDI*)
9466 cat >>$cf_edit_man <<CF_EOF
9467         if test \$form = format ; then
9468                 # BSDI installs only .0 suffixes in the cat directories
9469                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
9470         fi
9471 CF_EOF
9472   ;;
9473 esac
9474
9475 cat >>$cf_edit_man <<CF_EOF
9476         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
9477         if test \$verb = installing ; then
9478                 echo \$verb \$cf_target
9479                 \$INSTALL_DATA \$TMP \$cf_target
9480                 test -d \$cf_subdir\${section} &&
9481                 test -n "\$aliases" && (
9482                         cd \$cf_subdir\${section} && (
9483                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
9484                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
9485                                 cf_target=\`basename \$cf_target\`
9486                                 for cf_alias in \$aliases
9487                                 do
9488                                         if test \$section = 1 ; then
9489                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9490                                         fi
9491
9492                                         if test "$MANPAGE_SYMLINKS" = yes ; then
9493                                                 if test -f \$cf_alias\${suffix} ; then
9494                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
9495                                                         then
9496                                                                 continue
9497                                                         fi
9498                                                 fi
9499                                                 echo .. \$verb alias \$cf_alias\${suffix}
9500                                                 rm -f \$cf_alias\${suffix}
9501                                                 $LN_S \$cf_target \$cf_alias\${suffix}
9502                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
9503                                                 echo ".so \$cf_source" >\$TMP
9504 CF_EOF
9505 if test -n "$cf_compress" ; then
9506 cat >>$cf_edit_man <<CF_EOF
9507                                                 if test -n "$cf_so_strip" ; then
9508                                                         $cf_compress -f \$TMP
9509                                                         mv \$TMP.$cf_so_strip \$TMP
9510                                                 fi
9511 CF_EOF
9512 fi
9513 cat >>$cf_edit_man <<CF_EOF
9514                                                 echo .. \$verb alias \$cf_alias\${suffix}
9515                                                 rm -f \$cf_alias\${suffix}
9516                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
9517                                         fi
9518                                 done
9519                         )
9520                 )
9521         elif test \$verb = removing ; then
9522                 test -f \$cf_target && (
9523                         echo \$verb \$cf_target
9524                         rm -f \$cf_target
9525                 )
9526                 test -d \$cf_subdir\${section} &&
9527                 test -n "\$aliases" && (
9528                         cd \$cf_subdir\${section} && (
9529                                 for cf_alias in \$aliases
9530                                 do
9531                                         if test \$section = 1 ; then
9532                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9533                                         fi
9534
9535                                         echo .. \$verb alias \$cf_alias\${suffix}
9536                                         rm -f \$cf_alias\${suffix}
9537                                 done
9538                         )
9539                 )
9540         else
9541 #               echo ".hy 0"
9542                 cat \$TMP
9543         fi
9544         ;;
9545 esac
9546 done
9547
9548 if test $cf_inboth = yes ; then
9549 if test \$form != format ; then
9550         sh \$0 format \$verb \$mandir \$srcdir \$*
9551 fi
9552 fi
9553
9554 exit 0
9555 CF_EOF
9556 chmod 755 $cf_edit_man
9557
9558 ###############################################################################
9559
9560 ### Note that some functions (such as const) are normally disabled anyway.
9561 echo "$as_me:9561: checking if you want to build with function extensions" >&5
9562 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
9563
9564 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
9565 if test "${enable_ext_funcs+set}" = set; then
9566   enableval="$enable_ext_funcs"
9567   with_ext_funcs=$enableval
9568 else
9569   with_ext_funcs=yes
9570 fi;
9571 echo "$as_me:9571: result: $with_ext_funcs" >&5
9572 echo "${ECHO_T}$with_ext_funcs" >&6
9573 if test "$with_ext_funcs" = yes ; then
9574         NCURSES_EXT_FUNCS=1
9575         cat >>confdefs.h <<\EOF
9576 #define HAVE_CURSES_VERSION 1
9577 EOF
9578
9579         cat >>confdefs.h <<\EOF
9580 #define HAVE_HAS_KEY 1
9581 EOF
9582
9583         cat >>confdefs.h <<\EOF
9584 #define HAVE_RESIZETERM 1
9585 EOF
9586
9587         cat >>confdefs.h <<\EOF
9588 #define HAVE_RESIZE_TERM 1
9589 EOF
9590
9591         cat >>confdefs.h <<\EOF
9592 #define HAVE_USE_DEFAULT_COLORS 1
9593 EOF
9594
9595         cat >>confdefs.h <<\EOF
9596 #define HAVE_WRESIZE 1
9597 EOF
9598
9599         cat >>confdefs.h <<\EOF
9600 #define NCURSES_EXT_FUNCS 1
9601 EOF
9602
9603         GENERATED_EXT_FUNCS=generated
9604 else
9605         NCURSES_EXT_FUNCS=0
9606         GENERATED_EXT_FUNCS=
9607 fi
9608
9609 echo "$as_me:9609: checking if you want to build with experimental SCREEN extensions" >&5
9610 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
9611
9612 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
9613 if test "${enable_sp_funcs+set}" = set; then
9614   enableval="$enable_sp_funcs"
9615   with_sp_funcs=$enableval
9616 else
9617   with_sp_funcs=no
9618 fi;
9619 echo "$as_me:9619: result: $with_sp_funcs" >&5
9620 echo "${ECHO_T}$with_sp_funcs" >&6
9621 if test "$with_sp_funcs" = yes ; then
9622         NCURSES_SP_FUNCS=1
9623         cat >>confdefs.h <<\EOF
9624 #define NCURSES_SP_FUNCS 1
9625 EOF
9626
9627         GENERATED_SP_FUNCS=generated
9628 else
9629         NCURSES_SP_FUNCS=0
9630         GENERATED_SP_FUNCS=
9631 fi
9632
9633 echo "$as_me:9633: checking if you want to build with experimental terminal-driver" >&5
9634 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
9635
9636 # Check whether --enable-term-driver or --disable-term-driver was given.
9637 if test "${enable_term_driver+set}" = set; then
9638   enableval="$enable_term_driver"
9639   with_term_driver=$enableval
9640 else
9641   with_term_driver=no
9642 fi;
9643 echo "$as_me:9643: result: $with_term_driver" >&5
9644 echo "${ECHO_T}$with_term_driver" >&6
9645 if test "$with_term_driver" = yes ; then
9646         cat >>confdefs.h <<\EOF
9647 #define USE_TERM_DRIVER 1
9648 EOF
9649
9650         if test "$with_sp_funcs" != yes ; then
9651                 { { echo "$as_me:9651: error: The term-driver option relies upon sp-funcs" >&5
9652 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
9653    { (exit 1); exit 1; }; }
9654         fi
9655 fi
9656
9657 ###   use option --enable-const to turn on use of const beyond that in XSI.
9658 echo "$as_me:9658: checking for extended use of const keyword" >&5
9659 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
9660
9661 # Check whether --enable-const or --disable-const was given.
9662 if test "${enable_const+set}" = set; then
9663   enableval="$enable_const"
9664   with_ext_const=$enableval
9665 else
9666   with_ext_const=no
9667 fi;
9668 echo "$as_me:9668: result: $with_ext_const" >&5
9669 echo "${ECHO_T}$with_ext_const" >&6
9670 NCURSES_CONST='/*nothing*/'
9671 if test "$with_ext_const" = yes ; then
9672         NCURSES_CONST=const
9673 fi
9674
9675 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
9676 echo "$as_me:9676: checking if you want to use extended colors" >&5
9677 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
9678
9679 # Check whether --enable-ext-colors or --disable-ext-colors was given.
9680 if test "${enable_ext_colors+set}" = set; then
9681   enableval="$enable_ext_colors"
9682   with_ext_colors=$enableval
9683 else
9684   with_ext_colors=no
9685 fi;
9686 echo "$as_me:9686: result: $with_ext_colors" >&5
9687 echo "${ECHO_T}$with_ext_colors" >&6
9688 NCURSES_EXT_COLORS=0
9689 if test "$with_ext_colors" = yes ; then
9690         if test "$with_widec" != yes ; then
9691                 { { echo "$as_me:9691: error: This option applies only to wide-character library" >&5
9692 echo "$as_me: error: This option applies only to wide-character library" >&2;}
9693    { (exit 1); exit 1; }; }
9694         else
9695                 # cannot be ABI 5 since it changes sizeof(cchar_t)
9696
9697 if test "${with_abi_version+set}" != set; then
9698         case $cf_cv_rel_version in
9699         5.*)
9700                 cf_cv_rel_version=6.0
9701                 cf_cv_abi_version=6
9702                 { echo "$as_me:9702: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9703 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9704                 ;;
9705         esac
9706 fi
9707
9708         fi
9709         NCURSES_EXT_COLORS=1
9710         cat >>confdefs.h <<\EOF
9711 #define NCURSES_EXT_COLORS 1
9712 EOF
9713
9714 fi
9715
9716 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
9717 echo "$as_me:9717: checking if you want to use extended mouse encoding" >&5
9718 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
9719
9720 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
9721 if test "${enable_ext_mouse+set}" = set; then
9722   enableval="$enable_ext_mouse"
9723   with_ext_mouse=$enableval
9724 else
9725   with_ext_mouse=no
9726 fi;
9727 echo "$as_me:9727: result: $with_ext_mouse" >&5
9728 echo "${ECHO_T}$with_ext_mouse" >&6
9729 NCURSES_MOUSE_VERSION=1
9730 if test "$with_ext_mouse" = yes ; then
9731         NCURSES_MOUSE_VERSION=2
9732
9733 if test "${with_abi_version+set}" != set; then
9734         case $cf_cv_rel_version in
9735         5.*)
9736                 cf_cv_rel_version=6.0
9737                 cf_cv_abi_version=6
9738                 { echo "$as_me:9738: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9739 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9740                 ;;
9741         esac
9742 fi
9743
9744 fi
9745
9746 echo "$as_me:9746: checking if you want \$NCURSES_NO_PADDING code" >&5
9747 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
9748
9749 # Check whether --enable-no-padding or --disable-no-padding was given.
9750 if test "${enable_no_padding+set}" = set; then
9751   enableval="$enable_no_padding"
9752   with_no_padding=$enableval
9753 else
9754   with_no_padding=$with_ext_funcs
9755 fi;
9756 echo "$as_me:9756: result: $with_no_padding" >&5
9757 echo "${ECHO_T}$with_no_padding" >&6
9758 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
9759 #define NCURSES_NO_PADDING 1
9760 EOF
9761
9762 echo "$as_me:9762: checking for ANSI C header files" >&5
9763 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
9764 if test "${ac_cv_header_stdc+set}" = set; then
9765   echo $ECHO_N "(cached) $ECHO_C" >&6
9766 else
9767   cat >conftest.$ac_ext <<_ACEOF
9768 #line 9768 "configure"
9769 #include "confdefs.h"
9770 #include <stdlib.h>
9771 #include <stdarg.h>
9772 #include <string.h>
9773 #include <float.h>
9774
9775 _ACEOF
9776 if { (eval echo "$as_me:9776: \"$ac_cpp conftest.$ac_ext\"") >&5
9777   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9778   ac_status=$?
9779   egrep -v '^ *\+' conftest.er1 >conftest.err
9780   rm -f conftest.er1
9781   cat conftest.err >&5
9782   echo "$as_me:9782: \$? = $ac_status" >&5
9783   (exit $ac_status); } >/dev/null; then
9784   if test -s conftest.err; then
9785     ac_cpp_err=$ac_c_preproc_warn_flag
9786   else
9787     ac_cpp_err=
9788   fi
9789 else
9790   ac_cpp_err=yes
9791 fi
9792 if test -z "$ac_cpp_err"; then
9793   ac_cv_header_stdc=yes
9794 else
9795   echo "$as_me: failed program was:" >&5
9796   cat conftest.$ac_ext >&5
9797   ac_cv_header_stdc=no
9798 fi
9799 rm -f conftest.err conftest.$ac_ext
9800
9801 if test $ac_cv_header_stdc = yes; then
9802   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9803   cat >conftest.$ac_ext <<_ACEOF
9804 #line 9804 "configure"
9805 #include "confdefs.h"
9806 #include <string.h>
9807
9808 _ACEOF
9809 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9810   egrep "memchr" >/dev/null 2>&1; then
9811   :
9812 else
9813   ac_cv_header_stdc=no
9814 fi
9815 rm -f conftest*
9816
9817 fi
9818
9819 if test $ac_cv_header_stdc = yes; then
9820   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9821   cat >conftest.$ac_ext <<_ACEOF
9822 #line 9822 "configure"
9823 #include "confdefs.h"
9824 #include <stdlib.h>
9825
9826 _ACEOF
9827 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9828   egrep "free" >/dev/null 2>&1; then
9829   :
9830 else
9831   ac_cv_header_stdc=no
9832 fi
9833 rm -f conftest*
9834
9835 fi
9836
9837 if test $ac_cv_header_stdc = yes; then
9838   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9839   if test "$cross_compiling" = yes; then
9840   :
9841 else
9842   cat >conftest.$ac_ext <<_ACEOF
9843 #line 9843 "configure"
9844 #include "confdefs.h"
9845 #include <ctype.h>
9846 #if ((' ' & 0x0FF) == 0x020)
9847 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9848 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9849 #else
9850 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9851                      || ('j' <= (c) && (c) <= 'r') \
9852                      || ('s' <= (c) && (c) <= 'z'))
9853 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9854 #endif
9855
9856 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9857 int
9858 main ()
9859 {
9860   int i;
9861   for (i = 0; i < 256; i++)
9862     if (XOR (islower (i), ISLOWER (i))
9863         || toupper (i) != TOUPPER (i))
9864       $ac_main_return(2);
9865   $ac_main_return (0);
9866 }
9867 _ACEOF
9868 rm -f conftest$ac_exeext
9869 if { (eval echo "$as_me:9869: \"$ac_link\"") >&5
9870   (eval $ac_link) 2>&5
9871   ac_status=$?
9872   echo "$as_me:9872: \$? = $ac_status" >&5
9873   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9874   { (eval echo "$as_me:9874: \"$ac_try\"") >&5
9875   (eval $ac_try) 2>&5
9876   ac_status=$?
9877   echo "$as_me:9877: \$? = $ac_status" >&5
9878   (exit $ac_status); }; }; then
9879   :
9880 else
9881   echo "$as_me: program exited with status $ac_status" >&5
9882 echo "$as_me: failed program was:" >&5
9883 cat conftest.$ac_ext >&5
9884 ac_cv_header_stdc=no
9885 fi
9886 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9887 fi
9888 fi
9889 fi
9890 echo "$as_me:9890: result: $ac_cv_header_stdc" >&5
9891 echo "${ECHO_T}$ac_cv_header_stdc" >&6
9892 if test $ac_cv_header_stdc = yes; then
9893
9894 cat >>confdefs.h <<\EOF
9895 #define STDC_HEADERS 1
9896 EOF
9897
9898 fi
9899
9900 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
9901
9902 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9903                   inttypes.h stdint.h unistd.h
9904 do
9905 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9906 echo "$as_me:9906: checking for $ac_header" >&5
9907 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9908 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9909   echo $ECHO_N "(cached) $ECHO_C" >&6
9910 else
9911   cat >conftest.$ac_ext <<_ACEOF
9912 #line 9912 "configure"
9913 #include "confdefs.h"
9914 $ac_includes_default
9915 #include <$ac_header>
9916 _ACEOF
9917 rm -f conftest.$ac_objext
9918 if { (eval echo "$as_me:9918: \"$ac_compile\"") >&5
9919   (eval $ac_compile) 2>&5
9920   ac_status=$?
9921   echo "$as_me:9921: \$? = $ac_status" >&5
9922   (exit $ac_status); } &&
9923          { ac_try='test -s conftest.$ac_objext'
9924   { (eval echo "$as_me:9924: \"$ac_try\"") >&5
9925   (eval $ac_try) 2>&5
9926   ac_status=$?
9927   echo "$as_me:9927: \$? = $ac_status" >&5
9928   (exit $ac_status); }; }; then
9929   eval "$as_ac_Header=yes"
9930 else
9931   echo "$as_me: failed program was:" >&5
9932 cat conftest.$ac_ext >&5
9933 eval "$as_ac_Header=no"
9934 fi
9935 rm -f conftest.$ac_objext conftest.$ac_ext
9936 fi
9937 echo "$as_me:9937: result: `eval echo '${'$as_ac_Header'}'`" >&5
9938 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9939 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9940   cat >>confdefs.h <<EOF
9941 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9942 EOF
9943
9944 fi
9945 done
9946
9947 echo "$as_me:9947: checking for signed char" >&5
9948 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
9949 if test "${ac_cv_type_signed_char+set}" = set; then
9950   echo $ECHO_N "(cached) $ECHO_C" >&6
9951 else
9952   cat >conftest.$ac_ext <<_ACEOF
9953 #line 9953 "configure"
9954 #include "confdefs.h"
9955 $ac_includes_default
9956 int
9957 main ()
9958 {
9959 if ((signed char *) 0)
9960   return 0;
9961 if (sizeof (signed char))
9962   return 0;
9963   ;
9964   return 0;
9965 }
9966 _ACEOF
9967 rm -f conftest.$ac_objext
9968 if { (eval echo "$as_me:9968: \"$ac_compile\"") >&5
9969   (eval $ac_compile) 2>&5
9970   ac_status=$?
9971   echo "$as_me:9971: \$? = $ac_status" >&5
9972   (exit $ac_status); } &&
9973          { ac_try='test -s conftest.$ac_objext'
9974   { (eval echo "$as_me:9974: \"$ac_try\"") >&5
9975   (eval $ac_try) 2>&5
9976   ac_status=$?
9977   echo "$as_me:9977: \$? = $ac_status" >&5
9978   (exit $ac_status); }; }; then
9979   ac_cv_type_signed_char=yes
9980 else
9981   echo "$as_me: failed program was:" >&5
9982 cat conftest.$ac_ext >&5
9983 ac_cv_type_signed_char=no
9984 fi
9985 rm -f conftest.$ac_objext conftest.$ac_ext
9986 fi
9987 echo "$as_me:9987: result: $ac_cv_type_signed_char" >&5
9988 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
9989
9990 echo "$as_me:9990: checking size of signed char" >&5
9991 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
9992 if test "${ac_cv_sizeof_signed_char+set}" = set; then
9993   echo $ECHO_N "(cached) $ECHO_C" >&6
9994 else
9995   if test "$ac_cv_type_signed_char" = yes; then
9996   if test "$cross_compiling" = yes; then
9997   # Depending upon the size, compute the lo and hi bounds.
9998 cat >conftest.$ac_ext <<_ACEOF
9999 #line 9999 "configure"
10000 #include "confdefs.h"
10001 $ac_includes_default
10002 int
10003 main ()
10004 {
10005 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
10006   ;
10007   return 0;
10008 }
10009 _ACEOF
10010 rm -f conftest.$ac_objext
10011 if { (eval echo "$as_me:10011: \"$ac_compile\"") >&5
10012   (eval $ac_compile) 2>&5
10013   ac_status=$?
10014   echo "$as_me:10014: \$? = $ac_status" >&5
10015   (exit $ac_status); } &&
10016          { ac_try='test -s conftest.$ac_objext'
10017   { (eval echo "$as_me:10017: \"$ac_try\"") >&5
10018   (eval $ac_try) 2>&5
10019   ac_status=$?
10020   echo "$as_me:10020: \$? = $ac_status" >&5
10021   (exit $ac_status); }; }; then
10022   ac_lo=0 ac_mid=0
10023   while :; do
10024     cat >conftest.$ac_ext <<_ACEOF
10025 #line 10025 "configure"
10026 #include "confdefs.h"
10027 $ac_includes_default
10028 int
10029 main ()
10030 {
10031 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10032   ;
10033   return 0;
10034 }
10035 _ACEOF
10036 rm -f conftest.$ac_objext
10037 if { (eval echo "$as_me:10037: \"$ac_compile\"") >&5
10038   (eval $ac_compile) 2>&5
10039   ac_status=$?
10040   echo "$as_me:10040: \$? = $ac_status" >&5
10041   (exit $ac_status); } &&
10042          { ac_try='test -s conftest.$ac_objext'
10043   { (eval echo "$as_me:10043: \"$ac_try\"") >&5
10044   (eval $ac_try) 2>&5
10045   ac_status=$?
10046   echo "$as_me:10046: \$? = $ac_status" >&5
10047   (exit $ac_status); }; }; then
10048   ac_hi=$ac_mid; break
10049 else
10050   echo "$as_me: failed program was:" >&5
10051 cat conftest.$ac_ext >&5
10052 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
10053 fi
10054 rm -f conftest.$ac_objext conftest.$ac_ext
10055   done
10056 else
10057   echo "$as_me: failed program was:" >&5
10058 cat conftest.$ac_ext >&5
10059 ac_hi=-1 ac_mid=-1
10060   while :; do
10061     cat >conftest.$ac_ext <<_ACEOF
10062 #line 10062 "configure"
10063 #include "confdefs.h"
10064 $ac_includes_default
10065 int
10066 main ()
10067 {
10068 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
10069   ;
10070   return 0;
10071 }
10072 _ACEOF
10073 rm -f conftest.$ac_objext
10074 if { (eval echo "$as_me:10074: \"$ac_compile\"") >&5
10075   (eval $ac_compile) 2>&5
10076   ac_status=$?
10077   echo "$as_me:10077: \$? = $ac_status" >&5
10078   (exit $ac_status); } &&
10079          { ac_try='test -s conftest.$ac_objext'
10080   { (eval echo "$as_me:10080: \"$ac_try\"") >&5
10081   (eval $ac_try) 2>&5
10082   ac_status=$?
10083   echo "$as_me:10083: \$? = $ac_status" >&5
10084   (exit $ac_status); }; }; then
10085   ac_lo=$ac_mid; break
10086 else
10087   echo "$as_me: failed program was:" >&5
10088 cat conftest.$ac_ext >&5
10089 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
10090 fi
10091 rm -f conftest.$ac_objext conftest.$ac_ext
10092   done
10093 fi
10094 rm -f conftest.$ac_objext conftest.$ac_ext
10095 # Binary search between lo and hi bounds.
10096 while test "x$ac_lo" != "x$ac_hi"; do
10097   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10098   cat >conftest.$ac_ext <<_ACEOF
10099 #line 10099 "configure"
10100 #include "confdefs.h"
10101 $ac_includes_default
10102 int
10103 main ()
10104 {
10105 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10106   ;
10107   return 0;
10108 }
10109 _ACEOF
10110 rm -f conftest.$ac_objext
10111 if { (eval echo "$as_me:10111: \"$ac_compile\"") >&5
10112   (eval $ac_compile) 2>&5
10113   ac_status=$?
10114   echo "$as_me:10114: \$? = $ac_status" >&5
10115   (exit $ac_status); } &&
10116          { ac_try='test -s conftest.$ac_objext'
10117   { (eval echo "$as_me:10117: \"$ac_try\"") >&5
10118   (eval $ac_try) 2>&5
10119   ac_status=$?
10120   echo "$as_me:10120: \$? = $ac_status" >&5
10121   (exit $ac_status); }; }; then
10122   ac_hi=$ac_mid
10123 else
10124   echo "$as_me: failed program was:" >&5
10125 cat conftest.$ac_ext >&5
10126 ac_lo=`expr $ac_mid + 1`
10127 fi
10128 rm -f conftest.$ac_objext conftest.$ac_ext
10129 done
10130 ac_cv_sizeof_signed_char=$ac_lo
10131 else
10132   if test "$cross_compiling" = yes; then
10133   { { echo "$as_me:10133: error: cannot run test program while cross compiling" >&5
10134 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
10135    { (exit 1); exit 1; }; }
10136 else
10137   cat >conftest.$ac_ext <<_ACEOF
10138 #line 10138 "configure"
10139 #include "confdefs.h"
10140 $ac_includes_default
10141 int
10142 main ()
10143 {
10144 FILE *f = fopen ("conftest.val", "w");
10145 if (!f)
10146   $ac_main_return (1);
10147 fprintf (f, "%d", (sizeof (signed char)));
10148 fclose (f);
10149   ;
10150   return 0;
10151 }
10152 _ACEOF
10153 rm -f conftest$ac_exeext
10154 if { (eval echo "$as_me:10154: \"$ac_link\"") >&5
10155   (eval $ac_link) 2>&5
10156   ac_status=$?
10157   echo "$as_me:10157: \$? = $ac_status" >&5
10158   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10159   { (eval echo "$as_me:10159: \"$ac_try\"") >&5
10160   (eval $ac_try) 2>&5
10161   ac_status=$?
10162   echo "$as_me:10162: \$? = $ac_status" >&5
10163   (exit $ac_status); }; }; then
10164   ac_cv_sizeof_signed_char=`cat conftest.val`
10165 else
10166   echo "$as_me: program exited with status $ac_status" >&5
10167 echo "$as_me: failed program was:" >&5
10168 cat conftest.$ac_ext >&5
10169 fi
10170 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10171 fi
10172 fi
10173 rm -f conftest.val
10174 else
10175   ac_cv_sizeof_signed_char=0
10176 fi
10177 fi
10178 echo "$as_me:10178: result: $ac_cv_sizeof_signed_char" >&5
10179 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
10180 cat >>confdefs.h <<EOF
10181 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
10182 EOF
10183
10184 if test "$ac_cv_sizeof_signed_char" = 1 ; then
10185         NCURSES_SBOOL="signed char"
10186 else
10187         NCURSES_SBOOL="char"
10188 fi
10189 echo "$as_me:10189: checking if you want to use signed Boolean array in term.h" >&5
10190 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
10191
10192 # Check whether --enable-signed-char or --disable-signed-char was given.
10193 if test "${enable_signed_char+set}" = set; then
10194   enableval="$enable_signed_char"
10195   with_signed_char=$enableval
10196 else
10197   with_signed_char=no
10198 fi;
10199 echo "$as_me:10199: result: $with_signed_char" >&5
10200 echo "${ECHO_T}$with_signed_char" >&6
10201 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
10202
10203 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
10204 echo "$as_me:10204: checking if you want SIGWINCH handler" >&5
10205 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
10206
10207 # Check whether --enable-sigwinch or --disable-sigwinch was given.
10208 if test "${enable_sigwinch+set}" = set; then
10209   enableval="$enable_sigwinch"
10210   with_sigwinch=$enableval
10211 else
10212   with_sigwinch=$with_ext_funcs
10213 fi;
10214 echo "$as_me:10214: result: $with_sigwinch" >&5
10215 echo "${ECHO_T}$with_sigwinch" >&6
10216 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
10217 #define USE_SIGWINCH 1
10218 EOF
10219
10220 ###   use option --enable-tcap-names to allow user to define new capabilities
10221 echo "$as_me:10221: checking if you want user-definable terminal capabilities like termcap" >&5
10222 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
10223
10224 # Check whether --enable-tcap-names or --disable-tcap-names was given.
10225 if test "${enable_tcap_names+set}" = set; then
10226   enableval="$enable_tcap_names"
10227   with_tcap_names=$enableval
10228 else
10229   with_tcap_names=$with_ext_funcs
10230 fi;
10231 echo "$as_me:10231: result: $with_tcap_names" >&5
10232 echo "${ECHO_T}$with_tcap_names" >&6
10233 NCURSES_XNAMES=0
10234 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
10235
10236 ###############################################################################
10237 # These options are relatively safe to experiment with.
10238
10239 echo "$as_me:10239: checking if you want all development code" >&5
10240 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
10241
10242 # Check whether --with-develop or --without-develop was given.
10243 if test "${with_develop+set}" = set; then
10244   withval="$with_develop"
10245   with_develop=$withval
10246 else
10247   with_develop=no
10248 fi;
10249 echo "$as_me:10249: result: $with_develop" >&5
10250 echo "${ECHO_T}$with_develop" >&6
10251
10252 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
10253 echo "$as_me:10253: checking if you want hard-tabs code" >&5
10254 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
10255
10256 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
10257 if test "${enable_hard_tabs+set}" = set; then
10258   enableval="$enable_hard_tabs"
10259
10260 else
10261   enable_hard_tabs=$with_develop
10262 fi;
10263 echo "$as_me:10263: result: $enable_hard_tabs" >&5
10264 echo "${ECHO_T}$enable_hard_tabs" >&6
10265 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
10266 #define USE_HARD_TABS 1
10267 EOF
10268
10269 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
10270 echo "$as_me:10270: checking if you want limited support for xmc" >&5
10271 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
10272
10273 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
10274 if test "${enable_xmc_glitch+set}" = set; then
10275   enableval="$enable_xmc_glitch"
10276
10277 else
10278   enable_xmc_glitch=$with_develop
10279 fi;
10280 echo "$as_me:10280: result: $enable_xmc_glitch" >&5
10281 echo "${ECHO_T}$enable_xmc_glitch" >&6
10282 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
10283 #define USE_XMC_SUPPORT 1
10284 EOF
10285
10286 ###############################################################################
10287 # These are just experimental, probably should not be in a package:
10288
10289 echo "$as_me:10289: checking if you do not want to assume colors are white-on-black" >&5
10290 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
10291
10292 # Check whether --enable-assumed-color or --disable-assumed-color was given.
10293 if test "${enable_assumed_color+set}" = set; then
10294   enableval="$enable_assumed_color"
10295   with_assumed_color=$enableval
10296 else
10297   with_assumed_color=yes
10298 fi;
10299 echo "$as_me:10299: result: $with_assumed_color" >&5
10300 echo "${ECHO_T}$with_assumed_color" >&6
10301 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
10302 #define USE_ASSUMED_COLOR 1
10303 EOF
10304
10305 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
10306 echo "$as_me:10306: checking if you want hashmap scrolling-optimization code" >&5
10307 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
10308
10309 # Check whether --enable-hashmap or --disable-hashmap was given.
10310 if test "${enable_hashmap+set}" = set; then
10311   enableval="$enable_hashmap"
10312   with_hashmap=$enableval
10313 else
10314   with_hashmap=yes
10315 fi;
10316 echo "$as_me:10316: result: $with_hashmap" >&5
10317 echo "${ECHO_T}$with_hashmap" >&6
10318 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
10319 #define USE_HASHMAP 1
10320 EOF
10321
10322 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
10323 echo "$as_me:10323: checking if you want colorfgbg code" >&5
10324 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
10325
10326 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
10327 if test "${enable_colorfgbg+set}" = set; then
10328   enableval="$enable_colorfgbg"
10329   with_colorfgbg=$enableval
10330 else
10331   with_colorfgbg=no
10332 fi;
10333 echo "$as_me:10333: result: $with_colorfgbg" >&5
10334 echo "${ECHO_T}$with_colorfgbg" >&6
10335 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
10336 #define USE_COLORFGBG 1
10337 EOF
10338
10339 ###   use option --enable-interop to turn on use of bindings used for interop
10340 echo "$as_me:10340: checking if you want interop bindings" >&5
10341 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
10342
10343 # Check whether --enable-interop or --disable-interop was given.
10344 if test "${enable_interop+set}" = set; then
10345   enableval="$enable_interop"
10346   with_exp_interop=$enableval
10347 else
10348   with_exp_interop=no
10349 fi;
10350 echo "$as_me:10350: result: $with_exp_interop" >&5
10351 echo "${ECHO_T}$with_exp_interop" >&6
10352
10353 NCURSES_INTEROP_FUNCS=0
10354 test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
10355
10356 # This is still experimental (20080329), but should ultimately be moved to
10357 # the script-block --with-normal, etc.
10358
10359 echo "$as_me:10359: checking if you want to link with the pthread library" >&5
10360 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
10361
10362 # Check whether --with-pthread or --without-pthread was given.
10363 if test "${with_pthread+set}" = set; then
10364   withval="$with_pthread"
10365   with_pthread=$withval
10366 else
10367   with_pthread=no
10368 fi;
10369 echo "$as_me:10369: result: $with_pthread" >&5
10370 echo "${ECHO_T}$with_pthread" >&6
10371
10372 if test "$with_pthread" != no ; then
10373     echo "$as_me:10373: checking for pthread.h" >&5
10374 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
10375 if test "${ac_cv_header_pthread_h+set}" = set; then
10376   echo $ECHO_N "(cached) $ECHO_C" >&6
10377 else
10378   cat >conftest.$ac_ext <<_ACEOF
10379 #line 10379 "configure"
10380 #include "confdefs.h"
10381 #include <pthread.h>
10382 _ACEOF
10383 if { (eval echo "$as_me:10383: \"$ac_cpp conftest.$ac_ext\"") >&5
10384   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10385   ac_status=$?
10386   egrep -v '^ *\+' conftest.er1 >conftest.err
10387   rm -f conftest.er1
10388   cat conftest.err >&5
10389   echo "$as_me:10389: \$? = $ac_status" >&5
10390   (exit $ac_status); } >/dev/null; then
10391   if test -s conftest.err; then
10392     ac_cpp_err=$ac_c_preproc_warn_flag
10393   else
10394     ac_cpp_err=
10395   fi
10396 else
10397   ac_cpp_err=yes
10398 fi
10399 if test -z "$ac_cpp_err"; then
10400   ac_cv_header_pthread_h=yes
10401 else
10402   echo "$as_me: failed program was:" >&5
10403   cat conftest.$ac_ext >&5
10404   ac_cv_header_pthread_h=no
10405 fi
10406 rm -f conftest.err conftest.$ac_ext
10407 fi
10408 echo "$as_me:10408: result: $ac_cv_header_pthread_h" >&5
10409 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
10410 if test $ac_cv_header_pthread_h = yes; then
10411
10412         cat >>confdefs.h <<\EOF
10413 #define HAVE_PTHREADS_H 1
10414 EOF
10415
10416         echo "$as_me:10416: checking if we can link with the pthread library" >&5
10417 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
10418         cf_save_LIBS="$LIBS"
10419         LIBS="-lpthread $LIBS"
10420         cat >conftest.$ac_ext <<_ACEOF
10421 #line 10421 "configure"
10422 #include "confdefs.h"
10423
10424 #include <pthread.h>
10425
10426 int
10427 main ()
10428 {
10429
10430         int rc = pthread_create(0,0,0,0);
10431
10432   ;
10433   return 0;
10434 }
10435 _ACEOF
10436 rm -f conftest.$ac_objext conftest$ac_exeext
10437 if { (eval echo "$as_me:10437: \"$ac_link\"") >&5
10438   (eval $ac_link) 2>&5
10439   ac_status=$?
10440   echo "$as_me:10440: \$? = $ac_status" >&5
10441   (exit $ac_status); } &&
10442          { ac_try='test -s conftest$ac_exeext'
10443   { (eval echo "$as_me:10443: \"$ac_try\"") >&5
10444   (eval $ac_try) 2>&5
10445   ac_status=$?
10446   echo "$as_me:10446: \$? = $ac_status" >&5
10447   (exit $ac_status); }; }; then
10448   with_pthread=yes
10449 else
10450   echo "$as_me: failed program was:" >&5
10451 cat conftest.$ac_ext >&5
10452 with_pthread=no
10453 fi
10454 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10455         LIBS="$cf_save_LIBS"
10456         echo "$as_me:10456: result: $with_pthread" >&5
10457 echo "${ECHO_T}$with_pthread" >&6
10458
10459         if test "$with_pthread" = yes ; then
10460             LIBS="-lpthread $LIBS"
10461             cat >>confdefs.h <<\EOF
10462 #define HAVE_LIBPTHREADS 1
10463 EOF
10464
10465         else
10466             { { echo "$as_me:10466: error: Cannot link with pthread library" >&5
10467 echo "$as_me: error: Cannot link with pthread library" >&2;}
10468    { (exit 1); exit 1; }; }
10469         fi
10470
10471 fi
10472
10473 fi
10474
10475 echo "$as_me:10475: checking if you want to use weak-symbols for pthreads" >&5
10476 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
10477
10478 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
10479 if test "${enable_weak_symbols+set}" = set; then
10480   enableval="$enable_weak_symbols"
10481   use_weak_symbols=$withval
10482 else
10483   use_weak_symbols=no
10484 fi;
10485 echo "$as_me:10485: result: $use_weak_symbols" >&5
10486 echo "${ECHO_T}$use_weak_symbols" >&6
10487 if test "$use_weak_symbols" = yes ; then
10488
10489 echo "$as_me:10489: checking if $CC supports weak symbols" >&5
10490 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
10491 if test "${cf_cv_weak_symbols+set}" = set; then
10492   echo $ECHO_N "(cached) $ECHO_C" >&6
10493 else
10494
10495 cat >conftest.$ac_ext <<_ACEOF
10496 #line 10496 "configure"
10497 #include "confdefs.h"
10498
10499 #include <stdio.h>
10500 int
10501 main ()
10502 {
10503
10504 #if defined(__GNUC__)
10505 #  if defined __USE_ISOC99
10506 #    define _cat_pragma(exp)    _Pragma(#exp)
10507 #    define _weak_pragma(exp)   _cat_pragma(weak name)
10508 #  else
10509 #    define _weak_pragma(exp)
10510 #  endif
10511 #  define _declare(name)        __extension__ extern __typeof__(name) name
10512 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
10513 #endif
10514
10515 weak_symbol(fopen);
10516
10517   ;
10518   return 0;
10519 }
10520 _ACEOF
10521 rm -f conftest.$ac_objext
10522 if { (eval echo "$as_me:10522: \"$ac_compile\"") >&5
10523   (eval $ac_compile) 2>&5
10524   ac_status=$?
10525   echo "$as_me:10525: \$? = $ac_status" >&5
10526   (exit $ac_status); } &&
10527          { ac_try='test -s conftest.$ac_objext'
10528   { (eval echo "$as_me:10528: \"$ac_try\"") >&5
10529   (eval $ac_try) 2>&5
10530   ac_status=$?
10531   echo "$as_me:10531: \$? = $ac_status" >&5
10532   (exit $ac_status); }; }; then
10533   cf_cv_weak_symbols=yes
10534 else
10535   echo "$as_me: failed program was:" >&5
10536 cat conftest.$ac_ext >&5
10537 cf_cv_weak_symbols=no
10538 fi
10539 rm -f conftest.$ac_objext conftest.$ac_ext
10540
10541 fi
10542 echo "$as_me:10542: result: $cf_cv_weak_symbols" >&5
10543 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
10544
10545 else
10546     cf_cv_weak_symbols=no
10547 fi
10548
10549 if test $cf_cv_weak_symbols = yes ; then
10550     cat >>confdefs.h <<\EOF
10551 #define USE_WEAK_SYMBOLS 1
10552 EOF
10553
10554 fi
10555
10556 PTHREAD=
10557 if test "$with_pthread" = "yes" ; then
10558     cat >>confdefs.h <<\EOF
10559 #define USE_PTHREADS 1
10560 EOF
10561
10562     enable_reentrant=yes
10563     if test $cf_cv_weak_symbols = yes ; then
10564         PTHREAD=-lpthread
10565     fi
10566 fi
10567
10568 # Reentrant code has to be opaque; there's little advantage to making ncurses
10569 # opaque outside of that, so there is no --enable-opaque option.  We can use
10570 # this option without --with-pthreads, but this will be always set for
10571 # pthreads.
10572 echo "$as_me:10572: checking if you want experimental reentrant code" >&5
10573 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
10574
10575 # Check whether --enable-reentrant or --disable-reentrant was given.
10576 if test "${enable_reentrant+set}" = set; then
10577   enableval="$enable_reentrant"
10578   with_reentrant=$enableval
10579 else
10580   with_reentrant=no
10581 fi;
10582 echo "$as_me:10582: result: $with_reentrant" >&5
10583 echo "${ECHO_T}$with_reentrant" >&6
10584 if test "$with_reentrant" = yes ; then
10585         cf_cv_enable_reentrant=1
10586         cf_cv_enable_opaque="NCURSES_INTERNALS"
10587         NCURSES_OPAQUE=1
10588         NCURSES_SIZE_T=int
10589         if test $cf_cv_weak_symbols = yes ; then
10590
10591 # remove pthread library from $LIBS
10592 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
10593
10594         else
10595                 LIB_SUFFIX="t${LIB_SUFFIX}"
10596         fi
10597         cat >>confdefs.h <<\EOF
10598 #define USE_REENTRANT 1
10599 EOF
10600
10601 if test "${with_abi_version+set}" != set; then
10602         case $cf_cv_rel_version in
10603         5.*)
10604                 cf_cv_rel_version=6.0
10605                 cf_cv_abi_version=6
10606                 { echo "$as_me:10606: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10607 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10608                 ;;
10609         esac
10610 fi
10611
10612 else
10613         cf_cv_enable_reentrant=0
10614         cf_cv_enable_opaque="NCURSES_OPAQUE"
10615         NCURSES_OPAQUE=0
10616         NCURSES_SIZE_T=short
10617 fi
10618
10619 ### Allow using a different wrap-prefix
10620 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
10621         echo "$as_me:10621: checking for prefix used to wrap public variables" >&5
10622 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
10623
10624 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
10625 if test "${with_wrap_prefix+set}" = set; then
10626   withval="$with_wrap_prefix"
10627   NCURSES_WRAP_PREFIX=$withval
10628 else
10629   NCURSES_WRAP_PREFIX=_nc_
10630 fi;
10631         echo "$as_me:10631: result: $NCURSES_WRAP_PREFIX" >&5
10632 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
10633 else
10634         NCURSES_WRAP_PREFIX=_nc_
10635 fi
10636
10637 cat >>confdefs.h <<EOF
10638 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
10639 EOF
10640
10641 echo "$as_me:10641: checking if you want experimental safe-sprintf code" >&5
10642 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
10643
10644 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
10645 if test "${enable_safe_sprintf+set}" = set; then
10646   enableval="$enable_safe_sprintf"
10647   with_safe_sprintf=$enableval
10648 else
10649   with_safe_sprintf=no
10650 fi;
10651 echo "$as_me:10651: result: $with_safe_sprintf" >&5
10652 echo "${ECHO_T}$with_safe_sprintf" >&6
10653 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
10654 #define USE_SAFE_SPRINTF 1
10655 EOF
10656
10657 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
10658 # when hashmap is used scroll hints are useless
10659 if test "$with_hashmap" = no ; then
10660 echo "$as_me:10660: checking if you want to experiment without scrolling-hints code" >&5
10661 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
10662
10663 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
10664 if test "${enable_scroll_hints+set}" = set; then
10665   enableval="$enable_scroll_hints"
10666   with_scroll_hints=$enableval
10667 else
10668   with_scroll_hints=yes
10669 fi;
10670 echo "$as_me:10670: result: $with_scroll_hints" >&5
10671 echo "${ECHO_T}$with_scroll_hints" >&6
10672 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
10673 #define USE_SCROLL_HINTS 1
10674 EOF
10675
10676 fi
10677
10678 echo "$as_me:10678: checking if you want experimental wgetch-events code" >&5
10679 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
10680
10681 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
10682 if test "${enable_wgetch_events+set}" = set; then
10683   enableval="$enable_wgetch_events"
10684   with_wgetch_events=$enableval
10685 else
10686   with_wgetch_events=no
10687 fi;
10688 echo "$as_me:10688: result: $with_wgetch_events" >&5
10689 echo "${ECHO_T}$with_wgetch_events" >&6
10690 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
10691 #define NCURSES_WGETCH_EVENTS 1
10692 EOF
10693
10694 ###############################################################################
10695
10696 ###     use option --disable-echo to suppress full display compiling commands
10697 echo "$as_me:10697: checking if you want to display full commands during build" >&5
10698 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
10699
10700 # Check whether --enable-echo or --disable-echo was given.
10701 if test "${enable_echo+set}" = set; then
10702   enableval="$enable_echo"
10703   with_echo=$enableval
10704 else
10705   with_echo=yes
10706 fi;
10707 if test "$with_echo" = yes; then
10708         ECHO_LINK=
10709 else
10710         ECHO_LINK='@ echo linking $@ ... ;'
10711         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
10712         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
10713 fi
10714 echo "$as_me:10714: result: $with_echo" >&5
10715 echo "${ECHO_T}$with_echo" >&6
10716
10717 ###     use option --enable-warnings to turn on all gcc warnings
10718 echo "$as_me:10718: checking if you want to see compiler warnings" >&5
10719 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
10720
10721 # Check whether --enable-warnings or --disable-warnings was given.
10722 if test "${enable_warnings+set}" = set; then
10723   enableval="$enable_warnings"
10724   with_warnings=$enableval
10725 fi;
10726 echo "$as_me:10726: result: $with_warnings" >&5
10727 echo "${ECHO_T}$with_warnings" >&6
10728
10729 if test "x$with_warnings" = "xyes"; then
10730         ADAFLAGS="$ADAFLAGS -gnatg"
10731
10732 INTEL_COMPILER=no
10733
10734 if test "$GCC" = yes ; then
10735         case $host_os in
10736         linux*|gnu*)
10737                 echo "$as_me:10737: checking if this is really Intel C compiler" >&5
10738 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
10739                 cf_save_CFLAGS="$CFLAGS"
10740                 CFLAGS="$CFLAGS -no-gcc"
10741                 cat >conftest.$ac_ext <<_ACEOF
10742 #line 10742 "configure"
10743 #include "confdefs.h"
10744
10745 int
10746 main ()
10747 {
10748
10749 #ifdef __INTEL_COMPILER
10750 #else
10751 make an error
10752 #endif
10753
10754   ;
10755   return 0;
10756 }
10757 _ACEOF
10758 rm -f conftest.$ac_objext
10759 if { (eval echo "$as_me:10759: \"$ac_compile\"") >&5
10760   (eval $ac_compile) 2>&5
10761   ac_status=$?
10762   echo "$as_me:10762: \$? = $ac_status" >&5
10763   (exit $ac_status); } &&
10764          { ac_try='test -s conftest.$ac_objext'
10765   { (eval echo "$as_me:10765: \"$ac_try\"") >&5
10766   (eval $ac_try) 2>&5
10767   ac_status=$?
10768   echo "$as_me:10768: \$? = $ac_status" >&5
10769   (exit $ac_status); }; }; then
10770   INTEL_COMPILER=yes
10771 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10772
10773 else
10774   echo "$as_me: failed program was:" >&5
10775 cat conftest.$ac_ext >&5
10776 fi
10777 rm -f conftest.$ac_objext conftest.$ac_ext
10778                 CFLAGS="$cf_save_CFLAGS"
10779                 echo "$as_me:10779: result: $INTEL_COMPILER" >&5
10780 echo "${ECHO_T}$INTEL_COMPILER" >&6
10781                 ;;
10782         esac
10783 fi
10784
10785 cat > conftest.$ac_ext <<EOF
10786 #line 10786 "${as_me-configure}"
10787 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10788 EOF
10789
10790 if test "$INTEL_COMPILER" = yes
10791 then
10792 # The "-wdXXX" options suppress warnings:
10793 # remark #1419: external declaration in primary source file
10794 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10795 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10796 # remark #193: zero used for undefined preprocessing identifier
10797 # remark #593: variable "curs_sb_left_arrow" was set but never used
10798 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10799 # remark #869: parameter "tw" was never referenced
10800 # remark #981: operands are evaluated in unspecified order
10801 # warning #279: controlling expression is constant
10802
10803         { echo "$as_me:10803: checking for $CC warning options..." >&5
10804 echo "$as_me: checking for $CC warning options..." >&6;}
10805         cf_save_CFLAGS="$CFLAGS"
10806         EXTRA_CFLAGS="-Wall"
10807         for cf_opt in \
10808                 wd1419 \
10809                 wd1683 \
10810                 wd1684 \
10811                 wd193 \
10812                 wd593 \
10813                 wd279 \
10814                 wd810 \
10815                 wd869 \
10816                 wd981
10817         do
10818                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10819                 if { (eval echo "$as_me:10819: \"$ac_compile\"") >&5
10820   (eval $ac_compile) 2>&5
10821   ac_status=$?
10822   echo "$as_me:10822: \$? = $ac_status" >&5
10823   (exit $ac_status); }; then
10824                         test -n "$verbose" && echo "$as_me:10824: result: ... -$cf_opt" >&5
10825 echo "${ECHO_T}... -$cf_opt" >&6
10826                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10827                 fi
10828         done
10829         CFLAGS="$cf_save_CFLAGS"
10830
10831 elif test "$GCC" = yes
10832 then
10833         { echo "$as_me:10833: checking for $CC warning options..." >&5
10834 echo "$as_me: checking for $CC warning options..." >&6;}
10835         cf_save_CFLAGS="$CFLAGS"
10836         EXTRA_CFLAGS="-W -Wall"
10837         cf_warn_CONST=""
10838         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
10839         for cf_opt in \
10840                 Wbad-function-cast \
10841                 Wcast-align \
10842                 Wcast-qual \
10843                 Winline \
10844                 Wmissing-declarations \
10845                 Wmissing-prototypes \
10846                 Wnested-externs \
10847                 Wpointer-arith \
10848                 Wshadow \
10849                 Wstrict-prototypes \
10850                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
10851         do
10852                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10853                 if { (eval echo "$as_me:10853: \"$ac_compile\"") >&5
10854   (eval $ac_compile) 2>&5
10855   ac_status=$?
10856   echo "$as_me:10856: \$? = $ac_status" >&5
10857   (exit $ac_status); }; then
10858                         test -n "$verbose" && echo "$as_me:10858: result: ... -$cf_opt" >&5
10859 echo "${ECHO_T}... -$cf_opt" >&6
10860                         case $cf_opt in #(vi
10861                         Wcast-qual) #(vi
10862                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
10863                                 ;;
10864                         Winline) #(vi
10865                                 case $GCC_VERSION in
10866                                 [34].*)
10867                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
10868
10869 echo "${as_me-configure}:10869: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
10870
10871                                         continue;;
10872                                 esac
10873                                 ;;
10874                         esac
10875                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10876                 fi
10877         done
10878         CFLAGS="$cf_save_CFLAGS"
10879 fi
10880 rm -f conftest*
10881
10882         if test "$cf_with_cxx" = yes ; then
10883
10884 INTEL_CPLUSPLUS=no
10885
10886 if test "$GCC" = yes ; then
10887         case $host_os in
10888         linux*|gnu*)
10889                 echo "$as_me:10889: checking if this is really Intel C++ compiler" >&5
10890 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
10891                 cf_save_CFLAGS="$CXXFLAGS"
10892                 CXXFLAGS="$CXXFLAGS -no-gcc"
10893                 cat >conftest.$ac_ext <<_ACEOF
10894 #line 10894 "configure"
10895 #include "confdefs.h"
10896
10897 int
10898 main ()
10899 {
10900
10901 #ifdef __INTEL_COMPILER
10902 #else
10903 make an error
10904 #endif
10905
10906   ;
10907   return 0;
10908 }
10909 _ACEOF
10910 rm -f conftest.$ac_objext
10911 if { (eval echo "$as_me:10911: \"$ac_compile\"") >&5
10912   (eval $ac_compile) 2>&5
10913   ac_status=$?
10914   echo "$as_me:10914: \$? = $ac_status" >&5
10915   (exit $ac_status); } &&
10916          { ac_try='test -s conftest.$ac_objext'
10917   { (eval echo "$as_me:10917: \"$ac_try\"") >&5
10918   (eval $ac_try) 2>&5
10919   ac_status=$?
10920   echo "$as_me:10920: \$? = $ac_status" >&5
10921   (exit $ac_status); }; }; then
10922   INTEL_CPLUSPLUS=yes
10923 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10924
10925 else
10926   echo "$as_me: failed program was:" >&5
10927 cat conftest.$ac_ext >&5
10928 fi
10929 rm -f conftest.$ac_objext conftest.$ac_ext
10930                 CXXFLAGS="$cf_save_CFLAGS"
10931                 echo "$as_me:10931: result: $INTEL_CPLUSPLUS" >&5
10932 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
10933                 ;;
10934         esac
10935 fi
10936
10937 ac_ext=cc
10938 ac_cpp='$CXXCPP $CPPFLAGS'
10939 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10940 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10941 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
10942 ac_main_return=return
10943
10944 cat > conftest.$ac_ext <<EOF
10945 #line 10945 "configure"
10946 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10947 EOF
10948
10949 if test "$INTEL_CPLUSPLUS" = yes
10950 then
10951 # The "-wdXXX" options suppress warnings:
10952 # remark #1419: external declaration in primary source file
10953 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10954 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10955 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10956 # remark #193: zero used for undefined preprocessing identifier
10957 # remark #593: variable "curs_sb_left_arrow" was set but never used
10958 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10959 # remark #869: parameter "tw" was never referenced
10960 # remark #981: operands are evaluated in unspecified order
10961 # warning #269: invalid format string conversion
10962
10963         { echo "$as_me:10963: checking for $CC warning options..." >&5
10964 echo "$as_me: checking for $CC warning options..." >&6;}
10965         cf_save_CXXFLAGS="$CXXFLAGS"
10966         EXTRA_CXXFLAGS="-Wall"
10967         for cf_opt in \
10968                 wd1419 \
10969                 wd1682 \
10970                 wd1683 \
10971                 wd1684 \
10972                 wd193 \
10973                 wd279 \
10974                 wd593 \
10975                 wd810 \
10976                 wd869 \
10977                 wd981
10978         do
10979                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
10980                 if { (eval echo "$as_me:10980: \"$ac_compile\"") >&5
10981   (eval $ac_compile) 2>&5
10982   ac_status=$?
10983   echo "$as_me:10983: \$? = $ac_status" >&5
10984   (exit $ac_status); }; then
10985                         test -n "$verbose" && echo "$as_me:10985: result: ... -$cf_opt" >&5
10986 echo "${ECHO_T}... -$cf_opt" >&6
10987                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
10988                 fi
10989         done
10990         CXXFLAGS="$cf_save_CXXFLAGS"
10991
10992 elif test "$GXX" = yes
10993 then
10994         { echo "$as_me:10994: checking for $CXX warning options..." >&5
10995 echo "$as_me: checking for $CXX warning options..." >&6;}
10996         cf_save_CXXFLAGS="$CXXFLAGS"
10997         EXTRA_CXXFLAGS="-W -Wall"
10998         cf_gxx_extra_warnings=""
10999         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
11000         case "$GCC_VERSION" in
11001         [1-2].*)
11002                 ;;
11003         *)
11004                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
11005                 ;;
11006         esac
11007         for cf_opt in \
11008                 Wabi \
11009                 fabi-version=0 \
11010                 Woverloaded-virtual \
11011                 Wsign-promo \
11012                 Wsynth \
11013                 Wold-style-cast \
11014                 Wcast-align \
11015                 Wcast-qual \
11016                 Wmissing-prototypes \
11017                 Wpointer-arith \
11018                 Wshadow \
11019                 Wstrict-prototypes \
11020                 Wundef $cf_gxx_extra_warnings Wno-unused
11021         do
11022                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
11023                 if { (eval echo "$as_me:11023: \"$ac_compile\"") >&5
11024   (eval $ac_compile) 2>&5
11025   ac_status=$?
11026   echo "$as_me:11026: \$? = $ac_status" >&5
11027   (exit $ac_status); }; then
11028                         test -n "$verbose" && echo "$as_me:11028: result: ... -$cf_opt" >&5
11029 echo "${ECHO_T}... -$cf_opt" >&6
11030                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11031                 else
11032                         test -n "$verbose" && echo "$as_me:11032: result: ... no -$cf_opt" >&5
11033 echo "${ECHO_T}... no -$cf_opt" >&6
11034                 fi
11035         done
11036         CXXFLAGS="$cf_save_CXXFLAGS"
11037 fi
11038
11039 rm -f conftest*
11040 ac_ext=c
11041 ac_cpp='$CPP $CPPFLAGS'
11042 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11043 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11044 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11045 ac_main_return=return
11046
11047         fi
11048 fi
11049
11050 if test "$GCC" = yes
11051 then
11052 cat > conftest.i <<EOF
11053 #ifndef GCC_PRINTF
11054 #define GCC_PRINTF 0
11055 #endif
11056 #ifndef GCC_SCANF
11057 #define GCC_SCANF 0
11058 #endif
11059 #ifndef GCC_NORETURN
11060 #define GCC_NORETURN /* nothing */
11061 #endif
11062 #ifndef GCC_UNUSED
11063 #define GCC_UNUSED /* nothing */
11064 #endif
11065 EOF
11066 if test "$GCC" = yes
11067 then
11068         { echo "$as_me:11068: checking for $CC __attribute__ directives..." >&5
11069 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
11070 cat > conftest.$ac_ext <<EOF
11071 #line 11071 "${as_me-configure}"
11072 #include "confdefs.h"
11073 #include "conftest.h"
11074 #include "conftest.i"
11075 #if     GCC_PRINTF
11076 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11077 #else
11078 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
11079 #endif
11080 #if     GCC_SCANF
11081 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11082 #else
11083 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
11084 #endif
11085 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
11086 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
11087 extern void foo(void) GCC_NORETURN;
11088 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
11089 EOF
11090         cf_printf_attribute=no
11091         cf_scanf_attribute=no
11092         for cf_attribute in scanf printf unused noreturn
11093         do
11094
11095 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11096
11097                 cf_directive="__attribute__(($cf_attribute))"
11098                 echo "checking for $CC $cf_directive" 1>&5
11099
11100                 case $cf_attribute in #(vi
11101                 printf) #(vi
11102                         cf_printf_attribute=yes
11103                         cat >conftest.h <<EOF
11104 #define GCC_$cf_ATTRIBUTE 1
11105 EOF
11106                         ;;
11107                 scanf) #(vi
11108                         cf_scanf_attribute=yes
11109                         cat >conftest.h <<EOF
11110 #define GCC_$cf_ATTRIBUTE 1
11111 EOF
11112                         ;;
11113                 *) #(vi
11114                         cat >conftest.h <<EOF
11115 #define GCC_$cf_ATTRIBUTE $cf_directive
11116 EOF
11117                         ;;
11118                 esac
11119
11120                 if { (eval echo "$as_me:11120: \"$ac_compile\"") >&5
11121   (eval $ac_compile) 2>&5
11122   ac_status=$?
11123   echo "$as_me:11123: \$? = $ac_status" >&5
11124   (exit $ac_status); }; then
11125                         test -n "$verbose" && echo "$as_me:11125: result: ... $cf_attribute" >&5
11126 echo "${ECHO_T}... $cf_attribute" >&6
11127                         cat conftest.h >>confdefs.h
11128                         case $cf_attribute in #(vi
11129                         printf) #(vi
11130                                 if test "$cf_printf_attribute" = no ; then
11131                                         cat >>confdefs.h <<EOF
11132 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
11133 EOF
11134                                 else
11135                                         cat >>confdefs.h <<EOF
11136 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11137 EOF
11138                                 fi
11139                                 ;;
11140                         scanf) #(vi
11141                                 if test "$cf_scanf_attribute" = no ; then
11142                                         cat >>confdefs.h <<EOF
11143 #define GCC_SCANFLIKE(fmt,var) /* nothing */
11144 EOF
11145                                 else
11146                                         cat >>confdefs.h <<EOF
11147 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11148 EOF
11149                                 fi
11150                                 ;;
11151                         esac
11152                 fi
11153         done
11154 else
11155         fgrep define conftest.i >>confdefs.h
11156 fi
11157 rm -rf conftest*
11158 fi
11159
11160 ###     use option --enable-assertions to turn on generation of assertion code
11161 echo "$as_me:11161: checking if you want to enable runtime assertions" >&5
11162 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
11163
11164 # Check whether --enable-assertions or --disable-assertions was given.
11165 if test "${enable_assertions+set}" = set; then
11166   enableval="$enable_assertions"
11167   with_assertions=$enableval
11168 else
11169   with_assertions=no
11170 fi;
11171 echo "$as_me:11171: result: $with_assertions" >&5
11172 echo "${ECHO_T}$with_assertions" >&6
11173 if test -n "$GCC"
11174 then
11175         if test "$with_assertions" = no
11176         then
11177                 cat >>confdefs.h <<\EOF
11178 #define NDEBUG 1
11179 EOF
11180
11181                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
11182         else
11183                 ADAFLAGS="$ADAFLAGS -gnata"
11184         fi
11185 fi
11186
11187 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
11188
11189 echo "$as_me:11189: checking if you want to use dmalloc for testing" >&5
11190 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
11191
11192 # Check whether --with-dmalloc or --without-dmalloc was given.
11193 if test "${with_dmalloc+set}" = set; then
11194   withval="$with_dmalloc"
11195   cat >>confdefs.h <<\EOF
11196 #define USE_DMALLOC 1
11197 EOF
11198
11199         : ${with_cflags:=-g}
11200         : ${with_no_leaks:=yes}
11201          with_dmalloc=yes
11202 else
11203   with_dmalloc=
11204 fi;
11205 echo "$as_me:11205: result: ${with_dmalloc:-no}" >&5
11206 echo "${ECHO_T}${with_dmalloc:-no}" >&6
11207
11208 case .$with_cflags in #(vi
11209 .*-g*)
11210         case .$CFLAGS in #(vi
11211         .*-g*) #(vi
11212                 ;;
11213         *)
11214
11215 cf_fix_cppflags=no
11216 cf_new_cflags=
11217 cf_new_cppflags=
11218 cf_new_extra_cppflags=
11219
11220 for cf_add_cflags in -g
11221 do
11222 case $cf_fix_cppflags in
11223 no)
11224         case $cf_add_cflags in #(vi
11225         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11226                 case $cf_add_cflags in
11227                 -D*)
11228                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11229
11230                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11231                                 && test -z "${cf_tst_cflags}" \
11232                                 && cf_fix_cppflags=yes
11233
11234                         if test $cf_fix_cppflags = yes ; then
11235                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11236                                 continue
11237                         elif test "${cf_tst_cflags}" = "\"'" ; then
11238                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11239                                 continue
11240                         fi
11241                         ;;
11242                 esac
11243                 case "$CPPFLAGS" in
11244                 *$cf_add_cflags) #(vi
11245                         ;;
11246                 *) #(vi
11247                         case $cf_add_cflags in #(vi
11248                         -D*)
11249                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11250
11251 CPPFLAGS=`echo "$CPPFLAGS" | \
11252         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11253                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11254
11255                                 ;;
11256                         esac
11257                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11258                         ;;
11259                 esac
11260                 ;;
11261         *)
11262                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11263                 ;;
11264         esac
11265         ;;
11266 yes)
11267         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11268
11269         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11270
11271         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11272                 && test -z "${cf_tst_cflags}" \
11273                 && cf_fix_cppflags=no
11274         ;;
11275 esac
11276 done
11277
11278 if test -n "$cf_new_cflags" ; then
11279
11280         CFLAGS="$CFLAGS $cf_new_cflags"
11281 fi
11282
11283 if test -n "$cf_new_cppflags" ; then
11284
11285         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11286 fi
11287
11288 if test -n "$cf_new_extra_cppflags" ; then
11289
11290         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11291 fi
11292
11293                 ;;
11294         esac
11295         ;;
11296 esac
11297
11298 if test "$with_dmalloc" = yes ; then
11299         echo "$as_me:11299: checking for dmalloc.h" >&5
11300 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
11301 if test "${ac_cv_header_dmalloc_h+set}" = set; then
11302   echo $ECHO_N "(cached) $ECHO_C" >&6
11303 else
11304   cat >conftest.$ac_ext <<_ACEOF
11305 #line 11305 "configure"
11306 #include "confdefs.h"
11307 #include <dmalloc.h>
11308 _ACEOF
11309 if { (eval echo "$as_me:11309: \"$ac_cpp conftest.$ac_ext\"") >&5
11310   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11311   ac_status=$?
11312   egrep -v '^ *\+' conftest.er1 >conftest.err
11313   rm -f conftest.er1
11314   cat conftest.err >&5
11315   echo "$as_me:11315: \$? = $ac_status" >&5
11316   (exit $ac_status); } >/dev/null; then
11317   if test -s conftest.err; then
11318     ac_cpp_err=$ac_c_preproc_warn_flag
11319   else
11320     ac_cpp_err=
11321   fi
11322 else
11323   ac_cpp_err=yes
11324 fi
11325 if test -z "$ac_cpp_err"; then
11326   ac_cv_header_dmalloc_h=yes
11327 else
11328   echo "$as_me: failed program was:" >&5
11329   cat conftest.$ac_ext >&5
11330   ac_cv_header_dmalloc_h=no
11331 fi
11332 rm -f conftest.err conftest.$ac_ext
11333 fi
11334 echo "$as_me:11334: result: $ac_cv_header_dmalloc_h" >&5
11335 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
11336 if test $ac_cv_header_dmalloc_h = yes; then
11337
11338 echo "$as_me:11338: checking for dmalloc_debug in -ldmalloc" >&5
11339 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
11340 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
11341   echo $ECHO_N "(cached) $ECHO_C" >&6
11342 else
11343   ac_check_lib_save_LIBS=$LIBS
11344 LIBS="-ldmalloc  $LIBS"
11345 cat >conftest.$ac_ext <<_ACEOF
11346 #line 11346 "configure"
11347 #include "confdefs.h"
11348
11349 /* Override any gcc2 internal prototype to avoid an error.  */
11350 #ifdef __cplusplus
11351 extern "C"
11352 #endif
11353 /* We use char because int might match the return type of a gcc2
11354    builtin and then its argument prototype would still apply.  */
11355 char dmalloc_debug ();
11356 int
11357 main ()
11358 {
11359 dmalloc_debug ();
11360   ;
11361   return 0;
11362 }
11363 _ACEOF
11364 rm -f conftest.$ac_objext conftest$ac_exeext
11365 if { (eval echo "$as_me:11365: \"$ac_link\"") >&5
11366   (eval $ac_link) 2>&5
11367   ac_status=$?
11368   echo "$as_me:11368: \$? = $ac_status" >&5
11369   (exit $ac_status); } &&
11370          { ac_try='test -s conftest$ac_exeext'
11371   { (eval echo "$as_me:11371: \"$ac_try\"") >&5
11372   (eval $ac_try) 2>&5
11373   ac_status=$?
11374   echo "$as_me:11374: \$? = $ac_status" >&5
11375   (exit $ac_status); }; }; then
11376   ac_cv_lib_dmalloc_dmalloc_debug=yes
11377 else
11378   echo "$as_me: failed program was:" >&5
11379 cat conftest.$ac_ext >&5
11380 ac_cv_lib_dmalloc_dmalloc_debug=no
11381 fi
11382 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11383 LIBS=$ac_check_lib_save_LIBS
11384 fi
11385 echo "$as_me:11385: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
11386 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
11387 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
11388   cat >>confdefs.h <<EOF
11389 #define HAVE_LIBDMALLOC 1
11390 EOF
11391
11392   LIBS="-ldmalloc $LIBS"
11393
11394 fi
11395
11396 fi
11397
11398 fi
11399
11400 echo "$as_me:11400: checking if you want to use dbmalloc for testing" >&5
11401 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
11402
11403 # Check whether --with-dbmalloc or --without-dbmalloc was given.
11404 if test "${with_dbmalloc+set}" = set; then
11405   withval="$with_dbmalloc"
11406   cat >>confdefs.h <<\EOF
11407 #define USE_DBMALLOC 1
11408 EOF
11409
11410         : ${with_cflags:=-g}
11411         : ${with_no_leaks:=yes}
11412          with_dbmalloc=yes
11413 else
11414   with_dbmalloc=
11415 fi;
11416 echo "$as_me:11416: result: ${with_dbmalloc:-no}" >&5
11417 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
11418
11419 case .$with_cflags in #(vi
11420 .*-g*)
11421         case .$CFLAGS in #(vi
11422         .*-g*) #(vi
11423                 ;;
11424         *)
11425
11426 cf_fix_cppflags=no
11427 cf_new_cflags=
11428 cf_new_cppflags=
11429 cf_new_extra_cppflags=
11430
11431 for cf_add_cflags in -g
11432 do
11433 case $cf_fix_cppflags in
11434 no)
11435         case $cf_add_cflags in #(vi
11436         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11437                 case $cf_add_cflags in
11438                 -D*)
11439                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11440
11441                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11442                                 && test -z "${cf_tst_cflags}" \
11443                                 && cf_fix_cppflags=yes
11444
11445                         if test $cf_fix_cppflags = yes ; then
11446                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11447                                 continue
11448                         elif test "${cf_tst_cflags}" = "\"'" ; then
11449                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11450                                 continue
11451                         fi
11452                         ;;
11453                 esac
11454                 case "$CPPFLAGS" in
11455                 *$cf_add_cflags) #(vi
11456                         ;;
11457                 *) #(vi
11458                         case $cf_add_cflags in #(vi
11459                         -D*)
11460                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11461
11462 CPPFLAGS=`echo "$CPPFLAGS" | \
11463         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11464                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11465
11466                                 ;;
11467                         esac
11468                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11469                         ;;
11470                 esac
11471                 ;;
11472         *)
11473                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11474                 ;;
11475         esac
11476         ;;
11477 yes)
11478         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11479
11480         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11481
11482         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11483                 && test -z "${cf_tst_cflags}" \
11484                 && cf_fix_cppflags=no
11485         ;;
11486 esac
11487 done
11488
11489 if test -n "$cf_new_cflags" ; then
11490
11491         CFLAGS="$CFLAGS $cf_new_cflags"
11492 fi
11493
11494 if test -n "$cf_new_cppflags" ; then
11495
11496         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11497 fi
11498
11499 if test -n "$cf_new_extra_cppflags" ; then
11500
11501         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11502 fi
11503
11504                 ;;
11505         esac
11506         ;;
11507 esac
11508
11509 if test "$with_dbmalloc" = yes ; then
11510         echo "$as_me:11510: checking for dbmalloc.h" >&5
11511 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
11512 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
11513   echo $ECHO_N "(cached) $ECHO_C" >&6
11514 else
11515   cat >conftest.$ac_ext <<_ACEOF
11516 #line 11516 "configure"
11517 #include "confdefs.h"
11518 #include <dbmalloc.h>
11519 _ACEOF
11520 if { (eval echo "$as_me:11520: \"$ac_cpp conftest.$ac_ext\"") >&5
11521   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11522   ac_status=$?
11523   egrep -v '^ *\+' conftest.er1 >conftest.err
11524   rm -f conftest.er1
11525   cat conftest.err >&5
11526   echo "$as_me:11526: \$? = $ac_status" >&5
11527   (exit $ac_status); } >/dev/null; then
11528   if test -s conftest.err; then
11529     ac_cpp_err=$ac_c_preproc_warn_flag
11530   else
11531     ac_cpp_err=
11532   fi
11533 else
11534   ac_cpp_err=yes
11535 fi
11536 if test -z "$ac_cpp_err"; then
11537   ac_cv_header_dbmalloc_h=yes
11538 else
11539   echo "$as_me: failed program was:" >&5
11540   cat conftest.$ac_ext >&5
11541   ac_cv_header_dbmalloc_h=no
11542 fi
11543 rm -f conftest.err conftest.$ac_ext
11544 fi
11545 echo "$as_me:11545: result: $ac_cv_header_dbmalloc_h" >&5
11546 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
11547 if test $ac_cv_header_dbmalloc_h = yes; then
11548
11549 echo "$as_me:11549: checking for debug_malloc in -ldbmalloc" >&5
11550 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
11551 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
11552   echo $ECHO_N "(cached) $ECHO_C" >&6
11553 else
11554   ac_check_lib_save_LIBS=$LIBS
11555 LIBS="-ldbmalloc  $LIBS"
11556 cat >conftest.$ac_ext <<_ACEOF
11557 #line 11557 "configure"
11558 #include "confdefs.h"
11559
11560 /* Override any gcc2 internal prototype to avoid an error.  */
11561 #ifdef __cplusplus
11562 extern "C"
11563 #endif
11564 /* We use char because int might match the return type of a gcc2
11565    builtin and then its argument prototype would still apply.  */
11566 char debug_malloc ();
11567 int
11568 main ()
11569 {
11570 debug_malloc ();
11571   ;
11572   return 0;
11573 }
11574 _ACEOF
11575 rm -f conftest.$ac_objext conftest$ac_exeext
11576 if { (eval echo "$as_me:11576: \"$ac_link\"") >&5
11577   (eval $ac_link) 2>&5
11578   ac_status=$?
11579   echo "$as_me:11579: \$? = $ac_status" >&5
11580   (exit $ac_status); } &&
11581          { ac_try='test -s conftest$ac_exeext'
11582   { (eval echo "$as_me:11582: \"$ac_try\"") >&5
11583   (eval $ac_try) 2>&5
11584   ac_status=$?
11585   echo "$as_me:11585: \$? = $ac_status" >&5
11586   (exit $ac_status); }; }; then
11587   ac_cv_lib_dbmalloc_debug_malloc=yes
11588 else
11589   echo "$as_me: failed program was:" >&5
11590 cat conftest.$ac_ext >&5
11591 ac_cv_lib_dbmalloc_debug_malloc=no
11592 fi
11593 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11594 LIBS=$ac_check_lib_save_LIBS
11595 fi
11596 echo "$as_me:11596: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
11597 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
11598 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
11599   cat >>confdefs.h <<EOF
11600 #define HAVE_LIBDBMALLOC 1
11601 EOF
11602
11603   LIBS="-ldbmalloc $LIBS"
11604
11605 fi
11606
11607 fi
11608
11609 fi
11610
11611 echo "$as_me:11611: checking if you want to use valgrind for testing" >&5
11612 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
11613
11614 # Check whether --with-valgrind or --without-valgrind was given.
11615 if test "${with_valgrind+set}" = set; then
11616   withval="$with_valgrind"
11617   cat >>confdefs.h <<\EOF
11618 #define USE_VALGRIND 1
11619 EOF
11620
11621         : ${with_cflags:=-g}
11622         : ${with_no_leaks:=yes}
11623          with_valgrind=yes
11624 else
11625   with_valgrind=
11626 fi;
11627 echo "$as_me:11627: result: ${with_valgrind:-no}" >&5
11628 echo "${ECHO_T}${with_valgrind:-no}" >&6
11629
11630 case .$with_cflags in #(vi
11631 .*-g*)
11632         case .$CFLAGS in #(vi
11633         .*-g*) #(vi
11634                 ;;
11635         *)
11636
11637 cf_fix_cppflags=no
11638 cf_new_cflags=
11639 cf_new_cppflags=
11640 cf_new_extra_cppflags=
11641
11642 for cf_add_cflags in -g
11643 do
11644 case $cf_fix_cppflags in
11645 no)
11646         case $cf_add_cflags in #(vi
11647         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11648                 case $cf_add_cflags in
11649                 -D*)
11650                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11651
11652                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11653                                 && test -z "${cf_tst_cflags}" \
11654                                 && cf_fix_cppflags=yes
11655
11656                         if test $cf_fix_cppflags = yes ; then
11657                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11658                                 continue
11659                         elif test "${cf_tst_cflags}" = "\"'" ; then
11660                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11661                                 continue
11662                         fi
11663                         ;;
11664                 esac
11665                 case "$CPPFLAGS" in
11666                 *$cf_add_cflags) #(vi
11667                         ;;
11668                 *) #(vi
11669                         case $cf_add_cflags in #(vi
11670                         -D*)
11671                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11672
11673 CPPFLAGS=`echo "$CPPFLAGS" | \
11674         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11675                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11676
11677                                 ;;
11678                         esac
11679                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11680                         ;;
11681                 esac
11682                 ;;
11683         *)
11684                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11685                 ;;
11686         esac
11687         ;;
11688 yes)
11689         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11690
11691         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11692
11693         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11694                 && test -z "${cf_tst_cflags}" \
11695                 && cf_fix_cppflags=no
11696         ;;
11697 esac
11698 done
11699
11700 if test -n "$cf_new_cflags" ; then
11701
11702         CFLAGS="$CFLAGS $cf_new_cflags"
11703 fi
11704
11705 if test -n "$cf_new_cppflags" ; then
11706
11707         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11708 fi
11709
11710 if test -n "$cf_new_extra_cppflags" ; then
11711
11712         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11713 fi
11714
11715                 ;;
11716         esac
11717         ;;
11718 esac
11719
11720 echo "$as_me:11720: checking if you want to perform memory-leak testing" >&5
11721 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
11722
11723 # Check whether --enable-leaks or --disable-leaks was given.
11724 if test "${enable_leaks+set}" = set; then
11725   enableval="$enable_leaks"
11726   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
11727 else
11728   : ${with_no_leaks:=no}
11729 fi;
11730 echo "$as_me:11730: result: $with_no_leaks" >&5
11731 echo "${ECHO_T}$with_no_leaks" >&6
11732
11733 if test "$with_no_leaks" = yes ; then
11734         cat >>confdefs.h <<\EOF
11735 #define NO_LEAKS 1
11736 EOF
11737
11738 fi
11739
11740 cat >>confdefs.h <<\EOF
11741 #define HAVE_NC_ALLOC_H 1
11742 EOF
11743
11744 ###     use option --enable-expanded to generate certain macros as functions
11745
11746 # Check whether --enable-expanded or --disable-expanded was given.
11747 if test "${enable_expanded+set}" = set; then
11748   enableval="$enable_expanded"
11749   test "$enableval" = yes && cat >>confdefs.h <<\EOF
11750 #define NCURSES_EXPANDED 1
11751 EOF
11752
11753 fi;
11754
11755 ###     use option --disable-macros to suppress macros in favor of functions
11756
11757 # Check whether --enable-macros or --disable-macros was given.
11758 if test "${enable_macros+set}" = set; then
11759   enableval="$enable_macros"
11760   test "$enableval" = no && cat >>confdefs.h <<\EOF
11761 #define NCURSES_NOMACROS 1
11762 EOF
11763
11764 fi;
11765
11766 # Normally we only add trace() to the debug-library.  Allow this to be
11767 # extended to all models of the ncurses library:
11768 cf_all_traces=no
11769 case "$CFLAGS $CPPFLAGS" in
11770 *-DTRACE*)
11771         cf_all_traces=yes
11772         ;;
11773 esac
11774
11775 echo "$as_me:11775: checking whether to add trace feature to all models" >&5
11776 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
11777
11778 # Check whether --with-trace or --without-trace was given.
11779 if test "${with_trace+set}" = set; then
11780   withval="$with_trace"
11781   cf_with_trace=$withval
11782 else
11783   cf_with_trace=$cf_all_traces
11784 fi;
11785 echo "$as_me:11785: result: $cf_with_trace" >&5
11786 echo "${ECHO_T}$cf_with_trace" >&6
11787
11788 if test "$cf_with_trace" = yes ; then
11789         LIB_TRACING=all
11790         ADA_TRACE=TRUE
11791
11792 cf_fix_cppflags=no
11793 cf_new_cflags=
11794 cf_new_cppflags=
11795 cf_new_extra_cppflags=
11796
11797 for cf_add_cflags in -DTRACE
11798 do
11799 case $cf_fix_cppflags in
11800 no)
11801         case $cf_add_cflags in #(vi
11802         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11803                 case $cf_add_cflags in
11804                 -D*)
11805                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11806
11807                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11808                                 && test -z "${cf_tst_cflags}" \
11809                                 && cf_fix_cppflags=yes
11810
11811                         if test $cf_fix_cppflags = yes ; then
11812                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11813                                 continue
11814                         elif test "${cf_tst_cflags}" = "\"'" ; then
11815                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11816                                 continue
11817                         fi
11818                         ;;
11819                 esac
11820                 case "$CPPFLAGS" in
11821                 *$cf_add_cflags) #(vi
11822                         ;;
11823                 *) #(vi
11824                         case $cf_add_cflags in #(vi
11825                         -D*)
11826                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11827
11828 CPPFLAGS=`echo "$CPPFLAGS" | \
11829         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11830                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11831
11832                                 ;;
11833                         esac
11834                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11835                         ;;
11836                 esac
11837                 ;;
11838         *)
11839                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11840                 ;;
11841         esac
11842         ;;
11843 yes)
11844         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11845
11846         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11847
11848         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11849                 && test -z "${cf_tst_cflags}" \
11850                 && cf_fix_cppflags=no
11851         ;;
11852 esac
11853 done
11854
11855 if test -n "$cf_new_cflags" ; then
11856
11857         CFLAGS="$CFLAGS $cf_new_cflags"
11858 fi
11859
11860 if test -n "$cf_new_cppflags" ; then
11861
11862         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11863 fi
11864
11865 if test -n "$cf_new_extra_cppflags" ; then
11866
11867         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11868 fi
11869
11870 else
11871         LIB_TRACING=DEBUG
11872         ADA_TRACE=FALSE
11873 fi
11874
11875 ###     Checks for libraries.
11876 case $cf_cv_system_name in #(vi
11877 *mingw32*) #(vi
11878         ;;
11879 *)
11880 echo "$as_me:11880: checking for gettimeofday" >&5
11881 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
11882 if test "${ac_cv_func_gettimeofday+set}" = set; then
11883   echo $ECHO_N "(cached) $ECHO_C" >&6
11884 else
11885   cat >conftest.$ac_ext <<_ACEOF
11886 #line 11886 "configure"
11887 #include "confdefs.h"
11888 /* System header to define __stub macros and hopefully few prototypes,
11889     which can conflict with char gettimeofday (); below.  */
11890 #include <assert.h>
11891 /* Override any gcc2 internal prototype to avoid an error.  */
11892 #ifdef __cplusplus
11893 extern "C"
11894 #endif
11895 /* We use char because int might match the return type of a gcc2
11896    builtin and then its argument prototype would still apply.  */
11897 char gettimeofday ();
11898 char (*f) ();
11899
11900 int
11901 main ()
11902 {
11903 /* The GNU C library defines this for functions which it implements
11904     to always fail with ENOSYS.  Some functions are actually named
11905     something starting with __ and the normal name is an alias.  */
11906 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
11907 choke me
11908 #else
11909 f = gettimeofday;
11910 #endif
11911
11912   ;
11913   return 0;
11914 }
11915 _ACEOF
11916 rm -f conftest.$ac_objext conftest$ac_exeext
11917 if { (eval echo "$as_me:11917: \"$ac_link\"") >&5
11918   (eval $ac_link) 2>&5
11919   ac_status=$?
11920   echo "$as_me:11920: \$? = $ac_status" >&5
11921   (exit $ac_status); } &&
11922          { ac_try='test -s conftest$ac_exeext'
11923   { (eval echo "$as_me:11923: \"$ac_try\"") >&5
11924   (eval $ac_try) 2>&5
11925   ac_status=$?
11926   echo "$as_me:11926: \$? = $ac_status" >&5
11927   (exit $ac_status); }; }; then
11928   ac_cv_func_gettimeofday=yes
11929 else
11930   echo "$as_me: failed program was:" >&5
11931 cat conftest.$ac_ext >&5
11932 ac_cv_func_gettimeofday=no
11933 fi
11934 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11935 fi
11936 echo "$as_me:11936: result: $ac_cv_func_gettimeofday" >&5
11937 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
11938 if test $ac_cv_func_gettimeofday = yes; then
11939   cat >>confdefs.h <<\EOF
11940 #define HAVE_GETTIMEOFDAY 1
11941 EOF
11942
11943 else
11944
11945 echo "$as_me:11945: checking for gettimeofday in -lbsd" >&5
11946 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
11947 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
11948   echo $ECHO_N "(cached) $ECHO_C" >&6
11949 else
11950   ac_check_lib_save_LIBS=$LIBS
11951 LIBS="-lbsd  $LIBS"
11952 cat >conftest.$ac_ext <<_ACEOF
11953 #line 11953 "configure"
11954 #include "confdefs.h"
11955
11956 /* Override any gcc2 internal prototype to avoid an error.  */
11957 #ifdef __cplusplus
11958 extern "C"
11959 #endif
11960 /* We use char because int might match the return type of a gcc2
11961    builtin and then its argument prototype would still apply.  */
11962 char gettimeofday ();
11963 int
11964 main ()
11965 {
11966 gettimeofday ();
11967   ;
11968   return 0;
11969 }
11970 _ACEOF
11971 rm -f conftest.$ac_objext conftest$ac_exeext
11972 if { (eval echo "$as_me:11972: \"$ac_link\"") >&5
11973   (eval $ac_link) 2>&5
11974   ac_status=$?
11975   echo "$as_me:11975: \$? = $ac_status" >&5
11976   (exit $ac_status); } &&
11977          { ac_try='test -s conftest$ac_exeext'
11978   { (eval echo "$as_me:11978: \"$ac_try\"") >&5
11979   (eval $ac_try) 2>&5
11980   ac_status=$?
11981   echo "$as_me:11981: \$? = $ac_status" >&5
11982   (exit $ac_status); }; }; then
11983   ac_cv_lib_bsd_gettimeofday=yes
11984 else
11985   echo "$as_me: failed program was:" >&5
11986 cat conftest.$ac_ext >&5
11987 ac_cv_lib_bsd_gettimeofday=no
11988 fi
11989 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11990 LIBS=$ac_check_lib_save_LIBS
11991 fi
11992 echo "$as_me:11992: result: $ac_cv_lib_bsd_gettimeofday" >&5
11993 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
11994 if test $ac_cv_lib_bsd_gettimeofday = yes; then
11995   cat >>confdefs.h <<\EOF
11996 #define HAVE_GETTIMEOFDAY 1
11997 EOF
11998
11999         LIBS="$LIBS -lbsd"
12000 fi
12001
12002 fi
12003         ;;
12004 esac
12005
12006 echo "$as_me:12006: checking if -lm needed for math functions" >&5
12007 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
12008 if test "${cf_cv_need_libm+set}" = set; then
12009   echo $ECHO_N "(cached) $ECHO_C" >&6
12010 else
12011
12012         cat >conftest.$ac_ext <<_ACEOF
12013 #line 12013 "configure"
12014 #include "confdefs.h"
12015
12016         #include <stdio.h>
12017         #include <math.h>
12018
12019 int
12020 main ()
12021 {
12022 double x = rand(); printf("result = %g\n", sin(x))
12023   ;
12024   return 0;
12025 }
12026 _ACEOF
12027 rm -f conftest.$ac_objext conftest$ac_exeext
12028 if { (eval echo "$as_me:12028: \"$ac_link\"") >&5
12029   (eval $ac_link) 2>&5
12030   ac_status=$?
12031   echo "$as_me:12031: \$? = $ac_status" >&5
12032   (exit $ac_status); } &&
12033          { ac_try='test -s conftest$ac_exeext'
12034   { (eval echo "$as_me:12034: \"$ac_try\"") >&5
12035   (eval $ac_try) 2>&5
12036   ac_status=$?
12037   echo "$as_me:12037: \$? = $ac_status" >&5
12038   (exit $ac_status); }; }; then
12039   cf_cv_need_libm=no
12040 else
12041   echo "$as_me: failed program was:" >&5
12042 cat conftest.$ac_ext >&5
12043 cf_cv_need_libm=yes
12044 fi
12045 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12046 fi
12047 echo "$as_me:12047: result: $cf_cv_need_libm" >&5
12048 echo "${ECHO_T}$cf_cv_need_libm" >&6
12049 if test "$cf_cv_need_libm" = yes
12050 then
12051 MATH_LIB=-lm
12052 fi
12053
12054 ###     Checks for header files.
12055 echo "$as_me:12055: checking for ANSI C header files" >&5
12056 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12057 if test "${ac_cv_header_stdc+set}" = set; then
12058   echo $ECHO_N "(cached) $ECHO_C" >&6
12059 else
12060   cat >conftest.$ac_ext <<_ACEOF
12061 #line 12061 "configure"
12062 #include "confdefs.h"
12063 #include <stdlib.h>
12064 #include <stdarg.h>
12065 #include <string.h>
12066 #include <float.h>
12067
12068 _ACEOF
12069 if { (eval echo "$as_me:12069: \"$ac_cpp conftest.$ac_ext\"") >&5
12070   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12071   ac_status=$?
12072   egrep -v '^ *\+' conftest.er1 >conftest.err
12073   rm -f conftest.er1
12074   cat conftest.err >&5
12075   echo "$as_me:12075: \$? = $ac_status" >&5
12076   (exit $ac_status); } >/dev/null; then
12077   if test -s conftest.err; then
12078     ac_cpp_err=$ac_c_preproc_warn_flag
12079   else
12080     ac_cpp_err=
12081   fi
12082 else
12083   ac_cpp_err=yes
12084 fi
12085 if test -z "$ac_cpp_err"; then
12086   ac_cv_header_stdc=yes
12087 else
12088   echo "$as_me: failed program was:" >&5
12089   cat conftest.$ac_ext >&5
12090   ac_cv_header_stdc=no
12091 fi
12092 rm -f conftest.err conftest.$ac_ext
12093
12094 if test $ac_cv_header_stdc = yes; then
12095   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12096   cat >conftest.$ac_ext <<_ACEOF
12097 #line 12097 "configure"
12098 #include "confdefs.h"
12099 #include <string.h>
12100
12101 _ACEOF
12102 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12103   egrep "memchr" >/dev/null 2>&1; then
12104   :
12105 else
12106   ac_cv_header_stdc=no
12107 fi
12108 rm -f conftest*
12109
12110 fi
12111
12112 if test $ac_cv_header_stdc = yes; then
12113   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12114   cat >conftest.$ac_ext <<_ACEOF
12115 #line 12115 "configure"
12116 #include "confdefs.h"
12117 #include <stdlib.h>
12118
12119 _ACEOF
12120 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12121   egrep "free" >/dev/null 2>&1; then
12122   :
12123 else
12124   ac_cv_header_stdc=no
12125 fi
12126 rm -f conftest*
12127
12128 fi
12129
12130 if test $ac_cv_header_stdc = yes; then
12131   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12132   if test "$cross_compiling" = yes; then
12133   :
12134 else
12135   cat >conftest.$ac_ext <<_ACEOF
12136 #line 12136 "configure"
12137 #include "confdefs.h"
12138 #include <ctype.h>
12139 #if ((' ' & 0x0FF) == 0x020)
12140 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12141 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12142 #else
12143 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12144                      || ('j' <= (c) && (c) <= 'r') \
12145                      || ('s' <= (c) && (c) <= 'z'))
12146 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12147 #endif
12148
12149 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12150 int
12151 main ()
12152 {
12153   int i;
12154   for (i = 0; i < 256; i++)
12155     if (XOR (islower (i), ISLOWER (i))
12156         || toupper (i) != TOUPPER (i))
12157       $ac_main_return(2);
12158   $ac_main_return (0);
12159 }
12160 _ACEOF
12161 rm -f conftest$ac_exeext
12162 if { (eval echo "$as_me:12162: \"$ac_link\"") >&5
12163   (eval $ac_link) 2>&5
12164   ac_status=$?
12165   echo "$as_me:12165: \$? = $ac_status" >&5
12166   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12167   { (eval echo "$as_me:12167: \"$ac_try\"") >&5
12168   (eval $ac_try) 2>&5
12169   ac_status=$?
12170   echo "$as_me:12170: \$? = $ac_status" >&5
12171   (exit $ac_status); }; }; then
12172   :
12173 else
12174   echo "$as_me: program exited with status $ac_status" >&5
12175 echo "$as_me: failed program was:" >&5
12176 cat conftest.$ac_ext >&5
12177 ac_cv_header_stdc=no
12178 fi
12179 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12180 fi
12181 fi
12182 fi
12183 echo "$as_me:12183: result: $ac_cv_header_stdc" >&5
12184 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12185 if test $ac_cv_header_stdc = yes; then
12186
12187 cat >>confdefs.h <<\EOF
12188 #define STDC_HEADERS 1
12189 EOF
12190
12191 fi
12192
12193 ac_header_dirent=no
12194 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
12195   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
12196 echo "$as_me:12196: checking for $ac_hdr that defines DIR" >&5
12197 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
12198 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12199   echo $ECHO_N "(cached) $ECHO_C" >&6
12200 else
12201   cat >conftest.$ac_ext <<_ACEOF
12202 #line 12202 "configure"
12203 #include "confdefs.h"
12204 #include <sys/types.h>
12205 #include <$ac_hdr>
12206
12207 int
12208 main ()
12209 {
12210 if ((DIR *) 0)
12211 return 0;
12212   ;
12213   return 0;
12214 }
12215 _ACEOF
12216 rm -f conftest.$ac_objext
12217 if { (eval echo "$as_me:12217: \"$ac_compile\"") >&5
12218   (eval $ac_compile) 2>&5
12219   ac_status=$?
12220   echo "$as_me:12220: \$? = $ac_status" >&5
12221   (exit $ac_status); } &&
12222          { ac_try='test -s conftest.$ac_objext'
12223   { (eval echo "$as_me:12223: \"$ac_try\"") >&5
12224   (eval $ac_try) 2>&5
12225   ac_status=$?
12226   echo "$as_me:12226: \$? = $ac_status" >&5
12227   (exit $ac_status); }; }; then
12228   eval "$as_ac_Header=yes"
12229 else
12230   echo "$as_me: failed program was:" >&5
12231 cat conftest.$ac_ext >&5
12232 eval "$as_ac_Header=no"
12233 fi
12234 rm -f conftest.$ac_objext conftest.$ac_ext
12235 fi
12236 echo "$as_me:12236: result: `eval echo '${'$as_ac_Header'}'`" >&5
12237 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12238 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12239   cat >>confdefs.h <<EOF
12240 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
12241 EOF
12242
12243 ac_header_dirent=$ac_hdr; break
12244 fi
12245
12246 done
12247 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
12248 if test $ac_header_dirent = dirent.h; then
12249   echo "$as_me:12249: checking for opendir in -ldir" >&5
12250 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
12251 if test "${ac_cv_lib_dir_opendir+set}" = set; then
12252   echo $ECHO_N "(cached) $ECHO_C" >&6
12253 else
12254   ac_check_lib_save_LIBS=$LIBS
12255 LIBS="-ldir  $LIBS"
12256 cat >conftest.$ac_ext <<_ACEOF
12257 #line 12257 "configure"
12258 #include "confdefs.h"
12259
12260 /* Override any gcc2 internal prototype to avoid an error.  */
12261 #ifdef __cplusplus
12262 extern "C"
12263 #endif
12264 /* We use char because int might match the return type of a gcc2
12265    builtin and then its argument prototype would still apply.  */
12266 char opendir ();
12267 int
12268 main ()
12269 {
12270 opendir ();
12271   ;
12272   return 0;
12273 }
12274 _ACEOF
12275 rm -f conftest.$ac_objext conftest$ac_exeext
12276 if { (eval echo "$as_me:12276: \"$ac_link\"") >&5
12277   (eval $ac_link) 2>&5
12278   ac_status=$?
12279   echo "$as_me:12279: \$? = $ac_status" >&5
12280   (exit $ac_status); } &&
12281          { ac_try='test -s conftest$ac_exeext'
12282   { (eval echo "$as_me:12282: \"$ac_try\"") >&5
12283   (eval $ac_try) 2>&5
12284   ac_status=$?
12285   echo "$as_me:12285: \$? = $ac_status" >&5
12286   (exit $ac_status); }; }; then
12287   ac_cv_lib_dir_opendir=yes
12288 else
12289   echo "$as_me: failed program was:" >&5
12290 cat conftest.$ac_ext >&5
12291 ac_cv_lib_dir_opendir=no
12292 fi
12293 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12294 LIBS=$ac_check_lib_save_LIBS
12295 fi
12296 echo "$as_me:12296: result: $ac_cv_lib_dir_opendir" >&5
12297 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
12298 if test $ac_cv_lib_dir_opendir = yes; then
12299   LIBS="$LIBS -ldir"
12300 fi
12301
12302 else
12303   echo "$as_me:12303: checking for opendir in -lx" >&5
12304 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
12305 if test "${ac_cv_lib_x_opendir+set}" = set; then
12306   echo $ECHO_N "(cached) $ECHO_C" >&6
12307 else
12308   ac_check_lib_save_LIBS=$LIBS
12309 LIBS="-lx  $LIBS"
12310 cat >conftest.$ac_ext <<_ACEOF
12311 #line 12311 "configure"
12312 #include "confdefs.h"
12313
12314 /* Override any gcc2 internal prototype to avoid an error.  */
12315 #ifdef __cplusplus
12316 extern "C"
12317 #endif
12318 /* We use char because int might match the return type of a gcc2
12319    builtin and then its argument prototype would still apply.  */
12320 char opendir ();
12321 int
12322 main ()
12323 {
12324 opendir ();
12325   ;
12326   return 0;
12327 }
12328 _ACEOF
12329 rm -f conftest.$ac_objext conftest$ac_exeext
12330 if { (eval echo "$as_me:12330: \"$ac_link\"") >&5
12331   (eval $ac_link) 2>&5
12332   ac_status=$?
12333   echo "$as_me:12333: \$? = $ac_status" >&5
12334   (exit $ac_status); } &&
12335          { ac_try='test -s conftest$ac_exeext'
12336   { (eval echo "$as_me:12336: \"$ac_try\"") >&5
12337   (eval $ac_try) 2>&5
12338   ac_status=$?
12339   echo "$as_me:12339: \$? = $ac_status" >&5
12340   (exit $ac_status); }; }; then
12341   ac_cv_lib_x_opendir=yes
12342 else
12343   echo "$as_me: failed program was:" >&5
12344 cat conftest.$ac_ext >&5
12345 ac_cv_lib_x_opendir=no
12346 fi
12347 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12348 LIBS=$ac_check_lib_save_LIBS
12349 fi
12350 echo "$as_me:12350: result: $ac_cv_lib_x_opendir" >&5
12351 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
12352 if test $ac_cv_lib_x_opendir = yes; then
12353   LIBS="$LIBS -lx"
12354 fi
12355
12356 fi
12357
12358 echo "$as_me:12358: checking whether time.h and sys/time.h may both be included" >&5
12359 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12360 if test "${ac_cv_header_time+set}" = set; then
12361   echo $ECHO_N "(cached) $ECHO_C" >&6
12362 else
12363   cat >conftest.$ac_ext <<_ACEOF
12364 #line 12364 "configure"
12365 #include "confdefs.h"
12366 #include <sys/types.h>
12367 #include <sys/time.h>
12368 #include <time.h>
12369
12370 int
12371 main ()
12372 {
12373 if ((struct tm *) 0)
12374 return 0;
12375   ;
12376   return 0;
12377 }
12378 _ACEOF
12379 rm -f conftest.$ac_objext
12380 if { (eval echo "$as_me:12380: \"$ac_compile\"") >&5
12381   (eval $ac_compile) 2>&5
12382   ac_status=$?
12383   echo "$as_me:12383: \$? = $ac_status" >&5
12384   (exit $ac_status); } &&
12385          { ac_try='test -s conftest.$ac_objext'
12386   { (eval echo "$as_me:12386: \"$ac_try\"") >&5
12387   (eval $ac_try) 2>&5
12388   ac_status=$?
12389   echo "$as_me:12389: \$? = $ac_status" >&5
12390   (exit $ac_status); }; }; then
12391   ac_cv_header_time=yes
12392 else
12393   echo "$as_me: failed program was:" >&5
12394 cat conftest.$ac_ext >&5
12395 ac_cv_header_time=no
12396 fi
12397 rm -f conftest.$ac_objext conftest.$ac_ext
12398 fi
12399 echo "$as_me:12399: result: $ac_cv_header_time" >&5
12400 echo "${ECHO_T}$ac_cv_header_time" >&6
12401 if test $ac_cv_header_time = yes; then
12402
12403 cat >>confdefs.h <<\EOF
12404 #define TIME_WITH_SYS_TIME 1
12405 EOF
12406
12407 fi
12408
12409 cf_regex_func=no
12410
12411 echo "$as_me:12411: checking for regcomp" >&5
12412 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
12413 if test "${ac_cv_func_regcomp+set}" = set; then
12414   echo $ECHO_N "(cached) $ECHO_C" >&6
12415 else
12416   cat >conftest.$ac_ext <<_ACEOF
12417 #line 12417 "configure"
12418 #include "confdefs.h"
12419 /* System header to define __stub macros and hopefully few prototypes,
12420     which can conflict with char regcomp (); below.  */
12421 #include <assert.h>
12422 /* Override any gcc2 internal prototype to avoid an error.  */
12423 #ifdef __cplusplus
12424 extern "C"
12425 #endif
12426 /* We use char because int might match the return type of a gcc2
12427    builtin and then its argument prototype would still apply.  */
12428 char regcomp ();
12429 char (*f) ();
12430
12431 int
12432 main ()
12433 {
12434 /* The GNU C library defines this for functions which it implements
12435     to always fail with ENOSYS.  Some functions are actually named
12436     something starting with __ and the normal name is an alias.  */
12437 #if defined (__stub_regcomp) || defined (__stub___regcomp)
12438 choke me
12439 #else
12440 f = regcomp;
12441 #endif
12442
12443   ;
12444   return 0;
12445 }
12446 _ACEOF
12447 rm -f conftest.$ac_objext conftest$ac_exeext
12448 if { (eval echo "$as_me:12448: \"$ac_link\"") >&5
12449   (eval $ac_link) 2>&5
12450   ac_status=$?
12451   echo "$as_me:12451: \$? = $ac_status" >&5
12452   (exit $ac_status); } &&
12453          { ac_try='test -s conftest$ac_exeext'
12454   { (eval echo "$as_me:12454: \"$ac_try\"") >&5
12455   (eval $ac_try) 2>&5
12456   ac_status=$?
12457   echo "$as_me:12457: \$? = $ac_status" >&5
12458   (exit $ac_status); }; }; then
12459   ac_cv_func_regcomp=yes
12460 else
12461   echo "$as_me: failed program was:" >&5
12462 cat conftest.$ac_ext >&5
12463 ac_cv_func_regcomp=no
12464 fi
12465 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12466 fi
12467 echo "$as_me:12467: result: $ac_cv_func_regcomp" >&5
12468 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
12469 if test $ac_cv_func_regcomp = yes; then
12470   cf_regex_func=regcomp
12471 else
12472
12473         for cf_regex_lib in regex re
12474         do
12475                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
12476 echo "$as_me:12476: checking for regcomp in -l$cf_regex_lib" >&5
12477 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
12478 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12479   echo $ECHO_N "(cached) $ECHO_C" >&6
12480 else
12481   ac_check_lib_save_LIBS=$LIBS
12482 LIBS="-l$cf_regex_lib  $LIBS"
12483 cat >conftest.$ac_ext <<_ACEOF
12484 #line 12484 "configure"
12485 #include "confdefs.h"
12486
12487 /* Override any gcc2 internal prototype to avoid an error.  */
12488 #ifdef __cplusplus
12489 extern "C"
12490 #endif
12491 /* We use char because int might match the return type of a gcc2
12492    builtin and then its argument prototype would still apply.  */
12493 char regcomp ();
12494 int
12495 main ()
12496 {
12497 regcomp ();
12498   ;
12499   return 0;
12500 }
12501 _ACEOF
12502 rm -f conftest.$ac_objext conftest$ac_exeext
12503 if { (eval echo "$as_me:12503: \"$ac_link\"") >&5
12504   (eval $ac_link) 2>&5
12505   ac_status=$?
12506   echo "$as_me:12506: \$? = $ac_status" >&5
12507   (exit $ac_status); } &&
12508          { ac_try='test -s conftest$ac_exeext'
12509   { (eval echo "$as_me:12509: \"$ac_try\"") >&5
12510   (eval $ac_try) 2>&5
12511   ac_status=$?
12512   echo "$as_me:12512: \$? = $ac_status" >&5
12513   (exit $ac_status); }; }; then
12514   eval "$as_ac_Lib=yes"
12515 else
12516   echo "$as_me: failed program was:" >&5
12517 cat conftest.$ac_ext >&5
12518 eval "$as_ac_Lib=no"
12519 fi
12520 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12521 LIBS=$ac_check_lib_save_LIBS
12522 fi
12523 echo "$as_me:12523: result: `eval echo '${'$as_ac_Lib'}'`" >&5
12524 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
12525 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
12526
12527                                 LIBS="-l$cf_regex_lib $LIBS"
12528                                 cf_regex_func=regcomp
12529                                 break
12530 fi
12531
12532         done
12533
12534 fi
12535
12536 if test "$cf_regex_func" = no ; then
12537         echo "$as_me:12537: checking for compile" >&5
12538 echo $ECHO_N "checking for compile... $ECHO_C" >&6
12539 if test "${ac_cv_func_compile+set}" = set; then
12540   echo $ECHO_N "(cached) $ECHO_C" >&6
12541 else
12542   cat >conftest.$ac_ext <<_ACEOF
12543 #line 12543 "configure"
12544 #include "confdefs.h"
12545 /* System header to define __stub macros and hopefully few prototypes,
12546     which can conflict with char compile (); below.  */
12547 #include <assert.h>
12548 /* Override any gcc2 internal prototype to avoid an error.  */
12549 #ifdef __cplusplus
12550 extern "C"
12551 #endif
12552 /* We use char because int might match the return type of a gcc2
12553    builtin and then its argument prototype would still apply.  */
12554 char compile ();
12555 char (*f) ();
12556
12557 int
12558 main ()
12559 {
12560 /* The GNU C library defines this for functions which it implements
12561     to always fail with ENOSYS.  Some functions are actually named
12562     something starting with __ and the normal name is an alias.  */
12563 #if defined (__stub_compile) || defined (__stub___compile)
12564 choke me
12565 #else
12566 f = compile;
12567 #endif
12568
12569   ;
12570   return 0;
12571 }
12572 _ACEOF
12573 rm -f conftest.$ac_objext conftest$ac_exeext
12574 if { (eval echo "$as_me:12574: \"$ac_link\"") >&5
12575   (eval $ac_link) 2>&5
12576   ac_status=$?
12577   echo "$as_me:12577: \$? = $ac_status" >&5
12578   (exit $ac_status); } &&
12579          { ac_try='test -s conftest$ac_exeext'
12580   { (eval echo "$as_me:12580: \"$ac_try\"") >&5
12581   (eval $ac_try) 2>&5
12582   ac_status=$?
12583   echo "$as_me:12583: \$? = $ac_status" >&5
12584   (exit $ac_status); }; }; then
12585   ac_cv_func_compile=yes
12586 else
12587   echo "$as_me: failed program was:" >&5
12588 cat conftest.$ac_ext >&5
12589 ac_cv_func_compile=no
12590 fi
12591 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12592 fi
12593 echo "$as_me:12593: result: $ac_cv_func_compile" >&5
12594 echo "${ECHO_T}$ac_cv_func_compile" >&6
12595 if test $ac_cv_func_compile = yes; then
12596   cf_regex_func=compile
12597 else
12598
12599                 echo "$as_me:12599: checking for compile in -lgen" >&5
12600 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
12601 if test "${ac_cv_lib_gen_compile+set}" = set; then
12602   echo $ECHO_N "(cached) $ECHO_C" >&6
12603 else
12604   ac_check_lib_save_LIBS=$LIBS
12605 LIBS="-lgen  $LIBS"
12606 cat >conftest.$ac_ext <<_ACEOF
12607 #line 12607 "configure"
12608 #include "confdefs.h"
12609
12610 /* Override any gcc2 internal prototype to avoid an error.  */
12611 #ifdef __cplusplus
12612 extern "C"
12613 #endif
12614 /* We use char because int might match the return type of a gcc2
12615    builtin and then its argument prototype would still apply.  */
12616 char compile ();
12617 int
12618 main ()
12619 {
12620 compile ();
12621   ;
12622   return 0;
12623 }
12624 _ACEOF
12625 rm -f conftest.$ac_objext conftest$ac_exeext
12626 if { (eval echo "$as_me:12626: \"$ac_link\"") >&5
12627   (eval $ac_link) 2>&5
12628   ac_status=$?
12629   echo "$as_me:12629: \$? = $ac_status" >&5
12630   (exit $ac_status); } &&
12631          { ac_try='test -s conftest$ac_exeext'
12632   { (eval echo "$as_me:12632: \"$ac_try\"") >&5
12633   (eval $ac_try) 2>&5
12634   ac_status=$?
12635   echo "$as_me:12635: \$? = $ac_status" >&5
12636   (exit $ac_status); }; }; then
12637   ac_cv_lib_gen_compile=yes
12638 else
12639   echo "$as_me: failed program was:" >&5
12640 cat conftest.$ac_ext >&5
12641 ac_cv_lib_gen_compile=no
12642 fi
12643 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12644 LIBS=$ac_check_lib_save_LIBS
12645 fi
12646 echo "$as_me:12646: result: $ac_cv_lib_gen_compile" >&5
12647 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
12648 if test $ac_cv_lib_gen_compile = yes; then
12649
12650                                 LIBS="-lgen $LIBS"
12651                                 cf_regex_func=compile
12652 fi
12653
12654 fi
12655
12656 fi
12657
12658 if test "$cf_regex_func" = no ; then
12659         { echo "$as_me:12659: WARNING: cannot find regular expression library" >&5
12660 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
12661 fi
12662
12663 echo "$as_me:12663: checking for regular-expression headers" >&5
12664 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
12665 if test "${cf_cv_regex_hdrs+set}" = set; then
12666   echo $ECHO_N "(cached) $ECHO_C" >&6
12667 else
12668
12669 cf_cv_regex_hdrs=no
12670 case $cf_regex_func in #(vi
12671 compile) #(vi
12672         for cf_regex_hdr in regexp.h regexpr.h
12673         do
12674                 cat >conftest.$ac_ext <<_ACEOF
12675 #line 12675 "configure"
12676 #include "confdefs.h"
12677 #include <$cf_regex_hdr>
12678 int
12679 main ()
12680 {
12681
12682                         char *p = compile("", "", "", 0);
12683                         int x = step("", "");
12684
12685   ;
12686   return 0;
12687 }
12688 _ACEOF
12689 rm -f conftest.$ac_objext conftest$ac_exeext
12690 if { (eval echo "$as_me:12690: \"$ac_link\"") >&5
12691   (eval $ac_link) 2>&5
12692   ac_status=$?
12693   echo "$as_me:12693: \$? = $ac_status" >&5
12694   (exit $ac_status); } &&
12695          { ac_try='test -s conftest$ac_exeext'
12696   { (eval echo "$as_me:12696: \"$ac_try\"") >&5
12697   (eval $ac_try) 2>&5
12698   ac_status=$?
12699   echo "$as_me:12699: \$? = $ac_status" >&5
12700   (exit $ac_status); }; }; then
12701
12702                         cf_cv_regex_hdrs=$cf_regex_hdr
12703                         break
12704
12705 else
12706   echo "$as_me: failed program was:" >&5
12707 cat conftest.$ac_ext >&5
12708 fi
12709 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12710         done
12711         ;;
12712 *)
12713         for cf_regex_hdr in regex.h
12714         do
12715                 cat >conftest.$ac_ext <<_ACEOF
12716 #line 12716 "configure"
12717 #include "confdefs.h"
12718 #include <sys/types.h>
12719 #include <$cf_regex_hdr>
12720 int
12721 main ()
12722 {
12723
12724                         regex_t *p;
12725                         int x = regcomp(p, "", 0);
12726                         int y = regexec(p, "", 0, 0, 0);
12727                         regfree(p);
12728
12729   ;
12730   return 0;
12731 }
12732 _ACEOF
12733 rm -f conftest.$ac_objext conftest$ac_exeext
12734 if { (eval echo "$as_me:12734: \"$ac_link\"") >&5
12735   (eval $ac_link) 2>&5
12736   ac_status=$?
12737   echo "$as_me:12737: \$? = $ac_status" >&5
12738   (exit $ac_status); } &&
12739          { ac_try='test -s conftest$ac_exeext'
12740   { (eval echo "$as_me:12740: \"$ac_try\"") >&5
12741   (eval $ac_try) 2>&5
12742   ac_status=$?
12743   echo "$as_me:12743: \$? = $ac_status" >&5
12744   (exit $ac_status); }; }; then
12745
12746                         cf_cv_regex_hdrs=$cf_regex_hdr
12747                         break
12748
12749 else
12750   echo "$as_me: failed program was:" >&5
12751 cat conftest.$ac_ext >&5
12752 fi
12753 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12754         done
12755         ;;
12756 esac
12757
12758 fi
12759 echo "$as_me:12759: result: $cf_cv_regex_hdrs" >&5
12760 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
12761
12762 case $cf_cv_regex_hdrs in #(vi
12763     no)        { echo "$as_me:12763: WARNING: no regular expression header found" >&5
12764 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
12765     regex.h)   cat >>confdefs.h <<\EOF
12766 #define HAVE_REGEX_H_FUNCS 1
12767 EOF
12768  ;; #(vi
12769     regexp.h)  cat >>confdefs.h <<\EOF
12770 #define HAVE_REGEXP_H_FUNCS 1
12771 EOF
12772  ;; #(vi
12773     regexpr.h) cat >>confdefs.h <<\EOF
12774 #define HAVE_REGEXPR_H_FUNCS 1
12775 EOF
12776  ;;
12777 esac
12778
12779 for ac_header in \
12780 fcntl.h \
12781 getopt.h \
12782 limits.h \
12783 locale.h \
12784 poll.h \
12785 sys/bsdtypes.h \
12786 sys/ioctl.h \
12787 sys/param.h \
12788 sys/poll.h \
12789 sys/select.h \
12790 sys/time.h \
12791 sys/times.h \
12792 ttyent.h \
12793 unistd.h \
12794 wctype.h \
12795
12796 do
12797 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12798 echo "$as_me:12798: checking for $ac_header" >&5
12799 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12800 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12801   echo $ECHO_N "(cached) $ECHO_C" >&6
12802 else
12803   cat >conftest.$ac_ext <<_ACEOF
12804 #line 12804 "configure"
12805 #include "confdefs.h"
12806 #include <$ac_header>
12807 _ACEOF
12808 if { (eval echo "$as_me:12808: \"$ac_cpp conftest.$ac_ext\"") >&5
12809   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12810   ac_status=$?
12811   egrep -v '^ *\+' conftest.er1 >conftest.err
12812   rm -f conftest.er1
12813   cat conftest.err >&5
12814   echo "$as_me:12814: \$? = $ac_status" >&5
12815   (exit $ac_status); } >/dev/null; then
12816   if test -s conftest.err; then
12817     ac_cpp_err=$ac_c_preproc_warn_flag
12818   else
12819     ac_cpp_err=
12820   fi
12821 else
12822   ac_cpp_err=yes
12823 fi
12824 if test -z "$ac_cpp_err"; then
12825   eval "$as_ac_Header=yes"
12826 else
12827   echo "$as_me: failed program was:" >&5
12828   cat conftest.$ac_ext >&5
12829   eval "$as_ac_Header=no"
12830 fi
12831 rm -f conftest.err conftest.$ac_ext
12832 fi
12833 echo "$as_me:12833: result: `eval echo '${'$as_ac_Header'}'`" >&5
12834 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12835 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12836   cat >>confdefs.h <<EOF
12837 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12838 EOF
12839
12840 fi
12841 done
12842
12843 # check for ISC (this may also define _POSIX_SOURCE)
12844 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
12845 if test "$ISC" = yes ; then
12846
12847 echo "$as_me:12847: checking for main in -lcposix" >&5
12848 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
12849 if test "${ac_cv_lib_cposix_main+set}" = set; then
12850   echo $ECHO_N "(cached) $ECHO_C" >&6
12851 else
12852   ac_check_lib_save_LIBS=$LIBS
12853 LIBS="-lcposix  $LIBS"
12854 cat >conftest.$ac_ext <<_ACEOF
12855 #line 12855 "configure"
12856 #include "confdefs.h"
12857
12858 int
12859 main ()
12860 {
12861 main ();
12862   ;
12863   return 0;
12864 }
12865 _ACEOF
12866 rm -f conftest.$ac_objext conftest$ac_exeext
12867 if { (eval echo "$as_me:12867: \"$ac_link\"") >&5
12868   (eval $ac_link) 2>&5
12869   ac_status=$?
12870   echo "$as_me:12870: \$? = $ac_status" >&5
12871   (exit $ac_status); } &&
12872          { ac_try='test -s conftest$ac_exeext'
12873   { (eval echo "$as_me:12873: \"$ac_try\"") >&5
12874   (eval $ac_try) 2>&5
12875   ac_status=$?
12876   echo "$as_me:12876: \$? = $ac_status" >&5
12877   (exit $ac_status); }; }; then
12878   ac_cv_lib_cposix_main=yes
12879 else
12880   echo "$as_me: failed program was:" >&5
12881 cat conftest.$ac_ext >&5
12882 ac_cv_lib_cposix_main=no
12883 fi
12884 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12885 LIBS=$ac_check_lib_save_LIBS
12886 fi
12887 echo "$as_me:12887: result: $ac_cv_lib_cposix_main" >&5
12888 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
12889 if test $ac_cv_lib_cposix_main = yes; then
12890   cat >>confdefs.h <<EOF
12891 #define HAVE_LIBCPOSIX 1
12892 EOF
12893
12894   LIBS="-lcposix $LIBS"
12895
12896 fi
12897
12898         echo "$as_me:12898: checking for bzero in -linet" >&5
12899 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
12900 if test "${ac_cv_lib_inet_bzero+set}" = set; then
12901   echo $ECHO_N "(cached) $ECHO_C" >&6
12902 else
12903   ac_check_lib_save_LIBS=$LIBS
12904 LIBS="-linet  $LIBS"
12905 cat >conftest.$ac_ext <<_ACEOF
12906 #line 12906 "configure"
12907 #include "confdefs.h"
12908
12909 /* Override any gcc2 internal prototype to avoid an error.  */
12910 #ifdef __cplusplus
12911 extern "C"
12912 #endif
12913 /* We use char because int might match the return type of a gcc2
12914    builtin and then its argument prototype would still apply.  */
12915 char bzero ();
12916 int
12917 main ()
12918 {
12919 bzero ();
12920   ;
12921   return 0;
12922 }
12923 _ACEOF
12924 rm -f conftest.$ac_objext conftest$ac_exeext
12925 if { (eval echo "$as_me:12925: \"$ac_link\"") >&5
12926   (eval $ac_link) 2>&5
12927   ac_status=$?
12928   echo "$as_me:12928: \$? = $ac_status" >&5
12929   (exit $ac_status); } &&
12930          { ac_try='test -s conftest$ac_exeext'
12931   { (eval echo "$as_me:12931: \"$ac_try\"") >&5
12932   (eval $ac_try) 2>&5
12933   ac_status=$?
12934   echo "$as_me:12934: \$? = $ac_status" >&5
12935   (exit $ac_status); }; }; then
12936   ac_cv_lib_inet_bzero=yes
12937 else
12938   echo "$as_me: failed program was:" >&5
12939 cat conftest.$ac_ext >&5
12940 ac_cv_lib_inet_bzero=no
12941 fi
12942 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12943 LIBS=$ac_check_lib_save_LIBS
12944 fi
12945 echo "$as_me:12945: result: $ac_cv_lib_inet_bzero" >&5
12946 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
12947 if test $ac_cv_lib_inet_bzero = yes; then
12948   LIBS="$LIBS -linet"
12949 fi
12950 fi
12951
12952 echo "$as_me:12952: checking if sys/time.h works with sys/select.h" >&5
12953 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
12954 if test "${cf_cv_sys_time_select+set}" = set; then
12955   echo $ECHO_N "(cached) $ECHO_C" >&6
12956 else
12957
12958 cat >conftest.$ac_ext <<_ACEOF
12959 #line 12959 "configure"
12960 #include "confdefs.h"
12961
12962 #include <sys/types.h>
12963 #ifdef HAVE_SYS_TIME_H
12964 #include <sys/time.h>
12965 #endif
12966 #ifdef HAVE_SYS_SELECT_H
12967 #include <sys/select.h>
12968 #endif
12969
12970 int
12971 main ()
12972 {
12973
12974   ;
12975   return 0;
12976 }
12977 _ACEOF
12978 rm -f conftest.$ac_objext
12979 if { (eval echo "$as_me:12979: \"$ac_compile\"") >&5
12980   (eval $ac_compile) 2>&5
12981   ac_status=$?
12982   echo "$as_me:12982: \$? = $ac_status" >&5
12983   (exit $ac_status); } &&
12984          { ac_try='test -s conftest.$ac_objext'
12985   { (eval echo "$as_me:12985: \"$ac_try\"") >&5
12986   (eval $ac_try) 2>&5
12987   ac_status=$?
12988   echo "$as_me:12988: \$? = $ac_status" >&5
12989   (exit $ac_status); }; }; then
12990   cf_cv_sys_time_select=yes
12991 else
12992   echo "$as_me: failed program was:" >&5
12993 cat conftest.$ac_ext >&5
12994 cf_cv_sys_time_select=no
12995 fi
12996 rm -f conftest.$ac_objext conftest.$ac_ext
12997
12998 fi
12999
13000 echo "$as_me:13000: result: $cf_cv_sys_time_select" >&5
13001 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
13002 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
13003 #define HAVE_SYS_TIME_SELECT 1
13004 EOF
13005
13006 ###     checks for compiler characteristics
13007 ac_ext=c
13008 ac_cpp='$CPP $CPPFLAGS'
13009 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13010 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13011 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13012 ac_main_return=return
13013
13014 echo "$as_me:13014: checking for $CC option to accept ANSI C" >&5
13015 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13016 if test "${ac_cv_prog_cc_stdc+set}" = set; then
13017   echo $ECHO_N "(cached) $ECHO_C" >&6
13018 else
13019   ac_cv_prog_cc_stdc=no
13020 ac_save_CC=$CC
13021 cat >conftest.$ac_ext <<_ACEOF
13022 #line 13022 "configure"
13023 #include "confdefs.h"
13024 #include <stdarg.h>
13025 #include <stdio.h>
13026 #include <sys/types.h>
13027 #include <sys/stat.h>
13028 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
13029 struct buf { int x; };
13030 FILE * (*rcsopen) (struct buf *, struct stat *, int);
13031 static char *e (p, i)
13032      char **p;
13033      int i;
13034 {
13035   return p[i];
13036 }
13037 static char *f (char * (*g) (char **, int), char **p, ...)
13038 {
13039   char *s;
13040   va_list v;
13041   va_start (v,p);
13042   s = g (p, va_arg (v,int));
13043   va_end (v);
13044   return s;
13045 }
13046 int test (int i, double x);
13047 struct s1 {int (*f) (int a);};
13048 struct s2 {int (*f) (double a);};
13049 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13050 int argc;
13051 char **argv;
13052 int
13053 main ()
13054 {
13055 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
13056   ;
13057   return 0;
13058 }
13059 _ACEOF
13060 # Don't try gcc -ansi; that turns off useful extensions and
13061 # breaks some systems' header files.
13062 # AIX                   -qlanglvl=ansi
13063 # Ultrix and OSF/1      -std1
13064 # HP-UX 10.20 and later -Ae
13065 # HP-UX older versions  -Aa -D_HPUX_SOURCE
13066 # SVR4                  -Xc -D__EXTENSIONS__
13067 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13068 do
13069   CC="$ac_save_CC $ac_arg"
13070   rm -f conftest.$ac_objext
13071 if { (eval echo "$as_me:13071: \"$ac_compile\"") >&5
13072   (eval $ac_compile) 2>&5
13073   ac_status=$?
13074   echo "$as_me:13074: \$? = $ac_status" >&5
13075   (exit $ac_status); } &&
13076          { ac_try='test -s conftest.$ac_objext'
13077   { (eval echo "$as_me:13077: \"$ac_try\"") >&5
13078   (eval $ac_try) 2>&5
13079   ac_status=$?
13080   echo "$as_me:13080: \$? = $ac_status" >&5
13081   (exit $ac_status); }; }; then
13082   ac_cv_prog_cc_stdc=$ac_arg
13083 break
13084 else
13085   echo "$as_me: failed program was:" >&5
13086 cat conftest.$ac_ext >&5
13087 fi
13088 rm -f conftest.$ac_objext
13089 done
13090 rm -f conftest.$ac_ext conftest.$ac_objext
13091 CC=$ac_save_CC
13092
13093 fi
13094
13095 case "x$ac_cv_prog_cc_stdc" in
13096   x|xno)
13097     echo "$as_me:13097: result: none needed" >&5
13098 echo "${ECHO_T}none needed" >&6 ;;
13099   *)
13100     echo "$as_me:13100: result: $ac_cv_prog_cc_stdc" >&5
13101 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13102     CC="$CC $ac_cv_prog_cc_stdc" ;;
13103 esac
13104
13105 echo "$as_me:13105: checking for an ANSI C-conforming const" >&5
13106 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13107 if test "${ac_cv_c_const+set}" = set; then
13108   echo $ECHO_N "(cached) $ECHO_C" >&6
13109 else
13110   cat >conftest.$ac_ext <<_ACEOF
13111 #line 13111 "configure"
13112 #include "confdefs.h"
13113
13114 int
13115 main ()
13116 {
13117 /* FIXME: Include the comments suggested by Paul. */
13118 #ifndef __cplusplus
13119   /* Ultrix mips cc rejects this.  */
13120   typedef int charset[2];
13121   const charset x;
13122   /* SunOS 4.1.1 cc rejects this.  */
13123   char const *const *ccp;
13124   char **p;
13125   /* NEC SVR4.0.2 mips cc rejects this.  */
13126   struct point {int x, y;};
13127   static struct point const zero = {0,0};
13128   /* AIX XL C 1.02.0.0 rejects this.
13129      It does not let you subtract one const X* pointer from another in
13130      an arm of an if-expression whose if-part is not a constant
13131      expression */
13132   const char *g = "string";
13133   ccp = &g + (g ? g-g : 0);
13134   /* HPUX 7.0 cc rejects these. */
13135   ++ccp;
13136   p = (char**) ccp;
13137   ccp = (char const *const *) p;
13138   { /* SCO 3.2v4 cc rejects this.  */
13139     char *t;
13140     char const *s = 0 ? (char *) 0 : (char const *) 0;
13141
13142     *t++ = 0;
13143   }
13144   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13145     int x[] = {25, 17};
13146     const int *foo = &x[0];
13147     ++foo;
13148   }
13149   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13150     typedef const int *iptr;
13151     iptr p = 0;
13152     ++p;
13153   }
13154   { /* AIX XL C 1.02.0.0 rejects this saying
13155        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13156     struct s { int j; const int *ap[3]; };
13157     struct s *b; b->j = 5;
13158   }
13159   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13160     const int foo = 10;
13161   }
13162 #endif
13163
13164   ;
13165   return 0;
13166 }
13167 _ACEOF
13168 rm -f conftest.$ac_objext
13169 if { (eval echo "$as_me:13169: \"$ac_compile\"") >&5
13170   (eval $ac_compile) 2>&5
13171   ac_status=$?
13172   echo "$as_me:13172: \$? = $ac_status" >&5
13173   (exit $ac_status); } &&
13174          { ac_try='test -s conftest.$ac_objext'
13175   { (eval echo "$as_me:13175: \"$ac_try\"") >&5
13176   (eval $ac_try) 2>&5
13177   ac_status=$?
13178   echo "$as_me:13178: \$? = $ac_status" >&5
13179   (exit $ac_status); }; }; then
13180   ac_cv_c_const=yes
13181 else
13182   echo "$as_me: failed program was:" >&5
13183 cat conftest.$ac_ext >&5
13184 ac_cv_c_const=no
13185 fi
13186 rm -f conftest.$ac_objext conftest.$ac_ext
13187 fi
13188 echo "$as_me:13188: result: $ac_cv_c_const" >&5
13189 echo "${ECHO_T}$ac_cv_c_const" >&6
13190 if test $ac_cv_c_const = no; then
13191
13192 cat >>confdefs.h <<\EOF
13193 #define const
13194 EOF
13195
13196 fi
13197
13198 echo "$as_me:13198: checking for inline" >&5
13199 echo $ECHO_N "checking for inline... $ECHO_C" >&6
13200 if test "${ac_cv_c_inline+set}" = set; then
13201   echo $ECHO_N "(cached) $ECHO_C" >&6
13202 else
13203   ac_cv_c_inline=no
13204 for ac_kw in inline __inline__ __inline; do
13205   cat >conftest.$ac_ext <<_ACEOF
13206 #line 13206 "configure"
13207 #include "confdefs.h"
13208 #ifndef __cplusplus
13209 static $ac_kw int static_foo () {return 0; }
13210 $ac_kw int foo () {return 0; }
13211 #endif
13212
13213 _ACEOF
13214 rm -f conftest.$ac_objext
13215 if { (eval echo "$as_me:13215: \"$ac_compile\"") >&5
13216   (eval $ac_compile) 2>&5
13217   ac_status=$?
13218   echo "$as_me:13218: \$? = $ac_status" >&5
13219   (exit $ac_status); } &&
13220          { ac_try='test -s conftest.$ac_objext'
13221   { (eval echo "$as_me:13221: \"$ac_try\"") >&5
13222   (eval $ac_try) 2>&5
13223   ac_status=$?
13224   echo "$as_me:13224: \$? = $ac_status" >&5
13225   (exit $ac_status); }; }; then
13226   ac_cv_c_inline=$ac_kw; break
13227 else
13228   echo "$as_me: failed program was:" >&5
13229 cat conftest.$ac_ext >&5
13230 fi
13231 rm -f conftest.$ac_objext conftest.$ac_ext
13232 done
13233
13234 fi
13235 echo "$as_me:13235: result: $ac_cv_c_inline" >&5
13236 echo "${ECHO_T}$ac_cv_c_inline" >&6
13237 case $ac_cv_c_inline in
13238   inline | yes) ;;
13239   no)
13240 cat >>confdefs.h <<\EOF
13241 #define inline
13242 EOF
13243  ;;
13244   *)  cat >>confdefs.h <<EOF
13245 #define inline $ac_cv_c_inline
13246 EOF
13247  ;;
13248 esac
13249
13250 NCURSES_INLINE=
13251 if test "$ac_cv_c_inline" != no ; then
13252   NCURSES_INLINE=inline
13253   if test "$INTEL_COMPILER" = yes
13254   then
13255     :
13256   elif test "$GCC" = yes
13257   then
13258     echo "$as_me:13258: checking if gcc supports options to tune inlining" >&5
13259 echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6
13260 if test "${cf_cv_gcc_inline+set}" = set; then
13261   echo $ECHO_N "(cached) $ECHO_C" >&6
13262 else
13263
13264       cf_save_CFLAGS=$CFLAGS
13265       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
13266       cat >conftest.$ac_ext <<_ACEOF
13267 #line 13267 "configure"
13268 #include "confdefs.h"
13269 inline int foo(void) { return 1; }
13270 int
13271 main ()
13272 {
13273 ${cf_cv_main_return:-return} foo()
13274   ;
13275   return 0;
13276 }
13277 _ACEOF
13278 rm -f conftest.$ac_objext
13279 if { (eval echo "$as_me:13279: \"$ac_compile\"") >&5
13280   (eval $ac_compile) 2>&5
13281   ac_status=$?
13282   echo "$as_me:13282: \$? = $ac_status" >&5
13283   (exit $ac_status); } &&
13284          { ac_try='test -s conftest.$ac_objext'
13285   { (eval echo "$as_me:13285: \"$ac_try\"") >&5
13286   (eval $ac_try) 2>&5
13287   ac_status=$?
13288   echo "$as_me:13288: \$? = $ac_status" >&5
13289   (exit $ac_status); }; }; then
13290   cf_cv_gcc_inline=yes
13291 else
13292   echo "$as_me: failed program was:" >&5
13293 cat conftest.$ac_ext >&5
13294 cf_cv_gcc_inline=no
13295 fi
13296 rm -f conftest.$ac_objext conftest.$ac_ext
13297       CFLAGS=$cf_save_CFLAGS
13298
13299 fi
13300 echo "$as_me:13300: result: $cf_cv_gcc_inline" >&5
13301 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
13302     if test "$cf_cv_gcc_inline" = yes ; then
13303
13304 cf_fix_cppflags=no
13305 cf_new_cflags=
13306 cf_new_cppflags=
13307 cf_new_extra_cppflags=
13308
13309 for cf_add_cflags in --param max-inline-insns-single=1200
13310 do
13311 case $cf_fix_cppflags in
13312 no)
13313         case $cf_add_cflags in #(vi
13314         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13315                 case $cf_add_cflags in
13316                 -D*)
13317                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13318
13319                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13320                                 && test -z "${cf_tst_cflags}" \
13321                                 && cf_fix_cppflags=yes
13322
13323                         if test $cf_fix_cppflags = yes ; then
13324                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13325                                 continue
13326                         elif test "${cf_tst_cflags}" = "\"'" ; then
13327                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13328                                 continue
13329                         fi
13330                         ;;
13331                 esac
13332                 case "$CPPFLAGS" in
13333                 *$cf_add_cflags) #(vi
13334                         ;;
13335                 *) #(vi
13336                         case $cf_add_cflags in #(vi
13337                         -D*)
13338                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13339
13340 CPPFLAGS=`echo "$CPPFLAGS" | \
13341         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13342                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13343
13344                                 ;;
13345                         esac
13346                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13347                         ;;
13348                 esac
13349                 ;;
13350         *)
13351                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13352                 ;;
13353         esac
13354         ;;
13355 yes)
13356         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13357
13358         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13359
13360         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13361                 && test -z "${cf_tst_cflags}" \
13362                 && cf_fix_cppflags=no
13363         ;;
13364 esac
13365 done
13366
13367 if test -n "$cf_new_cflags" ; then
13368
13369         CFLAGS="$CFLAGS $cf_new_cflags"
13370 fi
13371
13372 if test -n "$cf_new_cppflags" ; then
13373
13374         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13375 fi
13376
13377 if test -n "$cf_new_extra_cppflags" ; then
13378
13379         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13380 fi
13381
13382     fi
13383   fi
13384 fi
13385
13386 echo "$as_me:13386: checking for signal global datatype" >&5
13387 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
13388 if test "${cf_cv_sig_atomic_t+set}" = set; then
13389   echo $ECHO_N "(cached) $ECHO_C" >&6
13390 else
13391
13392         for cf_type in \
13393                 "volatile sig_atomic_t" \
13394                 "sig_atomic_t" \
13395                 "int"
13396         do
13397         cat >conftest.$ac_ext <<_ACEOF
13398 #line 13398 "configure"
13399 #include "confdefs.h"
13400
13401 #include <sys/types.h>
13402 #include <signal.h>
13403 #include <stdio.h>
13404
13405 extern $cf_type x;
13406 $cf_type x;
13407 static void handler(int sig)
13408 {
13409         x = 5;
13410 }
13411 int
13412 main ()
13413 {
13414 signal(SIGINT, handler);
13415                  x = 1
13416   ;
13417   return 0;
13418 }
13419 _ACEOF
13420 rm -f conftest.$ac_objext
13421 if { (eval echo "$as_me:13421: \"$ac_compile\"") >&5
13422   (eval $ac_compile) 2>&5
13423   ac_status=$?
13424   echo "$as_me:13424: \$? = $ac_status" >&5
13425   (exit $ac_status); } &&
13426          { ac_try='test -s conftest.$ac_objext'
13427   { (eval echo "$as_me:13427: \"$ac_try\"") >&5
13428   (eval $ac_try) 2>&5
13429   ac_status=$?
13430   echo "$as_me:13430: \$? = $ac_status" >&5
13431   (exit $ac_status); }; }; then
13432   cf_cv_sig_atomic_t=$cf_type
13433 else
13434   echo "$as_me: failed program was:" >&5
13435 cat conftest.$ac_ext >&5
13436 cf_cv_sig_atomic_t=no
13437 fi
13438 rm -f conftest.$ac_objext conftest.$ac_ext
13439                 test "$cf_cv_sig_atomic_t" != no && break
13440         done
13441
13442 fi
13443
13444 echo "$as_me:13444: result: $cf_cv_sig_atomic_t" >&5
13445 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
13446 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
13447 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
13448 EOF
13449
13450 if test $NCURSES_CHTYPE = auto ; then
13451
13452 echo "$as_me:13452: checking for type of chtype" >&5
13453 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13454 if test "${cf_cv_typeof_chtype+set}" = set; then
13455   echo $ECHO_N "(cached) $ECHO_C" >&6
13456 else
13457
13458                 if test "$cross_compiling" = yes; then
13459   cf_cv_typeof_chtype=long
13460 else
13461   cat >conftest.$ac_ext <<_ACEOF
13462 #line 13462 "configure"
13463 #include "confdefs.h"
13464
13465 #define WANT_BITS 31
13466 #include <stdio.h>
13467 int main()
13468 {
13469         FILE *fp = fopen("cf_test.out", "w");
13470         if (fp != 0) {
13471                 char *result = "long";
13472                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
13473                         int n;
13474                         unsigned int x, y;
13475                         for (n = 0; n < WANT_BITS; n++) {
13476                                 x = (1 << n);
13477                                 y = (x >> n);
13478                                 if (y != 1 || x == 0) {
13479                                         x = 0;
13480                                         break;
13481                                 }
13482                         }
13483                         /*
13484                          * If x is nonzero, an int is big enough for the bits
13485                          * that we want.
13486                          */
13487                         result = (x != 0) ? "int" : "long";
13488                 }
13489                 fputs(result, fp);
13490                 fclose(fp);
13491         }
13492         ${cf_cv_main_return:-return}(0);
13493 }
13494
13495 _ACEOF
13496 rm -f conftest$ac_exeext
13497 if { (eval echo "$as_me:13497: \"$ac_link\"") >&5
13498   (eval $ac_link) 2>&5
13499   ac_status=$?
13500   echo "$as_me:13500: \$? = $ac_status" >&5
13501   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13502   { (eval echo "$as_me:13502: \"$ac_try\"") >&5
13503   (eval $ac_try) 2>&5
13504   ac_status=$?
13505   echo "$as_me:13505: \$? = $ac_status" >&5
13506   (exit $ac_status); }; }; then
13507   cf_cv_typeof_chtype=`cat cf_test.out`
13508 else
13509   echo "$as_me: program exited with status $ac_status" >&5
13510 echo "$as_me: failed program was:" >&5
13511 cat conftest.$ac_ext >&5
13512 cf_cv_typeof_chtype=long
13513 fi
13514 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13515 fi
13516                 rm -f cf_test.out
13517
13518 fi
13519
13520 echo "$as_me:13520: result: $cf_cv_typeof_chtype" >&5
13521 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
13522
13523 cat >>confdefs.h <<EOF
13524 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
13525 EOF
13526
13527 else
13528         cf_cv_typeof_chtype=$NCURSES_CHTYPE
13529 fi
13530 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
13531
13532 echo "$as_me:13532: checking if unsigned literals are legal" >&5
13533 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
13534 if test "${cf_cv_unsigned_literals+set}" = set; then
13535   echo $ECHO_N "(cached) $ECHO_C" >&6
13536 else
13537
13538         cat >conftest.$ac_ext <<_ACEOF
13539 #line 13539 "configure"
13540 #include "confdefs.h"
13541
13542 int
13543 main ()
13544 {
13545 long x = 1L + 1UL + 1U + 1
13546   ;
13547   return 0;
13548 }
13549 _ACEOF
13550 rm -f conftest.$ac_objext
13551 if { (eval echo "$as_me:13551: \"$ac_compile\"") >&5
13552   (eval $ac_compile) 2>&5
13553   ac_status=$?
13554   echo "$as_me:13554: \$? = $ac_status" >&5
13555   (exit $ac_status); } &&
13556          { ac_try='test -s conftest.$ac_objext'
13557   { (eval echo "$as_me:13557: \"$ac_try\"") >&5
13558   (eval $ac_try) 2>&5
13559   ac_status=$?
13560   echo "$as_me:13560: \$? = $ac_status" >&5
13561   (exit $ac_status); }; }; then
13562   cf_cv_unsigned_literals=yes
13563 else
13564   echo "$as_me: failed program was:" >&5
13565 cat conftest.$ac_ext >&5
13566 cf_cv_unsigned_literals=no
13567 fi
13568 rm -f conftest.$ac_objext conftest.$ac_ext
13569
13570 fi
13571
13572 echo "$as_me:13572: result: $cf_cv_unsigned_literals" >&5
13573 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
13574
13575 cf_cv_1UL="1"
13576 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
13577 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
13578
13579 if test $NCURSES_MMASK_T = auto ; then
13580         cf_cv_typeof_mmask_t=long
13581 else
13582         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
13583 fi
13584 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
13585
13586 ###     Checks for external-data
13587
13588 echo "$as_me:13588: checking if external errno is declared" >&5
13589 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
13590 if test "${cf_cv_dcl_errno+set}" = set; then
13591   echo $ECHO_N "(cached) $ECHO_C" >&6
13592 else
13593
13594     cat >conftest.$ac_ext <<_ACEOF
13595 #line 13595 "configure"
13596 #include "confdefs.h"
13597
13598 #ifdef HAVE_STDLIB_H
13599 #include <stdlib.h>
13600 #endif
13601 #include <stdio.h>
13602 #include <sys/types.h>
13603 #include <errno.h>
13604 int
13605 main ()
13606 {
13607 int x = (int) errno
13608   ;
13609   return 0;
13610 }
13611 _ACEOF
13612 rm -f conftest.$ac_objext
13613 if { (eval echo "$as_me:13613: \"$ac_compile\"") >&5
13614   (eval $ac_compile) 2>&5
13615   ac_status=$?
13616   echo "$as_me:13616: \$? = $ac_status" >&5
13617   (exit $ac_status); } &&
13618          { ac_try='test -s conftest.$ac_objext'
13619   { (eval echo "$as_me:13619: \"$ac_try\"") >&5
13620   (eval $ac_try) 2>&5
13621   ac_status=$?
13622   echo "$as_me:13622: \$? = $ac_status" >&5
13623   (exit $ac_status); }; }; then
13624   cf_cv_dcl_errno=yes
13625 else
13626   echo "$as_me: failed program was:" >&5
13627 cat conftest.$ac_ext >&5
13628 cf_cv_dcl_errno=no
13629 fi
13630 rm -f conftest.$ac_objext conftest.$ac_ext
13631
13632 fi
13633 echo "$as_me:13633: result: $cf_cv_dcl_errno" >&5
13634 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
13635
13636 if test "$cf_cv_dcl_errno" = no ; then
13637
13638 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13639
13640     cat >>confdefs.h <<EOF
13641 #define $cf_result 1
13642 EOF
13643
13644 fi
13645
13646 # It's possible (for near-UNIX clones) that the data doesn't exist
13647
13648 echo "$as_me:13648: checking if external errno exists" >&5
13649 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
13650 if test "${cf_cv_have_errno+set}" = set; then
13651   echo $ECHO_N "(cached) $ECHO_C" >&6
13652 else
13653
13654     cat >conftest.$ac_ext <<_ACEOF
13655 #line 13655 "configure"
13656 #include "confdefs.h"
13657
13658 #undef errno
13659 extern int errno;
13660
13661 int
13662 main ()
13663 {
13664 errno = 2
13665   ;
13666   return 0;
13667 }
13668 _ACEOF
13669 rm -f conftest.$ac_objext conftest$ac_exeext
13670 if { (eval echo "$as_me:13670: \"$ac_link\"") >&5
13671   (eval $ac_link) 2>&5
13672   ac_status=$?
13673   echo "$as_me:13673: \$? = $ac_status" >&5
13674   (exit $ac_status); } &&
13675          { ac_try='test -s conftest$ac_exeext'
13676   { (eval echo "$as_me:13676: \"$ac_try\"") >&5
13677   (eval $ac_try) 2>&5
13678   ac_status=$?
13679   echo "$as_me:13679: \$? = $ac_status" >&5
13680   (exit $ac_status); }; }; then
13681   cf_cv_have_errno=yes
13682 else
13683   echo "$as_me: failed program was:" >&5
13684 cat conftest.$ac_ext >&5
13685 cf_cv_have_errno=no
13686 fi
13687 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13688
13689 fi
13690 echo "$as_me:13690: result: $cf_cv_have_errno" >&5
13691 echo "${ECHO_T}$cf_cv_have_errno" >&6
13692
13693 if test "$cf_cv_have_errno" = yes ; then
13694
13695 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13696
13697     cat >>confdefs.h <<EOF
13698 #define $cf_result 1
13699 EOF
13700
13701 fi
13702
13703 echo "$as_me:13703: checking if data-only library module links" >&5
13704 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
13705 if test "${cf_cv_link_dataonly+set}" = set; then
13706   echo $ECHO_N "(cached) $ECHO_C" >&6
13707 else
13708
13709         rm -f conftest.a
13710         cat >conftest.$ac_ext <<EOF
13711 #line 13711 "configure"
13712 int     testdata[3] = { 123, 456, 789 };
13713 EOF
13714         if { (eval echo "$as_me:13714: \"$ac_compile\"") >&5
13715   (eval $ac_compile) 2>&5
13716   ac_status=$?
13717   echo "$as_me:13717: \$? = $ac_status" >&5
13718   (exit $ac_status); } ; then
13719                 mv conftest.o data.o && \
13720                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
13721         fi
13722         rm -f conftest.$ac_ext data.o
13723         cat >conftest.$ac_ext <<EOF
13724 #line 13724 "configure"
13725 int     testfunc()
13726 {
13727 #if defined(NeXT)
13728         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
13729 #else
13730         extern int testdata[3];
13731         return testdata[0] == 123
13732            &&  testdata[1] == 456
13733            &&  testdata[2] == 789;
13734 #endif
13735 }
13736 EOF
13737         if { (eval echo "$as_me:13737: \"$ac_compile\"") >&5
13738   (eval $ac_compile) 2>&5
13739   ac_status=$?
13740   echo "$as_me:13740: \$? = $ac_status" >&5
13741   (exit $ac_status); }; then
13742                 mv conftest.o func.o && \
13743                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
13744         fi
13745         rm -f conftest.$ac_ext func.o
13746         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
13747         cf_saveLIBS="$LIBS"
13748         LIBS="conftest.a $LIBS"
13749         if test "$cross_compiling" = yes; then
13750   cf_cv_link_dataonly=unknown
13751 else
13752   cat >conftest.$ac_ext <<_ACEOF
13753 #line 13753 "configure"
13754 #include "confdefs.h"
13755
13756         int main()
13757         {
13758                 extern int testfunc();
13759                 ${cf_cv_main_return:-return} (!testfunc());
13760         }
13761
13762 _ACEOF
13763 rm -f conftest$ac_exeext
13764 if { (eval echo "$as_me:13764: \"$ac_link\"") >&5
13765   (eval $ac_link) 2>&5
13766   ac_status=$?
13767   echo "$as_me:13767: \$? = $ac_status" >&5
13768   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13769   { (eval echo "$as_me:13769: \"$ac_try\"") >&5
13770   (eval $ac_try) 2>&5
13771   ac_status=$?
13772   echo "$as_me:13772: \$? = $ac_status" >&5
13773   (exit $ac_status); }; }; then
13774   cf_cv_link_dataonly=yes
13775 else
13776   echo "$as_me: program exited with status $ac_status" >&5
13777 echo "$as_me: failed program was:" >&5
13778 cat conftest.$ac_ext >&5
13779 cf_cv_link_dataonly=no
13780 fi
13781 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13782 fi
13783         LIBS="$cf_saveLIBS"
13784
13785 fi
13786
13787 echo "$as_me:13787: result: $cf_cv_link_dataonly" >&5
13788 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
13789
13790 if test "$cf_cv_link_dataonly" = no ; then
13791         cat >>confdefs.h <<\EOF
13792 #define BROKEN_LINKER 1
13793 EOF
13794
13795         BROKEN_LINKER=1
13796 fi
13797
13798 ###     Checks for library functions.
13799
13800 for ac_func in \
13801 getcwd \
13802 getegid \
13803 geteuid \
13804 getttynam \
13805 issetugid \
13806 poll \
13807 remove \
13808 select \
13809 setbuf \
13810 setbuffer \
13811 setvbuf \
13812 sigaction \
13813 sigvec \
13814 strdup \
13815 strstr \
13816 tcgetpgrp \
13817 times \
13818 vsnprintf \
13819
13820 do
13821 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13822 echo "$as_me:13822: checking for $ac_func" >&5
13823 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13824 if eval "test \"\${$as_ac_var+set}\" = set"; then
13825   echo $ECHO_N "(cached) $ECHO_C" >&6
13826 else
13827   cat >conftest.$ac_ext <<_ACEOF
13828 #line 13828 "configure"
13829 #include "confdefs.h"
13830 /* System header to define __stub macros and hopefully few prototypes,
13831     which can conflict with char $ac_func (); below.  */
13832 #include <assert.h>
13833 /* Override any gcc2 internal prototype to avoid an error.  */
13834 #ifdef __cplusplus
13835 extern "C"
13836 #endif
13837 /* We use char because int might match the return type of a gcc2
13838    builtin and then its argument prototype would still apply.  */
13839 char $ac_func ();
13840 char (*f) ();
13841
13842 int
13843 main ()
13844 {
13845 /* The GNU C library defines this for functions which it implements
13846     to always fail with ENOSYS.  Some functions are actually named
13847     something starting with __ and the normal name is an alias.  */
13848 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13849 choke me
13850 #else
13851 f = $ac_func;
13852 #endif
13853
13854   ;
13855   return 0;
13856 }
13857 _ACEOF
13858 rm -f conftest.$ac_objext conftest$ac_exeext
13859 if { (eval echo "$as_me:13859: \"$ac_link\"") >&5
13860   (eval $ac_link) 2>&5
13861   ac_status=$?
13862   echo "$as_me:13862: \$? = $ac_status" >&5
13863   (exit $ac_status); } &&
13864          { ac_try='test -s conftest$ac_exeext'
13865   { (eval echo "$as_me:13865: \"$ac_try\"") >&5
13866   (eval $ac_try) 2>&5
13867   ac_status=$?
13868   echo "$as_me:13868: \$? = $ac_status" >&5
13869   (exit $ac_status); }; }; then
13870   eval "$as_ac_var=yes"
13871 else
13872   echo "$as_me: failed program was:" >&5
13873 cat conftest.$ac_ext >&5
13874 eval "$as_ac_var=no"
13875 fi
13876 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13877 fi
13878 echo "$as_me:13878: result: `eval echo '${'$as_ac_var'}'`" >&5
13879 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13880 if test `eval echo '${'$as_ac_var'}'` = yes; then
13881   cat >>confdefs.h <<EOF
13882 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13883 EOF
13884
13885 fi
13886 done
13887
13888 if test "$with_getcap" = "yes" ; then
13889
13890 echo "$as_me:13890: checking for terminal-capability database functions" >&5
13891 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
13892 if test "${cf_cv_cgetent+set}" = set; then
13893   echo $ECHO_N "(cached) $ECHO_C" >&6
13894 else
13895
13896 cat >conftest.$ac_ext <<_ACEOF
13897 #line 13897 "configure"
13898 #include "confdefs.h"
13899
13900 #include <stdlib.h>
13901 int
13902 main ()
13903 {
13904
13905         char temp[128];
13906         char *buf = temp;
13907         char *db_array = temp;
13908         cgetent(&buf, /* int *, */ &db_array, "vt100");
13909         cgetcap(buf, "tc", '=');
13910         cgetmatch(buf, "tc");
13911
13912   ;
13913   return 0;
13914 }
13915 _ACEOF
13916 rm -f conftest.$ac_objext conftest$ac_exeext
13917 if { (eval echo "$as_me:13917: \"$ac_link\"") >&5
13918   (eval $ac_link) 2>&5
13919   ac_status=$?
13920   echo "$as_me:13920: \$? = $ac_status" >&5
13921   (exit $ac_status); } &&
13922          { ac_try='test -s conftest$ac_exeext'
13923   { (eval echo "$as_me:13923: \"$ac_try\"") >&5
13924   (eval $ac_try) 2>&5
13925   ac_status=$?
13926   echo "$as_me:13926: \$? = $ac_status" >&5
13927   (exit $ac_status); }; }; then
13928   cf_cv_cgetent=yes
13929 else
13930   echo "$as_me: failed program was:" >&5
13931 cat conftest.$ac_ext >&5
13932 cf_cv_cgetent=no
13933 fi
13934 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13935
13936 fi
13937
13938 echo "$as_me:13938: result: $cf_cv_cgetent" >&5
13939 echo "${ECHO_T}$cf_cv_cgetent" >&6
13940 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
13941 #define HAVE_BSD_CGETENT 1
13942 EOF
13943
13944 fi
13945
13946 echo "$as_me:13946: checking for isascii" >&5
13947 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
13948 if test "${cf_cv_have_isascii+set}" = set; then
13949   echo $ECHO_N "(cached) $ECHO_C" >&6
13950 else
13951
13952         cat >conftest.$ac_ext <<_ACEOF
13953 #line 13953 "configure"
13954 #include "confdefs.h"
13955 #include <ctype.h>
13956 int
13957 main ()
13958 {
13959 int x = isascii(' ')
13960   ;
13961   return 0;
13962 }
13963 _ACEOF
13964 rm -f conftest.$ac_objext conftest$ac_exeext
13965 if { (eval echo "$as_me:13965: \"$ac_link\"") >&5
13966   (eval $ac_link) 2>&5
13967   ac_status=$?
13968   echo "$as_me:13968: \$? = $ac_status" >&5
13969   (exit $ac_status); } &&
13970          { ac_try='test -s conftest$ac_exeext'
13971   { (eval echo "$as_me:13971: \"$ac_try\"") >&5
13972   (eval $ac_try) 2>&5
13973   ac_status=$?
13974   echo "$as_me:13974: \$? = $ac_status" >&5
13975   (exit $ac_status); }; }; then
13976   cf_cv_have_isascii=yes
13977 else
13978   echo "$as_me: failed program was:" >&5
13979 cat conftest.$ac_ext >&5
13980 cf_cv_have_isascii=no
13981 fi
13982 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13983
13984 fi
13985 echo "$as_me:13985: result: $cf_cv_have_isascii" >&5
13986 echo "${ECHO_T}$cf_cv_have_isascii" >&6
13987 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
13988 #define HAVE_ISASCII 1
13989 EOF
13990
13991 if test "$ac_cv_func_sigaction" = yes; then
13992 echo "$as_me:13992: checking whether sigaction needs _POSIX_SOURCE" >&5
13993 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
13994 cat >conftest.$ac_ext <<_ACEOF
13995 #line 13995 "configure"
13996 #include "confdefs.h"
13997
13998 #include <sys/types.h>
13999 #include <signal.h>
14000 int
14001 main ()
14002 {
14003 struct sigaction act
14004   ;
14005   return 0;
14006 }
14007 _ACEOF
14008 rm -f conftest.$ac_objext
14009 if { (eval echo "$as_me:14009: \"$ac_compile\"") >&5
14010   (eval $ac_compile) 2>&5
14011   ac_status=$?
14012   echo "$as_me:14012: \$? = $ac_status" >&5
14013   (exit $ac_status); } &&
14014          { ac_try='test -s conftest.$ac_objext'
14015   { (eval echo "$as_me:14015: \"$ac_try\"") >&5
14016   (eval $ac_try) 2>&5
14017   ac_status=$?
14018   echo "$as_me:14018: \$? = $ac_status" >&5
14019   (exit $ac_status); }; }; then
14020   sigact_bad=no
14021 else
14022   echo "$as_me: failed program was:" >&5
14023 cat conftest.$ac_ext >&5
14024
14025 cat >conftest.$ac_ext <<_ACEOF
14026 #line 14026 "configure"
14027 #include "confdefs.h"
14028
14029 #define _POSIX_SOURCE
14030 #include <sys/types.h>
14031 #include <signal.h>
14032 int
14033 main ()
14034 {
14035 struct sigaction act
14036   ;
14037   return 0;
14038 }
14039 _ACEOF
14040 rm -f conftest.$ac_objext
14041 if { (eval echo "$as_me:14041: \"$ac_compile\"") >&5
14042   (eval $ac_compile) 2>&5
14043   ac_status=$?
14044   echo "$as_me:14044: \$? = $ac_status" >&5
14045   (exit $ac_status); } &&
14046          { ac_try='test -s conftest.$ac_objext'
14047   { (eval echo "$as_me:14047: \"$ac_try\"") >&5
14048   (eval $ac_try) 2>&5
14049   ac_status=$?
14050   echo "$as_me:14050: \$? = $ac_status" >&5
14051   (exit $ac_status); }; }; then
14052   sigact_bad=yes
14053          cat >>confdefs.h <<\EOF
14054 #define SVR4_ACTION 1
14055 EOF
14056
14057 else
14058   echo "$as_me: failed program was:" >&5
14059 cat conftest.$ac_ext >&5
14060 sigact_bad=unknown
14061 fi
14062 rm -f conftest.$ac_objext conftest.$ac_ext
14063 fi
14064 rm -f conftest.$ac_objext conftest.$ac_ext
14065 echo "$as_me:14065: result: $sigact_bad" >&5
14066 echo "${ECHO_T}$sigact_bad" >&6
14067 fi
14068
14069 echo "$as_me:14069: checking if nanosleep really works" >&5
14070 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
14071 if test "${cf_cv_func_nanosleep+set}" = set; then
14072   echo $ECHO_N "(cached) $ECHO_C" >&6
14073 else
14074
14075 if test "$cross_compiling" = yes; then
14076   cf_cv_func_nanosleep=unknown
14077 else
14078   cat >conftest.$ac_ext <<_ACEOF
14079 #line 14079 "configure"
14080 #include "confdefs.h"
14081
14082 #include <stdio.h>
14083 #include <errno.h>
14084 #include <time.h>
14085
14086 #ifdef HAVE_SYS_TIME_H
14087 #include <sys/time.h>
14088 #endif
14089
14090 int main() {
14091         struct timespec ts1, ts2;
14092         int code;
14093         ts1.tv_sec  = 0;
14094         ts1.tv_nsec = 750000000;
14095         ts2.tv_sec  = 0;
14096         ts2.tv_nsec = 0;
14097         errno = 0;
14098         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
14099         ${cf_cv_main_return:-return}(code != 0);
14100 }
14101
14102 _ACEOF
14103 rm -f conftest$ac_exeext
14104 if { (eval echo "$as_me:14104: \"$ac_link\"") >&5
14105   (eval $ac_link) 2>&5
14106   ac_status=$?
14107   echo "$as_me:14107: \$? = $ac_status" >&5
14108   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14109   { (eval echo "$as_me:14109: \"$ac_try\"") >&5
14110   (eval $ac_try) 2>&5
14111   ac_status=$?
14112   echo "$as_me:14112: \$? = $ac_status" >&5
14113   (exit $ac_status); }; }; then
14114   cf_cv_func_nanosleep=yes
14115 else
14116   echo "$as_me: program exited with status $ac_status" >&5
14117 echo "$as_me: failed program was:" >&5
14118 cat conftest.$ac_ext >&5
14119 cf_cv_func_nanosleep=no
14120 fi
14121 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14122 fi
14123 fi
14124 echo "$as_me:14124: result: $cf_cv_func_nanosleep" >&5
14125 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
14126
14127 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
14128 #define HAVE_NANOSLEEP 1
14129 EOF
14130
14131 for ac_header in \
14132 termio.h \
14133 termios.h \
14134 unistd.h \
14135
14136 do
14137 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14138 echo "$as_me:14138: checking for $ac_header" >&5
14139 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14140 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14141   echo $ECHO_N "(cached) $ECHO_C" >&6
14142 else
14143   cat >conftest.$ac_ext <<_ACEOF
14144 #line 14144 "configure"
14145 #include "confdefs.h"
14146 #include <$ac_header>
14147 _ACEOF
14148 if { (eval echo "$as_me:14148: \"$ac_cpp conftest.$ac_ext\"") >&5
14149   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14150   ac_status=$?
14151   egrep -v '^ *\+' conftest.er1 >conftest.err
14152   rm -f conftest.er1
14153   cat conftest.err >&5
14154   echo "$as_me:14154: \$? = $ac_status" >&5
14155   (exit $ac_status); } >/dev/null; then
14156   if test -s conftest.err; then
14157     ac_cpp_err=$ac_c_preproc_warn_flag
14158   else
14159     ac_cpp_err=
14160   fi
14161 else
14162   ac_cpp_err=yes
14163 fi
14164 if test -z "$ac_cpp_err"; then
14165   eval "$as_ac_Header=yes"
14166 else
14167   echo "$as_me: failed program was:" >&5
14168   cat conftest.$ac_ext >&5
14169   eval "$as_ac_Header=no"
14170 fi
14171 rm -f conftest.err conftest.$ac_ext
14172 fi
14173 echo "$as_me:14173: result: `eval echo '${'$as_ac_Header'}'`" >&5
14174 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14175 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14176   cat >>confdefs.h <<EOF
14177 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14178 EOF
14179
14180 fi
14181 done
14182
14183 if test "$ISC" = yes ; then
14184
14185 for ac_header in sys/termio.h
14186 do
14187 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14188 echo "$as_me:14188: checking for $ac_header" >&5
14189 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14190 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14191   echo $ECHO_N "(cached) $ECHO_C" >&6
14192 else
14193   cat >conftest.$ac_ext <<_ACEOF
14194 #line 14194 "configure"
14195 #include "confdefs.h"
14196 #include <$ac_header>
14197 _ACEOF
14198 if { (eval echo "$as_me:14198: \"$ac_cpp conftest.$ac_ext\"") >&5
14199   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14200   ac_status=$?
14201   egrep -v '^ *\+' conftest.er1 >conftest.err
14202   rm -f conftest.er1
14203   cat conftest.err >&5
14204   echo "$as_me:14204: \$? = $ac_status" >&5
14205   (exit $ac_status); } >/dev/null; then
14206   if test -s conftest.err; then
14207     ac_cpp_err=$ac_c_preproc_warn_flag
14208   else
14209     ac_cpp_err=
14210   fi
14211 else
14212   ac_cpp_err=yes
14213 fi
14214 if test -z "$ac_cpp_err"; then
14215   eval "$as_ac_Header=yes"
14216 else
14217   echo "$as_me: failed program was:" >&5
14218   cat conftest.$ac_ext >&5
14219   eval "$as_ac_Header=no"
14220 fi
14221 rm -f conftest.err conftest.$ac_ext
14222 fi
14223 echo "$as_me:14223: result: `eval echo '${'$as_ac_Header'}'`" >&5
14224 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14225 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14226   cat >>confdefs.h <<EOF
14227 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14228 EOF
14229
14230 fi
14231 done
14232
14233 fi
14234 if test "$ac_cv_header_termios_h" = yes ; then
14235         case "$CFLAGS $CPPFLAGS" in
14236         *-D_POSIX_SOURCE*)
14237                 termios_bad=dunno ;;
14238         *)      termios_bad=maybe ;;
14239         esac
14240         if test "$termios_bad" = maybe ; then
14241         echo "$as_me:14241: checking whether termios.h needs _POSIX_SOURCE" >&5
14242 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
14243         cat >conftest.$ac_ext <<_ACEOF
14244 #line 14244 "configure"
14245 #include "confdefs.h"
14246 #include <termios.h>
14247 int
14248 main ()
14249 {
14250 struct termios foo; int x = foo.c_iflag
14251   ;
14252   return 0;
14253 }
14254 _ACEOF
14255 rm -f conftest.$ac_objext
14256 if { (eval echo "$as_me:14256: \"$ac_compile\"") >&5
14257   (eval $ac_compile) 2>&5
14258   ac_status=$?
14259   echo "$as_me:14259: \$? = $ac_status" >&5
14260   (exit $ac_status); } &&
14261          { ac_try='test -s conftest.$ac_objext'
14262   { (eval echo "$as_me:14262: \"$ac_try\"") >&5
14263   (eval $ac_try) 2>&5
14264   ac_status=$?
14265   echo "$as_me:14265: \$? = $ac_status" >&5
14266   (exit $ac_status); }; }; then
14267   termios_bad=no
14268 else
14269   echo "$as_me: failed program was:" >&5
14270 cat conftest.$ac_ext >&5
14271
14272                 cat >conftest.$ac_ext <<_ACEOF
14273 #line 14273 "configure"
14274 #include "confdefs.h"
14275
14276 #define _POSIX_SOURCE
14277 #include <termios.h>
14278 int
14279 main ()
14280 {
14281 struct termios foo; int x = foo.c_iflag
14282   ;
14283   return 0;
14284 }
14285 _ACEOF
14286 rm -f conftest.$ac_objext
14287 if { (eval echo "$as_me:14287: \"$ac_compile\"") >&5
14288   (eval $ac_compile) 2>&5
14289   ac_status=$?
14290   echo "$as_me:14290: \$? = $ac_status" >&5
14291   (exit $ac_status); } &&
14292          { ac_try='test -s conftest.$ac_objext'
14293   { (eval echo "$as_me:14293: \"$ac_try\"") >&5
14294   (eval $ac_try) 2>&5
14295   ac_status=$?
14296   echo "$as_me:14296: \$? = $ac_status" >&5
14297   (exit $ac_status); }; }; then
14298   termios_bad=unknown
14299 else
14300   echo "$as_me: failed program was:" >&5
14301 cat conftest.$ac_ext >&5
14302 termios_bad=yes cat >>confdefs.h <<\EOF
14303 #define SVR4_TERMIO 1
14304 EOF
14305
14306 fi
14307 rm -f conftest.$ac_objext conftest.$ac_ext
14308
14309 fi
14310 rm -f conftest.$ac_objext conftest.$ac_ext
14311         echo "$as_me:14311: result: $termios_bad" >&5
14312 echo "${ECHO_T}$termios_bad" >&6
14313         fi
14314 fi
14315
14316 echo "$as_me:14316: checking for tcgetattr" >&5
14317 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
14318 if test "${cf_cv_have_tcgetattr+set}" = set; then
14319   echo $ECHO_N "(cached) $ECHO_C" >&6
14320 else
14321
14322 cat >conftest.$ac_ext <<_ACEOF
14323 #line 14323 "configure"
14324 #include "confdefs.h"
14325
14326 #include <sys/types.h>
14327 #ifdef HAVE_UNISTD_H
14328 #include <unistd.h>
14329 #endif
14330 #ifdef HAVE_TERMIOS_H
14331 #include <termios.h>
14332 #define TTY struct termios
14333 #else
14334 #ifdef HAVE_TERMIO_H
14335 #include <termio.h>
14336 #define TTY struct termio
14337 #endif
14338 #endif
14339
14340 int
14341 main ()
14342 {
14343
14344 TTY foo;
14345 tcgetattr(1, &foo);
14346   ;
14347   return 0;
14348 }
14349 _ACEOF
14350 rm -f conftest.$ac_objext conftest$ac_exeext
14351 if { (eval echo "$as_me:14351: \"$ac_link\"") >&5
14352   (eval $ac_link) 2>&5
14353   ac_status=$?
14354   echo "$as_me:14354: \$? = $ac_status" >&5
14355   (exit $ac_status); } &&
14356          { ac_try='test -s conftest$ac_exeext'
14357   { (eval echo "$as_me:14357: \"$ac_try\"") >&5
14358   (eval $ac_try) 2>&5
14359   ac_status=$?
14360   echo "$as_me:14360: \$? = $ac_status" >&5
14361   (exit $ac_status); }; }; then
14362   cf_cv_have_tcgetattr=yes
14363 else
14364   echo "$as_me: failed program was:" >&5
14365 cat conftest.$ac_ext >&5
14366 cf_cv_have_tcgetattr=no
14367 fi
14368 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14369 fi
14370 echo "$as_me:14370: result: $cf_cv_have_tcgetattr" >&5
14371 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
14372 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
14373 #define HAVE_TCGETATTR 1
14374 EOF
14375
14376 echo "$as_me:14376: checking for vsscanf function or workaround" >&5
14377 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
14378 if test "${cf_cv_func_vsscanf+set}" = set; then
14379   echo $ECHO_N "(cached) $ECHO_C" >&6
14380 else
14381
14382 cat >conftest.$ac_ext <<_ACEOF
14383 #line 14383 "configure"
14384 #include "confdefs.h"
14385
14386 #include <stdarg.h>
14387 #include <stdio.h>
14388 int
14389 main ()
14390 {
14391
14392         va_list ap;
14393         vsscanf("from", "%d", ap)
14394   ;
14395   return 0;
14396 }
14397 _ACEOF
14398 rm -f conftest.$ac_objext conftest$ac_exeext
14399 if { (eval echo "$as_me:14399: \"$ac_link\"") >&5
14400   (eval $ac_link) 2>&5
14401   ac_status=$?
14402   echo "$as_me:14402: \$? = $ac_status" >&5
14403   (exit $ac_status); } &&
14404          { ac_try='test -s conftest$ac_exeext'
14405   { (eval echo "$as_me:14405: \"$ac_try\"") >&5
14406   (eval $ac_try) 2>&5
14407   ac_status=$?
14408   echo "$as_me:14408: \$? = $ac_status" >&5
14409   (exit $ac_status); }; }; then
14410   cf_cv_func_vsscanf=vsscanf
14411 else
14412   echo "$as_me: failed program was:" >&5
14413 cat conftest.$ac_ext >&5
14414
14415 cat >conftest.$ac_ext <<_ACEOF
14416 #line 14416 "configure"
14417 #include "confdefs.h"
14418
14419 #include <stdarg.h>
14420 #include <stdio.h>
14421 int
14422 main ()
14423 {
14424
14425     FILE strbuf;
14426     char *str = "from";
14427
14428     strbuf._flag = _IOREAD;
14429     strbuf._ptr = strbuf._base = (unsigned char *) str;
14430     strbuf._cnt = strlen(str);
14431     strbuf._file = _NFILE;
14432     return (vfscanf(&strbuf, "%d", ap))
14433   ;
14434   return 0;
14435 }
14436 _ACEOF
14437 rm -f conftest.$ac_objext conftest$ac_exeext
14438 if { (eval echo "$as_me:14438: \"$ac_link\"") >&5
14439   (eval $ac_link) 2>&5
14440   ac_status=$?
14441   echo "$as_me:14441: \$? = $ac_status" >&5
14442   (exit $ac_status); } &&
14443          { ac_try='test -s conftest$ac_exeext'
14444   { (eval echo "$as_me:14444: \"$ac_try\"") >&5
14445   (eval $ac_try) 2>&5
14446   ac_status=$?
14447   echo "$as_me:14447: \$? = $ac_status" >&5
14448   (exit $ac_status); }; }; then
14449   cf_cv_func_vsscanf=vfscanf
14450 else
14451   echo "$as_me: failed program was:" >&5
14452 cat conftest.$ac_ext >&5
14453
14454 cat >conftest.$ac_ext <<_ACEOF
14455 #line 14455 "configure"
14456 #include "confdefs.h"
14457
14458 #include <stdarg.h>
14459 #include <stdio.h>
14460 int
14461 main ()
14462 {
14463
14464     FILE strbuf;
14465     char *str = "from";
14466
14467     strbuf._flag = _IOREAD;
14468     strbuf._ptr = strbuf._base = (unsigned char *) str;
14469     strbuf._cnt = strlen(str);
14470     strbuf._file = _NFILE;
14471     return (_doscan(&strbuf, "%d", ap))
14472   ;
14473   return 0;
14474 }
14475 _ACEOF
14476 rm -f conftest.$ac_objext conftest$ac_exeext
14477 if { (eval echo "$as_me:14477: \"$ac_link\"") >&5
14478   (eval $ac_link) 2>&5
14479   ac_status=$?
14480   echo "$as_me:14480: \$? = $ac_status" >&5
14481   (exit $ac_status); } &&
14482          { ac_try='test -s conftest$ac_exeext'
14483   { (eval echo "$as_me:14483: \"$ac_try\"") >&5
14484   (eval $ac_try) 2>&5
14485   ac_status=$?
14486   echo "$as_me:14486: \$? = $ac_status" >&5
14487   (exit $ac_status); }; }; then
14488   cf_cv_func_vsscanf=_doscan
14489 else
14490   echo "$as_me: failed program was:" >&5
14491 cat conftest.$ac_ext >&5
14492
14493 cf_cv_func_vsscanf=no
14494 fi
14495 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14496 fi
14497 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14498 fi
14499 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14500 fi
14501 echo "$as_me:14501: result: $cf_cv_func_vsscanf" >&5
14502 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
14503
14504 case $cf_cv_func_vsscanf in #(vi
14505 vsscanf) cat >>confdefs.h <<\EOF
14506 #define HAVE_VSSCANF 1
14507 EOF
14508 ;; #(vi
14509 vfscanf) cat >>confdefs.h <<\EOF
14510 #define HAVE_VFSCANF 1
14511 EOF
14512 ;; #(vi
14513 _doscan) cat >>confdefs.h <<\EOF
14514 #define HAVE__DOSCAN 1
14515 EOF
14516 ;;
14517 esac
14518
14519 echo "$as_me:14519: checking for working mkstemp" >&5
14520 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
14521 if test "${cf_cv_func_mkstemp+set}" = set; then
14522   echo $ECHO_N "(cached) $ECHO_C" >&6
14523 else
14524
14525 rm -f conftest*
14526 if test "$cross_compiling" = yes; then
14527   echo "$as_me:14527: checking for mkstemp" >&5
14528 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
14529 if test "${ac_cv_func_mkstemp+set}" = set; then
14530   echo $ECHO_N "(cached) $ECHO_C" >&6
14531 else
14532   cat >conftest.$ac_ext <<_ACEOF
14533 #line 14533 "configure"
14534 #include "confdefs.h"
14535 /* System header to define __stub macros and hopefully few prototypes,
14536     which can conflict with char mkstemp (); below.  */
14537 #include <assert.h>
14538 /* Override any gcc2 internal prototype to avoid an error.  */
14539 #ifdef __cplusplus
14540 extern "C"
14541 #endif
14542 /* We use char because int might match the return type of a gcc2
14543    builtin and then its argument prototype would still apply.  */
14544 char mkstemp ();
14545 char (*f) ();
14546
14547 int
14548 main ()
14549 {
14550 /* The GNU C library defines this for functions which it implements
14551     to always fail with ENOSYS.  Some functions are actually named
14552     something starting with __ and the normal name is an alias.  */
14553 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
14554 choke me
14555 #else
14556 f = mkstemp;
14557 #endif
14558
14559   ;
14560   return 0;
14561 }
14562 _ACEOF
14563 rm -f conftest.$ac_objext conftest$ac_exeext
14564 if { (eval echo "$as_me:14564: \"$ac_link\"") >&5
14565   (eval $ac_link) 2>&5
14566   ac_status=$?
14567   echo "$as_me:14567: \$? = $ac_status" >&5
14568   (exit $ac_status); } &&
14569          { ac_try='test -s conftest$ac_exeext'
14570   { (eval echo "$as_me:14570: \"$ac_try\"") >&5
14571   (eval $ac_try) 2>&5
14572   ac_status=$?
14573   echo "$as_me:14573: \$? = $ac_status" >&5
14574   (exit $ac_status); }; }; then
14575   ac_cv_func_mkstemp=yes
14576 else
14577   echo "$as_me: failed program was:" >&5
14578 cat conftest.$ac_ext >&5
14579 ac_cv_func_mkstemp=no
14580 fi
14581 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14582 fi
14583 echo "$as_me:14583: result: $ac_cv_func_mkstemp" >&5
14584 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
14585
14586 else
14587   cat >conftest.$ac_ext <<_ACEOF
14588 #line 14588 "configure"
14589 #include "confdefs.h"
14590
14591 #include <sys/types.h>
14592 #include <stdlib.h>
14593 #include <stdio.h>
14594 #include <string.h>
14595 #include <sys/stat.h>
14596 int main()
14597 {
14598         char *tmpl = "conftestXXXXXX";
14599         char name[2][80];
14600         int n;
14601         int result = 0;
14602         int fd;
14603         struct stat sb;
14604
14605         umask(077);
14606         for (n = 0; n < 2; ++n) {
14607                 strcpy(name[n], tmpl);
14608                 if ((fd = mkstemp(name[n])) >= 0) {
14609                         if (!strcmp(name[n], tmpl)
14610                          || stat(name[n], &sb) != 0
14611                          || (sb.st_mode & S_IFMT) != S_IFREG
14612                          || (sb.st_mode & 077) != 0) {
14613                                 result = 1;
14614                         }
14615                         close(fd);
14616                 }
14617         }
14618         if (result == 0
14619          && !strcmp(name[0], name[1]))
14620                 result = 1;
14621         ${cf_cv_main_return:-return}(result);
14622 }
14623
14624 _ACEOF
14625 rm -f conftest$ac_exeext
14626 if { (eval echo "$as_me:14626: \"$ac_link\"") >&5
14627   (eval $ac_link) 2>&5
14628   ac_status=$?
14629   echo "$as_me:14629: \$? = $ac_status" >&5
14630   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14631   { (eval echo "$as_me:14631: \"$ac_try\"") >&5
14632   (eval $ac_try) 2>&5
14633   ac_status=$?
14634   echo "$as_me:14634: \$? = $ac_status" >&5
14635   (exit $ac_status); }; }; then
14636   cf_cv_func_mkstemp=yes
14637
14638 else
14639   echo "$as_me: program exited with status $ac_status" >&5
14640 echo "$as_me: failed program was:" >&5
14641 cat conftest.$ac_ext >&5
14642 cf_cv_func_mkstemp=no
14643
14644 fi
14645 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14646 fi
14647
14648 fi
14649 echo "$as_me:14649: result: $cf_cv_func_mkstemp" >&5
14650 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
14651 if test "$cf_cv_func_mkstemp" = yes ; then
14652         cat >>confdefs.h <<\EOF
14653 #define HAVE_MKSTEMP 1
14654 EOF
14655
14656 fi
14657
14658 # setup for prototype of fallback for vsscanf()
14659
14660 if test "$cf_cv_func_vsscanf" = vsscanf ; then
14661         HAVE_VSSCANF=1
14662 else
14663         HAVE_VSSCANF=0
14664 fi
14665
14666 if test "$cross_compiling" = yes ; then
14667         { echo "$as_me:14667: WARNING: cross compiling: assume setvbuf params not reversed" >&5
14668 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
14669 else
14670         echo "$as_me:14670: checking whether setvbuf arguments are reversed" >&5
14671 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
14672 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
14673   echo $ECHO_N "(cached) $ECHO_C" >&6
14674 else
14675   if test "$cross_compiling" = yes; then
14676   { { echo "$as_me:14676: error: cannot run test program while cross compiling" >&5
14677 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14678    { (exit 1); exit 1; }; }
14679 else
14680   cat >conftest.$ac_ext <<_ACEOF
14681 #line 14681 "configure"
14682 #include "confdefs.h"
14683 #include <stdio.h>
14684 /* If setvbuf has the reversed format, exit 0. */
14685 int
14686 main ()
14687 {
14688   /* This call has the arguments reversed.
14689      A reversed system may check and see that the address of main
14690      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
14691   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
14692     $ac_main_return(1);
14693   putc('\r', stdout);
14694   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
14695 }
14696 _ACEOF
14697 rm -f conftest$ac_exeext
14698 if { (eval echo "$as_me:14698: \"$ac_link\"") >&5
14699   (eval $ac_link) 2>&5
14700   ac_status=$?
14701   echo "$as_me:14701: \$? = $ac_status" >&5
14702   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14703   { (eval echo "$as_me:14703: \"$ac_try\"") >&5
14704   (eval $ac_try) 2>&5
14705   ac_status=$?
14706   echo "$as_me:14706: \$? = $ac_status" >&5
14707   (exit $ac_status); }; }; then
14708   ac_cv_func_setvbuf_reversed=yes
14709 else
14710   echo "$as_me: program exited with status $ac_status" >&5
14711 echo "$as_me: failed program was:" >&5
14712 cat conftest.$ac_ext >&5
14713 ac_cv_func_setvbuf_reversed=no
14714 fi
14715 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14716 fi
14717 rm -f core core.* *.core
14718 fi
14719 echo "$as_me:14719: result: $ac_cv_func_setvbuf_reversed" >&5
14720 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
14721 if test $ac_cv_func_setvbuf_reversed = yes; then
14722
14723 cat >>confdefs.h <<\EOF
14724 #define SETVBUF_REVERSED 1
14725 EOF
14726
14727 fi
14728
14729 fi
14730 echo "$as_me:14730: checking return type of signal handlers" >&5
14731 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
14732 if test "${ac_cv_type_signal+set}" = set; then
14733   echo $ECHO_N "(cached) $ECHO_C" >&6
14734 else
14735   cat >conftest.$ac_ext <<_ACEOF
14736 #line 14736 "configure"
14737 #include "confdefs.h"
14738 #include <sys/types.h>
14739 #include <signal.h>
14740 #ifdef signal
14741 # undef signal
14742 #endif
14743 #ifdef __cplusplus
14744 extern "C" void (*signal (int, void (*)(int)))(int);
14745 #else
14746 void (*signal ()) ();
14747 #endif
14748
14749 int
14750 main ()
14751 {
14752 int i;
14753   ;
14754   return 0;
14755 }
14756 _ACEOF
14757 rm -f conftest.$ac_objext
14758 if { (eval echo "$as_me:14758: \"$ac_compile\"") >&5
14759   (eval $ac_compile) 2>&5
14760   ac_status=$?
14761   echo "$as_me:14761: \$? = $ac_status" >&5
14762   (exit $ac_status); } &&
14763          { ac_try='test -s conftest.$ac_objext'
14764   { (eval echo "$as_me:14764: \"$ac_try\"") >&5
14765   (eval $ac_try) 2>&5
14766   ac_status=$?
14767   echo "$as_me:14767: \$? = $ac_status" >&5
14768   (exit $ac_status); }; }; then
14769   ac_cv_type_signal=void
14770 else
14771   echo "$as_me: failed program was:" >&5
14772 cat conftest.$ac_ext >&5
14773 ac_cv_type_signal=int
14774 fi
14775 rm -f conftest.$ac_objext conftest.$ac_ext
14776 fi
14777 echo "$as_me:14777: result: $ac_cv_type_signal" >&5
14778 echo "${ECHO_T}$ac_cv_type_signal" >&6
14779
14780 cat >>confdefs.h <<EOF
14781 #define RETSIGTYPE $ac_cv_type_signal
14782 EOF
14783
14784 echo "$as_me:14784: checking for type sigaction_t" >&5
14785 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
14786 if test "${cf_cv_type_sigaction+set}" = set; then
14787   echo $ECHO_N "(cached) $ECHO_C" >&6
14788 else
14789
14790         cat >conftest.$ac_ext <<_ACEOF
14791 #line 14791 "configure"
14792 #include "confdefs.h"
14793
14794 #include <signal.h>
14795 int
14796 main ()
14797 {
14798 sigaction_t x
14799   ;
14800   return 0;
14801 }
14802 _ACEOF
14803 rm -f conftest.$ac_objext
14804 if { (eval echo "$as_me:14804: \"$ac_compile\"") >&5
14805   (eval $ac_compile) 2>&5
14806   ac_status=$?
14807   echo "$as_me:14807: \$? = $ac_status" >&5
14808   (exit $ac_status); } &&
14809          { ac_try='test -s conftest.$ac_objext'
14810   { (eval echo "$as_me:14810: \"$ac_try\"") >&5
14811   (eval $ac_try) 2>&5
14812   ac_status=$?
14813   echo "$as_me:14813: \$? = $ac_status" >&5
14814   (exit $ac_status); }; }; then
14815   cf_cv_type_sigaction=yes
14816 else
14817   echo "$as_me: failed program was:" >&5
14818 cat conftest.$ac_ext >&5
14819 cf_cv_type_sigaction=no
14820 fi
14821 rm -f conftest.$ac_objext conftest.$ac_ext
14822 fi
14823
14824 echo "$as_me:14824: result: $cf_cv_type_sigaction" >&5
14825 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
14826 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
14827 #define HAVE_TYPE_SIGACTION 1
14828 EOF
14829
14830 echo "$as_me:14830: checking declaration of size-change" >&5
14831 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
14832 if test "${cf_cv_sizechange+set}" = set; then
14833   echo $ECHO_N "(cached) $ECHO_C" >&6
14834 else
14835
14836     cf_cv_sizechange=unknown
14837     cf_save_CPPFLAGS="$CPPFLAGS"
14838
14839 for cf_opts in "" "NEED_PTEM_H"
14840 do
14841
14842     CPPFLAGS="$cf_save_CPPFLAGS"
14843     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
14844     cat >conftest.$ac_ext <<_ACEOF
14845 #line 14845 "configure"
14846 #include "confdefs.h"
14847 #include <sys/types.h>
14848 #ifdef HAVE_TERMIOS_H
14849 #include <termios.h>
14850 #else
14851 #ifdef HAVE_TERMIO_H
14852 #include <termio.h>
14853 #endif
14854 #endif
14855 #ifdef NEED_PTEM_H
14856 /* This is a workaround for SCO:  they neglected to define struct winsize in
14857  * termios.h -- it's only in termio.h and ptem.h
14858  */
14859 #include        <sys/stream.h>
14860 #include        <sys/ptem.h>
14861 #endif
14862 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
14863 #include <sys/ioctl.h>
14864 #endif
14865
14866 int
14867 main ()
14868 {
14869
14870 #ifdef TIOCGSIZE
14871         struct ttysize win;     /* FIXME: what system is this? */
14872         int y = win.ts_lines;
14873         int x = win.ts_cols;
14874 #else
14875 #ifdef TIOCGWINSZ
14876         struct winsize win;
14877         int y = win.ws_row;
14878         int x = win.ws_col;
14879 #else
14880         no TIOCGSIZE or TIOCGWINSZ
14881 #endif /* TIOCGWINSZ */
14882 #endif /* TIOCGSIZE */
14883
14884   ;
14885   return 0;
14886 }
14887 _ACEOF
14888 rm -f conftest.$ac_objext
14889 if { (eval echo "$as_me:14889: \"$ac_compile\"") >&5
14890   (eval $ac_compile) 2>&5
14891   ac_status=$?
14892   echo "$as_me:14892: \$? = $ac_status" >&5
14893   (exit $ac_status); } &&
14894          { ac_try='test -s conftest.$ac_objext'
14895   { (eval echo "$as_me:14895: \"$ac_try\"") >&5
14896   (eval $ac_try) 2>&5
14897   ac_status=$?
14898   echo "$as_me:14898: \$? = $ac_status" >&5
14899   (exit $ac_status); }; }; then
14900   cf_cv_sizechange=yes
14901 else
14902   echo "$as_me: failed program was:" >&5
14903 cat conftest.$ac_ext >&5
14904 cf_cv_sizechange=no
14905 fi
14906 rm -f conftest.$ac_objext conftest.$ac_ext
14907
14908         CPPFLAGS="$cf_save_CPPFLAGS"
14909         if test "$cf_cv_sizechange" = yes ; then
14910                 echo "size-change succeeded ($cf_opts)" >&5
14911                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
14912                 break
14913         fi
14914 done
14915
14916 fi
14917 echo "$as_me:14917: result: $cf_cv_sizechange" >&5
14918 echo "${ECHO_T}$cf_cv_sizechange" >&6
14919 if test "$cf_cv_sizechange" != no ; then
14920         cat >>confdefs.h <<\EOF
14921 #define HAVE_SIZECHANGE 1
14922 EOF
14923
14924         case $cf_cv_sizechange in #(vi
14925         NEED*)
14926                 cat >>confdefs.h <<EOF
14927 #define $cf_cv_sizechange  1
14928 EOF
14929
14930                 ;;
14931         esac
14932 fi
14933
14934 echo "$as_me:14934: checking for memmove" >&5
14935 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
14936 if test "${ac_cv_func_memmove+set}" = set; then
14937   echo $ECHO_N "(cached) $ECHO_C" >&6
14938 else
14939   cat >conftest.$ac_ext <<_ACEOF
14940 #line 14940 "configure"
14941 #include "confdefs.h"
14942 /* System header to define __stub macros and hopefully few prototypes,
14943     which can conflict with char memmove (); below.  */
14944 #include <assert.h>
14945 /* Override any gcc2 internal prototype to avoid an error.  */
14946 #ifdef __cplusplus
14947 extern "C"
14948 #endif
14949 /* We use char because int might match the return type of a gcc2
14950    builtin and then its argument prototype would still apply.  */
14951 char memmove ();
14952 char (*f) ();
14953
14954 int
14955 main ()
14956 {
14957 /* The GNU C library defines this for functions which it implements
14958     to always fail with ENOSYS.  Some functions are actually named
14959     something starting with __ and the normal name is an alias.  */
14960 #if defined (__stub_memmove) || defined (__stub___memmove)
14961 choke me
14962 #else
14963 f = memmove;
14964 #endif
14965
14966   ;
14967   return 0;
14968 }
14969 _ACEOF
14970 rm -f conftest.$ac_objext conftest$ac_exeext
14971 if { (eval echo "$as_me:14971: \"$ac_link\"") >&5
14972   (eval $ac_link) 2>&5
14973   ac_status=$?
14974   echo "$as_me:14974: \$? = $ac_status" >&5
14975   (exit $ac_status); } &&
14976          { ac_try='test -s conftest$ac_exeext'
14977   { (eval echo "$as_me:14977: \"$ac_try\"") >&5
14978   (eval $ac_try) 2>&5
14979   ac_status=$?
14980   echo "$as_me:14980: \$? = $ac_status" >&5
14981   (exit $ac_status); }; }; then
14982   ac_cv_func_memmove=yes
14983 else
14984   echo "$as_me: failed program was:" >&5
14985 cat conftest.$ac_ext >&5
14986 ac_cv_func_memmove=no
14987 fi
14988 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14989 fi
14990 echo "$as_me:14990: result: $ac_cv_func_memmove" >&5
14991 echo "${ECHO_T}$ac_cv_func_memmove" >&6
14992 if test $ac_cv_func_memmove = yes; then
14993   :
14994 else
14995
14996 echo "$as_me:14996: checking for bcopy" >&5
14997 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
14998 if test "${ac_cv_func_bcopy+set}" = set; then
14999   echo $ECHO_N "(cached) $ECHO_C" >&6
15000 else
15001   cat >conftest.$ac_ext <<_ACEOF
15002 #line 15002 "configure"
15003 #include "confdefs.h"
15004 /* System header to define __stub macros and hopefully few prototypes,
15005     which can conflict with char bcopy (); below.  */
15006 #include <assert.h>
15007 /* Override any gcc2 internal prototype to avoid an error.  */
15008 #ifdef __cplusplus
15009 extern "C"
15010 #endif
15011 /* We use char because int might match the return type of a gcc2
15012    builtin and then its argument prototype would still apply.  */
15013 char bcopy ();
15014 char (*f) ();
15015
15016 int
15017 main ()
15018 {
15019 /* The GNU C library defines this for functions which it implements
15020     to always fail with ENOSYS.  Some functions are actually named
15021     something starting with __ and the normal name is an alias.  */
15022 #if defined (__stub_bcopy) || defined (__stub___bcopy)
15023 choke me
15024 #else
15025 f = bcopy;
15026 #endif
15027
15028   ;
15029   return 0;
15030 }
15031 _ACEOF
15032 rm -f conftest.$ac_objext conftest$ac_exeext
15033 if { (eval echo "$as_me:15033: \"$ac_link\"") >&5
15034   (eval $ac_link) 2>&5
15035   ac_status=$?
15036   echo "$as_me:15036: \$? = $ac_status" >&5
15037   (exit $ac_status); } &&
15038          { ac_try='test -s conftest$ac_exeext'
15039   { (eval echo "$as_me:15039: \"$ac_try\"") >&5
15040   (eval $ac_try) 2>&5
15041   ac_status=$?
15042   echo "$as_me:15042: \$? = $ac_status" >&5
15043   (exit $ac_status); }; }; then
15044   ac_cv_func_bcopy=yes
15045 else
15046   echo "$as_me: failed program was:" >&5
15047 cat conftest.$ac_ext >&5
15048 ac_cv_func_bcopy=no
15049 fi
15050 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15051 fi
15052 echo "$as_me:15052: result: $ac_cv_func_bcopy" >&5
15053 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
15054 if test $ac_cv_func_bcopy = yes; then
15055
15056         echo "$as_me:15056: checking if bcopy does overlapping moves" >&5
15057 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
15058 if test "${cf_cv_good_bcopy+set}" = set; then
15059   echo $ECHO_N "(cached) $ECHO_C" >&6
15060 else
15061
15062                 if test "$cross_compiling" = yes; then
15063   cf_cv_good_bcopy=unknown
15064 else
15065   cat >conftest.$ac_ext <<_ACEOF
15066 #line 15066 "configure"
15067 #include "confdefs.h"
15068
15069 int main() {
15070         static char data[] = "abcdefghijklmnopqrstuwwxyz";
15071         char temp[40];
15072         bcopy(data, temp, sizeof(data));
15073         bcopy(temp+10, temp, 15);
15074         bcopy(temp+5, temp+15, 10);
15075         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
15076 }
15077
15078 _ACEOF
15079 rm -f conftest$ac_exeext
15080 if { (eval echo "$as_me:15080: \"$ac_link\"") >&5
15081   (eval $ac_link) 2>&5
15082   ac_status=$?
15083   echo "$as_me:15083: \$? = $ac_status" >&5
15084   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15085   { (eval echo "$as_me:15085: \"$ac_try\"") >&5
15086   (eval $ac_try) 2>&5
15087   ac_status=$?
15088   echo "$as_me:15088: \$? = $ac_status" >&5
15089   (exit $ac_status); }; }; then
15090   cf_cv_good_bcopy=yes
15091 else
15092   echo "$as_me: program exited with status $ac_status" >&5
15093 echo "$as_me: failed program was:" >&5
15094 cat conftest.$ac_ext >&5
15095 cf_cv_good_bcopy=no
15096 fi
15097 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15098 fi
15099
15100 fi
15101 echo "$as_me:15101: result: $cf_cv_good_bcopy" >&5
15102 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
15103
15104 else
15105   cf_cv_good_bcopy=no
15106 fi
15107
15108         if test "$cf_cv_good_bcopy" = yes ; then
15109                 cat >>confdefs.h <<\EOF
15110 #define USE_OK_BCOPY 1
15111 EOF
15112
15113         else
15114                 cat >>confdefs.h <<\EOF
15115 #define USE_MY_MEMMOVE 1
15116 EOF
15117
15118         fi
15119
15120 fi
15121
15122 echo "$as_me:15122: checking if poll really works" >&5
15123 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
15124 if test "${cf_cv_working_poll+set}" = set; then
15125   echo $ECHO_N "(cached) $ECHO_C" >&6
15126 else
15127
15128 if test "$cross_compiling" = yes; then
15129   cf_cv_working_poll=unknown
15130 else
15131   cat >conftest.$ac_ext <<_ACEOF
15132 #line 15132 "configure"
15133 #include "confdefs.h"
15134
15135 #include <stdio.h>
15136 #ifdef HAVE_POLL_H
15137 #include <poll.h>
15138 #else
15139 #include <sys/poll.h>
15140 #endif
15141 int main() {
15142         struct pollfd myfds;
15143         int ret;
15144
15145         myfds.fd = 0;
15146         myfds.events = POLLIN;
15147
15148         ret = poll(&myfds, 1, 100);
15149         ${cf_cv_main_return:-return}(ret != 0);
15150 }
15151 _ACEOF
15152 rm -f conftest$ac_exeext
15153 if { (eval echo "$as_me:15153: \"$ac_link\"") >&5
15154   (eval $ac_link) 2>&5
15155   ac_status=$?
15156   echo "$as_me:15156: \$? = $ac_status" >&5
15157   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15158   { (eval echo "$as_me:15158: \"$ac_try\"") >&5
15159   (eval $ac_try) 2>&5
15160   ac_status=$?
15161   echo "$as_me:15161: \$? = $ac_status" >&5
15162   (exit $ac_status); }; }; then
15163   cf_cv_working_poll=yes
15164 else
15165   echo "$as_me: program exited with status $ac_status" >&5
15166 echo "$as_me: failed program was:" >&5
15167 cat conftest.$ac_ext >&5
15168 cf_cv_working_poll=no
15169 fi
15170 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15171 fi
15172 fi
15173 echo "$as_me:15173: result: $cf_cv_working_poll" >&5
15174 echo "${ECHO_T}$cf_cv_working_poll" >&6
15175 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
15176 #define HAVE_WORKING_POLL 1
15177 EOF
15178
15179 echo "$as_me:15179: checking for va_copy" >&5
15180 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
15181 if test "${cf_cv_have_va_copy+set}" = set; then
15182   echo $ECHO_N "(cached) $ECHO_C" >&6
15183 else
15184
15185 cat >conftest.$ac_ext <<_ACEOF
15186 #line 15186 "configure"
15187 #include "confdefs.h"
15188
15189 #include <stdarg.h>
15190
15191 int
15192 main ()
15193 {
15194
15195         static va_list dst;
15196         static va_list src;
15197         va_copy(dst, src)
15198   ;
15199   return 0;
15200 }
15201 _ACEOF
15202 rm -f conftest.$ac_objext conftest$ac_exeext
15203 if { (eval echo "$as_me:15203: \"$ac_link\"") >&5
15204   (eval $ac_link) 2>&5
15205   ac_status=$?
15206   echo "$as_me:15206: \$? = $ac_status" >&5
15207   (exit $ac_status); } &&
15208          { ac_try='test -s conftest$ac_exeext'
15209   { (eval echo "$as_me:15209: \"$ac_try\"") >&5
15210   (eval $ac_try) 2>&5
15211   ac_status=$?
15212   echo "$as_me:15212: \$? = $ac_status" >&5
15213   (exit $ac_status); }; }; then
15214   cf_cv_have_va_copy=yes
15215 else
15216   echo "$as_me: failed program was:" >&5
15217 cat conftest.$ac_ext >&5
15218 cf_cv_have_va_copy=no
15219 fi
15220 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15221 fi
15222 echo "$as_me:15222: result: $cf_cv_have_va_copy" >&5
15223 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
15224
15225 test "$cf_cv_have_va_copy" = yes && cat >>confdefs.h <<\EOF
15226 #define HAVE_VA_COPY 1
15227 EOF
15228
15229 echo "$as_me:15229: checking for __va_copy" >&5
15230 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
15231 if test "${cf_cv_have___va_copy+set}" = set; then
15232   echo $ECHO_N "(cached) $ECHO_C" >&6
15233 else
15234
15235 cat >conftest.$ac_ext <<_ACEOF
15236 #line 15236 "configure"
15237 #include "confdefs.h"
15238
15239 #include <stdarg.h>
15240
15241 int
15242 main ()
15243 {
15244
15245         static va_list dst;
15246         static va_list src;
15247         __va_copy(dst, src)
15248   ;
15249   return 0;
15250 }
15251 _ACEOF
15252 rm -f conftest.$ac_objext conftest$ac_exeext
15253 if { (eval echo "$as_me:15253: \"$ac_link\"") >&5
15254   (eval $ac_link) 2>&5
15255   ac_status=$?
15256   echo "$as_me:15256: \$? = $ac_status" >&5
15257   (exit $ac_status); } &&
15258          { ac_try='test -s conftest$ac_exeext'
15259   { (eval echo "$as_me:15259: \"$ac_try\"") >&5
15260   (eval $ac_try) 2>&5
15261   ac_status=$?
15262   echo "$as_me:15262: \$? = $ac_status" >&5
15263   (exit $ac_status); }; }; then
15264   cf_cv_have___va_copy=yes
15265 else
15266   echo "$as_me: failed program was:" >&5
15267 cat conftest.$ac_ext >&5
15268 cf_cv_have___va_copy=no
15269 fi
15270 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15271 fi
15272 echo "$as_me:15272: result: $cf_cv_have___va_copy" >&5
15273 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
15274
15275 test "$cf_cv_have___va_copy" = yes && cat >>confdefs.h <<\EOF
15276 #define HAVE___VA_COPY 1
15277 EOF
15278
15279 echo "$as_me:15279: checking for pid_t" >&5
15280 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
15281 if test "${ac_cv_type_pid_t+set}" = set; then
15282   echo $ECHO_N "(cached) $ECHO_C" >&6
15283 else
15284   cat >conftest.$ac_ext <<_ACEOF
15285 #line 15285 "configure"
15286 #include "confdefs.h"
15287 $ac_includes_default
15288 int
15289 main ()
15290 {
15291 if ((pid_t *) 0)
15292   return 0;
15293 if (sizeof (pid_t))
15294   return 0;
15295   ;
15296   return 0;
15297 }
15298 _ACEOF
15299 rm -f conftest.$ac_objext
15300 if { (eval echo "$as_me:15300: \"$ac_compile\"") >&5
15301   (eval $ac_compile) 2>&5
15302   ac_status=$?
15303   echo "$as_me:15303: \$? = $ac_status" >&5
15304   (exit $ac_status); } &&
15305          { ac_try='test -s conftest.$ac_objext'
15306   { (eval echo "$as_me:15306: \"$ac_try\"") >&5
15307   (eval $ac_try) 2>&5
15308   ac_status=$?
15309   echo "$as_me:15309: \$? = $ac_status" >&5
15310   (exit $ac_status); }; }; then
15311   ac_cv_type_pid_t=yes
15312 else
15313   echo "$as_me: failed program was:" >&5
15314 cat conftest.$ac_ext >&5
15315 ac_cv_type_pid_t=no
15316 fi
15317 rm -f conftest.$ac_objext conftest.$ac_ext
15318 fi
15319 echo "$as_me:15319: result: $ac_cv_type_pid_t" >&5
15320 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
15321 if test $ac_cv_type_pid_t = yes; then
15322   :
15323 else
15324
15325 cat >>confdefs.h <<EOF
15326 #define pid_t int
15327 EOF
15328
15329 fi
15330
15331 for ac_header in unistd.h vfork.h
15332 do
15333 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15334 echo "$as_me:15334: checking for $ac_header" >&5
15335 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15336 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15337   echo $ECHO_N "(cached) $ECHO_C" >&6
15338 else
15339   cat >conftest.$ac_ext <<_ACEOF
15340 #line 15340 "configure"
15341 #include "confdefs.h"
15342 #include <$ac_header>
15343 _ACEOF
15344 if { (eval echo "$as_me:15344: \"$ac_cpp conftest.$ac_ext\"") >&5
15345   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15346   ac_status=$?
15347   egrep -v '^ *\+' conftest.er1 >conftest.err
15348   rm -f conftest.er1
15349   cat conftest.err >&5
15350   echo "$as_me:15350: \$? = $ac_status" >&5
15351   (exit $ac_status); } >/dev/null; then
15352   if test -s conftest.err; then
15353     ac_cpp_err=$ac_c_preproc_warn_flag
15354   else
15355     ac_cpp_err=
15356   fi
15357 else
15358   ac_cpp_err=yes
15359 fi
15360 if test -z "$ac_cpp_err"; then
15361   eval "$as_ac_Header=yes"
15362 else
15363   echo "$as_me: failed program was:" >&5
15364   cat conftest.$ac_ext >&5
15365   eval "$as_ac_Header=no"
15366 fi
15367 rm -f conftest.err conftest.$ac_ext
15368 fi
15369 echo "$as_me:15369: result: `eval echo '${'$as_ac_Header'}'`" >&5
15370 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15371 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15372   cat >>confdefs.h <<EOF
15373 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15374 EOF
15375
15376 fi
15377 done
15378
15379 for ac_func in fork vfork
15380 do
15381 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15382 echo "$as_me:15382: checking for $ac_func" >&5
15383 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15384 if eval "test \"\${$as_ac_var+set}\" = set"; then
15385   echo $ECHO_N "(cached) $ECHO_C" >&6
15386 else
15387   cat >conftest.$ac_ext <<_ACEOF
15388 #line 15388 "configure"
15389 #include "confdefs.h"
15390 /* System header to define __stub macros and hopefully few prototypes,
15391     which can conflict with char $ac_func (); below.  */
15392 #include <assert.h>
15393 /* Override any gcc2 internal prototype to avoid an error.  */
15394 #ifdef __cplusplus
15395 extern "C"
15396 #endif
15397 /* We use char because int might match the return type of a gcc2
15398    builtin and then its argument prototype would still apply.  */
15399 char $ac_func ();
15400 char (*f) ();
15401
15402 int
15403 main ()
15404 {
15405 /* The GNU C library defines this for functions which it implements
15406     to always fail with ENOSYS.  Some functions are actually named
15407     something starting with __ and the normal name is an alias.  */
15408 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15409 choke me
15410 #else
15411 f = $ac_func;
15412 #endif
15413
15414   ;
15415   return 0;
15416 }
15417 _ACEOF
15418 rm -f conftest.$ac_objext conftest$ac_exeext
15419 if { (eval echo "$as_me:15419: \"$ac_link\"") >&5
15420   (eval $ac_link) 2>&5
15421   ac_status=$?
15422   echo "$as_me:15422: \$? = $ac_status" >&5
15423   (exit $ac_status); } &&
15424          { ac_try='test -s conftest$ac_exeext'
15425   { (eval echo "$as_me:15425: \"$ac_try\"") >&5
15426   (eval $ac_try) 2>&5
15427   ac_status=$?
15428   echo "$as_me:15428: \$? = $ac_status" >&5
15429   (exit $ac_status); }; }; then
15430   eval "$as_ac_var=yes"
15431 else
15432   echo "$as_me: failed program was:" >&5
15433 cat conftest.$ac_ext >&5
15434 eval "$as_ac_var=no"
15435 fi
15436 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15437 fi
15438 echo "$as_me:15438: result: `eval echo '${'$as_ac_var'}'`" >&5
15439 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15440 if test `eval echo '${'$as_ac_var'}'` = yes; then
15441   cat >>confdefs.h <<EOF
15442 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15443 EOF
15444
15445 fi
15446 done
15447
15448 ac_cv_func_fork_works=$ac_cv_func_fork
15449 if test "x$ac_cv_func_fork" = xyes; then
15450   echo "$as_me:15450: checking for working fork" >&5
15451 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
15452 if test "${ac_cv_func_fork_works+set}" = set; then
15453   echo $ECHO_N "(cached) $ECHO_C" >&6
15454 else
15455   if test "$cross_compiling" = yes; then
15456   ac_cv_func_fork_works=cross
15457 else
15458   cat >conftest.$ac_ext <<_ACEOF
15459 /* By Rüdiger Kuhlmann. */
15460       #include <sys/types.h>
15461       #if HAVE_UNISTD_H
15462       # include <unistd.h>
15463       #endif
15464       /* Some systems only have a dummy stub for fork() */
15465       int main ()
15466       {
15467         if (fork() < 0)
15468           $ac_main_return (1);
15469         $ac_main_return (0);
15470       }
15471 _ACEOF
15472 rm -f conftest$ac_exeext
15473 if { (eval echo "$as_me:15473: \"$ac_link\"") >&5
15474   (eval $ac_link) 2>&5
15475   ac_status=$?
15476   echo "$as_me:15476: \$? = $ac_status" >&5
15477   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15478   { (eval echo "$as_me:15478: \"$ac_try\"") >&5
15479   (eval $ac_try) 2>&5
15480   ac_status=$?
15481   echo "$as_me:15481: \$? = $ac_status" >&5
15482   (exit $ac_status); }; }; then
15483   ac_cv_func_fork_works=yes
15484 else
15485   echo "$as_me: program exited with status $ac_status" >&5
15486 echo "$as_me: failed program was:" >&5
15487 cat conftest.$ac_ext >&5
15488 ac_cv_func_fork_works=no
15489 fi
15490 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15491 fi
15492 fi
15493 echo "$as_me:15493: result: $ac_cv_func_fork_works" >&5
15494 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
15495
15496 fi
15497 if test "x$ac_cv_func_fork_works" = xcross; then
15498   case $host in
15499     *-*-amigaos* | *-*-msdosdjgpp*)
15500       # Override, as these systems have only a dummy fork() stub
15501       ac_cv_func_fork_works=no
15502       ;;
15503     *)
15504       ac_cv_func_fork_works=yes
15505       ;;
15506   esac
15507   { echo "$as_me:15507: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
15508 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
15509 fi
15510 ac_cv_func_vfork_works=$ac_cv_func_vfork
15511 if test "x$ac_cv_func_vfork" = xyes; then
15512   echo "$as_me:15512: checking for working vfork" >&5
15513 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
15514 if test "${ac_cv_func_vfork_works+set}" = set; then
15515   echo $ECHO_N "(cached) $ECHO_C" >&6
15516 else
15517   if test "$cross_compiling" = yes; then
15518   ac_cv_func_vfork_works=cross
15519 else
15520   cat >conftest.$ac_ext <<_ACEOF
15521 #line 15521 "configure"
15522 #include "confdefs.h"
15523 /* Thanks to Paul Eggert for this test.  */
15524 #include <stdio.h>
15525 #include <sys/types.h>
15526 #include <sys/stat.h>
15527 #if HAVE_UNISTD_H
15528 # include <unistd.h>
15529 #endif
15530 #if HAVE_VFORK_H
15531 # include <vfork.h>
15532 #endif
15533 /* On some sparc systems, changes by the child to local and incoming
15534    argument registers are propagated back to the parent.  The compiler
15535    is told about this with #include <vfork.h>, but some compilers
15536    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
15537    static variable whose address is put into a register that is
15538    clobbered by the vfork.  */
15539 static
15540 #ifdef __cplusplus
15541 sparc_address_test (int arg)
15542 # else
15543 sparc_address_test (arg) int arg;
15544 #endif
15545 {
15546   static pid_t child;
15547   if (!child) {
15548     child = vfork ();
15549     if (child < 0) {
15550       perror ("vfork");
15551       _exit(2);
15552     }
15553     if (!child) {
15554       arg = getpid();
15555       write(-1, "", 0);
15556       _exit (arg);
15557     }
15558   }
15559 }
15560
15561 int
15562 main ()
15563 {
15564   pid_t parent = getpid ();
15565   pid_t child;
15566
15567   sparc_address_test ();
15568
15569   child = vfork ();
15570
15571   if (child == 0) {
15572     /* Here is another test for sparc vfork register problems.  This
15573        test uses lots of local variables, at least as many local
15574        variables as main has allocated so far including compiler
15575        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
15576        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
15577        reuse the register of parent for one of the local variables,
15578        since it will think that parent can't possibly be used any more
15579        in this routine.  Assigning to the local variable will thus
15580        munge parent in the parent process.  */
15581     pid_t
15582       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15583       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15584     /* Convince the compiler that p..p7 are live; otherwise, it might
15585        use the same hardware register for all 8 local variables.  */
15586     if (p != p1 || p != p2 || p != p3 || p != p4
15587         || p != p5 || p != p6 || p != p7)
15588       _exit(1);
15589
15590     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15591        from child file descriptors.  If the child closes a descriptor
15592        before it execs or exits, this munges the parent's descriptor
15593        as well.  Test for this by closing stdout in the child.  */
15594     _exit(close(fileno(stdout)) != 0);
15595   } else {
15596     int status;
15597     struct stat st;
15598
15599     while (wait(&status) != child)
15600       ;
15601     $ac_main_return(
15602          /* Was there some problem with vforking?  */
15603          child < 0
15604
15605          /* Did the child fail?  (This shouldn't happen.)  */
15606          || status
15607
15608          /* Did the vfork/compiler bug occur?  */
15609          || parent != getpid()
15610
15611          /* Did the file descriptor bug occur?  */
15612          || fstat(fileno(stdout), &st) != 0
15613          );
15614   }
15615 }
15616 _ACEOF
15617 rm -f conftest$ac_exeext
15618 if { (eval echo "$as_me:15618: \"$ac_link\"") >&5
15619   (eval $ac_link) 2>&5
15620   ac_status=$?
15621   echo "$as_me:15621: \$? = $ac_status" >&5
15622   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15623   { (eval echo "$as_me:15623: \"$ac_try\"") >&5
15624   (eval $ac_try) 2>&5
15625   ac_status=$?
15626   echo "$as_me:15626: \$? = $ac_status" >&5
15627   (exit $ac_status); }; }; then
15628   ac_cv_func_vfork_works=yes
15629 else
15630   echo "$as_me: program exited with status $ac_status" >&5
15631 echo "$as_me: failed program was:" >&5
15632 cat conftest.$ac_ext >&5
15633 ac_cv_func_vfork_works=no
15634 fi
15635 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15636 fi
15637 fi
15638 echo "$as_me:15638: result: $ac_cv_func_vfork_works" >&5
15639 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
15640
15641 fi;
15642 if test "x$ac_cv_func_fork_works" = xcross; then
15643   ac_cv_func_vfork_works=ac_cv_func_vfork
15644   { echo "$as_me:15644: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
15645 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
15646 fi
15647
15648 if test "x$ac_cv_func_vfork_works" = xyes; then
15649
15650 cat >>confdefs.h <<\EOF
15651 #define HAVE_WORKING_VFORK 1
15652 EOF
15653
15654 else
15655
15656 cat >>confdefs.h <<\EOF
15657 #define vfork fork
15658 EOF
15659
15660 fi
15661 if test "x$ac_cv_func_fork_works" = xyes; then
15662
15663 cat >>confdefs.h <<\EOF
15664 #define HAVE_WORKING_FORK 1
15665 EOF
15666
15667 fi
15668
15669 # special check for test/ditto.c
15670
15671 echo "$as_me:15671: checking for openpty in -lutil" >&5
15672 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
15673 if test "${ac_cv_lib_util_openpty+set}" = set; then
15674   echo $ECHO_N "(cached) $ECHO_C" >&6
15675 else
15676   ac_check_lib_save_LIBS=$LIBS
15677 LIBS="-lutil  $LIBS"
15678 cat >conftest.$ac_ext <<_ACEOF
15679 #line 15679 "configure"
15680 #include "confdefs.h"
15681
15682 /* Override any gcc2 internal prototype to avoid an error.  */
15683 #ifdef __cplusplus
15684 extern "C"
15685 #endif
15686 /* We use char because int might match the return type of a gcc2
15687    builtin and then its argument prototype would still apply.  */
15688 char openpty ();
15689 int
15690 main ()
15691 {
15692 openpty ();
15693   ;
15694   return 0;
15695 }
15696 _ACEOF
15697 rm -f conftest.$ac_objext conftest$ac_exeext
15698 if { (eval echo "$as_me:15698: \"$ac_link\"") >&5
15699   (eval $ac_link) 2>&5
15700   ac_status=$?
15701   echo "$as_me:15701: \$? = $ac_status" >&5
15702   (exit $ac_status); } &&
15703          { ac_try='test -s conftest$ac_exeext'
15704   { (eval echo "$as_me:15704: \"$ac_try\"") >&5
15705   (eval $ac_try) 2>&5
15706   ac_status=$?
15707   echo "$as_me:15707: \$? = $ac_status" >&5
15708   (exit $ac_status); }; }; then
15709   ac_cv_lib_util_openpty=yes
15710 else
15711   echo "$as_me: failed program was:" >&5
15712 cat conftest.$ac_ext >&5
15713 ac_cv_lib_util_openpty=no
15714 fi
15715 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15716 LIBS=$ac_check_lib_save_LIBS
15717 fi
15718 echo "$as_me:15718: result: $ac_cv_lib_util_openpty" >&5
15719 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
15720 if test $ac_cv_lib_util_openpty = yes; then
15721   cf_cv_lib_util=yes
15722 else
15723   cf_cv_lib_util=no
15724 fi
15725
15726 echo "$as_me:15726: checking for openpty header" >&5
15727 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
15728 if test "${cf_cv_func_openpty+set}" = set; then
15729   echo $ECHO_N "(cached) $ECHO_C" >&6
15730 else
15731
15732     cf_save_LIBS="$LIBS"
15733     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
15734     for cf_header in pty.h libutil.h util.h
15735     do
15736     cat >conftest.$ac_ext <<_ACEOF
15737 #line 15737 "configure"
15738 #include "confdefs.h"
15739
15740 #include <$cf_header>
15741
15742 int
15743 main ()
15744 {
15745
15746     int x = openpty((int *)0, (int *)0, (char *)0,
15747                    (struct termios *)0, (struct winsize *)0);
15748
15749   ;
15750   return 0;
15751 }
15752 _ACEOF
15753 rm -f conftest.$ac_objext conftest$ac_exeext
15754 if { (eval echo "$as_me:15754: \"$ac_link\"") >&5
15755   (eval $ac_link) 2>&5
15756   ac_status=$?
15757   echo "$as_me:15757: \$? = $ac_status" >&5
15758   (exit $ac_status); } &&
15759          { ac_try='test -s conftest$ac_exeext'
15760   { (eval echo "$as_me:15760: \"$ac_try\"") >&5
15761   (eval $ac_try) 2>&5
15762   ac_status=$?
15763   echo "$as_me:15763: \$? = $ac_status" >&5
15764   (exit $ac_status); }; }; then
15765
15766         cf_cv_func_openpty=$cf_header
15767         break
15768
15769 else
15770   echo "$as_me: failed program was:" >&5
15771 cat conftest.$ac_ext >&5
15772
15773         cf_cv_func_openpty=no
15774
15775 fi
15776 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15777     done
15778     LIBS="$cf_save_LIBS"
15779
15780 fi
15781 echo "$as_me:15781: result: $cf_cv_func_openpty" >&5
15782 echo "${ECHO_T}$cf_cv_func_openpty" >&6
15783
15784 if test "$cf_cv_func_openpty" != no ; then
15785     cat >>confdefs.h <<EOF
15786 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
15787 EOF
15788
15789     cat >>confdefs.h <<\EOF
15790 #define USE_XTERM_PTY 1
15791 EOF
15792
15793     if test "$cf_cv_lib_util" = yes ; then
15794         TEST_LIBS="-lutil $TEST_LIBS"
15795     fi
15796 fi
15797
15798 if test "$with_hashed_db" != no ; then
15799         cat >>confdefs.h <<\EOF
15800 #define USE_HASHED_DB 1
15801 EOF
15802
15803 case $with_hashed_db in #(vi
15804 yes|*able*) #(vi
15805     ;;
15806 *)
15807     if test -d "$with_hashed_db" ; then
15808
15809 if test -n "$with_hashed_db/include" ; then
15810   for cf_add_incdir in $with_hashed_db/include
15811   do
15812         while test $cf_add_incdir != /usr/include
15813         do
15814           if test -d $cf_add_incdir
15815           then
15816                 cf_have_incdir=no
15817                 if test -n "$CFLAGS$CPPFLAGS" ; then
15818                   # a loop is needed to ensure we can add subdirs of existing dirs
15819                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
15820                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
15821                           cf_have_incdir=yes; break
15822                         fi
15823                   done
15824                 fi
15825
15826                 if test "$cf_have_incdir" = no ; then
15827                   if test "$cf_add_incdir" = /usr/local/include ; then
15828                         if test "$GCC" = yes
15829                         then
15830                           cf_save_CPPFLAGS=$CPPFLAGS
15831                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
15832                           cat >conftest.$ac_ext <<_ACEOF
15833 #line 15833 "configure"
15834 #include "confdefs.h"
15835 #include <stdio.h>
15836 int
15837 main ()
15838 {
15839 printf("Hello")
15840   ;
15841   return 0;
15842 }
15843 _ACEOF
15844 rm -f conftest.$ac_objext
15845 if { (eval echo "$as_me:15845: \"$ac_compile\"") >&5
15846   (eval $ac_compile) 2>&5
15847   ac_status=$?
15848   echo "$as_me:15848: \$? = $ac_status" >&5
15849   (exit $ac_status); } &&
15850          { ac_try='test -s conftest.$ac_objext'
15851   { (eval echo "$as_me:15851: \"$ac_try\"") >&5
15852   (eval $ac_try) 2>&5
15853   ac_status=$?
15854   echo "$as_me:15854: \$? = $ac_status" >&5
15855   (exit $ac_status); }; }; then
15856   :
15857 else
15858   echo "$as_me: failed program was:" >&5
15859 cat conftest.$ac_ext >&5
15860 cf_have_incdir=yes
15861 fi
15862 rm -f conftest.$ac_objext conftest.$ac_ext
15863                           CPPFLAGS=$cf_save_CPPFLAGS
15864                         fi
15865                   fi
15866                 fi
15867
15868                 if test "$cf_have_incdir" = no ; then
15869                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
15870
15871 echo "${as_me-configure}:15871: testing adding $cf_add_incdir to include-path ..." 1>&5
15872
15873                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
15874
15875                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
15876                   test "$cf_top_incdir" = "$cf_add_incdir" && break
15877                   cf_add_incdir="$cf_top_incdir"
15878                 else
15879                   break
15880                 fi
15881           fi
15882         done
15883   done
15884 fi
15885
15886 if test -n "$with_hashed_db/lib" ; then
15887   for cf_add_libdir in $with_hashed_db/lib
15888   do
15889     if test $cf_add_libdir = /usr/lib ; then
15890       :
15891     elif test -d $cf_add_libdir
15892     then
15893       cf_have_libdir=no
15894       if test -n "$LDFLAGS$LIBS" ; then
15895         # a loop is needed to ensure we can add subdirs of existing dirs
15896         for cf_test_libdir in $LDFLAGS $LIBS ; do
15897           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
15898             cf_have_libdir=yes; break
15899           fi
15900         done
15901       fi
15902       if test "$cf_have_libdir" = no ; then
15903         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
15904
15905 echo "${as_me-configure}:15905: testing adding $cf_add_libdir to library-path ..." 1>&5
15906
15907         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
15908       fi
15909     fi
15910   done
15911 fi
15912
15913     fi
15914 esac
15915
15916 echo "$as_me:15916: checking for db.h" >&5
15917 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
15918 if test "${ac_cv_header_db_h+set}" = set; then
15919   echo $ECHO_N "(cached) $ECHO_C" >&6
15920 else
15921   cat >conftest.$ac_ext <<_ACEOF
15922 #line 15922 "configure"
15923 #include "confdefs.h"
15924 #include <db.h>
15925 _ACEOF
15926 if { (eval echo "$as_me:15926: \"$ac_cpp conftest.$ac_ext\"") >&5
15927   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15928   ac_status=$?
15929   egrep -v '^ *\+' conftest.er1 >conftest.err
15930   rm -f conftest.er1
15931   cat conftest.err >&5
15932   echo "$as_me:15932: \$? = $ac_status" >&5
15933   (exit $ac_status); } >/dev/null; then
15934   if test -s conftest.err; then
15935     ac_cpp_err=$ac_c_preproc_warn_flag
15936   else
15937     ac_cpp_err=
15938   fi
15939 else
15940   ac_cpp_err=yes
15941 fi
15942 if test -z "$ac_cpp_err"; then
15943   ac_cv_header_db_h=yes
15944 else
15945   echo "$as_me: failed program was:" >&5
15946   cat conftest.$ac_ext >&5
15947   ac_cv_header_db_h=no
15948 fi
15949 rm -f conftest.err conftest.$ac_ext
15950 fi
15951 echo "$as_me:15951: result: $ac_cv_header_db_h" >&5
15952 echo "${ECHO_T}$ac_cv_header_db_h" >&6
15953 if test $ac_cv_header_db_h = yes; then
15954
15955 echo "$as_me:15955: checking for version of db" >&5
15956 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
15957 if test "${cf_cv_hashed_db_version+set}" = set; then
15958   echo $ECHO_N "(cached) $ECHO_C" >&6
15959 else
15960
15961 cf_cv_hashed_db_version=unknown
15962
15963 for cf_db_version in 1 2 3 4 5
15964 do
15965
15966 echo "${as_me-configure}:15966: testing checking for db version $cf_db_version ..." 1>&5
15967
15968         cat >conftest.$ac_ext <<_ACEOF
15969 #line 15969 "configure"
15970 #include "confdefs.h"
15971
15972 $ac_includes_default
15973 #include <db.h>
15974
15975 #ifdef DB_VERSION_MAJOR
15976         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
15977 #if $cf_db_version == DB_VERSION_MAJOR
15978         /* ok */
15979 #else
15980         make an error
15981 #endif
15982 #else
15983 #if $cf_db_version == 1
15984         /* ok: assuming this is DB 1.8.5 */
15985 #else
15986         make an error
15987 #endif
15988 #endif
15989
15990 int
15991 main ()
15992 {
15993 DBT *foo = 0
15994   ;
15995   return 0;
15996 }
15997 _ACEOF
15998 rm -f conftest.$ac_objext
15999 if { (eval echo "$as_me:15999: \"$ac_compile\"") >&5
16000   (eval $ac_compile) 2>&5
16001   ac_status=$?
16002   echo "$as_me:16002: \$? = $ac_status" >&5
16003   (exit $ac_status); } &&
16004          { ac_try='test -s conftest.$ac_objext'
16005   { (eval echo "$as_me:16005: \"$ac_try\"") >&5
16006   (eval $ac_try) 2>&5
16007   ac_status=$?
16008   echo "$as_me:16008: \$? = $ac_status" >&5
16009   (exit $ac_status); }; }; then
16010
16011         cf_cv_hashed_db_version=$cf_db_version
16012         break
16013
16014 else
16015   echo "$as_me: failed program was:" >&5
16016 cat conftest.$ac_ext >&5
16017 fi
16018 rm -f conftest.$ac_objext conftest.$ac_ext
16019 done
16020
16021 fi
16022 echo "$as_me:16022: result: $cf_cv_hashed_db_version" >&5
16023 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
16024
16025 if test "$cf_cv_hashed_db_version" = unknown ; then
16026         { { echo "$as_me:16026: error: Cannot determine version of db" >&5
16027 echo "$as_me: error: Cannot determine version of db" >&2;}
16028    { (exit 1); exit 1; }; }
16029 else
16030
16031 echo "$as_me:16031: checking for db libraries" >&5
16032 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
16033 if test "${cf_cv_hashed_db_libs+set}" = set; then
16034   echo $ECHO_N "(cached) $ECHO_C" >&6
16035 else
16036
16037 cf_cv_hashed_db_libs=unknown
16038 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
16039 do
16040         cf_save_libs="$LIBS"
16041         if test -n "$cf_db_libs"; then
16042                 LIBS="-l$cf_db_libs $LIBS"
16043         fi
16044
16045 echo "${as_me-configure}:16045: testing checking for library "$cf_db_libs" ..." 1>&5
16046
16047         cat >conftest.$ac_ext <<_ACEOF
16048 #line 16048 "configure"
16049 #include "confdefs.h"
16050
16051 $ac_includes_default
16052 #include <db.h>
16053
16054 int
16055 main ()
16056 {
16057
16058         char *path = "/tmp/foo";
16059 #ifdef DB_VERSION_MAJOR
16060 #if DB_VERSION_MAJOR >= 4
16061         DB *result = 0;
16062         db_create(&result, NULL, 0);
16063         result->open(result,
16064                 NULL,
16065                 path,
16066                 path,
16067                 DB_HASH,
16068                 DB_CREATE,
16069                 0644);
16070 #elif DB_VERSION_MAJOR >= 3
16071         DB *result = 0;
16072         db_create(&result, NULL, 0);
16073         result->open(result,
16074                 path,
16075                 path,
16076                 DB_HASH,
16077                 DB_CREATE,
16078                 0644);
16079 #elif DB_VERSION_MAJOR >= 2
16080         DB *result = 0;
16081         db_open(path,
16082                 DB_HASH,
16083                 DB_CREATE,
16084                 0644,
16085                 (DB_ENV *) 0,
16086                 (DB_INFO *) 0,
16087                 &result);
16088 #endif /* DB_VERSION_MAJOR */
16089 #else
16090         DB *result = dbopen(path,
16091                      2,
16092                      0644,
16093                      DB_HASH,
16094                      0);
16095 #endif
16096         ${cf_cv_main_return:-return}(result != 0)
16097
16098   ;
16099   return 0;
16100 }
16101 _ACEOF
16102 rm -f conftest.$ac_objext conftest$ac_exeext
16103 if { (eval echo "$as_me:16103: \"$ac_link\"") >&5
16104   (eval $ac_link) 2>&5
16105   ac_status=$?
16106   echo "$as_me:16106: \$? = $ac_status" >&5
16107   (exit $ac_status); } &&
16108          { ac_try='test -s conftest$ac_exeext'
16109   { (eval echo "$as_me:16109: \"$ac_try\"") >&5
16110   (eval $ac_try) 2>&5
16111   ac_status=$?
16112   echo "$as_me:16112: \$? = $ac_status" >&5
16113   (exit $ac_status); }; }; then
16114
16115         if test -n "$cf_db_libs" ; then
16116                 cf_cv_hashed_db_libs=$cf_db_libs
16117         else
16118                 cf_cv_hashed_db_libs=default
16119         fi
16120         LIBS="$cf_save_libs"
16121         break
16122
16123 else
16124   echo "$as_me: failed program was:" >&5
16125 cat conftest.$ac_ext >&5
16126 fi
16127 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16128         LIBS="$cf_save_libs"
16129 done
16130
16131 fi
16132 echo "$as_me:16132: result: $cf_cv_hashed_db_libs" >&5
16133 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
16134
16135         if test "$cf_cv_hashed_db_libs" = unknown ; then
16136                 { { echo "$as_me:16136: error: Cannot determine library for db" >&5
16137 echo "$as_me: error: Cannot determine library for db" >&2;}
16138    { (exit 1); exit 1; }; }
16139         elif test "$cf_cv_hashed_db_libs" != default ; then
16140                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
16141         fi
16142 fi
16143
16144 else
16145
16146         { { echo "$as_me:16146: error: Cannot find db.h" >&5
16147 echo "$as_me: error: Cannot find db.h" >&2;}
16148    { (exit 1); exit 1; }; }
16149
16150 fi
16151
16152 fi
16153
16154 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
16155         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16156         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16157 fi
16158
16159 # Just in case, check if the C compiler has a bool type.
16160
16161 echo "$as_me:16161: checking if we should include stdbool.h" >&5
16162 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
16163
16164 if test "${cf_cv_header_stdbool_h+set}" = set; then
16165   echo $ECHO_N "(cached) $ECHO_C" >&6
16166 else
16167
16168         cat >conftest.$ac_ext <<_ACEOF
16169 #line 16169 "configure"
16170 #include "confdefs.h"
16171
16172 int
16173 main ()
16174 {
16175 bool foo = false
16176   ;
16177   return 0;
16178 }
16179 _ACEOF
16180 rm -f conftest.$ac_objext
16181 if { (eval echo "$as_me:16181: \"$ac_compile\"") >&5
16182   (eval $ac_compile) 2>&5
16183   ac_status=$?
16184   echo "$as_me:16184: \$? = $ac_status" >&5
16185   (exit $ac_status); } &&
16186          { ac_try='test -s conftest.$ac_objext'
16187   { (eval echo "$as_me:16187: \"$ac_try\"") >&5
16188   (eval $ac_try) 2>&5
16189   ac_status=$?
16190   echo "$as_me:16190: \$? = $ac_status" >&5
16191   (exit $ac_status); }; }; then
16192   cf_cv_header_stdbool_h=0
16193 else
16194   echo "$as_me: failed program was:" >&5
16195 cat conftest.$ac_ext >&5
16196 cat >conftest.$ac_ext <<_ACEOF
16197 #line 16197 "configure"
16198 #include "confdefs.h"
16199
16200 #ifndef __BEOS__
16201 #include <stdbool.h>
16202 #endif
16203
16204 int
16205 main ()
16206 {
16207 bool foo = false
16208   ;
16209   return 0;
16210 }
16211 _ACEOF
16212 rm -f conftest.$ac_objext
16213 if { (eval echo "$as_me:16213: \"$ac_compile\"") >&5
16214   (eval $ac_compile) 2>&5
16215   ac_status=$?
16216   echo "$as_me:16216: \$? = $ac_status" >&5
16217   (exit $ac_status); } &&
16218          { ac_try='test -s conftest.$ac_objext'
16219   { (eval echo "$as_me:16219: \"$ac_try\"") >&5
16220   (eval $ac_try) 2>&5
16221   ac_status=$?
16222   echo "$as_me:16222: \$? = $ac_status" >&5
16223   (exit $ac_status); }; }; then
16224   cf_cv_header_stdbool_h=1
16225 else
16226   echo "$as_me: failed program was:" >&5
16227 cat conftest.$ac_ext >&5
16228 cf_cv_header_stdbool_h=0
16229 fi
16230 rm -f conftest.$ac_objext conftest.$ac_ext
16231 fi
16232 rm -f conftest.$ac_objext conftest.$ac_ext
16233 fi
16234
16235 if test "$cf_cv_header_stdbool_h" = 1
16236 then    echo "$as_me:16236: result: yes" >&5
16237 echo "${ECHO_T}yes" >&6
16238 else    echo "$as_me:16238: result: no" >&5
16239 echo "${ECHO_T}no" >&6
16240 fi
16241
16242 echo "$as_me:16242: checking for builtin bool type" >&5
16243 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
16244
16245 if test "${cf_cv_cc_bool_type+set}" = set; then
16246   echo $ECHO_N "(cached) $ECHO_C" >&6
16247 else
16248
16249         cat >conftest.$ac_ext <<_ACEOF
16250 #line 16250 "configure"
16251 #include "confdefs.h"
16252
16253 #include <stdio.h>
16254 #include <sys/types.h>
16255
16256 int
16257 main ()
16258 {
16259 bool x = false
16260   ;
16261   return 0;
16262 }
16263 _ACEOF
16264 rm -f conftest.$ac_objext
16265 if { (eval echo "$as_me:16265: \"$ac_compile\"") >&5
16266   (eval $ac_compile) 2>&5
16267   ac_status=$?
16268   echo "$as_me:16268: \$? = $ac_status" >&5
16269   (exit $ac_status); } &&
16270          { ac_try='test -s conftest.$ac_objext'
16271   { (eval echo "$as_me:16271: \"$ac_try\"") >&5
16272   (eval $ac_try) 2>&5
16273   ac_status=$?
16274   echo "$as_me:16274: \$? = $ac_status" >&5
16275   (exit $ac_status); }; }; then
16276   cf_cv_cc_bool_type=1
16277 else
16278   echo "$as_me: failed program was:" >&5
16279 cat conftest.$ac_ext >&5
16280 cf_cv_cc_bool_type=0
16281 fi
16282 rm -f conftest.$ac_objext conftest.$ac_ext
16283
16284 fi
16285
16286 if test "$cf_cv_cc_bool_type" = 1
16287 then    echo "$as_me:16287: result: yes" >&5
16288 echo "${ECHO_T}yes" >&6
16289 else    echo "$as_me:16289: result: no" >&5
16290 echo "${ECHO_T}no" >&6
16291 fi
16292
16293 # Check for C++ compiler characteristics (and ensure that it's there!)
16294 if test -n "$CXX" ; then
16295         ac_ext=cc
16296 ac_cpp='$CXXCPP $CPPFLAGS'
16297 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16298 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16299 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16300 ac_main_return=return
16301
16302 if test -n "$GXX" ; then
16303 case $cf_cv_system_name in #(vi
16304 os2*) #(vi
16305         cf_stdcpp_libname=stdcpp
16306         ;;
16307 *)
16308         cf_stdcpp_libname=stdc++
16309         ;;
16310 esac
16311 echo "$as_me:16311: checking for library $cf_stdcpp_libname" >&5
16312 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
16313 if test "${cf_cv_libstdcpp+set}" = set; then
16314   echo $ECHO_N "(cached) $ECHO_C" >&6
16315 else
16316
16317         cf_save="$LIBS"
16318         LIBS="-l$cf_stdcpp_libname $LIBS"
16319 cat >conftest.$ac_ext <<_ACEOF
16320 #line 16320 "configure"
16321 #include "confdefs.h"
16322
16323 #include <strstream.h>
16324 int
16325 main ()
16326 {
16327
16328 char buf[80];
16329 strstreambuf foo(buf, sizeof(buf))
16330
16331   ;
16332   return 0;
16333 }
16334 _ACEOF
16335 rm -f conftest.$ac_objext conftest$ac_exeext
16336 if { (eval echo "$as_me:16336: \"$ac_link\"") >&5
16337   (eval $ac_link) 2>&5
16338   ac_status=$?
16339   echo "$as_me:16339: \$? = $ac_status" >&5
16340   (exit $ac_status); } &&
16341          { ac_try='test -s conftest$ac_exeext'
16342   { (eval echo "$as_me:16342: \"$ac_try\"") >&5
16343   (eval $ac_try) 2>&5
16344   ac_status=$?
16345   echo "$as_me:16345: \$? = $ac_status" >&5
16346   (exit $ac_status); }; }; then
16347   cf_cv_libstdcpp=yes
16348 else
16349   echo "$as_me: failed program was:" >&5
16350 cat conftest.$ac_ext >&5
16351 cf_cv_libstdcpp=no
16352 fi
16353 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16354         LIBS="$cf_save"
16355
16356 fi
16357 echo "$as_me:16357: result: $cf_cv_libstdcpp" >&5
16358 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
16359 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
16360 fi
16361
16362         echo "$as_me:16362: checking whether $CXX understands -c and -o together" >&5
16363 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
16364 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
16365   echo $ECHO_N "(cached) $ECHO_C" >&6
16366 else
16367
16368 cat > conftest.$ac_ext <<CF_EOF
16369 #include <stdio.h>
16370 int main()
16371 {
16372         ${cf_cv_main_return:-return}(0);
16373 }
16374 CF_EOF
16375 # We do the test twice because some compilers refuse to overwrite an
16376 # existing .o file with -o, though they will create one.
16377 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
16378 if { (eval echo "$as_me:16378: \"$ac_try\"") >&5
16379   (eval $ac_try) 2>&5
16380   ac_status=$?
16381   echo "$as_me:16381: \$? = $ac_status" >&5
16382   (exit $ac_status); } &&
16383   test -f conftest2.$ac_objext && { (eval echo "$as_me:16383: \"$ac_try\"") >&5
16384   (eval $ac_try) 2>&5
16385   ac_status=$?
16386   echo "$as_me:16386: \$? = $ac_status" >&5
16387   (exit $ac_status); };
16388 then
16389   eval cf_cv_prog_CXX_c_o=yes
16390 else
16391   eval cf_cv_prog_CXX_c_o=no
16392 fi
16393 rm -f conftest*
16394
16395 fi
16396 if test $cf_cv_prog_CXX_c_o = yes; then
16397   echo "$as_me:16397: result: yes" >&5
16398 echo "${ECHO_T}yes" >&6
16399 else
16400   echo "$as_me:16400: result: no" >&5
16401 echo "${ECHO_T}no" >&6
16402 fi
16403
16404         case $GXX_VERSION in
16405         1*|2.0-6*)
16406                 cf_cxx_library=yes
16407                 ;;
16408         *-2.7*|2.7*)
16409
16410 cf_cxx_library=unknown
16411 case $cf_cv_system_name in #(vi
16412 os2*) #(vi
16413         cf_gpp_libname=gpp
16414         ;;
16415 *)
16416         cf_gpp_libname=g++
16417         ;;
16418 esac
16419 if test "$GXX" = yes; then
16420         echo "$as_me:16420: checking for lib$cf_gpp_libname" >&5
16421 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
16422         cf_save="$LIBS"
16423         LIBS="-l$cf_gpp_libname $LIBS"
16424         cat >conftest.$ac_ext <<_ACEOF
16425 #line 16425 "configure"
16426 #include "confdefs.h"
16427
16428 #include <$cf_gpp_libname/builtin.h>
16429
16430 int
16431 main ()
16432 {
16433 two_arg_error_handler_t foo2 = lib_error_handler
16434   ;
16435   return 0;
16436 }
16437 _ACEOF
16438 rm -f conftest.$ac_objext conftest$ac_exeext
16439 if { (eval echo "$as_me:16439: \"$ac_link\"") >&5
16440   (eval $ac_link) 2>&5
16441   ac_status=$?
16442   echo "$as_me:16442: \$? = $ac_status" >&5
16443   (exit $ac_status); } &&
16444          { ac_try='test -s conftest$ac_exeext'
16445   { (eval echo "$as_me:16445: \"$ac_try\"") >&5
16446   (eval $ac_try) 2>&5
16447   ac_status=$?
16448   echo "$as_me:16448: \$? = $ac_status" >&5
16449   (exit $ac_status); }; }; then
16450   cf_cxx_library=yes
16451          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
16452          if test "$cf_gpp_libname" = cpp ; then
16453             cat >>confdefs.h <<\EOF
16454 #define HAVE_GPP_BUILTIN_H 1
16455 EOF
16456
16457          else
16458             cat >>confdefs.h <<\EOF
16459 #define HAVE_GXX_BUILTIN_H 1
16460 EOF
16461
16462          fi
16463 else
16464   echo "$as_me: failed program was:" >&5
16465 cat conftest.$ac_ext >&5
16466 cat >conftest.$ac_ext <<_ACEOF
16467 #line 16467 "configure"
16468 #include "confdefs.h"
16469
16470 #include <builtin.h>
16471
16472 int
16473 main ()
16474 {
16475 two_arg_error_handler_t foo2 = lib_error_handler
16476   ;
16477   return 0;
16478 }
16479 _ACEOF
16480 rm -f conftest.$ac_objext conftest$ac_exeext
16481 if { (eval echo "$as_me:16481: \"$ac_link\"") >&5
16482   (eval $ac_link) 2>&5
16483   ac_status=$?
16484   echo "$as_me:16484: \$? = $ac_status" >&5
16485   (exit $ac_status); } &&
16486          { ac_try='test -s conftest$ac_exeext'
16487   { (eval echo "$as_me:16487: \"$ac_try\"") >&5
16488   (eval $ac_try) 2>&5
16489   ac_status=$?
16490   echo "$as_me:16490: \$? = $ac_status" >&5
16491   (exit $ac_status); }; }; then
16492   cf_cxx_library=yes
16493          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
16494          cat >>confdefs.h <<\EOF
16495 #define HAVE_BUILTIN_H 1
16496 EOF
16497
16498 else
16499   echo "$as_me: failed program was:" >&5
16500 cat conftest.$ac_ext >&5
16501 cf_cxx_library=no
16502 fi
16503 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16504 fi
16505 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16506         LIBS="$cf_save"
16507         echo "$as_me:16507: result: $cf_cxx_library" >&5
16508 echo "${ECHO_T}$cf_cxx_library" >&6
16509 fi
16510
16511                 ;;
16512         *)
16513                 cf_cxx_library=no
16514                 ;;
16515         esac
16516
16517         ac_ext=cc
16518 ac_cpp='$CXXCPP $CPPFLAGS'
16519 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16520 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16521 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16522 ac_main_return=return
16523 echo "$as_me:16523: checking how to run the C++ preprocessor" >&5
16524 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
16525 if test -z "$CXXCPP"; then
16526   if test "${ac_cv_prog_CXXCPP+set}" = set; then
16527   echo $ECHO_N "(cached) $ECHO_C" >&6
16528 else
16529       # Double quotes because CXXCPP needs to be expanded
16530     for CXXCPP in "$CXX -E" "/lib/cpp"
16531     do
16532       ac_preproc_ok=false
16533 for ac_cxx_preproc_warn_flag in '' yes
16534 do
16535   # Use a header file that comes with gcc, so configuring glibc
16536   # with a fresh cross-compiler works.
16537   # On the NeXT, cc -E runs the code through the compiler's parser,
16538   # not just through cpp. "Syntax error" is here to catch this case.
16539   cat >conftest.$ac_ext <<_ACEOF
16540 #line 16540 "configure"
16541 #include "confdefs.h"
16542 #include <assert.h>
16543                      Syntax error
16544 _ACEOF
16545 if { (eval echo "$as_me:16545: \"$ac_cpp conftest.$ac_ext\"") >&5
16546   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16547   ac_status=$?
16548   egrep -v '^ *\+' conftest.er1 >conftest.err
16549   rm -f conftest.er1
16550   cat conftest.err >&5
16551   echo "$as_me:16551: \$? = $ac_status" >&5
16552   (exit $ac_status); } >/dev/null; then
16553   if test -s conftest.err; then
16554     ac_cpp_err=$ac_cxx_preproc_warn_flag
16555   else
16556     ac_cpp_err=
16557   fi
16558 else
16559   ac_cpp_err=yes
16560 fi
16561 if test -z "$ac_cpp_err"; then
16562   :
16563 else
16564   echo "$as_me: failed program was:" >&5
16565   cat conftest.$ac_ext >&5
16566   # Broken: fails on valid input.
16567 continue
16568 fi
16569 rm -f conftest.err conftest.$ac_ext
16570
16571   # OK, works on sane cases.  Now check whether non-existent headers
16572   # can be detected and how.
16573   cat >conftest.$ac_ext <<_ACEOF
16574 #line 16574 "configure"
16575 #include "confdefs.h"
16576 #include <ac_nonexistent.h>
16577 _ACEOF
16578 if { (eval echo "$as_me:16578: \"$ac_cpp conftest.$ac_ext\"") >&5
16579   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16580   ac_status=$?
16581   egrep -v '^ *\+' conftest.er1 >conftest.err
16582   rm -f conftest.er1
16583   cat conftest.err >&5
16584   echo "$as_me:16584: \$? = $ac_status" >&5
16585   (exit $ac_status); } >/dev/null; then
16586   if test -s conftest.err; then
16587     ac_cpp_err=$ac_cxx_preproc_warn_flag
16588   else
16589     ac_cpp_err=
16590   fi
16591 else
16592   ac_cpp_err=yes
16593 fi
16594 if test -z "$ac_cpp_err"; then
16595   # Broken: success on invalid input.
16596 continue
16597 else
16598   echo "$as_me: failed program was:" >&5
16599   cat conftest.$ac_ext >&5
16600   # Passes both tests.
16601 ac_preproc_ok=:
16602 break
16603 fi
16604 rm -f conftest.err conftest.$ac_ext
16605
16606 done
16607 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
16608 rm -f conftest.err conftest.$ac_ext
16609 if $ac_preproc_ok; then
16610   break
16611 fi
16612
16613     done
16614     ac_cv_prog_CXXCPP=$CXXCPP
16615
16616 fi
16617   CXXCPP=$ac_cv_prog_CXXCPP
16618 else
16619   ac_cv_prog_CXXCPP=$CXXCPP
16620 fi
16621 echo "$as_me:16621: result: $CXXCPP" >&5
16622 echo "${ECHO_T}$CXXCPP" >&6
16623 ac_preproc_ok=false
16624 for ac_cxx_preproc_warn_flag in '' yes
16625 do
16626   # Use a header file that comes with gcc, so configuring glibc
16627   # with a fresh cross-compiler works.
16628   # On the NeXT, cc -E runs the code through the compiler's parser,
16629   # not just through cpp. "Syntax error" is here to catch this case.
16630   cat >conftest.$ac_ext <<_ACEOF
16631 #line 16631 "configure"
16632 #include "confdefs.h"
16633 #include <assert.h>
16634                      Syntax error
16635 _ACEOF
16636 if { (eval echo "$as_me:16636: \"$ac_cpp conftest.$ac_ext\"") >&5
16637   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16638   ac_status=$?
16639   egrep -v '^ *\+' conftest.er1 >conftest.err
16640   rm -f conftest.er1
16641   cat conftest.err >&5
16642   echo "$as_me:16642: \$? = $ac_status" >&5
16643   (exit $ac_status); } >/dev/null; then
16644   if test -s conftest.err; then
16645     ac_cpp_err=$ac_cxx_preproc_warn_flag
16646   else
16647     ac_cpp_err=
16648   fi
16649 else
16650   ac_cpp_err=yes
16651 fi
16652 if test -z "$ac_cpp_err"; then
16653   :
16654 else
16655   echo "$as_me: failed program was:" >&5
16656   cat conftest.$ac_ext >&5
16657   # Broken: fails on valid input.
16658 continue
16659 fi
16660 rm -f conftest.err conftest.$ac_ext
16661
16662   # OK, works on sane cases.  Now check whether non-existent headers
16663   # can be detected and how.
16664   cat >conftest.$ac_ext <<_ACEOF
16665 #line 16665 "configure"
16666 #include "confdefs.h"
16667 #include <ac_nonexistent.h>
16668 _ACEOF
16669 if { (eval echo "$as_me:16669: \"$ac_cpp conftest.$ac_ext\"") >&5
16670   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16671   ac_status=$?
16672   egrep -v '^ *\+' conftest.er1 >conftest.err
16673   rm -f conftest.er1
16674   cat conftest.err >&5
16675   echo "$as_me:16675: \$? = $ac_status" >&5
16676   (exit $ac_status); } >/dev/null; then
16677   if test -s conftest.err; then
16678     ac_cpp_err=$ac_cxx_preproc_warn_flag
16679   else
16680     ac_cpp_err=
16681   fi
16682 else
16683   ac_cpp_err=yes
16684 fi
16685 if test -z "$ac_cpp_err"; then
16686   # Broken: success on invalid input.
16687 continue
16688 else
16689   echo "$as_me: failed program was:" >&5
16690   cat conftest.$ac_ext >&5
16691   # Passes both tests.
16692 ac_preproc_ok=:
16693 break
16694 fi
16695 rm -f conftest.err conftest.$ac_ext
16696
16697 done
16698 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
16699 rm -f conftest.err conftest.$ac_ext
16700 if $ac_preproc_ok; then
16701   :
16702 else
16703   { { echo "$as_me:16703: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
16704 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
16705    { (exit 1); exit 1; }; }
16706 fi
16707
16708 ac_ext=cc
16709 ac_cpp='$CXXCPP $CPPFLAGS'
16710 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16711 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16712 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16713 ac_main_return=return
16714
16715 for ac_header in iostream typeinfo
16716 do
16717 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16718 echo "$as_me:16718: checking for $ac_header" >&5
16719 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16720 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16721   echo $ECHO_N "(cached) $ECHO_C" >&6
16722 else
16723   cat >conftest.$ac_ext <<_ACEOF
16724 #line 16724 "configure"
16725 #include "confdefs.h"
16726 #include <$ac_header>
16727 _ACEOF
16728 if { (eval echo "$as_me:16728: \"$ac_cpp conftest.$ac_ext\"") >&5
16729   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16730   ac_status=$?
16731   egrep -v '^ *\+' conftest.er1 >conftest.err
16732   rm -f conftest.er1
16733   cat conftest.err >&5
16734   echo "$as_me:16734: \$? = $ac_status" >&5
16735   (exit $ac_status); } >/dev/null; then
16736   if test -s conftest.err; then
16737     ac_cpp_err=$ac_cxx_preproc_warn_flag
16738   else
16739     ac_cpp_err=
16740   fi
16741 else
16742   ac_cpp_err=yes
16743 fi
16744 if test -z "$ac_cpp_err"; then
16745   eval "$as_ac_Header=yes"
16746 else
16747   echo "$as_me: failed program was:" >&5
16748   cat conftest.$ac_ext >&5
16749   eval "$as_ac_Header=no"
16750 fi
16751 rm -f conftest.err conftest.$ac_ext
16752 fi
16753 echo "$as_me:16753: result: `eval echo '${'$as_ac_Header'}'`" >&5
16754 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16755 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16756   cat >>confdefs.h <<EOF
16757 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16758 EOF
16759
16760 fi
16761 done
16762
16763     if test x"$ac_cv_header_iostream" = xyes ; then
16764         echo "$as_me:16764: checking if iostream uses std-namespace" >&5
16765 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
16766         cat >conftest.$ac_ext <<_ACEOF
16767 #line 16767 "configure"
16768 #include "confdefs.h"
16769
16770 #include <iostream>
16771 using std::endl;
16772 using std::cerr;
16773 int
16774 main ()
16775 {
16776
16777 cerr << "testing" << endl;
16778
16779   ;
16780   return 0;
16781 }
16782 _ACEOF
16783 rm -f conftest.$ac_objext
16784 if { (eval echo "$as_me:16784: \"$ac_compile\"") >&5
16785   (eval $ac_compile) 2>&5
16786   ac_status=$?
16787   echo "$as_me:16787: \$? = $ac_status" >&5
16788   (exit $ac_status); } &&
16789          { ac_try='test -s conftest.$ac_objext'
16790   { (eval echo "$as_me:16790: \"$ac_try\"") >&5
16791   (eval $ac_try) 2>&5
16792   ac_status=$?
16793   echo "$as_me:16793: \$? = $ac_status" >&5
16794   (exit $ac_status); }; }; then
16795   cf_iostream_namespace=yes
16796 else
16797   echo "$as_me: failed program was:" >&5
16798 cat conftest.$ac_ext >&5
16799 cf_iostream_namespace=no
16800 fi
16801 rm -f conftest.$ac_objext conftest.$ac_ext
16802         echo "$as_me:16802: result: $cf_iostream_namespace" >&5
16803 echo "${ECHO_T}$cf_iostream_namespace" >&6
16804         if test "$cf_iostream_namespace" = yes ; then
16805             cat >>confdefs.h <<\EOF
16806 #define IOSTREAM_NAMESPACE 1
16807 EOF
16808
16809         fi
16810     fi
16811
16812 echo "$as_me:16812: checking if we should include stdbool.h" >&5
16813 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
16814
16815 if test "${cf_cv_header_stdbool_h+set}" = set; then
16816   echo $ECHO_N "(cached) $ECHO_C" >&6
16817 else
16818
16819         cat >conftest.$ac_ext <<_ACEOF
16820 #line 16820 "configure"
16821 #include "confdefs.h"
16822
16823 int
16824 main ()
16825 {
16826 bool foo = false
16827   ;
16828   return 0;
16829 }
16830 _ACEOF
16831 rm -f conftest.$ac_objext
16832 if { (eval echo "$as_me:16832: \"$ac_compile\"") >&5
16833   (eval $ac_compile) 2>&5
16834   ac_status=$?
16835   echo "$as_me:16835: \$? = $ac_status" >&5
16836   (exit $ac_status); } &&
16837          { ac_try='test -s conftest.$ac_objext'
16838   { (eval echo "$as_me:16838: \"$ac_try\"") >&5
16839   (eval $ac_try) 2>&5
16840   ac_status=$?
16841   echo "$as_me:16841: \$? = $ac_status" >&5
16842   (exit $ac_status); }; }; then
16843   cf_cv_header_stdbool_h=0
16844 else
16845   echo "$as_me: failed program was:" >&5
16846 cat conftest.$ac_ext >&5
16847 cat >conftest.$ac_ext <<_ACEOF
16848 #line 16848 "configure"
16849 #include "confdefs.h"
16850
16851 #ifndef __BEOS__
16852 #include <stdbool.h>
16853 #endif
16854
16855 int
16856 main ()
16857 {
16858 bool foo = false
16859   ;
16860   return 0;
16861 }
16862 _ACEOF
16863 rm -f conftest.$ac_objext
16864 if { (eval echo "$as_me:16864: \"$ac_compile\"") >&5
16865   (eval $ac_compile) 2>&5
16866   ac_status=$?
16867   echo "$as_me:16867: \$? = $ac_status" >&5
16868   (exit $ac_status); } &&
16869          { ac_try='test -s conftest.$ac_objext'
16870   { (eval echo "$as_me:16870: \"$ac_try\"") >&5
16871   (eval $ac_try) 2>&5
16872   ac_status=$?
16873   echo "$as_me:16873: \$? = $ac_status" >&5
16874   (exit $ac_status); }; }; then
16875   cf_cv_header_stdbool_h=1
16876 else
16877   echo "$as_me: failed program was:" >&5
16878 cat conftest.$ac_ext >&5
16879 cf_cv_header_stdbool_h=0
16880 fi
16881 rm -f conftest.$ac_objext conftest.$ac_ext
16882 fi
16883 rm -f conftest.$ac_objext conftest.$ac_ext
16884 fi
16885
16886 if test "$cf_cv_header_stdbool_h" = 1
16887 then    echo "$as_me:16887: result: yes" >&5
16888 echo "${ECHO_T}yes" >&6
16889 else    echo "$as_me:16889: result: no" >&5
16890 echo "${ECHO_T}no" >&6
16891 fi
16892
16893 echo "$as_me:16893: checking for builtin bool type" >&5
16894 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
16895
16896 if test "${cf_cv_builtin_bool+set}" = set; then
16897   echo $ECHO_N "(cached) $ECHO_C" >&6
16898 else
16899
16900         cat >conftest.$ac_ext <<_ACEOF
16901 #line 16901 "configure"
16902 #include "confdefs.h"
16903
16904 #include <stdio.h>
16905 #include <sys/types.h>
16906
16907 int
16908 main ()
16909 {
16910 bool x = false
16911   ;
16912   return 0;
16913 }
16914 _ACEOF
16915 rm -f conftest.$ac_objext
16916 if { (eval echo "$as_me:16916: \"$ac_compile\"") >&5
16917   (eval $ac_compile) 2>&5
16918   ac_status=$?
16919   echo "$as_me:16919: \$? = $ac_status" >&5
16920   (exit $ac_status); } &&
16921          { ac_try='test -s conftest.$ac_objext'
16922   { (eval echo "$as_me:16922: \"$ac_try\"") >&5
16923   (eval $ac_try) 2>&5
16924   ac_status=$?
16925   echo "$as_me:16925: \$? = $ac_status" >&5
16926   (exit $ac_status); }; }; then
16927   cf_cv_builtin_bool=1
16928 else
16929   echo "$as_me: failed program was:" >&5
16930 cat conftest.$ac_ext >&5
16931 cf_cv_builtin_bool=0
16932 fi
16933 rm -f conftest.$ac_objext conftest.$ac_ext
16934
16935 fi
16936
16937 if test "$cf_cv_builtin_bool" = 1
16938 then    echo "$as_me:16938: result: yes" >&5
16939 echo "${ECHO_T}yes" >&6
16940 else    echo "$as_me:16940: result: no" >&5
16941 echo "${ECHO_T}no" >&6
16942 fi
16943
16944 echo "$as_me:16944: checking for size of bool" >&5
16945 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
16946 if test "${cf_cv_type_of_bool+set}" = set; then
16947   echo $ECHO_N "(cached) $ECHO_C" >&6
16948 else
16949
16950         rm -f cf_test.out
16951         if test "$cross_compiling" = yes; then
16952   cf_cv_type_of_bool=unknown
16953 else
16954   cat >conftest.$ac_ext <<_ACEOF
16955 #line 16955 "configure"
16956 #include "confdefs.h"
16957
16958 #include <stdlib.h>
16959 #include <stdio.h>
16960
16961 #if defined(__cplusplus)
16962
16963 #ifdef HAVE_GXX_BUILTIN_H
16964 #include <g++/builtin.h>
16965 #elif HAVE_GPP_BUILTIN_H
16966 #include <gpp/builtin.h>
16967 #elif HAVE_BUILTIN_H
16968 #include <builtin.h>
16969 #endif
16970
16971 #else
16972
16973 #if $cf_cv_header_stdbool_h
16974 #include <stdbool.h>
16975 #endif
16976
16977 #endif
16978
16979 main()
16980 {
16981         FILE *fp = fopen("cf_test.out", "w");
16982         if (fp != 0) {
16983                 bool x = true;
16984                 if ((bool)(-x) >= 0)
16985                         fputs("unsigned ", fp);
16986                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
16987                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
16988                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
16989                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
16990                 fclose(fp);
16991         }
16992         ${cf_cv_main_return:-return}(0);
16993 }
16994
16995 _ACEOF
16996 rm -f conftest$ac_exeext
16997 if { (eval echo "$as_me:16997: \"$ac_link\"") >&5
16998   (eval $ac_link) 2>&5
16999   ac_status=$?
17000   echo "$as_me:17000: \$? = $ac_status" >&5
17001   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17002   { (eval echo "$as_me:17002: \"$ac_try\"") >&5
17003   (eval $ac_try) 2>&5
17004   ac_status=$?
17005   echo "$as_me:17005: \$? = $ac_status" >&5
17006   (exit $ac_status); }; }; then
17007   cf_cv_type_of_bool=`cat cf_test.out`
17008                  if test -z "$cf_cv_type_of_bool"; then
17009                    cf_cv_type_of_bool=unknown
17010                  fi
17011 else
17012   echo "$as_me: program exited with status $ac_status" >&5
17013 echo "$as_me: failed program was:" >&5
17014 cat conftest.$ac_ext >&5
17015 cf_cv_type_of_bool=unknown
17016 fi
17017 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17018 fi
17019
17020 fi
17021
17022         rm -f cf_test.out
17023 echo "$as_me:17023: result: $cf_cv_type_of_bool" >&5
17024 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17025 if test "$cf_cv_type_of_bool" = unknown ; then
17026         case .$NCURSES_BOOL in #(vi
17027         .auto|.) NCURSES_BOOL=unsigned;;
17028         esac
17029         { echo "$as_me:17029: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
17030 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
17031         cf_cv_type_of_bool=$NCURSES_BOOL
17032 fi
17033
17034 echo "$as_me:17034: checking for special defines needed for etip.h" >&5
17035 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
17036 cf_save_CXXFLAGS="$CXXFLAGS"
17037 cf_result="none"
17038 for cf_math in "" MATH_H
17039 do
17040 for cf_excp in "" MATH_EXCEPTION
17041 do
17042         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
17043         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
17044         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
17045 cat >conftest.$ac_ext <<_ACEOF
17046 #line 17046 "configure"
17047 #include "confdefs.h"
17048
17049 #include <etip.h.in>
17050
17051 int
17052 main ()
17053 {
17054
17055   ;
17056   return 0;
17057 }
17058 _ACEOF
17059 rm -f conftest.$ac_objext
17060 if { (eval echo "$as_me:17060: \"$ac_compile\"") >&5
17061   (eval $ac_compile) 2>&5
17062   ac_status=$?
17063   echo "$as_me:17063: \$? = $ac_status" >&5
17064   (exit $ac_status); } &&
17065          { ac_try='test -s conftest.$ac_objext'
17066   { (eval echo "$as_me:17066: \"$ac_try\"") >&5
17067   (eval $ac_try) 2>&5
17068   ac_status=$?
17069   echo "$as_me:17069: \$? = $ac_status" >&5
17070   (exit $ac_status); }; }; then
17071
17072         test -n "$cf_math" && cat >>confdefs.h <<EOF
17073 #define ETIP_NEEDS_${cf_math} 1
17074 EOF
17075
17076         test -n "$cf_excp" && cat >>confdefs.h <<EOF
17077 #define ETIP_NEEDS_${cf_excp} 1
17078 EOF
17079
17080         cf_result="$cf_math $cf_excp"
17081         break
17082
17083 else
17084   echo "$as_me: failed program was:" >&5
17085 cat conftest.$ac_ext >&5
17086 fi
17087 rm -f conftest.$ac_objext conftest.$ac_ext
17088 done
17089 done
17090 echo "$as_me:17090: result: $cf_result" >&5
17091 echo "${ECHO_T}$cf_result" >&6
17092 CXXFLAGS="$cf_save_CXXFLAGS"
17093
17094 if test -n "$CXX"; then
17095 echo "$as_me:17095: checking if $CXX accepts parameter initialization" >&5
17096 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
17097 if test "${cf_cv_cpp_param_init+set}" = set; then
17098   echo $ECHO_N "(cached) $ECHO_C" >&6
17099 else
17100
17101         ac_ext=cc
17102 ac_cpp='$CXXCPP $CPPFLAGS'
17103 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17104 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17105 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17106 ac_main_return=return
17107
17108         if test "$cross_compiling" = yes; then
17109   cf_cv_cpp_param_init=unknown
17110 else
17111   cat >conftest.$ac_ext <<_ACEOF
17112 #line 17112 "configure"
17113 #include "confdefs.h"
17114
17115 class TEST {
17116 private:
17117         int value;
17118 public:
17119         TEST(int x = 1);
17120         ~TEST();
17121 };
17122
17123 TEST::TEST(int x = 1)   // some compilers do not like second initializer
17124 {
17125         value = x;
17126 }
17127 void main() { }
17128
17129 _ACEOF
17130 rm -f conftest$ac_exeext
17131 if { (eval echo "$as_me:17131: \"$ac_link\"") >&5
17132   (eval $ac_link) 2>&5
17133   ac_status=$?
17134   echo "$as_me:17134: \$? = $ac_status" >&5
17135   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17136   { (eval echo "$as_me:17136: \"$ac_try\"") >&5
17137   (eval $ac_try) 2>&5
17138   ac_status=$?
17139   echo "$as_me:17139: \$? = $ac_status" >&5
17140   (exit $ac_status); }; }; then
17141   cf_cv_cpp_param_init=yes
17142 else
17143   echo "$as_me: program exited with status $ac_status" >&5
17144 echo "$as_me: failed program was:" >&5
17145 cat conftest.$ac_ext >&5
17146 cf_cv_cpp_param_init=no
17147 fi
17148 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17149 fi
17150         ac_ext=cc
17151 ac_cpp='$CXXCPP $CPPFLAGS'
17152 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17153 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17154 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17155 ac_main_return=return
17156
17157 fi
17158 echo "$as_me:17158: result: $cf_cv_cpp_param_init" >&5
17159 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
17160 fi
17161 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
17162 #define CPP_HAS_PARAM_INIT 1
17163 EOF
17164
17165 if test -n "$CXX"; then
17166
17167 echo "$as_me:17167: checking if $CXX accepts static_cast" >&5
17168 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
17169 if test "${cf_cv_cpp_static_cast+set}" = set; then
17170   echo $ECHO_N "(cached) $ECHO_C" >&6
17171 else
17172
17173         ac_ext=cc
17174 ac_cpp='$CXXCPP $CPPFLAGS'
17175 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17176 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17177 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17178 ac_main_return=return
17179
17180         cat >conftest.$ac_ext <<_ACEOF
17181 #line 17181 "configure"
17182 #include "confdefs.h"
17183
17184 class NCursesPanel
17185 {
17186 public:
17187   NCursesPanel(int nlines,
17188                int ncols,
17189                int begin_y = 0,
17190                int begin_x = 0)
17191   {
17192   }
17193
17194   ~NCursesPanel();
17195 };
17196
17197 template<class T> class NCursesUserPanel : public NCursesPanel
17198 {
17199 public:
17200   NCursesUserPanel (int nlines,
17201                     int ncols,
17202                     int begin_y = 0,
17203                     int begin_x = 0,
17204                     const T* p_UserData = static_cast<T*>(0))
17205     : NCursesPanel (nlines, ncols, begin_y, begin_x)
17206   {
17207   };
17208   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
17209   {
17210   };
17211
17212   virtual ~NCursesUserPanel() {};
17213 };
17214
17215 int
17216 main ()
17217 {
17218
17219         const char* p_UserData = static_cast<char*>(0)
17220   ;
17221   return 0;
17222 }
17223 _ACEOF
17224 rm -f conftest.$ac_objext
17225 if { (eval echo "$as_me:17225: \"$ac_compile\"") >&5
17226   (eval $ac_compile) 2>&5
17227   ac_status=$?
17228   echo "$as_me:17228: \$? = $ac_status" >&5
17229   (exit $ac_status); } &&
17230          { ac_try='test -s conftest.$ac_objext'
17231   { (eval echo "$as_me:17231: \"$ac_try\"") >&5
17232   (eval $ac_try) 2>&5
17233   ac_status=$?
17234   echo "$as_me:17234: \$? = $ac_status" >&5
17235   (exit $ac_status); }; }; then
17236   cf_cv_cpp_static_cast=yes
17237 else
17238   echo "$as_me: failed program was:" >&5
17239 cat conftest.$ac_ext >&5
17240 cf_cv_cpp_static_cast=no
17241 fi
17242 rm -f conftest.$ac_objext conftest.$ac_ext
17243
17244         ac_ext=cc
17245 ac_cpp='$CXXCPP $CPPFLAGS'
17246 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17247 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17248 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17249 ac_main_return=return
17250
17251 fi
17252 echo "$as_me:17252: result: $cf_cv_cpp_static_cast" >&5
17253 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
17254
17255 fi
17256
17257 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
17258 #define CPP_HAS_STATIC_CAST 1
17259 EOF
17260
17261         CXX_AR='$(AR)'
17262         CXX_ARFLAGS='$(ARFLAGS)'
17263         case $cf_cv_system_name in #(vi
17264         irix*) #(vi
17265             if test "$GXX" != yes ; then
17266                 CXX_AR='$(CXX)'
17267                 CXX_ARFLAGS='-ar -o'
17268             fi
17269             ;;
17270         sco3.2v5*) #(vi
17271             CXXLDFLAGS="-u main"
17272             ;;
17273         solaris2*)
17274             if test "$GXX" != yes ; then
17275                 CXX_AR='$(CXX)'
17276                 CXX_ARFLAGS='-xar -o'
17277             fi
17278             ;;
17279         esac
17280
17281 else
17282         cf_cxx_library=no
17283         cf_cv_builtin_bool=1
17284
17285         # Just because we are not configuring against C++ right now does not
17286         # mean that a user will not want to use C++.  Some distributors disable
17287         # the C++ portion of this configuration as a shortcut (or just to avoid
17288         # compiling the demo in the c++ directory).  So we need a reasonable
17289         # default for the 'bool' type.
17290         #
17291         # Caveat: since the storage of the bool type is not standardized, it
17292         # may change.
17293
17294         if test "$NCURSES_BOOL" != auto ; then
17295                 cf_cv_type_of_bool=$NCURSES_BOOL
17296                 cf_cv_header_stdbool_h=0
17297         else
17298                 if test "$cf_cv_header_stdbool_h" = 1 ; then
17299
17300 echo "$as_me:17300: checking for size of bool" >&5
17301 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
17302 if test "${cf_cv_type_of_bool+set}" = set; then
17303   echo $ECHO_N "(cached) $ECHO_C" >&6
17304 else
17305
17306         rm -f cf_test.out
17307         if test "$cross_compiling" = yes; then
17308   cf_cv_type_of_bool=unknown
17309 else
17310   cat >conftest.$ac_ext <<_ACEOF
17311 #line 17311 "configure"
17312 #include "confdefs.h"
17313
17314 #include <stdlib.h>
17315 #include <stdio.h>
17316
17317 #if defined(__cplusplus)
17318
17319 #ifdef HAVE_GXX_BUILTIN_H
17320 #include <g++/builtin.h>
17321 #elif HAVE_GPP_BUILTIN_H
17322 #include <gpp/builtin.h>
17323 #elif HAVE_BUILTIN_H
17324 #include <builtin.h>
17325 #endif
17326
17327 #else
17328
17329 #if $cf_cv_header_stdbool_h
17330 #include <stdbool.h>
17331 #endif
17332
17333 #endif
17334
17335 main()
17336 {
17337         FILE *fp = fopen("cf_test.out", "w");
17338         if (fp != 0) {
17339                 bool x = true;
17340                 if ((bool)(-x) >= 0)
17341                         fputs("unsigned ", fp);
17342                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
17343                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
17344                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
17345                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
17346                 fclose(fp);
17347         }
17348         ${cf_cv_main_return:-return}(0);
17349 }
17350
17351 _ACEOF
17352 rm -f conftest$ac_exeext
17353 if { (eval echo "$as_me:17353: \"$ac_link\"") >&5
17354   (eval $ac_link) 2>&5
17355   ac_status=$?
17356   echo "$as_me:17356: \$? = $ac_status" >&5
17357   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17358   { (eval echo "$as_me:17358: \"$ac_try\"") >&5
17359   (eval $ac_try) 2>&5
17360   ac_status=$?
17361   echo "$as_me:17361: \$? = $ac_status" >&5
17362   (exit $ac_status); }; }; then
17363   cf_cv_type_of_bool=`cat cf_test.out`
17364                  if test -z "$cf_cv_type_of_bool"; then
17365                    cf_cv_type_of_bool=unknown
17366                  fi
17367 else
17368   echo "$as_me: program exited with status $ac_status" >&5
17369 echo "$as_me: failed program was:" >&5
17370 cat conftest.$ac_ext >&5
17371 cf_cv_type_of_bool=unknown
17372 fi
17373 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17374 fi
17375
17376 fi
17377
17378         rm -f cf_test.out
17379 echo "$as_me:17379: result: $cf_cv_type_of_bool" >&5
17380 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17381 if test "$cf_cv_type_of_bool" = unknown ; then
17382         case .$NCURSES_BOOL in #(vi
17383         .auto|.) NCURSES_BOOL=unsigned;;
17384         esac
17385         { echo "$as_me:17385: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
17386 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
17387         cf_cv_type_of_bool=$NCURSES_BOOL
17388 fi
17389
17390                 else
17391                         echo "$as_me:17391: checking for fallback type of bool" >&5
17392 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
17393                         case "$host_cpu" in #(vi
17394                         i?86)   cf_cv_type_of_bool=char ;; #(vi
17395                         *)      cf_cv_type_of_bool=int  ;;
17396                         esac
17397                         echo "$as_me:17397: result: $cf_cv_type_of_bool" >&5
17398 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17399                 fi
17400         fi
17401 fi
17402
17403 # If the C compiler did not declare bool, and we did not determine that the C++
17404 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
17405 # ncurses library use the same type as C++ bool.  Note that this allows one to
17406 # specify the type of bool in a configure-script option and postpone
17407 # integration with the C++ compiler provided that the types are compatible.
17408 USE_CXX_BOOL=1
17409 if test $cf_cv_cc_bool_type = 1
17410 then
17411         # oops: C has a bool.  Unlikely, but C++ could differ.
17412         USE_CXX_BOOL=0
17413 elif test $cf_cv_builtin_bool = 0
17414 then
17415         # C++ has no bool
17416         USE_CXX_BOOL=0
17417 else
17418         # this is the normal case
17419         USE_CXX_BOOL='defined(__cplusplus)'
17420 fi
17421
17422 if test -f "${srcdir}/Ada95/Makefile.in" ; then
17423
17424 if test "$cf_with_ada" != "no" ; then
17425     if test "$with_libtool" != "no"; then
17426         { echo "$as_me:17426: WARNING: libtool does not support Ada - disabling feature" >&5
17427 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
17428         cf_with_ada=no
17429     fi
17430 fi
17431
17432 if test "$cf_with_ada" != "no" ; then
17433 cf_ada_make=gnatmake
17434 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
17435 set dummy $cf_ada_make; ac_word=$2
17436 echo "$as_me:17436: checking for $ac_word" >&5
17437 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17438 if test "${ac_cv_prog_gnat_exists+set}" = set; then
17439   echo $ECHO_N "(cached) $ECHO_C" >&6
17440 else
17441   if test -n "$gnat_exists"; then
17442   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
17443 else
17444   ac_save_IFS=$IFS; IFS=$ac_path_separator
17445 ac_dummy="$PATH"
17446 for ac_dir in $ac_dummy; do
17447   IFS=$ac_save_IFS
17448   test -z "$ac_dir" && ac_dir=.
17449   $as_executable_p "$ac_dir/$ac_word" || continue
17450 ac_cv_prog_gnat_exists="yes"
17451 echo "$as_me:17451: found $ac_dir/$ac_word" >&5
17452 break
17453 done
17454
17455   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
17456 fi
17457 fi
17458 gnat_exists=$ac_cv_prog_gnat_exists
17459 if test -n "$gnat_exists"; then
17460   echo "$as_me:17460: result: $gnat_exists" >&5
17461 echo "${ECHO_T}$gnat_exists" >&6
17462 else
17463   echo "$as_me:17463: result: no" >&5
17464 echo "${ECHO_T}no" >&6
17465 fi
17466
17467 if test "$ac_cv_prog_gnat_exists" = no; then
17468    cf_ada_make=
17469 else
17470
17471 echo "$as_me:17471: checking for gnat version" >&5
17472 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
17473 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
17474   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17475 echo "$as_me:17475: result: $cf_gnat_version" >&5
17476 echo "${ECHO_T}$cf_gnat_version" >&6
17477
17478 case $cf_gnat_version in
17479   3.1[1-9]*|3.[2-9]*|[4-9].*)
17480     cf_cv_prog_gnat_correct=yes
17481     ;;
17482   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
17483      cf_cv_prog_gnat_correct=no
17484      ;;
17485 esac
17486 case $cf_gnat_version in
17487   3.[1-9]*|[4-9].*)
17488       cf_compile_generics=generics
17489       cf_generic_objects="\${GENOBJS}"
17490       ;;
17491   *)  cf_compile_generics=
17492       cf_generic_objects=
17493       ;;
17494 esac
17495
17496    # Extract the first word of "m4", so it can be a program name with args.
17497 set dummy m4; ac_word=$2
17498 echo "$as_me:17498: checking for $ac_word" >&5
17499 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17500 if test "${ac_cv_prog_M4_exists+set}" = set; then
17501   echo $ECHO_N "(cached) $ECHO_C" >&6
17502 else
17503   if test -n "$M4_exists"; then
17504   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
17505 else
17506   ac_save_IFS=$IFS; IFS=$ac_path_separator
17507 ac_dummy="$PATH"
17508 for ac_dir in $ac_dummy; do
17509   IFS=$ac_save_IFS
17510   test -z "$ac_dir" && ac_dir=.
17511   $as_executable_p "$ac_dir/$ac_word" || continue
17512 ac_cv_prog_M4_exists="yes"
17513 echo "$as_me:17513: found $ac_dir/$ac_word" >&5
17514 break
17515 done
17516
17517   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
17518 fi
17519 fi
17520 M4_exists=$ac_cv_prog_M4_exists
17521 if test -n "$M4_exists"; then
17522   echo "$as_me:17522: result: $M4_exists" >&5
17523 echo "${ECHO_T}$M4_exists" >&6
17524 else
17525   echo "$as_me:17525: result: no" >&5
17526 echo "${ECHO_T}no" >&6
17527 fi
17528
17529    if test "$ac_cv_prog_M4_exists" = no; then
17530       cf_cv_prog_gnat_correct=no
17531       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
17532    fi
17533    if test "$cf_cv_prog_gnat_correct" = yes; then
17534       echo "$as_me:17534: checking if GNAT works" >&5
17535 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
17536
17537 rm -f conftest*
17538 cat >>conftest.ads <<CF_EOF
17539 procedure conftest;
17540 CF_EOF
17541 cat >>conftest.adb <<CF_EOF
17542 with Text_IO;
17543 with GNAT.OS_Lib;
17544 procedure conftest is
17545 begin
17546    Text_IO.Put ("Hello World");
17547    Text_IO.New_Line;
17548    GNAT.OS_Lib.OS_Exit (0);
17549 end conftest;
17550 CF_EOF
17551 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17552    if ( ./conftest 1>&5 2>&1 ) ; then
17553       cf_cv_prog_gnat_correct=yes
17554    else
17555       cf_cv_prog_gnat_correct=no
17556    fi
17557 else
17558    cf_cv_prog_gnat_correct=no
17559 fi
17560 rm -f conftest*
17561
17562       echo "$as_me:17562: result: $cf_cv_prog_gnat_correct" >&5
17563 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
17564    fi
17565 fi
17566 if test "$cf_cv_prog_gnat_correct" = yes; then
17567    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
17568
17569    echo "$as_me:17569: checking if GNAT pragma Unreferenced works" >&5
17570 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
17571
17572 rm -f conftest*
17573 cat >>conftest.ads <<CF_EOF
17574 procedure conftest;
17575 CF_EOF
17576 cat >>conftest.adb <<CF_EOF
17577 with Text_IO;
17578 with GNAT.OS_Lib;
17579 procedure conftest is
17580    test : Integer;
17581    pragma Unreferenced (test);
17582 begin
17583    test := 1;
17584    Text_IO.Put ("Hello World");
17585    Text_IO.New_Line;
17586    GNAT.OS_Lib.OS_Exit (0);
17587 end conftest;
17588 CF_EOF
17589 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17590       cf_cv_pragma_unreferenced=yes
17591 else
17592    cf_cv_pragma_unreferenced=no
17593 fi
17594 rm -f conftest*
17595
17596    echo "$as_me:17596: result: $cf_cv_pragma_unreferenced" >&5
17597 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
17598
17599    # if the pragma is supported, use it (needed in the Trace code).
17600    if test $cf_cv_pragma_unreferenced = yes ; then
17601       PRAGMA_UNREF=TRUE
17602    else
17603       PRAGMA_UNREF=FALSE
17604    fi
17605
17606 # Check whether --with-ada-compiler or --without-ada-compiler was given.
17607 if test "${with_ada_compiler+set}" = set; then
17608   withval="$with_ada_compiler"
17609   cf_ada_compiler=$withval
17610 else
17611   cf_ada_compiler=gnatmake
17612 fi;
17613
17614    cf_ada_package=terminal_interface
17615
17616 # Check whether --with-ada-include or --without-ada-include was given.
17617 if test "${with_ada_include+set}" = set; then
17618   withval="$with_ada_include"
17619
17620 else
17621   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
17622 fi; if test -n "$prefix/lib/ada/adainclude" ; then
17623
17624 if test "x$prefix" != xNONE; then
17625   cf_path_syntax="$prefix"
17626 else
17627   cf_path_syntax="$ac_default_prefix"
17628 fi
17629
17630 case ".$withval" in #(vi
17631 .\$\(*\)*|.\'*\'*) #(vi
17632   ;;
17633 ..|./*|.\\*) #(vi
17634   ;;
17635 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
17636   ;;
17637 .\${*prefix}*) #(vi
17638   eval withval="$withval"
17639   case ".$withval" in #(vi
17640   .NONE/*)
17641     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17642     ;;
17643   esac
17644   ;; #(vi
17645 .no|.NONE/*)
17646   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17647   ;;
17648 *)
17649   { { echo "$as_me:17649: error: expected a pathname, not \"$withval\"" >&5
17650 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17651    { (exit 1); exit 1; }; }
17652   ;;
17653 esac
17654
17655 fi
17656 ADA_INCLUDE="$withval"
17657
17658 # Check whether --with-ada-objects or --without-ada-objects was given.
17659 if test "${with_ada_objects+set}" = set; then
17660   withval="$with_ada_objects"
17661
17662 else
17663   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
17664 fi; if test -n "$prefix/lib/ada/adalib" ; then
17665
17666 if test "x$prefix" != xNONE; then
17667   cf_path_syntax="$prefix"
17668 else
17669   cf_path_syntax="$ac_default_prefix"
17670 fi
17671
17672 case ".$withval" in #(vi
17673 .\$\(*\)*|.\'*\'*) #(vi
17674   ;;
17675 ..|./*|.\\*) #(vi
17676   ;;
17677 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
17678   ;;
17679 .\${*prefix}*) #(vi
17680   eval withval="$withval"
17681   case ".$withval" in #(vi
17682   .NONE/*)
17683     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17684     ;;
17685   esac
17686   ;; #(vi
17687 .no|.NONE/*)
17688   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17689   ;;
17690 *)
17691   { { echo "$as_me:17691: error: expected a pathname, not \"$withval\"" >&5
17692 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17693    { (exit 1); exit 1; }; }
17694   ;;
17695 esac
17696
17697 fi
17698 ADA_OBJECTS="$withval"
17699
17700 fi
17701 fi
17702 else
17703    cf_with_ada=no
17704 fi
17705
17706 ### Construct the ncurses library-subsets, if any, from this set of keywords:
17707 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
17708 ###
17709 ### ticlib modules may be a separate library, otherwise contained in termlib.
17710 ### termlib modules may be a separate library, otherwise contained in ncurses.
17711 ###
17712 ### The of "+" or " " between the tokens controls the way the script
17713 ### chooses to split module lists into libraries.
17714 ###
17715 ### (see CF_LIB_RULES).
17716 echo "$as_me:17716: checking for library subsets" >&5
17717 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
17718 LIB_SUBSETS=
17719
17720 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
17721         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
17722         if test "$with_ticlib" != no ; then
17723                 LIB_SUBSETS="${LIB_SUBSETS} "
17724         else
17725                 LIB_SUBSETS="${LIB_SUBSETS}+"
17726         fi
17727 fi
17728
17729 LIB_SUBSETS="${LIB_SUBSETS}termlib"
17730 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
17731
17732 if test "$with_termlib" != no ; then
17733         LIB_SUBSETS="${LIB_SUBSETS} "
17734 else
17735         LIB_SUBSETS="${LIB_SUBSETS}+"
17736 fi
17737
17738 LIB_SUBSETS="${LIB_SUBSETS}base"
17739
17740 # Most term-driver calls are to tinfo, but some like init_pair are to the
17741 # base library (so it resides in base).
17742 if test "$with_term_driver" != no ; then
17743         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
17744         case $cf_cv_system_name in #(vi
17745         *mingw32*) #(vi
17746                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
17747                 ;;
17748         *) #(vi
17749                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
17750                 ;;
17751         esac
17752 fi
17753
17754 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
17755 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
17756
17757 echo "$as_me:17757: result: $LIB_SUBSETS" >&5
17758 echo "${ECHO_T}$LIB_SUBSETS" >&6
17759
17760 ### Construct the list of include-directories to be generated
17761
17762 CPPFLAGS="$CPPFLAGS -I. -I../include"
17763 if test "$srcdir" != "."; then
17764         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
17765 fi
17766 if test "$GCC" != yes; then
17767         CPPFLAGS="$CPPFLAGS -I\${includedir}"
17768 elif test "$includedir" != "/usr/include"; then
17769         if test "$includedir" = '${prefix}/include' ; then
17770                 if test $prefix != /usr ; then
17771                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
17772                 fi
17773         else
17774                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
17775         fi
17776 fi
17777
17778 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
17779 if test "$srcdir" != "."; then
17780         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
17781 fi
17782 if test "$GCC" != yes; then
17783         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17784 elif test "$includedir" != "/usr/include"; then
17785         if test "$includedir" = '${prefix}/include' ; then
17786                 if test $prefix != /usr ; then
17787                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17788                 fi
17789         else
17790                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17791         fi
17792 fi
17793
17794 ### Build up pieces for makefile rules
17795 echo "$as_me:17795: checking default library suffix" >&5
17796 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
17797
17798         case $DFT_LWR_MODEL in
17799         libtool) DFT_ARG_SUFFIX=''   ;;
17800         normal)  DFT_ARG_SUFFIX=''   ;;
17801         debug)   DFT_ARG_SUFFIX='_g' ;;
17802         profile) DFT_ARG_SUFFIX='_p' ;;
17803         shared)  DFT_ARG_SUFFIX=''   ;;
17804         esac
17805         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
17806 echo "$as_me:17806: result: $DFT_ARG_SUFFIX" >&5
17807 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
17808
17809 echo "$as_me:17809: checking default library-dependency suffix" >&5
17810 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
17811
17812         case $DFT_LWR_MODEL in #(vi
17813         libtool) #(vi
17814                 DFT_LIB_SUFFIX='.la'
17815                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17816                 ;;
17817         normal) #(vi
17818                 DFT_LIB_SUFFIX='.a'
17819                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17820                 ;;
17821         debug) #(vi
17822                 DFT_LIB_SUFFIX='_g.a'
17823                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17824                 ;;
17825         profile) #(vi
17826                 DFT_LIB_SUFFIX='_p.a'
17827                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17828                 ;;
17829         shared) #(vi
17830                 case $cf_cv_system_name in
17831                 aix[56]*) #(vi
17832                         DFT_LIB_SUFFIX='.a'
17833                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17834                         ;;
17835                 cygwin*) #(vi
17836                         DFT_LIB_SUFFIX='.dll'
17837                         DFT_DEP_SUFFIX='.dll.a'
17838                         ;;
17839                 darwin*) #(vi
17840                         DFT_LIB_SUFFIX='.dylib'
17841                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17842                         ;;
17843                 hpux*) #(vi
17844                         case $target in
17845                         ia64*) #(vi
17846                                 DFT_LIB_SUFFIX='.so'
17847                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17848                                 ;;
17849                         *) #(vi
17850                                 DFT_LIB_SUFFIX='.sl'
17851                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17852                                 ;;
17853                         esac
17854                         ;;
17855                 *)      DFT_LIB_SUFFIX='.so'
17856                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17857                         ;;
17858                 esac
17859         esac
17860         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
17861         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
17862 echo "$as_me:17862: result: $DFT_DEP_SUFFIX" >&5
17863 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
17864
17865 echo "$as_me:17865: checking default object directory" >&5
17866 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
17867
17868         case $DFT_LWR_MODEL in
17869         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
17870         normal)  DFT_OBJ_SUBDIR='objects' ;;
17871         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
17872         profile) DFT_OBJ_SUBDIR='obj_p' ;;
17873         shared)
17874                 case $cf_cv_system_name in #(vi
17875                 cygwin) #(vi
17876                         DFT_OBJ_SUBDIR='objects' ;;
17877                 *)
17878                         DFT_OBJ_SUBDIR='obj_s' ;;
17879                 esac
17880         esac
17881 echo "$as_me:17881: result: $DFT_OBJ_SUBDIR" >&5
17882 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
17883
17884 # libtool thinks it can make c++ shared libraries (perhaps only g++)
17885 if test "$cf_with_cxx" = yes ; then
17886 echo "$as_me:17886: checking c++ library-dependency suffix" >&5
17887 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
17888 if test "$with_libtool" != "no"; then
17889         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
17890 else
17891
17892         case normal in #(vi
17893         libtool) #(vi
17894                 CXX_LIB_SUFFIX='.la'
17895                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17896                 ;;
17897         normal) #(vi
17898                 CXX_LIB_SUFFIX='.a'
17899                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17900                 ;;
17901         debug) #(vi
17902                 CXX_LIB_SUFFIX='_g.a'
17903                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17904                 ;;
17905         profile) #(vi
17906                 CXX_LIB_SUFFIX='_p.a'
17907                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17908                 ;;
17909         shared) #(vi
17910                 case $cf_cv_system_name in
17911                 aix[56]*) #(vi
17912                         CXX_LIB_SUFFIX='.a'
17913                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17914                         ;;
17915                 cygwin*) #(vi
17916                         CXX_LIB_SUFFIX='.dll'
17917                         CXX_DEP_SUFFIX='.dll.a'
17918                         ;;
17919                 darwin*) #(vi
17920                         CXX_LIB_SUFFIX='.dylib'
17921                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17922                         ;;
17923                 hpux*) #(vi
17924                         case $target in
17925                         ia64*) #(vi
17926                                 CXX_LIB_SUFFIX='.so'
17927                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17928                                 ;;
17929                         *) #(vi
17930                                 CXX_LIB_SUFFIX='.sl'
17931                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17932                                 ;;
17933                         esac
17934                         ;;
17935                 *)      CXX_LIB_SUFFIX='.so'
17936                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17937                         ;;
17938                 esac
17939         esac
17940         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
17941         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
17942 fi
17943 echo "$as_me:17943: result: $CXX_LIB_SUFFIX" >&5
17944 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
17945
17946 fi
17947
17948 # do not want -ldl in build except as needed for -lncurses dependency
17949 if test "$with_dlsym" = yes ; then
17950 if test $DFT_LWR_MODEL = shared || \
17951    test $DFT_LWR_MODEL = libtool ; then
17952
17953 # remove dl library from $LIBS
17954 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
17955
17956 fi
17957 fi
17958 ### Set up low-level terminfo dependencies for makefiles.
17959
17960 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
17961 # do not need libdl
17962 TICS_LIST=
17963 if test "$with_dlsym" = yes ; then
17964
17965 # remove dl library from $SHLIB_LIST
17966 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
17967
17968 fi
17969
17970 if test "$with_ticlib" != no ; then
17971
17972         if test "$with_ticlib" != yes ; then
17973                 TICS_NAME=$with_ticlib
17974                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
17975                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
17976                 TICS_LIB_SUFFIX="${with_ticlib}"
17977         else
17978                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
17979                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
17980                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
17981         fi
17982         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
17983 else
17984         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
17985 fi
17986
17987 if test "$with_termlib" != no ; then
17988
17989         if test "$with_termlib" != yes ; then
17990                 TINFO_NAME=$with_termlib
17991                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
17992                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
17993                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
17994                 TINFO_LIB_SUFFIX="${with_termlib}"
17995         else
17996                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
17997                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
17998                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
17999                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
18000         fi
18001
18002         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
18003         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
18004         if test "$DFT_LWR_MODEL" = "libtool"; then
18005                 TEST_ARGS="${TEST_DEPS}"
18006                 TEST_ARG2="${TEST_DEP2}"
18007                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
18008                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
18009                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
18010         else
18011                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
18012                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
18013                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
18014                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
18015                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
18016         fi
18017 else
18018         # the next lines are needed for linking libtic over libncurses
18019         TINFO_NAME=${LIB_NAME}
18020         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
18021         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
18022         if test "$with_tic_depends" = yes ; then
18023                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18024         else
18025                 TICS_LIST="$SHLIB_LIST"
18026         fi
18027
18028         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18029 fi
18030
18031 if test "$DFT_LWR_MODEL" = shared ; then
18032         case $cf_cv_system_name in #(vi
18033         cygwin*)
18034                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
18035                 TINFO_SUFFIX=.dll
18036                 ;;
18037         esac
18038 fi
18039
18040 if test "$with_dlsym" = yes ; then
18041
18042 # remove dl library from $TICS_LIST
18043 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
18044
18045 fi
18046
18047 if test "$DFT_LWR_MODEL" = "libtool"; then
18048     OBJEXT=lo
18049 fi
18050
18051 # needed for Ada95
18052 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
18053
18054 case $DFT_LWR_MODEL in
18055 normal|debug|profile)
18056
18057 if test "$GCC" = yes ; then
18058         case $cf_cv_system_name in #(
18059         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
18060                 LDFLAGS_STATIC=
18061                 LDFLAGS_SHARED=
18062                 ;;
18063     *)  #( normally, except when broken
18064         LDFLAGS_STATIC=-static
18065         LDFLAGS_SHARED=-dynamic
18066         ;;
18067     esac
18068 else
18069         case $cf_cv_system_name in #(
18070         aix[456]*)      #( from ld manpage
18071                 LDFLAGS_STATIC=-bstatic
18072                 LDFLAGS_SHARED=-bdynamic
18073                 ;;
18074         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
18075                 # We could also use just "archive" and "shared".
18076                 LDFLAGS_STATIC=-Wl,-a,archive_shared
18077                 LDFLAGS_SHARED=-Wl,-a,shared_archive
18078                 ;;
18079         irix*)          #( from ld manpage IRIX64
18080                 LDFLAGS_STATIC=-Bstatic
18081                 LDFLAGS_SHARED=-Bdynamic
18082                 ;;
18083         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
18084                 # alternative "-oldstyle_liblookup" (not in cc manpage)
18085                 LDFLAGS_STATIC=-noso
18086                 LDFLAGS_SHARED=-so_archive
18087                 ;;
18088         solaris2*)
18089                 LDFLAGS_STATIC=-Bstatic
18090                 LDFLAGS_SHARED=-Bdynamic
18091                 ;;
18092         esac
18093 fi
18094
18095         ;;
18096 esac
18097
18098 echo "$as_me:18098: checking where we will install curses.h" >&5
18099 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
18100 test "$with_overwrite" = no && \
18101 test "x$includedir" = 'x${prefix}/include' && \
18102         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
18103 echo "$as_me:18103: result: $includedir" >&5
18104 echo "${ECHO_T}$includedir" >&6
18105
18106 ### Resolve a conflict between normal and wide-curses by forcing applications
18107 ### that will need libutf8 to add it to their configure script.
18108 if test "$with_overwrite" != no ; then
18109 if test "$NCURSES_LIBUTF8" = 1 ; then
18110         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
18111         { echo "$as_me:18111: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
18112 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
18113 fi
18114 fi
18115 WITH_OVERWRITE=$with_overwrite
18116
18117 # used to separate tack out of the tree
18118 NCURSES_TREE=
18119
18120 ### predefined stuff for the test programs
18121 cat >>confdefs.h <<\EOF
18122 #define HAVE_SLK_COLOR 1
18123 EOF
18124
18125 ### Construct the list of subdirectories for which we'll customize makefiles
18126 ### with the appropriate compile-rules.
18127
18128 echo "$as_me:18128: checking for src modules" >&5
18129 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
18130
18131 # dependencies and linker-arguments for test-programs
18132 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
18133 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
18134 if test "$DFT_LWR_MODEL" = "libtool"; then
18135         TEST_ARGS="${TEST_DEPS}"
18136         TEST_ARG2="${TEST_DEP2}"
18137 else
18138         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
18139         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
18140 fi
18141
18142 cf_cv_src_modules=
18143 for cf_dir in $modules_to_build
18144 do
18145         if test -f $srcdir/$cf_dir/modules; then
18146
18147                 # We may/may not have tack in the distribution, though the
18148                 # makefile is.
18149                 if test $cf_dir = tack ; then
18150                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
18151                                 continue
18152                         fi
18153                 fi
18154
18155                 if test -z "$cf_cv_src_modules"; then
18156                         cf_cv_src_modules=$cf_dir
18157                 else
18158                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
18159                 fi
18160
18161                 # Make the ncurses_cfg.h file record the library interface files as
18162                 # well.  These are header files that are the same name as their
18163                 # directory.  Ncurses is the only library that does not follow
18164                 # that pattern.
18165                 if test $cf_dir = tack ; then
18166                         continue
18167                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
18168
18169 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18170
18171                         cat >>confdefs.h <<EOF
18172 #define HAVE_${cf_have_include}_H 1
18173 EOF
18174
18175                         cat >>confdefs.h <<EOF
18176 #define HAVE_LIB${cf_have_include} 1
18177 EOF
18178
18179                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
18180                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
18181                         if test "$DFT_LWR_MODEL" = "libtool"; then
18182                                 TEST_ARGS="${TEST_DEPS}"
18183                                 TEST_ARG2="${TEST_DEP2}"
18184                         else
18185                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
18186                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
18187                         fi
18188                 fi
18189         fi
18190 done
18191 echo "$as_me:18191: result: $cf_cv_src_modules" >&5
18192 echo "${ECHO_T}$cf_cv_src_modules" >&6
18193
18194 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
18195 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
18196
18197 SRC_SUBDIRS=
18198 if test "x$cf_with_manpages" != xno ; then
18199         SRC_SUBDIRS="$SRC_SUBDIRS man"
18200 fi
18201 SRC_SUBDIRS="$SRC_SUBDIRS include"
18202 for cf_dir in $cf_cv_src_modules
18203 do
18204         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
18205 done
18206 SRC_SUBDIRS="$SRC_SUBDIRS test"
18207 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
18208 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
18209
18210 ADA_SUBDIRS=
18211 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
18212         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
18213         ADA_SUBDIRS="gen src samples"
18214 fi
18215
18216 SUB_MAKEFILES=
18217 for cf_dir in $SRC_SUBDIRS
18218 do
18219         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
18220 done
18221
18222 if test -n "$ADA_SUBDIRS"; then
18223         for cf_dir in $ADA_SUBDIRS
18224         do
18225                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
18226         done
18227
18228 fi
18229
18230 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
18231    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
18232    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
18233 fi
18234
18235 DIRS_TO_MAKE="lib"
18236 for cf_item in $cf_list_models
18237 do
18238
18239         case $cf_item in
18240         libtool) cf_subdir='obj_lo'  ;;
18241         normal)  cf_subdir='objects' ;;
18242         debug)   cf_subdir='obj_g' ;;
18243         profile) cf_subdir='obj_p' ;;
18244         shared)
18245                 case $cf_cv_system_name in #(vi
18246                 cygwin) #(vi
18247                         cf_subdir='objects' ;;
18248                 *)
18249                         cf_subdir='obj_s' ;;
18250                 esac
18251         esac
18252
18253         for cf_item2 in $DIRS_TO_MAKE
18254         do
18255                 test $cf_item2 = $cf_subdir && break
18256         done
18257         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
18258 done
18259 for cf_dir in $DIRS_TO_MAKE
18260 do
18261         test ! -d $cf_dir && mkdir $cf_dir
18262 done
18263
18264 # symbols that differ when compiling Ada95 by itself.
18265 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
18266
18267 NCURSES_COPY2='sh $(top_srcdir)/tar-copy.sh'
18268
18269 # values to use as strings
18270 cat >>confdefs.h <<EOF
18271 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
18272 EOF
18273
18274 cat >>confdefs.h <<EOF
18275 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
18276 EOF
18277
18278 ### Now that we're done running tests, add the compiler-warnings, if any
18279
18280 cf_fix_cppflags=no
18281 cf_new_cflags=
18282 cf_new_cppflags=
18283 cf_new_extra_cppflags=
18284
18285 for cf_add_cflags in $EXTRA_CFLAGS
18286 do
18287 case $cf_fix_cppflags in
18288 no)
18289         case $cf_add_cflags in #(vi
18290         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
18291                 case $cf_add_cflags in
18292                 -D*)
18293                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18294
18295                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
18296                                 && test -z "${cf_tst_cflags}" \
18297                                 && cf_fix_cppflags=yes
18298
18299                         if test $cf_fix_cppflags = yes ; then
18300                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
18301                                 continue
18302                         elif test "${cf_tst_cflags}" = "\"'" ; then
18303                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
18304                                 continue
18305                         fi
18306                         ;;
18307                 esac
18308                 case "$CPPFLAGS" in
18309                 *$cf_add_cflags) #(vi
18310                         ;;
18311                 *) #(vi
18312                         case $cf_add_cflags in #(vi
18313                         -D*)
18314                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18315
18316 CPPFLAGS=`echo "$CPPFLAGS" | \
18317         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18318                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18319
18320                                 ;;
18321                         esac
18322                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
18323                         ;;
18324                 esac
18325                 ;;
18326         *)
18327                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
18328                 ;;
18329         esac
18330         ;;
18331 yes)
18332         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
18333
18334         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18335
18336         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
18337                 && test -z "${cf_tst_cflags}" \
18338                 && cf_fix_cppflags=no
18339         ;;
18340 esac
18341 done
18342
18343 if test -n "$cf_new_cflags" ; then
18344
18345         CFLAGS="$CFLAGS $cf_new_cflags"
18346 fi
18347
18348 if test -n "$cf_new_cppflags" ; then
18349
18350         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
18351 fi
18352
18353 if test -n "$cf_new_extra_cppflags" ; then
18354
18355         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
18356 fi
18357
18358 ### If we're building with rpath, try to link non-standard libs that way too.
18359 if test "$DFT_LWR_MODEL" = "shared"; then
18360
18361 echo "$as_me:18361: checking for updated LDFLAGS" >&5
18362 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
18363 if test -n "$LD_RPATH_OPT" ; then
18364         echo "$as_me:18364: result: maybe" >&5
18365 echo "${ECHO_T}maybe" >&6
18366
18367         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
18368
18369 echo "${as_me-configure}:18369: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
18370
18371 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
18372
18373 echo "${as_me-configure}:18373: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
18374
18375 cf_rpath_dst=
18376 for cf_rpath_src in $LDFLAGS
18377 do
18378         test -n "$verbose" && echo "    Filtering $cf_rpath_src" 1>&6
18379
18380 echo "${as_me-configure}:18380: testing Filtering $cf_rpath_src ..." 1>&5
18381
18382         case $cf_rpath_src in #(vi
18383         -L*) #(vi
18384                 if test "$LD_RPATH_OPT" = "-R " ; then
18385                         cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e 's%-L%-R %'`
18386                 else
18387                         cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e s%-L%$LD_RPATH_OPT%`
18388                 fi
18389                 test -n "$verbose" && echo "    ...Filter $cf_rpath_tmp" 1>&6
18390
18391 echo "${as_me-configure}:18391: testing ...Filter $cf_rpath_tmp ..." 1>&5
18392
18393                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
18394                 ;;
18395         esac
18396         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
18397 done
18398 LDFLAGS=$cf_rpath_dst
18399
18400 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
18401
18402 echo "${as_me-configure}:18402: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
18403
18404 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
18405
18406 echo "${as_me-configure}:18406: testing ...checking LIBS $LIBS ..." 1>&5
18407
18408 cf_rpath_dst=
18409 for cf_rpath_src in $LIBS
18410 do
18411         test -n "$verbose" && echo "    Filtering $cf_rpath_src" 1>&6
18412
18413 echo "${as_me-configure}:18413: testing Filtering $cf_rpath_src ..." 1>&5
18414
18415         case $cf_rpath_src in #(vi
18416         -L*) #(vi
18417                 if test "$LD_RPATH_OPT" = "-R " ; then
18418                         cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e 's%-L%-R %'`
18419                 else
18420                         cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e s%-L%$LD_RPATH_OPT%`
18421                 fi
18422                 test -n "$verbose" && echo "    ...Filter $cf_rpath_tmp" 1>&6
18423
18424 echo "${as_me-configure}:18424: testing ...Filter $cf_rpath_tmp ..." 1>&5
18425
18426                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
18427                 ;;
18428         esac
18429         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
18430 done
18431 LIBS=$cf_rpath_dst
18432
18433 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
18434
18435 echo "${as_me-configure}:18435: testing ...checked LIBS $LIBS ..." 1>&5
18436
18437         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
18438
18439 echo "${as_me-configure}:18439: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
18440
18441 fi
18442
18443 fi
18444
18445 ### Define substitutions for header files to avoid name-pollution
18446
18447 if test "$cf_cv_have_tcgetattr" = yes ; then
18448         HAVE_TCGETATTR=1
18449 else
18450         HAVE_TCGETATTR=0
18451 fi
18452
18453 if test "$ac_cv_header_termio_h" = yes ; then
18454         HAVE_TERMIO_H=1
18455 else
18456         HAVE_TERMIO_H=0
18457 fi
18458
18459 if test "$ac_cv_header_termios_h" = yes ; then
18460         HAVE_TERMIOS_H=1
18461 else
18462         HAVE_TERMIOS_H=0
18463 fi
18464
18465 ################################################################################
18466 test "$use_database" = yes && \
18467 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
18468
18469 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
18470 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
18471
18472 if test x"$enable_pc_files" = xyes ; then \
18473 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
18474 MAKE_PC_FILES=
18475 else
18476 MAKE_PC_FILES="#"
18477 fi
18478
18479 ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/termcap.h include/unctrl.h $SUB_MAKEFILES Makefile"
18480 ac_config_commands="$ac_config_commands default"
18481 cat >confcache <<\_ACEOF
18482 # This file is a shell script that caches the results of configure
18483 # tests run on this system so they can be shared between configure
18484 # scripts and configure runs, see configure's option --config-cache.
18485 # It is not useful on other systems.  If it contains results you don't
18486 # want to keep, you may remove or edit it.
18487 #
18488 # config.status only pays attention to the cache file if you give it
18489 # the --recheck option to rerun configure.
18490 #
18491 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18492 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18493 # following values.
18494
18495 _ACEOF
18496
18497 # The following way of writing the cache mishandles newlines in values,
18498 # but we know of no workaround that is simple, portable, and efficient.
18499 # So, don't put newlines in cache variables' values.
18500 # Ultrix sh set writes to stderr and can't be redirected directly,
18501 # and sets the high bit in the cache file unless we assign to the vars.
18502 {
18503   (set) 2>&1 |
18504     case `(ac_space=' '; set | grep ac_space) 2>&1` in
18505     *ac_space=\ *)
18506       # `set' does not quote correctly, so add quotes (double-quote
18507       # substitution turns \\\\ into \\, and sed turns \\ into \).
18508       sed -n \
18509         "s/'/'\\\\''/g;
18510           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18511       ;;
18512     *)
18513       # `set' quotes correctly as required by POSIX, so do not add quotes.
18514       sed -n \
18515         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18516       ;;
18517     esac;
18518 } |
18519   sed '
18520      t clear
18521      : clear
18522      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18523      t end
18524      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18525      : end' >>confcache
18526 if cmp -s $cache_file confcache; then :; else
18527   if test -w $cache_file; then
18528     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18529     cat confcache >$cache_file
18530   else
18531     echo "not updating unwritable cache $cache_file"
18532   fi
18533 fi
18534 rm -f confcache
18535
18536 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18537 # Let make expand exec_prefix.
18538 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18539
18540 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18541 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18542 # trailing colons and then remove the whole line if VPATH becomes empty
18543 # (actually we leave an empty line to preserve line numbers).
18544 if test "x$srcdir" = x.; then
18545   ac_vpsub='/^[         ]*VPATH[        ]*=/{
18546 s/:*\$(srcdir):*/:/;
18547 s/:*\${srcdir}:*/:/;
18548 s/:*@srcdir@:*/:/;
18549 s/^\([^=]*=[    ]*\):*/\1/;
18550 s/:*$//;
18551 s/^[^=]*=[      ]*$//;
18552 }'
18553 fi
18554
18555 DEFS=-DHAVE_CONFIG_H
18556
18557 : ${CONFIG_STATUS=./config.status}
18558 ac_clean_files_save=$ac_clean_files
18559 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18560 { echo "$as_me:18560: creating $CONFIG_STATUS" >&5
18561 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18562 cat >$CONFIG_STATUS <<_ACEOF
18563 #! $SHELL
18564 # Generated automatically by configure.
18565 # Run this file to recreate the current configuration.
18566 # Compiler output produced by configure, useful for debugging
18567 # configure, is in config.log if it exists.
18568
18569 debug=false
18570 SHELL=\${CONFIG_SHELL-$SHELL}
18571 ac_cs_invocation="\$0 \$@"
18572
18573 _ACEOF
18574
18575 cat >>$CONFIG_STATUS <<\_ACEOF
18576 # Be Bourne compatible
18577 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18578   emulate sh
18579   NULLCMD=:
18580 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18581   set -o posix
18582 fi
18583
18584 # Name of the executable.
18585 as_me=`echo "$0" |sed 's,.*[\\/],,'`
18586
18587 if expr a : '\(a\)' >/dev/null 2>&1; then
18588   as_expr=expr
18589 else
18590   as_expr=false
18591 fi
18592
18593 rm -f conf$$ conf$$.exe conf$$.file
18594 echo >conf$$.file
18595 if ln -s conf$$.file conf$$ 2>/dev/null; then
18596   # We could just check for DJGPP; but this test a) works b) is more generic
18597   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18598   if test -f conf$$.exe; then
18599     # Don't use ln at all; we don't have any links
18600     as_ln_s='cp -p'
18601   else
18602     as_ln_s='ln -s'
18603   fi
18604 elif ln conf$$.file conf$$ 2>/dev/null; then
18605   as_ln_s=ln
18606 else
18607   as_ln_s='cp -p'
18608 fi
18609 rm -f conf$$ conf$$.exe conf$$.file
18610
18611 as_executable_p="test -f"
18612
18613 # Support unset when possible.
18614 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18615   as_unset=unset
18616 else
18617   as_unset=false
18618 fi
18619
18620 # NLS nuisances.
18621 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18622 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18623 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18624 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18625 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18626 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18627 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18628 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18629
18630 # IFS
18631 # We need space, tab and new line, in precisely that order.
18632 as_nl='
18633 '
18634 IFS="   $as_nl"
18635
18636 # CDPATH.
18637 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
18638
18639 exec 6>&1
18640
18641 _ACEOF
18642
18643 # Files that config.status was made for.
18644 if test -n "$ac_config_files"; then
18645   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18646 fi
18647
18648 if test -n "$ac_config_headers"; then
18649   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18650 fi
18651
18652 if test -n "$ac_config_links"; then
18653   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18654 fi
18655
18656 if test -n "$ac_config_commands"; then
18657   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18658 fi
18659
18660 cat >>$CONFIG_STATUS <<\EOF
18661
18662 ac_cs_usage="\
18663 \`$as_me' instantiates files from templates according to the
18664 current configuration.
18665
18666 Usage: $0 [OPTIONS] [FILE]...
18667
18668   -h, --help       print this help, then exit
18669   -V, --version    print version number, then exit
18670   -d, --debug      don't remove temporary files
18671       --recheck    update $as_me by reconfiguring in the same conditions
18672   --file=FILE[:TEMPLATE]
18673                    instantiate the configuration file FILE
18674   --header=FILE[:TEMPLATE]
18675                    instantiate the configuration header FILE
18676
18677 Configuration files:
18678 $config_files
18679
18680 Configuration headers:
18681 $config_headers
18682
18683 Configuration commands:
18684 $config_commands
18685
18686 Report bugs to <bug-autoconf@gnu.org>."
18687 EOF
18688
18689 cat >>$CONFIG_STATUS <<EOF
18690 ac_cs_version="\\
18691 config.status
18692 configured by $0, generated by GNU Autoconf 2.52.20100320,
18693   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18694
18695 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18696 Free Software Foundation, Inc.
18697 This config.status script is free software; the Free Software Foundation
18698 gives unlimited permission to copy, distribute and modify it."
18699 srcdir=$srcdir
18700 INSTALL="$INSTALL"
18701 EOF
18702
18703 cat >>$CONFIG_STATUS <<\EOF
18704 # If no file are specified by the user, then we need to provide default
18705 # value.  By we need to know if files were specified by the user.
18706 ac_need_defaults=:
18707 while test $# != 0
18708 do
18709   case $1 in
18710   --*=*)
18711     ac_option=`expr "x$1" : 'x\([^=]*\)='`
18712     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18713     shift
18714     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18715     shift
18716     ;;
18717   -*);;
18718   *) # This is not an option, so the user has probably given explicit
18719      # arguments.
18720      ac_need_defaults=false;;
18721   esac
18722
18723   case $1 in
18724   # Handling of the options.
18725 EOF
18726 cat >>$CONFIG_STATUS <<EOF
18727   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18728     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18729     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18730 EOF
18731 cat >>$CONFIG_STATUS <<\EOF
18732   --version | --vers* | -V )
18733     echo "$ac_cs_version"; exit 0 ;;
18734   --he | --h)
18735     # Conflict between --help and --header
18736     { { echo "$as_me:18736: error: ambiguous option: $1
18737 Try \`$0 --help' for more information." >&5
18738 echo "$as_me: error: ambiguous option: $1
18739 Try \`$0 --help' for more information." >&2;}
18740    { (exit 1); exit 1; }; };;
18741   --help | --hel | -h )
18742     echo "$ac_cs_usage"; exit 0 ;;
18743   --debug | --d* | -d )
18744     debug=: ;;
18745   --file | --fil | --fi | --f )
18746     shift
18747     CONFIG_FILES="$CONFIG_FILES $1"
18748     ac_need_defaults=false;;
18749   --header | --heade | --head | --hea )
18750     shift
18751     CONFIG_HEADERS="$CONFIG_HEADERS $1"
18752     ac_need_defaults=false;;
18753
18754   # This is an error.
18755   -*) { { echo "$as_me:18755: error: unrecognized option: $1
18756 Try \`$0 --help' for more information." >&5
18757 echo "$as_me: error: unrecognized option: $1
18758 Try \`$0 --help' for more information." >&2;}
18759    { (exit 1); exit 1; }; } ;;
18760
18761   *) ac_config_targets="$ac_config_targets $1" ;;
18762
18763   esac
18764   shift
18765 done
18766
18767 exec 5>>config.log
18768 cat >&5 << _ACEOF
18769
18770 ## ----------------------- ##
18771 ## Running config.status.  ##
18772 ## ----------------------- ##
18773
18774 This file was extended by $as_me 2.52.20100320, executed with
18775   CONFIG_FILES    = $CONFIG_FILES
18776   CONFIG_HEADERS  = $CONFIG_HEADERS
18777   CONFIG_LINKS    = $CONFIG_LINKS
18778   CONFIG_COMMANDS = $CONFIG_COMMANDS
18779   > $ac_cs_invocation
18780 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18781
18782 _ACEOF
18783 EOF
18784
18785 cat >>$CONFIG_STATUS <<EOF
18786 #
18787 # INIT-COMMANDS section.
18788 #
18789
18790 ### Special initialization commands, used to pass information from the
18791 ### configuration-run into config.status
18792
18793 AWK="$AWK"
18794 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
18795 DFT_LWR_MODEL="$DFT_LWR_MODEL"
18796 ECHO_LINK="$ECHO_LINK"
18797 LDCONFIG="$LDCONFIG"
18798 LIB_NAME="$LIB_NAME"
18799 LIB_SUBSETS="$LIB_SUBSETS"
18800 LIB_SUFFIX="$LIB_SUFFIX"
18801 LIB_TRACING="$LIB_TRACING"
18802 MAKE_TERMINFO="$MAKE_TERMINFO"
18803 NCURSES_MAJOR="$NCURSES_MAJOR"
18804 NCURSES_MINOR="$NCURSES_MINOR"
18805 NCURSES_OSPEED="$NCURSES_OSPEED"
18806 NCURSES_PATCH="$NCURSES_PATCH"
18807 SRC_SUBDIRS="$SRC_SUBDIRS"
18808 TERMINFO="$TERMINFO"
18809 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
18810 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
18811 TICS_NAME="$TICS_NAME"
18812 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
18813 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
18814 TINFO_NAME="$TINFO_NAME"
18815 TINFO_SUFFIX="$TINFO_SUFFIX"
18816 WITH_CURSES_H="$with_curses_h"
18817 WITH_ECHO="$with_echo"
18818 WITH_OVERWRITE="$with_overwrite"
18819 cf_LIST_MODELS="$cf_list_models"
18820 cf_cv_abi_version="$cf_cv_abi_version"
18821 cf_cv_do_relink="$cf_cv_do_relink"
18822 cf_cv_do_symlinks="$cf_cv_do_symlinks"
18823 cf_cv_enable_lp64="$cf_cv_enable_lp64"
18824 cf_cv_enable_opaque="$cf_cv_enable_opaque"
18825 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
18826 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
18827 cf_cv_rel_version="$cf_cv_rel_version"
18828 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
18829 cf_cv_shared_soname='$cf_cv_shared_soname'
18830 cf_cv_shlib_version="$cf_cv_shlib_version"
18831 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
18832 cf_cv_system_name="$cf_cv_system_name"
18833 cf_with_cxx_binding="$cf_with_cxx_binding"
18834 cf_with_manpages="$cf_with_manpages"
18835 host="$host"
18836 target="$target"
18837
18838 EOF
18839
18840 cat >>$CONFIG_STATUS <<\EOF
18841 for ac_config_target in $ac_config_targets
18842 do
18843   case "$ac_config_target" in
18844   # Handling of arguments.
18845   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
18846   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
18847   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
18848   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
18849   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
18850   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
18851   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18852   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
18853   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
18854   *) { { echo "$as_me:18854: error: invalid argument: $ac_config_target" >&5
18855 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18856    { (exit 1); exit 1; }; };;
18857   esac
18858 done
18859
18860 # If the user did not use the arguments to specify the items to instantiate,
18861 # then the envvar interface is used.  Set only those that are not.
18862 # We use the long form for the default assignment because of an extremely
18863 # bizarre bug on SunOS 4.1.3.
18864 if $ac_need_defaults; then
18865   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18866   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18867   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18868 fi
18869
18870 # Create a temporary directory, and hook for its removal unless debugging.
18871 $debug ||
18872 {
18873   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18874   trap '{ (exit 1); exit 1; }' 1 2 13 15
18875 }
18876
18877 # Create a (secure) tmp directory for tmp files.
18878 : ${TMPDIR=/tmp}
18879 {
18880   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18881   test -n "$tmp" && test -d "$tmp"
18882 }  ||
18883 {
18884   tmp=$TMPDIR/cs$$-$RANDOM
18885   (umask 077 && mkdir $tmp)
18886 } ||
18887 {
18888    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18889    { (exit 1); exit 1; }
18890 }
18891
18892 EOF
18893
18894 cat >>$CONFIG_STATUS <<EOF
18895
18896 #
18897 # CONFIG_FILES section.
18898 #
18899
18900 # No need to generate the scripts if there are no CONFIG_FILES.
18901 # This happens for instance when ./config.status config.h
18902 if test -n "\$CONFIG_FILES"; then
18903   # Protect against being on the right side of a sed subst in config.status.
18904   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18905    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18906 s,@SHELL@,$SHELL,;t t
18907 s,@exec_prefix@,$exec_prefix,;t t
18908 s,@prefix@,$prefix,;t t
18909 s,@program_transform_name@,$program_transform_name,;t t
18910 s,@bindir@,$bindir,;t t
18911 s,@sbindir@,$sbindir,;t t
18912 s,@libexecdir@,$libexecdir,;t t
18913 s,@datadir@,$datadir,;t t
18914 s,@sysconfdir@,$sysconfdir,;t t
18915 s,@sharedstatedir@,$sharedstatedir,;t t
18916 s,@localstatedir@,$localstatedir,;t t
18917 s,@libdir@,$libdir,;t t
18918 s,@includedir@,$includedir,;t t
18919 s,@oldincludedir@,$oldincludedir,;t t
18920 s,@infodir@,$infodir,;t t
18921 s,@mandir@,$mandir,;t t
18922 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18923 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18924 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18925 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18926 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18927 s,@build_alias@,$build_alias,;t t
18928 s,@host_alias@,$host_alias,;t t
18929 s,@target_alias@,$target_alias,;t t
18930 s,@ECHO_C@,$ECHO_C,;t t
18931 s,@ECHO_N@,$ECHO_N,;t t
18932 s,@ECHO_T@,$ECHO_T,;t t
18933 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18934 s,@DEFS@,$DEFS,;t t
18935 s,@LIBS@,$LIBS,;t t
18936 s,@top_builddir@,$top_builddir,;t t
18937 s,@EGREP@,$EGREP,;t t
18938 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
18939 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
18940 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
18941 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
18942 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
18943 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
18944 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
18945 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
18946 s,@build@,$build,;t t
18947 s,@build_cpu@,$build_cpu,;t t
18948 s,@build_vendor@,$build_vendor,;t t
18949 s,@build_os@,$build_os,;t t
18950 s,@host@,$host,;t t
18951 s,@host_cpu@,$host_cpu,;t t
18952 s,@host_vendor@,$host_vendor,;t t
18953 s,@host_os@,$host_os,;t t
18954 s,@target@,$target,;t t
18955 s,@target_cpu@,$target_cpu,;t t
18956 s,@target_vendor@,$target_vendor,;t t
18957 s,@target_os@,$target_os,;t t
18958 s,@CC@,$CC,;t t
18959 s,@CFLAGS@,$CFLAGS,;t t
18960 s,@LDFLAGS@,$LDFLAGS,;t t
18961 s,@CPPFLAGS@,$CPPFLAGS,;t t
18962 s,@ac_ct_CC@,$ac_ct_CC,;t t
18963 s,@EXEEXT@,$EXEEXT,;t t
18964 s,@OBJEXT@,$OBJEXT,;t t
18965 s,@CPP@,$CPP,;t t
18966 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
18967 s,@PROG_EXT@,$PROG_EXT,;t t
18968 s,@LDCONFIG@,$LDCONFIG,;t t
18969 s,@CXX@,$CXX,;t t
18970 s,@CXXFLAGS@,$CXXFLAGS,;t t
18971 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
18972 s,@AWK@,$AWK,;t t
18973 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18974 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18975 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18976 s,@LINT@,$LINT,;t t
18977 s,@LINT_OPTS@,$LINT_OPTS,;t t
18978 s,@LN_S@,$LN_S,;t t
18979 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
18980 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
18981 s,@SET_MAKE@,$SET_MAKE,;t t
18982 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
18983 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
18984 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
18985 s,@RANLIB@,$RANLIB,;t t
18986 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18987 s,@LD@,$LD,;t t
18988 s,@ac_ct_LD@,$ac_ct_LD,;t t
18989 s,@AR@,$AR,;t t
18990 s,@ac_ct_AR@,$ac_ct_AR,;t t
18991 s,@ARFLAGS@,$ARFLAGS,;t t
18992 s,@DESTDIR@,$DESTDIR,;t t
18993 s,@BUILD_CC@,$BUILD_CC,;t t
18994 s,@BUILD_CPP@,$BUILD_CPP,;t t
18995 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
18996 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
18997 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
18998 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
18999 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
19000 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
19001 s,@cf_list_models@,$cf_list_models,;t t
19002 s,@LIBTOOL@,$LIBTOOL,;t t
19003 s,@LT_UNDEF@,$LT_UNDEF,;t t
19004 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
19005 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
19006 s,@LIB_CREATE@,$LIB_CREATE,;t t
19007 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
19008 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
19009 s,@LIB_PREP@,$LIB_PREP,;t t
19010 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
19011 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
19012 s,@LIB_LINK@,$LIB_LINK,;t t
19013 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
19014 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
19015 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
19016 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
19017 s,@TICS_NAME@,$TICS_NAME,;t t
19018 s,@TINFO_NAME@,$TINFO_NAME,;t t
19019 s,@LIB_NAME@,$LIB_NAME,;t t
19020 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
19021 s,@CC_G_OPT@,$CC_G_OPT,;t t
19022 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
19023 s,@LD_MODEL@,$LD_MODEL,;t t
19024 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
19025 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
19026 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
19027 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
19028 s,@LINK_PROGS@,$LINK_PROGS,;t t
19029 s,@LINK_TESTS@,$LINK_TESTS,;t t
19030 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
19031 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
19032 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
19033 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
19034 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
19035 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
19036 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
19037 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
19038 s,@TERMINFO@,$TERMINFO,;t t
19039 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
19040 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
19041 s,@TERMPATH@,$TERMPATH,;t t
19042 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
19043 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
19044 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
19045 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
19046 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
19047 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
19048 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
19049 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
19050 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
19051 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
19052 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
19053 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
19054 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
19055 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
19056 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
19057 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
19058 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
19059 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
19060 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
19061 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
19062 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
19063 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
19064 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
19065 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
19066 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
19067 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
19068 s,@PTHREAD@,$PTHREAD,;t t
19069 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
19070 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
19071 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
19072 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
19073 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
19074 s,@ECHO_LINK@,$ECHO_LINK,;t t
19075 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
19076 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
19077 s,@ADA_TRACE@,$ADA_TRACE,;t t
19078 s,@MATH_LIB@,$MATH_LIB,;t t
19079 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
19080 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
19081 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
19082 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
19083 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
19084 s,@TEST_LIBS@,$TEST_LIBS,;t t
19085 s,@CXXCPP@,$CXXCPP,;t t
19086 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
19087 s,@CXX_AR@,$CXX_AR,;t t
19088 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
19089 s,@CXXLIBS@,$CXXLIBS,;t t
19090 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
19091 s,@gnat_exists@,$gnat_exists,;t t
19092 s,@M4_exists@,$M4_exists,;t t
19093 s,@cf_ada_make@,$cf_ada_make,;t t
19094 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
19095 s,@cf_ada_package@,$cf_ada_package,;t t
19096 s,@ADAFLAGS@,$ADAFLAGS,;t t
19097 s,@cf_compile_generics@,$cf_compile_generics,;t t
19098 s,@cf_generic_objects@,$cf_generic_objects,;t t
19099 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
19100 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
19101 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
19102 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
19103 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
19104 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
19105 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
19106 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
19107 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
19108 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
19109 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
19110 s,@TICS_ARGS@,$TICS_ARGS,;t t
19111 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
19112 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
19113 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
19114 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
19115 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
19116 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
19117 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
19118 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
19119 s,@TICS_LIST@,$TICS_LIST,;t t
19120 s,@TINFO_LIST@,$TINFO_LIST,;t t
19121 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
19122 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
19123 s,@TEST_ARGS@,$TEST_ARGS,;t t
19124 s,@TEST_DEPS@,$TEST_DEPS,;t t
19125 s,@TEST_ARG2@,$TEST_ARG2,;t t
19126 s,@TEST_DEP2@,$TEST_DEP2,;t t
19127 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
19128 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
19129 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
19130 s,@NCURSES_COPY2@,$NCURSES_COPY2,;t t
19131 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
19132 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
19133 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
19134 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
19135 s,@cross_compiling@,$cross_compiling,;t t
19136 CEOF
19137
19138 EOF
19139
19140   cat >>$CONFIG_STATUS <<\EOF
19141   # Split the substitutions into bite-sized pieces for seds with
19142   # small command number limits, like on Digital OSF/1 and HP-UX.
19143   ac_max_sed_lines=48
19144   ac_sed_frag=1 # Number of current file.
19145   ac_beg=1 # First line for current file.
19146   ac_end=$ac_max_sed_lines # Line after last line for current file.
19147   ac_more_lines=:
19148   ac_sed_cmds=
19149   while $ac_more_lines; do
19150     if test $ac_beg -gt 1; then
19151       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19152     else
19153       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19154     fi
19155     if test ! -s $tmp/subs.frag; then
19156       ac_more_lines=false
19157     else
19158       # The purpose of the label and of the branching condition is to
19159       # speed up the sed processing (if there are no `@' at all, there
19160       # is no need to browse any of the substitutions).
19161       # These are the two extra sed commands mentioned above.
19162       (echo ':t
19163   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
19164       if test -z "$ac_sed_cmds"; then
19165         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
19166       else
19167         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
19168       fi
19169       ac_sed_frag=`expr $ac_sed_frag + 1`
19170       ac_beg=$ac_end
19171       ac_end=`expr $ac_end + $ac_max_sed_lines`
19172     fi
19173   done
19174   if test -z "$ac_sed_cmds"; then
19175     ac_sed_cmds=cat
19176   fi
19177 fi # test -n "$CONFIG_FILES"
19178
19179 EOF
19180 cat >>$CONFIG_STATUS <<\EOF
19181 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19182   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19183   case $ac_file in
19184   - | *:- | *:-:* ) # input from stdin
19185         cat >$tmp/stdin
19186         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19187         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19188   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19189         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19190   * )   ac_file_in=$ac_file.in ;;
19191   esac
19192
19193   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19194   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19195          X"$ac_file" : 'X\(//\)[^/]' \| \
19196          X"$ac_file" : 'X\(//\)$' \| \
19197          X"$ac_file" : 'X\(/\)' \| \
19198          .     : '\(.\)' 2>/dev/null ||
19199 echo X"$ac_file" |
19200     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19201           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19202           /^X\(\/\/\)$/{ s//\1/; q; }
19203           /^X\(\/\).*/{ s//\1/; q; }
19204           s/.*/./; q'`
19205   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19206     { case "$ac_dir" in
19207   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19208   *)                      as_incr_dir=.;;
19209 esac
19210 as_dummy="$ac_dir"
19211 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19212   case $as_mkdir_dir in
19213     # Skip DOS drivespec
19214     ?:) as_incr_dir=$as_mkdir_dir ;;
19215     *)
19216       as_incr_dir=$as_incr_dir/$as_mkdir_dir
19217       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19218     ;;
19219   esac
19220 done; }
19221
19222     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
19223     # A "../" for each directory in $ac_dir_suffix.
19224     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
19225   else
19226     ac_dir_suffix= ac_dots=
19227   fi
19228
19229   case $srcdir in
19230   .)  ac_srcdir=.
19231       if test -z "$ac_dots"; then
19232          ac_top_srcdir=.
19233       else
19234          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
19235       fi ;;
19236   [\\/]* | ?:[\\/]* )
19237       ac_srcdir=$srcdir$ac_dir_suffix;
19238       ac_top_srcdir=$srcdir ;;
19239   *) # Relative path.
19240     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
19241     ac_top_srcdir=$ac_dots$srcdir ;;
19242   esac
19243
19244   case $INSTALL in
19245   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19246   *) ac_INSTALL=$ac_dots$INSTALL ;;
19247   esac
19248
19249   if test x"$ac_file" != x-; then
19250     { echo "$as_me:19250: creating $ac_file" >&5
19251 echo "$as_me: creating $ac_file" >&6;}
19252     rm -f "$ac_file"
19253   fi
19254   # Let's still pretend it is `configure' which instantiates (i.e., don't
19255   # use $as_me), people would be surprised to read:
19256   #    /* config.h.  Generated automatically by config.status.  */
19257   configure_input="Generated automatically from `echo $ac_file_in |
19258                                                  sed 's,.*/,,'` by configure."
19259
19260   # First look for the input files in the build tree, otherwise in the
19261   # src tree.
19262   ac_file_inputs=`IFS=:
19263     for f in $ac_file_in; do
19264       case $f in
19265       -) echo $tmp/stdin ;;
19266       [\\/$]*)
19267          # Absolute (can't be DOS-style, as IFS=:)
19268          test -f "$f" || { { echo "$as_me:19268: error: cannot find input file: $f" >&5
19269 echo "$as_me: error: cannot find input file: $f" >&2;}
19270    { (exit 1); exit 1; }; }
19271          echo $f;;
19272       *) # Relative
19273          if test -f "$f"; then
19274            # Build tree
19275            echo $f
19276          elif test -f "$srcdir/$f"; then
19277            # Source tree
19278            echo $srcdir/$f
19279          else
19280            # /dev/null tree
19281            { { echo "$as_me:19281: error: cannot find input file: $f" >&5
19282 echo "$as_me: error: cannot find input file: $f" >&2;}
19283    { (exit 1); exit 1; }; }
19284          fi;;
19285       esac
19286     done` || { (exit 1); exit 1; }
19287 EOF
19288 cat >>$CONFIG_STATUS <<EOF
19289   sed "$ac_vpsub
19290 $extrasub
19291 EOF
19292 cat >>$CONFIG_STATUS <<\EOF
19293 :t
19294 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19295 s,@configure_input@,$configure_input,;t t
19296 s,@srcdir@,$ac_srcdir,;t t
19297 s,@top_srcdir@,$ac_top_srcdir,;t t
19298 s,@INSTALL@,$ac_INSTALL,;t t
19299 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19300   rm -f $tmp/stdin
19301   if test x"$ac_file" != x-; then
19302     mv $tmp/out $ac_file
19303   else
19304     cat $tmp/out
19305     rm -f $tmp/out
19306   fi
19307
19308 done
19309 EOF
19310 cat >>$CONFIG_STATUS <<\EOF
19311
19312 #
19313 # CONFIG_HEADER section.
19314 #
19315
19316 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19317 # NAME is the cpp macro being defined and VALUE is the value it is being given.
19318 #
19319 # ac_d sets the value in "#define NAME VALUE" lines.
19320 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
19321 ac_dB='[        ].*$,\1#\2'
19322 ac_dC=' '
19323 ac_dD=',;t'
19324 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
19325 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
19326 ac_iB='\([      ]\),\1#\2define\3'
19327 ac_iC=' '
19328 ac_iD='\4,;t'
19329 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19330 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
19331 ac_uB='$,\1#\2define\3'
19332 ac_uC=' '
19333 ac_uD=',;t'
19334
19335 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
19336   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19337   case $ac_file in
19338   - | *:- | *:-:* ) # input from stdin
19339         cat >$tmp/stdin
19340         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19341         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19342   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19343         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19344   * )   ac_file_in=$ac_file.in ;;
19345   esac
19346
19347   test x"$ac_file" != x- && { echo "$as_me:19347: creating $ac_file" >&5
19348 echo "$as_me: creating $ac_file" >&6;}
19349
19350   # First look for the input files in the build tree, otherwise in the
19351   # src tree.
19352   ac_file_inputs=`IFS=:
19353     for f in $ac_file_in; do
19354       case $f in
19355       -) echo $tmp/stdin ;;
19356       [\\/$]*)
19357          # Absolute (can't be DOS-style, as IFS=:)
19358          test -f "$f" || { { echo "$as_me:19358: error: cannot find input file: $f" >&5
19359 echo "$as_me: error: cannot find input file: $f" >&2;}
19360    { (exit 1); exit 1; }; }
19361          echo $f;;
19362       *) # Relative
19363          if test -f "$f"; then
19364            # Build tree
19365            echo $f
19366          elif test -f "$srcdir/$f"; then
19367            # Source tree
19368            echo $srcdir/$f
19369          else
19370            # /dev/null tree
19371            { { echo "$as_me:19371: error: cannot find input file: $f" >&5
19372 echo "$as_me: error: cannot find input file: $f" >&2;}
19373    { (exit 1); exit 1; }; }
19374          fi;;
19375       esac
19376     done` || { (exit 1); exit 1; }
19377   # Remove the trailing spaces.
19378   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
19379
19380 EOF
19381
19382 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
19383 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
19384 # be either 'cat' or 'sort'.
19385 cat confdefs.h | uniq >conftest.vals
19386
19387 # Break up conftest.vals because some shells have a limit on
19388 # the size of here documents, and old seds have small limits too.
19389
19390 rm -f conftest.tail
19391 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
19392 while grep . conftest.vals >/dev/null
19393 do
19394   # Write chunks of a limited-size here document to conftest.frag.
19395   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
19396   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
19397   echo 'CEOF' >> $CONFIG_STATUS
19398   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
19399   rm -f conftest.vals
19400   mv conftest.tail conftest.vals
19401 done
19402 rm -f conftest.vals
19403
19404 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
19405 # marker @DEFS@.
19406 echo '  cat >> conftest.edit <<CEOF
19407 /@DEFS@/r conftest.frag
19408 /@DEFS@/d
19409 CEOF
19410 sed -f conftest.edit $tmp/in > $tmp/out
19411 rm -f $tmp/in
19412 mv $tmp/out $tmp/in
19413 rm -f conftest.edit conftest.frag
19414 ' >> $CONFIG_STATUS
19415
19416 cat >>$CONFIG_STATUS <<\EOF
19417   # Let's still pretend it is `configure' which instantiates (i.e., don't
19418   # use $as_me), people would be surprised to read:
19419   #    /* config.h.  Generated automatically by config.status.  */
19420   if test x"$ac_file" = x-; then
19421     echo "/* Generated automatically by configure.  */" >$tmp/config.h
19422   else
19423     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
19424   fi
19425   cat $tmp/in >>$tmp/config.h
19426   rm -f $tmp/in
19427   if test x"$ac_file" != x-; then
19428     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
19429       { echo "$as_me:19429: $ac_file is unchanged" >&5
19430 echo "$as_me: $ac_file is unchanged" >&6;}
19431     else
19432       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19433          X"$ac_file" : 'X\(//\)[^/]' \| \
19434          X"$ac_file" : 'X\(//\)$' \| \
19435          X"$ac_file" : 'X\(/\)' \| \
19436          .     : '\(.\)' 2>/dev/null ||
19437 echo X"$ac_file" |
19438     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19439           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19440           /^X\(\/\/\)$/{ s//\1/; q; }
19441           /^X\(\/\).*/{ s//\1/; q; }
19442           s/.*/./; q'`
19443       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19444         { case "$ac_dir" in
19445   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19446   *)                      as_incr_dir=.;;
19447 esac
19448 as_dummy="$ac_dir"
19449 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19450   case $as_mkdir_dir in
19451     # Skip DOS drivespec
19452     ?:) as_incr_dir=$as_mkdir_dir ;;
19453     *)
19454       as_incr_dir=$as_incr_dir/$as_mkdir_dir
19455       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19456     ;;
19457   esac
19458 done; }
19459
19460       fi
19461       rm -f $ac_file
19462       mv $tmp/config.h $ac_file
19463     fi
19464   else
19465     cat $tmp/config.h
19466     rm -f $tmp/config.h
19467   fi
19468 done
19469 EOF
19470 cat >>$CONFIG_STATUS <<\EOF
19471
19472 #
19473 # CONFIG_COMMANDS section.
19474 #
19475 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19476   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19477   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19478
19479   case $ac_dest in
19480     default )
19481
19482 for cf_dir in test
19483 do
19484         if test ! -d $srcdir/$cf_dir; then
19485                 continue
19486         elif test -f $srcdir/$cf_dir/programs; then
19487                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
19488         fi
19489 done
19490
19491         case $cf_cv_system_name in #(vi
19492         OS/2*|os2*) #(vi
19493         LIB_PREFIX=''
19494         ;;
19495         *)      LIB_PREFIX='lib'
19496         ;;
19497         esac
19498 cf_prefix=$LIB_PREFIX
19499
19500 if test $cf_cv_shlib_version = cygdll ; then
19501         TINFO_NAME=$TINFO_ARG_SUFFIX
19502         TINFO_SUFFIX=.dll
19503 fi
19504
19505 for cf_dir in $SRC_SUBDIRS
19506 do
19507         if test ! -d $srcdir/$cf_dir ; then
19508                 continue
19509         elif test -f $srcdir/$cf_dir/modules; then
19510
19511                 SHARED_LIB=
19512                 LIBS_TO_MAKE=
19513                 for cf_item in $cf_LIST_MODELS
19514                 do
19515
19516         case $cf_item in #(vi
19517         libtool) #(vi
19518                 cf_suffix='.la'
19519                 cf_depsuf=$cf_suffix
19520                 ;;
19521         normal) #(vi
19522                 cf_suffix='.a'
19523                 cf_depsuf=$cf_suffix
19524                 ;;
19525         debug) #(vi
19526                 cf_suffix='_g.a'
19527                 cf_depsuf=$cf_suffix
19528                 ;;
19529         profile) #(vi
19530                 cf_suffix='_p.a'
19531                 cf_depsuf=$cf_suffix
19532                 ;;
19533         shared) #(vi
19534                 case $cf_cv_system_name in
19535                 aix[56]*) #(vi
19536                         cf_suffix='.a'
19537                         cf_depsuf=$cf_suffix
19538                         ;;
19539                 cygwin*) #(vi
19540                         cf_suffix='.dll'
19541                         cf_depsuf='.dll.a'
19542                         ;;
19543                 darwin*) #(vi
19544                         cf_suffix='.dylib'
19545                         cf_depsuf=$cf_suffix
19546                         ;;
19547                 hpux*) #(vi
19548                         case $target in
19549                         ia64*) #(vi
19550                                 cf_suffix='.so'
19551                                 cf_depsuf=$cf_suffix
19552                                 ;;
19553                         *) #(vi
19554                                 cf_suffix='.sl'
19555                                 cf_depsuf=$cf_suffix
19556                                 ;;
19557                         esac
19558                         ;;
19559                 *)      cf_suffix='.so'
19560                         cf_depsuf=$cf_suffix
19561                         ;;
19562                 esac
19563         esac
19564         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
19565         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
19566
19567                         if test $cf_item = shared ; then
19568                         if test "$cf_cv_do_symlinks" = yes ; then
19569                                 case "$cf_cv_shlib_version" in #(vi
19570                                 rel) #(vi
19571                                         case "$cf_cv_system_name" in #(vi
19572                                         darwin*)
19573                                         case .${LIB_SUFFIX} in
19574                                         .w*)
19575                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
19576                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
19577                                                 ;;
19578                                         *)
19579                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
19580                                                 ;;
19581                                         esac
19582                                         ;; #(vi
19583                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
19584                                         esac
19585                                         ;;
19586                                 abi)
19587                                         case "$cf_cv_system_name" in #(vi
19588                                         darwin*)
19589                                         case .${LIB_SUFFIX} in
19590                                         .w*)
19591                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
19592                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
19593                                                 ;;
19594                                         *)
19595                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
19596                                                 ;;
19597                                         esac
19598                                         ;; #(vi
19599                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
19600                                         esac
19601                                         ;;
19602                                 esac
19603                         fi
19604                         # cygwin needs import library, and has unique naming convention
19605                         # use autodetected ${cf_prefix} for import lib and static lib, but
19606                         # use 'cyg' prefix for shared lib.
19607                         if test $cf_cv_shlib_version = cygdll ; then
19608                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
19609                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
19610                                 continue
19611                         fi
19612                         fi
19613                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
19614                 done
19615
19616                 if test $cf_dir = ncurses ; then
19617                         cf_subsets="$LIB_SUBSETS"
19618                         cf_r_parts="$cf_subsets"
19619                         cf_liblist="$LIBS_TO_MAKE"
19620
19621                         while test -n "$cf_r_parts"
19622                         do
19623                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
19624                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
19625                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
19626                                         cf_item=
19627                                         case $cf_l_parts in #(vi
19628                                         *termlib*) #(vi
19629                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
19630                                                 ;;
19631                                         *ticlib*)
19632                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
19633                                                 ;;
19634                                         *)
19635                                                 break
19636                                                 ;;
19637                                         esac
19638                                         if test -n "$cf_item"; then
19639                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
19640                                         fi
19641                                 else
19642                                         break
19643                                 fi
19644                         done
19645                 else
19646                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
19647                 fi
19648
19649                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
19650                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
19651                         $cf_dir/Makefile >$cf_dir/Makefile.out
19652                 mv $cf_dir/Makefile.out $cf_dir/Makefile
19653
19654                 $AWK -f $srcdir/mk-0th.awk \
19655                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
19656                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
19657
19658                 for cf_subset in $cf_subsets
19659                 do
19660                         cf_subdirs=
19661                         for cf_item in $cf_LIST_MODELS
19662                         do
19663                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
19664
19665 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19666
19667         case $cf_item in #(vi
19668         libtool) #(vi
19669                 cf_suffix='.la'
19670                 cf_depsuf=$cf_suffix
19671                 ;;
19672         normal) #(vi
19673                 cf_suffix='.a'
19674                 cf_depsuf=$cf_suffix
19675                 ;;
19676         debug) #(vi
19677                 cf_suffix='_g.a'
19678                 cf_depsuf=$cf_suffix
19679                 ;;
19680         profile) #(vi
19681                 cf_suffix='_p.a'
19682                 cf_depsuf=$cf_suffix
19683                 ;;
19684         shared) #(vi
19685                 case $cf_cv_system_name in
19686                 aix[56]*) #(vi
19687                         cf_suffix='.a'
19688                         cf_depsuf=$cf_suffix
19689                         ;;
19690                 cygwin*) #(vi
19691                         cf_suffix='.dll'
19692                         cf_depsuf='.dll.a'
19693                         ;;
19694                 darwin*) #(vi
19695                         cf_suffix='.dylib'
19696                         cf_depsuf=$cf_suffix
19697                         ;;
19698                 hpux*) #(vi
19699                         case $target in
19700                         ia64*) #(vi
19701                                 cf_suffix='.so'
19702                                 cf_depsuf=$cf_suffix
19703                                 ;;
19704                         *) #(vi
19705                                 cf_suffix='.sl'
19706                                 cf_depsuf=$cf_suffix
19707                                 ;;
19708                         esac
19709                         ;;
19710                 *)      cf_suffix='.so'
19711                         cf_depsuf=$cf_suffix
19712                         ;;
19713                 esac
19714         esac
19715         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
19716         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
19717
19718         case $cf_item in
19719         libtool) cf_subdir='obj_lo'  ;;
19720         normal)  cf_subdir='objects' ;;
19721         debug)   cf_subdir='obj_g' ;;
19722         profile) cf_subdir='obj_p' ;;
19723         shared)
19724                 case $cf_cv_system_name in #(vi
19725                 cygwin) #(vi
19726                         cf_subdir='objects' ;;
19727                 *)
19728                         cf_subdir='obj_s' ;;
19729                 esac
19730         esac
19731
19732                         # Test for case where we build libtinfo with a different name.
19733                         cf_libname=$cf_dir
19734                         if test $cf_dir = ncurses ; then
19735                                 case $cf_subset in
19736                                 *base*)
19737                                         cf_libname=${cf_libname}$LIB_SUFFIX
19738                                         ;;
19739                                 *termlib*)
19740                                         cf_libname=$TINFO_LIB_SUFFIX
19741                                         ;;
19742                                 ticlib*)
19743                                         cf_libname=$TICS_LIB_SUFFIX
19744                                         ;;
19745                                 esac
19746                         else
19747                                 cf_libname=${cf_libname}$LIB_SUFFIX
19748                         fi
19749                         if test -n "${DFT_ARG_SUFFIX}" ; then
19750                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
19751                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
19752                         fi
19753
19754                         # These dependencies really are for development, not
19755                         # builds, but they are useful in porting, too.
19756                         cf_depend="../include/ncurses_cfg.h"
19757                         if test "$srcdir" = "."; then
19758                                 cf_reldir="."
19759                         else
19760                                 cf_reldir="\${srcdir}"
19761                         fi
19762
19763                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
19764                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
19765                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
19766                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
19767                         fi
19768
19769                         cf_dir_suffix=
19770                         old_cf_suffix="$cf_suffix"
19771                         if test "$cf_cv_shlib_version_infix" = yes ; then
19772                         if test -n "$LIB_SUFFIX" ; then
19773                                 case $LIB_SUFFIX in
19774                                 w*)
19775                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
19776                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
19777                                         cf_dir_suffix=w
19778                                         ;;
19779                                 esac
19780                         fi
19781                         fi
19782
19783                         $AWK -f $srcdir/mk-1st.awk \
19784                                 name=${cf_libname}${cf_dir_suffix} \
19785                                 traces=$LIB_TRACING \
19786                                 MODEL=$cf_ITEM \
19787                                 model=$cf_subdir \
19788                                 prefix=$cf_prefix \
19789                                 suffix=$cf_suffix \
19790                                 subset=$cf_subset \
19791                                 TermlibRoot=$TINFO_NAME \
19792                                 TermlibSuffix=$TINFO_SUFFIX \
19793                                 ShlibVer=$cf_cv_shlib_version \
19794                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
19795                                 ReLink=${cf_cv_do_relink-no} \
19796                                 DoLinks=$cf_cv_do_symlinks \
19797                                 rmSoLocs=$cf_cv_rm_so_locs \
19798                                 ldconfig="$LDCONFIG" \
19799                                 overwrite=$WITH_OVERWRITE \
19800                                 depend="$cf_depend" \
19801                                 host="$host" \
19802                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
19803
19804                         cf_suffix="$old_cf_suffix"
19805
19806                         for cf_subdir2 in $cf_subdirs lib
19807                         do
19808                                 test $cf_subdir = $cf_subdir2 && break
19809                         done
19810                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
19811                         $AWK -f $srcdir/mk-2nd.awk \
19812                                 name=$cf_dir \
19813                                 traces=$LIB_TRACING \
19814                                 MODEL=$cf_ITEM \
19815                                 model=$cf_subdir \
19816                                 subset=$cf_subset \
19817                                 srcdir=$srcdir \
19818                                 echo=$WITH_ECHO \
19819                                 crenames=$cf_cv_prog_CC_c_o \
19820                                 cxxrenames=$cf_cv_prog_CXX_c_o \
19821                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
19822                         cf_subdirs="$cf_subdirs $cf_subdir"
19823                         done
19824                 done
19825         fi
19826
19827         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
19828 done
19829
19830 for cf_dir in $SRC_SUBDIRS
19831 do
19832         if test ! -d $srcdir/$cf_dir ; then
19833                 continue
19834         fi
19835
19836         if test -f $cf_dir/Makefile ; then
19837                 case "$cf_dir" in
19838                 Ada95) #(vi
19839                         echo 'libs \' >> Makefile
19840                         echo 'install.libs \' >> Makefile
19841                         echo 'uninstall.libs ::' >> Makefile
19842                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
19843                         ;;
19844                 esac
19845         fi
19846
19847         if test -f $srcdir/$cf_dir/modules; then
19848                 echo >> Makefile
19849                 if test -f $srcdir/$cf_dir/headers; then
19850 cat >> Makefile <<CF_EOF
19851 install.includes \\
19852 uninstall.includes \\
19853 CF_EOF
19854                 fi
19855 if test "$cf_dir" != "c++" ; then
19856 echo 'lint \' >> Makefile
19857 fi
19858 cat >> Makefile <<CF_EOF
19859 libs \\
19860 lintlib \\
19861 install.libs \\
19862 uninstall.libs \\
19863 install.$cf_dir \\
19864 uninstall.$cf_dir ::
19865         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
19866 CF_EOF
19867         elif test -f $srcdir/$cf_dir/headers; then
19868 cat >> Makefile <<CF_EOF
19869
19870 libs \\
19871 install.libs \\
19872 uninstall.libs \\
19873 install.includes \\
19874 uninstall.includes ::
19875         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
19876 CF_EOF
19877 fi
19878 done
19879
19880 cat >> Makefile <<CF_EOF
19881
19882 install.libs uninstall.libs \\
19883 install.data uninstall.data ::
19884 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
19885 CF_EOF
19886
19887 if test "x$cf_with_manpages" = xyes; then
19888 cat >> Makefile <<CF_EOF
19889
19890 install.man \\
19891 uninstall.man ::
19892         cd man && \${MAKE} \${CF_MFLAGS} \$@
19893 CF_EOF
19894 fi
19895
19896 cat >> Makefile <<CF_EOF
19897
19898 distclean ::
19899         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
19900         rm -f headers.sh headers.sed mk_shared_lib.sh
19901         rm -f edit_man.* man_alias.*
19902         rm -rf \${DIRS_TO_MAKE}
19903 CF_EOF
19904
19905 # Special case: tack's manpage lives in its own directory.
19906 if test "x$cf_with_manpages" = xyes; then
19907 if test -d tack ; then
19908 if test -f $srcdir/$tack.h; then
19909 cat >> Makefile <<CF_EOF
19910
19911 install.man \\
19912 uninstall.man ::
19913         cd tack && \${MAKE} \${CF_MFLAGS} \$@
19914 CF_EOF
19915 fi
19916 fi
19917 fi
19918
19919 rm -f headers.sed headers.sh
19920
19921 echo creating headers.sh
19922 cat >headers.sh <<CF_EOF
19923 #! /bin/sh
19924 # This shell script is generated by the 'configure' script.  It is invoked in a
19925 # subdirectory of the build tree.  It generates a sed-script in the parent
19926 # directory that is used to adjust includes for header files that reside in a
19927 # subdirectory of /usr/include, etc.
19928 PRG=""
19929 while test \$# != 3
19930 do
19931 PRG="\$PRG \$1"; shift
19932 done
19933 DST=\$1
19934 REF=\$2
19935 SRC=\$3
19936 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
19937 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
19938 echo installing \$SRC in \$DST
19939 CF_EOF
19940
19941 if test $WITH_CURSES_H = yes; then
19942         cat >>headers.sh <<CF_EOF
19943 case \$DST in
19944 /*/include/*)
19945         END=\`basename \$DST\`
19946         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
19947         do
19948                 NAME=\`basename \$i\`
19949                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
19950         done
19951         ;;
19952 *)
19953         echo "" >> \$TMPSED
19954         ;;
19955 esac
19956 CF_EOF
19957
19958 else
19959         cat >>headers.sh <<CF_EOF
19960 case \$DST in
19961 /*/include/*)
19962         END=\`basename \$DST\`
19963         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
19964         do
19965                 NAME=\`basename \$i\`
19966                 if test "\$NAME" = "curses.h"
19967                 then
19968                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
19969                         NAME=ncurses.h
19970                 fi
19971                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
19972         done
19973         ;;
19974 *)
19975         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
19976         ;;
19977 esac
19978 CF_EOF
19979 fi
19980 cat >>headers.sh <<CF_EOF
19981 rm -f \$TMPSRC
19982 sed -f \$TMPSED \$SRC > \$TMPSRC
19983 NAME=\`basename \$SRC\`
19984 CF_EOF
19985 if test $WITH_CURSES_H != yes; then
19986         cat >>headers.sh <<CF_EOF
19987 test "\$NAME" = "curses.h" && NAME=ncurses.h
19988 CF_EOF
19989 fi
19990 cat >>headers.sh <<CF_EOF
19991 # Just in case someone gzip'd manpages, remove the conflicting copy.
19992 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
19993
19994 eval \$PRG \$TMPSRC \$DST/\$NAME
19995 rm -f \$TMPSRC \$TMPSED
19996 CF_EOF
19997
19998 chmod 0755 headers.sh
19999
20000 for cf_dir in $SRC_SUBDIRS
20001 do
20002         if test ! -d $srcdir/$cf_dir ; then
20003                 continue
20004         fi
20005
20006         if test -f $srcdir/$cf_dir/headers; then
20007                 $AWK -f $srcdir/mk-hdr.awk \
20008                         subset="$LIB_SUBSETS" \
20009                         compat="$WITH_CURSES_H" \
20010                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
20011         fi
20012
20013         if test -f $srcdir/$cf_dir/modules; then
20014                 if test "$cf_dir" != "c++" ; then
20015                         cat >>$cf_dir/Makefile <<"CF_EOF"
20016 depend : ${AUTO_SRC}
20017         makedepend -- ${CPPFLAGS} -- ${C_SRC}
20018
20019 # DO NOT DELETE THIS LINE -- make depend depends on it.
20020 CF_EOF
20021                 fi
20022         fi
20023 done
20024
20025  ;;
20026   esac
20027 done
20028 EOF
20029
20030 cat >>$CONFIG_STATUS <<\EOF
20031
20032 { (exit 0); exit 0; }
20033 EOF
20034 chmod +x $CONFIG_STATUS
20035 ac_clean_files=$ac_clean_files_save
20036
20037 # configure is writing to config.log, and then calls config.status.
20038 # config.status does its own redirection, appending to config.log.
20039 # Unfortunately, on DOS this fails, as config.log is still kept open
20040 # by configure, so config.status won't be able to write to it; its
20041 # output is simply discarded.  So we exec the FD to /dev/null,
20042 # effectively closing config.log, so it can be properly (re)opened and
20043 # appended to by config.status.  When coming back to configure, we
20044 # need to make the FD available again.
20045 if test "$no_create" != yes; then
20046   ac_cs_success=:
20047   exec 5>/dev/null
20048   $SHELL $CONFIG_STATUS || ac_cs_success=false
20049   exec 5>>config.log
20050   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20051   # would make configure fail if this is the last instruction.
20052   $ac_cs_success || { (exit 1); exit 1; }
20053 fi
20054 ${MAKE-make} preinstall