]> git.ipfire.org Git - thirdparty/bash.git/blame - configure
Initial devel branch import from bash-3.0-alpha
[thirdparty/bash.git] / configure
CommitLineData
ccc6cda3 1#! /bin/sh
d3a24ed2 2# From configure.in for Bash 3.0, version 3.154, from autoconf version 2.52.
f73dda09 3# Guess values for system-dependent variables and create Makefiles.
d3a24ed2 4# Generated by Autoconf 2.52 for bash 3.0-alpha.
f73dda09
JA
5#
6# Report bugs to <bug-bash@gnu.org>.
7#
8# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
9# Free Software Foundation, Inc.
10# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
ccc6cda3 12
f73dda09
JA
13# Avoid depending upon Character Ranges.
14as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17as_cr_digits='0123456789'
18as_cr_alnum=$as_cr_Letters$as_cr_digits
ccc6cda3 19
f73dda09
JA
20# Sed expression to map a string onto a valid variable name.
21as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
ccc6cda3 22
f73dda09
JA
23# Sed expression to map a string onto a valid CPP name.
24as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
ccc6cda3 25
f73dda09
JA
26# Be Bourne compatible
27if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
28 emulate sh
29 NULLCMD=:
30elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
31 set -o posix
32fi
ccc6cda3 33
f73dda09
JA
34# Name of the executable.
35as_me=`echo "$0" |sed 's,.*[\\/],,'`
ccc6cda3 36
f73dda09
JA
37if expr a : '\(a\)' >/dev/null 2>&1; then
38 as_expr=expr
39else
40 as_expr=false
41fi
ccc6cda3 42
f73dda09
JA
43rm -f conf$$ conf$$.exe conf$$.file
44echo >conf$$.file
45if ln -s conf$$.file conf$$ 2>/dev/null; then
46 # We could just check for DJGPP; but this test a) works b) is more generic
47 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
48 if test -f conf$$.exe; then
49 # Don't use ln at all; we don't have any links
50 as_ln_s='cp -p'
51 else
52 as_ln_s='ln -s'
53 fi
54elif ln conf$$.file conf$$ 2>/dev/null; then
55 as_ln_s=ln
56else
57 as_ln_s='cp -p'
58fi
59rm -f conf$$ conf$$.exe conf$$.file
ccc6cda3 60
f73dda09 61as_executable_p="test -f"
ccc6cda3 62
f73dda09
JA
63# Support unset when possible.
64if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
65 as_unset=unset
66else
67 as_unset=false
68fi
ccc6cda3 69
f73dda09
JA
70# NLS nuisances.
71$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
72$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
73$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
74$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
75$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
76$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
77$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
78$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
79
80# IFS
81# We need space, tab and new line, in precisely that order.
82as_nl='
83'
84IFS=" $as_nl"
85
86# CDPATH.
87$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
88
89# Name of the host.
90# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
91# so uname gets run too.
92ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
93
94exec 6>&1
ccc6cda3 95
726f6388 96#
f73dda09
JA
97# Initializations.
98#
ccc6cda3 99ac_default_prefix=/usr/local
f73dda09
JA
100cross_compiling=no
101subdirs=
102MFLAGS= MAKEFLAGS=
103SHELL=${CONFIG_SHELL-/bin/sh}
104
105# Maximum number of lines to put in a shell here document.
106# This variable seems obsolete. It should probably be removed, and
107# only ac_max_sed_lines should be used.
108: ${ac_max_here_lines=38}
109
110ac_unique_file="shell.h"
111# Factoring default headers for most tests.
112ac_includes_default="\
113#include <stdio.h>
114#if HAVE_SYS_TYPES_H
115# include <sys/types.h>
116#endif
117#if HAVE_SYS_STAT_H
118# include <sys/stat.h>
119#endif
120#if STDC_HEADERS
121# include <stdlib.h>
122# include <stddef.h>
123#else
124# if HAVE_STDLIB_H
125# include <stdlib.h>
126# endif
127#endif
128#if HAVE_STRING_H
129# if !STDC_HEADERS && HAVE_MEMORY_H
130# include <memory.h>
131# endif
132# include <string.h>
133#endif
134#if HAVE_STRINGS_H
135# include <strings.h>
136#endif
137#if HAVE_INTTYPES_H
138# include <inttypes.h>
139#else
140# if HAVE_STDINT_H
141# include <stdint.h>
142# endif
143#endif
144#if HAVE_UNISTD_H
145# include <unistd.h>
146#endif"
ccc6cda3
JA
147
148# Initialize some variables set by options.
f73dda09
JA
149ac_init_help=
150ac_init_version=false
ccc6cda3
JA
151# The variables have the same names as the options, with
152# dashes changed to underlines.
f73dda09 153cache_file=/dev/null
ccc6cda3 154exec_prefix=NONE
ccc6cda3 155no_create=
ccc6cda3
JA
156no_recursion=
157prefix=NONE
158program_prefix=NONE
159program_suffix=NONE
160program_transform_name=s,x,x,
161silent=
162site=
163srcdir=
ccc6cda3
JA
164verbose=
165x_includes=NONE
166x_libraries=NONE
f73dda09
JA
167
168# Installation directory options.
169# These are left unexpanded so users can "make install exec_prefix=/foo"
170# and all the variables that are supposed to be based on exec_prefix
171# by default will actually change.
172# Use braces instead of parens because sh, perl, etc. also accept them.
ccc6cda3
JA
173bindir='${exec_prefix}/bin'
174sbindir='${exec_prefix}/sbin'
175libexecdir='${exec_prefix}/libexec'
176datadir='${prefix}/share'
177sysconfdir='${prefix}/etc'
178sharedstatedir='${prefix}/com'
179localstatedir='${prefix}/var'
180libdir='${exec_prefix}/lib'
181includedir='${prefix}/include'
182oldincludedir='/usr/include'
183infodir='${prefix}/info'
184mandir='${prefix}/man'
185
f73dda09
JA
186# Identity of this package.
187PACKAGE_NAME='bash'
188PACKAGE_TARNAME='bash'
d3a24ed2
CR
189PACKAGE_VERSION='3.0-alpha'
190PACKAGE_STRING='bash 3.0-alpha'
f73dda09 191PACKAGE_BUGREPORT='bug-bash@gnu.org'
ccc6cda3
JA
192
193ac_prev=
194for ac_option
195do
ccc6cda3
JA
196 # If the previous option needs an argument, assign it.
197 if test -n "$ac_prev"; then
198 eval "$ac_prev=\$ac_option"
199 ac_prev=
200 continue
201 fi
202
f73dda09 203 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
ccc6cda3
JA
204
205 # Accept the important Cygnus configure options, so we can diagnose typos.
206
f73dda09 207 case $ac_option in
ccc6cda3
JA
208
209 -bindir | --bindir | --bindi | --bind | --bin | --bi)
210 ac_prev=bindir ;;
211 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
f73dda09 212 bindir=$ac_optarg ;;
ccc6cda3
JA
213
214 -build | --build | --buil | --bui | --bu)
f73dda09 215 ac_prev=build_alias ;;
ccc6cda3 216 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
f73dda09 217 build_alias=$ac_optarg ;;
ccc6cda3
JA
218
219 -cache-file | --cache-file | --cache-fil | --cache-fi \
220 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
221 ac_prev=cache_file ;;
222 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
223 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
f73dda09
JA
224 cache_file=$ac_optarg ;;
225
226 --config-cache | -C)
227 cache_file=config.cache ;;
ccc6cda3
JA
228
229 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
230 ac_prev=datadir ;;
231 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
232 | --da=*)
f73dda09 233 datadir=$ac_optarg ;;
ccc6cda3
JA
234
235 -disable-* | --disable-*)
f73dda09 236 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ccc6cda3 237 # Reject names that are not valid shell variable names.
f73dda09
JA
238 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
239 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
240 { (exit 1); exit 1; }; }
241 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
242 eval "enable_$ac_feature=no" ;;
ccc6cda3
JA
243
244 -enable-* | --enable-*)
f73dda09 245 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ccc6cda3 246 # Reject names that are not valid shell variable names.
f73dda09
JA
247 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
248 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
249 { (exit 1); exit 1; }; }
250 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
251 case $ac_option in
252 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
ccc6cda3
JA
253 *) ac_optarg=yes ;;
254 esac
f73dda09 255 eval "enable_$ac_feature='$ac_optarg'" ;;
ccc6cda3
JA
256
257 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
258 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
259 | --exec | --exe | --ex)
260 ac_prev=exec_prefix ;;
261 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
262 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
263 | --exec=* | --exe=* | --ex=*)
f73dda09 264 exec_prefix=$ac_optarg ;;
ccc6cda3
JA
265
266 -gas | --gas | --ga | --g)
267 # Obsolete; use --with-gas.
268 with_gas=yes ;;
269
f73dda09
JA
270 -help | --help | --hel | --he | -h)
271 ac_init_help=long ;;
272 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
273 ac_init_help=recursive ;;
274 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
275 ac_init_help=short ;;
ccc6cda3
JA
276
277 -host | --host | --hos | --ho)
f73dda09 278 ac_prev=host_alias ;;
ccc6cda3 279 -host=* | --host=* | --hos=* | --ho=*)
f73dda09 280 host_alias=$ac_optarg ;;
ccc6cda3
JA
281
282 -includedir | --includedir | --includedi | --included | --include \
283 | --includ | --inclu | --incl | --inc)
284 ac_prev=includedir ;;
285 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
286 | --includ=* | --inclu=* | --incl=* | --inc=*)
f73dda09 287 includedir=$ac_optarg ;;
ccc6cda3
JA
288
289 -infodir | --infodir | --infodi | --infod | --info | --inf)
290 ac_prev=infodir ;;
291 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
f73dda09 292 infodir=$ac_optarg ;;
ccc6cda3
JA
293
294 -libdir | --libdir | --libdi | --libd)
295 ac_prev=libdir ;;
296 -libdir=* | --libdir=* | --libdi=* | --libd=*)
f73dda09 297 libdir=$ac_optarg ;;
ccc6cda3
JA
298
299 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
300 | --libexe | --libex | --libe)
301 ac_prev=libexecdir ;;
302 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
303 | --libexe=* | --libex=* | --libe=*)
f73dda09 304 libexecdir=$ac_optarg ;;
ccc6cda3
JA
305
306 -localstatedir | --localstatedir | --localstatedi | --localstated \
307 | --localstate | --localstat | --localsta | --localst \
308 | --locals | --local | --loca | --loc | --lo)
309 ac_prev=localstatedir ;;
310 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
311 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
312 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
f73dda09 313 localstatedir=$ac_optarg ;;
ccc6cda3
JA
314
315 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
316 ac_prev=mandir ;;
317 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
f73dda09 318 mandir=$ac_optarg ;;
ccc6cda3
JA
319
320 -nfp | --nfp | --nf)
321 # Obsolete; use --without-fp.
322 with_fp=no ;;
323
324 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
325 | --no-cr | --no-c)
326 no_create=yes ;;
327
328 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
329 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
330 no_recursion=yes ;;
331
332 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
333 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
334 | --oldin | --oldi | --old | --ol | --o)
335 ac_prev=oldincludedir ;;
336 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
337 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
338 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
f73dda09 339 oldincludedir=$ac_optarg ;;
ccc6cda3
JA
340
341 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
342 ac_prev=prefix ;;
343 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
f73dda09 344 prefix=$ac_optarg ;;
ccc6cda3
JA
345
346 -program-prefix | --program-prefix | --program-prefi | --program-pref \
347 | --program-pre | --program-pr | --program-p)
348 ac_prev=program_prefix ;;
349 -program-prefix=* | --program-prefix=* | --program-prefi=* \
350 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
f73dda09 351 program_prefix=$ac_optarg ;;
ccc6cda3
JA
352
353 -program-suffix | --program-suffix | --program-suffi | --program-suff \
354 | --program-suf | --program-su | --program-s)
355 ac_prev=program_suffix ;;
356 -program-suffix=* | --program-suffix=* | --program-suffi=* \
357 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
f73dda09 358 program_suffix=$ac_optarg ;;
ccc6cda3
JA
359
360 -program-transform-name | --program-transform-name \
361 | --program-transform-nam | --program-transform-na \
362 | --program-transform-n | --program-transform- \
363 | --program-transform | --program-transfor \
364 | --program-transfo | --program-transf \
365 | --program-trans | --program-tran \
366 | --progr-tra | --program-tr | --program-t)
367 ac_prev=program_transform_name ;;
368 -program-transform-name=* | --program-transform-name=* \
369 | --program-transform-nam=* | --program-transform-na=* \
370 | --program-transform-n=* | --program-transform-=* \
371 | --program-transform=* | --program-transfor=* \
372 | --program-transfo=* | --program-transf=* \
373 | --program-trans=* | --program-tran=* \
374 | --progr-tra=* | --program-tr=* | --program-t=*)
f73dda09 375 program_transform_name=$ac_optarg ;;
ccc6cda3
JA
376
377 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
378 | -silent | --silent | --silen | --sile | --sil)
379 silent=yes ;;
380
381 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
382 ac_prev=sbindir ;;
383 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
384 | --sbi=* | --sb=*)
f73dda09 385 sbindir=$ac_optarg ;;
ccc6cda3
JA
386
387 -sharedstatedir | --sharedstatedir | --sharedstatedi \
388 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
389 | --sharedst | --shareds | --shared | --share | --shar \
390 | --sha | --sh)
391 ac_prev=sharedstatedir ;;
392 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
393 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
394 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
395 | --sha=* | --sh=*)
f73dda09 396 sharedstatedir=$ac_optarg ;;
ccc6cda3
JA
397
398 -site | --site | --sit)
399 ac_prev=site ;;
400 -site=* | --site=* | --sit=*)
f73dda09 401 site=$ac_optarg ;;
ccc6cda3
JA
402
403 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
404 ac_prev=srcdir ;;
405 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
f73dda09 406 srcdir=$ac_optarg ;;
ccc6cda3
JA
407
408 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
409 | --syscon | --sysco | --sysc | --sys | --sy)
410 ac_prev=sysconfdir ;;
411 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
412 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
f73dda09 413 sysconfdir=$ac_optarg ;;
ccc6cda3
JA
414
415 -target | --target | --targe | --targ | --tar | --ta | --t)
f73dda09 416 ac_prev=target_alias ;;
ccc6cda3 417 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
f73dda09 418 target_alias=$ac_optarg ;;
ccc6cda3
JA
419
420 -v | -verbose | --verbose | --verbos | --verbo | --verb)
421 verbose=yes ;;
422
f73dda09
JA
423 -version | --version | --versio | --versi | --vers | -V)
424 ac_init_version=: ;;
ccc6cda3
JA
425
426 -with-* | --with-*)
f73dda09 427 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ccc6cda3 428 # Reject names that are not valid shell variable names.
f73dda09
JA
429 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
430 { echo "$as_me: error: invalid package name: $ac_package" >&2
431 { (exit 1); exit 1; }; }
ccc6cda3 432 ac_package=`echo $ac_package| sed 's/-/_/g'`
f73dda09
JA
433 case $ac_option in
434 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
ccc6cda3
JA
435 *) ac_optarg=yes ;;
436 esac
f73dda09 437 eval "with_$ac_package='$ac_optarg'" ;;
ccc6cda3
JA
438
439 -without-* | --without-*)
f73dda09 440 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ccc6cda3 441 # Reject names that are not valid shell variable names.
f73dda09
JA
442 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
443 { echo "$as_me: error: invalid package name: $ac_package" >&2
444 { (exit 1); exit 1; }; }
445 ac_package=`echo $ac_package | sed 's/-/_/g'`
446 eval "with_$ac_package=no" ;;
ccc6cda3
JA
447
448 --x)
449 # Obsolete; use --with-x.
450 with_x=yes ;;
451
452 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
453 | --x-incl | --x-inc | --x-in | --x-i)
454 ac_prev=x_includes ;;
455 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
456 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
f73dda09 457 x_includes=$ac_optarg ;;
ccc6cda3
JA
458
459 -x-libraries | --x-libraries | --x-librarie | --x-librari \
460 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
461 ac_prev=x_libraries ;;
462 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
463 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
f73dda09 464 x_libraries=$ac_optarg ;;
ccc6cda3 465
f73dda09
JA
466 -*) { echo "$as_me: error: unrecognized option: $ac_option
467Try \`$0 --help' for more information." >&2
468 { (exit 1); exit 1; }; }
ccc6cda3
JA
469 ;;
470
f73dda09
JA
471 *=*)
472 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
473 # Reject names that are not valid shell variable names.
474 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
475 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
476 { (exit 1); exit 1; }; }
477 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
478 eval "$ac_envvar='$ac_optarg'"
479 export $ac_envvar ;;
480
ccc6cda3 481 *)
f73dda09
JA
482 # FIXME: should be removed in autoconf 3.0.
483 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
484 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
485 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
486 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
ccc6cda3
JA
487 ;;
488
489 esac
490done
491
492if test -n "$ac_prev"; then
f73dda09
JA
493 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
494 { echo "$as_me: error: missing argument to $ac_option" >&2
495 { (exit 1); exit 1; }; }
ccc6cda3 496fi
ccc6cda3 497
f73dda09
JA
498# Be sure to have absolute paths.
499for ac_var in exec_prefix prefix
500do
501 eval ac_val=$`echo $ac_var`
502 case $ac_val in
503 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
504 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
505 { (exit 1); exit 1; }; };;
506 esac
507done
ccc6cda3 508
f73dda09
JA
509# Be sure to have absolute paths.
510for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
511 localstatedir libdir includedir oldincludedir infodir mandir
ccc6cda3 512do
f73dda09
JA
513 eval ac_val=$`echo $ac_var`
514 case $ac_val in
515 [\\/$]* | ?:[\\/]* ) ;;
516 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
517 { (exit 1); exit 1; }; };;
ccc6cda3
JA
518 esac
519done
520
f73dda09
JA
521# There might be people who depend on the old broken behavior: `$host'
522# used to hold the argument of --host etc.
523build=$build_alias
524host=$host_alias
525target=$target_alias
526
527# FIXME: should be removed in autoconf 3.0.
528if test "x$host_alias" != x; then
529 if test "x$build_alias" = x; then
530 cross_compiling=maybe
531 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
532 If a cross compiler is detected then cross compile mode will be used." >&2
533 elif test "x$build_alias" != "x$host_alias"; then
534 cross_compiling=yes
535 fi
536fi
ccc6cda3 537
f73dda09
JA
538ac_tool_prefix=
539test -n "$host_alias" && ac_tool_prefix=$host_alias-
ccc6cda3 540
f73dda09 541test "$silent" = yes && exec 6>/dev/null
ccc6cda3
JA
542
543# Find the source files, if location was not specified.
544if test -z "$srcdir"; then
545 ac_srcdir_defaulted=yes
546 # Try the directory containing this script, then its parent.
547 ac_prog=$0
f73dda09 548 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
ccc6cda3
JA
549 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
550 srcdir=$ac_confdir
551 if test ! -r $srcdir/$ac_unique_file; then
552 srcdir=..
553 fi
554else
555 ac_srcdir_defaulted=no
556fi
557if test ! -r $srcdir/$ac_unique_file; then
558 if test "$ac_srcdir_defaulted" = yes; then
f73dda09
JA
559 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
560 { (exit 1); exit 1; }; }
ccc6cda3 561 else
f73dda09
JA
562 { echo "$as_me: error: cannot find sources in $srcdir" >&2
563 { (exit 1); exit 1; }; }
ccc6cda3
JA
564 fi
565fi
f73dda09
JA
566srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
567ac_env_build_alias_set=${build_alias+set}
568ac_env_build_alias_value=$build_alias
569ac_cv_env_build_alias_set=${build_alias+set}
570ac_cv_env_build_alias_value=$build_alias
571ac_env_host_alias_set=${host_alias+set}
572ac_env_host_alias_value=$host_alias
573ac_cv_env_host_alias_set=${host_alias+set}
574ac_cv_env_host_alias_value=$host_alias
575ac_env_target_alias_set=${target_alias+set}
576ac_env_target_alias_value=$target_alias
577ac_cv_env_target_alias_set=${target_alias+set}
578ac_cv_env_target_alias_value=$target_alias
d3a24ed2
CR
579ac_env_DEBUGGER_START_FILE_set=${DEBUGGER_START_FILE+set}
580ac_env_DEBUGGER_START_FILE_value=$DEBUGGER_START_FILE
581ac_cv_env_DEBUGGER_START_FILE_set=${DEBUGGER_START_FILE+set}
582ac_cv_env_DEBUGGER_START_FILE_value=$DEBUGGER_START_FILE
f73dda09
JA
583ac_env_CC_set=${CC+set}
584ac_env_CC_value=$CC
585ac_cv_env_CC_set=${CC+set}
586ac_cv_env_CC_value=$CC
587ac_env_CFLAGS_set=${CFLAGS+set}
588ac_env_CFLAGS_value=$CFLAGS
589ac_cv_env_CFLAGS_set=${CFLAGS+set}
590ac_cv_env_CFLAGS_value=$CFLAGS
591ac_env_LDFLAGS_set=${LDFLAGS+set}
592ac_env_LDFLAGS_value=$LDFLAGS
593ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
594ac_cv_env_LDFLAGS_value=$LDFLAGS
595ac_env_CPPFLAGS_set=${CPPFLAGS+set}
596ac_env_CPPFLAGS_value=$CPPFLAGS
597ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
598ac_cv_env_CPPFLAGS_value=$CPPFLAGS
599ac_env_CPP_set=${CPP+set}
600ac_env_CPP_value=$CPP
601ac_cv_env_CPP_set=${CPP+set}
602ac_cv_env_CPP_value=$CPP
ccc6cda3 603
f73dda09
JA
604#
605# Report the --help message.
606#
607if test "$ac_init_help" = "long"; then
608 # Omit some internal or obsolete options to make the list less imposing.
609 # This message is too long to be a string in the A/UX 3.1 sh.
610 cat <<EOF
d3a24ed2 611\`configure' configures bash 3.0-alpha to adapt to many kinds of systems.
ccc6cda3 612
f73dda09 613Usage: $0 [OPTION]... [VAR=VALUE]...
ccc6cda3 614
f73dda09
JA
615To assign environment variables (e.g., CC, CFLAGS...), specify them as
616VAR=VALUE. See below for descriptions of some of the useful variables.
617
618Defaults for the options are specified in brackets.
ccc6cda3 619
f73dda09
JA
620Configuration:
621 -h, --help display this help and exit
622 --help=short display options specific to this package
623 --help=recursive display the short help of all the included packages
624 -V, --version display version information and exit
625 -q, --quiet, --silent do not print \`checking...' messages
626 --cache-file=FILE cache test results in FILE [disabled]
627 -C, --config-cache alias for \`--cache-file=config.cache'
628 -n, --no-create do not create output files
629 --srcdir=DIR find the sources in DIR [configure dir or \`..']
ccc6cda3 630
f73dda09 631EOF
ccc6cda3 632
f73dda09
JA
633 cat <<EOF
634Installation directories:
635 --prefix=PREFIX install architecture-independent files in PREFIX
636 [$ac_default_prefix]
637 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
638 [PREFIX]
ccc6cda3 639
f73dda09
JA
640By default, \`make install' will install all the files in
641\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
642an installation prefix other than \`$ac_default_prefix' using \`--prefix',
643for instance \`--prefix=\$HOME'.
ccc6cda3 644
f73dda09 645For better control, use the options below.
ccc6cda3 646
f73dda09
JA
647Fine tuning of the installation directories:
648 --bindir=DIR user executables [EPREFIX/bin]
649 --sbindir=DIR system admin executables [EPREFIX/sbin]
650 --libexecdir=DIR program executables [EPREFIX/libexec]
651 --datadir=DIR read-only architecture-independent data [PREFIX/share]
652 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
653 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
654 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
655 --libdir=DIR object code libraries [EPREFIX/lib]
656 --includedir=DIR C header files [PREFIX/include]
657 --oldincludedir=DIR C header files for non-gcc [/usr/include]
658 --infodir=DIR info documentation [PREFIX/info]
659 --mandir=DIR man documentation [PREFIX/man]
660EOF
661
662 cat <<\EOF
663
664System types:
665 --build=BUILD configure for building on BUILD [guessed]
666 --host=HOST build programs to run on HOST [BUILD]
667EOF
ccc6cda3 668fi
ccc6cda3 669
f73dda09
JA
670if test -n "$ac_init_help"; then
671 case $ac_init_help in
d3a24ed2 672 short | recursive ) echo "Configuration of bash 3.0-alpha:";;
f73dda09
JA
673 esac
674 cat <<\EOF
ccc6cda3 675
f73dda09
JA
676Optional Features:
677 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
678 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
7117c2d2
JA
679 --enable-minimal-config a minimal sh-like configuration
680 --enable-alias enable shell aliases
681 --enable-arith-for-command
682 enable arithmetic for command
683 --enable-array-variables
684 include shell array variables
685 --enable-bang-history turn on csh-style history substitution
686 --enable-brace-expansion
687 include brace expansion
688 --enable-command-timing enable the time reserved word and command timing
689 --enable-cond-command enable the conditional command
d3a24ed2
CR
690 --enable-cond-regexp enable extgended regular expression matching in
691 conditional commands
692 --enable-debugger enable support for bash debugger
7117c2d2
JA
693 --enable-directory-stack
694 enable builtins pushd/popd/dirs
695 --enable-disabled-builtins
696 allow disabled builtins to still be invoked
697 --enable-dparen-arithmetic
698 include ((...)) command
699 --enable-extended-glob include ksh-style extended pattern matching
700 --enable-help-builtin include the help builtin
701 --enable-history turn on command history
702 --enable-job-control enable job control features
d3a24ed2 703 --enable-multibyte enable multibyte characters if OS supports them
7117c2d2
JA
704 --enable-net-redirections
705 enable /dev/tcp/host/port redirection
706 --enable-process-substitution
707 enable process substitution
708 --enable-progcomp enable programmable completion and the complete
709 builtin
710 --enable-prompt-string-decoding
711 turn on escape character decoding in prompts
712 --enable-readline turn on command line editing
713 --enable-restricted enable a restricted shell
714 --enable-select include select command
715 --enable-separate-helpfiles
716 use external files for help builtin documentation
717 --enable-usg-echo-default
718 a synonym for --enable-xpg-echo-default
719 --enable-xpg-echo-default
720 make the echo builtin expand escape sequences by
721 default
722 --enable-mem-scramble scramble memory on calls to malloc and free
723 --enable-profiling allow profiling with gprof
724 --enable-static-link link bash statically, for use as a root shell
f73dda09
JA
725 --disable-largefile omit support for large files
726
727Optional Packages:
728 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
729 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
d3a24ed2 730 --with-lispdir override the default lisp directory
7117c2d2
JA
731 --with-afs if you are running AFS
732 --with-bash-malloc use the Bash version of malloc
733 --with-curses use the curses library instead of the termcap
734 library
735 --with-gnu-malloc synonym for --with-bash-malloc
736 --with-installed-readline
737 use a version of the readline library that is
738 already installed
739 --with-purecov configure to postprocess with pure coverage
740 --with-purify configure to postprocess with purify
f73dda09
JA
741
742Some influential environment variables:
d3a24ed2
CR
743 DEBUGGER_START_FILE
744 location of bash debugger initialization file
f73dda09
JA
745 CC C compiler command
746 CFLAGS C compiler flags
747 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
748 nonstandard directory <lib dir>
749 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
750 headers in a nonstandard directory <include dir>
751 CPP C preprocessor
752
753Use these variables to override the choices made by `configure' or to help
754it to find libraries and programs with nonstandard names/locations.
755
756Report bugs to <bug-bash@gnu.org>.
757EOF
758fi
759
760if test "$ac_init_help" = "recursive"; then
761 # If there are subdirs, report their specific --help.
762 ac_popdir=`pwd`
763 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
764 cd $ac_subdir
765 # A "../" for each directory in /$ac_subdir.
766 ac_dots=`echo $ac_subdir |
767 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
768
769 case $srcdir in
770 .) # No --srcdir option. We are building in place.
771 ac_sub_srcdir=$srcdir ;;
772 [\\/]* | ?:[\\/]* ) # Absolute path.
773 ac_sub_srcdir=$srcdir/$ac_subdir ;;
774 *) # Relative path.
775 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
776 esac
ccc6cda3 777
f73dda09
JA
778 # Check for guested configure; otherwise get Cygnus style configure.
779 if test -f $ac_sub_srcdir/configure.gnu; then
780 echo
781 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
782 elif test -f $ac_sub_srcdir/configure; then
783 echo
784 $SHELL $ac_sub_srcdir/configure --help=recursive
785 elif test -f $ac_sub_srcdir/configure.ac ||
786 test -f $ac_sub_srcdir/configure.in; then
787 echo
788 $ac_configure --help
789 else
790 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
791 fi
792 cd $ac_popdir
793 done
794fi
ccc6cda3 795
f73dda09
JA
796test -n "$ac_init_help" && exit 0
797if $ac_init_version; then
798 cat <<\EOF
d3a24ed2 799bash configure 3.0-alpha
f73dda09 800generated by GNU Autoconf 2.52
ccc6cda3 801
f73dda09
JA
802Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
803Free Software Foundation, Inc.
804This configure script is free software; the Free Software Foundation
805gives unlimited permission to copy, distribute and modify it.
806EOF
807 exit 0
808fi
809exec 5>config.log
810cat >&5 <<EOF
811This file contains any messages produced by compilers while
812running configure, to aid debugging if configure makes a mistake.
ccc6cda3 813
d3a24ed2 814It was created by bash $as_me 3.0-alpha, which was
f73dda09 815generated by GNU Autoconf 2.52. Invocation command line was
ccc6cda3 816
f73dda09 817 $ $0 $@
bb70624e 818
f73dda09
JA
819EOF
820{
821cat <<_ASUNAME
822## ---------- ##
823## Platform. ##
824## ---------- ##
825
826hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
827uname -m = `(uname -m) 2>/dev/null || echo unknown`
828uname -r = `(uname -r) 2>/dev/null || echo unknown`
829uname -s = `(uname -s) 2>/dev/null || echo unknown`
830uname -v = `(uname -v) 2>/dev/null || echo unknown`
831
832/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
833/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
834
835/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
836/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
837/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
838hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
839/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
840/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
841/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
842
843PATH = $PATH
844
845_ASUNAME
846} >&5
847
848cat >&5 <<EOF
849## ------------ ##
850## Core tests. ##
851## ------------ ##
852
853EOF
854
855# Keep a trace of the command line.
856# Strip out --no-create and --no-recursion so they do not pile up.
857# Also quote any args containing shell meta-characters.
858ac_configure_args=
859ac_sep=
860for ac_arg
861do
862 case $ac_arg in
863 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
864 | --no-cr | --no-c) ;;
865 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
866 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
867 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
868 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
869 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
870 ac_sep=" " ;;
871 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
872 ac_sep=" " ;;
873 esac
874 # Get rid of the leading space.
875done
876
877# When interrupted or exit'd, cleanup temporary files, and complete
878# config.log. We remove comments because anyway the quotes in there
879# would cause problems or look ugly.
880trap 'exit_status=$?
881 # Save into config.log some information that might help in debugging.
882 echo >&5
883 echo "## ----------------- ##" >&5
884 echo "## Cache variables. ##" >&5
885 echo "## ----------------- ##" >&5
886 echo >&5
887 # The following way of writing the cache mishandles newlines in values,
888{
889 (set) 2>&1 |
890 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
891 *ac_space=\ *)
892 sed -n \
893 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
894 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
895 ;;
896 *)
897 sed -n \
898 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
899 ;;
900 esac;
901} >&5
902 sed "/^$/d" confdefs.h >conftest.log
903 if test -s conftest.log; then
904 echo >&5
905 echo "## ------------ ##" >&5
906 echo "## confdefs.h. ##" >&5
907 echo "## ------------ ##" >&5
908 echo >&5
909 cat conftest.log >&5
910 fi
911 (echo; echo) >&5
912 test "$ac_signal" != 0 &&
913 echo "$as_me: caught signal $ac_signal" >&5
914 echo "$as_me: exit $exit_status" >&5
915 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
916 exit $exit_status
917 ' 0
918for ac_signal in 1 2 13 15; do
919 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
920done
921ac_signal=0
922
923# confdefs.h avoids OS command line length limits that DEFS can exceed.
924rm -rf conftest* confdefs.h
925# AIX cpp loses on an empty file, so make sure it contains at least a newline.
926echo >confdefs.h
927
928# Let the site file select an alternate cache file if it wants to.
929# Prefer explicitly selected file to automatically selected ones.
930if test -z "$CONFIG_SITE"; then
931 if test "x$prefix" != xNONE; then
932 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
933 else
934 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
935 fi
936fi
937for ac_site_file in $CONFIG_SITE; do
938 if test -r "$ac_site_file"; then
d3a24ed2 939 { echo "$as_me:939: loading site script $ac_site_file" >&5
f73dda09
JA
940echo "$as_me: loading site script $ac_site_file" >&6;}
941 cat "$ac_site_file" >&5
942 . "$ac_site_file"
943 fi
944done
945
946if test -r "$cache_file"; then
947 # Some versions of bash will fail to source /dev/null (special
948 # files actually), so we avoid doing that.
949 if test -f "$cache_file"; then
d3a24ed2 950 { echo "$as_me:950: loading cache $cache_file" >&5
f73dda09
JA
951echo "$as_me: loading cache $cache_file" >&6;}
952 case $cache_file in
953 [\\/]* | ?:[\\/]* ) . $cache_file;;
954 *) . ./$cache_file;;
955 esac
956 fi
957else
d3a24ed2 958 { echo "$as_me:958: creating cache $cache_file" >&5
f73dda09
JA
959echo "$as_me: creating cache $cache_file" >&6;}
960 >$cache_file
961fi
962
963# Check that the precious variables saved in the cache have kept the same
964# value.
965ac_cache_corrupted=false
966for ac_var in `(set) 2>&1 |
967 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
968 eval ac_old_set=\$ac_cv_env_${ac_var}_set
969 eval ac_new_set=\$ac_env_${ac_var}_set
970 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
971 eval ac_new_val="\$ac_env_${ac_var}_value"
972 case $ac_old_set,$ac_new_set in
973 set,)
d3a24ed2 974 { echo "$as_me:974: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
f73dda09
JA
975echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
976 ac_cache_corrupted=: ;;
977 ,set)
d3a24ed2 978 { echo "$as_me:978: error: \`$ac_var' was not set in the previous run" >&5
f73dda09
JA
979echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
980 ac_cache_corrupted=: ;;
981 ,);;
982 *)
983 if test "x$ac_old_val" != "x$ac_new_val"; then
d3a24ed2 984 { echo "$as_me:984: error: \`$ac_var' has changed since the previous run:" >&5
f73dda09 985echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
d3a24ed2 986 { echo "$as_me:986: former value: $ac_old_val" >&5
f73dda09 987echo "$as_me: former value: $ac_old_val" >&2;}
d3a24ed2 988 { echo "$as_me:988: current value: $ac_new_val" >&5
f73dda09
JA
989echo "$as_me: current value: $ac_new_val" >&2;}
990 ac_cache_corrupted=:
991 fi;;
992 esac
993 # Pass precious variables to config.status. It doesn't matter if
994 # we pass some twice (in addition to the command line arguments).
995 if test "$ac_new_set" = set; then
996 case $ac_new_val in
997 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
998 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
999 ac_configure_args="$ac_configure_args '$ac_arg'"
1000 ;;
1001 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1002 ;;
1003 esac
1004 fi
1005done
1006if $ac_cache_corrupted; then
d3a24ed2 1007 { echo "$as_me:1007: error: changes in the environment can compromise the build" >&5
f73dda09 1008echo "$as_me: error: changes in the environment can compromise the build" >&2;}
d3a24ed2 1009 { { echo "$as_me:1009: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
f73dda09
JA
1010echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1011 { (exit 1); exit 1; }; }
1012fi
1013
1014ac_ext=c
1015ac_cpp='$CPP $CPPFLAGS'
1016ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1017ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1018ac_compiler_gnu=$ac_cv_c_compiler_gnu
1019
1020case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1021 *c*,-n*) ECHO_N= ECHO_C='
1022' ECHO_T=' ' ;;
1023 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1024 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
1025esac
1026echo "#! $SHELL" >conftest.sh
1027echo "exit 0" >>conftest.sh
1028chmod +x conftest.sh
d3a24ed2 1029if { (echo "$as_me:1029: PATH=\".;.\"; conftest.sh") >&5
f73dda09
JA
1030 (PATH=".;."; conftest.sh) 2>&5
1031 ac_status=$?
d3a24ed2 1032 echo "$as_me:1032: \$? = $ac_status" >&5
f73dda09
JA
1033 (exit $ac_status); }; then
1034 ac_path_separator=';'
1035else
1036 ac_path_separator=:
1037fi
1038PATH_SEPARATOR="$ac_path_separator"
1039rm -f conftest.sh
1040
1041ac_aux_dir=
1042for ac_dir in ./support $srcdir/./support; do
1043 if test -f $ac_dir/install-sh; then
1044 ac_aux_dir=$ac_dir
1045 ac_install_sh="$ac_aux_dir/install-sh -c"
1046 break
1047 elif test -f $ac_dir/install.sh; then
1048 ac_aux_dir=$ac_dir
1049 ac_install_sh="$ac_aux_dir/install.sh -c"
1050 break
1051 elif test -f $ac_dir/shtool; then
1052 ac_aux_dir=$ac_dir
1053 ac_install_sh="$ac_aux_dir/shtool install -c"
1054 break
1055 fi
1056done
1057if test -z "$ac_aux_dir"; then
d3a24ed2 1058 { { echo "$as_me:1058: error: cannot find install-sh or install.sh in ./support $srcdir/./support" >&5
f73dda09
JA
1059echo "$as_me: error: cannot find install-sh or install.sh in ./support $srcdir/./support" >&2;}
1060 { (exit 1); exit 1; }; }
1061fi
1062ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1063ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1064ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1065
1066ac_config_headers="$ac_config_headers config.h"
1067
d3a24ed2
CR
1068BASHVERS=3.0
1069RELSTATUS=alpha
7117c2d2
JA
1070
1071case "$RELSTATUS" in
1072alp*|bet*|dev*|rc*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
1073*) DEBUG= MALLOC_DEBUG= ;;
1074esac
f73dda09
JA
1075
1076# Make sure we can run config.sub.
1077$ac_config_sub sun4 >/dev/null 2>&1 ||
d3a24ed2 1078 { { echo "$as_me:1078: error: cannot run $ac_config_sub" >&5
f73dda09
JA
1079echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1080 { (exit 1); exit 1; }; }
1081
d3a24ed2 1082echo "$as_me:1082: checking build system type" >&5
f73dda09
JA
1083echo $ECHO_N "checking build system type... $ECHO_C" >&6
1084if test "${ac_cv_build+set}" = set; then
1085 echo $ECHO_N "(cached) $ECHO_C" >&6
1086else
1087 ac_cv_build_alias=$build_alias
1088test -z "$ac_cv_build_alias" &&
1089 ac_cv_build_alias=`$ac_config_guess`
1090test -z "$ac_cv_build_alias" &&
d3a24ed2 1091 { { echo "$as_me:1091: error: cannot guess build type; you must specify one" >&5
f73dda09
JA
1092echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1093 { (exit 1); exit 1; }; }
1094ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
d3a24ed2 1095 { { echo "$as_me:1095: error: $ac_config_sub $ac_cv_build_alias failed." >&5
f73dda09
JA
1096echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1097 { (exit 1); exit 1; }; }
1098
1099fi
d3a24ed2 1100echo "$as_me:1100: result: $ac_cv_build" >&5
f73dda09
JA
1101echo "${ECHO_T}$ac_cv_build" >&6
1102build=$ac_cv_build
1103build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1104build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1105build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1106
d3a24ed2 1107echo "$as_me:1107: checking host system type" >&5
f73dda09
JA
1108echo $ECHO_N "checking host system type... $ECHO_C" >&6
1109if test "${ac_cv_host+set}" = set; then
1110 echo $ECHO_N "(cached) $ECHO_C" >&6
1111else
1112 ac_cv_host_alias=$host_alias
1113test -z "$ac_cv_host_alias" &&
1114 ac_cv_host_alias=$ac_cv_build_alias
1115ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
d3a24ed2 1116 { { echo "$as_me:1116: error: $ac_config_sub $ac_cv_host_alias failed" >&5
f73dda09
JA
1117echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1118 { (exit 1); exit 1; }; }
1119
1120fi
d3a24ed2 1121echo "$as_me:1121: result: $ac_cv_host" >&5
f73dda09
JA
1122echo "${ECHO_T}$ac_cv_host" >&6
1123host=$ac_cv_host
1124host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1125host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1126host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1127
1128opt_bash_malloc=yes
1129opt_purify=no
1130opt_purecov=no
1131opt_afs=no
1132opt_curses=no
1133opt_with_installed_readline=no
1134
1135#htmldir=
1136
1137case "${host_cpu}-${host_os}" in
1138alpha*-*) opt_bash_malloc=no ;; # alpha running osf/1 or linux
1139*[Cc]ray*-*) opt_bash_malloc=no ;; # Crays
1140*-osf1*) opt_bash_malloc=no ;; # other osf/1 machines
1141sparc-svr4*) opt_bash_malloc=no ;; # sparc SVR4, SVR4.2
1142sparc-netbsd*) opt_bash_malloc=no ;; # needs 8-byte alignment
bb70624e
JA
1143mips-irix6*) opt_bash_malloc=no ;; # needs 8-byte alignment
1144m68k-sysv) opt_bash_malloc=no ;; # fixes file descriptor leak in closedir
1145sparc-linux*) opt_bash_malloc=no ;; # sparc running linux; requires ELF
d3a24ed2 1146*-freebsd*-gnu) opt_bash_malloc=no ;; # there's some undetermined problem here
7117c2d2 1147#*-freebsd*) opt_bash_malloc=no ;; # they claim it's better; I disagree
f73dda09 1148*-openbsd*) opt_bash_malloc=no ;; # they claim it needs eight-bit alignment
bb70624e
JA
1149*-aix*) opt_bash_malloc=no ;; # AIX machines
1150*-nextstep*) opt_bash_malloc=no ;; # NeXT machines running NeXTstep
28ef6c31
JA
1151*-macos*) opt_bash_malloc=no ;; # Apple MacOS X
1152*-rhapsody*) opt_bash_malloc=no ;; # Apple Rhapsody (MacOS X)
1153*-darwin*) opt_bash_malloc=no ;; # Apple Darwin (MacOS X)
bb70624e
JA
1154*-dgux*) opt_bash_malloc=no ;; # DG/UX machines
1155*-qnx*) opt_bash_malloc=no ;; # QNX 4.2
1156*-machten4) opt_bash_malloc=no ;; # MachTen 4.x
1157*-bsdi2.1|*-bsdi3.?) opt_bash_malloc=no ; : ${CC:=shlicc2} ;; # for loadable builtins
1158*-beos*) opt_bash_malloc=no ;; # they say it's suitable
28ef6c31
JA
1159*-cygwin*) opt_bash_malloc=no ;; # Cygnus's CYGWIN environment
1160*-opennt*|*-interix*) opt_bash_malloc=no ;; # Interix, now owned by Microsoft
ccc6cda3
JA
1161esac
1162
7117c2d2
JA
1163# memory scrambling on free()
1164case "${host_os}" in
1165sco3.2v5*|sco3.2v4*) opt_memscramble=no ;;
1166*) opt_memscramble=yes ;;
1167esac
1168
d3a24ed2
CR
1169# Check whether --with-lispdir or --without-lispdir was given.
1170if test "${with_lispdir+set}" = set; then
1171 withval="$with_lispdir"
1172 lispdir="$withval"
1173 echo "$as_me:1173: checking where .elc files should go" >&5
1174echo $ECHO_N "checking where .elc files should go... $ECHO_C" >&6
1175 echo "$as_me:1175: result: $lispdir" >&5
1176echo "${ECHO_T}$lispdir" >&6
1177else
1178
1179 # If set to t, that means we are running in a shell under Emacs.
1180 # If you have an Emacs named "t", then use the full path.
1181 test x"$EMACS" = xt && EMACS=
1182 for ac_prog in emacs xemacs
1183do
1184 # Extract the first word of "$ac_prog", so it can be a program name with args.
1185set dummy $ac_prog; ac_word=$2
1186echo "$as_me:1186: checking for $ac_word" >&5
1187echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1188if test "${ac_cv_prog_EMACS+set}" = set; then
1189 echo $ECHO_N "(cached) $ECHO_C" >&6
1190else
1191 if test -n "$EMACS"; then
1192 ac_cv_prog_EMACS="$EMACS" # Let the user override the test.
1193else
1194 ac_save_IFS=$IFS; IFS=$ac_path_separator
1195ac_dummy="$PATH"
1196for ac_dir in $ac_dummy; do
1197 IFS=$ac_save_IFS
1198 test -z "$ac_dir" && ac_dir=.
1199 $as_executable_p "$ac_dir/$ac_word" || continue
1200ac_cv_prog_EMACS="$ac_prog"
1201echo "$as_me:1201: found $ac_dir/$ac_word" >&5
1202break
1203done
1204
1205fi
1206fi
1207EMACS=$ac_cv_prog_EMACS
1208if test -n "$EMACS"; then
1209 echo "$as_me:1209: result: $EMACS" >&5
1210echo "${ECHO_T}$EMACS" >&6
1211else
1212 echo "$as_me:1212: result: no" >&5
1213echo "${ECHO_T}no" >&6
1214fi
1215
1216 test -n "$EMACS" && break
1217done
1218test -n "$EMACS" || EMACS="no"
1219
1220 if test $EMACS != "no"; then
1221 if test x${lispdir+set} != xset; then
1222 echo "$as_me:1222: checking where .elc files should go" >&5
1223echo $ECHO_N "checking where .elc files should go... $ECHO_C" >&6
1224if test "${am_cv_lispdir+set}" = set; then
1225 echo $ECHO_N "(cached) $ECHO_C" >&6
1226else
1227 am_cv_lispdir=`$EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' | sed -n -e 's,/$,,' -e '/.*\/lib\/\(x\?emacs\/site-lisp\)$/{s,,${libdir}/\1,;p;q;}' -e '/.*\/share\/\(x\?emacs\/site-lisp\)$/{s,,${datadir}/\1,;p;q;}'`
1228 if test -z "$am_cv_lispdir"; then
1229 am_cv_lispdir='${datadir}/emacs/site-lisp'
1230 fi
1231
1232fi
1233echo "$as_me:1233: result: $am_cv_lispdir" >&5
1234echo "${ECHO_T}$am_cv_lispdir" >&6
1235 lispdir="$am_cv_lispdir"
1236 fi
1237 fi
1238
1239fi;
1240
d166f048
JA
1241# Check whether --with-afs or --without-afs was given.
1242if test "${with_afs+set}" = set; then
1243 withval="$with_afs"
1244 opt_afs=$withval
f73dda09 1245fi;
d166f048 1246
bb70624e
JA
1247# Check whether --with-bash-malloc or --without-bash-malloc was given.
1248if test "${with_bash_malloc+set}" = set; then
1249 withval="$with_bash_malloc"
1250 opt_bash_malloc=$withval
f73dda09 1251fi;
bb70624e 1252
d166f048
JA
1253# Check whether --with-curses or --without-curses was given.
1254if test "${with_curses+set}" = set; then
1255 withval="$with_curses"
1256 opt_curses=$withval
f73dda09 1257fi;
ccc6cda3 1258
d166f048
JA
1259# Check whether --with-gnu-malloc or --without-gnu-malloc was given.
1260if test "${with_gnu_malloc+set}" = set; then
1261 withval="$with_gnu_malloc"
bb70624e 1262 opt_bash_malloc=$withval
f73dda09 1263fi;
d166f048 1264
b72432fd
JA
1265# Check whether --with-installed-readline or --without-installed-readline was given.
1266if test "${with_installed_readline+set}" = set; then
1267 withval="$with_installed_readline"
1268 opt_with_installed_readline=$withval
f73dda09 1269fi;
b72432fd 1270
d166f048
JA
1271# Check whether --with-purecov or --without-purecov was given.
1272if test "${with_purecov+set}" = set; then
1273 withval="$with_purecov"
1274 opt_purecov=$withval
f73dda09 1275fi;
d166f048 1276
ccc6cda3
JA
1277# Check whether --with-purify or --without-purify was given.
1278if test "${with_purify+set}" = set; then
1279 withval="$with_purify"
1280 opt_purify=$withval
f73dda09 1281fi;
ccc6cda3 1282
f73dda09 1283if test "$opt_bash_malloc" = yes; then
d166f048
JA
1284 MALLOC_TARGET=malloc
1285 MALLOC_SRC=malloc.c
f73dda09
JA
1286
1287 MALLOC_LIB='-lmalloc'
1288 MALLOC_LIBRARY='$(ALLOC_LIBDIR)/libmalloc.a'
1289 MALLOC_LDFLAGS='-L$(ALLOC_LIBDIR)'
1290 MALLOC_DEP='$(MALLOC_LIBRARY)'
1291
1292 cat >>confdefs.h <<\EOF
bb70624e
JA
1293#define USING_BASH_MALLOC 1
1294EOF
1295
ccc6cda3 1296else
f73dda09
JA
1297 MALLOC_LIB=
1298 MALLOC_LIBRARY=
1299 MALLOC_LDFLAGS=
1300 MALLOC_DEP=
ccc6cda3
JA
1301fi
1302
1303if test "$opt_purify" = yes; then
d166f048 1304 PURIFY="purify "
7117c2d2
JA
1305 cat >>confdefs.h <<\EOF
1306#define DISABLE_MALLOC_WRAPPERS 1
1307EOF
1308
ccc6cda3
JA
1309else
1310 PURIFY=
1311fi
1312
d166f048
JA
1313if test "$opt_purecov" = yes; then
1314 PURIFY="${PURIFY}purecov"
1315fi
1316
ccc6cda3 1317if test "$opt_afs" = yes; then
f73dda09 1318 cat >>confdefs.h <<\EOF
ccc6cda3
JA
1319#define AFS 1
1320EOF
1321
1322fi
1323
d166f048
JA
1324if test "$opt_curses" = yes; then
1325 prefer_curses=yes
1326fi
1327
d3a24ed2
CR
1328if test -z "${DEBUGGER_START_FILE}"; then
1329 DEBUGGER_START_FILE=${ac_default_prefix}/lib/bashdb/bashdb-main.inc
1330fi
1331
ccc6cda3
JA
1332opt_minimal_config=no
1333
1334opt_job_control=yes
1335opt_alias=yes
1336opt_readline=yes
1337opt_history=yes
1338opt_bang_history=yes
1339opt_dirstack=yes
1340opt_restricted=yes
1341opt_process_subst=yes
1342opt_prompt_decoding=yes
1343opt_select=yes
1344opt_help=yes
1345opt_array_variables=yes
1346opt_dparen_arith=yes
cce855bc 1347opt_extended_glob=yes
ccc6cda3
JA
1348opt_brace_expansion=yes
1349opt_disabled_builtins=no
1350opt_command_timing=yes
bb70624e 1351opt_xpg_echo=no
cce855bc 1352opt_cond_command=yes
d3a24ed2 1353opt_cond_regexp=yes
bb70624e
JA
1354opt_arith_for_command=yes
1355opt_net_redirs=yes
1356opt_progcomp=yes
7117c2d2 1357opt_separate_help=no
d3a24ed2
CR
1358opt_multibyte=yes
1359opt_debugger=yes
cce855bc
JA
1360
1361opt_static_link=no
1362opt_profiling=no
ccc6cda3
JA
1363
1364# Check whether --enable-minimal-config or --disable-minimal-config was given.
1365if test "${enable_minimal_config+set}" = set; then
1366 enableval="$enable_minimal_config"
1367 opt_minimal_config=$enableval
f73dda09 1368fi;
ccc6cda3
JA
1369
1370if test $opt_minimal_config = yes; then
1371 opt_job_control=no opt_alias=no opt_readline=no
1372 opt_history=no opt_bang_history=no opt_dirstack=no
1373 opt_restricted=no opt_process_subst=no opt_prompt_decoding=no
1374 opt_select=no opt_help=no opt_array_variables=no opt_dparen_arith=no
1375 opt_brace_expansion=no opt_disabled_builtins=no opt_command_timing=no
bb70624e 1376 opt_extended_glob=no opt_cond_command=no opt_arith_for_command=no
7117c2d2 1377 opt_net_redirs=no opt_progcomp=no opt_separate_help=no
d3a24ed2 1378 opt_multibyte=yes opt_cond_regexp=no
ccc6cda3
JA
1379fi
1380
ccc6cda3
JA
1381# Check whether --enable-alias or --disable-alias was given.
1382if test "${enable_alias+set}" = set; then
1383 enableval="$enable_alias"
1384 opt_alias=$enableval
f73dda09 1385fi;
bb70624e
JA
1386# Check whether --enable-arith-for-command or --disable-arith-for-command was given.
1387if test "${enable_arith_for_command+set}" = set; then
1388 enableval="$enable_arith_for_command"
1389 opt_arith_for_command=$enableval
f73dda09 1390fi;
d166f048
JA
1391# Check whether --enable-array-variables or --disable-array-variables was given.
1392if test "${enable_array_variables+set}" = set; then
1393 enableval="$enable_array_variables"
1394 opt_array_variables=$enableval
f73dda09 1395fi;
ccc6cda3
JA
1396# Check whether --enable-bang-history or --disable-bang-history was given.
1397if test "${enable_bang_history+set}" = set; then
1398 enableval="$enable_bang_history"
1399 opt_bang_history=$enableval
f73dda09 1400fi;
d166f048
JA
1401# Check whether --enable-brace-expansion or --disable-brace-expansion was given.
1402if test "${enable_brace_expansion+set}" = set; then
1403 enableval="$enable_brace_expansion"
1404 opt_brace_expansion=$enableval
f73dda09 1405fi;
d166f048
JA
1406# Check whether --enable-command-timing or --disable-command-timing was given.
1407if test "${enable_command_timing+set}" = set; then
1408 enableval="$enable_command_timing"
1409 opt_command_timing=$enableval
f73dda09 1410fi;
cce855bc
JA
1411# Check whether --enable-cond-command or --disable-cond-command was given.
1412if test "${enable_cond_command+set}" = set; then
1413 enableval="$enable_cond_command"
1414 opt_cond_command=$enableval
f73dda09 1415fi;
d3a24ed2
CR
1416# Check whether --enable-cond-regexp or --disable-cond-regexp was given.
1417if test "${enable_cond_regexp+set}" = set; then
1418 enableval="$enable_cond_regexp"
1419 opt_cond_regexp=$enableval
1420fi;
1421# Check whether --enable-debugger or --disable-debugger was given.
1422if test "${enable_debugger+set}" = set; then
1423 enableval="$enable_debugger"
1424 opt_debugger=$enableval
1425fi;
d166f048
JA
1426# Check whether --enable-directory-stack or --disable-directory-stack was given.
1427if test "${enable_directory_stack+set}" = set; then
1428 enableval="$enable_directory_stack"
1429 opt_dirstack=$enableval
f73dda09 1430fi;
d166f048
JA
1431# Check whether --enable-disabled-builtins or --disable-disabled-builtins was given.
1432if test "${enable_disabled_builtins+set}" = set; then
1433 enableval="$enable_disabled_builtins"
1434 opt_disabled_builtins=$enableval
f73dda09 1435fi;
d166f048
JA
1436# Check whether --enable-dparen-arithmetic or --disable-dparen-arithmetic was given.
1437if test "${enable_dparen_arithmetic+set}" = set; then
1438 enableval="$enable_dparen_arithmetic"
1439 opt_dparen_arith=$enableval
f73dda09 1440fi;
cce855bc
JA
1441# Check whether --enable-extended-glob or --disable-extended-glob was given.
1442if test "${enable_extended_glob+set}" = set; then
1443 enableval="$enable_extended_glob"
1444 opt_extended_glob=$enableval
f73dda09 1445fi;
ccc6cda3
JA
1446# Check whether --enable-help-builtin or --disable-help-builtin was given.
1447if test "${enable_help_builtin+set}" = set; then
1448 enableval="$enable_help_builtin"
1449 opt_help=$enableval
f73dda09 1450fi;
d166f048
JA
1451# Check whether --enable-history or --disable-history was given.
1452if test "${enable_history+set}" = set; then
1453 enableval="$enable_history"
1454 opt_history=$enableval
f73dda09 1455fi;
d166f048
JA
1456# Check whether --enable-job-control or --disable-job-control was given.
1457if test "${enable_job_control+set}" = set; then
1458 enableval="$enable_job_control"
1459 opt_job_control=$enableval
f73dda09 1460fi;
d3a24ed2
CR
1461# Check whether --enable-multibyte or --disable-multibyte was given.
1462if test "${enable_multibyte+set}" = set; then
1463 enableval="$enable_multibyte"
1464 opt_multibyte=$enableval
1465fi;
bb70624e
JA
1466# Check whether --enable-net-redirections or --disable-net-redirections was given.
1467if test "${enable_net_redirections+set}" = set; then
1468 enableval="$enable_net_redirections"
1469 opt_net_redirs=$enableval
f73dda09 1470fi;
d166f048
JA
1471# Check whether --enable-process-substitution or --disable-process-substitution was given.
1472if test "${enable_process_substitution+set}" = set; then
1473 enableval="$enable_process_substitution"
1474 opt_process_subst=$enableval
f73dda09 1475fi;
bb70624e
JA
1476# Check whether --enable-progcomp or --disable-progcomp was given.
1477if test "${enable_progcomp+set}" = set; then
1478 enableval="$enable_progcomp"
1479 opt_progcomp=$enableval
f73dda09 1480fi;
d166f048
JA
1481# Check whether --enable-prompt-string-decoding or --disable-prompt-string-decoding was given.
1482if test "${enable_prompt_string_decoding+set}" = set; then
1483 enableval="$enable_prompt_string_decoding"
1484 opt_prompt_decoding=$enableval
f73dda09 1485fi;
d166f048
JA
1486# Check whether --enable-readline or --disable-readline was given.
1487if test "${enable_readline+set}" = set; then
1488 enableval="$enable_readline"
1489 opt_readline=$enableval
f73dda09 1490fi;
d166f048
JA
1491# Check whether --enable-restricted or --disable-restricted was given.
1492if test "${enable_restricted+set}" = set; then
1493 enableval="$enable_restricted"
1494 opt_restricted=$enableval
f73dda09 1495fi;
d166f048
JA
1496# Check whether --enable-select or --disable-select was given.
1497if test "${enable_select+set}" = set; then
1498 enableval="$enable_select"
1499 opt_select=$enableval
f73dda09 1500fi;
7117c2d2
JA
1501# Check whether --enable-separate-helpfiles or --disable-separate-helpfiles was given.
1502if test "${enable_separate_helpfiles+set}" = set; then
1503 enableval="$enable_separate_helpfiles"
1504 opt_separate_help=$enableval
1505fi;
ccc6cda3
JA
1506# Check whether --enable-usg-echo-default or --disable-usg-echo-default was given.
1507if test "${enable_usg_echo_default+set}" = set; then
1508 enableval="$enable_usg_echo_default"
bb70624e 1509 opt_xpg_echo=$enableval
f73dda09 1510fi;
bb70624e
JA
1511# Check whether --enable-xpg-echo-default or --disable-xpg-echo-default was given.
1512if test "${enable_xpg_echo_default+set}" = set; then
1513 enableval="$enable_xpg_echo_default"
1514 opt_xpg_echo=$enableval
f73dda09 1515fi;
ccc6cda3 1516
7117c2d2
JA
1517# Check whether --enable-mem-scramble or --disable-mem-scramble was given.
1518if test "${enable_mem_scramble+set}" = set; then
1519 enableval="$enable_mem_scramble"
1520 opt_memscramble=$enableval
1521fi;
cce855bc
JA
1522# Check whether --enable-profiling or --disable-profiling was given.
1523if test "${enable_profiling+set}" = set; then
1524 enableval="$enable_profiling"
1525 opt_profiling=$enableval
f73dda09 1526fi;
cce855bc
JA
1527# Check whether --enable-static-link or --disable-static-link was given.
1528if test "${enable_static_link+set}" = set; then
1529 enableval="$enable_static_link"
1530 opt_static_link=$enableval
f73dda09 1531fi;
b72432fd 1532
ccc6cda3 1533if test $opt_alias = yes; then
f73dda09 1534cat >>confdefs.h <<\EOF
ccc6cda3
JA
1535#define ALIAS 1
1536EOF
1537
ccc6cda3
JA
1538fi
1539if test $opt_dirstack = yes; then
f73dda09 1540cat >>confdefs.h <<\EOF
ccc6cda3
JA
1541#define PUSHD_AND_POPD 1
1542EOF
1543
1544fi
1545if test $opt_restricted = yes; then
f73dda09 1546cat >>confdefs.h <<\EOF
ccc6cda3
JA
1547#define RESTRICTED_SHELL 1
1548EOF
1549
1550fi
1551if test $opt_process_subst = yes; then
f73dda09 1552cat >>confdefs.h <<\EOF
ccc6cda3
JA
1553#define PROCESS_SUBSTITUTION 1
1554EOF
1555
1556fi
1557if test $opt_prompt_decoding = yes; then
f73dda09 1558cat >>confdefs.h <<\EOF
ccc6cda3
JA
1559#define PROMPT_STRING_DECODE 1
1560EOF
1561
1562fi
1563if test $opt_select = yes; then
f73dda09 1564cat >>confdefs.h <<\EOF
ccc6cda3
JA
1565#define SELECT_COMMAND 1
1566EOF
1567
1568fi
1569if test $opt_help = yes; then
f73dda09 1570cat >>confdefs.h <<\EOF
ccc6cda3
JA
1571#define HELP_BUILTIN 1
1572EOF
1573
1574fi
1575if test $opt_array_variables = yes; then
f73dda09 1576cat >>confdefs.h <<\EOF
ccc6cda3
JA
1577#define ARRAY_VARS 1
1578EOF
1579
1580fi
1581if test $opt_dparen_arith = yes; then
f73dda09 1582cat >>confdefs.h <<\EOF
ccc6cda3
JA
1583#define DPAREN_ARITHMETIC 1
1584EOF
1585
1586fi
1587if test $opt_brace_expansion = yes; then
f73dda09 1588cat >>confdefs.h <<\EOF
ccc6cda3
JA
1589#define BRACE_EXPANSION 1
1590EOF
1591
1592fi
1593if test $opt_disabled_builtins = yes; then
f73dda09 1594cat >>confdefs.h <<\EOF
ccc6cda3
JA
1595#define DISABLED_BUILTINS 1
1596EOF
1597
1598fi
1599if test $opt_command_timing = yes; then
f73dda09 1600cat >>confdefs.h <<\EOF
ccc6cda3
JA
1601#define COMMAND_TIMING 1
1602EOF
1603
1604fi
bb70624e 1605if test $opt_xpg_echo = yes ; then
f73dda09 1606cat >>confdefs.h <<\EOF
bb70624e 1607#define DEFAULT_ECHO_TO_XPG 1
ccc6cda3
JA
1608EOF
1609
cce855bc
JA
1610fi
1611if test $opt_extended_glob = yes ; then
f73dda09 1612cat >>confdefs.h <<\EOF
cce855bc
JA
1613#define EXTENDED_GLOB 1
1614EOF
1615
1616fi
1617if test $opt_cond_command = yes ; then
f73dda09 1618cat >>confdefs.h <<\EOF
cce855bc
JA
1619#define COND_COMMAND 1
1620EOF
1621
d3a24ed2
CR
1622fi
1623if test $opt_cond_regexp = yes ; then
1624cat >>confdefs.h <<\EOF
1625#define COND_REGEXP 1
1626EOF
1627
bb70624e
JA
1628fi
1629if test $opt_arith_for_command = yes; then
f73dda09 1630cat >>confdefs.h <<\EOF
bb70624e
JA
1631#define ARITH_FOR_COMMAND 1
1632EOF
1633
1634fi
1635if test $opt_net_redirs = yes; then
f73dda09 1636cat >>confdefs.h <<\EOF
bb70624e
JA
1637#define NETWORK_REDIRECTIONS 1
1638EOF
1639
1640fi
1641if test $opt_progcomp = yes; then
f73dda09 1642cat >>confdefs.h <<\EOF
bb70624e
JA
1643#define PROGRAMMABLE_COMPLETION 1
1644EOF
1645
d3a24ed2
CR
1646fi
1647if test $opt_multibyte = no; then
1648cat >>confdefs.h <<\EOF
1649#define NO_MULTIBYTE_SUPPORT 1
1650EOF
1651
1652fi
1653if test $opt_debugger = yes; then
1654cat >>confdefs.h <<\EOF
1655#define DEBUGGER 1
1656EOF
1657
ccc6cda3
JA
1658fi
1659
7117c2d2
JA
1660if test $opt_memscramble = yes; then
1661cat >>confdefs.h <<\EOF
1662#define MEMSCRAMBLE 1
1663EOF
1664
1665fi
1666
d166f048
JA
1667if test "$opt_minimal_config" = yes; then
1668 TESTSCRIPT=run-minimal
1669else
1670 TESTSCRIPT=run-all
1671fi
1672
7117c2d2
JA
1673HELPDIR= HELPDIRDEFINE= HELPINSTALL=
1674if test "$opt_separate_help" != no; then
1675 if test "$opt_separate_help" = "yes" ; then
1676 HELPDIR='${datadir}/bash'
1677 else
1678 HELPDIR=$opt_separate_help
1679 fi
1680 HELPDIRDEFINE='-H ${HELPDIR}'
1681 HELPINSTALL='install-help'
1682fi
1683
f73dda09 1684echo ""
7117c2d2 1685echo "Beginning configuration for bash-$BASHVERS-$RELSTATUS for ${host_cpu}-${host_vendor}-${host_os}"
f73dda09 1686echo ""
d166f048 1687
f73dda09
JA
1688ac_ext=c
1689ac_cpp='$CPP $CPPFLAGS'
1690ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1691ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1692ac_compiler_gnu=$ac_cv_c_compiler_gnu
1693if test -n "$ac_tool_prefix"; then
1694 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1695set dummy ${ac_tool_prefix}gcc; ac_word=$2
d3a24ed2 1696echo "$as_me:1696: checking for $ac_word" >&5
f73dda09
JA
1697echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1698if test "${ac_cv_prog_CC+set}" = set; then
1699 echo $ECHO_N "(cached) $ECHO_C" >&6
1700else
1701 if test -n "$CC"; then
1702 ac_cv_prog_CC="$CC" # Let the user override the test.
1703else
1704 ac_save_IFS=$IFS; IFS=$ac_path_separator
1705ac_dummy="$PATH"
1706for ac_dir in $ac_dummy; do
1707 IFS=$ac_save_IFS
1708 test -z "$ac_dir" && ac_dir=.
1709 $as_executable_p "$ac_dir/$ac_word" || continue
1710ac_cv_prog_CC="${ac_tool_prefix}gcc"
d3a24ed2 1711echo "$as_me:1711: found $ac_dir/$ac_word" >&5
f73dda09
JA
1712break
1713done
ccc6cda3 1714
f73dda09
JA
1715fi
1716fi
1717CC=$ac_cv_prog_CC
1718if test -n "$CC"; then
d3a24ed2 1719 echo "$as_me:1719: result: $CC" >&5
f73dda09
JA
1720echo "${ECHO_T}$CC" >&6
1721else
d3a24ed2 1722 echo "$as_me:1722: result: no" >&5
f73dda09
JA
1723echo "${ECHO_T}no" >&6
1724fi
ccc6cda3 1725
f73dda09
JA
1726fi
1727if test -z "$ac_cv_prog_CC"; then
1728 ac_ct_CC=$CC
1729 # Extract the first word of "gcc", so it can be a program name with args.
1730set dummy gcc; ac_word=$2
d3a24ed2 1731echo "$as_me:1731: checking for $ac_word" >&5
f73dda09
JA
1732echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1733if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1734 echo $ECHO_N "(cached) $ECHO_C" >&6
1735else
1736 if test -n "$ac_ct_CC"; then
1737 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1738else
1739 ac_save_IFS=$IFS; IFS=$ac_path_separator
1740ac_dummy="$PATH"
1741for ac_dir in $ac_dummy; do
1742 IFS=$ac_save_IFS
1743 test -z "$ac_dir" && ac_dir=.
1744 $as_executable_p "$ac_dir/$ac_word" || continue
1745ac_cv_prog_ac_ct_CC="gcc"
d3a24ed2 1746echo "$as_me:1746: found $ac_dir/$ac_word" >&5
f73dda09
JA
1747break
1748done
ccc6cda3 1749
f73dda09
JA
1750fi
1751fi
1752ac_ct_CC=$ac_cv_prog_ac_ct_CC
1753if test -n "$ac_ct_CC"; then
d3a24ed2 1754 echo "$as_me:1754: result: $ac_ct_CC" >&5
f73dda09
JA
1755echo "${ECHO_T}$ac_ct_CC" >&6
1756else
d3a24ed2 1757 echo "$as_me:1757: result: no" >&5
f73dda09
JA
1758echo "${ECHO_T}no" >&6
1759fi
ccc6cda3 1760
f73dda09
JA
1761 CC=$ac_ct_CC
1762else
1763 CC="$ac_cv_prog_CC"
1764fi
bb70624e 1765
f73dda09
JA
1766if test -z "$CC"; then
1767 if test -n "$ac_tool_prefix"; then
1768 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1769set dummy ${ac_tool_prefix}cc; ac_word=$2
d3a24ed2 1770echo "$as_me:1770: checking for $ac_word" >&5
f73dda09
JA
1771echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1772if test "${ac_cv_prog_CC+set}" = set; then
1773 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3
JA
1774else
1775 if test -n "$CC"; then
1776 ac_cv_prog_CC="$CC" # Let the user override the test.
1777else
f73dda09
JA
1778 ac_save_IFS=$IFS; IFS=$ac_path_separator
1779ac_dummy="$PATH"
1780for ac_dir in $ac_dummy; do
1781 IFS=$ac_save_IFS
1782 test -z "$ac_dir" && ac_dir=.
1783 $as_executable_p "$ac_dir/$ac_word" || continue
1784ac_cv_prog_CC="${ac_tool_prefix}cc"
d3a24ed2 1785echo "$as_me:1785: found $ac_dir/$ac_word" >&5
f73dda09
JA
1786break
1787done
1788
ccc6cda3
JA
1789fi
1790fi
f73dda09 1791CC=$ac_cv_prog_CC
ccc6cda3 1792if test -n "$CC"; then
d3a24ed2 1793 echo "$as_me:1793: result: $CC" >&5
f73dda09
JA
1794echo "${ECHO_T}$CC" >&6
1795else
d3a24ed2 1796 echo "$as_me:1796: result: no" >&5
f73dda09
JA
1797echo "${ECHO_T}no" >&6
1798fi
1799
1800fi
1801if test -z "$ac_cv_prog_CC"; then
1802 ac_ct_CC=$CC
1803 # Extract the first word of "cc", so it can be a program name with args.
1804set dummy cc; ac_word=$2
d3a24ed2 1805echo "$as_me:1805: checking for $ac_word" >&5
f73dda09
JA
1806echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1807if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1808 echo $ECHO_N "(cached) $ECHO_C" >&6
1809else
1810 if test -n "$ac_ct_CC"; then
1811 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1812else
1813 ac_save_IFS=$IFS; IFS=$ac_path_separator
1814ac_dummy="$PATH"
1815for ac_dir in $ac_dummy; do
1816 IFS=$ac_save_IFS
1817 test -z "$ac_dir" && ac_dir=.
1818 $as_executable_p "$ac_dir/$ac_word" || continue
1819ac_cv_prog_ac_ct_CC="cc"
d3a24ed2 1820echo "$as_me:1820: found $ac_dir/$ac_word" >&5
f73dda09
JA
1821break
1822done
1823
1824fi
1825fi
1826ac_ct_CC=$ac_cv_prog_ac_ct_CC
1827if test -n "$ac_ct_CC"; then
d3a24ed2 1828 echo "$as_me:1828: result: $ac_ct_CC" >&5
f73dda09
JA
1829echo "${ECHO_T}$ac_ct_CC" >&6
1830else
d3a24ed2 1831 echo "$as_me:1831: result: no" >&5
f73dda09
JA
1832echo "${ECHO_T}no" >&6
1833fi
1834
1835 CC=$ac_ct_CC
ccc6cda3 1836else
f73dda09 1837 CC="$ac_cv_prog_CC"
ccc6cda3
JA
1838fi
1839
f73dda09 1840fi
ccc6cda3
JA
1841if test -z "$CC"; then
1842 # Extract the first word of "cc", so it can be a program name with args.
1843set dummy cc; ac_word=$2
d3a24ed2 1844echo "$as_me:1844: checking for $ac_word" >&5
f73dda09
JA
1845echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1846if test "${ac_cv_prog_CC+set}" = set; then
1847 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3
JA
1848else
1849 if test -n "$CC"; then
1850 ac_cv_prog_CC="$CC" # Let the user override the test.
1851else
ccc6cda3 1852 ac_prog_rejected=no
f73dda09
JA
1853 ac_save_IFS=$IFS; IFS=$ac_path_separator
1854ac_dummy="$PATH"
1855for ac_dir in $ac_dummy; do
1856 IFS=$ac_save_IFS
1857 test -z "$ac_dir" && ac_dir=.
1858 $as_executable_p "$ac_dir/$ac_word" || continue
1859if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1860 ac_prog_rejected=yes
1861 continue
1862fi
1863ac_cv_prog_CC="cc"
d3a24ed2 1864echo "$as_me:1864: found $ac_dir/$ac_word" >&5
f73dda09
JA
1865break
1866done
1867
ccc6cda3
JA
1868if test $ac_prog_rejected = yes; then
1869 # We found a bogon in the path, so make sure we never use it.
1870 set dummy $ac_cv_prog_CC
1871 shift
f73dda09 1872 if test $# != 0; then
ccc6cda3
JA
1873 # We chose a different compiler from the bogus one.
1874 # However, it has the same basename, so the bogon will be chosen
1875 # first if we set CC to just the basename; use the full file name.
1876 shift
f73dda09 1877 set dummy "$ac_dir/$ac_word" ${1+"$@"}
ccc6cda3
JA
1878 shift
1879 ac_cv_prog_CC="$@"
1880 fi
1881fi
1882fi
1883fi
f73dda09 1884CC=$ac_cv_prog_CC
ccc6cda3 1885if test -n "$CC"; then
d3a24ed2 1886 echo "$as_me:1886: result: $CC" >&5
f73dda09 1887echo "${ECHO_T}$CC" >&6
ccc6cda3 1888else
d3a24ed2 1889 echo "$as_me:1889: result: no" >&5
f73dda09 1890echo "${ECHO_T}no" >&6
ccc6cda3
JA
1891fi
1892
f73dda09
JA
1893fi
1894if test -z "$CC"; then
1895 if test -n "$ac_tool_prefix"; then
1896 for ac_prog in cl
1897 do
1898 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1899set dummy $ac_tool_prefix$ac_prog; ac_word=$2
d3a24ed2 1900echo "$as_me:1900: checking for $ac_word" >&5
f73dda09
JA
1901echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1902if test "${ac_cv_prog_CC+set}" = set; then
1903 echo $ECHO_N "(cached) $ECHO_C" >&6
bb70624e
JA
1904else
1905 if test -n "$CC"; then
1906 ac_cv_prog_CC="$CC" # Let the user override the test.
1907else
f73dda09
JA
1908 ac_save_IFS=$IFS; IFS=$ac_path_separator
1909ac_dummy="$PATH"
1910for ac_dir in $ac_dummy; do
1911 IFS=$ac_save_IFS
1912 test -z "$ac_dir" && ac_dir=.
1913 $as_executable_p "$ac_dir/$ac_word" || continue
1914ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
d3a24ed2 1915echo "$as_me:1915: found $ac_dir/$ac_word" >&5
f73dda09
JA
1916break
1917done
1918
bb70624e
JA
1919fi
1920fi
f73dda09 1921CC=$ac_cv_prog_CC
bb70624e 1922if test -n "$CC"; then
d3a24ed2 1923 echo "$as_me:1923: result: $CC" >&5
f73dda09 1924echo "${ECHO_T}$CC" >&6
bb70624e 1925else
d3a24ed2 1926 echo "$as_me:1926: result: no" >&5
f73dda09 1927echo "${ECHO_T}no" >&6
bb70624e 1928fi
ccc6cda3 1929
f73dda09
JA
1930 test -n "$CC" && break
1931 done
ccc6cda3 1932fi
f73dda09
JA
1933if test -z "$CC"; then
1934 ac_ct_CC=$CC
1935 for ac_prog in cl
1936do
1937 # Extract the first word of "$ac_prog", so it can be a program name with args.
1938set dummy $ac_prog; ac_word=$2
d3a24ed2 1939echo "$as_me:1939: checking for $ac_word" >&5
f73dda09
JA
1940echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1941if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1942 echo $ECHO_N "(cached) $ECHO_C" >&6
1943else
1944 if test -n "$ac_ct_CC"; then
1945 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1946else
1947 ac_save_IFS=$IFS; IFS=$ac_path_separator
1948ac_dummy="$PATH"
1949for ac_dir in $ac_dummy; do
1950 IFS=$ac_save_IFS
1951 test -z "$ac_dir" && ac_dir=.
1952 $as_executable_p "$ac_dir/$ac_word" || continue
1953ac_cv_prog_ac_ct_CC="$ac_prog"
d3a24ed2 1954echo "$as_me:1954: found $ac_dir/$ac_word" >&5
f73dda09
JA
1955break
1956done
ccc6cda3 1957
ccc6cda3 1958fi
ccc6cda3 1959fi
f73dda09
JA
1960ac_ct_CC=$ac_cv_prog_ac_ct_CC
1961if test -n "$ac_ct_CC"; then
d3a24ed2 1962 echo "$as_me:1962: result: $ac_ct_CC" >&5
f73dda09
JA
1963echo "${ECHO_T}$ac_ct_CC" >&6
1964else
d3a24ed2 1965 echo "$as_me:1965: result: no" >&5
f73dda09 1966echo "${ECHO_T}no" >&6
ccc6cda3
JA
1967fi
1968
f73dda09
JA
1969 test -n "$ac_ct_CC" && break
1970done
ccc6cda3 1971
f73dda09 1972 CC=$ac_ct_CC
bb70624e
JA
1973fi
1974
f73dda09
JA
1975fi
1976
d3a24ed2 1977test -z "$CC" && { { echo "$as_me:1977: error: no acceptable cc found in \$PATH" >&5
f73dda09
JA
1978echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1979 { (exit 1); exit 1; }; }
1980
1981# Provide some information about the compiler.
d3a24ed2 1982echo "$as_me:1982:" \
f73dda09
JA
1983 "checking for C compiler version" >&5
1984ac_compiler=`set X $ac_compile; echo $2`
d3a24ed2 1985{ (eval echo "$as_me:1985: \"$ac_compiler --version </dev/null >&5\"") >&5
f73dda09
JA
1986 (eval $ac_compiler --version </dev/null >&5) 2>&5
1987 ac_status=$?
d3a24ed2 1988 echo "$as_me:1988: \$? = $ac_status" >&5
f73dda09 1989 (exit $ac_status); }
d3a24ed2 1990{ (eval echo "$as_me:1990: \"$ac_compiler -v </dev/null >&5\"") >&5
f73dda09
JA
1991 (eval $ac_compiler -v </dev/null >&5) 2>&5
1992 ac_status=$?
d3a24ed2 1993 echo "$as_me:1993: \$? = $ac_status" >&5
f73dda09 1994 (exit $ac_status); }
d3a24ed2 1995{ (eval echo "$as_me:1995: \"$ac_compiler -V </dev/null >&5\"") >&5
f73dda09
JA
1996 (eval $ac_compiler -V </dev/null >&5) 2>&5
1997 ac_status=$?
d3a24ed2 1998 echo "$as_me:1998: \$? = $ac_status" >&5
f73dda09
JA
1999 (exit $ac_status); }
2000
2001cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 2002#line 2002 "configure"
f73dda09
JA
2003#include "confdefs.h"
2004
2005int
2006main ()
2007{
2008
2009 ;
2010 return 0;
2011}
2012_ACEOF
2013ac_clean_files_save=$ac_clean_files
2014ac_clean_files="$ac_clean_files a.out a.exe"
2015# Try to create an executable without -o first, disregard a.out.
2016# It will help us diagnose broken compilers, and finding out an intuition
2017# of exeext.
d3a24ed2 2018echo "$as_me:2018: checking for C compiler default output" >&5
f73dda09
JA
2019echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2020ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
d3a24ed2 2021if { (eval echo "$as_me:2021: \"$ac_link_default\"") >&5
f73dda09
JA
2022 (eval $ac_link_default) 2>&5
2023 ac_status=$?
d3a24ed2 2024 echo "$as_me:2024: \$? = $ac_status" >&5
f73dda09
JA
2025 (exit $ac_status); }; then
2026 # Find the output, starting from the most likely. This scheme is
2027# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2028# resort.
2029for ac_file in `ls a.exe conftest.exe 2>/dev/null;
2030 ls a.out conftest 2>/dev/null;
2031 ls a.* conftest.* 2>/dev/null`; do
2032 case $ac_file in
2033 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2034 a.out ) # We found the default executable, but exeext='' is most
2035 # certainly right.
2036 break;;
2037 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2038 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2039 export ac_cv_exeext
2040 break;;
2041 * ) break;;
2042 esac
2043done
ccc6cda3 2044else
f73dda09
JA
2045 echo "$as_me: failed program was:" >&5
2046cat conftest.$ac_ext >&5
d3a24ed2 2047{ { echo "$as_me:2047: error: C compiler cannot create executables" >&5
f73dda09
JA
2048echo "$as_me: error: C compiler cannot create executables" >&2;}
2049 { (exit 77); exit 77; }; }
2050fi
2051
2052ac_exeext=$ac_cv_exeext
d3a24ed2 2053echo "$as_me:2053: result: $ac_file" >&5
f73dda09
JA
2054echo "${ECHO_T}$ac_file" >&6
2055
2056# Check the compiler produces executables we can run. If not, either
2057# the compiler is broken, or we cross compile.
d3a24ed2 2058echo "$as_me:2058: checking whether the C compiler works" >&5
f73dda09
JA
2059echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2060# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2061# If not cross compiling, check that we can run a simple program.
2062if test "$cross_compiling" != yes; then
2063 if { ac_try='./$ac_file'
d3a24ed2 2064 { (eval echo "$as_me:2064: \"$ac_try\"") >&5
f73dda09
JA
2065 (eval $ac_try) 2>&5
2066 ac_status=$?
d3a24ed2 2067 echo "$as_me:2067: \$? = $ac_status" >&5
f73dda09
JA
2068 (exit $ac_status); }; }; then
2069 cross_compiling=no
2070 else
2071 if test "$cross_compiling" = maybe; then
2072 cross_compiling=yes
2073 else
d3a24ed2 2074 { { echo "$as_me:2074: error: cannot run C compiled programs.
f73dda09
JA
2075If you meant to cross compile, use \`--host'." >&5
2076echo "$as_me: error: cannot run C compiled programs.
2077If you meant to cross compile, use \`--host'." >&2;}
2078 { (exit 1); exit 1; }; }
2079 fi
2080 fi
2081fi
d3a24ed2 2082echo "$as_me:2082: result: yes" >&5
f73dda09
JA
2083echo "${ECHO_T}yes" >&6
2084
2085rm -f a.out a.exe conftest$ac_cv_exeext
2086ac_clean_files=$ac_clean_files_save
2087# Check the compiler produces executables we can run. If not, either
2088# the compiler is broken, or we cross compile.
d3a24ed2 2089echo "$as_me:2089: checking whether we are cross compiling" >&5
f73dda09 2090echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
d3a24ed2 2091echo "$as_me:2091: result: $cross_compiling" >&5
f73dda09
JA
2092echo "${ECHO_T}$cross_compiling" >&6
2093
d3a24ed2 2094echo "$as_me:2094: checking for executable suffix" >&5
f73dda09 2095echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
d3a24ed2 2096if { (eval echo "$as_me:2096: \"$ac_link\"") >&5
f73dda09
JA
2097 (eval $ac_link) 2>&5
2098 ac_status=$?
d3a24ed2 2099 echo "$as_me:2099: \$? = $ac_status" >&5
f73dda09
JA
2100 (exit $ac_status); }; then
2101 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2102# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2103# work properly (i.e., refer to `conftest.exe'), while it won't with
2104# `rm'.
2105for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2106 case $ac_file in
2107 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2108 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2109 export ac_cv_exeext
2110 break;;
2111 * ) break;;
2112 esac
2113done
ccc6cda3 2114else
d3a24ed2 2115 { { echo "$as_me:2115: error: cannot compute EXEEXT: cannot compile and link" >&5
f73dda09
JA
2116echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
2117 { (exit 1); exit 1; }; }
2118fi
2119
2120rm -f conftest$ac_cv_exeext
d3a24ed2 2121echo "$as_me:2121: result: $ac_cv_exeext" >&5
f73dda09
JA
2122echo "${ECHO_T}$ac_cv_exeext" >&6
2123
2124rm -f conftest.$ac_ext
2125EXEEXT=$ac_cv_exeext
2126ac_exeext=$EXEEXT
d3a24ed2 2127echo "$as_me:2127: checking for object suffix" >&5
f73dda09
JA
2128echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2129if test "${ac_cv_objext+set}" = set; then
2130 echo $ECHO_N "(cached) $ECHO_C" >&6
2131else
2132 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 2133#line 2133 "configure"
f73dda09
JA
2134#include "confdefs.h"
2135
2136int
2137main ()
2138{
2139
2140 ;
2141 return 0;
2142}
2143_ACEOF
2144rm -f conftest.o conftest.obj
d3a24ed2 2145if { (eval echo "$as_me:2145: \"$ac_compile\"") >&5
f73dda09
JA
2146 (eval $ac_compile) 2>&5
2147 ac_status=$?
d3a24ed2 2148 echo "$as_me:2148: \$? = $ac_status" >&5
f73dda09
JA
2149 (exit $ac_status); }; then
2150 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2151 case $ac_file in
2152 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2153 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2154 break;;
2155 esac
2156done
2157else
2158 echo "$as_me: failed program was:" >&5
2159cat conftest.$ac_ext >&5
d3a24ed2 2160{ { echo "$as_me:2160: error: cannot compute OBJEXT: cannot compile" >&5
f73dda09
JA
2161echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2162 { (exit 1); exit 1; }; }
ccc6cda3 2163fi
ccc6cda3 2164
f73dda09 2165rm -f conftest.$ac_cv_objext conftest.$ac_ext
ccc6cda3 2166fi
d3a24ed2 2167echo "$as_me:2167: result: $ac_cv_objext" >&5
f73dda09
JA
2168echo "${ECHO_T}$ac_cv_objext" >&6
2169OBJEXT=$ac_cv_objext
2170ac_objext=$OBJEXT
d3a24ed2 2171echo "$as_me:2171: checking whether we are using the GNU C compiler" >&5
f73dda09
JA
2172echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2173if test "${ac_cv_c_compiler_gnu+set}" = set; then
2174 echo $ECHO_N "(cached) $ECHO_C" >&6
2175else
2176 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 2177#line 2177 "configure"
f73dda09
JA
2178#include "confdefs.h"
2179
2180int
2181main ()
2182{
2183#ifndef __GNUC__
2184 choke me
2185#endif
2186
2187 ;
2188 return 0;
2189}
2190_ACEOF
2191rm -f conftest.$ac_objext
d3a24ed2 2192if { (eval echo "$as_me:2192: \"$ac_compile\"") >&5
f73dda09
JA
2193 (eval $ac_compile) 2>&5
2194 ac_status=$?
d3a24ed2 2195 echo "$as_me:2195: \$? = $ac_status" >&5
f73dda09
JA
2196 (exit $ac_status); } &&
2197 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 2198 { (eval echo "$as_me:2198: \"$ac_try\"") >&5
f73dda09
JA
2199 (eval $ac_try) 2>&5
2200 ac_status=$?
d3a24ed2 2201 echo "$as_me:2201: \$? = $ac_status" >&5
f73dda09
JA
2202 (exit $ac_status); }; }; then
2203 ac_compiler_gnu=yes
2204else
2205 echo "$as_me: failed program was:" >&5
2206cat conftest.$ac_ext >&5
2207ac_compiler_gnu=no
2208fi
2209rm -f conftest.$ac_objext conftest.$ac_ext
2210ac_cv_c_compiler_gnu=$ac_compiler_gnu
2211
2212fi
d3a24ed2 2213echo "$as_me:2213: result: $ac_cv_c_compiler_gnu" >&5
f73dda09
JA
2214echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2215GCC=`test $ac_compiler_gnu = yes && echo yes`
2216ac_test_CFLAGS=${CFLAGS+set}
2217ac_save_CFLAGS=$CFLAGS
2218CFLAGS="-g"
d3a24ed2 2219echo "$as_me:2219: checking whether $CC accepts -g" >&5
f73dda09
JA
2220echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2221if test "${ac_cv_prog_cc_g+set}" = set; then
2222 echo $ECHO_N "(cached) $ECHO_C" >&6
2223else
2224 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 2225#line 2225 "configure"
f73dda09
JA
2226#include "confdefs.h"
2227
2228int
2229main ()
2230{
ccc6cda3 2231
f73dda09
JA
2232 ;
2233 return 0;
2234}
2235_ACEOF
2236rm -f conftest.$ac_objext
d3a24ed2 2237if { (eval echo "$as_me:2237: \"$ac_compile\"") >&5
f73dda09
JA
2238 (eval $ac_compile) 2>&5
2239 ac_status=$?
d3a24ed2 2240 echo "$as_me:2240: \$? = $ac_status" >&5
f73dda09
JA
2241 (exit $ac_status); } &&
2242 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 2243 { (eval echo "$as_me:2243: \"$ac_try\"") >&5
f73dda09
JA
2244 (eval $ac_try) 2>&5
2245 ac_status=$?
d3a24ed2 2246 echo "$as_me:2246: \$? = $ac_status" >&5
f73dda09
JA
2247 (exit $ac_status); }; }; then
2248 ac_cv_prog_cc_g=yes
2249else
2250 echo "$as_me: failed program was:" >&5
2251cat conftest.$ac_ext >&5
2252ac_cv_prog_cc_g=no
2253fi
2254rm -f conftest.$ac_objext conftest.$ac_ext
2255fi
d3a24ed2 2256echo "$as_me:2256: result: $ac_cv_prog_cc_g" >&5
f73dda09 2257echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
bb70624e 2258if test "$ac_test_CFLAGS" = set; then
f73dda09 2259 CFLAGS=$ac_save_CFLAGS
bb70624e
JA
2260elif test $ac_cv_prog_cc_g = yes; then
2261 if test "$GCC" = yes; then
ccc6cda3
JA
2262 CFLAGS="-g -O2"
2263 else
bb70624e 2264 CFLAGS="-g"
ccc6cda3
JA
2265 fi
2266else
bb70624e
JA
2267 if test "$GCC" = yes; then
2268 CFLAGS="-O2"
2269 else
2270 CFLAGS=
2271 fi
ccc6cda3 2272fi
f73dda09
JA
2273# Some people use a C++ compiler to compile C. Since we use `exit',
2274# in C++ we need to declare it. In case someone uses the same compiler
2275# for both compiling C and C++ we need to have the C++ compiler decide
2276# the declaration of exit, since it's the most demanding environment.
2277cat >conftest.$ac_ext <<_ACEOF
2278#ifndef __cplusplus
2279 choke me
2280#endif
2281_ACEOF
2282rm -f conftest.$ac_objext
d3a24ed2 2283if { (eval echo "$as_me:2283: \"$ac_compile\"") >&5
f73dda09
JA
2284 (eval $ac_compile) 2>&5
2285 ac_status=$?
d3a24ed2 2286 echo "$as_me:2286: \$? = $ac_status" >&5
f73dda09
JA
2287 (exit $ac_status); } &&
2288 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 2289 { (eval echo "$as_me:2289: \"$ac_try\"") >&5
f73dda09
JA
2290 (eval $ac_try) 2>&5
2291 ac_status=$?
d3a24ed2 2292 echo "$as_me:2292: \$? = $ac_status" >&5
f73dda09
JA
2293 (exit $ac_status); }; }; then
2294 for ac_declaration in \
2295 ''\
2296 '#include <stdlib.h>' \
2297 'extern "C" void std::exit (int) throw (); using std::exit;' \
2298 'extern "C" void std::exit (int); using std::exit;' \
2299 'extern "C" void exit (int) throw ();' \
2300 'extern "C" void exit (int);' \
2301 'void exit (int);'
2302do
2303 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 2304#line 2304 "configure"
f73dda09
JA
2305#include "confdefs.h"
2306#include <stdlib.h>
2307$ac_declaration
2308int
2309main ()
2310{
2311exit (42);
2312 ;
2313 return 0;
2314}
2315_ACEOF
2316rm -f conftest.$ac_objext
d3a24ed2 2317if { (eval echo "$as_me:2317: \"$ac_compile\"") >&5
f73dda09
JA
2318 (eval $ac_compile) 2>&5
2319 ac_status=$?
d3a24ed2 2320 echo "$as_me:2320: \$? = $ac_status" >&5
f73dda09
JA
2321 (exit $ac_status); } &&
2322 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 2323 { (eval echo "$as_me:2323: \"$ac_try\"") >&5
f73dda09
JA
2324 (eval $ac_try) 2>&5
2325 ac_status=$?
d3a24ed2 2326 echo "$as_me:2326: \$? = $ac_status" >&5
f73dda09
JA
2327 (exit $ac_status); }; }; then
2328 :
2329else
2330 echo "$as_me: failed program was:" >&5
2331cat conftest.$ac_ext >&5
2332continue
2333fi
2334rm -f conftest.$ac_objext conftest.$ac_ext
2335 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 2336#line 2336 "configure"
f73dda09
JA
2337#include "confdefs.h"
2338$ac_declaration
2339int
2340main ()
2341{
2342exit (42);
2343 ;
2344 return 0;
2345}
2346_ACEOF
2347rm -f conftest.$ac_objext
d3a24ed2 2348if { (eval echo "$as_me:2348: \"$ac_compile\"") >&5
f73dda09
JA
2349 (eval $ac_compile) 2>&5
2350 ac_status=$?
d3a24ed2 2351 echo "$as_me:2351: \$? = $ac_status" >&5
f73dda09
JA
2352 (exit $ac_status); } &&
2353 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 2354 { (eval echo "$as_me:2354: \"$ac_try\"") >&5
f73dda09
JA
2355 (eval $ac_try) 2>&5
2356 ac_status=$?
d3a24ed2 2357 echo "$as_me:2357: \$? = $ac_status" >&5
f73dda09
JA
2358 (exit $ac_status); }; }; then
2359 break
2360else
2361 echo "$as_me: failed program was:" >&5
2362cat conftest.$ac_ext >&5
2363fi
2364rm -f conftest.$ac_objext conftest.$ac_ext
cce855bc 2365done
f73dda09
JA
2366rm -f conftest*
2367if test -n "$ac_declaration"; then
2368 echo '#ifdef __cplusplus' >>confdefs.h
2369 echo $ac_declaration >>confdefs.h
2370 echo '#endif' >>confdefs.h
2371fi
cce855bc 2372
f73dda09
JA
2373else
2374 echo "$as_me: failed program was:" >&5
2375cat conftest.$ac_ext >&5
2376fi
2377rm -f conftest.$ac_objext conftest.$ac_ext
2378ac_ext=c
2379ac_cpp='$CPP $CPPFLAGS'
2380ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2381ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2382ac_compiler_gnu=$ac_cv_c_compiler_gnu
bb70624e 2383
d3a24ed2 2384echo "$as_me:2384: checking for POSIXized ISC" >&5
f73dda09 2385echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
ccc6cda3 2386if test -d /etc/conf/kconfig.d &&
f73dda09 2387 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
ccc6cda3 2388then
d3a24ed2 2389 echo "$as_me:2389: result: yes" >&5
f73dda09 2390echo "${ECHO_T}yes" >&6
ccc6cda3 2391 ISC=yes # If later tests want to check for ISC.
f73dda09
JA
2392
2393cat >>confdefs.h <<\EOF
ccc6cda3
JA
2394#define _POSIX_SOURCE 1
2395EOF
2396
2397 if test "$GCC" = yes; then
2398 CC="$CC -posix"
2399 else
2400 CC="$CC -Xp"
2401 fi
2402else
d3a24ed2 2403 echo "$as_me:2403: result: no" >&5
f73dda09 2404echo "${ECHO_T}no" >&6
ccc6cda3
JA
2405 ISC=
2406fi
2407
f73dda09
JA
2408ac_ext=c
2409ac_cpp='$CPP $CPPFLAGS'
2410ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2411ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2412ac_compiler_gnu=$ac_cv_c_compiler_gnu
d3a24ed2 2413echo "$as_me:2413: checking how to run the C preprocessor" >&5
f73dda09 2414echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
ccc6cda3
JA
2415# On Suns, sometimes $CPP names a directory.
2416if test -n "$CPP" && test -d "$CPP"; then
2417 CPP=
2418fi
2419if test -z "$CPP"; then
f73dda09
JA
2420 if test "${ac_cv_prog_CPP+set}" = set; then
2421 echo $ECHO_N "(cached) $ECHO_C" >&6
2422else
2423 # Double quotes because CPP needs to be expanded
2424 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2425 do
2426 ac_preproc_ok=false
2427for ac_c_preproc_warn_flag in '' yes
2428do
2429 # Use a header file that comes with gcc, so configuring glibc
2430 # with a fresh cross-compiler works.
ccc6cda3 2431 # On the NeXT, cc -E runs the code through the compiler's parser,
f73dda09
JA
2432 # not just through cpp. "Syntax error" is here to catch this case.
2433 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 2434#line 2434 "configure"
ccc6cda3
JA
2435#include "confdefs.h"
2436#include <assert.h>
f73dda09
JA
2437 Syntax error
2438_ACEOF
d3a24ed2 2439if { (eval echo "$as_me:2439: \"$ac_cpp conftest.$ac_ext\"") >&5
f73dda09
JA
2440 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2441 ac_status=$?
2442 egrep -v '^ *\+' conftest.er1 >conftest.err
2443 rm -f conftest.er1
2444 cat conftest.err >&5
d3a24ed2 2445 echo "$as_me:2445: \$? = $ac_status" >&5
f73dda09
JA
2446 (exit $ac_status); } >/dev/null; then
2447 if test -s conftest.err; then
2448 ac_cpp_err=$ac_c_preproc_warn_flag
2449 else
2450 ac_cpp_err=
2451 fi
2452else
2453 ac_cpp_err=yes
2454fi
2455if test -z "$ac_cpp_err"; then
ccc6cda3
JA
2456 :
2457else
f73dda09 2458 echo "$as_me: failed program was:" >&5
ccc6cda3 2459 cat conftest.$ac_ext >&5
f73dda09
JA
2460 # Broken: fails on valid input.
2461continue
2462fi
2463rm -f conftest.err conftest.$ac_ext
2464
2465 # OK, works on sane cases. Now check whether non-existent headers
2466 # can be detected and how.
2467 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 2468#line 2468 "configure"
f73dda09
JA
2469#include "confdefs.h"
2470#include <ac_nonexistent.h>
2471_ACEOF
d3a24ed2 2472if { (eval echo "$as_me:2472: \"$ac_cpp conftest.$ac_ext\"") >&5
f73dda09
JA
2473 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2474 ac_status=$?
2475 egrep -v '^ *\+' conftest.er1 >conftest.err
2476 rm -f conftest.er1
2477 cat conftest.err >&5
d3a24ed2 2478 echo "$as_me:2478: \$? = $ac_status" >&5
f73dda09
JA
2479 (exit $ac_status); } >/dev/null; then
2480 if test -s conftest.err; then
2481 ac_cpp_err=$ac_c_preproc_warn_flag
2482 else
2483 ac_cpp_err=
2484 fi
2485else
2486 ac_cpp_err=yes
2487fi
2488if test -z "$ac_cpp_err"; then
2489 # Broken: success on invalid input.
2490continue
bb70624e 2491else
f73dda09 2492 echo "$as_me: failed program was:" >&5
bb70624e 2493 cat conftest.$ac_ext >&5
f73dda09
JA
2494 # Passes both tests.
2495ac_preproc_ok=:
2496break
2497fi
2498rm -f conftest.err conftest.$ac_ext
2499
2500done
2501# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2502rm -f conftest.err conftest.$ac_ext
2503if $ac_preproc_ok; then
2504 break
2505fi
2506
2507 done
2508 ac_cv_prog_CPP=$CPP
2509
2510fi
2511 CPP=$ac_cv_prog_CPP
2512else
2513 ac_cv_prog_CPP=$CPP
2514fi
d3a24ed2 2515echo "$as_me:2515: result: $CPP" >&5
f73dda09
JA
2516echo "${ECHO_T}$CPP" >&6
2517ac_preproc_ok=false
2518for ac_c_preproc_warn_flag in '' yes
2519do
2520 # Use a header file that comes with gcc, so configuring glibc
2521 # with a fresh cross-compiler works.
2522 # On the NeXT, cc -E runs the code through the compiler's parser,
2523 # not just through cpp. "Syntax error" is here to catch this case.
2524 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 2525#line 2525 "configure"
ccc6cda3
JA
2526#include "confdefs.h"
2527#include <assert.h>
f73dda09
JA
2528 Syntax error
2529_ACEOF
d3a24ed2 2530if { (eval echo "$as_me:2530: \"$ac_cpp conftest.$ac_ext\"") >&5
f73dda09
JA
2531 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2532 ac_status=$?
2533 egrep -v '^ *\+' conftest.er1 >conftest.err
2534 rm -f conftest.er1
2535 cat conftest.err >&5
d3a24ed2 2536 echo "$as_me:2536: \$? = $ac_status" >&5
f73dda09
JA
2537 (exit $ac_status); } >/dev/null; then
2538 if test -s conftest.err; then
2539 ac_cpp_err=$ac_c_preproc_warn_flag
2540 else
2541 ac_cpp_err=
2542 fi
2543else
2544 ac_cpp_err=yes
2545fi
2546if test -z "$ac_cpp_err"; then
ccc6cda3
JA
2547 :
2548else
f73dda09 2549 echo "$as_me: failed program was:" >&5
ccc6cda3 2550 cat conftest.$ac_ext >&5
f73dda09
JA
2551 # Broken: fails on valid input.
2552continue
2553fi
2554rm -f conftest.err conftest.$ac_ext
2555
2556 # OK, works on sane cases. Now check whether non-existent headers
2557 # can be detected and how.
2558 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 2559#line 2559 "configure"
f73dda09
JA
2560#include "confdefs.h"
2561#include <ac_nonexistent.h>
2562_ACEOF
d3a24ed2 2563if { (eval echo "$as_me:2563: \"$ac_cpp conftest.$ac_ext\"") >&5
f73dda09
JA
2564 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2565 ac_status=$?
2566 egrep -v '^ *\+' conftest.er1 >conftest.err
2567 rm -f conftest.er1
2568 cat conftest.err >&5
d3a24ed2 2569 echo "$as_me:2569: \$? = $ac_status" >&5
f73dda09
JA
2570 (exit $ac_status); } >/dev/null; then
2571 if test -s conftest.err; then
2572 ac_cpp_err=$ac_c_preproc_warn_flag
2573 else
2574 ac_cpp_err=
2575 fi
2576else
2577 ac_cpp_err=yes
bb70624e 2578fi
f73dda09
JA
2579if test -z "$ac_cpp_err"; then
2580 # Broken: success on invalid input.
2581continue
2582else
2583 echo "$as_me: failed program was:" >&5
2584 cat conftest.$ac_ext >&5
2585 # Passes both tests.
2586ac_preproc_ok=:
2587break
ccc6cda3 2588fi
f73dda09
JA
2589rm -f conftest.err conftest.$ac_ext
2590
2591done
2592# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2593rm -f conftest.err conftest.$ac_ext
2594if $ac_preproc_ok; then
2595 :
ccc6cda3 2596else
d3a24ed2 2597 { { echo "$as_me:2597: error: C preprocessor \"$CPP\" fails sanity check" >&5
f73dda09
JA
2598echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2599 { (exit 1); exit 1; }; }
ccc6cda3 2600fi
ccc6cda3 2601
f73dda09
JA
2602ac_ext=c
2603ac_cpp='$CPP $CPPFLAGS'
2604ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2605ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2606ac_compiler_gnu=$ac_cv_c_compiler_gnu
2607
d3a24ed2 2608echo "$as_me:2608: checking for minix/config.h" >&5
f73dda09
JA
2609echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2610if test "${ac_cv_header_minix_config_h+set}" = set; then
2611 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 2612else
f73dda09 2613 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 2614#line 2614 "configure"
ccc6cda3
JA
2615#include "confdefs.h"
2616#include <minix/config.h>
f73dda09 2617_ACEOF
d3a24ed2 2618if { (eval echo "$as_me:2618: \"$ac_cpp conftest.$ac_ext\"") >&5
f73dda09
JA
2619 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2620 ac_status=$?
2621 egrep -v '^ *\+' conftest.er1 >conftest.err
2622 rm -f conftest.er1
2623 cat conftest.err >&5
d3a24ed2 2624 echo "$as_me:2624: \$? = $ac_status" >&5
f73dda09
JA
2625 (exit $ac_status); } >/dev/null; then
2626 if test -s conftest.err; then
2627 ac_cpp_err=$ac_c_preproc_warn_flag
2628 else
2629 ac_cpp_err=
2630 fi
2631else
2632 ac_cpp_err=yes
2633fi
2634if test -z "$ac_cpp_err"; then
2635 ac_cv_header_minix_config_h=yes
ccc6cda3 2636else
f73dda09 2637 echo "$as_me: failed program was:" >&5
ccc6cda3 2638 cat conftest.$ac_ext >&5
f73dda09 2639 ac_cv_header_minix_config_h=no
ccc6cda3 2640fi
f73dda09 2641rm -f conftest.err conftest.$ac_ext
ccc6cda3 2642fi
d3a24ed2 2643echo "$as_me:2643: result: $ac_cv_header_minix_config_h" >&5
f73dda09
JA
2644echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2645if test $ac_cv_header_minix_config_h = yes; then
ccc6cda3
JA
2646 MINIX=yes
2647else
f73dda09 2648 MINIX=
ccc6cda3
JA
2649fi
2650
2651if test "$MINIX" = yes; then
f73dda09
JA
2652
2653cat >>confdefs.h <<\EOF
ccc6cda3
JA
2654#define _POSIX_SOURCE 1
2655EOF
2656
f73dda09 2657cat >>confdefs.h <<\EOF
ccc6cda3
JA
2658#define _POSIX_1_SOURCE 2
2659EOF
2660
f73dda09 2661cat >>confdefs.h <<\EOF
ccc6cda3
JA
2662#define _MINIX 1
2663EOF
2664
2665fi
2666
f73dda09
JA
2667case $host_os in
2668 *cygwin* ) CYGWIN=yes;;
2669 * ) CYGWIN=no;;
2670esac
2671
2672case $host_os in
2673 *mingw32* ) MINGW32=yes;;
2674 * ) MINGW32=no;;
2675esac
2676
2677# Check whether --enable-largefile or --disable-largefile was given.
2678if test "${enable_largefile+set}" = set; then
2679 enableval="$enable_largefile"
2680
2681fi;
2682if test "$enable_largefile" != no; then
ccc6cda3 2683
d3a24ed2 2684 echo "$as_me:2684: checking for special C compiler options needed for large files" >&5
f73dda09
JA
2685echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
2686if test "${ac_cv_sys_largefile_CC+set}" = set; then
2687 echo $ECHO_N "(cached) $ECHO_C" >&6
bb70624e 2688else
f73dda09
JA
2689 ac_cv_sys_largefile_CC=no
2690 if test "$GCC" != yes; then
2691 ac_save_CC=$CC
2692 while :; do
2693 # IRIX 6.2 and later do not support large files by default,
2694 # so use the C compiler's -n32 option if that helps.
2695 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 2696#line 2696 "configure"
bb70624e 2697#include "confdefs.h"
f73dda09
JA
2698#include <sys/types.h>
2699 /* Check that off_t can represent 2**63 - 1 correctly.
2700 We can't simply define LARGE_OFF_T to be 9223372036854775807,
2701 since some C++ compilers masquerading as C compilers
2702 incorrectly reject 9223372036854775807. */
2703#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
2704 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
2705 && LARGE_OFF_T % 2147483647 == 1)
2706 ? 1 : -1];
2707int
2708main ()
2709{
bb70624e 2710
f73dda09
JA
2711 ;
2712 return 0;
2713}
2714_ACEOF
2715 rm -f conftest.$ac_objext
d3a24ed2 2716if { (eval echo "$as_me:2716: \"$ac_compile\"") >&5
f73dda09
JA
2717 (eval $ac_compile) 2>&5
2718 ac_status=$?
d3a24ed2 2719 echo "$as_me:2719: \$? = $ac_status" >&5
f73dda09
JA
2720 (exit $ac_status); } &&
2721 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 2722 { (eval echo "$as_me:2722: \"$ac_try\"") >&5
f73dda09
JA
2723 (eval $ac_try) 2>&5
2724 ac_status=$?
d3a24ed2 2725 echo "$as_me:2725: \$? = $ac_status" >&5
f73dda09
JA
2726 (exit $ac_status); }; }; then
2727 break
bb70624e 2728else
f73dda09
JA
2729 echo "$as_me: failed program was:" >&5
2730cat conftest.$ac_ext >&5
2731fi
2732rm -f conftest.$ac_objext
2733 CC="$CC -n32"
2734 rm -f conftest.$ac_objext
d3a24ed2 2735if { (eval echo "$as_me:2735: \"$ac_compile\"") >&5
f73dda09
JA
2736 (eval $ac_compile) 2>&5
2737 ac_status=$?
d3a24ed2 2738 echo "$as_me:2738: \$? = $ac_status" >&5
f73dda09
JA
2739 (exit $ac_status); } &&
2740 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 2741 { (eval echo "$as_me:2741: \"$ac_try\"") >&5
f73dda09
JA
2742 (eval $ac_try) 2>&5
2743 ac_status=$?
d3a24ed2 2744 echo "$as_me:2744: \$? = $ac_status" >&5
f73dda09
JA
2745 (exit $ac_status); }; }; then
2746 ac_cv_sys_largefile_CC=' -n32'; break
2747else
2748 echo "$as_me: failed program was:" >&5
2749cat conftest.$ac_ext >&5
2750fi
2751rm -f conftest.$ac_objext
2752 break
2753 done
2754 CC=$ac_save_CC
2755 rm -f conftest.$ac_ext
2756 fi
bb70624e 2757fi
d3a24ed2 2758echo "$as_me:2758: result: $ac_cv_sys_largefile_CC" >&5
f73dda09
JA
2759echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
2760 if test "$ac_cv_sys_largefile_CC" != no; then
2761 CC=$CC$ac_cv_sys_largefile_CC
2762 fi
bb70624e 2763
d3a24ed2 2764 echo "$as_me:2764: checking for _FILE_OFFSET_BITS value needed for large files" >&5
f73dda09
JA
2765echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
2766if test "${ac_cv_sys_file_offset_bits+set}" = set; then
2767 echo $ECHO_N "(cached) $ECHO_C" >&6
bb70624e 2768else
f73dda09
JA
2769 while :; do
2770 ac_cv_sys_file_offset_bits=no
2771 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 2772#line 2772 "configure"
bb70624e 2773#include "confdefs.h"
f73dda09
JA
2774#include <sys/types.h>
2775 /* Check that off_t can represent 2**63 - 1 correctly.
2776 We can't simply define LARGE_OFF_T to be 9223372036854775807,
2777 since some C++ compilers masquerading as C compilers
2778 incorrectly reject 9223372036854775807. */
2779#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
2780 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
2781 && LARGE_OFF_T % 2147483647 == 1)
2782 ? 1 : -1];
2783int
2784main ()
2785{
bb70624e 2786
f73dda09
JA
2787 ;
2788 return 0;
2789}
2790_ACEOF
2791rm -f conftest.$ac_objext
d3a24ed2 2792if { (eval echo "$as_me:2792: \"$ac_compile\"") >&5
f73dda09
JA
2793 (eval $ac_compile) 2>&5
2794 ac_status=$?
d3a24ed2 2795 echo "$as_me:2795: \$? = $ac_status" >&5
f73dda09
JA
2796 (exit $ac_status); } &&
2797 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 2798 { (eval echo "$as_me:2798: \"$ac_try\"") >&5
f73dda09
JA
2799 (eval $ac_try) 2>&5
2800 ac_status=$?
d3a24ed2 2801 echo "$as_me:2801: \$? = $ac_status" >&5
f73dda09
JA
2802 (exit $ac_status); }; }; then
2803 break
bb70624e 2804else
f73dda09
JA
2805 echo "$as_me: failed program was:" >&5
2806cat conftest.$ac_ext >&5
bb70624e 2807fi
f73dda09
JA
2808rm -f conftest.$ac_objext conftest.$ac_ext
2809 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 2810#line 2810 "configure"
f73dda09
JA
2811#include "confdefs.h"
2812#define _FILE_OFFSET_BITS 64
2813#include <sys/types.h>
2814 /* Check that off_t can represent 2**63 - 1 correctly.
2815 We can't simply define LARGE_OFF_T to be 9223372036854775807,
2816 since some C++ compilers masquerading as C compilers
2817 incorrectly reject 9223372036854775807. */
2818#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
2819 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
2820 && LARGE_OFF_T % 2147483647 == 1)
2821 ? 1 : -1];
2822int
2823main ()
2824{
bb70624e 2825
f73dda09
JA
2826 ;
2827 return 0;
2828}
2829_ACEOF
2830rm -f conftest.$ac_objext
d3a24ed2 2831if { (eval echo "$as_me:2831: \"$ac_compile\"") >&5
f73dda09
JA
2832 (eval $ac_compile) 2>&5
2833 ac_status=$?
d3a24ed2 2834 echo "$as_me:2834: \$? = $ac_status" >&5
f73dda09
JA
2835 (exit $ac_status); } &&
2836 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 2837 { (eval echo "$as_me:2837: \"$ac_try\"") >&5
f73dda09
JA
2838 (eval $ac_try) 2>&5
2839 ac_status=$?
d3a24ed2 2840 echo "$as_me:2840: \$? = $ac_status" >&5
f73dda09
JA
2841 (exit $ac_status); }; }; then
2842 ac_cv_sys_file_offset_bits=64; break
2843else
2844 echo "$as_me: failed program was:" >&5
2845cat conftest.$ac_ext >&5
2846fi
2847rm -f conftest.$ac_objext conftest.$ac_ext
2848 break
2849done
2850fi
d3a24ed2 2851echo "$as_me:2851: result: $ac_cv_sys_file_offset_bits" >&5
f73dda09
JA
2852echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
2853if test "$ac_cv_sys_file_offset_bits" != no; then
bb70624e 2854
f73dda09
JA
2855cat >>confdefs.h <<EOF
2856#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
2857EOF
bb70624e 2858
f73dda09
JA
2859fi
2860rm -f conftest*
d3a24ed2 2861 echo "$as_me:2861: checking for _LARGE_FILES value needed for large files" >&5
f73dda09
JA
2862echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
2863if test "${ac_cv_sys_large_files+set}" = set; then
2864 echo $ECHO_N "(cached) $ECHO_C" >&6
bb70624e 2865else
f73dda09
JA
2866 while :; do
2867 ac_cv_sys_large_files=no
2868 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 2869#line 2869 "configure"
f73dda09
JA
2870#include "confdefs.h"
2871#include <sys/types.h>
2872 /* Check that off_t can represent 2**63 - 1 correctly.
2873 We can't simply define LARGE_OFF_T to be 9223372036854775807,
2874 since some C++ compilers masquerading as C compilers
2875 incorrectly reject 9223372036854775807. */
2876#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
2877 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
2878 && LARGE_OFF_T % 2147483647 == 1)
2879 ? 1 : -1];
2880int
2881main ()
2882{
2883
2884 ;
2885 return 0;
2886}
2887_ACEOF
2888rm -f conftest.$ac_objext
d3a24ed2 2889if { (eval echo "$as_me:2889: \"$ac_compile\"") >&5
f73dda09
JA
2890 (eval $ac_compile) 2>&5
2891 ac_status=$?
d3a24ed2 2892 echo "$as_me:2892: \$? = $ac_status" >&5
f73dda09
JA
2893 (exit $ac_status); } &&
2894 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 2895 { (eval echo "$as_me:2895: \"$ac_try\"") >&5
f73dda09
JA
2896 (eval $ac_try) 2>&5
2897 ac_status=$?
d3a24ed2 2898 echo "$as_me:2898: \$? = $ac_status" >&5
f73dda09
JA
2899 (exit $ac_status); }; }; then
2900 break
bb70624e 2901else
f73dda09
JA
2902 echo "$as_me: failed program was:" >&5
2903cat conftest.$ac_ext >&5
bb70624e 2904fi
f73dda09
JA
2905rm -f conftest.$ac_objext conftest.$ac_ext
2906 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 2907#line 2907 "configure"
f73dda09
JA
2908#include "confdefs.h"
2909#define _LARGE_FILES 1
2910#include <sys/types.h>
2911 /* Check that off_t can represent 2**63 - 1 correctly.
2912 We can't simply define LARGE_OFF_T to be 9223372036854775807,
2913 since some C++ compilers masquerading as C compilers
2914 incorrectly reject 9223372036854775807. */
2915#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
2916 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
2917 && LARGE_OFF_T % 2147483647 == 1)
2918 ? 1 : -1];
2919int
2920main ()
2921{
bb70624e 2922
f73dda09
JA
2923 ;
2924 return 0;
2925}
2926_ACEOF
2927rm -f conftest.$ac_objext
d3a24ed2 2928if { (eval echo "$as_me:2928: \"$ac_compile\"") >&5
f73dda09
JA
2929 (eval $ac_compile) 2>&5
2930 ac_status=$?
d3a24ed2 2931 echo "$as_me:2931: \$? = $ac_status" >&5
f73dda09
JA
2932 (exit $ac_status); } &&
2933 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 2934 { (eval echo "$as_me:2934: \"$ac_try\"") >&5
f73dda09
JA
2935 (eval $ac_try) 2>&5
2936 ac_status=$?
d3a24ed2 2937 echo "$as_me:2937: \$? = $ac_status" >&5
f73dda09
JA
2938 (exit $ac_status); }; }; then
2939 ac_cv_sys_large_files=1; break
2940else
2941 echo "$as_me: failed program was:" >&5
2942cat conftest.$ac_ext >&5
2943fi
2944rm -f conftest.$ac_objext conftest.$ac_ext
2945 break
2946done
2947fi
d3a24ed2 2948echo "$as_me:2948: result: $ac_cv_sys_large_files" >&5
f73dda09
JA
2949echo "${ECHO_T}$ac_cv_sys_large_files" >&6
2950if test "$ac_cv_sys_large_files" != no; then
bb70624e 2951
f73dda09
JA
2952cat >>confdefs.h <<EOF
2953#define _LARGE_FILES $ac_cv_sys_large_files
2954EOF
bb70624e 2955
f73dda09
JA
2956fi
2957rm -f conftest*
2958fi
cce855bc 2959
b72432fd
JA
2960SIGNAMES_H=lsignames.h
2961
cce855bc
JA
2962if test "x$cross_compiling" = "xyes"; then
2963 case "${host}" in
28ef6c31 2964 *-cygwin*)
cce855bc 2965 cross_cache=${srcdir}/cross-build/cygwin32.cache
b72432fd 2966 SIGNAMES_H='$(srcdir)/cross-build/win32sig.h'
cce855bc 2967 ;;
b72432fd
JA
2968 i[3456]86-*-beos*)
2969 cross_cache=${srcdir}/cross-build/x86-beos.cache
2970 SIGNAMES_H='${srcdir}/cross-build/beos-sig.h'
2971 ;;
2972 *) echo "configure: cross-compiling for $host is not supported" >&2
cce855bc
JA
2973 ;;
2974 esac
b72432fd
JA
2975 if test -n "${cross_cache}" && test -r "${cross_cache}"; then
2976 echo "loading cross-build cache file ${cross_cache}"
2977 . ${cross_cache}
2978 fi
2979 unset cross_cache
cce855bc
JA
2980fi
2981
2982if test -z "$CC_FOR_BUILD"; then
2983 if test "x$cross_compiling" = "xno"; then
2984 CC_FOR_BUILD='$(CC)'
2985 else
2986 CC_FOR_BUILD=gcc
2987 fi
2988fi
2989
ccc6cda3
JA
2990test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1
2991
2992test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O2"
2993
cce855bc
JA
2994if test "$opt_profiling" = "yes"; then
2995 PROFILE_FLAGS=-pg
b72432fd
JA
2996 case "$host_os" in
2997 solaris2*) ;;
2998 *) opt_static_link=yes ;;
2999 esac
7117c2d2 3000 DEBUG= MALLOC_DEBUG=
cce855bc
JA
3001fi
3002
3003if test "$opt_static_link" = yes; then
f73dda09
JA
3004 # if we're using gcc, add `-static' to LDFLAGS, except on Solaris >= 2
3005 if test -n "$GCC" || test "$ac_cv_c_compiler_gnu" = "yes"; then
b72432fd 3006 STATIC_LD="-static"
f73dda09
JA
3007 case "$host_os" in
3008 solaris2*) ;;
3009 *) LDFLAGS="$LDFLAGS -static" ;; # XXX experimental
3010 esac
cce855bc
JA
3011 fi
3012fi
3013
7117c2d2
JA
3014test -z "$CPPFLAGS_FOR_BUILD" && CPPFLAGS_FOR_BUILD="$CPPFLAGS"
3015test -z "$CFLAGS_FOR_BUILD" && CFLAGS_FOR_BUILD="-g"
3016
f73dda09 3017if test $ac_cv_c_compiler_gnu = yes; then
d3a24ed2 3018 echo "$as_me:3018: checking whether $CC needs -traditional" >&5
f73dda09
JA
3019echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
3020if test "${ac_cv_prog_gcc_traditional+set}" = set; then
3021 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3
JA
3022else
3023 ac_pattern="Autoconf.*'x'"
f73dda09 3024 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 3025#line 3025 "configure"
ccc6cda3
JA
3026#include "confdefs.h"
3027#include <sgtty.h>
3028Autoconf TIOCGETP
f73dda09 3029_ACEOF
ccc6cda3
JA
3030if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3031 egrep "$ac_pattern" >/dev/null 2>&1; then
ccc6cda3
JA
3032 ac_cv_prog_gcc_traditional=yes
3033else
ccc6cda3
JA
3034 ac_cv_prog_gcc_traditional=no
3035fi
3036rm -f conftest*
3037
ccc6cda3 3038 if test $ac_cv_prog_gcc_traditional = no; then
f73dda09 3039 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 3040#line 3040 "configure"
ccc6cda3
JA
3041#include "confdefs.h"
3042#include <termio.h>
3043Autoconf TCGETA
f73dda09 3044_ACEOF
ccc6cda3
JA
3045if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3046 egrep "$ac_pattern" >/dev/null 2>&1; then
ccc6cda3
JA
3047 ac_cv_prog_gcc_traditional=yes
3048fi
3049rm -f conftest*
3050
3051 fi
3052fi
d3a24ed2 3053echo "$as_me:3053: result: $ac_cv_prog_gcc_traditional" >&5
f73dda09 3054echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
ccc6cda3
JA
3055 if test $ac_cv_prog_gcc_traditional = yes; then
3056 CC="$CC -traditional"
3057 fi
3058fi
3059
f73dda09 3060if test "$opt_readline" = yes && test "$opt_with_installed_readline" != "no"
b72432fd 3061then
f73dda09
JA
3062 # If the user specified --with-installed-readline=PREFIX and PREFIX
3063 # is not `yes', set ac_cv_rl_prefix to PREFIX
3064 test $opt_with_installed_readline != "yes" && ac_cv_rl_prefix=$opt_with_installed_readline
b72432fd 3065
bb70624e
JA
3066if test "X$bash_cv_termcap_lib" = "X"; then
3067_bash_needmsg=yes
3068else
d3a24ed2 3069echo "$as_me:3069: checking which library has the termcap functions" >&5
f73dda09 3070echo $ECHO_N "checking which library has the termcap functions... $ECHO_C" >&6
bb70624e
JA
3071_bash_needmsg=
3072fi
f73dda09
JA
3073if test "${bash_cv_termcap_lib+set}" = set; then
3074 echo $ECHO_N "(cached) $ECHO_C" >&6
bb70624e 3075else
d3a24ed2
CR
3076 echo "$as_me:3076: checking for tgetent" >&5
3077echo $ECHO_N "checking for tgetent... $ECHO_C" >&6
3078if test "${ac_cv_func_tgetent+set}" = set; then
3079 echo $ECHO_N "(cached) $ECHO_C" >&6
3080else
3081 cat >conftest.$ac_ext <<_ACEOF
3082#line 3082 "configure"
3083#include "confdefs.h"
3084/* System header to define __stub macros and hopefully few prototypes,
3085 which can conflict with char tgetent (); below. */
3086#include <assert.h>
3087/* Override any gcc2 internal prototype to avoid an error. */
3088#ifdef __cplusplus
3089extern "C"
3090#endif
3091/* We use char because int might match the return type of a gcc2
3092 builtin and then its argument prototype would still apply. */
3093char tgetent ();
3094char (*f) ();
3095
3096int
3097main ()
3098{
3099/* The GNU C library defines this for functions which it implements
3100 to always fail with ENOSYS. Some functions are actually named
3101 something starting with __ and the normal name is an alias. */
3102#if defined (__stub_tgetent) || defined (__stub___tgetent)
3103choke me
3104#else
3105f = tgetent;
3106#endif
3107
3108 ;
3109 return 0;
3110}
3111_ACEOF
3112rm -f conftest.$ac_objext conftest$ac_exeext
3113if { (eval echo "$as_me:3113: \"$ac_link\"") >&5
3114 (eval $ac_link) 2>&5
3115 ac_status=$?
3116 echo "$as_me:3116: \$? = $ac_status" >&5
3117 (exit $ac_status); } &&
3118 { ac_try='test -s conftest$ac_exeext'
3119 { (eval echo "$as_me:3119: \"$ac_try\"") >&5
3120 (eval $ac_try) 2>&5
3121 ac_status=$?
3122 echo "$as_me:3122: \$? = $ac_status" >&5
3123 (exit $ac_status); }; }; then
3124 ac_cv_func_tgetent=yes
3125else
3126 echo "$as_me: failed program was:" >&5
3127cat conftest.$ac_ext >&5
3128ac_cv_func_tgetent=no
3129fi
3130rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3131fi
3132echo "$as_me:3132: result: $ac_cv_func_tgetent" >&5
3133echo "${ECHO_T}$ac_cv_func_tgetent" >&6
3134if test $ac_cv_func_tgetent = yes; then
3135 bash_cv_termcap_lib=libc
3136else
3137 echo "$as_me:3137: checking for tgetent in -ltermcap" >&5
f73dda09
JA
3138echo $ECHO_N "checking for tgetent in -ltermcap... $ECHO_C" >&6
3139if test "${ac_cv_lib_termcap_tgetent+set}" = set; then
3140 echo $ECHO_N "(cached) $ECHO_C" >&6
bb70624e 3141else
f73dda09 3142 ac_check_lib_save_LIBS=$LIBS
bb70624e 3143LIBS="-ltermcap $LIBS"
f73dda09 3144cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 3145#line 3145 "configure"
bb70624e 3146#include "confdefs.h"
f73dda09 3147
bb70624e 3148/* Override any gcc2 internal prototype to avoid an error. */
f73dda09
JA
3149#ifdef __cplusplus
3150extern "C"
3151#endif
bb70624e 3152/* We use char because int might match the return type of a gcc2
f73dda09
JA
3153 builtin and then its argument prototype would still apply. */
3154char tgetent ();
3155int
3156main ()
3157{
3158tgetent ();
3159 ;
3160 return 0;
3161}
3162_ACEOF
3163rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 3164if { (eval echo "$as_me:3164: \"$ac_link\"") >&5
f73dda09
JA
3165 (eval $ac_link) 2>&5
3166 ac_status=$?
d3a24ed2 3167 echo "$as_me:3167: \$? = $ac_status" >&5
f73dda09
JA
3168 (exit $ac_status); } &&
3169 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 3170 { (eval echo "$as_me:3170: \"$ac_try\"") >&5
f73dda09
JA
3171 (eval $ac_try) 2>&5
3172 ac_status=$?
d3a24ed2 3173 echo "$as_me:3173: \$? = $ac_status" >&5
f73dda09
JA
3174 (exit $ac_status); }; }; then
3175 ac_cv_lib_termcap_tgetent=yes
3176else
3177 echo "$as_me: failed program was:" >&5
3178cat conftest.$ac_ext >&5
3179ac_cv_lib_termcap_tgetent=no
3180fi
3181rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3182LIBS=$ac_check_lib_save_LIBS
3183fi
d3a24ed2 3184echo "$as_me:3184: result: $ac_cv_lib_termcap_tgetent" >&5
f73dda09
JA
3185echo "${ECHO_T}$ac_cv_lib_termcap_tgetent" >&6
3186if test $ac_cv_lib_termcap_tgetent = yes; then
bb70624e
JA
3187 bash_cv_termcap_lib=libtermcap
3188else
d3a24ed2 3189 echo "$as_me:3189: checking for tgetent in -ltinfo" >&5
f73dda09
JA
3190echo $ECHO_N "checking for tgetent in -ltinfo... $ECHO_C" >&6
3191if test "${ac_cv_lib_tinfo_tgetent+set}" = set; then
3192 echo $ECHO_N "(cached) $ECHO_C" >&6
bb70624e 3193else
f73dda09
JA
3194 ac_check_lib_save_LIBS=$LIBS
3195LIBS="-ltinfo $LIBS"
3196cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 3197#line 3197 "configure"
bb70624e 3198#include "confdefs.h"
f73dda09 3199
bb70624e 3200/* Override any gcc2 internal prototype to avoid an error. */
f73dda09
JA
3201#ifdef __cplusplus
3202extern "C"
3203#endif
bb70624e 3204/* We use char because int might match the return type of a gcc2
f73dda09
JA
3205 builtin and then its argument prototype would still apply. */
3206char tgetent ();
3207int
3208main ()
3209{
3210tgetent ();
3211 ;
3212 return 0;
3213}
3214_ACEOF
3215rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 3216if { (eval echo "$as_me:3216: \"$ac_link\"") >&5
f73dda09
JA
3217 (eval $ac_link) 2>&5
3218 ac_status=$?
d3a24ed2 3219 echo "$as_me:3219: \$? = $ac_status" >&5
f73dda09
JA
3220 (exit $ac_status); } &&
3221 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 3222 { (eval echo "$as_me:3222: \"$ac_try\"") >&5
f73dda09
JA
3223 (eval $ac_try) 2>&5
3224 ac_status=$?
d3a24ed2 3225 echo "$as_me:3225: \$? = $ac_status" >&5
f73dda09
JA
3226 (exit $ac_status); }; }; then
3227 ac_cv_lib_tinfo_tgetent=yes
3228else
3229 echo "$as_me: failed program was:" >&5
3230cat conftest.$ac_ext >&5
3231ac_cv_lib_tinfo_tgetent=no
3232fi
3233rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3234LIBS=$ac_check_lib_save_LIBS
3235fi
d3a24ed2 3236echo "$as_me:3236: result: $ac_cv_lib_tinfo_tgetent" >&5
f73dda09
JA
3237echo "${ECHO_T}$ac_cv_lib_tinfo_tgetent" >&6
3238if test $ac_cv_lib_tinfo_tgetent = yes; then
7117c2d2 3239 bash_cv_termcap_lib=libtinfo
f73dda09 3240else
d3a24ed2 3241 echo "$as_me:3241: checking for tgetent in -lcurses" >&5
f73dda09
JA
3242echo $ECHO_N "checking for tgetent in -lcurses... $ECHO_C" >&6
3243if test "${ac_cv_lib_curses_tgetent+set}" = set; then
3244 echo $ECHO_N "(cached) $ECHO_C" >&6
3245else
3246 ac_check_lib_save_LIBS=$LIBS
3247LIBS="-lcurses $LIBS"
3248cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 3249#line 3249 "configure"
f73dda09 3250#include "confdefs.h"
b72432fd 3251
f73dda09
JA
3252/* Override any gcc2 internal prototype to avoid an error. */
3253#ifdef __cplusplus
3254extern "C"
3255#endif
3256/* We use char because int might match the return type of a gcc2
3257 builtin and then its argument prototype would still apply. */
3258char tgetent ();
3259int
3260main ()
3261{
3262tgetent ();
3263 ;
3264 return 0;
3265}
3266_ACEOF
3267rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 3268if { (eval echo "$as_me:3268: \"$ac_link\"") >&5
f73dda09
JA
3269 (eval $ac_link) 2>&5
3270 ac_status=$?
d3a24ed2 3271 echo "$as_me:3271: \$? = $ac_status" >&5
f73dda09
JA
3272 (exit $ac_status); } &&
3273 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 3274 { (eval echo "$as_me:3274: \"$ac_try\"") >&5
f73dda09
JA
3275 (eval $ac_try) 2>&5
3276 ac_status=$?
d3a24ed2 3277 echo "$as_me:3277: \$? = $ac_status" >&5
f73dda09
JA
3278 (exit $ac_status); }; }; then
3279 ac_cv_lib_curses_tgetent=yes
3280else
3281 echo "$as_me: failed program was:" >&5
3282cat conftest.$ac_ext >&5
3283ac_cv_lib_curses_tgetent=no
3284fi
3285rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3286LIBS=$ac_check_lib_save_LIBS
3287fi
d3a24ed2 3288echo "$as_me:3288: result: $ac_cv_lib_curses_tgetent" >&5
f73dda09
JA
3289echo "${ECHO_T}$ac_cv_lib_curses_tgetent" >&6
3290if test $ac_cv_lib_curses_tgetent = yes; then
bb70624e
JA
3291 bash_cv_termcap_lib=libcurses
3292else
d3a24ed2 3293 echo "$as_me:3293: checking for tgetent in -lncurses" >&5
f73dda09
JA
3294echo $ECHO_N "checking for tgetent in -lncurses... $ECHO_C" >&6
3295if test "${ac_cv_lib_ncurses_tgetent+set}" = set; then
3296 echo $ECHO_N "(cached) $ECHO_C" >&6
bb70624e 3297else
f73dda09 3298 ac_check_lib_save_LIBS=$LIBS
bb70624e 3299LIBS="-lncurses $LIBS"
f73dda09 3300cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 3301#line 3301 "configure"
bb70624e 3302#include "confdefs.h"
f73dda09 3303
bb70624e 3304/* Override any gcc2 internal prototype to avoid an error. */
f73dda09
JA
3305#ifdef __cplusplus
3306extern "C"
3307#endif
bb70624e 3308/* We use char because int might match the return type of a gcc2
f73dda09
JA
3309 builtin and then its argument prototype would still apply. */
3310char tgetent ();
3311int
3312main ()
3313{
3314tgetent ();
3315 ;
3316 return 0;
3317}
3318_ACEOF
3319rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 3320if { (eval echo "$as_me:3320: \"$ac_link\"") >&5
f73dda09
JA
3321 (eval $ac_link) 2>&5
3322 ac_status=$?
d3a24ed2 3323 echo "$as_me:3323: \$? = $ac_status" >&5
f73dda09
JA
3324 (exit $ac_status); } &&
3325 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 3326 { (eval echo "$as_me:3326: \"$ac_try\"") >&5
f73dda09
JA
3327 (eval $ac_try) 2>&5
3328 ac_status=$?
d3a24ed2 3329 echo "$as_me:3329: \$? = $ac_status" >&5
f73dda09
JA
3330 (exit $ac_status); }; }; then
3331 ac_cv_lib_ncurses_tgetent=yes
3332else
3333 echo "$as_me: failed program was:" >&5
3334cat conftest.$ac_ext >&5
3335ac_cv_lib_ncurses_tgetent=no
3336fi
3337rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3338LIBS=$ac_check_lib_save_LIBS
3339fi
d3a24ed2 3340echo "$as_me:3340: result: $ac_cv_lib_ncurses_tgetent" >&5
f73dda09
JA
3341echo "${ECHO_T}$ac_cv_lib_ncurses_tgetent" >&6
3342if test $ac_cv_lib_ncurses_tgetent = yes; then
3343 bash_cv_termcap_lib=libncurses
bb70624e 3344else
f73dda09 3345 bash_cv_termcap_lib=gnutermcap
bb70624e 3346fi
bb70624e 3347
bb70624e
JA
3348fi
3349
3350fi
3351
3352fi
3353
3354fi
3355
d3a24ed2
CR
3356fi
3357
bb70624e 3358if test "X$_bash_needmsg" = "Xyes"; then
d3a24ed2 3359echo "$as_me:3359: checking which library has the termcap functions" >&5
f73dda09 3360echo $ECHO_N "checking which library has the termcap functions... $ECHO_C" >&6
bb70624e 3361fi
d3a24ed2 3362echo "$as_me:3362: result: using $bash_cv_termcap_lib" >&5
f73dda09 3363echo "${ECHO_T}using $bash_cv_termcap_lib" >&6
bb70624e
JA
3364if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
3365LDFLAGS="$LDFLAGS -L./lib/termcap"
3366TERMCAP_LIB="./lib/termcap/libtermcap.a"
3367TERMCAP_DEP="./lib/termcap/libtermcap.a"
3368elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
3369TERMCAP_LIB=-ltermcap
3370TERMCAP_DEP=
f73dda09
JA
3371elif test $bash_cv_termcap_lib = libtinfo; then
3372TERMCAP_LIB=-ltinfo
3373TERMCAP_DEP=
bb70624e
JA
3374elif test $bash_cv_termcap_lib = libncurses; then
3375TERMCAP_LIB=-lncurses
3376TERMCAP_DEP=
d3a24ed2
CR
3377elif test $bash_cv_termcap_lib = libc; then
3378TERMCAP_LIB=
3379TERMCAP_DEP=
bb70624e
JA
3380else
3381TERMCAP_LIB=-lcurses
3382TERMCAP_DEP=
3383fi
3384
d3a24ed2 3385echo "$as_me:3385: checking version of installed readline library" >&5
f73dda09
JA
3386echo $ECHO_N "checking version of installed readline library... $ECHO_C" >&6
3387
3388# What a pain in the ass this is.
3389
3390# save cpp and ld options
3391_save_CFLAGS="$CFLAGS"
3392_save_LDFLAGS="$LDFLAGS"
3393_save_LIBS="$LIBS"
3394
3395# Don't set ac_cv_rl_prefix if the caller has already assigned a value. This
3396# allows the caller to do something like $_rl_prefix=$withval if the user
3397# specifies --with-installed-readline=PREFIX as an argument to configure
3398
3399if test -z "$ac_cv_rl_prefix"; then
3400test "x$prefix" = xNONE && ac_cv_rl_prefix=$ac_default_prefix || ac_cv_rl_prefix=${prefix}
3401fi
3402
3403eval ac_cv_rl_includedir=${ac_cv_rl_prefix}/include
3404eval ac_cv_rl_libdir=${ac_cv_rl_prefix}/lib
3405
3406LIBS="$LIBS -lreadline ${TERMCAP_LIB}"
3407CFLAGS="$CFLAGS -I${ac_cv_rl_includedir}"
3408LDFLAGS="$LDFLAGS -L${ac_cv_rl_libdir}"
3409
d3a24ed2
CR
3410if test "${ac_cv_rl_version+set}" = set; then
3411 echo $ECHO_N "(cached) $ECHO_C" >&6
3412else
3413 if test "$cross_compiling" = yes; then
f73dda09
JA
3414 ac_cv_rl_version='4.2'
3415else
3416 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 3417#line 3417 "configure"
f73dda09
JA
3418#include "confdefs.h"
3419
3420#include <stdio.h>
3421#include <readline/readline.h>
3422
3423main()
3424{
3425 FILE *fp;
3426 fp = fopen("conftest.rlv", "w");
3427 if (fp == 0) exit(1);
3428 fprintf(fp, "%s\n", rl_library_version ? rl_library_version : "0.0");
3429 fclose(fp);
3430 exit(0);
3431}
3432
3433_ACEOF
3434rm -f conftest$ac_exeext
d3a24ed2 3435if { (eval echo "$as_me:3435: \"$ac_link\"") >&5
f73dda09
JA
3436 (eval $ac_link) 2>&5
3437 ac_status=$?
d3a24ed2 3438 echo "$as_me:3438: \$? = $ac_status" >&5
f73dda09 3439 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3a24ed2 3440 { (eval echo "$as_me:3440: \"$ac_try\"") >&5
f73dda09
JA
3441 (eval $ac_try) 2>&5
3442 ac_status=$?
d3a24ed2 3443 echo "$as_me:3443: \$? = $ac_status" >&5
f73dda09
JA
3444 (exit $ac_status); }; }; then
3445 ac_cv_rl_version=`cat conftest.rlv`
3446else
3447 echo "$as_me: program exited with status $ac_status" >&5
3448echo "$as_me: failed program was:" >&5
3449cat conftest.$ac_ext >&5
3450ac_cv_rl_version='0.0'
3451fi
3452rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3453fi
d3a24ed2 3454fi
f73dda09
JA
3455
3456CFLAGS="$_save_CFLAGS"
3457LDFLAGS="$_save_LDFLAGS"
3458LIBS="$_save_LIBS"
3459
3460RL_MAJOR=0
3461RL_MINOR=0
3462
3463# (
3464case "$ac_cv_rl_version" in
34652*|3*|4*|5*|6*|7*|8*|9*)
3466 RL_MAJOR=`echo $ac_cv_rl_version | sed 's:\..*$::'`
7117c2d2 3467 RL_MINOR=`echo $ac_cv_rl_version | sed -e 's:^.*\.::' -e 's:[a-zA-Z]*$::'`
f73dda09
JA
3468 ;;
3469esac
3470
3471# (((
3472case $RL_MAJOR in
3473[0-9][0-9]) _RL_MAJOR=$RL_MAJOR ;;
3474[0-9]) _RL_MAJOR=0$RL_MAJOR ;;
3475*) _RL_MAJOR=00 ;;
3476esac
3477
3478# (((
3479case $RL_MINOR in
3480[0-9][0-9]) _RL_MINOR=$RL_MINOR ;;
3481[0-9]) _RL_MINOR=0$RL_MINOR ;;
3482*) _RL_MINOR=00 ;;
3483esac
3484
3485RL_VERSION="0x${_RL_MAJOR}${_RL_MINOR}"
3486
3487# Readline versions greater than 4.2 have these defines in readline.h
3488
3489if test $ac_cv_rl_version = '0.0' ; then
d3a24ed2 3490 { echo "$as_me:3490: WARNING: Could not test version of installed readline library." >&5
f73dda09
JA
3491echo "$as_me: WARNING: Could not test version of installed readline library." >&2;}
3492elif test $RL_MAJOR -gt 4 || { test $RL_MAJOR = 4 && test $RL_MINOR -gt 2 ; } ; then
3493 # set these for use by the caller
3494 RL_PREFIX=$ac_cv_rl_prefix
3495 RL_LIBDIR=$ac_cv_rl_libdir
3496 RL_INCLUDEDIR=$ac_cv_rl_includedir
d3a24ed2 3497 echo "$as_me:3497: result: $ac_cv_rl_version" >&5
f73dda09
JA
3498echo "${ECHO_T}$ac_cv_rl_version" >&6
3499else
3500
3501cat >>confdefs.h <<EOF
3502#define RL_READLINE_VERSION $RL_VERSION
3503EOF
3504
3505cat >>confdefs.h <<EOF
3506#define RL_VERSION_MAJOR $RL_MAJOR
3507EOF
3508
3509cat >>confdefs.h <<EOF
3510#define RL_VERSION_MINOR $RL_MINOR
3511EOF
3512
3513# set these for use by the caller
3514RL_PREFIX=$ac_cv_rl_prefix
3515RL_LIBDIR=$ac_cv_rl_libdir
3516RL_INCLUDEDIR=$ac_cv_rl_includedir
bb70624e 3517
d3a24ed2 3518echo "$as_me:3518: result: $ac_cv_rl_version" >&5
f73dda09 3519echo "${ECHO_T}$ac_cv_rl_version" >&6
bb70624e 3520
f73dda09 3521fi
bb70624e 3522
f73dda09 3523 case "$ac_cv_rl_version" in
d3a24ed2 3524 5*|6*|7*|8*|9*) ;;
f73dda09 3525 *) opt_with_installed_readline=no
d3a24ed2 3526 { echo "$as_me:3526: WARNING: installed readline library is too old to be linked with bash" >&5
f73dda09 3527echo "$as_me: WARNING: installed readline library is too old to be linked with bash" >&2;}
d3a24ed2 3528 { echo "$as_me:3528: WARNING: using private bash version" >&5
f73dda09 3529echo "$as_me: WARNING: using private bash version" >&2;}
bb70624e
JA
3530 ;;
3531 esac
bb70624e
JA
3532fi
3533
3534if test $opt_readline = yes; then
f73dda09 3535 cat >>confdefs.h <<\EOF
bb70624e
JA
3536#define READLINE 1
3537EOF
3538
3539 READLINE_LIB=-lreadline
f73dda09 3540 if test "$opt_with_installed_readline" != "no" ; then
d3a24ed2
CR
3541 case "$opt_with_installed_readline" in
3542 yes) RL_INCLUDE= ;;
3543 *) case "$RL_INCLUDEDIR" in
3544 /usr/include) ;;
3545 *) RL_INCLUDE='-I${RL_INCLUDEDIR}' ;;
3546 esac
3547 ;;
f73dda09 3548 esac
bb70624e 3549 READLINE_DEP=
bb70624e
JA
3550 else
3551 RL_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
3552 READLINE_DEP='$(READLINE_LIBRARY)'
3553 fi
3554else
3555 RL_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
3556 READLINE_LIB= READLINE_DEP=
3557fi
3558if test $opt_history = yes || test $opt_bang_history = yes; then
3559 if test $opt_history = yes; then
f73dda09 3560 cat >>confdefs.h <<\EOF
bb70624e
JA
3561#define HISTORY 1
3562EOF
3563
3564 fi
3565 if test $opt_bang_history = yes; then
f73dda09 3566 cat >>confdefs.h <<\EOF
bb70624e
JA
3567#define BANG_HISTORY 1
3568EOF
b72432fd
JA
3569
3570 fi
3571 HISTORY_LIB=-lhistory
f73dda09
JA
3572 if test "$opt_with_installed_readline" != "no"; then
3573 HIST_LIBDIR=$RL_LIBDIR
b72432fd 3574 HISTORY_DEP=
d3a24ed2
CR
3575 case "$opt_with_installed_readline" in
3576 yes) RL_INCLUDE= ;;
3577 *) case "$RL_INCLUDEDIR" in
3578 /usr/include) ;;
3579 *) RL_INCLUDE='-I${RL_INCLUDEDIR}' ;;
3580 esac
3581 ;;
f73dda09 3582 esac
b72432fd
JA
3583 else
3584 HIST_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
3585 HISTORY_DEP='$(HISTORY_LIBRARY)'
3586 fi
3587else
3588 HIST_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
3589 HISTORY_LIB= HISTORY_DEP=
3590fi
3591
ccc6cda3
JA
3592# Find a good install program. We prefer a C program (faster),
3593# so one script is as good as another. But avoid the broken or
3594# incompatible versions:
3595# SysV /etc/install, /usr/sbin/install
3596# SunOS /usr/etc/install
3597# IRIX /sbin/install
3598# AIX /bin/install
f73dda09 3599# AmigaOS /C/install, which installs bootblocks on floppy discs
bb70624e 3600# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ccc6cda3
JA
3601# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3602# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3603# ./install, which can be erroneously created by make from ./install.sh.
d3a24ed2 3604echo "$as_me:3604: checking for a BSD compatible install" >&5
f73dda09 3605echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
ccc6cda3 3606if test -z "$INSTALL"; then
f73dda09
JA
3607if test "${ac_cv_path_install+set}" = set; then
3608 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 3609else
f73dda09 3610 ac_save_IFS=$IFS; IFS=$ac_path_separator
ccc6cda3 3611 for ac_dir in $PATH; do
f73dda09 3612 IFS=$ac_save_IFS
ccc6cda3 3613 # Account for people who put trailing slashes in PATH elements.
f73dda09
JA
3614 case $ac_dir/ in
3615 / | ./ | .// | /cC/* \
3616 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3617 | /usr/ucb/* ) ;;
ccc6cda3
JA
3618 *)
3619 # OSF1 and SCO ODT 3.0 have their own names for install.
bb70624e
JA
3620 # Don't use installbsd from OSF since it installs stuff as root
3621 # by default.
3622 for ac_prog in ginstall scoinst install; do
f73dda09 3623 if $as_executable_p "$ac_dir/$ac_prog"; then
ccc6cda3 3624 if test $ac_prog = install &&
f73dda09 3625 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
ccc6cda3 3626 # AIX install. It has an incompatible calling convention.
ccc6cda3 3627 :
f73dda09
JA
3628 elif test $ac_prog = install &&
3629 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3630 # program-specific install script used by HP pwplus--don't use.
3631 :
ccc6cda3
JA
3632 else
3633 ac_cv_path_install="$ac_dir/$ac_prog -c"
3634 break 2
3635 fi
3636 fi
3637 done
3638 ;;
3639 esac
3640 done
ccc6cda3
JA
3641
3642fi
3643 if test "${ac_cv_path_install+set}" = set; then
f73dda09 3644 INSTALL=$ac_cv_path_install
ccc6cda3
JA
3645 else
3646 # As a last resort, use the slow shell script. We don't cache a
3647 # path for INSTALL within a source directory, because that will
3648 # break other packages using the cache if that directory is
3649 # removed, or if the path is relative.
f73dda09 3650 INSTALL=$ac_install_sh
ccc6cda3
JA
3651 fi
3652fi
d3a24ed2 3653echo "$as_me:3653: result: $INSTALL" >&5
f73dda09 3654echo "${ECHO_T}$INSTALL" >&6
ccc6cda3
JA
3655
3656# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3657# It thinks the first close brace ends the variable substitution.
3658test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3659
f73dda09 3660test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
bb70624e 3661
ccc6cda3
JA
3662test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3663
3664# Extract the first word of "ar", so it can be a program name with args.
3665set dummy ar; ac_word=$2
d3a24ed2 3666echo "$as_me:3666: checking for $ac_word" >&5
f73dda09
JA
3667echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3668if test "${ac_cv_prog_AR+set}" = set; then
3669 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3
JA
3670else
3671 if test -n "$AR"; then
3672 ac_cv_prog_AR="$AR" # Let the user override the test.
3673else
f73dda09
JA
3674 ac_save_IFS=$IFS; IFS=$ac_path_separator
3675ac_dummy="$PATH"
3676for ac_dir in $ac_dummy; do
3677 IFS=$ac_save_IFS
3678 test -z "$ac_dir" && ac_dir=.
3679 $as_executable_p "$ac_dir/$ac_word" || continue
3680ac_cv_prog_AR=""
d3a24ed2 3681echo "$as_me:3681: found $ac_dir/$ac_word" >&5
f73dda09
JA
3682break
3683done
3684
3685 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
ccc6cda3
JA
3686fi
3687fi
f73dda09 3688AR=$ac_cv_prog_AR
ccc6cda3 3689if test -n "$AR"; then
d3a24ed2 3690 echo "$as_me:3690: result: $AR" >&5
f73dda09 3691echo "${ECHO_T}$AR" >&6
ccc6cda3 3692else
d3a24ed2 3693 echo "$as_me:3693: result: no" >&5
f73dda09 3694echo "${ECHO_T}no" >&6
ccc6cda3
JA
3695fi
3696
b72432fd 3697test -n "$ARFLAGS" || ARFLAGS="cr"
f73dda09
JA
3698if test -n "$ac_tool_prefix"; then
3699 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3700set dummy ${ac_tool_prefix}ranlib; ac_word=$2
d3a24ed2 3701echo "$as_me:3701: checking for $ac_word" >&5
f73dda09
JA
3702echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3703if test "${ac_cv_prog_RANLIB+set}" = set; then
3704 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3
JA
3705else
3706 if test -n "$RANLIB"; then
3707 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3708else
f73dda09
JA
3709 ac_save_IFS=$IFS; IFS=$ac_path_separator
3710ac_dummy="$PATH"
3711for ac_dir in $ac_dummy; do
3712 IFS=$ac_save_IFS
3713 test -z "$ac_dir" && ac_dir=.
3714 $as_executable_p "$ac_dir/$ac_word" || continue
3715ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
d3a24ed2 3716echo "$as_me:3716: found $ac_dir/$ac_word" >&5
f73dda09
JA
3717break
3718done
3719
ccc6cda3
JA
3720fi
3721fi
f73dda09 3722RANLIB=$ac_cv_prog_RANLIB
ccc6cda3 3723if test -n "$RANLIB"; then
d3a24ed2 3724 echo "$as_me:3724: result: $RANLIB" >&5
f73dda09
JA
3725echo "${ECHO_T}$RANLIB" >&6
3726else
d3a24ed2 3727 echo "$as_me:3727: result: no" >&5
f73dda09
JA
3728echo "${ECHO_T}no" >&6
3729fi
3730
3731fi
3732if test -z "$ac_cv_prog_RANLIB"; then
3733 ac_ct_RANLIB=$RANLIB
3734 # Extract the first word of "ranlib", so it can be a program name with args.
3735set dummy ranlib; ac_word=$2
d3a24ed2 3736echo "$as_me:3736: checking for $ac_word" >&5
f73dda09
JA
3737echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3738if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3739 echo $ECHO_N "(cached) $ECHO_C" >&6
3740else
3741 if test -n "$ac_ct_RANLIB"; then
3742 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3743else
3744 ac_save_IFS=$IFS; IFS=$ac_path_separator
3745ac_dummy="$PATH"
3746for ac_dir in $ac_dummy; do
3747 IFS=$ac_save_IFS
3748 test -z "$ac_dir" && ac_dir=.
3749 $as_executable_p "$ac_dir/$ac_word" || continue
3750ac_cv_prog_ac_ct_RANLIB="ranlib"
d3a24ed2 3751echo "$as_me:3751: found $ac_dir/$ac_word" >&5
f73dda09
JA
3752break
3753done
3754
3755 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3756fi
3757fi
3758ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3759if test -n "$ac_ct_RANLIB"; then
d3a24ed2 3760 echo "$as_me:3760: result: $ac_ct_RANLIB" >&5
f73dda09 3761echo "${ECHO_T}$ac_ct_RANLIB" >&6
ccc6cda3 3762else
d3a24ed2 3763 echo "$as_me:3763: result: no" >&5
f73dda09
JA
3764echo "${ECHO_T}no" >&6
3765fi
3766
3767 RANLIB=$ac_ct_RANLIB
3768else
3769 RANLIB="$ac_cv_prog_RANLIB"
ccc6cda3
JA
3770fi
3771
3772for ac_prog in 'bison -y' byacc
3773do
f73dda09 3774 # Extract the first word of "$ac_prog", so it can be a program name with args.
ccc6cda3 3775set dummy $ac_prog; ac_word=$2
d3a24ed2 3776echo "$as_me:3776: checking for $ac_word" >&5
f73dda09
JA
3777echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3778if test "${ac_cv_prog_YACC+set}" = set; then
3779 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3
JA
3780else
3781 if test -n "$YACC"; then
3782 ac_cv_prog_YACC="$YACC" # Let the user override the test.
3783else
f73dda09
JA
3784 ac_save_IFS=$IFS; IFS=$ac_path_separator
3785ac_dummy="$PATH"
3786for ac_dir in $ac_dummy; do
3787 IFS=$ac_save_IFS
3788 test -z "$ac_dir" && ac_dir=.
3789 $as_executable_p "$ac_dir/$ac_word" || continue
3790ac_cv_prog_YACC="$ac_prog"
d3a24ed2 3791echo "$as_me:3791: found $ac_dir/$ac_word" >&5
f73dda09
JA
3792break
3793done
3794
ccc6cda3
JA
3795fi
3796fi
f73dda09 3797YACC=$ac_cv_prog_YACC
ccc6cda3 3798if test -n "$YACC"; then
d3a24ed2 3799 echo "$as_me:3799: result: $YACC" >&5
f73dda09 3800echo "${ECHO_T}$YACC" >&6
ccc6cda3 3801else
d3a24ed2 3802 echo "$as_me:3802: result: no" >&5
f73dda09 3803echo "${ECHO_T}no" >&6
ccc6cda3
JA
3804fi
3805
f73dda09 3806 test -n "$YACC" && break
ccc6cda3
JA
3807done
3808test -n "$YACC" || YACC="yacc"
3809
d3a24ed2 3810echo "$as_me:3810: checking whether ${MAKE-make} sets \${MAKE}" >&5
f73dda09
JA
3811echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3812set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3813if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3814 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 3815else
f73dda09 3816 cat >conftest.make <<\EOF
ccc6cda3
JA
3817all:
3818 @echo 'ac_maketemp="${MAKE}"'
3819EOF
3820# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
f73dda09 3821eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
ccc6cda3
JA
3822if test -n "$ac_maketemp"; then
3823 eval ac_cv_prog_make_${ac_make}_set=yes
3824else
3825 eval ac_cv_prog_make_${ac_make}_set=no
3826fi
f73dda09 3827rm -f conftest.make
ccc6cda3
JA
3828fi
3829if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
d3a24ed2 3830 echo "$as_me:3830: result: yes" >&5
f73dda09 3831echo "${ECHO_T}yes" >&6
ccc6cda3
JA
3832 SET_MAKE=
3833else
d3a24ed2 3834 echo "$as_me:3834: result: no" >&5
f73dda09 3835echo "${ECHO_T}no" >&6
ccc6cda3
JA
3836 SET_MAKE="MAKE=${MAKE-make}"
3837fi
3838
b72432fd 3839case "$host_os" in
bb70624e 3840opennt*|interix*) MAKE_SHELL="$INTERIX_ROOT/bin/sh" ;;
b72432fd
JA
3841*) MAKE_SHELL=/bin/sh ;;
3842esac
3843
f73dda09
JA
3844cat >>confdefs.h <<\EOF
3845#define _GNU_SOURCE 1
3846EOF
b72432fd 3847
d3a24ed2 3848echo "$as_me:3848: checking for $CC option to accept ANSI C" >&5
f73dda09
JA
3849echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
3850if test "${ac_cv_prog_cc_stdc+set}" = set; then
3851 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 3852else
f73dda09
JA
3853 ac_cv_prog_cc_stdc=no
3854ac_save_CC=$CC
3855cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 3856#line 3856 "configure"
ccc6cda3 3857#include "confdefs.h"
f73dda09
JA
3858#include <stdarg.h>
3859#include <stdio.h>
3860#include <sys/types.h>
3861#include <sys/stat.h>
3862/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3863struct buf { int x; };
3864FILE * (*rcsopen) (struct buf *, struct stat *, int);
3865static char *e (p, i)
3866 char **p;
3867 int i;
3868{
3869 return p[i];
3870}
3871static char *f (char * (*g) (char **, int), char **p, ...)
3872{
3873 char *s;
3874 va_list v;
3875 va_start (v,p);
3876 s = g (p, va_arg (v,int));
3877 va_end (v);
3878 return s;
3879}
3880int test (int i, double x);
3881struct s1 {int (*f) (int a);};
3882struct s2 {int (*f) (double a);};
3883int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3884int argc;
3885char **argv;
3886int
3887main ()
3888{
3889return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3890 ;
3891 return 0;
3892}
3893_ACEOF
3894# Don't try gcc -ansi; that turns off useful extensions and
3895# breaks some systems' header files.
3896# AIX -qlanglvl=ansi
3897# Ultrix and OSF/1 -std1
3898# HP-UX 10.20 and later -Ae
3899# HP-UX older versions -Aa -D_HPUX_SOURCE
3900# SVR4 -Xc -D__EXTENSIONS__
3901for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3902do
3903 CC="$ac_save_CC $ac_arg"
3904 rm -f conftest.$ac_objext
d3a24ed2 3905if { (eval echo "$as_me:3905: \"$ac_compile\"") >&5
f73dda09
JA
3906 (eval $ac_compile) 2>&5
3907 ac_status=$?
d3a24ed2 3908 echo "$as_me:3908: \$? = $ac_status" >&5
f73dda09
JA
3909 (exit $ac_status); } &&
3910 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 3911 { (eval echo "$as_me:3911: \"$ac_try\"") >&5
f73dda09
JA
3912 (eval $ac_try) 2>&5
3913 ac_status=$?
d3a24ed2 3914 echo "$as_me:3914: \$? = $ac_status" >&5
f73dda09
JA
3915 (exit $ac_status); }; }; then
3916 ac_cv_prog_cc_stdc=$ac_arg
3917break
3918else
3919 echo "$as_me: failed program was:" >&5
3920cat conftest.$ac_ext >&5
3921fi
3922rm -f conftest.$ac_objext
3923done
3924rm -f conftest.$ac_ext conftest.$ac_objext
3925CC=$ac_save_CC
ccc6cda3
JA
3926
3927fi
3928
f73dda09
JA
3929case "x$ac_cv_prog_cc_stdc" in
3930 x|xno)
d3a24ed2 3931 echo "$as_me:3931: result: none needed" >&5
f73dda09
JA
3932echo "${ECHO_T}none needed" >&6 ;;
3933 *)
d3a24ed2 3934 echo "$as_me:3934: result: $ac_cv_prog_cc_stdc" >&5
f73dda09
JA
3935echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
3936 CC="$CC $ac_cv_prog_cc_stdc" ;;
3937esac
3938
d3a24ed2 3939echo "$as_me:3939: checking for an ANSI C-conforming const" >&5
f73dda09
JA
3940echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
3941if test "${ac_cv_c_const+set}" = set; then
3942 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 3943else
f73dda09 3944 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 3945#line 3945 "configure"
ccc6cda3
JA
3946#include "confdefs.h"
3947
f73dda09
JA
3948int
3949main ()
3950{
3951/* FIXME: Include the comments suggested by Paul. */
3952#ifndef __cplusplus
3953 /* Ultrix mips cc rejects this. */
3954 typedef int charset[2];
3955 const charset x;
3956 /* SunOS 4.1.1 cc rejects this. */
3957 char const *const *ccp;
3958 char **p;
3959 /* NEC SVR4.0.2 mips cc rejects this. */
3960 struct point {int x, y;};
3961 static struct point const zero = {0,0};
3962 /* AIX XL C 1.02.0.0 rejects this.
3963 It does not let you subtract one const X* pointer from another in
3964 an arm of an if-expression whose if-part is not a constant
3965 expression */
3966 const char *g = "string";
3967 ccp = &g + (g ? g-g : 0);
3968 /* HPUX 7.0 cc rejects these. */
3969 ++ccp;
3970 p = (char**) ccp;
3971 ccp = (char const *const *) p;
3972 { /* SCO 3.2v4 cc rejects this. */
3973 char *t;
3974 char const *s = 0 ? (char *) 0 : (char const *) 0;
3975
3976 *t++ = 0;
3977 }
3978 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
3979 int x[] = {25, 17};
3980 const int *foo = &x[0];
3981 ++foo;
3982 }
3983 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3984 typedef const int *iptr;
3985 iptr p = 0;
3986 ++p;
3987 }
3988 { /* AIX XL C 1.02.0.0 rejects this saying
3989 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3990 struct s { int j; const int *ap[3]; };
3991 struct s *b; b->j = 5;
3992 }
3993 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3994 const int foo = 10;
3995 }
ccc6cda3
JA
3996#endif
3997
f73dda09
JA
3998 ;
3999 return 0;
4000}
4001_ACEOF
4002rm -f conftest.$ac_objext
d3a24ed2 4003if { (eval echo "$as_me:4003: \"$ac_compile\"") >&5
f73dda09
JA
4004 (eval $ac_compile) 2>&5
4005 ac_status=$?
d3a24ed2 4006 echo "$as_me:4006: \$? = $ac_status" >&5
f73dda09
JA
4007 (exit $ac_status); } &&
4008 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 4009 { (eval echo "$as_me:4009: \"$ac_try\"") >&5
f73dda09
JA
4010 (eval $ac_try) 2>&5
4011 ac_status=$?
d3a24ed2 4012 echo "$as_me:4012: \$? = $ac_status" >&5
f73dda09
JA
4013 (exit $ac_status); }; }; then
4014 ac_cv_c_const=yes
4015else
4016 echo "$as_me: failed program was:" >&5
4017cat conftest.$ac_ext >&5
4018ac_cv_c_const=no
4019fi
4020rm -f conftest.$ac_objext conftest.$ac_ext
4021fi
d3a24ed2 4022echo "$as_me:4022: result: $ac_cv_c_const" >&5
f73dda09
JA
4023echo "${ECHO_T}$ac_cv_c_const" >&6
4024if test $ac_cv_c_const = no; then
4025
4026cat >>confdefs.h <<\EOF
4027#define const
ccc6cda3
JA
4028EOF
4029
4030fi
4031
d3a24ed2 4032echo "$as_me:4032: checking for inline" >&5
f73dda09
JA
4033echo $ECHO_N "checking for inline... $ECHO_C" >&6
4034if test "${ac_cv_c_inline+set}" = set; then
4035 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 4036else
f73dda09
JA
4037 ac_cv_c_inline=no
4038for ac_kw in inline __inline__ __inline; do
4039 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 4040#line 4040 "configure"
ccc6cda3 4041#include "confdefs.h"
f73dda09
JA
4042#ifndef __cplusplus
4043static $ac_kw int static_foo () {return 0; }
4044$ac_kw int foo () {return 0; }
ccc6cda3
JA
4045#endif
4046
f73dda09
JA
4047_ACEOF
4048rm -f conftest.$ac_objext
d3a24ed2 4049if { (eval echo "$as_me:4049: \"$ac_compile\"") >&5
f73dda09
JA
4050 (eval $ac_compile) 2>&5
4051 ac_status=$?
d3a24ed2 4052 echo "$as_me:4052: \$? = $ac_status" >&5
f73dda09
JA
4053 (exit $ac_status); } &&
4054 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 4055 { (eval echo "$as_me:4055: \"$ac_try\"") >&5
f73dda09
JA
4056 (eval $ac_try) 2>&5
4057 ac_status=$?
d3a24ed2 4058 echo "$as_me:4058: \$? = $ac_status" >&5
f73dda09
JA
4059 (exit $ac_status); }; }; then
4060 ac_cv_c_inline=$ac_kw; break
4061else
4062 echo "$as_me: failed program was:" >&5
4063cat conftest.$ac_ext >&5
4064fi
4065rm -f conftest.$ac_objext conftest.$ac_ext
4066done
ccc6cda3
JA
4067
4068fi
d3a24ed2 4069echo "$as_me:4069: result: $ac_cv_c_inline" >&5
f73dda09
JA
4070echo "${ECHO_T}$ac_cv_c_inline" >&6
4071case $ac_cv_c_inline in
4072 inline | yes) ;;
4073 no)
4074cat >>confdefs.h <<\EOF
4075#define inline
4076EOF
4077 ;;
4078 *) cat >>confdefs.h <<EOF
4079#define inline $ac_cv_c_inline
4080EOF
4081 ;;
4082esac
ccc6cda3 4083
d3a24ed2 4084echo "$as_me:4084: checking whether byte ordering is bigendian" >&5
f73dda09
JA
4085echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
4086if test "${ac_cv_c_bigendian+set}" = set; then
4087 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 4088else
f73dda09
JA
4089 ac_cv_c_bigendian=unknown
4090# See if sys/param.h defines the BYTE_ORDER macro.
4091cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 4092#line 4092 "configure"
ccc6cda3 4093#include "confdefs.h"
f73dda09
JA
4094#include <sys/types.h>
4095#include <sys/param.h>
ccc6cda3 4096
f73dda09
JA
4097int
4098main ()
4099{
4100#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4101 bogus endian macros
ccc6cda3
JA
4102#endif
4103
f73dda09
JA
4104 ;
4105 return 0;
4106}
4107_ACEOF
4108rm -f conftest.$ac_objext
d3a24ed2 4109if { (eval echo "$as_me:4109: \"$ac_compile\"") >&5
f73dda09
JA
4110 (eval $ac_compile) 2>&5
4111 ac_status=$?
d3a24ed2 4112 echo "$as_me:4112: \$? = $ac_status" >&5
f73dda09
JA
4113 (exit $ac_status); } &&
4114 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 4115 { (eval echo "$as_me:4115: \"$ac_try\"") >&5
f73dda09
JA
4116 (eval $ac_try) 2>&5
4117 ac_status=$?
d3a24ed2 4118 echo "$as_me:4118: \$? = $ac_status" >&5
f73dda09
JA
4119 (exit $ac_status); }; }; then
4120 # It does; now see whether it defined to BIG_ENDIAN or not.
4121cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 4122#line 4122 "configure"
f73dda09
JA
4123#include "confdefs.h"
4124#include <sys/types.h>
4125#include <sys/param.h>
ccc6cda3 4126
f73dda09
JA
4127int
4128main ()
4129{
4130#if BYTE_ORDER != BIG_ENDIAN
4131 not big endian
4132#endif
ccc6cda3 4133
f73dda09
JA
4134 ;
4135 return 0;
4136}
4137_ACEOF
4138rm -f conftest.$ac_objext
d3a24ed2 4139if { (eval echo "$as_me:4139: \"$ac_compile\"") >&5
f73dda09
JA
4140 (eval $ac_compile) 2>&5
4141 ac_status=$?
d3a24ed2 4142 echo "$as_me:4142: \$? = $ac_status" >&5
f73dda09
JA
4143 (exit $ac_status); } &&
4144 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 4145 { (eval echo "$as_me:4145: \"$ac_try\"") >&5
f73dda09
JA
4146 (eval $ac_try) 2>&5
4147 ac_status=$?
d3a24ed2 4148 echo "$as_me:4148: \$? = $ac_status" >&5
f73dda09
JA
4149 (exit $ac_status); }; }; then
4150 ac_cv_c_bigendian=yes
ccc6cda3 4151else
f73dda09
JA
4152 echo "$as_me: failed program was:" >&5
4153cat conftest.$ac_ext >&5
4154ac_cv_c_bigendian=no
ccc6cda3 4155fi
f73dda09 4156rm -f conftest.$ac_objext conftest.$ac_ext
ccc6cda3 4157else
f73dda09
JA
4158 echo "$as_me: failed program was:" >&5
4159cat conftest.$ac_ext >&5
4160fi
4161rm -f conftest.$ac_objext conftest.$ac_ext
4162if test $ac_cv_c_bigendian = unknown; then
4163if test "$cross_compiling" = yes; then
d3a24ed2 4164 { { echo "$as_me:4164: error: cannot run test program while cross compiling" >&5
f73dda09
JA
4165echo "$as_me: error: cannot run test program while cross compiling" >&2;}
4166 { (exit 1); exit 1; }; }
ccc6cda3 4167else
f73dda09 4168 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 4169#line 4169 "configure"
ccc6cda3 4170#include "confdefs.h"
f73dda09
JA
4171int
4172main ()
ccc6cda3 4173{
f73dda09
JA
4174 /* Are we little or big endian? From Harbison&Steele. */
4175 union
4176 {
4177 long l;
4178 char c[sizeof (long)];
4179 } u;
4180 u.l = 1;
4181 exit (u.c[sizeof (long) - 1] == 1);
ccc6cda3 4182}
f73dda09
JA
4183_ACEOF
4184rm -f conftest$ac_exeext
d3a24ed2 4185if { (eval echo "$as_me:4185: \"$ac_link\"") >&5
f73dda09
JA
4186 (eval $ac_link) 2>&5
4187 ac_status=$?
d3a24ed2 4188 echo "$as_me:4188: \$? = $ac_status" >&5
f73dda09 4189 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3a24ed2 4190 { (eval echo "$as_me:4190: \"$ac_try\"") >&5
f73dda09
JA
4191 (eval $ac_try) 2>&5
4192 ac_status=$?
d3a24ed2 4193 echo "$as_me:4193: \$? = $ac_status" >&5
f73dda09
JA
4194 (exit $ac_status); }; }; then
4195 ac_cv_c_bigendian=no
ccc6cda3 4196else
f73dda09
JA
4197 echo "$as_me: program exited with status $ac_status" >&5
4198echo "$as_me: failed program was:" >&5
4199cat conftest.$ac_ext >&5
4200ac_cv_c_bigendian=yes
4201fi
4202rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ccc6cda3 4203fi
ccc6cda3 4204fi
ccc6cda3 4205fi
d3a24ed2 4206echo "$as_me:4206: result: $ac_cv_c_bigendian" >&5
f73dda09
JA
4207echo "${ECHO_T}$ac_cv_c_bigendian" >&6
4208if test $ac_cv_c_bigendian = yes; then
ccc6cda3 4209
f73dda09
JA
4210cat >>confdefs.h <<\EOF
4211#define WORDS_BIGENDIAN 1
ccc6cda3
JA
4212EOF
4213
4214fi
4215
d3a24ed2 4216echo "$as_me:4216: checking for preprocessor stringizing operator" >&5
f73dda09
JA
4217echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" >&6
4218if test "${ac_cv_c_stringize+set}" = set; then
4219 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 4220else
f73dda09 4221 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 4222#line 4222 "configure"
ccc6cda3 4223#include "confdefs.h"
f73dda09 4224#define x(y) #y
ccc6cda3 4225
f73dda09
JA
4226char *s = x(teststring);
4227_ACEOF
4228if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4229 egrep "#teststring" >/dev/null 2>&1; then
4230 ac_cv_c_stringize=no
ccc6cda3 4231else
f73dda09 4232 ac_cv_c_stringize=yes
ccc6cda3 4233fi
f73dda09 4234rm -f conftest*
ccc6cda3
JA
4235
4236fi
d3a24ed2 4237echo "$as_me:4237: result: $ac_cv_c_stringize" >&5
f73dda09
JA
4238echo "${ECHO_T}$ac_cv_c_stringize" >&6
4239if test $ac_cv_c_stringize = yes; then
ccc6cda3 4240
f73dda09
JA
4241cat >>confdefs.h <<\EOF
4242#define HAVE_STRINGIZE 1
ccc6cda3
JA
4243EOF
4244
4245fi
4246
d3a24ed2 4247echo "$as_me:4247: checking for long double" >&5
f73dda09
JA
4248echo $ECHO_N "checking for long double... $ECHO_C" >&6
4249if test "${ac_cv_c_long_double+set}" = set; then
4250 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 4251else
f73dda09
JA
4252 if test "$GCC" = yes; then
4253 ac_cv_c_long_double=yes
4254else
4255if test "$cross_compiling" = yes; then
d3a24ed2 4256 { { echo "$as_me:4256: error: cannot run test program while cross compiling" >&5
f73dda09
JA
4257echo "$as_me: error: cannot run test program while cross compiling" >&2;}
4258 { (exit 1); exit 1; }; }
ccc6cda3 4259else
f73dda09 4260 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 4261#line 4261 "configure"
ccc6cda3 4262#include "confdefs.h"
f73dda09
JA
4263int
4264main ()
4265{
4266 /* The Stardent Vistra knows sizeof(long double), but does not
4267 support it. */
4268 long double foo = 0.0;
4269 /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
4270 exit (sizeof (long double) < sizeof (double));
ccc6cda3 4271}
f73dda09
JA
4272_ACEOF
4273rm -f conftest$ac_exeext
d3a24ed2 4274if { (eval echo "$as_me:4274: \"$ac_link\"") >&5
f73dda09
JA
4275 (eval $ac_link) 2>&5
4276 ac_status=$?
d3a24ed2 4277 echo "$as_me:4277: \$? = $ac_status" >&5
f73dda09 4278 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3a24ed2 4279 { (eval echo "$as_me:4279: \"$ac_try\"") >&5
f73dda09
JA
4280 (eval $ac_try) 2>&5
4281 ac_status=$?
d3a24ed2 4282 echo "$as_me:4282: \$? = $ac_status" >&5
f73dda09
JA
4283 (exit $ac_status); }; }; then
4284 ac_cv_c_long_double=yes
ccc6cda3 4285else
f73dda09
JA
4286 echo "$as_me: program exited with status $ac_status" >&5
4287echo "$as_me: failed program was:" >&5
4288cat conftest.$ac_ext >&5
4289ac_cv_c_long_double=no
4290fi
4291rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ccc6cda3 4292fi
ccc6cda3 4293fi
ccc6cda3 4294fi
d3a24ed2 4295echo "$as_me:4295: result: $ac_cv_c_long_double" >&5
f73dda09
JA
4296echo "${ECHO_T}$ac_cv_c_long_double" >&6
4297if test $ac_cv_c_long_double = yes; then
ccc6cda3 4298
f73dda09
JA
4299cat >>confdefs.h <<\EOF
4300#define HAVE_LONG_DOUBLE 1
ccc6cda3
JA
4301EOF
4302
4303fi
4304
d3a24ed2 4305echo "$as_me:4305: checking for function prototypes" >&5
f73dda09
JA
4306echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
4307if test "$ac_cv_prog_cc_stdc" != no; then
d3a24ed2 4308 echo "$as_me:4308: result: yes" >&5
f73dda09 4309echo "${ECHO_T}yes" >&6
ccc6cda3 4310
f73dda09
JA
4311cat >>confdefs.h <<\EOF
4312#define PROTOTYPES 1
ccc6cda3
JA
4313EOF
4314
4315else
d3a24ed2 4316 echo "$as_me:4316: result: no" >&5
f73dda09 4317echo "${ECHO_T}no" >&6
ccc6cda3
JA
4318fi
4319
d3a24ed2 4320echo "$as_me:4320: checking for ANSI C header files" >&5
f73dda09
JA
4321echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4322if test "${ac_cv_header_stdc+set}" = set; then
4323 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 4324else
f73dda09 4325 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 4326#line 4326 "configure"
ccc6cda3 4327#include "confdefs.h"
f73dda09
JA
4328#include <stdlib.h>
4329#include <stdarg.h>
4330#include <string.h>
4331#include <float.h>
ccc6cda3 4332
f73dda09 4333_ACEOF
d3a24ed2 4334if { (eval echo "$as_me:4334: \"$ac_cpp conftest.$ac_ext\"") >&5
f73dda09
JA
4335 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4336 ac_status=$?
4337 egrep -v '^ *\+' conftest.er1 >conftest.err
4338 rm -f conftest.er1
4339 cat conftest.err >&5
d3a24ed2 4340 echo "$as_me:4340: \$? = $ac_status" >&5
f73dda09
JA
4341 (exit $ac_status); } >/dev/null; then
4342 if test -s conftest.err; then
4343 ac_cpp_err=$ac_c_preproc_warn_flag
4344 else
4345 ac_cpp_err=
4346 fi
4347else
4348 ac_cpp_err=yes
4349fi
4350if test -z "$ac_cpp_err"; then
4351 ac_cv_header_stdc=yes
4352else
4353 echo "$as_me: failed program was:" >&5
4354 cat conftest.$ac_ext >&5
4355 ac_cv_header_stdc=no
4356fi
4357rm -f conftest.err conftest.$ac_ext
ccc6cda3 4358
f73dda09
JA
4359if test $ac_cv_header_stdc = yes; then
4360 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4361 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 4362#line 4362 "configure"
f73dda09
JA
4363#include "confdefs.h"
4364#include <string.h>
ccc6cda3 4365
f73dda09
JA
4366_ACEOF
4367if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4368 egrep "memchr" >/dev/null 2>&1; then
4369 :
ccc6cda3 4370else
f73dda09 4371 ac_cv_header_stdc=no
ccc6cda3
JA
4372fi
4373rm -f conftest*
f73dda09 4374
ccc6cda3
JA
4375fi
4376
f73dda09
JA
4377if test $ac_cv_header_stdc = yes; then
4378 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4379 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 4380#line 4380 "configure"
f73dda09
JA
4381#include "confdefs.h"
4382#include <stdlib.h>
ccc6cda3 4383
f73dda09
JA
4384_ACEOF
4385if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4386 egrep "free" >/dev/null 2>&1; then
4387 :
ccc6cda3 4388else
f73dda09 4389 ac_cv_header_stdc=no
ccc6cda3 4390fi
f73dda09 4391rm -f conftest*
ccc6cda3
JA
4392
4393fi
4394
f73dda09
JA
4395if test $ac_cv_header_stdc = yes; then
4396 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
ccc6cda3 4397 if test "$cross_compiling" = yes; then
f73dda09 4398 :
ccc6cda3 4399else
f73dda09 4400 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 4401#line 4401 "configure"
ccc6cda3 4402#include "confdefs.h"
f73dda09
JA
4403#include <ctype.h>
4404#if ((' ' & 0x0FF) == 0x020)
4405# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4406# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4407#else
4408# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4409 || ('j' <= (c) && (c) <= 'r') \
4410 || ('s' <= (c) && (c) <= 'z'))
4411# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4412#endif
4413
4414#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4415int
4416main ()
4417{
ccc6cda3 4418 int i;
f73dda09
JA
4419 for (i = 0; i < 256; i++)
4420 if (XOR (islower (i), ISLOWER (i))
4421 || toupper (i) != TOUPPER (i))
4422 exit(2);
4423 exit (0);
ccc6cda3 4424}
f73dda09
JA
4425_ACEOF
4426rm -f conftest$ac_exeext
d3a24ed2 4427if { (eval echo "$as_me:4427: \"$ac_link\"") >&5
f73dda09
JA
4428 (eval $ac_link) 2>&5
4429 ac_status=$?
d3a24ed2 4430 echo "$as_me:4430: \$? = $ac_status" >&5
f73dda09 4431 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3a24ed2 4432 { (eval echo "$as_me:4432: \"$ac_try\"") >&5
f73dda09
JA
4433 (eval $ac_try) 2>&5
4434 ac_status=$?
d3a24ed2 4435 echo "$as_me:4435: \$? = $ac_status" >&5
f73dda09
JA
4436 (exit $ac_status); }; }; then
4437 :
ccc6cda3 4438else
f73dda09
JA
4439 echo "$as_me: program exited with status $ac_status" >&5
4440echo "$as_me: failed program was:" >&5
4441cat conftest.$ac_ext >&5
4442ac_cv_header_stdc=no
4443fi
4444rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ccc6cda3 4445fi
ccc6cda3 4446fi
f73dda09 4447fi
d3a24ed2 4448echo "$as_me:4448: result: $ac_cv_header_stdc" >&5
f73dda09
JA
4449echo "${ECHO_T}$ac_cv_header_stdc" >&6
4450if test $ac_cv_header_stdc = yes; then
4451
4452cat >>confdefs.h <<\EOF
4453#define STDC_HEADERS 1
4454EOF
ccc6cda3
JA
4455
4456fi
4457
f73dda09
JA
4458# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4459
4460for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4461 inttypes.h stdint.h unistd.h
4462do
4463as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d3a24ed2 4464echo "$as_me:4464: checking for $ac_header" >&5
f73dda09
JA
4465echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4466if eval "test \"\${$as_ac_Header+set}\" = set"; then
4467 echo $ECHO_N "(cached) $ECHO_C" >&6
4468else
4469 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 4470#line 4470 "configure"
f73dda09
JA
4471#include "confdefs.h"
4472$ac_includes_default
4473#include <$ac_header>
4474_ACEOF
4475rm -f conftest.$ac_objext
d3a24ed2 4476if { (eval echo "$as_me:4476: \"$ac_compile\"") >&5
f73dda09
JA
4477 (eval $ac_compile) 2>&5
4478 ac_status=$?
d3a24ed2 4479 echo "$as_me:4479: \$? = $ac_status" >&5
f73dda09
JA
4480 (exit $ac_status); } &&
4481 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 4482 { (eval echo "$as_me:4482: \"$ac_try\"") >&5
f73dda09
JA
4483 (eval $ac_try) 2>&5
4484 ac_status=$?
d3a24ed2 4485 echo "$as_me:4485: \$? = $ac_status" >&5
f73dda09
JA
4486 (exit $ac_status); }; }; then
4487 eval "$as_ac_Header=yes"
4488else
4489 echo "$as_me: failed program was:" >&5
4490cat conftest.$ac_ext >&5
4491eval "$as_ac_Header=no"
4492fi
4493rm -f conftest.$ac_objext conftest.$ac_ext
4494fi
d3a24ed2 4495echo "$as_me:4495: result: `eval echo '${'$as_ac_Header'}'`" >&5
f73dda09
JA
4496echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4497if test `eval echo '${'$as_ac_Header'}'` = yes; then
4498 cat >>confdefs.h <<EOF
4499#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
ccc6cda3
JA
4500EOF
4501
4502fi
f73dda09 4503done
ccc6cda3 4504
d3a24ed2 4505echo "$as_me:4505: checking whether char is unsigned" >&5
f73dda09
JA
4506echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
4507if test "${ac_cv_c_char_unsigned+set}" = set; then
4508 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 4509else
f73dda09 4510 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 4511#line 4511 "configure"
ccc6cda3 4512#include "confdefs.h"
f73dda09
JA
4513$ac_includes_default
4514int
ccc6cda3
JA
4515main ()
4516{
f73dda09
JA
4517int _array_ [1 - 2 * !(((char) -1) < 0)]
4518 ;
4519 return 0;
ccc6cda3 4520}
f73dda09
JA
4521_ACEOF
4522rm -f conftest.$ac_objext
d3a24ed2 4523if { (eval echo "$as_me:4523: \"$ac_compile\"") >&5
f73dda09
JA
4524 (eval $ac_compile) 2>&5
4525 ac_status=$?
d3a24ed2 4526 echo "$as_me:4526: \$? = $ac_status" >&5
f73dda09
JA
4527 (exit $ac_status); } &&
4528 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 4529 { (eval echo "$as_me:4529: \"$ac_try\"") >&5
f73dda09
JA
4530 (eval $ac_try) 2>&5
4531 ac_status=$?
d3a24ed2 4532 echo "$as_me:4532: \$? = $ac_status" >&5
f73dda09
JA
4533 (exit $ac_status); }; }; then
4534 ac_cv_c_char_unsigned=no
ccc6cda3 4535else
f73dda09
JA
4536 echo "$as_me: failed program was:" >&5
4537cat conftest.$ac_ext >&5
4538ac_cv_c_char_unsigned=yes
ccc6cda3 4539fi
f73dda09 4540rm -f conftest.$ac_objext conftest.$ac_ext
ccc6cda3 4541fi
d3a24ed2 4542echo "$as_me:4542: result: $ac_cv_c_char_unsigned" >&5
f73dda09
JA
4543echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
4544if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
4545 cat >>confdefs.h <<\EOF
4546#define __CHAR_UNSIGNED__ 1
ccc6cda3
JA
4547EOF
4548
ccc6cda3
JA
4549fi
4550
f73dda09
JA
4551ac_header_dirent=no
4552for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4553 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
d3a24ed2 4554echo "$as_me:4554: checking for $ac_hdr that defines DIR" >&5
f73dda09
JA
4555echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4556if eval "test \"\${$as_ac_Header+set}\" = set"; then
4557 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 4558else
f73dda09 4559 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 4560#line 4560 "configure"
ccc6cda3
JA
4561#include "confdefs.h"
4562#include <sys/types.h>
f73dda09 4563#include <$ac_hdr>
ccc6cda3 4564
f73dda09
JA
4565int
4566main ()
4567{
4568if ((DIR *) 0)
4569return 0;
4570 ;
4571 return 0;
4572}
4573_ACEOF
4574rm -f conftest.$ac_objext
d3a24ed2 4575if { (eval echo "$as_me:4575: \"$ac_compile\"") >&5
f73dda09
JA
4576 (eval $ac_compile) 2>&5
4577 ac_status=$?
d3a24ed2 4578 echo "$as_me:4578: \$? = $ac_status" >&5
f73dda09
JA
4579 (exit $ac_status); } &&
4580 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 4581 { (eval echo "$as_me:4581: \"$ac_try\"") >&5
f73dda09
JA
4582 (eval $ac_try) 2>&5
4583 ac_status=$?
d3a24ed2 4584 echo "$as_me:4584: \$? = $ac_status" >&5
f73dda09
JA
4585 (exit $ac_status); }; }; then
4586 eval "$as_ac_Header=yes"
ccc6cda3 4587else
f73dda09
JA
4588 echo "$as_me: failed program was:" >&5
4589cat conftest.$ac_ext >&5
4590eval "$as_ac_Header=no"
ccc6cda3 4591fi
f73dda09 4592rm -f conftest.$ac_objext conftest.$ac_ext
ccc6cda3 4593fi
d3a24ed2 4594echo "$as_me:4594: result: `eval echo '${'$as_ac_Header'}'`" >&5
f73dda09
JA
4595echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4596if test `eval echo '${'$as_ac_Header'}'` = yes; then
4597 cat >>confdefs.h <<EOF
4598#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
ccc6cda3
JA
4599EOF
4600
f73dda09
JA
4601ac_header_dirent=$ac_hdr; break
4602fi
ccc6cda3 4603
f73dda09
JA
4604done
4605# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4606if test $ac_header_dirent = dirent.h; then
d3a24ed2 4607 echo "$as_me:4607: checking for opendir in -ldir" >&5
f73dda09
JA
4608echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
4609if test "${ac_cv_lib_dir_opendir+set}" = set; then
4610 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 4611else
f73dda09
JA
4612 ac_check_lib_save_LIBS=$LIBS
4613LIBS="-ldir $LIBS"
4614cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 4615#line 4615 "configure"
ccc6cda3 4616#include "confdefs.h"
f73dda09 4617
ccc6cda3 4618/* Override any gcc2 internal prototype to avoid an error. */
f73dda09
JA
4619#ifdef __cplusplus
4620extern "C"
4621#endif
ccc6cda3 4622/* We use char because int might match the return type of a gcc2
f73dda09
JA
4623 builtin and then its argument prototype would still apply. */
4624char opendir ();
4625int
4626main ()
4627{
4628opendir ();
4629 ;
4630 return 0;
4631}
4632_ACEOF
4633rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 4634if { (eval echo "$as_me:4634: \"$ac_link\"") >&5
f73dda09
JA
4635 (eval $ac_link) 2>&5
4636 ac_status=$?
d3a24ed2 4637 echo "$as_me:4637: \$? = $ac_status" >&5
f73dda09
JA
4638 (exit $ac_status); } &&
4639 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 4640 { (eval echo "$as_me:4640: \"$ac_try\"") >&5
f73dda09
JA
4641 (eval $ac_try) 2>&5
4642 ac_status=$?
d3a24ed2 4643 echo "$as_me:4643: \$? = $ac_status" >&5
f73dda09
JA
4644 (exit $ac_status); }; }; then
4645 ac_cv_lib_dir_opendir=yes
4646else
4647 echo "$as_me: failed program was:" >&5
4648cat conftest.$ac_ext >&5
4649ac_cv_lib_dir_opendir=no
4650fi
4651rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4652LIBS=$ac_check_lib_save_LIBS
4653fi
d3a24ed2 4654echo "$as_me:4654: result: $ac_cv_lib_dir_opendir" >&5
f73dda09
JA
4655echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
4656if test $ac_cv_lib_dir_opendir = yes; then
4657 LIBS="$LIBS -ldir"
4658fi
ccc6cda3
JA
4659
4660else
d3a24ed2 4661 echo "$as_me:4661: checking for opendir in -lx" >&5
f73dda09
JA
4662echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
4663if test "${ac_cv_lib_x_opendir+set}" = set; then
4664 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 4665else
f73dda09
JA
4666 ac_check_lib_save_LIBS=$LIBS
4667LIBS="-lx $LIBS"
4668cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 4669#line 4669 "configure"
ccc6cda3 4670#include "confdefs.h"
f73dda09 4671
ccc6cda3 4672/* Override any gcc2 internal prototype to avoid an error. */
f73dda09
JA
4673#ifdef __cplusplus
4674extern "C"
4675#endif
ccc6cda3 4676/* We use char because int might match the return type of a gcc2
f73dda09
JA
4677 builtin and then its argument prototype would still apply. */
4678char opendir ();
4679int
4680main ()
4681{
4682opendir ();
4683 ;
4684 return 0;
4685}
4686_ACEOF
4687rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 4688if { (eval echo "$as_me:4688: \"$ac_link\"") >&5
f73dda09
JA
4689 (eval $ac_link) 2>&5
4690 ac_status=$?
d3a24ed2 4691 echo "$as_me:4691: \$? = $ac_status" >&5
f73dda09
JA
4692 (exit $ac_status); } &&
4693 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 4694 { (eval echo "$as_me:4694: \"$ac_try\"") >&5
f73dda09
JA
4695 (eval $ac_try) 2>&5
4696 ac_status=$?
d3a24ed2 4697 echo "$as_me:4697: \$? = $ac_status" >&5
f73dda09
JA
4698 (exit $ac_status); }; }; then
4699 ac_cv_lib_x_opendir=yes
4700else
4701 echo "$as_me: failed program was:" >&5
4702cat conftest.$ac_ext >&5
4703ac_cv_lib_x_opendir=no
4704fi
4705rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4706LIBS=$ac_check_lib_save_LIBS
4707fi
d3a24ed2 4708echo "$as_me:4708: result: $ac_cv_lib_x_opendir" >&5
f73dda09
JA
4709echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
4710if test $ac_cv_lib_x_opendir = yes; then
4711 LIBS="$LIBS -lx"
4712fi
ccc6cda3 4713
f73dda09 4714fi
ccc6cda3 4715
d3a24ed2 4716echo "$as_me:4716: checking whether time.h and sys/time.h may both be included" >&5
f73dda09
JA
4717echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
4718if test "${ac_cv_header_time+set}" = set; then
4719 echo $ECHO_N "(cached) $ECHO_C" >&6
4720else
4721 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 4722#line 4722 "configure"
f73dda09
JA
4723#include "confdefs.h"
4724#include <sys/types.h>
4725#include <sys/time.h>
4726#include <time.h>
ccc6cda3 4727
f73dda09
JA
4728int
4729main ()
4730{
4731if ((struct tm *) 0)
4732return 0;
4733 ;
4734 return 0;
4735}
4736_ACEOF
4737rm -f conftest.$ac_objext
d3a24ed2 4738if { (eval echo "$as_me:4738: \"$ac_compile\"") >&5
f73dda09
JA
4739 (eval $ac_compile) 2>&5
4740 ac_status=$?
d3a24ed2 4741 echo "$as_me:4741: \$? = $ac_status" >&5
f73dda09
JA
4742 (exit $ac_status); } &&
4743 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 4744 { (eval echo "$as_me:4744: \"$ac_try\"") >&5
f73dda09
JA
4745 (eval $ac_try) 2>&5
4746 ac_status=$?
d3a24ed2 4747 echo "$as_me:4747: \$? = $ac_status" >&5
f73dda09
JA
4748 (exit $ac_status); }; }; then
4749 ac_cv_header_time=yes
ccc6cda3 4750else
f73dda09
JA
4751 echo "$as_me: failed program was:" >&5
4752cat conftest.$ac_ext >&5
4753ac_cv_header_time=no
ccc6cda3 4754fi
f73dda09 4755rm -f conftest.$ac_objext conftest.$ac_ext
ccc6cda3 4756fi
d3a24ed2 4757echo "$as_me:4757: result: $ac_cv_header_time" >&5
f73dda09
JA
4758echo "${ECHO_T}$ac_cv_header_time" >&6
4759if test $ac_cv_header_time = yes; then
ccc6cda3 4760
f73dda09
JA
4761cat >>confdefs.h <<\EOF
4762#define TIME_WITH_SYS_TIME 1
ccc6cda3
JA
4763EOF
4764
ccc6cda3
JA
4765fi
4766
f73dda09
JA
4767for ac_header in inttypes.h
4768do
4769as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d3a24ed2 4770echo "$as_me:4770: checking for $ac_header" >&5
f73dda09
JA
4771echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4772if eval "test \"\${$as_ac_Header+set}\" = set"; then
4773 echo $ECHO_N "(cached) $ECHO_C" >&6
4774else
4775 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 4776#line 4776 "configure"
f73dda09
JA
4777#include "confdefs.h"
4778#include <$ac_header>
4779_ACEOF
d3a24ed2 4780if { (eval echo "$as_me:4780: \"$ac_cpp conftest.$ac_ext\"") >&5
f73dda09
JA
4781 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4782 ac_status=$?
4783 egrep -v '^ *\+' conftest.er1 >conftest.err
4784 rm -f conftest.er1
4785 cat conftest.err >&5
d3a24ed2 4786 echo "$as_me:4786: \$? = $ac_status" >&5
f73dda09
JA
4787 (exit $ac_status); } >/dev/null; then
4788 if test -s conftest.err; then
4789 ac_cpp_err=$ac_c_preproc_warn_flag
4790 else
4791 ac_cpp_err=
4792 fi
ccc6cda3 4793else
f73dda09
JA
4794 ac_cpp_err=yes
4795fi
4796if test -z "$ac_cpp_err"; then
4797 eval "$as_ac_Header=yes"
ccc6cda3 4798else
f73dda09 4799 echo "$as_me: failed program was:" >&5
ccc6cda3 4800 cat conftest.$ac_ext >&5
f73dda09 4801 eval "$as_ac_Header=no"
ccc6cda3 4802fi
f73dda09 4803rm -f conftest.err conftest.$ac_ext
ccc6cda3 4804fi
d3a24ed2 4805echo "$as_me:4805: result: `eval echo '${'$as_ac_Header'}'`" >&5
f73dda09
JA
4806echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4807if test `eval echo '${'$as_ac_Header'}'` = yes; then
4808 cat >>confdefs.h <<EOF
4809#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
ccc6cda3
JA
4810EOF
4811
4812fi
f73dda09 4813done
ccc6cda3 4814
f73dda09
JA
4815for ac_header in unistd.h stdlib.h stdarg.h varargs.h limits.h string.h \
4816 memory.h locale.h termcap.h termio.h termios.h dlfcn.h \
d3a24ed2 4817 stddef.h stdint.h netdb.h grp.h strings.h regex.h
ccc6cda3 4818do
f73dda09 4819as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d3a24ed2 4820echo "$as_me:4820: checking for $ac_header" >&5
f73dda09
JA
4821echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4822if eval "test \"\${$as_ac_Header+set}\" = set"; then
4823 echo $ECHO_N "(cached) $ECHO_C" >&6
4824else
4825 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 4826#line 4826 "configure"
f73dda09
JA
4827#include "confdefs.h"
4828#include <$ac_header>
4829_ACEOF
d3a24ed2 4830if { (eval echo "$as_me:4830: \"$ac_cpp conftest.$ac_ext\"") >&5
f73dda09
JA
4831 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4832 ac_status=$?
4833 egrep -v '^ *\+' conftest.er1 >conftest.err
4834 rm -f conftest.er1
4835 cat conftest.err >&5
d3a24ed2 4836 echo "$as_me:4836: \$? = $ac_status" >&5
f73dda09
JA
4837 (exit $ac_status); } >/dev/null; then
4838 if test -s conftest.err; then
4839 ac_cpp_err=$ac_c_preproc_warn_flag
4840 else
4841 ac_cpp_err=
4842 fi
ccc6cda3 4843else
f73dda09
JA
4844 ac_cpp_err=yes
4845fi
4846if test -z "$ac_cpp_err"; then
4847 eval "$as_ac_Header=yes"
ccc6cda3 4848else
f73dda09 4849 echo "$as_me: failed program was:" >&5
ccc6cda3 4850 cat conftest.$ac_ext >&5
f73dda09 4851 eval "$as_ac_Header=no"
ccc6cda3 4852fi
f73dda09 4853rm -f conftest.err conftest.$ac_ext
ccc6cda3 4854fi
d3a24ed2 4855echo "$as_me:4855: result: `eval echo '${'$as_ac_Header'}'`" >&5
f73dda09
JA
4856echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4857if test `eval echo '${'$as_ac_Header'}'` = yes; then
4858 cat >>confdefs.h <<EOF
4859#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
ccc6cda3 4860EOF
f73dda09 4861
ccc6cda3
JA
4862fi
4863done
4864
f73dda09
JA
4865for ac_header in sys/ptem.h sys/pte.h sys/stream.h sys/select.h sys/file.h \
4866 sys/resource.h sys/param.h sys/socket.h \
4867 sys/time.h sys/times.h sys/wait.h
ccc6cda3 4868do
f73dda09 4869as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d3a24ed2 4870echo "$as_me:4870: checking for $ac_header" >&5
f73dda09
JA
4871echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4872if eval "test \"\${$as_ac_Header+set}\" = set"; then
4873 echo $ECHO_N "(cached) $ECHO_C" >&6
4874else
4875 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 4876#line 4876 "configure"
f73dda09
JA
4877#include "confdefs.h"
4878#include <$ac_header>
4879_ACEOF
d3a24ed2 4880if { (eval echo "$as_me:4880: \"$ac_cpp conftest.$ac_ext\"") >&5
f73dda09
JA
4881 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4882 ac_status=$?
4883 egrep -v '^ *\+' conftest.er1 >conftest.err
4884 rm -f conftest.er1
4885 cat conftest.err >&5
d3a24ed2 4886 echo "$as_me:4886: \$? = $ac_status" >&5
f73dda09
JA
4887 (exit $ac_status); } >/dev/null; then
4888 if test -s conftest.err; then
4889 ac_cpp_err=$ac_c_preproc_warn_flag
4890 else
4891 ac_cpp_err=
4892 fi
ccc6cda3 4893else
f73dda09
JA
4894 ac_cpp_err=yes
4895fi
4896if test -z "$ac_cpp_err"; then
4897 eval "$as_ac_Header=yes"
ccc6cda3 4898else
f73dda09 4899 echo "$as_me: failed program was:" >&5
ccc6cda3 4900 cat conftest.$ac_ext >&5
f73dda09 4901 eval "$as_ac_Header=no"
ccc6cda3 4902fi
f73dda09 4903rm -f conftest.err conftest.$ac_ext
ccc6cda3 4904fi
d3a24ed2 4905echo "$as_me:4905: result: `eval echo '${'$as_ac_Header'}'`" >&5
f73dda09
JA
4906echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4907if test `eval echo '${'$as_ac_Header'}'` = yes; then
4908 cat >>confdefs.h <<EOF
4909#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
ccc6cda3 4910EOF
f73dda09 4911
ccc6cda3
JA
4912fi
4913done
4914
f73dda09 4915for ac_header in netinet/in.h arpa/inet.h
ccc6cda3 4916do
f73dda09 4917as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d3a24ed2 4918echo "$as_me:4918: checking for $ac_header" >&5
f73dda09
JA
4919echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4920if eval "test \"\${$as_ac_Header+set}\" = set"; then
4921 echo $ECHO_N "(cached) $ECHO_C" >&6
4922else
4923 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 4924#line 4924 "configure"
f73dda09
JA
4925#include "confdefs.h"
4926#include <$ac_header>
4927_ACEOF
d3a24ed2 4928if { (eval echo "$as_me:4928: \"$ac_cpp conftest.$ac_ext\"") >&5
f73dda09
JA
4929 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4930 ac_status=$?
4931 egrep -v '^ *\+' conftest.er1 >conftest.err
4932 rm -f conftest.er1
4933 cat conftest.err >&5
d3a24ed2 4934 echo "$as_me:4934: \$? = $ac_status" >&5
f73dda09
JA
4935 (exit $ac_status); } >/dev/null; then
4936 if test -s conftest.err; then
4937 ac_cpp_err=$ac_c_preproc_warn_flag
4938 else
4939 ac_cpp_err=
4940 fi
ccc6cda3 4941else
f73dda09
JA
4942 ac_cpp_err=yes
4943fi
4944if test -z "$ac_cpp_err"; then
4945 eval "$as_ac_Header=yes"
ccc6cda3 4946else
f73dda09 4947 echo "$as_me: failed program was:" >&5
ccc6cda3 4948 cat conftest.$ac_ext >&5
f73dda09 4949 eval "$as_ac_Header=no"
ccc6cda3 4950fi
f73dda09 4951rm -f conftest.err conftest.$ac_ext
ccc6cda3 4952fi
d3a24ed2 4953echo "$as_me:4953: result: `eval echo '${'$as_ac_Header'}'`" >&5
f73dda09
JA
4954echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4955if test `eval echo '${'$as_ac_Header'}'` = yes; then
4956 cat >>confdefs.h <<EOF
4957#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
ccc6cda3 4958EOF
f73dda09 4959
ccc6cda3
JA
4960fi
4961done
4962
f73dda09
JA
4963# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4964# for constant arguments. Useless!
d3a24ed2 4965echo "$as_me:4965: checking for working alloca.h" >&5
f73dda09
JA
4966echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
4967if test "${ac_cv_working_alloca_h+set}" = set; then
4968 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 4969else
f73dda09 4970 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 4971#line 4971 "configure"
ccc6cda3 4972#include "confdefs.h"
f73dda09
JA
4973#include <alloca.h>
4974int
4975main ()
4976{
4977char *p = (char *) alloca (2 * sizeof (int));
4978 ;
4979 return 0;
4980}
4981_ACEOF
4982rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 4983if { (eval echo "$as_me:4983: \"$ac_link\"") >&5
f73dda09
JA
4984 (eval $ac_link) 2>&5
4985 ac_status=$?
d3a24ed2 4986 echo "$as_me:4986: \$? = $ac_status" >&5
f73dda09
JA
4987 (exit $ac_status); } &&
4988 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 4989 { (eval echo "$as_me:4989: \"$ac_try\"") >&5
f73dda09
JA
4990 (eval $ac_try) 2>&5
4991 ac_status=$?
d3a24ed2 4992 echo "$as_me:4992: \$? = $ac_status" >&5
f73dda09
JA
4993 (exit $ac_status); }; }; then
4994 ac_cv_working_alloca_h=yes
4995else
4996 echo "$as_me: failed program was:" >&5
4997cat conftest.$ac_ext >&5
4998ac_cv_working_alloca_h=no
4999fi
5000rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5001fi
d3a24ed2 5002echo "$as_me:5002: result: $ac_cv_working_alloca_h" >&5
f73dda09
JA
5003echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
5004if test $ac_cv_working_alloca_h = yes; then
5005
5006cat >>confdefs.h <<\EOF
5007#define HAVE_ALLOCA_H 1
5008EOF
ccc6cda3 5009
f73dda09 5010fi
ccc6cda3 5011
d3a24ed2 5012echo "$as_me:5012: checking for alloca" >&5
f73dda09
JA
5013echo $ECHO_N "checking for alloca... $ECHO_C" >&6
5014if test "${ac_cv_func_alloca_works+set}" = set; then
5015 echo $ECHO_N "(cached) $ECHO_C" >&6
5016else
5017 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 5018#line 5018 "configure"
f73dda09
JA
5019#include "confdefs.h"
5020#ifdef __GNUC__
5021# define alloca __builtin_alloca
ccc6cda3 5022#else
f73dda09
JA
5023# ifdef _MSC_VER
5024# include <malloc.h>
5025# define alloca _alloca
5026# else
5027# if HAVE_ALLOCA_H
5028# include <alloca.h>
5029# else
5030# ifdef _AIX
5031 #pragma alloca
5032# else
5033# ifndef alloca /* predefined by HP cc +Olibcalls */
5034char *alloca ();
5035# endif
5036# endif
5037# endif
5038# endif
ccc6cda3
JA
5039#endif
5040
f73dda09
JA
5041int
5042main ()
5043{
5044char *p = (char *) alloca (1);
5045 ;
5046 return 0;
5047}
5048_ACEOF
5049rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 5050if { (eval echo "$as_me:5050: \"$ac_link\"") >&5
f73dda09
JA
5051 (eval $ac_link) 2>&5
5052 ac_status=$?
d3a24ed2 5053 echo "$as_me:5053: \$? = $ac_status" >&5
f73dda09
JA
5054 (exit $ac_status); } &&
5055 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 5056 { (eval echo "$as_me:5056: \"$ac_try\"") >&5
f73dda09
JA
5057 (eval $ac_try) 2>&5
5058 ac_status=$?
d3a24ed2 5059 echo "$as_me:5059: \$? = $ac_status" >&5
f73dda09
JA
5060 (exit $ac_status); }; }; then
5061 ac_cv_func_alloca_works=yes
ccc6cda3 5062else
f73dda09
JA
5063 echo "$as_me: failed program was:" >&5
5064cat conftest.$ac_ext >&5
5065ac_cv_func_alloca_works=no
ccc6cda3 5066fi
f73dda09 5067rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ccc6cda3 5068fi
d3a24ed2 5069echo "$as_me:5069: result: $ac_cv_func_alloca_works" >&5
f73dda09
JA
5070echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
5071
5072if test $ac_cv_func_alloca_works = yes; then
ccc6cda3 5073
f73dda09
JA
5074cat >>confdefs.h <<\EOF
5075#define HAVE_ALLOCA 1
ccc6cda3 5076EOF
f73dda09 5077
ccc6cda3 5078else
f73dda09
JA
5079 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5080# that cause trouble. Some versions do not even contain alloca or
5081# contain a buggy version. If you still want to use their alloca,
5082# use ar to extract alloca.o from them instead of compiling alloca.c.
ccc6cda3 5083
f73dda09 5084ALLOCA=alloca.$ac_objext
ccc6cda3 5085
f73dda09
JA
5086cat >>confdefs.h <<\EOF
5087#define C_ALLOCA 1
5088EOF
5089
d3a24ed2 5090echo "$as_me:5090: checking whether \`alloca.c' needs Cray hooks" >&5
f73dda09
JA
5091echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
5092if test "${ac_cv_os_cray+set}" = set; then
5093 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 5094else
f73dda09 5095 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 5096#line 5096 "configure"
ccc6cda3 5097#include "confdefs.h"
f73dda09
JA
5098#if defined(CRAY) && ! defined(CRAY2)
5099webecray
5100#else
5101wenotbecray
5102#endif
ccc6cda3 5103
f73dda09
JA
5104_ACEOF
5105if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5106 egrep "webecray" >/dev/null 2>&1; then
5107 ac_cv_os_cray=yes
ccc6cda3 5108else
f73dda09 5109 ac_cv_os_cray=no
ccc6cda3
JA
5110fi
5111rm -f conftest*
ccc6cda3
JA
5112
5113fi
d3a24ed2 5114echo "$as_me:5114: result: $ac_cv_os_cray" >&5
f73dda09
JA
5115echo "${ECHO_T}$ac_cv_os_cray" >&6
5116if test $ac_cv_os_cray = yes; then
5117 for ac_func in _getb67 GETB67 getb67; do
5118 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d3a24ed2 5119echo "$as_me:5119: checking for $ac_func" >&5
f73dda09
JA
5120echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5121if eval "test \"\${$as_ac_var+set}\" = set"; then
5122 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 5123else
f73dda09 5124 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 5125#line 5125 "configure"
ccc6cda3
JA
5126#include "confdefs.h"
5127/* System header to define __stub macros and hopefully few prototypes,
f73dda09 5128 which can conflict with char $ac_func (); below. */
ccc6cda3
JA
5129#include <assert.h>
5130/* Override any gcc2 internal prototype to avoid an error. */
f73dda09
JA
5131#ifdef __cplusplus
5132extern "C"
5133#endif
ccc6cda3 5134/* We use char because int might match the return type of a gcc2
f73dda09
JA
5135 builtin and then its argument prototype would still apply. */
5136char $ac_func ();
5137char (*f) ();
ccc6cda3 5138
f73dda09
JA
5139int
5140main ()
5141{
ccc6cda3
JA
5142/* The GNU C library defines this for functions which it implements
5143 to always fail with ENOSYS. Some functions are actually named
5144 something starting with __ and the normal name is an alias. */
5145#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5146choke me
5147#else
f73dda09 5148f = $ac_func;
ccc6cda3
JA
5149#endif
5150
f73dda09
JA
5151 ;
5152 return 0;
5153}
5154_ACEOF
5155rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 5156if { (eval echo "$as_me:5156: \"$ac_link\"") >&5
f73dda09
JA
5157 (eval $ac_link) 2>&5
5158 ac_status=$?
d3a24ed2 5159 echo "$as_me:5159: \$? = $ac_status" >&5
f73dda09
JA
5160 (exit $ac_status); } &&
5161 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 5162 { (eval echo "$as_me:5162: \"$ac_try\"") >&5
f73dda09
JA
5163 (eval $ac_try) 2>&5
5164 ac_status=$?
d3a24ed2 5165 echo "$as_me:5165: \$? = $ac_status" >&5
f73dda09
JA
5166 (exit $ac_status); }; }; then
5167 eval "$as_ac_var=yes"
5168else
5169 echo "$as_me: failed program was:" >&5
5170cat conftest.$ac_ext >&5
5171eval "$as_ac_var=no"
5172fi
5173rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5174fi
d3a24ed2 5175echo "$as_me:5175: result: `eval echo '${'$as_ac_var'}'`" >&5
f73dda09
JA
5176echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5177if test `eval echo '${'$as_ac_var'}'` = yes; then
5178
5179cat >>confdefs.h <<EOF
5180#define CRAY_STACKSEG_END $ac_func
ccc6cda3 5181EOF
ccc6cda3 5182
f73dda09 5183 break
ccc6cda3 5184fi
ccc6cda3 5185
f73dda09 5186 done
ccc6cda3
JA
5187fi
5188
d3a24ed2 5189echo "$as_me:5189: checking stack direction for C alloca" >&5
f73dda09
JA
5190echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
5191if test "${ac_cv_c_stack_direction+set}" = set; then
5192 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 5193else
f73dda09
JA
5194 if test "$cross_compiling" = yes; then
5195 ac_cv_c_stack_direction=0
5196else
5197 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 5198#line 5198 "configure"
ccc6cda3 5199#include "confdefs.h"
f73dda09
JA
5200int
5201find_stack_direction ()
5202{
5203 static char *addr = 0;
5204 auto char dummy;
5205 if (addr == 0)
5206 {
5207 addr = &dummy;
5208 return find_stack_direction ();
5209 }
5210 else
5211 return (&dummy > addr) ? 1 : -1;
5212}
ccc6cda3 5213
f73dda09
JA
5214int
5215main ()
5216{
5217 exit (find_stack_direction () < 0);
5218}
5219_ACEOF
5220rm -f conftest$ac_exeext
d3a24ed2 5221if { (eval echo "$as_me:5221: \"$ac_link\"") >&5
f73dda09
JA
5222 (eval $ac_link) 2>&5
5223 ac_status=$?
d3a24ed2 5224 echo "$as_me:5224: \$? = $ac_status" >&5
f73dda09 5225 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3a24ed2 5226 { (eval echo "$as_me:5226: \"$ac_try\"") >&5
f73dda09
JA
5227 (eval $ac_try) 2>&5
5228 ac_status=$?
d3a24ed2 5229 echo "$as_me:5229: \$? = $ac_status" >&5
f73dda09
JA
5230 (exit $ac_status); }; }; then
5231 ac_cv_c_stack_direction=1
ccc6cda3 5232else
f73dda09
JA
5233 echo "$as_me: program exited with status $ac_status" >&5
5234echo "$as_me: failed program was:" >&5
5235cat conftest.$ac_ext >&5
5236ac_cv_c_stack_direction=-1
ccc6cda3 5237fi
f73dda09 5238rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ccc6cda3 5239fi
f73dda09 5240fi
d3a24ed2 5241echo "$as_me:5241: result: $ac_cv_c_stack_direction" >&5
f73dda09 5242echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
ccc6cda3 5243
f73dda09
JA
5244cat >>confdefs.h <<EOF
5245#define STACK_DIRECTION $ac_cv_c_stack_direction
5246EOF
ccc6cda3 5247
ccc6cda3
JA
5248fi
5249
d3a24ed2 5250echo "$as_me:5250: checking whether getpgrp takes no argument" >&5
f73dda09
JA
5251echo $ECHO_N "checking whether getpgrp takes no argument... $ECHO_C" >&6
5252if test "${ac_cv_func_getpgrp_void+set}" = set; then
5253 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 5254else
f73dda09
JA
5255 # Use it with a single arg.
5256cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 5257#line 5257 "configure"
ccc6cda3 5258#include "confdefs.h"
f73dda09
JA
5259$ac_includes_default
5260int
5261main ()
5262{
5263getpgrp (0);
5264 ;
5265 return 0;
5266}
5267_ACEOF
5268rm -f conftest.$ac_objext
d3a24ed2 5269if { (eval echo "$as_me:5269: \"$ac_compile\"") >&5
f73dda09
JA
5270 (eval $ac_compile) 2>&5
5271 ac_status=$?
d3a24ed2 5272 echo "$as_me:5272: \$? = $ac_status" >&5
f73dda09
JA
5273 (exit $ac_status); } &&
5274 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 5275 { (eval echo "$as_me:5275: \"$ac_try\"") >&5
f73dda09
JA
5276 (eval $ac_try) 2>&5
5277 ac_status=$?
d3a24ed2 5278 echo "$as_me:5278: \$? = $ac_status" >&5
f73dda09
JA
5279 (exit $ac_status); }; }; then
5280 ac_func_getpgrp_1=yes
5281else
5282 echo "$as_me: failed program was:" >&5
5283cat conftest.$ac_ext >&5
5284ac_func_getpgrp_1=no
5285fi
5286rm -f conftest.$ac_objext conftest.$ac_ext
5287# Use it with no arg.
5288cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 5289#line 5289 "configure"
f73dda09
JA
5290#include "confdefs.h"
5291$ac_includes_default
5292int
5293main ()
5294{
5295getpgrp ();
5296 ;
5297 return 0;
5298}
5299_ACEOF
5300rm -f conftest.$ac_objext
d3a24ed2 5301if { (eval echo "$as_me:5301: \"$ac_compile\"") >&5
f73dda09
JA
5302 (eval $ac_compile) 2>&5
5303 ac_status=$?
d3a24ed2 5304 echo "$as_me:5304: \$? = $ac_status" >&5
f73dda09
JA
5305 (exit $ac_status); } &&
5306 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 5307 { (eval echo "$as_me:5307: \"$ac_try\"") >&5
f73dda09
JA
5308 (eval $ac_try) 2>&5
5309 ac_status=$?
d3a24ed2 5310 echo "$as_me:5310: \$? = $ac_status" >&5
f73dda09
JA
5311 (exit $ac_status); }; }; then
5312 ac_func_getpgrp_0=yes
5313else
5314 echo "$as_me: failed program was:" >&5
5315cat conftest.$ac_ext >&5
5316ac_func_getpgrp_0=no
5317fi
5318rm -f conftest.$ac_objext conftest.$ac_ext
5319# If both static checks agree, we are done.
5320case $ac_func_getpgrp_0:$ac_func_getpgrp_1 in
5321 yes:no) ac_cv_func_getpgrp_void=yes;;
5322 no:yes) ac_cv_func_getpgrp_void=false;;
5323 *) if test "$cross_compiling" = yes; then
d3a24ed2 5324 { { echo "$as_me:5324: error: cannot check getpgrp if cross compiling" >&5
f73dda09
JA
5325echo "$as_me: error: cannot check getpgrp if cross compiling" >&2;}
5326 { (exit 1); exit 1; }; }
5327else
5328 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 5329#line 5329 "configure"
f73dda09
JA
5330#include "confdefs.h"
5331$ac_includes_default
ccc6cda3 5332
f73dda09
JA
5333/*
5334 * If this system has a BSD-style getpgrp(),
5335 * which takes a pid argument, exit unsuccessfully.
5336 *
5337 * Snarfed from Chet Ramey's bash pgrp.c test program
5338 */
ccc6cda3 5339
f73dda09
JA
5340int pid;
5341int pg1, pg2, pg3, pg4;
5342int ng, np, s, child;
ccc6cda3 5343
f73dda09
JA
5344int
5345main ()
5346{
5347 pid = getpid ();
5348 pg1 = getpgrp (0);
5349 pg2 = getpgrp ();
5350 pg3 = getpgrp (pid);
5351 pg4 = getpgrp (1);
5352
5353 /* If all of these values are the same, it's pretty sure that we're
5354 on a system that ignores getpgrp's first argument. */
5355 if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
5356 exit (0);
5357
5358 child = fork ();
5359 if (child < 0)
5360 exit(1);
5361 else if (child == 0)
5362 {
5363 np = getpid ();
5364 /* If this is Sys V, this will not work; pgrp will be set to np
5365 because setpgrp just changes a pgrp to be the same as the
5366 pid. */
5367 setpgrp (np, pg1);
5368 ng = getpgrp (0); /* Same result for Sys V and BSD */
5369 if (ng == pg1)
5370 exit (1);
5371 else
5372 exit (0);
5373 }
5374 else
5375 {
5376 wait (&s);
5377 exit (s>>8);
5378 }
5379}
5380
5381_ACEOF
5382rm -f conftest$ac_exeext
d3a24ed2 5383if { (eval echo "$as_me:5383: \"$ac_link\"") >&5
f73dda09
JA
5384 (eval $ac_link) 2>&5
5385 ac_status=$?
d3a24ed2 5386 echo "$as_me:5386: \$? = $ac_status" >&5
f73dda09 5387 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3a24ed2 5388 { (eval echo "$as_me:5388: \"$ac_try\"") >&5
f73dda09
JA
5389 (eval $ac_try) 2>&5
5390 ac_status=$?
d3a24ed2 5391 echo "$as_me:5391: \$? = $ac_status" >&5
f73dda09
JA
5392 (exit $ac_status); }; }; then
5393 ac_cv_func_getpgrp_void=yes
ccc6cda3 5394else
f73dda09
JA
5395 echo "$as_me: program exited with status $ac_status" >&5
5396echo "$as_me: failed program was:" >&5
5397cat conftest.$ac_ext >&5
5398ac_cv_func_getpgrp_void=no
ccc6cda3 5399fi
f73dda09
JA
5400rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5401fi;;
5402esac # $ac_func_getpgrp_0:$ac_func_getpgrp_1
5403
ccc6cda3 5404fi
d3a24ed2 5405echo "$as_me:5405: result: $ac_cv_func_getpgrp_void" >&5
f73dda09
JA
5406echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6
5407if test $ac_cv_func_getpgrp_void = yes; then
ccc6cda3 5408
f73dda09
JA
5409cat >>confdefs.h <<\EOF
5410#define GETPGRP_VOID 1
ccc6cda3 5411EOF
ccc6cda3 5412
cce855bc 5413fi
ccc6cda3 5414
d3a24ed2 5415echo "$as_me:5415: checking whether setvbuf arguments are reversed" >&5
f73dda09
JA
5416echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
5417if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
5418 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 5419else
f73dda09 5420 if test "$cross_compiling" = yes; then
d3a24ed2 5421 { { echo "$as_me:5421: error: cannot run test program while cross compiling" >&5
f73dda09
JA
5422echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5423 { (exit 1); exit 1; }; }
5424else
5425 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 5426#line 5426 "configure"
ccc6cda3 5427#include "confdefs.h"
f73dda09
JA
5428#include <stdio.h>
5429/* If setvbuf has the reversed format, exit 0. */
5430int
5431main ()
5432{
5433 /* This call has the arguments reversed.
5434 A reversed system may check and see that the address of main
5435 is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */
5436 if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
5437 exit(1);
5438 putc('\r', stdout);
5439 exit(0); /* Non-reversed systems segv here. */
5440}
5441_ACEOF
5442rm -f conftest$ac_exeext
d3a24ed2 5443if { (eval echo "$as_me:5443: \"$ac_link\"") >&5
f73dda09
JA
5444 (eval $ac_link) 2>&5
5445 ac_status=$?
d3a24ed2 5446 echo "$as_me:5446: \$? = $ac_status" >&5
f73dda09 5447 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3a24ed2 5448 { (eval echo "$as_me:5448: \"$ac_try\"") >&5
f73dda09
JA
5449 (eval $ac_try) 2>&5
5450 ac_status=$?
d3a24ed2 5451 echo "$as_me:5451: \$? = $ac_status" >&5
f73dda09
JA
5452 (exit $ac_status); }; }; then
5453 ac_cv_func_setvbuf_reversed=yes
ccc6cda3 5454else
f73dda09
JA
5455 echo "$as_me: program exited with status $ac_status" >&5
5456echo "$as_me: failed program was:" >&5
5457cat conftest.$ac_ext >&5
5458ac_cv_func_setvbuf_reversed=no
ccc6cda3 5459fi
f73dda09
JA
5460rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5461fi
5462rm -f core core.* *.core
ccc6cda3 5463fi
d3a24ed2 5464echo "$as_me:5464: result: $ac_cv_func_setvbuf_reversed" >&5
f73dda09
JA
5465echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
5466if test $ac_cv_func_setvbuf_reversed = yes; then
ccc6cda3 5467
f73dda09
JA
5468cat >>confdefs.h <<\EOF
5469#define SETVBUF_REVERSED 1
ccc6cda3
JA
5470EOF
5471
5472fi
5473
f73dda09 5474for ac_func in vprintf
ccc6cda3 5475do
f73dda09 5476as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d3a24ed2 5477echo "$as_me:5477: checking for $ac_func" >&5
f73dda09
JA
5478echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5479if eval "test \"\${$as_ac_var+set}\" = set"; then
5480 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 5481else
f73dda09 5482 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 5483#line 5483 "configure"
ccc6cda3 5484#include "confdefs.h"
f73dda09
JA
5485/* System header to define __stub macros and hopefully few prototypes,
5486 which can conflict with char $ac_func (); below. */
5487#include <assert.h>
5488/* Override any gcc2 internal prototype to avoid an error. */
5489#ifdef __cplusplus
5490extern "C"
5491#endif
5492/* We use char because int might match the return type of a gcc2
5493 builtin and then its argument prototype would still apply. */
5494char $ac_func ();
5495char (*f) ();
5496
5497int
5498main ()
5499{
5500/* The GNU C library defines this for functions which it implements
5501 to always fail with ENOSYS. Some functions are actually named
5502 something starting with __ and the normal name is an alias. */
5503#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5504choke me
5505#else
5506f = $ac_func;
5507#endif
5508
5509 ;
5510 return 0;
5511}
5512_ACEOF
5513rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 5514if { (eval echo "$as_me:5514: \"$ac_link\"") >&5
f73dda09
JA
5515 (eval $ac_link) 2>&5
5516 ac_status=$?
d3a24ed2 5517 echo "$as_me:5517: \$? = $ac_status" >&5
f73dda09
JA
5518 (exit $ac_status); } &&
5519 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 5520 { (eval echo "$as_me:5520: \"$ac_try\"") >&5
f73dda09
JA
5521 (eval $ac_try) 2>&5
5522 ac_status=$?
d3a24ed2 5523 echo "$as_me:5523: \$? = $ac_status" >&5
f73dda09
JA
5524 (exit $ac_status); }; }; then
5525 eval "$as_ac_var=yes"
5526else
5527 echo "$as_me: failed program was:" >&5
5528cat conftest.$ac_ext >&5
5529eval "$as_ac_var=no"
5530fi
5531rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5532fi
d3a24ed2 5533echo "$as_me:5533: result: `eval echo '${'$as_ac_var'}'`" >&5
f73dda09
JA
5534echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5535if test `eval echo '${'$as_ac_var'}'` = yes; then
5536 cat >>confdefs.h <<EOF
5537#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5538EOF
5539
d3a24ed2 5540echo "$as_me:5540: checking for _doprnt" >&5
f73dda09
JA
5541echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
5542if test "${ac_cv_func__doprnt+set}" = set; then
5543 echo $ECHO_N "(cached) $ECHO_C" >&6
5544else
5545 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 5546#line 5546 "configure"
ccc6cda3 5547#include "confdefs.h"
f73dda09
JA
5548/* System header to define __stub macros and hopefully few prototypes,
5549 which can conflict with char _doprnt (); below. */
5550#include <assert.h>
ccc6cda3 5551/* Override any gcc2 internal prototype to avoid an error. */
f73dda09
JA
5552#ifdef __cplusplus
5553extern "C"
5554#endif
ccc6cda3 5555/* We use char because int might match the return type of a gcc2
f73dda09
JA
5556 builtin and then its argument prototype would still apply. */
5557char _doprnt ();
5558char (*f) ();
ccc6cda3 5559
f73dda09
JA
5560int
5561main ()
5562{
5563/* The GNU C library defines this for functions which it implements
5564 to always fail with ENOSYS. Some functions are actually named
5565 something starting with __ and the normal name is an alias. */
5566#if defined (__stub__doprnt) || defined (__stub____doprnt)
5567choke me
5568#else
5569f = _doprnt;
5570#endif
5571
5572 ;
5573 return 0;
5574}
5575_ACEOF
5576rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 5577if { (eval echo "$as_me:5577: \"$ac_link\"") >&5
f73dda09
JA
5578 (eval $ac_link) 2>&5
5579 ac_status=$?
d3a24ed2 5580 echo "$as_me:5580: \$? = $ac_status" >&5
f73dda09
JA
5581 (exit $ac_status); } &&
5582 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 5583 { (eval echo "$as_me:5583: \"$ac_try\"") >&5
f73dda09
JA
5584 (eval $ac_try) 2>&5
5585 ac_status=$?
d3a24ed2 5586 echo "$as_me:5586: \$? = $ac_status" >&5
f73dda09
JA
5587 (exit $ac_status); }; }; then
5588 ac_cv_func__doprnt=yes
5589else
5590 echo "$as_me: failed program was:" >&5
5591cat conftest.$ac_ext >&5
5592ac_cv_func__doprnt=no
5593fi
5594rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5595fi
d3a24ed2 5596echo "$as_me:5596: result: $ac_cv_func__doprnt" >&5
f73dda09
JA
5597echo "${ECHO_T}$ac_cv_func__doprnt" >&6
5598if test $ac_cv_func__doprnt = yes; then
5599
5600cat >>confdefs.h <<\EOF
5601#define HAVE_DOPRNT 1
ccc6cda3 5602EOF
ccc6cda3
JA
5603
5604fi
f73dda09 5605
ccc6cda3 5606fi
f73dda09 5607done
ccc6cda3 5608
d3a24ed2 5609echo "$as_me:5609: checking for working strcoll" >&5
f73dda09
JA
5610echo $ECHO_N "checking for working strcoll... $ECHO_C" >&6
5611if test "${ac_cv_func_strcoll_works+set}" = set; then
5612 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 5613else
f73dda09
JA
5614 if test "$cross_compiling" = yes; then
5615 ac_cv_func_strcoll_works=no
ccc6cda3 5616else
f73dda09 5617 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 5618#line 5618 "configure"
ccc6cda3 5619#include "confdefs.h"
f73dda09
JA
5620$ac_includes_default
5621int
5622main ()
5623{
5624exit (strcoll ("abc", "def") >= 0 ||
5625 strcoll ("ABC", "DEF") >= 0 ||
5626 strcoll ("123", "456") >= 0)
5627 ;
5628 return 0;
5629}
5630_ACEOF
5631rm -f conftest$ac_exeext
d3a24ed2 5632if { (eval echo "$as_me:5632: \"$ac_link\"") >&5
f73dda09
JA
5633 (eval $ac_link) 2>&5
5634 ac_status=$?
d3a24ed2 5635 echo "$as_me:5635: \$? = $ac_status" >&5
f73dda09 5636 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3a24ed2 5637 { (eval echo "$as_me:5637: \"$ac_try\"") >&5
f73dda09
JA
5638 (eval $ac_try) 2>&5
5639 ac_status=$?
d3a24ed2 5640 echo "$as_me:5640: \$? = $ac_status" >&5
f73dda09
JA
5641 (exit $ac_status); }; }; then
5642 ac_cv_func_strcoll_works=yes
ccc6cda3 5643else
f73dda09
JA
5644 echo "$as_me: program exited with status $ac_status" >&5
5645echo "$as_me: failed program was:" >&5
5646cat conftest.$ac_ext >&5
5647ac_cv_func_strcoll_works=no
ccc6cda3 5648fi
f73dda09 5649rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ccc6cda3 5650fi
f73dda09 5651fi
d3a24ed2 5652echo "$as_me:5652: result: $ac_cv_func_strcoll_works" >&5
f73dda09
JA
5653echo "${ECHO_T}$ac_cv_func_strcoll_works" >&6
5654if test $ac_cv_func_strcoll_works = yes; then
5655
5656cat >>confdefs.h <<\EOF
5657#define HAVE_STRCOLL 1
5658EOF
5659
ccc6cda3
JA
5660fi
5661
f73dda09
JA
5662if test "$ac_cv_func_alloca_works" = "no" && test "$opt_bash_malloc" = "no"; then
5663 MALLOC_TARGET=alloca
5664 MALLOC_SRC=alloca.c
5665
5666 MALLOC_LIB='-lmalloc'
5667 MALLOC_LIBRARY='$(ALLOC_LIBDIR)/libmalloc.a'
5668 MALLOC_LDFLAGS='-L$(ALLOC_LIBDIR)'
5669 MALLOC_DEP='$(MALLOC_LIBRARY)'
ccc6cda3
JA
5670fi
5671
f73dda09 5672if test "$ac_cv_func_vprintf" = no; then
d3a24ed2 5673 echo "$as_me:5673: checking for declaration of vprintf in stdio.h" >&5
f73dda09
JA
5674echo $ECHO_N "checking for declaration of vprintf in stdio.h... $ECHO_C" >&6
5675 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 5676#line 5676 "configure"
ccc6cda3 5677#include "confdefs.h"
f73dda09
JA
5678#include <stdio.h>
5679
5680_ACEOF
5681if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5682 egrep "[int[ ]*vprintf[^a-zA-Z0-9]]" >/dev/null 2>&1; then
5683 ac_cv_func_vprintf=yes
ccc6cda3
JA
5684fi
5685rm -f conftest*
ccc6cda3 5686
d3a24ed2 5687 echo "$as_me:5687: result: $ac_cv_func_vprintf" >&5
f73dda09
JA
5688echo "${ECHO_T}$ac_cv_func_vprintf" >&6
5689 if test $ac_cv_func_vprintf = yes; then
5690 cat >>confdefs.h <<\EOF
5691#define HAVE_VPRINTF 1
ccc6cda3
JA
5692EOF
5693
f73dda09 5694 fi
ccc6cda3
JA
5695fi
5696
f73dda09
JA
5697if test "$ac_cv_func_vprintf" = no && test "$ac_cv_func__doprnt" = "yes"; then
5698 LIBOBJS="$LIBOBJS vprint.$ac_objext"
5699fi
ccc6cda3 5700
d3a24ed2 5701echo "$as_me:5701: checking return type of signal handlers" >&5
f73dda09
JA
5702echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5703if test "${ac_cv_type_signal+set}" = set; then
5704 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 5705else
f73dda09 5706 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 5707#line 5707 "configure"
ccc6cda3 5708#include "confdefs.h"
f73dda09
JA
5709#include <sys/types.h>
5710#include <signal.h>
5711#ifdef signal
5712# undef signal
5713#endif
5714#ifdef __cplusplus
5715extern "C" void (*signal (int, void (*)(int)))(int);
5716#else
5717void (*signal ()) ();
5718#endif
5719
5720int
5721main ()
5722{
5723int i;
5724 ;
5725 return 0;
5726}
5727_ACEOF
5728rm -f conftest.$ac_objext
d3a24ed2 5729if { (eval echo "$as_me:5729: \"$ac_compile\"") >&5
f73dda09
JA
5730 (eval $ac_compile) 2>&5
5731 ac_status=$?
d3a24ed2 5732 echo "$as_me:5732: \$? = $ac_status" >&5
f73dda09
JA
5733 (exit $ac_status); } &&
5734 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 5735 { (eval echo "$as_me:5735: \"$ac_try\"") >&5
f73dda09
JA
5736 (eval $ac_try) 2>&5
5737 ac_status=$?
d3a24ed2 5738 echo "$as_me:5738: \$? = $ac_status" >&5
f73dda09
JA
5739 (exit $ac_status); }; }; then
5740 ac_cv_type_signal=void
ccc6cda3 5741else
f73dda09
JA
5742 echo "$as_me: failed program was:" >&5
5743cat conftest.$ac_ext >&5
5744ac_cv_type_signal=int
ccc6cda3 5745fi
f73dda09 5746rm -f conftest.$ac_objext conftest.$ac_ext
ccc6cda3 5747fi
d3a24ed2 5748echo "$as_me:5748: result: $ac_cv_type_signal" >&5
f73dda09
JA
5749echo "${ECHO_T}$ac_cv_type_signal" >&6
5750
5751cat >>confdefs.h <<EOF
5752#define RETSIGTYPE $ac_cv_type_signal
ccc6cda3 5753EOF
ccc6cda3 5754
d3a24ed2 5755echo "$as_me:5755: checking for __setostype" >&5
f73dda09
JA
5756echo $ECHO_N "checking for __setostype... $ECHO_C" >&6
5757if test "${ac_cv_func___setostype+set}" = set; then
5758 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 5759else
f73dda09 5760 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 5761#line 5761 "configure"
ccc6cda3 5762#include "confdefs.h"
f73dda09
JA
5763/* System header to define __stub macros and hopefully few prototypes,
5764 which can conflict with char __setostype (); below. */
5765#include <assert.h>
5766/* Override any gcc2 internal prototype to avoid an error. */
5767#ifdef __cplusplus
5768extern "C"
5769#endif
5770/* We use char because int might match the return type of a gcc2
5771 builtin and then its argument prototype would still apply. */
5772char __setostype ();
5773char (*f) ();
5774
5775int
5776main ()
5777{
5778/* The GNU C library defines this for functions which it implements
5779 to always fail with ENOSYS. Some functions are actually named
5780 something starting with __ and the normal name is an alias. */
5781#if defined (__stub___setostype) || defined (__stub_____setostype)
5782choke me
5783#else
5784f = __setostype;
5785#endif
5786
5787 ;
5788 return 0;
5789}
5790_ACEOF
5791rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 5792if { (eval echo "$as_me:5792: \"$ac_link\"") >&5
f73dda09
JA
5793 (eval $ac_link) 2>&5
5794 ac_status=$?
d3a24ed2 5795 echo "$as_me:5795: \$? = $ac_status" >&5
f73dda09
JA
5796 (exit $ac_status); } &&
5797 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 5798 { (eval echo "$as_me:5798: \"$ac_try\"") >&5
f73dda09
JA
5799 (eval $ac_try) 2>&5
5800 ac_status=$?
d3a24ed2 5801 echo "$as_me:5801: \$? = $ac_status" >&5
f73dda09
JA
5802 (exit $ac_status); }; }; then
5803 ac_cv_func___setostype=yes
5804else
5805 echo "$as_me: failed program was:" >&5
5806cat conftest.$ac_ext >&5
5807ac_cv_func___setostype=no
5808fi
5809rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5810fi
d3a24ed2 5811echo "$as_me:5811: result: $ac_cv_func___setostype" >&5
f73dda09
JA
5812echo "${ECHO_T}$ac_cv_func___setostype" >&6
5813if test $ac_cv_func___setostype = yes; then
5814 cat >>confdefs.h <<\EOF
5815#define HAVE_SETOSTYPE 1
5816EOF
5817
5818fi
5819
d3a24ed2 5820echo "$as_me:5820: checking for wait3" >&5
f73dda09
JA
5821echo $ECHO_N "checking for wait3... $ECHO_C" >&6
5822if test "${ac_cv_func_wait3+set}" = set; then
5823 echo $ECHO_N "(cached) $ECHO_C" >&6
5824else
5825 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 5826#line 5826 "configure"
f73dda09
JA
5827#include "confdefs.h"
5828/* System header to define __stub macros and hopefully few prototypes,
5829 which can conflict with char wait3 (); below. */
5830#include <assert.h>
5831/* Override any gcc2 internal prototype to avoid an error. */
5832#ifdef __cplusplus
5833extern "C"
5834#endif
5835/* We use char because int might match the return type of a gcc2
5836 builtin and then its argument prototype would still apply. */
5837char wait3 ();
5838char (*f) ();
5839
5840int
5841main ()
5842{
5843/* The GNU C library defines this for functions which it implements
5844 to always fail with ENOSYS. Some functions are actually named
5845 something starting with __ and the normal name is an alias. */
5846#if defined (__stub_wait3) || defined (__stub___wait3)
5847choke me
5848#else
5849f = wait3;
5850#endif
5851
5852 ;
5853 return 0;
5854}
5855_ACEOF
5856rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 5857if { (eval echo "$as_me:5857: \"$ac_link\"") >&5
f73dda09
JA
5858 (eval $ac_link) 2>&5
5859 ac_status=$?
d3a24ed2 5860 echo "$as_me:5860: \$? = $ac_status" >&5
f73dda09
JA
5861 (exit $ac_status); } &&
5862 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 5863 { (eval echo "$as_me:5863: \"$ac_try\"") >&5
f73dda09
JA
5864 (eval $ac_try) 2>&5
5865 ac_status=$?
d3a24ed2 5866 echo "$as_me:5866: \$? = $ac_status" >&5
f73dda09
JA
5867 (exit $ac_status); }; }; then
5868 ac_cv_func_wait3=yes
5869else
5870 echo "$as_me: failed program was:" >&5
5871cat conftest.$ac_ext >&5
5872ac_cv_func_wait3=no
5873fi
5874rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5875fi
d3a24ed2 5876echo "$as_me:5876: result: $ac_cv_func_wait3" >&5
f73dda09
JA
5877echo "${ECHO_T}$ac_cv_func_wait3" >&6
5878if test $ac_cv_func_wait3 = yes; then
5879 cat >>confdefs.h <<\EOF
5880#define HAVE_WAIT3 1
5881EOF
5882
5883fi
5884
d3a24ed2 5885echo "$as_me:5885: checking for isinf" >&5
7117c2d2
JA
5886echo $ECHO_N "checking for isinf... $ECHO_C" >&6
5887if test "${ac_cv_func_isinf+set}" = set; then
5888 echo $ECHO_N "(cached) $ECHO_C" >&6
5889else
5890 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 5891#line 5891 "configure"
7117c2d2
JA
5892#include "confdefs.h"
5893/* System header to define __stub macros and hopefully few prototypes,
5894 which can conflict with char isinf (); below. */
5895#include <assert.h>
5896/* Override any gcc2 internal prototype to avoid an error. */
5897#ifdef __cplusplus
5898extern "C"
5899#endif
5900/* We use char because int might match the return type of a gcc2
5901 builtin and then its argument prototype would still apply. */
5902char isinf ();
5903char (*f) ();
5904
5905int
5906main ()
5907{
5908/* The GNU C library defines this for functions which it implements
5909 to always fail with ENOSYS. Some functions are actually named
5910 something starting with __ and the normal name is an alias. */
5911#if defined (__stub_isinf) || defined (__stub___isinf)
5912choke me
5913#else
5914f = isinf;
5915#endif
5916
5917 ;
5918 return 0;
5919}
5920_ACEOF
5921rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 5922if { (eval echo "$as_me:5922: \"$ac_link\"") >&5
7117c2d2
JA
5923 (eval $ac_link) 2>&5
5924 ac_status=$?
d3a24ed2 5925 echo "$as_me:5925: \$? = $ac_status" >&5
7117c2d2
JA
5926 (exit $ac_status); } &&
5927 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 5928 { (eval echo "$as_me:5928: \"$ac_try\"") >&5
7117c2d2
JA
5929 (eval $ac_try) 2>&5
5930 ac_status=$?
d3a24ed2 5931 echo "$as_me:5931: \$? = $ac_status" >&5
7117c2d2
JA
5932 (exit $ac_status); }; }; then
5933 ac_cv_func_isinf=yes
5934else
5935 echo "$as_me: failed program was:" >&5
5936cat conftest.$ac_ext >&5
5937ac_cv_func_isinf=no
5938fi
5939rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5940fi
d3a24ed2 5941echo "$as_me:5941: result: $ac_cv_func_isinf" >&5
7117c2d2
JA
5942echo "${ECHO_T}$ac_cv_func_isinf" >&6
5943if test $ac_cv_func_isinf = yes; then
5944 cat >>confdefs.h <<\EOF
5945#define HAVE_ISINF_IN_LIBC 1
5946EOF
5947
5948fi
5949
d3a24ed2 5950echo "$as_me:5950: checking for mkfifo" >&5
f73dda09
JA
5951echo $ECHO_N "checking for mkfifo... $ECHO_C" >&6
5952if test "${ac_cv_func_mkfifo+set}" = set; then
5953 echo $ECHO_N "(cached) $ECHO_C" >&6
5954else
5955 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 5956#line 5956 "configure"
f73dda09
JA
5957#include "confdefs.h"
5958/* System header to define __stub macros and hopefully few prototypes,
5959 which can conflict with char mkfifo (); below. */
5960#include <assert.h>
5961/* Override any gcc2 internal prototype to avoid an error. */
5962#ifdef __cplusplus
5963extern "C"
5964#endif
5965/* We use char because int might match the return type of a gcc2
5966 builtin and then its argument prototype would still apply. */
5967char mkfifo ();
5968char (*f) ();
5969
5970int
5971main ()
5972{
5973/* The GNU C library defines this for functions which it implements
5974 to always fail with ENOSYS. Some functions are actually named
5975 something starting with __ and the normal name is an alias. */
5976#if defined (__stub_mkfifo) || defined (__stub___mkfifo)
5977choke me
5978#else
5979f = mkfifo;
5980#endif
5981
5982 ;
5983 return 0;
5984}
5985_ACEOF
5986rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 5987if { (eval echo "$as_me:5987: \"$ac_link\"") >&5
f73dda09
JA
5988 (eval $ac_link) 2>&5
5989 ac_status=$?
d3a24ed2 5990 echo "$as_me:5990: \$? = $ac_status" >&5
f73dda09
JA
5991 (exit $ac_status); } &&
5992 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 5993 { (eval echo "$as_me:5993: \"$ac_try\"") >&5
f73dda09
JA
5994 (eval $ac_try) 2>&5
5995 ac_status=$?
d3a24ed2 5996 echo "$as_me:5996: \$? = $ac_status" >&5
f73dda09
JA
5997 (exit $ac_status); }; }; then
5998 ac_cv_func_mkfifo=yes
5999else
6000 echo "$as_me: failed program was:" >&5
6001cat conftest.$ac_ext >&5
6002ac_cv_func_mkfifo=no
6003fi
6004rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6005fi
d3a24ed2 6006echo "$as_me:6006: result: $ac_cv_func_mkfifo" >&5
f73dda09
JA
6007echo "${ECHO_T}$ac_cv_func_mkfifo" >&6
6008if test $ac_cv_func_mkfifo = yes; then
6009 cat >>confdefs.h <<\EOF
6010#define HAVE_MKFIFO 1
6011EOF
6012
6013else
6014 cat >>confdefs.h <<\EOF
6015#define MKFIFO_MISSING 1
6016EOF
6017
6018fi
6019
6020for ac_func in dup2 select getdtablesize getgroups gethostname \
6021 setdtablesize getpagesize killpg lstat getpeername sbrk \
6022 getrlimit getrusage gettimeofday waitpid tcgetpgrp \
6023 readlink
6024do
6025as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d3a24ed2 6026echo "$as_me:6026: checking for $ac_func" >&5
f73dda09
JA
6027echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6028if eval "test \"\${$as_ac_var+set}\" = set"; then
6029 echo $ECHO_N "(cached) $ECHO_C" >&6
6030else
6031 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 6032#line 6032 "configure"
f73dda09
JA
6033#include "confdefs.h"
6034/* System header to define __stub macros and hopefully few prototypes,
6035 which can conflict with char $ac_func (); below. */
6036#include <assert.h>
6037/* Override any gcc2 internal prototype to avoid an error. */
6038#ifdef __cplusplus
6039extern "C"
6040#endif
6041/* We use char because int might match the return type of a gcc2
6042 builtin and then its argument prototype would still apply. */
6043char $ac_func ();
6044char (*f) ();
6045
6046int
6047main ()
6048{
6049/* The GNU C library defines this for functions which it implements
6050 to always fail with ENOSYS. Some functions are actually named
6051 something starting with __ and the normal name is an alias. */
6052#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6053choke me
6054#else
6055f = $ac_func;
6056#endif
6057
6058 ;
6059 return 0;
6060}
6061_ACEOF
6062rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 6063if { (eval echo "$as_me:6063: \"$ac_link\"") >&5
f73dda09
JA
6064 (eval $ac_link) 2>&5
6065 ac_status=$?
d3a24ed2 6066 echo "$as_me:6066: \$? = $ac_status" >&5
f73dda09
JA
6067 (exit $ac_status); } &&
6068 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 6069 { (eval echo "$as_me:6069: \"$ac_try\"") >&5
f73dda09
JA
6070 (eval $ac_try) 2>&5
6071 ac_status=$?
d3a24ed2 6072 echo "$as_me:6072: \$? = $ac_status" >&5
f73dda09
JA
6073 (exit $ac_status); }; }; then
6074 eval "$as_ac_var=yes"
6075else
6076 echo "$as_me: failed program was:" >&5
6077cat conftest.$ac_ext >&5
6078eval "$as_ac_var=no"
6079fi
6080rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6081fi
d3a24ed2 6082echo "$as_me:6082: result: `eval echo '${'$as_ac_var'}'`" >&5
f73dda09
JA
6083echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6084if test `eval echo '${'$as_ac_var'}'` = yes; then
6085 cat >>confdefs.h <<EOF
6086#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6087EOF
6088
6089fi
6090done
6091
6092for ac_func in rename
6093do
6094as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d3a24ed2 6095echo "$as_me:6095: checking for $ac_func" >&5
f73dda09
JA
6096echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6097if eval "test \"\${$as_ac_var+set}\" = set"; then
6098 echo $ECHO_N "(cached) $ECHO_C" >&6
6099else
6100 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 6101#line 6101 "configure"
f73dda09
JA
6102#include "confdefs.h"
6103/* System header to define __stub macros and hopefully few prototypes,
6104 which can conflict with char $ac_func (); below. */
6105#include <assert.h>
6106/* Override any gcc2 internal prototype to avoid an error. */
6107#ifdef __cplusplus
6108extern "C"
6109#endif
6110/* We use char because int might match the return type of a gcc2
6111 builtin and then its argument prototype would still apply. */
6112char $ac_func ();
6113char (*f) ();
6114
6115int
6116main ()
6117{
6118/* The GNU C library defines this for functions which it implements
6119 to always fail with ENOSYS. Some functions are actually named
6120 something starting with __ and the normal name is an alias. */
6121#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6122choke me
6123#else
6124f = $ac_func;
6125#endif
6126
6127 ;
6128 return 0;
6129}
6130_ACEOF
6131rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 6132if { (eval echo "$as_me:6132: \"$ac_link\"") >&5
f73dda09
JA
6133 (eval $ac_link) 2>&5
6134 ac_status=$?
d3a24ed2 6135 echo "$as_me:6135: \$? = $ac_status" >&5
f73dda09
JA
6136 (exit $ac_status); } &&
6137 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 6138 { (eval echo "$as_me:6138: \"$ac_try\"") >&5
f73dda09
JA
6139 (eval $ac_try) 2>&5
6140 ac_status=$?
d3a24ed2 6141 echo "$as_me:6141: \$? = $ac_status" >&5
f73dda09
JA
6142 (exit $ac_status); }; }; then
6143 eval "$as_ac_var=yes"
6144else
6145 echo "$as_me: failed program was:" >&5
6146cat conftest.$ac_ext >&5
6147eval "$as_ac_var=no"
6148fi
6149rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6150fi
d3a24ed2 6151echo "$as_me:6151: result: `eval echo '${'$as_ac_var'}'`" >&5
f73dda09
JA
6152echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6153if test `eval echo '${'$as_ac_var'}'` = yes; then
6154 cat >>confdefs.h <<EOF
6155#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6156EOF
6157
6158else
6159 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
6160fi
6161done
6162
7117c2d2 6163for ac_func in bcopy bzero confstr sysconf pathconf setenv putenv unsetenv \
f73dda09
JA
6164 setlinebuf setvbuf setlocale strchr tcgetattr uname \
6165 ulimit tzset siginterrupt memmove ttyname times \
7117c2d2 6166 getaddrinfo gethostbyname getservbyname getservent inet_aton \
d3a24ed2 6167 vsnprintf snprintf vasprintf asprintf fnmatch regcomp regexec
f73dda09
JA
6168do
6169as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d3a24ed2 6170echo "$as_me:6170: checking for $ac_func" >&5
f73dda09
JA
6171echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6172if eval "test \"\${$as_ac_var+set}\" = set"; then
6173 echo $ECHO_N "(cached) $ECHO_C" >&6
6174else
6175 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 6176#line 6176 "configure"
f73dda09
JA
6177#include "confdefs.h"
6178/* System header to define __stub macros and hopefully few prototypes,
6179 which can conflict with char $ac_func (); below. */
6180#include <assert.h>
6181/* Override any gcc2 internal prototype to avoid an error. */
6182#ifdef __cplusplus
6183extern "C"
6184#endif
6185/* We use char because int might match the return type of a gcc2
6186 builtin and then its argument prototype would still apply. */
6187char $ac_func ();
6188char (*f) ();
6189
6190int
6191main ()
6192{
6193/* The GNU C library defines this for functions which it implements
6194 to always fail with ENOSYS. Some functions are actually named
6195 something starting with __ and the normal name is an alias. */
6196#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6197choke me
6198#else
6199f = $ac_func;
6200#endif
6201
6202 ;
6203 return 0;
6204}
6205_ACEOF
6206rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 6207if { (eval echo "$as_me:6207: \"$ac_link\"") >&5
f73dda09
JA
6208 (eval $ac_link) 2>&5
6209 ac_status=$?
d3a24ed2 6210 echo "$as_me:6210: \$? = $ac_status" >&5
f73dda09
JA
6211 (exit $ac_status); } &&
6212 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 6213 { (eval echo "$as_me:6213: \"$ac_try\"") >&5
f73dda09
JA
6214 (eval $ac_try) 2>&5
6215 ac_status=$?
d3a24ed2 6216 echo "$as_me:6216: \$? = $ac_status" >&5
f73dda09
JA
6217 (exit $ac_status); }; }; then
6218 eval "$as_ac_var=yes"
6219else
6220 echo "$as_me: failed program was:" >&5
6221cat conftest.$ac_ext >&5
6222eval "$as_ac_var=no"
6223fi
6224rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6225fi
d3a24ed2 6226echo "$as_me:6226: result: `eval echo '${'$as_ac_var'}'`" >&5
f73dda09
JA
6227echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6228if test `eval echo '${'$as_ac_var'}'` = yes; then
6229 cat >>confdefs.h <<EOF
6230#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6231EOF
6232
6233fi
6234done
6235
6236for ac_func in isascii isblank isgraph isprint isspace isxdigit
6237do
6238as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d3a24ed2 6239echo "$as_me:6239: checking for $ac_func" >&5
f73dda09
JA
6240echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6241if eval "test \"\${$as_ac_var+set}\" = set"; then
6242 echo $ECHO_N "(cached) $ECHO_C" >&6
6243else
6244 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 6245#line 6245 "configure"
f73dda09
JA
6246#include "confdefs.h"
6247/* System header to define __stub macros and hopefully few prototypes,
6248 which can conflict with char $ac_func (); below. */
6249#include <assert.h>
6250/* Override any gcc2 internal prototype to avoid an error. */
6251#ifdef __cplusplus
6252extern "C"
6253#endif
6254/* We use char because int might match the return type of a gcc2
6255 builtin and then its argument prototype would still apply. */
6256char $ac_func ();
6257char (*f) ();
6258
6259int
6260main ()
6261{
6262/* The GNU C library defines this for functions which it implements
6263 to always fail with ENOSYS. Some functions are actually named
6264 something starting with __ and the normal name is an alias. */
6265#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6266choke me
6267#else
6268f = $ac_func;
6269#endif
6270
6271 ;
6272 return 0;
6273}
6274_ACEOF
6275rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 6276if { (eval echo "$as_me:6276: \"$ac_link\"") >&5
f73dda09
JA
6277 (eval $ac_link) 2>&5
6278 ac_status=$?
d3a24ed2 6279 echo "$as_me:6279: \$? = $ac_status" >&5
f73dda09
JA
6280 (exit $ac_status); } &&
6281 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 6282 { (eval echo "$as_me:6282: \"$ac_try\"") >&5
f73dda09
JA
6283 (eval $ac_try) 2>&5
6284 ac_status=$?
d3a24ed2 6285 echo "$as_me:6285: \$? = $ac_status" >&5
f73dda09
JA
6286 (exit $ac_status); }; }; then
6287 eval "$as_ac_var=yes"
6288else
6289 echo "$as_me: failed program was:" >&5
6290cat conftest.$ac_ext >&5
6291eval "$as_ac_var=no"
6292fi
6293rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6294fi
d3a24ed2 6295echo "$as_me:6295: result: `eval echo '${'$as_ac_var'}'`" >&5
f73dda09
JA
6296echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6297if test `eval echo '${'$as_ac_var'}'` = yes; then
6298 cat >>confdefs.h <<EOF
6299#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6300EOF
6301
6302fi
6303done
6304
d3a24ed2 6305for ac_func in getcwd strcasecmp strerror strftime strpbrk memset strstr
f73dda09
JA
6306do
6307as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d3a24ed2 6308echo "$as_me:6308: checking for $ac_func" >&5
f73dda09
JA
6309echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6310if eval "test \"\${$as_ac_var+set}\" = set"; then
6311 echo $ECHO_N "(cached) $ECHO_C" >&6
6312else
6313 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 6314#line 6314 "configure"
f73dda09
JA
6315#include "confdefs.h"
6316/* System header to define __stub macros and hopefully few prototypes,
6317 which can conflict with char $ac_func (); below. */
6318#include <assert.h>
6319/* Override any gcc2 internal prototype to avoid an error. */
6320#ifdef __cplusplus
6321extern "C"
6322#endif
6323/* We use char because int might match the return type of a gcc2
6324 builtin and then its argument prototype would still apply. */
6325char $ac_func ();
6326char (*f) ();
6327
6328int
6329main ()
6330{
6331/* The GNU C library defines this for functions which it implements
6332 to always fail with ENOSYS. Some functions are actually named
6333 something starting with __ and the normal name is an alias. */
6334#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6335choke me
6336#else
6337f = $ac_func;
6338#endif
6339
6340 ;
6341 return 0;
6342}
6343_ACEOF
6344rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 6345if { (eval echo "$as_me:6345: \"$ac_link\"") >&5
f73dda09
JA
6346 (eval $ac_link) 2>&5
6347 ac_status=$?
d3a24ed2 6348 echo "$as_me:6348: \$? = $ac_status" >&5
f73dda09
JA
6349 (exit $ac_status); } &&
6350 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 6351 { (eval echo "$as_me:6351: \"$ac_try\"") >&5
f73dda09
JA
6352 (eval $ac_try) 2>&5
6353 ac_status=$?
d3a24ed2 6354 echo "$as_me:6354: \$? = $ac_status" >&5
f73dda09
JA
6355 (exit $ac_status); }; }; then
6356 eval "$as_ac_var=yes"
6357else
6358 echo "$as_me: failed program was:" >&5
6359cat conftest.$ac_ext >&5
6360eval "$as_ac_var=no"
6361fi
6362rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6363fi
d3a24ed2 6364echo "$as_me:6364: result: `eval echo '${'$as_ac_var'}'`" >&5
f73dda09
JA
6365echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6366if test `eval echo '${'$as_ac_var'}'` = yes; then
6367 cat >>confdefs.h <<EOF
6368#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6369EOF
6370
6371else
6372 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
6373fi
6374done
6375
7117c2d2 6376for ac_func in strtod strtol strtoul strtoll strtoull strtoimax strtoumax
f73dda09
JA
6377do
6378as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d3a24ed2 6379echo "$as_me:6379: checking for $ac_func" >&5
f73dda09
JA
6380echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6381if eval "test \"\${$as_ac_var+set}\" = set"; then
6382 echo $ECHO_N "(cached) $ECHO_C" >&6
6383else
6384 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 6385#line 6385 "configure"
f73dda09
JA
6386#include "confdefs.h"
6387/* System header to define __stub macros and hopefully few prototypes,
6388 which can conflict with char $ac_func (); below. */
6389#include <assert.h>
6390/* Override any gcc2 internal prototype to avoid an error. */
6391#ifdef __cplusplus
6392extern "C"
6393#endif
6394/* We use char because int might match the return type of a gcc2
6395 builtin and then its argument prototype would still apply. */
6396char $ac_func ();
6397char (*f) ();
6398
6399int
6400main ()
6401{
6402/* The GNU C library defines this for functions which it implements
6403 to always fail with ENOSYS. Some functions are actually named
6404 something starting with __ and the normal name is an alias. */
6405#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6406choke me
6407#else
6408f = $ac_func;
6409#endif
6410
6411 ;
6412 return 0;
6413}
6414_ACEOF
6415rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 6416if { (eval echo "$as_me:6416: \"$ac_link\"") >&5
f73dda09
JA
6417 (eval $ac_link) 2>&5
6418 ac_status=$?
d3a24ed2 6419 echo "$as_me:6419: \$? = $ac_status" >&5
f73dda09
JA
6420 (exit $ac_status); } &&
6421 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 6422 { (eval echo "$as_me:6422: \"$ac_try\"") >&5
f73dda09
JA
6423 (eval $ac_try) 2>&5
6424 ac_status=$?
d3a24ed2 6425 echo "$as_me:6425: \$? = $ac_status" >&5
f73dda09
JA
6426 (exit $ac_status); }; }; then
6427 eval "$as_ac_var=yes"
6428else
6429 echo "$as_me: failed program was:" >&5
6430cat conftest.$ac_ext >&5
6431eval "$as_ac_var=no"
6432fi
6433rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6434fi
d3a24ed2 6435echo "$as_me:6435: result: `eval echo '${'$as_ac_var'}'`" >&5
f73dda09
JA
6436echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6437if test `eval echo '${'$as_ac_var'}'` = yes; then
6438 cat >>confdefs.h <<EOF
6439#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6440EOF
6441
6442else
6443 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
6444fi
6445done
6446
d3a24ed2 6447echo "$as_me:6447: checking whether confstr is declared" >&5
7117c2d2
JA
6448echo $ECHO_N "checking whether confstr is declared... $ECHO_C" >&6
6449if test "${ac_cv_have_decl_confstr+set}" = set; then
f73dda09
JA
6450 echo $ECHO_N "(cached) $ECHO_C" >&6
6451else
6452 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 6453#line 6453 "configure"
f73dda09
JA
6454#include "confdefs.h"
6455$ac_includes_default
6456int
6457main ()
6458{
7117c2d2
JA
6459#ifndef confstr
6460 char *p = (char *) confstr;
f73dda09
JA
6461#endif
6462
6463 ;
6464 return 0;
6465}
6466_ACEOF
6467rm -f conftest.$ac_objext
d3a24ed2 6468if { (eval echo "$as_me:6468: \"$ac_compile\"") >&5
f73dda09
JA
6469 (eval $ac_compile) 2>&5
6470 ac_status=$?
d3a24ed2 6471 echo "$as_me:6471: \$? = $ac_status" >&5
f73dda09
JA
6472 (exit $ac_status); } &&
6473 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 6474 { (eval echo "$as_me:6474: \"$ac_try\"") >&5
f73dda09
JA
6475 (eval $ac_try) 2>&5
6476 ac_status=$?
d3a24ed2 6477 echo "$as_me:6477: \$? = $ac_status" >&5
f73dda09 6478 (exit $ac_status); }; }; then
7117c2d2 6479 ac_cv_have_decl_confstr=yes
f73dda09
JA
6480else
6481 echo "$as_me: failed program was:" >&5
6482cat conftest.$ac_ext >&5
7117c2d2 6483ac_cv_have_decl_confstr=no
f73dda09
JA
6484fi
6485rm -f conftest.$ac_objext conftest.$ac_ext
6486fi
d3a24ed2 6487echo "$as_me:6487: result: $ac_cv_have_decl_confstr" >&5
7117c2d2
JA
6488echo "${ECHO_T}$ac_cv_have_decl_confstr" >&6
6489if test $ac_cv_have_decl_confstr = yes; then
f73dda09
JA
6490
6491cat >>confdefs.h <<EOF
7117c2d2 6492#define HAVE_DECL_CONFSTR 1
f73dda09
JA
6493EOF
6494
6495else
6496 cat >>confdefs.h <<EOF
7117c2d2 6497#define HAVE_DECL_CONFSTR 0
f73dda09
JA
6498EOF
6499
6500fi
6501
d3a24ed2 6502echo "$as_me:6502: checking whether printf is declared" >&5
7117c2d2
JA
6503echo $ECHO_N "checking whether printf is declared... $ECHO_C" >&6
6504if test "${ac_cv_have_decl_printf+set}" = set; then
f73dda09
JA
6505 echo $ECHO_N "(cached) $ECHO_C" >&6
6506else
6507 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 6508#line 6508 "configure"
f73dda09
JA
6509#include "confdefs.h"
6510$ac_includes_default
6511int
6512main ()
6513{
7117c2d2
JA
6514#ifndef printf
6515 char *p = (char *) printf;
f73dda09
JA
6516#endif
6517
6518 ;
6519 return 0;
6520}
6521_ACEOF
6522rm -f conftest.$ac_objext
d3a24ed2 6523if { (eval echo "$as_me:6523: \"$ac_compile\"") >&5
f73dda09
JA
6524 (eval $ac_compile) 2>&5
6525 ac_status=$?
d3a24ed2 6526 echo "$as_me:6526: \$? = $ac_status" >&5
f73dda09
JA
6527 (exit $ac_status); } &&
6528 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 6529 { (eval echo "$as_me:6529: \"$ac_try\"") >&5
f73dda09
JA
6530 (eval $ac_try) 2>&5
6531 ac_status=$?
d3a24ed2 6532 echo "$as_me:6532: \$? = $ac_status" >&5
f73dda09 6533 (exit $ac_status); }; }; then
7117c2d2 6534 ac_cv_have_decl_printf=yes
f73dda09
JA
6535else
6536 echo "$as_me: failed program was:" >&5
6537cat conftest.$ac_ext >&5
7117c2d2 6538ac_cv_have_decl_printf=no
f73dda09
JA
6539fi
6540rm -f conftest.$ac_objext conftest.$ac_ext
6541fi
d3a24ed2 6542echo "$as_me:6542: result: $ac_cv_have_decl_printf" >&5
7117c2d2
JA
6543echo "${ECHO_T}$ac_cv_have_decl_printf" >&6
6544if test $ac_cv_have_decl_printf = yes; then
f73dda09
JA
6545
6546cat >>confdefs.h <<EOF
7117c2d2 6547#define HAVE_DECL_PRINTF 1
f73dda09
JA
6548EOF
6549
6550else
6551 cat >>confdefs.h <<EOF
7117c2d2 6552#define HAVE_DECL_PRINTF 0
f73dda09
JA
6553EOF
6554
6555fi
6556
d3a24ed2 6557echo "$as_me:6557: checking whether sbrk is declared" >&5
f73dda09
JA
6558echo $ECHO_N "checking whether sbrk is declared... $ECHO_C" >&6
6559if test "${ac_cv_have_decl_sbrk+set}" = set; then
6560 echo $ECHO_N "(cached) $ECHO_C" >&6
6561else
6562 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 6563#line 6563 "configure"
f73dda09
JA
6564#include "confdefs.h"
6565$ac_includes_default
6566int
6567main ()
6568{
6569#ifndef sbrk
6570 char *p = (char *) sbrk;
6571#endif
6572
6573 ;
6574 return 0;
6575}
6576_ACEOF
6577rm -f conftest.$ac_objext
d3a24ed2 6578if { (eval echo "$as_me:6578: \"$ac_compile\"") >&5
f73dda09
JA
6579 (eval $ac_compile) 2>&5
6580 ac_status=$?
d3a24ed2 6581 echo "$as_me:6581: \$? = $ac_status" >&5
f73dda09
JA
6582 (exit $ac_status); } &&
6583 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 6584 { (eval echo "$as_me:6584: \"$ac_try\"") >&5
f73dda09
JA
6585 (eval $ac_try) 2>&5
6586 ac_status=$?
d3a24ed2 6587 echo "$as_me:6587: \$? = $ac_status" >&5
f73dda09
JA
6588 (exit $ac_status); }; }; then
6589 ac_cv_have_decl_sbrk=yes
6590else
6591 echo "$as_me: failed program was:" >&5
6592cat conftest.$ac_ext >&5
6593ac_cv_have_decl_sbrk=no
6594fi
6595rm -f conftest.$ac_objext conftest.$ac_ext
6596fi
d3a24ed2 6597echo "$as_me:6597: result: $ac_cv_have_decl_sbrk" >&5
f73dda09
JA
6598echo "${ECHO_T}$ac_cv_have_decl_sbrk" >&6
6599if test $ac_cv_have_decl_sbrk = yes; then
6600
6601cat >>confdefs.h <<EOF
6602#define HAVE_DECL_SBRK 1
6603EOF
6604
6605else
6606 cat >>confdefs.h <<EOF
6607#define HAVE_DECL_SBRK 0
6608EOF
6609
6610fi
6611
d3a24ed2 6612echo "$as_me:6612: checking whether strcpy is declared" >&5
7117c2d2
JA
6613echo $ECHO_N "checking whether strcpy is declared... $ECHO_C" >&6
6614if test "${ac_cv_have_decl_strcpy+set}" = set; then
f73dda09
JA
6615 echo $ECHO_N "(cached) $ECHO_C" >&6
6616else
6617 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 6618#line 6618 "configure"
f73dda09
JA
6619#include "confdefs.h"
6620$ac_includes_default
6621int
6622main ()
6623{
7117c2d2
JA
6624#ifndef strcpy
6625 char *p = (char *) strcpy;
f73dda09
JA
6626#endif
6627
6628 ;
6629 return 0;
6630}
6631_ACEOF
6632rm -f conftest.$ac_objext
d3a24ed2 6633if { (eval echo "$as_me:6633: \"$ac_compile\"") >&5
f73dda09
JA
6634 (eval $ac_compile) 2>&5
6635 ac_status=$?
d3a24ed2 6636 echo "$as_me:6636: \$? = $ac_status" >&5
f73dda09
JA
6637 (exit $ac_status); } &&
6638 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 6639 { (eval echo "$as_me:6639: \"$ac_try\"") >&5
f73dda09
JA
6640 (eval $ac_try) 2>&5
6641 ac_status=$?
d3a24ed2 6642 echo "$as_me:6642: \$? = $ac_status" >&5
f73dda09 6643 (exit $ac_status); }; }; then
7117c2d2 6644 ac_cv_have_decl_strcpy=yes
f73dda09
JA
6645else
6646 echo "$as_me: failed program was:" >&5
6647cat conftest.$ac_ext >&5
7117c2d2 6648ac_cv_have_decl_strcpy=no
f73dda09
JA
6649fi
6650rm -f conftest.$ac_objext conftest.$ac_ext
6651fi
d3a24ed2 6652echo "$as_me:6652: result: $ac_cv_have_decl_strcpy" >&5
7117c2d2
JA
6653echo "${ECHO_T}$ac_cv_have_decl_strcpy" >&6
6654if test $ac_cv_have_decl_strcpy = yes; then
f73dda09
JA
6655
6656cat >>confdefs.h <<EOF
7117c2d2 6657#define HAVE_DECL_STRCPY 1
f73dda09
JA
6658EOF
6659
6660else
6661 cat >>confdefs.h <<EOF
7117c2d2 6662#define HAVE_DECL_STRCPY 0
f73dda09
JA
6663EOF
6664
6665fi
6666
d3a24ed2 6667echo "$as_me:6667: checking whether strsignal is declared" >&5
f73dda09
JA
6668echo $ECHO_N "checking whether strsignal is declared... $ECHO_C" >&6
6669if test "${ac_cv_have_decl_strsignal+set}" = set; then
6670 echo $ECHO_N "(cached) $ECHO_C" >&6
6671else
6672 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 6673#line 6673 "configure"
f73dda09
JA
6674#include "confdefs.h"
6675$ac_includes_default
6676int
6677main ()
6678{
6679#ifndef strsignal
6680 char *p = (char *) strsignal;
6681#endif
6682
6683 ;
6684 return 0;
6685}
6686_ACEOF
6687rm -f conftest.$ac_objext
d3a24ed2 6688if { (eval echo "$as_me:6688: \"$ac_compile\"") >&5
f73dda09
JA
6689 (eval $ac_compile) 2>&5
6690 ac_status=$?
d3a24ed2 6691 echo "$as_me:6691: \$? = $ac_status" >&5
f73dda09
JA
6692 (exit $ac_status); } &&
6693 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 6694 { (eval echo "$as_me:6694: \"$ac_try\"") >&5
f73dda09
JA
6695 (eval $ac_try) 2>&5
6696 ac_status=$?
d3a24ed2 6697 echo "$as_me:6697: \$? = $ac_status" >&5
f73dda09
JA
6698 (exit $ac_status); }; }; then
6699 ac_cv_have_decl_strsignal=yes
6700else
6701 echo "$as_me: failed program was:" >&5
6702cat conftest.$ac_ext >&5
6703ac_cv_have_decl_strsignal=no
6704fi
6705rm -f conftest.$ac_objext conftest.$ac_ext
6706fi
d3a24ed2 6707echo "$as_me:6707: result: $ac_cv_have_decl_strsignal" >&5
f73dda09
JA
6708echo "${ECHO_T}$ac_cv_have_decl_strsignal" >&6
6709if test $ac_cv_have_decl_strsignal = yes; then
6710
6711cat >>confdefs.h <<EOF
6712#define HAVE_DECL_STRSIGNAL 1
6713EOF
6714
6715else
6716 cat >>confdefs.h <<EOF
6717#define HAVE_DECL_STRSIGNAL 0
6718EOF
6719
6720fi
6721
d3a24ed2 6722echo "$as_me:6722: checking whether strtold is declared" >&5
7117c2d2
JA
6723echo $ECHO_N "checking whether strtold is declared... $ECHO_C" >&6
6724if test "${ac_cv_have_decl_strtold+set}" = set; then
6725 echo $ECHO_N "(cached) $ECHO_C" >&6
6726else
6727 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 6728#line 6728 "configure"
7117c2d2
JA
6729#include "confdefs.h"
6730$ac_includes_default
6731int
6732main ()
6733{
6734#ifndef strtold
6735 char *p = (char *) strtold;
6736#endif
6737
6738 ;
6739 return 0;
6740}
6741_ACEOF
6742rm -f conftest.$ac_objext
d3a24ed2 6743if { (eval echo "$as_me:6743: \"$ac_compile\"") >&5
7117c2d2
JA
6744 (eval $ac_compile) 2>&5
6745 ac_status=$?
d3a24ed2 6746 echo "$as_me:6746: \$? = $ac_status" >&5
7117c2d2
JA
6747 (exit $ac_status); } &&
6748 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 6749 { (eval echo "$as_me:6749: \"$ac_try\"") >&5
7117c2d2
JA
6750 (eval $ac_try) 2>&5
6751 ac_status=$?
d3a24ed2 6752 echo "$as_me:6752: \$? = $ac_status" >&5
7117c2d2
JA
6753 (exit $ac_status); }; }; then
6754 ac_cv_have_decl_strtold=yes
6755else
6756 echo "$as_me: failed program was:" >&5
6757cat conftest.$ac_ext >&5
6758ac_cv_have_decl_strtold=no
6759fi
6760rm -f conftest.$ac_objext conftest.$ac_ext
6761fi
d3a24ed2 6762echo "$as_me:6762: result: $ac_cv_have_decl_strtold" >&5
7117c2d2
JA
6763echo "${ECHO_T}$ac_cv_have_decl_strtold" >&6
6764if test $ac_cv_have_decl_strtold = yes; then
6765
6766cat >>confdefs.h <<EOF
6767#define HAVE_DECL_STRTOLD 1
6768EOF
6769
d3a24ed2
CR
6770 echo "$as_me:6770: checking for broken strtold" >&5
6771echo $ECHO_N "checking for broken strtold... $ECHO_C" >&6
6772 if test "${bash_cv_strtold_broken+set}" = set; then
6773 echo $ECHO_N "(cached) $ECHO_C" >&6
6774else
6775 cat >conftest.$ac_ext <<_ACEOF
6776#line 6776 "configure"
6777#include "confdefs.h"
6778#include <stdlib.h>
6779int
6780main ()
6781{
6782int main() { long double r; char *foo, bar; r = strtold(foo, &bar);}
6783 ;
6784 return 0;
6785}
6786_ACEOF
6787rm -f conftest.$ac_objext
6788if { (eval echo "$as_me:6788: \"$ac_compile\"") >&5
6789 (eval $ac_compile) 2>&5
6790 ac_status=$?
6791 echo "$as_me:6791: \$? = $ac_status" >&5
6792 (exit $ac_status); } &&
6793 { ac_try='test -s conftest.$ac_objext'
6794 { (eval echo "$as_me:6794: \"$ac_try\"") >&5
6795 (eval $ac_try) 2>&5
6796 ac_status=$?
6797 echo "$as_me:6797: \$? = $ac_status" >&5
6798 (exit $ac_status); }; }; then
6799 bash_cv_strtold_broken=no
6800else
6801 echo "$as_me: failed program was:" >&5
6802cat conftest.$ac_ext >&5
6803bash_cv_strtold_broken=yes
6804fi
6805rm -f conftest.$ac_objext conftest.$ac_ext
6806
6807fi
6808
6809 echo "$as_me:6809: result: $bash_cv_strtold_broken" >&5
6810echo "${ECHO_T}$bash_cv_strtold_broken" >&6
6811 if test "$bash_cv_strtold_broken" = "yes" ; then
6812 cat >>confdefs.h <<\EOF
6813#define STRTOLD_BROKEN 1
6814EOF
6815
6816 fi
6817
7117c2d2
JA
6818else
6819 cat >>confdefs.h <<EOF
6820#define HAVE_DECL_STRTOLD 0
6821EOF
6822
6823fi
6824
d3a24ed2 6825echo "$as_me:6825: checking for declaration of strtoimax" >&5
f73dda09
JA
6826echo $ECHO_N "checking for declaration of strtoimax... $ECHO_C" >&6
6827if test "${bash_cv_decl_strtoimax+set}" = set; then
6828 echo $ECHO_N "(cached) $ECHO_C" >&6
6829else
6830 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 6831#line 6831 "configure"
f73dda09
JA
6832#include "confdefs.h"
6833
6834#if STDC_HEADERS
6835# include <stdlib.h>
6836#endif
6837#if HAVE_INTTYPES_H
6838# include <inttypes.h>
6839#endif
6840
6841int
6842main ()
6843{
6844return !strtoimax;
6845 ;
6846 return 0;
6847}
6848_ACEOF
6849rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 6850if { (eval echo "$as_me:6850: \"$ac_link\"") >&5
f73dda09
JA
6851 (eval $ac_link) 2>&5
6852 ac_status=$?
d3a24ed2 6853 echo "$as_me:6853: \$? = $ac_status" >&5
f73dda09
JA
6854 (exit $ac_status); } &&
6855 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 6856 { (eval echo "$as_me:6856: \"$ac_try\"") >&5
f73dda09
JA
6857 (eval $ac_try) 2>&5
6858 ac_status=$?
d3a24ed2 6859 echo "$as_me:6859: \$? = $ac_status" >&5
f73dda09
JA
6860 (exit $ac_status); }; }; then
6861 bash_cv_decl_strtoimax=yes
6862else
6863 echo "$as_me: failed program was:" >&5
6864cat conftest.$ac_ext >&5
6865bash_cv_decl_strtoimax=no
6866fi
6867rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6868fi
d3a24ed2 6869echo "$as_me:6869: result: $bash_cv_decl_strtoimax" >&5
f73dda09
JA
6870echo "${ECHO_T}$bash_cv_decl_strtoimax" >&6
6871bash_tr_func=HAVE_DECL_`echo strtoimax | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6872if test $bash_cv_decl_strtoimax = yes; then
6873 cat >>confdefs.h <<EOF
6874#define $bash_tr_func 1
6875EOF
6876
6877else
6878 cat >>confdefs.h <<EOF
6879#define $bash_tr_func 0
6880EOF
6881
6882fi
6883
d3a24ed2 6884echo "$as_me:6884: checking for declaration of strtol" >&5
f73dda09
JA
6885echo $ECHO_N "checking for declaration of strtol... $ECHO_C" >&6
6886if test "${bash_cv_decl_strtol+set}" = set; then
6887 echo $ECHO_N "(cached) $ECHO_C" >&6
6888else
6889 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 6890#line 6890 "configure"
f73dda09
JA
6891#include "confdefs.h"
6892
6893#if STDC_HEADERS
6894# include <stdlib.h>
6895#endif
6896#if HAVE_INTTYPES_H
6897# include <inttypes.h>
6898#endif
6899
6900int
6901main ()
6902{
6903return !strtol;
6904 ;
6905 return 0;
6906}
6907_ACEOF
6908rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 6909if { (eval echo "$as_me:6909: \"$ac_link\"") >&5
f73dda09
JA
6910 (eval $ac_link) 2>&5
6911 ac_status=$?
d3a24ed2 6912 echo "$as_me:6912: \$? = $ac_status" >&5
f73dda09
JA
6913 (exit $ac_status); } &&
6914 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 6915 { (eval echo "$as_me:6915: \"$ac_try\"") >&5
f73dda09
JA
6916 (eval $ac_try) 2>&5
6917 ac_status=$?
d3a24ed2 6918 echo "$as_me:6918: \$? = $ac_status" >&5
f73dda09
JA
6919 (exit $ac_status); }; }; then
6920 bash_cv_decl_strtol=yes
6921else
6922 echo "$as_me: failed program was:" >&5
6923cat conftest.$ac_ext >&5
6924bash_cv_decl_strtol=no
6925fi
6926rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6927fi
d3a24ed2 6928echo "$as_me:6928: result: $bash_cv_decl_strtol" >&5
f73dda09
JA
6929echo "${ECHO_T}$bash_cv_decl_strtol" >&6
6930bash_tr_func=HAVE_DECL_`echo strtol | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6931if test $bash_cv_decl_strtol = yes; then
6932 cat >>confdefs.h <<EOF
6933#define $bash_tr_func 1
6934EOF
6935
6936else
6937 cat >>confdefs.h <<EOF
6938#define $bash_tr_func 0
6939EOF
6940
6941fi
6942
d3a24ed2 6943echo "$as_me:6943: checking for declaration of strtoll" >&5
f73dda09
JA
6944echo $ECHO_N "checking for declaration of strtoll... $ECHO_C" >&6
6945if test "${bash_cv_decl_strtoll+set}" = set; then
6946 echo $ECHO_N "(cached) $ECHO_C" >&6
6947else
6948 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 6949#line 6949 "configure"
f73dda09
JA
6950#include "confdefs.h"
6951
6952#if STDC_HEADERS
6953# include <stdlib.h>
6954#endif
6955#if HAVE_INTTYPES_H
6956# include <inttypes.h>
6957#endif
6958
6959int
6960main ()
6961{
6962return !strtoll;
6963 ;
6964 return 0;
6965}
6966_ACEOF
6967rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 6968if { (eval echo "$as_me:6968: \"$ac_link\"") >&5
f73dda09
JA
6969 (eval $ac_link) 2>&5
6970 ac_status=$?
d3a24ed2 6971 echo "$as_me:6971: \$? = $ac_status" >&5
f73dda09
JA
6972 (exit $ac_status); } &&
6973 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 6974 { (eval echo "$as_me:6974: \"$ac_try\"") >&5
f73dda09
JA
6975 (eval $ac_try) 2>&5
6976 ac_status=$?
d3a24ed2 6977 echo "$as_me:6977: \$? = $ac_status" >&5
f73dda09
JA
6978 (exit $ac_status); }; }; then
6979 bash_cv_decl_strtoll=yes
6980else
6981 echo "$as_me: failed program was:" >&5
6982cat conftest.$ac_ext >&5
6983bash_cv_decl_strtoll=no
6984fi
6985rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6986fi
d3a24ed2 6987echo "$as_me:6987: result: $bash_cv_decl_strtoll" >&5
f73dda09
JA
6988echo "${ECHO_T}$bash_cv_decl_strtoll" >&6
6989bash_tr_func=HAVE_DECL_`echo strtoll | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6990if test $bash_cv_decl_strtoll = yes; then
6991 cat >>confdefs.h <<EOF
6992#define $bash_tr_func 1
6993EOF
6994
6995else
6996 cat >>confdefs.h <<EOF
6997#define $bash_tr_func 0
6998EOF
6999
7000fi
7001
d3a24ed2 7002echo "$as_me:7002: checking for declaration of strtoul" >&5
f73dda09
JA
7003echo $ECHO_N "checking for declaration of strtoul... $ECHO_C" >&6
7004if test "${bash_cv_decl_strtoul+set}" = set; then
7005 echo $ECHO_N "(cached) $ECHO_C" >&6
7006else
7007 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 7008#line 7008 "configure"
f73dda09
JA
7009#include "confdefs.h"
7010
7011#if STDC_HEADERS
7012# include <stdlib.h>
7013#endif
7014#if HAVE_INTTYPES_H
7015# include <inttypes.h>
7016#endif
7017
7018int
7019main ()
7020{
7021return !strtoul;
7022 ;
7023 return 0;
7024}
7025_ACEOF
7026rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 7027if { (eval echo "$as_me:7027: \"$ac_link\"") >&5
f73dda09
JA
7028 (eval $ac_link) 2>&5
7029 ac_status=$?
d3a24ed2 7030 echo "$as_me:7030: \$? = $ac_status" >&5
f73dda09
JA
7031 (exit $ac_status); } &&
7032 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 7033 { (eval echo "$as_me:7033: \"$ac_try\"") >&5
f73dda09
JA
7034 (eval $ac_try) 2>&5
7035 ac_status=$?
d3a24ed2 7036 echo "$as_me:7036: \$? = $ac_status" >&5
f73dda09
JA
7037 (exit $ac_status); }; }; then
7038 bash_cv_decl_strtoul=yes
7039else
7040 echo "$as_me: failed program was:" >&5
7041cat conftest.$ac_ext >&5
7042bash_cv_decl_strtoul=no
7043fi
7044rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7045fi
d3a24ed2 7046echo "$as_me:7046: result: $bash_cv_decl_strtoul" >&5
f73dda09
JA
7047echo "${ECHO_T}$bash_cv_decl_strtoul" >&6
7048bash_tr_func=HAVE_DECL_`echo strtoul | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7049if test $bash_cv_decl_strtoul = yes; then
7050 cat >>confdefs.h <<EOF
7051#define $bash_tr_func 1
7052EOF
7053
7054else
7055 cat >>confdefs.h <<EOF
7056#define $bash_tr_func 0
7057EOF
7058
7059fi
7060
d3a24ed2 7061echo "$as_me:7061: checking for declaration of strtoull" >&5
f73dda09
JA
7062echo $ECHO_N "checking for declaration of strtoull... $ECHO_C" >&6
7063if test "${bash_cv_decl_strtoull+set}" = set; then
7064 echo $ECHO_N "(cached) $ECHO_C" >&6
7065else
7066 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 7067#line 7067 "configure"
f73dda09
JA
7068#include "confdefs.h"
7069
7070#if STDC_HEADERS
7071# include <stdlib.h>
7072#endif
7073#if HAVE_INTTYPES_H
7074# include <inttypes.h>
7075#endif
7076
7077int
7078main ()
7079{
7080return !strtoull;
7081 ;
7082 return 0;
7083}
7084_ACEOF
7085rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 7086if { (eval echo "$as_me:7086: \"$ac_link\"") >&5
f73dda09
JA
7087 (eval $ac_link) 2>&5
7088 ac_status=$?
d3a24ed2 7089 echo "$as_me:7089: \$? = $ac_status" >&5
f73dda09
JA
7090 (exit $ac_status); } &&
7091 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 7092 { (eval echo "$as_me:7092: \"$ac_try\"") >&5
f73dda09
JA
7093 (eval $ac_try) 2>&5
7094 ac_status=$?
d3a24ed2 7095 echo "$as_me:7095: \$? = $ac_status" >&5
f73dda09
JA
7096 (exit $ac_status); }; }; then
7097 bash_cv_decl_strtoull=yes
7098else
7099 echo "$as_me: failed program was:" >&5
7100cat conftest.$ac_ext >&5
7101bash_cv_decl_strtoull=no
7102fi
7103rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7104fi
d3a24ed2 7105echo "$as_me:7105: result: $bash_cv_decl_strtoull" >&5
f73dda09
JA
7106echo "${ECHO_T}$bash_cv_decl_strtoull" >&6
7107bash_tr_func=HAVE_DECL_`echo strtoull | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7108if test $bash_cv_decl_strtoull = yes; then
7109 cat >>confdefs.h <<EOF
7110#define $bash_tr_func 1
7111EOF
7112
7113else
7114 cat >>confdefs.h <<EOF
7115#define $bash_tr_func 0
7116EOF
7117
7118fi
7119
d3a24ed2 7120echo "$as_me:7120: checking for declaration of strtoumax" >&5
f73dda09
JA
7121echo $ECHO_N "checking for declaration of strtoumax... $ECHO_C" >&6
7122if test "${bash_cv_decl_strtoumax+set}" = set; then
7123 echo $ECHO_N "(cached) $ECHO_C" >&6
7124else
7125 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 7126#line 7126 "configure"
f73dda09
JA
7127#include "confdefs.h"
7128
7129#if STDC_HEADERS
7130# include <stdlib.h>
7131#endif
7132#if HAVE_INTTYPES_H
7133# include <inttypes.h>
7134#endif
7135
7136int
7137main ()
7138{
7139return !strtoumax;
7140 ;
7141 return 0;
7142}
7143_ACEOF
7144rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 7145if { (eval echo "$as_me:7145: \"$ac_link\"") >&5
f73dda09
JA
7146 (eval $ac_link) 2>&5
7147 ac_status=$?
d3a24ed2 7148 echo "$as_me:7148: \$? = $ac_status" >&5
f73dda09
JA
7149 (exit $ac_status); } &&
7150 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 7151 { (eval echo "$as_me:7151: \"$ac_try\"") >&5
f73dda09
JA
7152 (eval $ac_try) 2>&5
7153 ac_status=$?
d3a24ed2 7154 echo "$as_me:7154: \$? = $ac_status" >&5
f73dda09
JA
7155 (exit $ac_status); }; }; then
7156 bash_cv_decl_strtoumax=yes
7157else
7158 echo "$as_me: failed program was:" >&5
7159cat conftest.$ac_ext >&5
7160bash_cv_decl_strtoumax=no
7161fi
7162rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7163fi
d3a24ed2 7164echo "$as_me:7164: result: $bash_cv_decl_strtoumax" >&5
f73dda09
JA
7165echo "${ECHO_T}$bash_cv_decl_strtoumax" >&6
7166bash_tr_func=HAVE_DECL_`echo strtoumax | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7167if test $bash_cv_decl_strtoumax = yes; then
7168 cat >>confdefs.h <<EOF
7169#define $bash_tr_func 1
7170EOF
7171
7172else
7173 cat >>confdefs.h <<EOF
7174#define $bash_tr_func 0
7175EOF
7176
7177fi
7178
7117c2d2 7179for ac_header in sys/time.h unistd.h
f73dda09
JA
7180do
7181as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d3a24ed2 7182echo "$as_me:7182: checking for $ac_header" >&5
f73dda09
JA
7183echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7184if eval "test \"\${$as_ac_Header+set}\" = set"; then
7185 echo $ECHO_N "(cached) $ECHO_C" >&6
7186else
7187 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 7188#line 7188 "configure"
f73dda09
JA
7189#include "confdefs.h"
7190#include <$ac_header>
7191_ACEOF
d3a24ed2 7192if { (eval echo "$as_me:7192: \"$ac_cpp conftest.$ac_ext\"") >&5
f73dda09
JA
7193 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7194 ac_status=$?
7195 egrep -v '^ *\+' conftest.er1 >conftest.err
7196 rm -f conftest.er1
7197 cat conftest.err >&5
d3a24ed2 7198 echo "$as_me:7198: \$? = $ac_status" >&5
f73dda09
JA
7199 (exit $ac_status); } >/dev/null; then
7200 if test -s conftest.err; then
7201 ac_cpp_err=$ac_c_preproc_warn_flag
7202 else
7203 ac_cpp_err=
7204 fi
7205else
7206 ac_cpp_err=yes
7207fi
7208if test -z "$ac_cpp_err"; then
7209 eval "$as_ac_Header=yes"
7210else
7211 echo "$as_me: failed program was:" >&5
7212 cat conftest.$ac_ext >&5
7213 eval "$as_ac_Header=no"
7214fi
7215rm -f conftest.err conftest.$ac_ext
7216fi
d3a24ed2 7217echo "$as_me:7217: result: `eval echo '${'$as_ac_Header'}'`" >&5
f73dda09
JA
7218echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7219if test `eval echo '${'$as_ac_Header'}'` = yes; then
7220 cat >>confdefs.h <<EOF
7221#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7222EOF
7223
7224fi
7225done
7226
7117c2d2 7227for ac_func in alarm
f73dda09
JA
7228do
7229as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d3a24ed2 7230echo "$as_me:7230: checking for $ac_func" >&5
f73dda09
JA
7231echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7232if eval "test \"\${$as_ac_var+set}\" = set"; then
7233 echo $ECHO_N "(cached) $ECHO_C" >&6
7234else
7235 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 7236#line 7236 "configure"
f73dda09
JA
7237#include "confdefs.h"
7238/* System header to define __stub macros and hopefully few prototypes,
7239 which can conflict with char $ac_func (); below. */
7240#include <assert.h>
7241/* Override any gcc2 internal prototype to avoid an error. */
7242#ifdef __cplusplus
7243extern "C"
7244#endif
7245/* We use char because int might match the return type of a gcc2
7246 builtin and then its argument prototype would still apply. */
7247char $ac_func ();
7248char (*f) ();
7249
7250int
7251main ()
7252{
7253/* The GNU C library defines this for functions which it implements
7254 to always fail with ENOSYS. Some functions are actually named
7255 something starting with __ and the normal name is an alias. */
7256#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7257choke me
7258#else
7259f = $ac_func;
7260#endif
7261
7262 ;
7263 return 0;
7264}
7265_ACEOF
7266rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 7267if { (eval echo "$as_me:7267: \"$ac_link\"") >&5
f73dda09
JA
7268 (eval $ac_link) 2>&5
7269 ac_status=$?
d3a24ed2 7270 echo "$as_me:7270: \$? = $ac_status" >&5
f73dda09
JA
7271 (exit $ac_status); } &&
7272 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 7273 { (eval echo "$as_me:7273: \"$ac_try\"") >&5
f73dda09
JA
7274 (eval $ac_try) 2>&5
7275 ac_status=$?
d3a24ed2 7276 echo "$as_me:7276: \$? = $ac_status" >&5
f73dda09
JA
7277 (exit $ac_status); }; }; then
7278 eval "$as_ac_var=yes"
7279else
7280 echo "$as_me: failed program was:" >&5
7281cat conftest.$ac_ext >&5
7282eval "$as_ac_var=no"
7283fi
7284rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7285fi
d3a24ed2 7286echo "$as_me:7286: result: `eval echo '${'$as_ac_var'}'`" >&5
f73dda09
JA
7287echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7288if test `eval echo '${'$as_ac_var'}'` = yes; then
7289 cat >>confdefs.h <<EOF
7290#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7291EOF
7292
7293fi
7294done
7295
d3a24ed2 7296echo "$as_me:7296: checking for working mktime" >&5
7117c2d2
JA
7297echo $ECHO_N "checking for working mktime... $ECHO_C" >&6
7298if test "${ac_cv_func_working_mktime+set}" = set; then
f73dda09
JA
7299 echo $ECHO_N "(cached) $ECHO_C" >&6
7300else
7117c2d2
JA
7301 if test "$cross_compiling" = yes; then
7302 ac_cv_func_working_mktime=no
7303else
7304 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 7305#line 7305 "configure"
f73dda09 7306#include "confdefs.h"
7117c2d2
JA
7307/* Test program from Paul Eggert and Tony Leneis. */
7308#if TIME_WITH_SYS_TIME
7309# include <sys/time.h>
7310# include <time.h>
7311#else
7312# if HAVE_SYS_TIME_H
7313# include <sys/time.h>
7314# else
7315# include <time.h>
7316# endif
7317#endif
f73dda09 7318
7117c2d2
JA
7319#if HAVE_UNISTD_H
7320# include <unistd.h>
f73dda09 7321#endif
7117c2d2
JA
7322
7323#if !HAVE_ALARM
7324# define alarm(X) /* empty */
7325#endif
7326
7327/* Work around redefinition to rpl_putenv by other config tests. */
7328#undef putenv
7329
7330static time_t time_t_max;
7331
7332/* Values we'll use to set the TZ environment variable. */
7333static const char *const tz_strings[] = {
7334 (const char *) 0, "TZ=GMT0", "TZ=JST-9",
7335 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
7336};
7337#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
7338
7339/* Fail if mktime fails to convert a date in the spring-forward gap.
7340 Based on a problem report from Andreas Jaeger. */
7341static void
7342spring_forward_gap ()
7343{
7344 /* glibc (up to about 1998-10-07) failed this test. */
7345 struct tm tm;
7346
7347 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
7348 instead of "TZ=America/Vancouver" in order to detect the bug even
7349 on systems that don't support the Olson extension, or don't have the
7350 full zoneinfo tables installed. */
7351 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
7352
7353 tm.tm_year = 98;
7354 tm.tm_mon = 3;
7355 tm.tm_mday = 5;
7356 tm.tm_hour = 2;
7357 tm.tm_min = 0;
7358 tm.tm_sec = 0;
7359 tm.tm_isdst = -1;
7360 if (mktime (&tm) == (time_t)-1)
7361 exit (1);
7362}
7363
7364static void
7365mktime_test (now)
7366 time_t now;
7367{
7368 struct tm *lt;
7369 if ((lt = localtime (&now)) && mktime (lt) != now)
7370 exit (1);
7371 now = time_t_max - now;
7372 if ((lt = localtime (&now)) && mktime (lt) != now)
7373 exit (1);
7374}
7375
7376static void
7377irix_6_4_bug ()
7378{
7379 /* Based on code from Ariel Faigon. */
7380 struct tm tm;
7381 tm.tm_year = 96;
7382 tm.tm_mon = 3;
7383 tm.tm_mday = 0;
7384 tm.tm_hour = 0;
7385 tm.tm_min = 0;
7386 tm.tm_sec = 0;
7387 tm.tm_isdst = -1;
7388 mktime (&tm);
7389 if (tm.tm_mon != 2 || tm.tm_mday != 31)
7390 exit (1);
7391}
7392
7393static void
7394bigtime_test (j)
7395 int j;
7396{
7397 struct tm tm;
7398 time_t now;
7399 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
7400 now = mktime (&tm);
7401 if (now != (time_t) -1)
7402 {
7403 struct tm *lt = localtime (&now);
7404 if (! (lt
7405 && lt->tm_year == tm.tm_year
7406 && lt->tm_mon == tm.tm_mon
7407 && lt->tm_mday == tm.tm_mday
7408 && lt->tm_hour == tm.tm_hour
7409 && lt->tm_min == tm.tm_min
7410 && lt->tm_sec == tm.tm_sec
7411 && lt->tm_yday == tm.tm_yday
7412 && lt->tm_wday == tm.tm_wday
7413 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
7414 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
7415 exit (1);
7416 }
7417}
7418
f73dda09
JA
7419int
7420main ()
7421{
7117c2d2
JA
7422 time_t t, delta;
7423 int i, j;
7424
7425 /* This test makes some buggy mktime implementations loop.
7426 Give up after 60 seconds; a mktime slower than that
7427 isn't worth using anyway. */
7428 alarm (60);
7429
7430 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
7431 continue;
7432 time_t_max--;
7433 delta = time_t_max / 997; /* a suitable prime number */
7434 for (i = 0; i < N_STRINGS; i++)
7435 {
7436 if (tz_strings[i])
7437 putenv (tz_strings[i]);
7438
7439 for (t = 0; t <= time_t_max - delta; t += delta)
7440 mktime_test (t);
7441 mktime_test ((time_t) 60 * 60);
7442 mktime_test ((time_t) 60 * 60 * 24);
7443
7444 for (j = 1; 0 < j; j *= 2)
7445 bigtime_test (j);
7446 bigtime_test (j - 1);
7447 }
7448 irix_6_4_bug ();
7449 spring_forward_gap ();
7450 exit (0);
f73dda09
JA
7451}
7452_ACEOF
7117c2d2 7453rm -f conftest$ac_exeext
d3a24ed2 7454if { (eval echo "$as_me:7454: \"$ac_link\"") >&5
f73dda09
JA
7455 (eval $ac_link) 2>&5
7456 ac_status=$?
d3a24ed2 7457 echo "$as_me:7457: \$? = $ac_status" >&5
7117c2d2 7458 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3a24ed2 7459 { (eval echo "$as_me:7459: \"$ac_try\"") >&5
f73dda09
JA
7460 (eval $ac_try) 2>&5
7461 ac_status=$?
d3a24ed2 7462 echo "$as_me:7462: \$? = $ac_status" >&5
f73dda09 7463 (exit $ac_status); }; }; then
7117c2d2
JA
7464 ac_cv_func_working_mktime=yes
7465else
7466 echo "$as_me: program exited with status $ac_status" >&5
7467echo "$as_me: failed program was:" >&5
7468cat conftest.$ac_ext >&5
7469ac_cv_func_working_mktime=no
7470fi
7471rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7472fi
7473fi
d3a24ed2 7474echo "$as_me:7474: result: $ac_cv_func_working_mktime" >&5
7117c2d2
JA
7475echo "${ECHO_T}$ac_cv_func_working_mktime" >&6
7476if test $ac_cv_func_working_mktime = no; then
7477 LIBOBJS="$LIBOBJS mktime.$ac_objext"
7478fi
7479
7480for ac_header in libintl.h
7481do
7482as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d3a24ed2 7483echo "$as_me:7483: checking for $ac_header" >&5
7117c2d2
JA
7484echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7485if eval "test \"\${$as_ac_Header+set}\" = set"; then
7486 echo $ECHO_N "(cached) $ECHO_C" >&6
7487else
7488 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 7489#line 7489 "configure"
7117c2d2
JA
7490#include "confdefs.h"
7491#include <$ac_header>
7492_ACEOF
d3a24ed2 7493if { (eval echo "$as_me:7493: \"$ac_cpp conftest.$ac_ext\"") >&5
7117c2d2
JA
7494 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7495 ac_status=$?
7496 egrep -v '^ *\+' conftest.er1 >conftest.err
7497 rm -f conftest.er1
7498 cat conftest.err >&5
d3a24ed2 7499 echo "$as_me:7499: \$? = $ac_status" >&5
7117c2d2
JA
7500 (exit $ac_status); } >/dev/null; then
7501 if test -s conftest.err; then
7502 ac_cpp_err=$ac_c_preproc_warn_flag
7503 else
7504 ac_cpp_err=
7505 fi
7506else
7507 ac_cpp_err=yes
7508fi
7509if test -z "$ac_cpp_err"; then
7510 eval "$as_ac_Header=yes"
7511else
7512 echo "$as_me: failed program was:" >&5
7513 cat conftest.$ac_ext >&5
7514 eval "$as_ac_Header=no"
7515fi
7516rm -f conftest.err conftest.$ac_ext
7517fi
d3a24ed2 7518echo "$as_me:7518: result: `eval echo '${'$as_ac_Header'}'`" >&5
7117c2d2
JA
7519echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7520if test `eval echo '${'$as_ac_Header'}'` = yes; then
7521 cat >>confdefs.h <<EOF
7522#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7523EOF
7524
7525fi
7526done
7527
7528for ac_func in gettext textdomain bindtextdomain
7529do
7530as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d3a24ed2 7531echo "$as_me:7531: checking for $ac_func" >&5
7117c2d2
JA
7532echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7533if eval "test \"\${$as_ac_var+set}\" = set"; then
7534 echo $ECHO_N "(cached) $ECHO_C" >&6
7535else
7536 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 7537#line 7537 "configure"
7117c2d2
JA
7538#include "confdefs.h"
7539/* System header to define __stub macros and hopefully few prototypes,
7540 which can conflict with char $ac_func (); below. */
7541#include <assert.h>
7542/* Override any gcc2 internal prototype to avoid an error. */
7543#ifdef __cplusplus
7544extern "C"
7545#endif
7546/* We use char because int might match the return type of a gcc2
7547 builtin and then its argument prototype would still apply. */
7548char $ac_func ();
7549char (*f) ();
7550
7551int
7552main ()
7553{
7554/* The GNU C library defines this for functions which it implements
7555 to always fail with ENOSYS. Some functions are actually named
7556 something starting with __ and the normal name is an alias. */
7557#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7558choke me
7559#else
7560f = $ac_func;
7561#endif
7562
7563 ;
7564 return 0;
7565}
7566_ACEOF
7567rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 7568if { (eval echo "$as_me:7568: \"$ac_link\"") >&5
7117c2d2
JA
7569 (eval $ac_link) 2>&5
7570 ac_status=$?
d3a24ed2 7571 echo "$as_me:7571: \$? = $ac_status" >&5
7117c2d2
JA
7572 (exit $ac_status); } &&
7573 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 7574 { (eval echo "$as_me:7574: \"$ac_try\"") >&5
7117c2d2
JA
7575 (eval $ac_try) 2>&5
7576 ac_status=$?
d3a24ed2 7577 echo "$as_me:7577: \$? = $ac_status" >&5
7117c2d2
JA
7578 (exit $ac_status); }; }; then
7579 eval "$as_ac_var=yes"
7580else
7581 echo "$as_me: failed program was:" >&5
7582cat conftest.$ac_ext >&5
7583eval "$as_ac_var=no"
7584fi
7585rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7586fi
d3a24ed2 7587echo "$as_me:7587: result: `eval echo '${'$as_ac_var'}'`" >&5
7117c2d2
JA
7588echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7589if test `eval echo '${'$as_ac_var'}'` = yes; then
7590 cat >>confdefs.h <<EOF
7591#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7592EOF
7593
7594fi
7595done
7596
7597if test "$ac_cv_func_bindtextdomain" = "no"; then
7598
d3a24ed2 7599echo "$as_me:7599: checking for bindtextdomain in -lintl" >&5
7117c2d2
JA
7600echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6
7601if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
7602 echo $ECHO_N "(cached) $ECHO_C" >&6
7603else
7604 ac_check_lib_save_LIBS=$LIBS
7605LIBS="-lintl $LIBS"
7606cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 7607#line 7607 "configure"
7117c2d2
JA
7608#include "confdefs.h"
7609
7610/* Override any gcc2 internal prototype to avoid an error. */
7611#ifdef __cplusplus
7612extern "C"
7613#endif
7614/* We use char because int might match the return type of a gcc2
7615 builtin and then its argument prototype would still apply. */
7616char bindtextdomain ();
7617int
7618main ()
7619{
7620bindtextdomain ();
7621 ;
7622 return 0;
7623}
7624_ACEOF
7625rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 7626if { (eval echo "$as_me:7626: \"$ac_link\"") >&5
7117c2d2
JA
7627 (eval $ac_link) 2>&5
7628 ac_status=$?
d3a24ed2 7629 echo "$as_me:7629: \$? = $ac_status" >&5
7117c2d2
JA
7630 (exit $ac_status); } &&
7631 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 7632 { (eval echo "$as_me:7632: \"$ac_try\"") >&5
7117c2d2
JA
7633 (eval $ac_try) 2>&5
7634 ac_status=$?
d3a24ed2 7635 echo "$as_me:7635: \$? = $ac_status" >&5
7117c2d2
JA
7636 (exit $ac_status); }; }; then
7637 ac_cv_lib_intl_bindtextdomain=yes
f73dda09
JA
7638else
7639 echo "$as_me: failed program was:" >&5
7640cat conftest.$ac_ext >&5
7641ac_cv_lib_intl_bindtextdomain=no
7642fi
7643rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7644LIBS=$ac_check_lib_save_LIBS
7645fi
d3a24ed2 7646echo "$as_me:7646: result: $ac_cv_lib_intl_bindtextdomain" >&5
f73dda09
JA
7647echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6
7648if test $ac_cv_lib_intl_bindtextdomain = yes; then
7649 cat >>confdefs.h <<EOF
7650#define HAVE_LIBINTL 1
7651EOF
7652
7653 LIBS="-lintl $LIBS"
7654
7655fi
7656
7657 if test "$ac_cv_lib_intl" = "yes"; then
7658
7659for ac_func in gettext textdomain bindtextdomain
7660do
7661as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d3a24ed2 7662echo "$as_me:7662: checking for $ac_func" >&5
f73dda09
JA
7663echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7664if eval "test \"\${$as_ac_var+set}\" = set"; then
7665 echo $ECHO_N "(cached) $ECHO_C" >&6
7666else
7667 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 7668#line 7668 "configure"
f73dda09
JA
7669#include "confdefs.h"
7670/* System header to define __stub macros and hopefully few prototypes,
7671 which can conflict with char $ac_func (); below. */
7672#include <assert.h>
7673/* Override any gcc2 internal prototype to avoid an error. */
7674#ifdef __cplusplus
7675extern "C"
7676#endif
7677/* We use char because int might match the return type of a gcc2
7678 builtin and then its argument prototype would still apply. */
7679char $ac_func ();
7680char (*f) ();
7681
7682int
7683main ()
7684{
7685/* The GNU C library defines this for functions which it implements
7686 to always fail with ENOSYS. Some functions are actually named
7687 something starting with __ and the normal name is an alias. */
7688#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7689choke me
7690#else
7691f = $ac_func;
7692#endif
7693
7694 ;
7695 return 0;
7696}
7697_ACEOF
7698rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 7699if { (eval echo "$as_me:7699: \"$ac_link\"") >&5
f73dda09
JA
7700 (eval $ac_link) 2>&5
7701 ac_status=$?
d3a24ed2 7702 echo "$as_me:7702: \$? = $ac_status" >&5
f73dda09
JA
7703 (exit $ac_status); } &&
7704 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 7705 { (eval echo "$as_me:7705: \"$ac_try\"") >&5
f73dda09
JA
7706 (eval $ac_try) 2>&5
7707 ac_status=$?
d3a24ed2 7708 echo "$as_me:7708: \$? = $ac_status" >&5
f73dda09
JA
7709 (exit $ac_status); }; }; then
7710 eval "$as_ac_var=yes"
7711else
7712 echo "$as_me: failed program was:" >&5
7713cat conftest.$ac_ext >&5
7714eval "$as_ac_var=no"
7715fi
7716rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7717fi
d3a24ed2 7718echo "$as_me:7718: result: `eval echo '${'$as_ac_var'}'`" >&5
f73dda09
JA
7719echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7720if test `eval echo '${'$as_ac_var'}'` = yes; then
7721 cat >>confdefs.h <<EOF
7722#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
ccc6cda3 7723EOF
f73dda09 7724
ccc6cda3 7725fi
f73dda09
JA
7726done
7727
7728 fi
ccc6cda3 7729fi
f73dda09 7730
7117c2d2
JA
7731for ac_header in wctype.h
7732do
7733as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d3a24ed2 7734echo "$as_me:7734: checking for $ac_header" >&5
7117c2d2
JA
7735echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7736if eval "test \"\${$as_ac_Header+set}\" = set"; then
7737 echo $ECHO_N "(cached) $ECHO_C" >&6
7738else
7739 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 7740#line 7740 "configure"
7117c2d2
JA
7741#include "confdefs.h"
7742#include <$ac_header>
7743_ACEOF
d3a24ed2 7744if { (eval echo "$as_me:7744: \"$ac_cpp conftest.$ac_ext\"") >&5
7117c2d2
JA
7745 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7746 ac_status=$?
7747 egrep -v '^ *\+' conftest.er1 >conftest.err
7748 rm -f conftest.er1
7749 cat conftest.err >&5
d3a24ed2 7750 echo "$as_me:7750: \$? = $ac_status" >&5
7117c2d2
JA
7751 (exit $ac_status); } >/dev/null; then
7752 if test -s conftest.err; then
7753 ac_cpp_err=$ac_c_preproc_warn_flag
7754 else
7755 ac_cpp_err=
7756 fi
7757else
7758 ac_cpp_err=yes
7759fi
7760if test -z "$ac_cpp_err"; then
7761 eval "$as_ac_Header=yes"
7762else
7763 echo "$as_me: failed program was:" >&5
7764 cat conftest.$ac_ext >&5
7765 eval "$as_ac_Header=no"
7766fi
7767rm -f conftest.err conftest.$ac_ext
7768fi
d3a24ed2 7769echo "$as_me:7769: result: `eval echo '${'$as_ac_Header'}'`" >&5
7117c2d2
JA
7770echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7771if test `eval echo '${'$as_ac_Header'}'` = yes; then
7772 cat >>confdefs.h <<EOF
7773#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7774EOF
7775
7776fi
7777done
7778
7779for ac_header in wchar.h
7780do
7781as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d3a24ed2 7782echo "$as_me:7782: checking for $ac_header" >&5
7117c2d2
JA
7783echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7784if eval "test \"\${$as_ac_Header+set}\" = set"; then
7785 echo $ECHO_N "(cached) $ECHO_C" >&6
7786else
7787 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 7788#line 7788 "configure"
7117c2d2
JA
7789#include "confdefs.h"
7790#include <$ac_header>
7791_ACEOF
d3a24ed2 7792if { (eval echo "$as_me:7792: \"$ac_cpp conftest.$ac_ext\"") >&5
7117c2d2
JA
7793 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7794 ac_status=$?
7795 egrep -v '^ *\+' conftest.er1 >conftest.err
7796 rm -f conftest.er1
7797 cat conftest.err >&5
d3a24ed2 7798 echo "$as_me:7798: \$? = $ac_status" >&5
7117c2d2
JA
7799 (exit $ac_status); } >/dev/null; then
7800 if test -s conftest.err; then
7801 ac_cpp_err=$ac_c_preproc_warn_flag
7802 else
7803 ac_cpp_err=
7804 fi
7805else
7806 ac_cpp_err=yes
7807fi
7808if test -z "$ac_cpp_err"; then
7809 eval "$as_ac_Header=yes"
7810else
7811 echo "$as_me: failed program was:" >&5
7812 cat conftest.$ac_ext >&5
7813 eval "$as_ac_Header=no"
7814fi
7815rm -f conftest.err conftest.$ac_ext
7816fi
d3a24ed2 7817echo "$as_me:7817: result: `eval echo '${'$as_ac_Header'}'`" >&5
7117c2d2
JA
7818echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7819if test `eval echo '${'$as_ac_Header'}'` = yes; then
7820 cat >>confdefs.h <<EOF
7821#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7822EOF
7823
7824fi
7825done
7826
7827for ac_header in langinfo.h
7828do
7829as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d3a24ed2 7830echo "$as_me:7830: checking for $ac_header" >&5
7117c2d2
JA
7831echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7832if eval "test \"\${$as_ac_Header+set}\" = set"; then
7833 echo $ECHO_N "(cached) $ECHO_C" >&6
7834else
7835 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 7836#line 7836 "configure"
7117c2d2
JA
7837#include "confdefs.h"
7838#include <$ac_header>
7839_ACEOF
d3a24ed2 7840if { (eval echo "$as_me:7840: \"$ac_cpp conftest.$ac_ext\"") >&5
7117c2d2
JA
7841 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7842 ac_status=$?
7843 egrep -v '^ *\+' conftest.er1 >conftest.err
7844 rm -f conftest.er1
7845 cat conftest.err >&5
d3a24ed2 7846 echo "$as_me:7846: \$? = $ac_status" >&5
7117c2d2
JA
7847 (exit $ac_status); } >/dev/null; then
7848 if test -s conftest.err; then
7849 ac_cpp_err=$ac_c_preproc_warn_flag
7850 else
7851 ac_cpp_err=
7852 fi
7853else
7854 ac_cpp_err=yes
7855fi
7856if test -z "$ac_cpp_err"; then
7857 eval "$as_ac_Header=yes"
7858else
7859 echo "$as_me: failed program was:" >&5
7860 cat conftest.$ac_ext >&5
7861 eval "$as_ac_Header=no"
7862fi
7863rm -f conftest.err conftest.$ac_ext
7864fi
d3a24ed2 7865echo "$as_me:7865: result: `eval echo '${'$as_ac_Header'}'`" >&5
7117c2d2
JA
7866echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7867if test `eval echo '${'$as_ac_Header'}'` = yes; then
7868 cat >>confdefs.h <<EOF
7869#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7870EOF
7871
7872fi
7873done
7874
d3a24ed2 7875echo "$as_me:7875: checking for mbsrtowcs" >&5
7117c2d2
JA
7876echo $ECHO_N "checking for mbsrtowcs... $ECHO_C" >&6
7877if test "${ac_cv_func_mbsrtowcs+set}" = set; then
7878 echo $ECHO_N "(cached) $ECHO_C" >&6
7879else
7880 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 7881#line 7881 "configure"
7117c2d2
JA
7882#include "confdefs.h"
7883/* System header to define __stub macros and hopefully few prototypes,
7884 which can conflict with char mbsrtowcs (); below. */
7885#include <assert.h>
7886/* Override any gcc2 internal prototype to avoid an error. */
7887#ifdef __cplusplus
7888extern "C"
7889#endif
7890/* We use char because int might match the return type of a gcc2
7891 builtin and then its argument prototype would still apply. */
7892char mbsrtowcs ();
7893char (*f) ();
7894
7895int
7896main ()
7897{
7898/* The GNU C library defines this for functions which it implements
7899 to always fail with ENOSYS. Some functions are actually named
7900 something starting with __ and the normal name is an alias. */
7901#if defined (__stub_mbsrtowcs) || defined (__stub___mbsrtowcs)
7902choke me
7903#else
7904f = mbsrtowcs;
7905#endif
7906
7907 ;
7908 return 0;
7909}
7910_ACEOF
7911rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 7912if { (eval echo "$as_me:7912: \"$ac_link\"") >&5
7117c2d2
JA
7913 (eval $ac_link) 2>&5
7914 ac_status=$?
d3a24ed2 7915 echo "$as_me:7915: \$? = $ac_status" >&5
7117c2d2
JA
7916 (exit $ac_status); } &&
7917 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 7918 { (eval echo "$as_me:7918: \"$ac_try\"") >&5
7117c2d2
JA
7919 (eval $ac_try) 2>&5
7920 ac_status=$?
d3a24ed2 7921 echo "$as_me:7921: \$? = $ac_status" >&5
7117c2d2
JA
7922 (exit $ac_status); }; }; then
7923 ac_cv_func_mbsrtowcs=yes
7924else
7925 echo "$as_me: failed program was:" >&5
7926cat conftest.$ac_ext >&5
7927ac_cv_func_mbsrtowcs=no
7928fi
7929rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7930fi
d3a24ed2 7931echo "$as_me:7931: result: $ac_cv_func_mbsrtowcs" >&5
7117c2d2
JA
7932echo "${ECHO_T}$ac_cv_func_mbsrtowcs" >&6
7933if test $ac_cv_func_mbsrtowcs = yes; then
7934 cat >>confdefs.h <<\EOF
7935#define HAVE_MBSRTOWCS 1
7936EOF
7937
7938fi
7939
d3a24ed2
CR
7940echo "$as_me:7940: checking for mbrtowc" >&5
7941echo $ECHO_N "checking for mbrtowc... $ECHO_C" >&6
7942if test "${ac_cv_func_mbrtowc+set}" = set; then
7943 echo $ECHO_N "(cached) $ECHO_C" >&6
7944else
7945 cat >conftest.$ac_ext <<_ACEOF
7946#line 7946 "configure"
7947#include "confdefs.h"
7948/* System header to define __stub macros and hopefully few prototypes,
7949 which can conflict with char mbrtowc (); below. */
7950#include <assert.h>
7951/* Override any gcc2 internal prototype to avoid an error. */
7952#ifdef __cplusplus
7953extern "C"
7954#endif
7955/* We use char because int might match the return type of a gcc2
7956 builtin and then its argument prototype would still apply. */
7957char mbrtowc ();
7958char (*f) ();
7959
7960int
7961main ()
7962{
7963/* The GNU C library defines this for functions which it implements
7964 to always fail with ENOSYS. Some functions are actually named
7965 something starting with __ and the normal name is an alias. */
7966#if defined (__stub_mbrtowc) || defined (__stub___mbrtowc)
7967choke me
7968#else
7969f = mbrtowc;
7970#endif
7971
7972 ;
7973 return 0;
7974}
7975_ACEOF
7976rm -f conftest.$ac_objext conftest$ac_exeext
7977if { (eval echo "$as_me:7977: \"$ac_link\"") >&5
7978 (eval $ac_link) 2>&5
7979 ac_status=$?
7980 echo "$as_me:7980: \$? = $ac_status" >&5
7981 (exit $ac_status); } &&
7982 { ac_try='test -s conftest$ac_exeext'
7983 { (eval echo "$as_me:7983: \"$ac_try\"") >&5
7984 (eval $ac_try) 2>&5
7985 ac_status=$?
7986 echo "$as_me:7986: \$? = $ac_status" >&5
7987 (exit $ac_status); }; }; then
7988 ac_cv_func_mbrtowc=yes
7989else
7990 echo "$as_me: failed program was:" >&5
7991cat conftest.$ac_ext >&5
7992ac_cv_func_mbrtowc=no
7993fi
7994rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7995fi
7996echo "$as_me:7996: result: $ac_cv_func_mbrtowc" >&5
7997echo "${ECHO_T}$ac_cv_func_mbrtowc" >&6
7998if test $ac_cv_func_mbrtowc = yes; then
7999 cat >>confdefs.h <<\EOF
8000#define HAVE_MBRTOWC 1
8001EOF
8002
8003fi
8004
8005echo "$as_me:8005: checking for mbrlen" >&5
8006echo $ECHO_N "checking for mbrlen... $ECHO_C" >&6
8007if test "${ac_cv_func_mbrlen+set}" = set; then
8008 echo $ECHO_N "(cached) $ECHO_C" >&6
8009else
8010 cat >conftest.$ac_ext <<_ACEOF
8011#line 8011 "configure"
8012#include "confdefs.h"
8013/* System header to define __stub macros and hopefully few prototypes,
8014 which can conflict with char mbrlen (); below. */
8015#include <assert.h>
8016/* Override any gcc2 internal prototype to avoid an error. */
8017#ifdef __cplusplus
8018extern "C"
8019#endif
8020/* We use char because int might match the return type of a gcc2
8021 builtin and then its argument prototype would still apply. */
8022char mbrlen ();
8023char (*f) ();
8024
8025int
8026main ()
8027{
8028/* The GNU C library defines this for functions which it implements
8029 to always fail with ENOSYS. Some functions are actually named
8030 something starting with __ and the normal name is an alias. */
8031#if defined (__stub_mbrlen) || defined (__stub___mbrlen)
8032choke me
8033#else
8034f = mbrlen;
8035#endif
8036
8037 ;
8038 return 0;
8039}
8040_ACEOF
8041rm -f conftest.$ac_objext conftest$ac_exeext
8042if { (eval echo "$as_me:8042: \"$ac_link\"") >&5
8043 (eval $ac_link) 2>&5
8044 ac_status=$?
8045 echo "$as_me:8045: \$? = $ac_status" >&5
8046 (exit $ac_status); } &&
8047 { ac_try='test -s conftest$ac_exeext'
8048 { (eval echo "$as_me:8048: \"$ac_try\"") >&5
8049 (eval $ac_try) 2>&5
8050 ac_status=$?
8051 echo "$as_me:8051: \$? = $ac_status" >&5
8052 (exit $ac_status); }; }; then
8053 ac_cv_func_mbrlen=yes
8054else
8055 echo "$as_me: failed program was:" >&5
8056cat conftest.$ac_ext >&5
8057ac_cv_func_mbrlen=no
8058fi
8059rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8060fi
8061echo "$as_me:8061: result: $ac_cv_func_mbrlen" >&5
8062echo "${ECHO_T}$ac_cv_func_mbrlen" >&6
8063if test $ac_cv_func_mbrlen = yes; then
8064 cat >>confdefs.h <<\EOF
8065#define HAVE_MBRLEN 1
8066EOF
8067
8068fi
8069
8070echo "$as_me:8070: checking for wctomb" >&5
8071echo $ECHO_N "checking for wctomb... $ECHO_C" >&6
8072if test "${ac_cv_func_wctomb+set}" = set; then
8073 echo $ECHO_N "(cached) $ECHO_C" >&6
8074else
8075 cat >conftest.$ac_ext <<_ACEOF
8076#line 8076 "configure"
8077#include "confdefs.h"
8078/* System header to define __stub macros and hopefully few prototypes,
8079 which can conflict with char wctomb (); below. */
8080#include <assert.h>
8081/* Override any gcc2 internal prototype to avoid an error. */
8082#ifdef __cplusplus
8083extern "C"
8084#endif
8085/* We use char because int might match the return type of a gcc2
8086 builtin and then its argument prototype would still apply. */
8087char wctomb ();
8088char (*f) ();
8089
8090int
8091main ()
8092{
8093/* The GNU C library defines this for functions which it implements
8094 to always fail with ENOSYS. Some functions are actually named
8095 something starting with __ and the normal name is an alias. */
8096#if defined (__stub_wctomb) || defined (__stub___wctomb)
8097choke me
8098#else
8099f = wctomb;
8100#endif
8101
8102 ;
8103 return 0;
8104}
8105_ACEOF
8106rm -f conftest.$ac_objext conftest$ac_exeext
8107if { (eval echo "$as_me:8107: \"$ac_link\"") >&5
8108 (eval $ac_link) 2>&5
8109 ac_status=$?
8110 echo "$as_me:8110: \$? = $ac_status" >&5
8111 (exit $ac_status); } &&
8112 { ac_try='test -s conftest$ac_exeext'
8113 { (eval echo "$as_me:8113: \"$ac_try\"") >&5
8114 (eval $ac_try) 2>&5
8115 ac_status=$?
8116 echo "$as_me:8116: \$? = $ac_status" >&5
8117 (exit $ac_status); }; }; then
8118 ac_cv_func_wctomb=yes
8119else
8120 echo "$as_me: failed program was:" >&5
8121cat conftest.$ac_ext >&5
8122ac_cv_func_wctomb=no
8123fi
8124rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8125fi
8126echo "$as_me:8126: result: $ac_cv_func_wctomb" >&5
8127echo "${ECHO_T}$ac_cv_func_wctomb" >&6
8128if test $ac_cv_func_wctomb = yes; then
8129 cat >>confdefs.h <<\EOF
8130#define HAVE_WCTOMB 1
8131EOF
8132
8133fi
8134
8135echo "$as_me:8135: checking for wcwidth" >&5
7117c2d2
JA
8136echo $ECHO_N "checking for wcwidth... $ECHO_C" >&6
8137if test "${ac_cv_func_wcwidth+set}" = set; then
8138 echo $ECHO_N "(cached) $ECHO_C" >&6
8139else
8140 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 8141#line 8141 "configure"
7117c2d2
JA
8142#include "confdefs.h"
8143/* System header to define __stub macros and hopefully few prototypes,
8144 which can conflict with char wcwidth (); below. */
8145#include <assert.h>
8146/* Override any gcc2 internal prototype to avoid an error. */
8147#ifdef __cplusplus
8148extern "C"
8149#endif
8150/* We use char because int might match the return type of a gcc2
8151 builtin and then its argument prototype would still apply. */
8152char wcwidth ();
8153char (*f) ();
8154
8155int
8156main ()
8157{
8158/* The GNU C library defines this for functions which it implements
8159 to always fail with ENOSYS. Some functions are actually named
8160 something starting with __ and the normal name is an alias. */
8161#if defined (__stub_wcwidth) || defined (__stub___wcwidth)
8162choke me
8163#else
8164f = wcwidth;
8165#endif
8166
8167 ;
8168 return 0;
8169}
8170_ACEOF
8171rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 8172if { (eval echo "$as_me:8172: \"$ac_link\"") >&5
7117c2d2
JA
8173 (eval $ac_link) 2>&5
8174 ac_status=$?
d3a24ed2 8175 echo "$as_me:8175: \$? = $ac_status" >&5
7117c2d2
JA
8176 (exit $ac_status); } &&
8177 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 8178 { (eval echo "$as_me:8178: \"$ac_try\"") >&5
7117c2d2
JA
8179 (eval $ac_try) 2>&5
8180 ac_status=$?
d3a24ed2 8181 echo "$as_me:8181: \$? = $ac_status" >&5
7117c2d2
JA
8182 (exit $ac_status); }; }; then
8183 ac_cv_func_wcwidth=yes
8184else
8185 echo "$as_me: failed program was:" >&5
8186cat conftest.$ac_ext >&5
8187ac_cv_func_wcwidth=no
8188fi
8189rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8190fi
d3a24ed2 8191echo "$as_me:8191: result: $ac_cv_func_wcwidth" >&5
7117c2d2
JA
8192echo "${ECHO_T}$ac_cv_func_wcwidth" >&6
8193if test $ac_cv_func_wcwidth = yes; then
8194 cat >>confdefs.h <<\EOF
8195#define HAVE_WCWIDTH 1
8196EOF
8197
8198fi
8199
d3a24ed2 8200echo "$as_me:8200: checking for mbstate_t" >&5
7117c2d2
JA
8201echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
8202if test "${bash_cv_have_mbstate_t+set}" = set; then
8203 echo $ECHO_N "(cached) $ECHO_C" >&6
7117c2d2
JA
8204else
8205 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 8206#line 8206 "configure"
7117c2d2
JA
8207#include "confdefs.h"
8208
8209#include <wchar.h>
8210int
8211main ()
8212{
d3a24ed2 8213
7117c2d2 8214 mbstate_t ps;
d3a24ed2
CR
8215 mbstate_t *psp;
8216 psp = (mbstate_t *)0;
8217
8218 ;
7117c2d2
JA
8219 return 0;
8220}
8221_ACEOF
d3a24ed2
CR
8222rm -f conftest.$ac_objext
8223if { (eval echo "$as_me:8223: \"$ac_compile\"") >&5
8224 (eval $ac_compile) 2>&5
7117c2d2 8225 ac_status=$?
d3a24ed2
CR
8226 echo "$as_me:8226: \$? = $ac_status" >&5
8227 (exit $ac_status); } &&
8228 { ac_try='test -s conftest.$ac_objext'
8229 { (eval echo "$as_me:8229: \"$ac_try\"") >&5
7117c2d2
JA
8230 (eval $ac_try) 2>&5
8231 ac_status=$?
d3a24ed2 8232 echo "$as_me:8232: \$? = $ac_status" >&5
7117c2d2
JA
8233 (exit $ac_status); }; }; then
8234 bash_cv_have_mbstate_t=yes
8235else
d3a24ed2 8236 echo "$as_me: failed program was:" >&5
7117c2d2
JA
8237cat conftest.$ac_ext >&5
8238bash_cv_have_mbstate_t=no
8239fi
d3a24ed2 8240rm -f conftest.$ac_objext conftest.$ac_ext
7117c2d2 8241fi
d3a24ed2 8242echo "$as_me:8242: result: $bash_cv_have_mbstate_t" >&5
7117c2d2
JA
8243echo "${ECHO_T}$bash_cv_have_mbstate_t" >&6
8244if test $bash_cv_have_mbstate_t = yes; then
8245 cat >>confdefs.h <<\EOF
8246#define HAVE_MBSTATE_T 1
8247EOF
8248
8249fi
8250
d3a24ed2 8251echo "$as_me:8251: checking for nl_langinfo and CODESET" >&5
7117c2d2
JA
8252echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8253if test "${bash_cv_langinfo_codeset+set}" = set; then
8254 echo $ECHO_N "(cached) $ECHO_C" >&6
8255else
8256 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 8257#line 8257 "configure"
7117c2d2
JA
8258#include "confdefs.h"
8259#include <langinfo.h>
8260int
8261main ()
8262{
8263char* cs = nl_langinfo(CODESET);
8264 ;
8265 return 0;
8266}
8267_ACEOF
8268rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 8269if { (eval echo "$as_me:8269: \"$ac_link\"") >&5
7117c2d2
JA
8270 (eval $ac_link) 2>&5
8271 ac_status=$?
d3a24ed2 8272 echo "$as_me:8272: \$? = $ac_status" >&5
7117c2d2
JA
8273 (exit $ac_status); } &&
8274 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 8275 { (eval echo "$as_me:8275: \"$ac_try\"") >&5
7117c2d2
JA
8276 (eval $ac_try) 2>&5
8277 ac_status=$?
d3a24ed2 8278 echo "$as_me:8278: \$? = $ac_status" >&5
7117c2d2
JA
8279 (exit $ac_status); }; }; then
8280 bash_cv_langinfo_codeset=yes
8281else
8282 echo "$as_me: failed program was:" >&5
8283cat conftest.$ac_ext >&5
8284bash_cv_langinfo_codeset=no
8285fi
8286rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8287fi
d3a24ed2 8288echo "$as_me:8288: result: $bash_cv_langinfo_codeset" >&5
7117c2d2
JA
8289echo "${ECHO_T}$bash_cv_langinfo_codeset" >&6
8290if test $bash_cv_langinfo_codeset = yes; then
8291 cat >>confdefs.h <<\EOF
8292#define HAVE_LANGINFO_CODESET 1
8293EOF
8294
8295fi
8296
f73dda09
JA
8297if test "$opt_static_link" != yes; then
8298
d3a24ed2 8299echo "$as_me:8299: checking for dlopen in -ldl" >&5
f73dda09
JA
8300echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
8301if test "${ac_cv_lib_dl_dlopen+set}" = set; then
8302 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 8303else
f73dda09
JA
8304 ac_check_lib_save_LIBS=$LIBS
8305LIBS="-ldl $LIBS"
8306cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 8307#line 8307 "configure"
f73dda09
JA
8308#include "confdefs.h"
8309
8310/* Override any gcc2 internal prototype to avoid an error. */
8311#ifdef __cplusplus
8312extern "C"
8313#endif
8314/* We use char because int might match the return type of a gcc2
8315 builtin and then its argument prototype would still apply. */
8316char dlopen ();
8317int
8318main ()
8319{
8320dlopen ();
8321 ;
8322 return 0;
8323}
8324_ACEOF
8325rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 8326if { (eval echo "$as_me:8326: \"$ac_link\"") >&5
f73dda09
JA
8327 (eval $ac_link) 2>&5
8328 ac_status=$?
d3a24ed2 8329 echo "$as_me:8329: \$? = $ac_status" >&5
f73dda09
JA
8330 (exit $ac_status); } &&
8331 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 8332 { (eval echo "$as_me:8332: \"$ac_try\"") >&5
f73dda09
JA
8333 (eval $ac_try) 2>&5
8334 ac_status=$?
d3a24ed2 8335 echo "$as_me:8335: \$? = $ac_status" >&5
f73dda09
JA
8336 (exit $ac_status); }; }; then
8337 ac_cv_lib_dl_dlopen=yes
8338else
8339 echo "$as_me: failed program was:" >&5
8340cat conftest.$ac_ext >&5
8341ac_cv_lib_dl_dlopen=no
8342fi
8343rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8344LIBS=$ac_check_lib_save_LIBS
8345fi
d3a24ed2 8346echo "$as_me:8346: result: $ac_cv_lib_dl_dlopen" >&5
f73dda09
JA
8347echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
8348if test $ac_cv_lib_dl_dlopen = yes; then
8349 cat >>confdefs.h <<EOF
8350#define HAVE_LIBDL 1
8351EOF
8352
8353 LIBS="-ldl $LIBS"
8354
ccc6cda3 8355fi
ccc6cda3 8356
f73dda09 8357for ac_func in dlopen dlclose dlsym
bb70624e 8358do
f73dda09 8359as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d3a24ed2 8360echo "$as_me:8360: checking for $ac_func" >&5
f73dda09
JA
8361echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8362if eval "test \"\${$as_ac_var+set}\" = set"; then
8363 echo $ECHO_N "(cached) $ECHO_C" >&6
bb70624e 8364else
f73dda09 8365 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 8366#line 8366 "configure"
bb70624e 8367#include "confdefs.h"
f73dda09
JA
8368/* System header to define __stub macros and hopefully few prototypes,
8369 which can conflict with char $ac_func (); below. */
8370#include <assert.h>
8371/* Override any gcc2 internal prototype to avoid an error. */
8372#ifdef __cplusplus
8373extern "C"
8374#endif
8375/* We use char because int might match the return type of a gcc2
8376 builtin and then its argument prototype would still apply. */
8377char $ac_func ();
8378char (*f) ();
8379
8380int
8381main ()
8382{
8383/* The GNU C library defines this for functions which it implements
8384 to always fail with ENOSYS. Some functions are actually named
8385 something starting with __ and the normal name is an alias. */
8386#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8387choke me
8388#else
8389f = $ac_func;
8390#endif
8391
8392 ;
8393 return 0;
8394}
8395_ACEOF
8396rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 8397if { (eval echo "$as_me:8397: \"$ac_link\"") >&5
f73dda09
JA
8398 (eval $ac_link) 2>&5
8399 ac_status=$?
d3a24ed2 8400 echo "$as_me:8400: \$? = $ac_status" >&5
f73dda09
JA
8401 (exit $ac_status); } &&
8402 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 8403 { (eval echo "$as_me:8403: \"$ac_try\"") >&5
f73dda09
JA
8404 (eval $ac_try) 2>&5
8405 ac_status=$?
d3a24ed2 8406 echo "$as_me:8406: \$? = $ac_status" >&5
f73dda09
JA
8407 (exit $ac_status); }; }; then
8408 eval "$as_ac_var=yes"
8409else
8410 echo "$as_me: failed program was:" >&5
8411cat conftest.$ac_ext >&5
8412eval "$as_ac_var=no"
8413fi
8414rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8415fi
d3a24ed2 8416echo "$as_me:8416: result: `eval echo '${'$as_ac_var'}'`" >&5
f73dda09
JA
8417echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8418if test `eval echo '${'$as_ac_var'}'` = yes; then
8419 cat >>confdefs.h <<EOF
8420#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
bb70624e 8421EOF
f73dda09 8422
bb70624e 8423fi
f73dda09
JA
8424done
8425
bb70624e 8426fi
f73dda09 8427
d3a24ed2 8428echo "$as_me:8428: checking for sys_siglist declaration in signal.h or unistd.h" >&5
f73dda09
JA
8429echo $ECHO_N "checking for sys_siglist declaration in signal.h or unistd.h... $ECHO_C" >&6
8430if test "${ac_cv_decl_sys_siglist+set}" = set; then
8431 echo $ECHO_N "(cached) $ECHO_C" >&6
8432else
8433 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 8434#line 8434 "configure"
f73dda09
JA
8435#include "confdefs.h"
8436#include <sys/types.h>
8437#include <signal.h>
8438/* NetBSD declares sys_siglist in unistd.h. */
8439#if HAVE_UNISTD_H
8440# include <unistd.h>
8441#endif
8442
8443int
8444main ()
8445{
8446char *msg = *(sys_siglist + 1);
8447 ;
8448 return 0;
8449}
8450_ACEOF
8451rm -f conftest.$ac_objext
d3a24ed2 8452if { (eval echo "$as_me:8452: \"$ac_compile\"") >&5
f73dda09
JA
8453 (eval $ac_compile) 2>&5
8454 ac_status=$?
d3a24ed2 8455 echo "$as_me:8455: \$? = $ac_status" >&5
f73dda09
JA
8456 (exit $ac_status); } &&
8457 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 8458 { (eval echo "$as_me:8458: \"$ac_try\"") >&5
f73dda09
JA
8459 (eval $ac_try) 2>&5
8460 ac_status=$?
d3a24ed2 8461 echo "$as_me:8461: \$? = $ac_status" >&5
f73dda09
JA
8462 (exit $ac_status); }; }; then
8463 ac_cv_decl_sys_siglist=yes
bb70624e 8464else
f73dda09
JA
8465 echo "$as_me: failed program was:" >&5
8466cat conftest.$ac_ext >&5
8467ac_cv_decl_sys_siglist=no
bb70624e 8468fi
f73dda09
JA
8469rm -f conftest.$ac_objext conftest.$ac_ext
8470fi
d3a24ed2 8471echo "$as_me:8471: result: $ac_cv_decl_sys_siglist" >&5
f73dda09
JA
8472echo "${ECHO_T}$ac_cv_decl_sys_siglist" >&6
8473if test $ac_cv_decl_sys_siglist = yes; then
bb70624e 8474
f73dda09
JA
8475cat >>confdefs.h <<\EOF
8476#define SYS_SIGLIST_DECLARED 1
8477EOF
8478
8479fi
bb70624e
JA
8480
8481if test "$ac_cv_func_inet_aton" != 'yes'; then
8482
d3a24ed2 8483echo "$as_me:8483: checking for inet_aton" >&5
f73dda09
JA
8484echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
8485if test "${bash_cv_func_inet_aton+set}" = set; then
8486 echo $ECHO_N "(cached) $ECHO_C" >&6
bb70624e 8487else
f73dda09 8488 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 8489#line 8489 "configure"
bb70624e
JA
8490#include "confdefs.h"
8491
8492#include <sys/types.h>
8493#include <netinet/in.h>
8494#include <arpa/inet.h>
8495struct in_addr ap;
f73dda09
JA
8496int
8497main ()
8498{
8499 inet_aton("127.0.0.1", &ap);
8500 ;
8501 return 0;
8502}
8503_ACEOF
8504rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 8505if { (eval echo "$as_me:8505: \"$ac_link\"") >&5
f73dda09
JA
8506 (eval $ac_link) 2>&5
8507 ac_status=$?
d3a24ed2 8508 echo "$as_me:8508: \$? = $ac_status" >&5
f73dda09
JA
8509 (exit $ac_status); } &&
8510 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 8511 { (eval echo "$as_me:8511: \"$ac_try\"") >&5
f73dda09
JA
8512 (eval $ac_try) 2>&5
8513 ac_status=$?
d3a24ed2 8514 echo "$as_me:8514: \$? = $ac_status" >&5
f73dda09 8515 (exit $ac_status); }; }; then
bb70624e
JA
8516 bash_cv_func_inet_aton=yes
8517else
f73dda09
JA
8518 echo "$as_me: failed program was:" >&5
8519cat conftest.$ac_ext >&5
8520bash_cv_func_inet_aton=no
bb70624e 8521fi
f73dda09 8522rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
bb70624e 8523fi
d3a24ed2 8524echo "$as_me:8524: result: $bash_cv_func_inet_aton" >&5
f73dda09 8525echo "${ECHO_T}$bash_cv_func_inet_aton" >&6
bb70624e 8526if test $bash_cv_func_inet_aton = yes; then
f73dda09 8527 cat >>confdefs.h <<\EOF
bb70624e
JA
8528#define HAVE_INET_ATON 1
8529EOF
8530
f73dda09
JA
8531else
8532 LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
bb70624e
JA
8533fi
8534
8535fi
8536
8537case "$host_os" in
f73dda09 8538irix4*)
d3a24ed2 8539echo "$as_me:8539: checking for getpwent in -lsun" >&5
f73dda09
JA
8540echo $ECHO_N "checking for getpwent in -lsun... $ECHO_C" >&6
8541if test "${ac_cv_lib_sun_getpwent+set}" = set; then
8542 echo $ECHO_N "(cached) $ECHO_C" >&6
bb70624e 8543else
f73dda09 8544 ac_check_lib_save_LIBS=$LIBS
bb70624e 8545LIBS="-lsun $LIBS"
f73dda09 8546cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 8547#line 8547 "configure"
bb70624e 8548#include "confdefs.h"
f73dda09 8549
bb70624e 8550/* Override any gcc2 internal prototype to avoid an error. */
f73dda09
JA
8551#ifdef __cplusplus
8552extern "C"
8553#endif
bb70624e 8554/* We use char because int might match the return type of a gcc2
f73dda09
JA
8555 builtin and then its argument prototype would still apply. */
8556char getpwent ();
8557int
8558main ()
8559{
8560getpwent ();
8561 ;
8562 return 0;
8563}
8564_ACEOF
8565rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 8566if { (eval echo "$as_me:8566: \"$ac_link\"") >&5
f73dda09
JA
8567 (eval $ac_link) 2>&5
8568 ac_status=$?
d3a24ed2 8569 echo "$as_me:8569: \$? = $ac_status" >&5
f73dda09
JA
8570 (exit $ac_status); } &&
8571 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 8572 { (eval echo "$as_me:8572: \"$ac_try\"") >&5
f73dda09
JA
8573 (eval $ac_try) 2>&5
8574 ac_status=$?
d3a24ed2 8575 echo "$as_me:8575: \$? = $ac_status" >&5
f73dda09
JA
8576 (exit $ac_status); }; }; then
8577 ac_cv_lib_sun_getpwent=yes
8578else
8579 echo "$as_me: failed program was:" >&5
8580cat conftest.$ac_ext >&5
8581ac_cv_lib_sun_getpwent=no
8582fi
8583rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8584LIBS=$ac_check_lib_save_LIBS
8585fi
d3a24ed2 8586echo "$as_me:8586: result: $ac_cv_lib_sun_getpwent" >&5
f73dda09
JA
8587echo "${ECHO_T}$ac_cv_lib_sun_getpwent" >&6
8588if test $ac_cv_lib_sun_getpwent = yes; then
8589 cat >>confdefs.h <<EOF
8590#define HAVE_LIBSUN 1
bb70624e
JA
8591EOF
8592
8593 LIBS="-lsun $LIBS"
8594
bb70624e
JA
8595fi
8596 ;;
8597esac
ccc6cda3 8598
d166f048 8599if test "$ac_cv_func_getpeername" = no; then
f73dda09 8600
ccc6cda3
JA
8601if test "X$bash_cv_have_socklib" = "X"; then
8602_bash_needmsg=
8603else
d3a24ed2 8604echo "$as_me:8604: checking for socket library" >&5
f73dda09 8605echo $ECHO_N "checking for socket library... $ECHO_C" >&6
ccc6cda3
JA
8606_bash_needmsg=yes
8607fi
f73dda09
JA
8608if test "${bash_cv_have_socklib+set}" = set; then
8609 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 8610else
d3a24ed2 8611 echo "$as_me:8611: checking for getpeername in -lsocket" >&5
f73dda09
JA
8612echo $ECHO_N "checking for getpeername in -lsocket... $ECHO_C" >&6
8613if test "${ac_cv_lib_socket_getpeername+set}" = set; then
8614 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 8615else
f73dda09 8616 ac_check_lib_save_LIBS=$LIBS
ccc6cda3 8617LIBS="-lsocket -lnsl $LIBS"
f73dda09 8618cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 8619#line 8619 "configure"
ccc6cda3 8620#include "confdefs.h"
f73dda09 8621
ccc6cda3 8622/* Override any gcc2 internal prototype to avoid an error. */
f73dda09
JA
8623#ifdef __cplusplus
8624extern "C"
8625#endif
ccc6cda3 8626/* We use char because int might match the return type of a gcc2
f73dda09
JA
8627 builtin and then its argument prototype would still apply. */
8628char getpeername ();
8629int
8630main ()
8631{
8632getpeername ();
8633 ;
8634 return 0;
8635}
8636_ACEOF
8637rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 8638if { (eval echo "$as_me:8638: \"$ac_link\"") >&5
f73dda09
JA
8639 (eval $ac_link) 2>&5
8640 ac_status=$?
d3a24ed2 8641 echo "$as_me:8641: \$? = $ac_status" >&5
f73dda09
JA
8642 (exit $ac_status); } &&
8643 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 8644 { (eval echo "$as_me:8644: \"$ac_try\"") >&5
f73dda09
JA
8645 (eval $ac_try) 2>&5
8646 ac_status=$?
d3a24ed2 8647 echo "$as_me:8647: \$? = $ac_status" >&5
f73dda09
JA
8648 (exit $ac_status); }; }; then
8649 ac_cv_lib_socket_getpeername=yes
8650else
8651 echo "$as_me: failed program was:" >&5
8652cat conftest.$ac_ext >&5
8653ac_cv_lib_socket_getpeername=no
8654fi
8655rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8656LIBS=$ac_check_lib_save_LIBS
8657fi
d3a24ed2 8658echo "$as_me:8658: result: $ac_cv_lib_socket_getpeername" >&5
f73dda09
JA
8659echo "${ECHO_T}$ac_cv_lib_socket_getpeername" >&6
8660if test $ac_cv_lib_socket_getpeername = yes; then
ccc6cda3
JA
8661 bash_cv_have_socklib=yes
8662else
f73dda09 8663 bash_cv_have_socklib=no
ccc6cda3
JA
8664fi
8665
8666fi
8667
8668if test "X$_bash_needmsg" = Xyes; then
d3a24ed2 8669 echo "$as_me:8669: result: $bash_cv_have_socklib" >&5
f73dda09 8670echo "${ECHO_T}$bash_cv_have_socklib" >&6
ccc6cda3
JA
8671 _bash_needmsg=
8672fi
8673if test $bash_cv_have_socklib = yes; then
8674 # check for libnsl, add it to LIBS if present
8675 if test "X$bash_cv_have_libnsl" = "X"; then
8676 _bash_needmsg=
8677 else
d3a24ed2 8678 echo "$as_me:8678: checking for libnsl" >&5
f73dda09 8679echo $ECHO_N "checking for libnsl... $ECHO_C" >&6
ccc6cda3
JA
8680 _bash_needmsg=yes
8681 fi
f73dda09
JA
8682 if test "${bash_cv_have_libnsl+set}" = set; then
8683 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 8684else
d3a24ed2 8685 echo "$as_me:8685: checking for t_open in -lnsl" >&5
f73dda09
JA
8686echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
8687if test "${ac_cv_lib_nsl_t_open+set}" = set; then
8688 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 8689else
f73dda09 8690 ac_check_lib_save_LIBS=$LIBS
ccc6cda3 8691LIBS="-lnsl $LIBS"
f73dda09 8692cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 8693#line 8693 "configure"
ccc6cda3 8694#include "confdefs.h"
f73dda09 8695
ccc6cda3 8696/* Override any gcc2 internal prototype to avoid an error. */
f73dda09
JA
8697#ifdef __cplusplus
8698extern "C"
8699#endif
ccc6cda3 8700/* We use char because int might match the return type of a gcc2
f73dda09
JA
8701 builtin and then its argument prototype would still apply. */
8702char t_open ();
8703int
8704main ()
8705{
8706t_open ();
8707 ;
8708 return 0;
8709}
8710_ACEOF
8711rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 8712if { (eval echo "$as_me:8712: \"$ac_link\"") >&5
f73dda09
JA
8713 (eval $ac_link) 2>&5
8714 ac_status=$?
d3a24ed2 8715 echo "$as_me:8715: \$? = $ac_status" >&5
f73dda09
JA
8716 (exit $ac_status); } &&
8717 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 8718 { (eval echo "$as_me:8718: \"$ac_try\"") >&5
f73dda09
JA
8719 (eval $ac_try) 2>&5
8720 ac_status=$?
d3a24ed2 8721 echo "$as_me:8721: \$? = $ac_status" >&5
f73dda09
JA
8722 (exit $ac_status); }; }; then
8723 ac_cv_lib_nsl_t_open=yes
8724else
8725 echo "$as_me: failed program was:" >&5
8726cat conftest.$ac_ext >&5
8727ac_cv_lib_nsl_t_open=no
8728fi
8729rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8730LIBS=$ac_check_lib_save_LIBS
8731fi
d3a24ed2 8732echo "$as_me:8732: result: $ac_cv_lib_nsl_t_open" >&5
f73dda09
JA
8733echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
8734if test $ac_cv_lib_nsl_t_open = yes; then
ccc6cda3
JA
8735 bash_cv_have_libnsl=yes
8736else
f73dda09 8737 bash_cv_have_libnsl=no
ccc6cda3
JA
8738fi
8739
8740fi
8741
8742 if test "X$_bash_needmsg" = Xyes; then
d3a24ed2 8743 echo "$as_me:8743: result: $bash_cv_have_libnsl" >&5
f73dda09 8744echo "${ECHO_T}$bash_cv_have_libnsl" >&6
ccc6cda3
JA
8745 _bash_needmsg=
8746 fi
8747 if test $bash_cv_have_libnsl = yes; then
8748 LIBS="-lsocket -lnsl $LIBS"
8749 else
8750 LIBS="-lsocket $LIBS"
8751 fi
f73dda09 8752 cat >>confdefs.h <<\EOF
ccc6cda3
JA
8753#define HAVE_LIBSOCKET 1
8754EOF
8755
f73dda09 8756 cat >>confdefs.h <<\EOF
ccc6cda3
JA
8757#define HAVE_GETPEERNAME 1
8758EOF
8759
8760fi
8761
bb70624e
JA
8762fi
8763if test "$ac_cv_func_gethostbyname" = no; then
8764 if test "X$bash_cv_have_gethostbyname" = "X"; then
8765_bash_needmsg=yes
8766else
d3a24ed2 8767echo "$as_me:8767: checking for gethostbyname in socket library" >&5
f73dda09 8768echo $ECHO_N "checking for gethostbyname in socket library... $ECHO_C" >&6
bb70624e
JA
8769_bash_needmsg=
8770fi
f73dda09
JA
8771if test "${bash_cv_have_gethostbyname+set}" = set; then
8772 echo $ECHO_N "(cached) $ECHO_C" >&6
bb70624e 8773else
f73dda09 8774 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 8775#line 8775 "configure"
bb70624e
JA
8776#include "confdefs.h"
8777#include <netdb.h>
f73dda09
JA
8778int
8779main ()
8780{
bb70624e
JA
8781 struct hostent *hp;
8782 hp = gethostbyname("localhost");
8783
f73dda09
JA
8784 ;
8785 return 0;
8786}
8787_ACEOF
8788rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 8789if { (eval echo "$as_me:8789: \"$ac_link\"") >&5
f73dda09
JA
8790 (eval $ac_link) 2>&5
8791 ac_status=$?
d3a24ed2 8792 echo "$as_me:8792: \$? = $ac_status" >&5
f73dda09
JA
8793 (exit $ac_status); } &&
8794 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 8795 { (eval echo "$as_me:8795: \"$ac_try\"") >&5
f73dda09
JA
8796 (eval $ac_try) 2>&5
8797 ac_status=$?
d3a24ed2 8798 echo "$as_me:8798: \$? = $ac_status" >&5
f73dda09 8799 (exit $ac_status); }; }; then
bb70624e
JA
8800 bash_cv_have_gethostbyname=yes
8801else
f73dda09
JA
8802 echo "$as_me: failed program was:" >&5
8803cat conftest.$ac_ext >&5
8804bash_cv_have_gethostbyname=no
8805fi
8806rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8807
8808fi
8809
8810if test "X$_bash_needmsg" = Xyes; then
d3a24ed2 8811 echo "$as_me:8811: checking for gethostbyname in socket library" >&5
f73dda09
JA
8812echo $ECHO_N "checking for gethostbyname in socket library... $ECHO_C" >&6
8813fi
d3a24ed2 8814echo "$as_me:8814: result: $bash_cv_have_gethostbyname" >&5
f73dda09
JA
8815echo "${ECHO_T}$bash_cv_have_gethostbyname" >&6
8816if test "$bash_cv_have_gethostbyname" = yes; then
8817cat >>confdefs.h <<\EOF
8818#define HAVE_GETHOSTBYNAME 1
8819EOF
8820
8821fi
8822
8823fi
8824
d3a24ed2 8825echo "$as_me:8825: checking for uid_t in sys/types.h" >&5
f73dda09
JA
8826echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
8827if test "${ac_cv_type_uid_t+set}" = set; then
8828 echo $ECHO_N "(cached) $ECHO_C" >&6
8829else
8830 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 8831#line 8831 "configure"
f73dda09
JA
8832#include "confdefs.h"
8833#include <sys/types.h>
8834
8835_ACEOF
8836if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8837 egrep "uid_t" >/dev/null 2>&1; then
8838 ac_cv_type_uid_t=yes
8839else
8840 ac_cv_type_uid_t=no
8841fi
8842rm -f conftest*
8843
8844fi
d3a24ed2 8845echo "$as_me:8845: result: $ac_cv_type_uid_t" >&5
f73dda09
JA
8846echo "${ECHO_T}$ac_cv_type_uid_t" >&6
8847if test $ac_cv_type_uid_t = no; then
8848
8849cat >>confdefs.h <<\EOF
8850#define uid_t int
8851EOF
8852
8853cat >>confdefs.h <<\EOF
8854#define gid_t int
8855EOF
8856
8857fi
8858
d3a24ed2 8859echo "$as_me:8859: checking type of array argument to getgroups" >&5
f73dda09
JA
8860echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6
8861if test "${ac_cv_type_getgroups+set}" = set; then
8862 echo $ECHO_N "(cached) $ECHO_C" >&6
8863else
8864 if test "$cross_compiling" = yes; then
8865 ac_cv_type_getgroups=cross
8866else
8867 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 8868#line 8868 "configure"
f73dda09
JA
8869#include "confdefs.h"
8870/* Thanks to Mike Rendell for this test. */
8871#include <sys/types.h>
8872#define NGID 256
8873#undef MAX
8874#define MAX(x, y) ((x) > (y) ? (x) : (y))
8875
8876int
8877main ()
8878{
8879 gid_t gidset[NGID];
8880 int i, n;
8881 union { gid_t gval; long lval; } val;
8882
8883 val.lval = -1;
8884 for (i = 0; i < NGID; i++)
8885 gidset[i] = val.gval;
8886 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
8887 gidset);
8888 /* Exit non-zero if getgroups seems to require an array of ints. This
8889 happens when gid_t is short but getgroups modifies an array of ints. */
8890 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
8891}
8892_ACEOF
8893rm -f conftest$ac_exeext
d3a24ed2 8894if { (eval echo "$as_me:8894: \"$ac_link\"") >&5
f73dda09
JA
8895 (eval $ac_link) 2>&5
8896 ac_status=$?
d3a24ed2 8897 echo "$as_me:8897: \$? = $ac_status" >&5
f73dda09 8898 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3a24ed2 8899 { (eval echo "$as_me:8899: \"$ac_try\"") >&5
f73dda09
JA
8900 (eval $ac_try) 2>&5
8901 ac_status=$?
d3a24ed2 8902 echo "$as_me:8902: \$? = $ac_status" >&5
f73dda09
JA
8903 (exit $ac_status); }; }; then
8904 ac_cv_type_getgroups=gid_t
8905else
8906 echo "$as_me: program exited with status $ac_status" >&5
8907echo "$as_me: failed program was:" >&5
8908cat conftest.$ac_ext >&5
8909ac_cv_type_getgroups=int
8910fi
8911rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8912fi
8913if test $ac_cv_type_getgroups = cross; then
8914 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 8915#line 8915 "configure"
f73dda09
JA
8916#include "confdefs.h"
8917#include <unistd.h>
8918
8919_ACEOF
8920if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8921 egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
8922 ac_cv_type_getgroups=gid_t
8923else
8924 ac_cv_type_getgroups=int
bb70624e
JA
8925fi
8926rm -f conftest*
8927
8928fi
f73dda09 8929fi
d3a24ed2 8930echo "$as_me:8930: result: $ac_cv_type_getgroups" >&5
f73dda09
JA
8931echo "${ECHO_T}$ac_cv_type_getgroups" >&6
8932
8933cat >>confdefs.h <<EOF
8934#define GETGROUPS_T $ac_cv_type_getgroups
8935EOF
8936
d3a24ed2 8937echo "$as_me:8937: checking for off_t" >&5
f73dda09
JA
8938echo $ECHO_N "checking for off_t... $ECHO_C" >&6
8939if test "${ac_cv_type_off_t+set}" = set; then
8940 echo $ECHO_N "(cached) $ECHO_C" >&6
8941else
8942 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 8943#line 8943 "configure"
f73dda09
JA
8944#include "confdefs.h"
8945$ac_includes_default
8946int
8947main ()
8948{
8949if ((off_t *) 0)
8950 return 0;
8951if (sizeof (off_t))
8952 return 0;
8953 ;
8954 return 0;
8955}
8956_ACEOF
8957rm -f conftest.$ac_objext
d3a24ed2 8958if { (eval echo "$as_me:8958: \"$ac_compile\"") >&5
f73dda09
JA
8959 (eval $ac_compile) 2>&5
8960 ac_status=$?
d3a24ed2 8961 echo "$as_me:8961: \$? = $ac_status" >&5
f73dda09
JA
8962 (exit $ac_status); } &&
8963 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 8964 { (eval echo "$as_me:8964: \"$ac_try\"") >&5
f73dda09
JA
8965 (eval $ac_try) 2>&5
8966 ac_status=$?
d3a24ed2 8967 echo "$as_me:8967: \$? = $ac_status" >&5
f73dda09
JA
8968 (exit $ac_status); }; }; then
8969 ac_cv_type_off_t=yes
8970else
8971 echo "$as_me: failed program was:" >&5
8972cat conftest.$ac_ext >&5
8973ac_cv_type_off_t=no
8974fi
8975rm -f conftest.$ac_objext conftest.$ac_ext
8976fi
d3a24ed2 8977echo "$as_me:8977: result: $ac_cv_type_off_t" >&5
f73dda09
JA
8978echo "${ECHO_T}$ac_cv_type_off_t" >&6
8979if test $ac_cv_type_off_t = yes; then
8980 :
8981else
8982
8983cat >>confdefs.h <<EOF
8984#define off_t long
8985EOF
8986
8987fi
8988
d3a24ed2 8989echo "$as_me:8989: checking for mode_t" >&5
f73dda09
JA
8990echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
8991if test "${ac_cv_type_mode_t+set}" = set; then
8992 echo $ECHO_N "(cached) $ECHO_C" >&6
8993else
8994 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 8995#line 8995 "configure"
f73dda09
JA
8996#include "confdefs.h"
8997$ac_includes_default
8998int
8999main ()
9000{
9001if ((mode_t *) 0)
9002 return 0;
9003if (sizeof (mode_t))
9004 return 0;
9005 ;
9006 return 0;
9007}
9008_ACEOF
9009rm -f conftest.$ac_objext
d3a24ed2 9010if { (eval echo "$as_me:9010: \"$ac_compile\"") >&5
f73dda09
JA
9011 (eval $ac_compile) 2>&5
9012 ac_status=$?
d3a24ed2 9013 echo "$as_me:9013: \$? = $ac_status" >&5
f73dda09
JA
9014 (exit $ac_status); } &&
9015 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 9016 { (eval echo "$as_me:9016: \"$ac_try\"") >&5
f73dda09
JA
9017 (eval $ac_try) 2>&5
9018 ac_status=$?
d3a24ed2 9019 echo "$as_me:9019: \$? = $ac_status" >&5
f73dda09
JA
9020 (exit $ac_status); }; }; then
9021 ac_cv_type_mode_t=yes
9022else
9023 echo "$as_me: failed program was:" >&5
9024cat conftest.$ac_ext >&5
9025ac_cv_type_mode_t=no
9026fi
9027rm -f conftest.$ac_objext conftest.$ac_ext
9028fi
d3a24ed2 9029echo "$as_me:9029: result: $ac_cv_type_mode_t" >&5
f73dda09
JA
9030echo "${ECHO_T}$ac_cv_type_mode_t" >&6
9031if test $ac_cv_type_mode_t = yes; then
9032 :
9033else
bb70624e 9034
f73dda09
JA
9035cat >>confdefs.h <<EOF
9036#define mode_t int
bb70624e
JA
9037EOF
9038
9039fi
9040
d3a24ed2 9041echo "$as_me:9041: checking for uid_t in sys/types.h" >&5
f73dda09
JA
9042echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
9043if test "${ac_cv_type_uid_t+set}" = set; then
9044 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 9045else
f73dda09 9046 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 9047#line 9047 "configure"
ccc6cda3
JA
9048#include "confdefs.h"
9049#include <sys/types.h>
f73dda09
JA
9050
9051_ACEOF
ccc6cda3
JA
9052if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9053 egrep "uid_t" >/dev/null 2>&1; then
ccc6cda3
JA
9054 ac_cv_type_uid_t=yes
9055else
ccc6cda3
JA
9056 ac_cv_type_uid_t=no
9057fi
9058rm -f conftest*
9059
9060fi
d3a24ed2 9061echo "$as_me:9061: result: $ac_cv_type_uid_t" >&5
f73dda09 9062echo "${ECHO_T}$ac_cv_type_uid_t" >&6
ccc6cda3 9063if test $ac_cv_type_uid_t = no; then
f73dda09
JA
9064
9065cat >>confdefs.h <<\EOF
ccc6cda3
JA
9066#define uid_t int
9067EOF
9068
f73dda09 9069cat >>confdefs.h <<\EOF
ccc6cda3
JA
9070#define gid_t int
9071EOF
9072
9073fi
9074
d3a24ed2 9075echo "$as_me:9075: checking for pid_t" >&5
f73dda09
JA
9076echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
9077if test "${ac_cv_type_pid_t+set}" = set; then
9078 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 9079else
f73dda09 9080 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 9081#line 9081 "configure"
ccc6cda3 9082#include "confdefs.h"
f73dda09
JA
9083$ac_includes_default
9084int
9085main ()
ccc6cda3 9086{
f73dda09
JA
9087if ((pid_t *) 0)
9088 return 0;
9089if (sizeof (pid_t))
9090 return 0;
9091 ;
9092 return 0;
ccc6cda3 9093}
f73dda09
JA
9094_ACEOF
9095rm -f conftest.$ac_objext
d3a24ed2 9096if { (eval echo "$as_me:9096: \"$ac_compile\"") >&5
f73dda09
JA
9097 (eval $ac_compile) 2>&5
9098 ac_status=$?
d3a24ed2 9099 echo "$as_me:9099: \$? = $ac_status" >&5
f73dda09
JA
9100 (exit $ac_status); } &&
9101 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 9102 { (eval echo "$as_me:9102: \"$ac_try\"") >&5
f73dda09
JA
9103 (eval $ac_try) 2>&5
9104 ac_status=$?
d3a24ed2 9105 echo "$as_me:9105: \$? = $ac_status" >&5
f73dda09
JA
9106 (exit $ac_status); }; }; then
9107 ac_cv_type_pid_t=yes
ccc6cda3 9108else
f73dda09
JA
9109 echo "$as_me: failed program was:" >&5
9110cat conftest.$ac_ext >&5
9111ac_cv_type_pid_t=no
ccc6cda3 9112fi
f73dda09 9113rm -f conftest.$ac_objext conftest.$ac_ext
ccc6cda3 9114fi
d3a24ed2 9115echo "$as_me:9115: result: $ac_cv_type_pid_t" >&5
f73dda09
JA
9116echo "${ECHO_T}$ac_cv_type_pid_t" >&6
9117if test $ac_cv_type_pid_t = yes; then
9118 :
9119else
ccc6cda3 9120
f73dda09
JA
9121cat >>confdefs.h <<EOF
9122#define pid_t int
ccc6cda3 9123EOF
f73dda09 9124
ccc6cda3 9125fi
ccc6cda3 9126
d3a24ed2 9127echo "$as_me:9127: checking for size_t" >&5
f73dda09
JA
9128echo $ECHO_N "checking for size_t... $ECHO_C" >&6
9129if test "${ac_cv_type_size_t+set}" = set; then
9130 echo $ECHO_N "(cached) $ECHO_C" >&6
9131else
9132 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 9133#line 9133 "configure"
f73dda09
JA
9134#include "confdefs.h"
9135$ac_includes_default
9136int
9137main ()
9138{
9139if ((size_t *) 0)
9140 return 0;
9141if (sizeof (size_t))
9142 return 0;
9143 ;
9144 return 0;
9145}
9146_ACEOF
9147rm -f conftest.$ac_objext
d3a24ed2 9148if { (eval echo "$as_me:9148: \"$ac_compile\"") >&5
f73dda09
JA
9149 (eval $ac_compile) 2>&5
9150 ac_status=$?
d3a24ed2 9151 echo "$as_me:9151: \$? = $ac_status" >&5
f73dda09
JA
9152 (exit $ac_status); } &&
9153 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 9154 { (eval echo "$as_me:9154: \"$ac_try\"") >&5
f73dda09
JA
9155 (eval $ac_try) 2>&5
9156 ac_status=$?
d3a24ed2 9157 echo "$as_me:9157: \$? = $ac_status" >&5
f73dda09
JA
9158 (exit $ac_status); }; }; then
9159 ac_cv_type_size_t=yes
9160else
9161 echo "$as_me: failed program was:" >&5
9162cat conftest.$ac_ext >&5
9163ac_cv_type_size_t=no
ccc6cda3 9164fi
f73dda09 9165rm -f conftest.$ac_objext conftest.$ac_ext
ccc6cda3 9166fi
d3a24ed2 9167echo "$as_me:9167: result: $ac_cv_type_size_t" >&5
f73dda09
JA
9168echo "${ECHO_T}$ac_cv_type_size_t" >&6
9169if test $ac_cv_type_size_t = yes; then
9170 :
9171else
ccc6cda3 9172
f73dda09
JA
9173cat >>confdefs.h <<EOF
9174#define size_t unsigned
ccc6cda3
JA
9175EOF
9176
f73dda09 9177fi
ccc6cda3 9178
d3a24ed2 9179echo "$as_me:9179: checking for ssize_t" >&5
f73dda09
JA
9180echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
9181if test "${ac_cv_type_ssize_t+set}" = set; then
9182 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 9183else
f73dda09 9184 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 9185#line 9185 "configure"
ccc6cda3 9186#include "confdefs.h"
f73dda09
JA
9187$ac_includes_default
9188int
9189main ()
9190{
9191if ((ssize_t *) 0)
9192 return 0;
9193if (sizeof (ssize_t))
9194 return 0;
9195 ;
9196 return 0;
9197}
9198_ACEOF
9199rm -f conftest.$ac_objext
d3a24ed2 9200if { (eval echo "$as_me:9200: \"$ac_compile\"") >&5
f73dda09
JA
9201 (eval $ac_compile) 2>&5
9202 ac_status=$?
d3a24ed2 9203 echo "$as_me:9203: \$? = $ac_status" >&5
f73dda09
JA
9204 (exit $ac_status); } &&
9205 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 9206 { (eval echo "$as_me:9206: \"$ac_try\"") >&5
f73dda09
JA
9207 (eval $ac_try) 2>&5
9208 ac_status=$?
d3a24ed2 9209 echo "$as_me:9209: \$? = $ac_status" >&5
f73dda09
JA
9210 (exit $ac_status); }; }; then
9211 ac_cv_type_ssize_t=yes
9212else
9213 echo "$as_me: failed program was:" >&5
9214cat conftest.$ac_ext >&5
9215ac_cv_type_ssize_t=no
9216fi
9217rm -f conftest.$ac_objext conftest.$ac_ext
9218fi
d3a24ed2 9219echo "$as_me:9219: result: $ac_cv_type_ssize_t" >&5
f73dda09
JA
9220echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
9221if test $ac_cv_type_ssize_t = yes; then
9222 :
ccc6cda3 9223else
ccc6cda3 9224
f73dda09
JA
9225cat >>confdefs.h <<EOF
9226#define ssize_t int
ccc6cda3 9227EOF
ccc6cda3
JA
9228
9229fi
9230
d3a24ed2 9231echo "$as_me:9231: checking for time_t" >&5
f73dda09
JA
9232echo $ECHO_N "checking for time_t... $ECHO_C" >&6
9233if test "${ac_cv_type_time_t+set}" = set; then
9234 echo $ECHO_N "(cached) $ECHO_C" >&6
9235else
9236 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 9237#line 9237 "configure"
ccc6cda3 9238#include "confdefs.h"
f73dda09
JA
9239$ac_includes_default
9240int
9241main ()
9242{
9243if ((time_t *) 0)
9244 return 0;
9245if (sizeof (time_t))
9246 return 0;
9247 ;
9248 return 0;
9249}
9250_ACEOF
9251rm -f conftest.$ac_objext
d3a24ed2 9252if { (eval echo "$as_me:9252: \"$ac_compile\"") >&5
f73dda09
JA
9253 (eval $ac_compile) 2>&5
9254 ac_status=$?
d3a24ed2 9255 echo "$as_me:9255: \$? = $ac_status" >&5
f73dda09
JA
9256 (exit $ac_status); } &&
9257 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 9258 { (eval echo "$as_me:9258: \"$ac_try\"") >&5
f73dda09
JA
9259 (eval $ac_try) 2>&5
9260 ac_status=$?
d3a24ed2 9261 echo "$as_me:9261: \$? = $ac_status" >&5
f73dda09
JA
9262 (exit $ac_status); }; }; then
9263 ac_cv_type_time_t=yes
ccc6cda3 9264else
f73dda09
JA
9265 echo "$as_me: failed program was:" >&5
9266cat conftest.$ac_ext >&5
9267ac_cv_type_time_t=no
ccc6cda3 9268fi
f73dda09
JA
9269rm -f conftest.$ac_objext conftest.$ac_ext
9270fi
d3a24ed2 9271echo "$as_me:9271: result: $ac_cv_type_time_t" >&5
f73dda09
JA
9272echo "${ECHO_T}$ac_cv_type_time_t" >&6
9273if test $ac_cv_type_time_t = yes; then
9274 :
9275else
9276
9277cat >>confdefs.h <<EOF
9278#define time_t long
9279EOF
ccc6cda3
JA
9280
9281fi
9282
d3a24ed2 9283echo "$as_me:9283: checking for long long" >&5
f73dda09
JA
9284echo $ECHO_N "checking for long long... $ECHO_C" >&6
9285if test "${bash_cv_type_long_long+set}" = set; then
9286 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 9287else
f73dda09 9288 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 9289#line 9289 "configure"
ccc6cda3 9290#include "confdefs.h"
ccc6cda3 9291
f73dda09
JA
9292long long ll = 1; int i = 63;
9293int
9294main ()
9295{
9296
9297long long llm = (long long) -1;
9298return ll << i | ll >> i | llm / ll | llm % ll;
9299
9300 ;
9301 return 0;
9302}
9303_ACEOF
9304rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 9305if { (eval echo "$as_me:9305: \"$ac_link\"") >&5
f73dda09
JA
9306 (eval $ac_link) 2>&5
9307 ac_status=$?
d3a24ed2 9308 echo "$as_me:9308: \$? = $ac_status" >&5
f73dda09
JA
9309 (exit $ac_status); } &&
9310 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 9311 { (eval echo "$as_me:9311: \"$ac_try\"") >&5
f73dda09
JA
9312 (eval $ac_try) 2>&5
9313 ac_status=$?
d3a24ed2 9314 echo "$as_me:9314: \$? = $ac_status" >&5
f73dda09
JA
9315 (exit $ac_status); }; }; then
9316 bash_cv_type_long_long='long long'
ccc6cda3 9317else
f73dda09
JA
9318 echo "$as_me: failed program was:" >&5
9319cat conftest.$ac_ext >&5
9320bash_cv_type_long_long='long'
ccc6cda3 9321fi
f73dda09 9322rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ccc6cda3 9323fi
d3a24ed2 9324echo "$as_me:9324: result: $bash_cv_type_long_long" >&5
f73dda09
JA
9325echo "${ECHO_T}$bash_cv_type_long_long" >&6
9326if test "$bash_cv_type_long_long" = 'long long'; then
9327 cat >>confdefs.h <<\EOF
9328#define HAVE_LONG_LONG 1
9329EOF
ccc6cda3 9330
ccc6cda3
JA
9331fi
9332
d3a24ed2 9333echo "$as_me:9333: checking for unsigned long long" >&5
f73dda09
JA
9334echo $ECHO_N "checking for unsigned long long... $ECHO_C" >&6
9335if test "${bash_cv_type_unsigned_long_long+set}" = set; then
9336 echo $ECHO_N "(cached) $ECHO_C" >&6
9337else
9338 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 9339#line 9339 "configure"
f73dda09
JA
9340#include "confdefs.h"
9341
9342unsigned long long ull = 1; int i = 63;
9343int
9344main ()
9345{
9346
9347unsigned long long ullmax = (unsigned long long) -1;
9348return ull << i | ull >> i | ullmax / ull | ullmax % ull;
9349
9350 ;
9351 return 0;
9352}
9353_ACEOF
9354rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 9355if { (eval echo "$as_me:9355: \"$ac_link\"") >&5
f73dda09
JA
9356 (eval $ac_link) 2>&5
9357 ac_status=$?
d3a24ed2 9358 echo "$as_me:9358: \$? = $ac_status" >&5
f73dda09
JA
9359 (exit $ac_status); } &&
9360 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 9361 { (eval echo "$as_me:9361: \"$ac_try\"") >&5
f73dda09
JA
9362 (eval $ac_try) 2>&5
9363 ac_status=$?
d3a24ed2 9364 echo "$as_me:9364: \$? = $ac_status" >&5
f73dda09
JA
9365 (exit $ac_status); }; }; then
9366 bash_cv_type_unsigned_long_long='unsigned long long'
9367else
9368 echo "$as_me: failed program was:" >&5
9369cat conftest.$ac_ext >&5
9370bash_cv_type_unsigned_long_long='unsigned long'
9371fi
9372rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9373fi
d3a24ed2 9374echo "$as_me:9374: result: $bash_cv_type_unsigned_long_long" >&5
f73dda09
JA
9375echo "${ECHO_T}$bash_cv_type_unsigned_long_long" >&6
9376if test "$bash_cv_type_unsigned_long_long" = 'unsigned long long'; then
9377 cat >>confdefs.h <<\EOF
9378#define HAVE_UNSIGNED_LONG_LONG 1
ccc6cda3
JA
9379EOF
9380
9381fi
9382
d3a24ed2 9383echo "$as_me:9383: checking return type of signal handlers" >&5
f73dda09
JA
9384echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
9385if test "${ac_cv_type_signal+set}" = set; then
9386 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 9387else
f73dda09 9388 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 9389#line 9389 "configure"
ccc6cda3
JA
9390#include "confdefs.h"
9391#include <sys/types.h>
f73dda09
JA
9392#include <signal.h>
9393#ifdef signal
9394# undef signal
ccc6cda3 9395#endif
f73dda09
JA
9396#ifdef __cplusplus
9397extern "C" void (*signal (int, void (*)(int)))(int);
9398#else
9399void (*signal ()) ();
9400#endif
9401
9402int
9403main ()
9404{
9405int i;
9406 ;
9407 return 0;
9408}
9409_ACEOF
9410rm -f conftest.$ac_objext
d3a24ed2 9411if { (eval echo "$as_me:9411: \"$ac_compile\"") >&5
f73dda09
JA
9412 (eval $ac_compile) 2>&5
9413 ac_status=$?
d3a24ed2 9414 echo "$as_me:9414: \$? = $ac_status" >&5
f73dda09
JA
9415 (exit $ac_status); } &&
9416 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 9417 { (eval echo "$as_me:9417: \"$ac_try\"") >&5
f73dda09
JA
9418 (eval $ac_try) 2>&5
9419 ac_status=$?
d3a24ed2 9420 echo "$as_me:9420: \$? = $ac_status" >&5
f73dda09
JA
9421 (exit $ac_status); }; }; then
9422 ac_cv_type_signal=void
ccc6cda3 9423else
f73dda09
JA
9424 echo "$as_me: failed program was:" >&5
9425cat conftest.$ac_ext >&5
9426ac_cv_type_signal=int
ccc6cda3 9427fi
f73dda09 9428rm -f conftest.$ac_objext conftest.$ac_ext
ccc6cda3 9429fi
d3a24ed2 9430echo "$as_me:9430: result: $ac_cv_type_signal" >&5
f73dda09
JA
9431echo "${ECHO_T}$ac_cv_type_signal" >&6
9432
9433cat >>confdefs.h <<EOF
9434#define RETSIGTYPE $ac_cv_type_signal
ccc6cda3
JA
9435EOF
9436
d3a24ed2 9437echo "$as_me:9437: checking for char" >&5
f73dda09
JA
9438echo $ECHO_N "checking for char... $ECHO_C" >&6
9439if test "${ac_cv_type_char+set}" = set; then
9440 echo $ECHO_N "(cached) $ECHO_C" >&6
9441else
9442 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 9443#line 9443 "configure"
f73dda09
JA
9444#include "confdefs.h"
9445$ac_includes_default
9446int
9447main ()
9448{
9449if ((char *) 0)
9450 return 0;
9451if (sizeof (char))
9452 return 0;
9453 ;
9454 return 0;
9455}
9456_ACEOF
9457rm -f conftest.$ac_objext
d3a24ed2 9458if { (eval echo "$as_me:9458: \"$ac_compile\"") >&5
f73dda09
JA
9459 (eval $ac_compile) 2>&5
9460 ac_status=$?
d3a24ed2 9461 echo "$as_me:9461: \$? = $ac_status" >&5
f73dda09
JA
9462 (exit $ac_status); } &&
9463 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 9464 { (eval echo "$as_me:9464: \"$ac_try\"") >&5
f73dda09
JA
9465 (eval $ac_try) 2>&5
9466 ac_status=$?
d3a24ed2 9467 echo "$as_me:9467: \$? = $ac_status" >&5
f73dda09
JA
9468 (exit $ac_status); }; }; then
9469 ac_cv_type_char=yes
9470else
9471 echo "$as_me: failed program was:" >&5
9472cat conftest.$ac_ext >&5
9473ac_cv_type_char=no
9474fi
9475rm -f conftest.$ac_objext conftest.$ac_ext
9476fi
d3a24ed2 9477echo "$as_me:9477: result: $ac_cv_type_char" >&5
f73dda09
JA
9478echo "${ECHO_T}$ac_cv_type_char" >&6
9479
d3a24ed2 9480echo "$as_me:9480: checking size of char" >&5
f73dda09
JA
9481echo $ECHO_N "checking size of char... $ECHO_C" >&6
9482if test "${ac_cv_sizeof_char+set}" = set; then
9483 echo $ECHO_N "(cached) $ECHO_C" >&6
9484else
9485 if test "$ac_cv_type_char" = yes; then
9486 if test "$cross_compiling" = yes; then
9487 # Depending upon the size, compute the lo and hi bounds.
9488cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 9489#line 9489 "configure"
f73dda09
JA
9490#include "confdefs.h"
9491$ac_includes_default
9492int
9493main ()
9494{
9495int _array_ [1 - 2 * !((sizeof (char)) >= 0)]
9496 ;
9497 return 0;
9498}
9499_ACEOF
9500rm -f conftest.$ac_objext
d3a24ed2 9501if { (eval echo "$as_me:9501: \"$ac_compile\"") >&5
f73dda09
JA
9502 (eval $ac_compile) 2>&5
9503 ac_status=$?
d3a24ed2 9504 echo "$as_me:9504: \$? = $ac_status" >&5
f73dda09
JA
9505 (exit $ac_status); } &&
9506 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 9507 { (eval echo "$as_me:9507: \"$ac_try\"") >&5
f73dda09
JA
9508 (eval $ac_try) 2>&5
9509 ac_status=$?
d3a24ed2 9510 echo "$as_me:9510: \$? = $ac_status" >&5
f73dda09
JA
9511 (exit $ac_status); }; }; then
9512 ac_lo=0 ac_mid=0
9513 while :; do
9514 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 9515#line 9515 "configure"
f73dda09
JA
9516#include "confdefs.h"
9517$ac_includes_default
9518int
9519main ()
9520{
9521int _array_ [1 - 2 * !((sizeof (char)) <= $ac_mid)]
9522 ;
9523 return 0;
9524}
9525_ACEOF
9526rm -f conftest.$ac_objext
d3a24ed2 9527if { (eval echo "$as_me:9527: \"$ac_compile\"") >&5
f73dda09
JA
9528 (eval $ac_compile) 2>&5
9529 ac_status=$?
d3a24ed2 9530 echo "$as_me:9530: \$? = $ac_status" >&5
f73dda09
JA
9531 (exit $ac_status); } &&
9532 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 9533 { (eval echo "$as_me:9533: \"$ac_try\"") >&5
f73dda09
JA
9534 (eval $ac_try) 2>&5
9535 ac_status=$?
d3a24ed2 9536 echo "$as_me:9536: \$? = $ac_status" >&5
f73dda09
JA
9537 (exit $ac_status); }; }; then
9538 ac_hi=$ac_mid; break
9539else
9540 echo "$as_me: failed program was:" >&5
9541cat conftest.$ac_ext >&5
9542ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
9543fi
9544rm -f conftest.$ac_objext conftest.$ac_ext
9545 done
9546else
9547 echo "$as_me: failed program was:" >&5
9548cat conftest.$ac_ext >&5
9549ac_hi=-1 ac_mid=-1
9550 while :; do
9551 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 9552#line 9552 "configure"
f73dda09
JA
9553#include "confdefs.h"
9554$ac_includes_default
9555int
9556main ()
9557{
9558int _array_ [1 - 2 * !((sizeof (char)) >= $ac_mid)]
9559 ;
9560 return 0;
9561}
9562_ACEOF
9563rm -f conftest.$ac_objext
d3a24ed2 9564if { (eval echo "$as_me:9564: \"$ac_compile\"") >&5
f73dda09
JA
9565 (eval $ac_compile) 2>&5
9566 ac_status=$?
d3a24ed2 9567 echo "$as_me:9567: \$? = $ac_status" >&5
f73dda09
JA
9568 (exit $ac_status); } &&
9569 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 9570 { (eval echo "$as_me:9570: \"$ac_try\"") >&5
f73dda09
JA
9571 (eval $ac_try) 2>&5
9572 ac_status=$?
d3a24ed2 9573 echo "$as_me:9573: \$? = $ac_status" >&5
f73dda09
JA
9574 (exit $ac_status); }; }; then
9575 ac_lo=$ac_mid; break
9576else
9577 echo "$as_me: failed program was:" >&5
9578cat conftest.$ac_ext >&5
9579ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
9580fi
9581rm -f conftest.$ac_objext conftest.$ac_ext
9582 done
ccc6cda3 9583fi
f73dda09
JA
9584rm -f conftest.$ac_objext conftest.$ac_ext
9585# Binary search between lo and hi bounds.
9586while test "x$ac_lo" != "x$ac_hi"; do
9587 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9588 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 9589#line 9589 "configure"
f73dda09
JA
9590#include "confdefs.h"
9591$ac_includes_default
9592int
9593main ()
9594{
9595int _array_ [1 - 2 * !((sizeof (char)) <= $ac_mid)]
9596 ;
9597 return 0;
9598}
9599_ACEOF
9600rm -f conftest.$ac_objext
d3a24ed2 9601if { (eval echo "$as_me:9601: \"$ac_compile\"") >&5
f73dda09
JA
9602 (eval $ac_compile) 2>&5
9603 ac_status=$?
d3a24ed2 9604 echo "$as_me:9604: \$? = $ac_status" >&5
f73dda09
JA
9605 (exit $ac_status); } &&
9606 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 9607 { (eval echo "$as_me:9607: \"$ac_try\"") >&5
f73dda09
JA
9608 (eval $ac_try) 2>&5
9609 ac_status=$?
d3a24ed2 9610 echo "$as_me:9610: \$? = $ac_status" >&5
f73dda09
JA
9611 (exit $ac_status); }; }; then
9612 ac_hi=$ac_mid
9613else
9614 echo "$as_me: failed program was:" >&5
9615cat conftest.$ac_ext >&5
9616ac_lo=`expr $ac_mid + 1`
9617fi
9618rm -f conftest.$ac_objext conftest.$ac_ext
9619done
9620ac_cv_sizeof_char=$ac_lo
ccc6cda3 9621else
f73dda09 9622 if test "$cross_compiling" = yes; then
d3a24ed2 9623 { { echo "$as_me:9623: error: cannot run test program while cross compiling" >&5
f73dda09
JA
9624echo "$as_me: error: cannot run test program while cross compiling" >&2;}
9625 { (exit 1); exit 1; }; }
9626else
9627 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 9628#line 9628 "configure"
ccc6cda3 9629#include "confdefs.h"
f73dda09
JA
9630$ac_includes_default
9631int
9632main ()
9633{
9634FILE *f = fopen ("conftest.val", "w");
9635if (!f)
9636 exit (1);
9637fprintf (f, "%d", (sizeof (char)));
9638fclose (f);
9639 ;
9640 return 0;
9641}
9642_ACEOF
9643rm -f conftest$ac_exeext
d3a24ed2 9644if { (eval echo "$as_me:9644: \"$ac_link\"") >&5
f73dda09
JA
9645 (eval $ac_link) 2>&5
9646 ac_status=$?
d3a24ed2 9647 echo "$as_me:9647: \$? = $ac_status" >&5
f73dda09 9648 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3a24ed2 9649 { (eval echo "$as_me:9649: \"$ac_try\"") >&5
f73dda09
JA
9650 (eval $ac_try) 2>&5
9651 ac_status=$?
d3a24ed2 9652 echo "$as_me:9652: \$? = $ac_status" >&5
f73dda09
JA
9653 (exit $ac_status); }; }; then
9654 ac_cv_sizeof_char=`cat conftest.val`
ccc6cda3 9655else
f73dda09
JA
9656 echo "$as_me: program exited with status $ac_status" >&5
9657echo "$as_me: failed program was:" >&5
9658cat conftest.$ac_ext >&5
ccc6cda3 9659fi
f73dda09 9660rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ccc6cda3 9661fi
f73dda09
JA
9662fi
9663rm -f conftest.val
9664else
9665 ac_cv_sizeof_char=0
9666fi
9667fi
d3a24ed2 9668echo "$as_me:9668: result: $ac_cv_sizeof_char" >&5
f73dda09
JA
9669echo "${ECHO_T}$ac_cv_sizeof_char" >&6
9670cat >>confdefs.h <<EOF
9671#define SIZEOF_CHAR $ac_cv_sizeof_char
ccc6cda3
JA
9672EOF
9673
d3a24ed2 9674echo "$as_me:9674: checking for short" >&5
f73dda09
JA
9675echo $ECHO_N "checking for short... $ECHO_C" >&6
9676if test "${ac_cv_type_short+set}" = set; then
9677 echo $ECHO_N "(cached) $ECHO_C" >&6
9678else
9679 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 9680#line 9680 "configure"
f73dda09
JA
9681#include "confdefs.h"
9682$ac_includes_default
9683int
9684main ()
9685{
9686if ((short *) 0)
9687 return 0;
9688if (sizeof (short))
9689 return 0;
9690 ;
9691 return 0;
9692}
9693_ACEOF
9694rm -f conftest.$ac_objext
d3a24ed2 9695if { (eval echo "$as_me:9695: \"$ac_compile\"") >&5
f73dda09
JA
9696 (eval $ac_compile) 2>&5
9697 ac_status=$?
d3a24ed2 9698 echo "$as_me:9698: \$? = $ac_status" >&5
f73dda09
JA
9699 (exit $ac_status); } &&
9700 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 9701 { (eval echo "$as_me:9701: \"$ac_try\"") >&5
f73dda09
JA
9702 (eval $ac_try) 2>&5
9703 ac_status=$?
d3a24ed2 9704 echo "$as_me:9704: \$? = $ac_status" >&5
f73dda09
JA
9705 (exit $ac_status); }; }; then
9706 ac_cv_type_short=yes
9707else
9708 echo "$as_me: failed program was:" >&5
9709cat conftest.$ac_ext >&5
9710ac_cv_type_short=no
9711fi
9712rm -f conftest.$ac_objext conftest.$ac_ext
9713fi
d3a24ed2 9714echo "$as_me:9714: result: $ac_cv_type_short" >&5
f73dda09
JA
9715echo "${ECHO_T}$ac_cv_type_short" >&6
9716
d3a24ed2 9717echo "$as_me:9717: checking size of short" >&5
f73dda09
JA
9718echo $ECHO_N "checking size of short... $ECHO_C" >&6
9719if test "${ac_cv_sizeof_short+set}" = set; then
9720 echo $ECHO_N "(cached) $ECHO_C" >&6
9721else
9722 if test "$ac_cv_type_short" = yes; then
9723 if test "$cross_compiling" = yes; then
9724 # Depending upon the size, compute the lo and hi bounds.
9725cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 9726#line 9726 "configure"
f73dda09
JA
9727#include "confdefs.h"
9728$ac_includes_default
9729int
9730main ()
9731{
9732int _array_ [1 - 2 * !((sizeof (short)) >= 0)]
9733 ;
9734 return 0;
9735}
9736_ACEOF
9737rm -f conftest.$ac_objext
d3a24ed2 9738if { (eval echo "$as_me:9738: \"$ac_compile\"") >&5
f73dda09
JA
9739 (eval $ac_compile) 2>&5
9740 ac_status=$?
d3a24ed2 9741 echo "$as_me:9741: \$? = $ac_status" >&5
f73dda09
JA
9742 (exit $ac_status); } &&
9743 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 9744 { (eval echo "$as_me:9744: \"$ac_try\"") >&5
f73dda09
JA
9745 (eval $ac_try) 2>&5
9746 ac_status=$?
d3a24ed2 9747 echo "$as_me:9747: \$? = $ac_status" >&5
f73dda09
JA
9748 (exit $ac_status); }; }; then
9749 ac_lo=0 ac_mid=0
9750 while :; do
9751 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 9752#line 9752 "configure"
f73dda09
JA
9753#include "confdefs.h"
9754$ac_includes_default
9755int
9756main ()
9757{
9758int _array_ [1 - 2 * !((sizeof (short)) <= $ac_mid)]
9759 ;
9760 return 0;
9761}
9762_ACEOF
9763rm -f conftest.$ac_objext
d3a24ed2 9764if { (eval echo "$as_me:9764: \"$ac_compile\"") >&5
f73dda09
JA
9765 (eval $ac_compile) 2>&5
9766 ac_status=$?
d3a24ed2 9767 echo "$as_me:9767: \$? = $ac_status" >&5
f73dda09
JA
9768 (exit $ac_status); } &&
9769 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 9770 { (eval echo "$as_me:9770: \"$ac_try\"") >&5
f73dda09
JA
9771 (eval $ac_try) 2>&5
9772 ac_status=$?
d3a24ed2 9773 echo "$as_me:9773: \$? = $ac_status" >&5
f73dda09
JA
9774 (exit $ac_status); }; }; then
9775 ac_hi=$ac_mid; break
9776else
9777 echo "$as_me: failed program was:" >&5
9778cat conftest.$ac_ext >&5
9779ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
9780fi
9781rm -f conftest.$ac_objext conftest.$ac_ext
9782 done
9783else
9784 echo "$as_me: failed program was:" >&5
9785cat conftest.$ac_ext >&5
9786ac_hi=-1 ac_mid=-1
9787 while :; do
9788 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 9789#line 9789 "configure"
f73dda09
JA
9790#include "confdefs.h"
9791$ac_includes_default
9792int
9793main ()
9794{
9795int _array_ [1 - 2 * !((sizeof (short)) >= $ac_mid)]
9796 ;
9797 return 0;
9798}
9799_ACEOF
9800rm -f conftest.$ac_objext
d3a24ed2 9801if { (eval echo "$as_me:9801: \"$ac_compile\"") >&5
f73dda09
JA
9802 (eval $ac_compile) 2>&5
9803 ac_status=$?
d3a24ed2 9804 echo "$as_me:9804: \$? = $ac_status" >&5
f73dda09
JA
9805 (exit $ac_status); } &&
9806 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 9807 { (eval echo "$as_me:9807: \"$ac_try\"") >&5
f73dda09
JA
9808 (eval $ac_try) 2>&5
9809 ac_status=$?
d3a24ed2 9810 echo "$as_me:9810: \$? = $ac_status" >&5
f73dda09
JA
9811 (exit $ac_status); }; }; then
9812 ac_lo=$ac_mid; break
9813else
9814 echo "$as_me: failed program was:" >&5
9815cat conftest.$ac_ext >&5
9816ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
9817fi
9818rm -f conftest.$ac_objext conftest.$ac_ext
9819 done
ccc6cda3 9820fi
f73dda09
JA
9821rm -f conftest.$ac_objext conftest.$ac_ext
9822# Binary search between lo and hi bounds.
9823while test "x$ac_lo" != "x$ac_hi"; do
9824 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9825 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 9826#line 9826 "configure"
f73dda09
JA
9827#include "confdefs.h"
9828$ac_includes_default
9829int
9830main ()
9831{
9832int _array_ [1 - 2 * !((sizeof (short)) <= $ac_mid)]
9833 ;
9834 return 0;
9835}
9836_ACEOF
9837rm -f conftest.$ac_objext
d3a24ed2 9838if { (eval echo "$as_me:9838: \"$ac_compile\"") >&5
f73dda09
JA
9839 (eval $ac_compile) 2>&5
9840 ac_status=$?
d3a24ed2 9841 echo "$as_me:9841: \$? = $ac_status" >&5
f73dda09
JA
9842 (exit $ac_status); } &&
9843 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 9844 { (eval echo "$as_me:9844: \"$ac_try\"") >&5
f73dda09
JA
9845 (eval $ac_try) 2>&5
9846 ac_status=$?
d3a24ed2 9847 echo "$as_me:9847: \$? = $ac_status" >&5
f73dda09
JA
9848 (exit $ac_status); }; }; then
9849 ac_hi=$ac_mid
9850else
9851 echo "$as_me: failed program was:" >&5
9852cat conftest.$ac_ext >&5
9853ac_lo=`expr $ac_mid + 1`
9854fi
9855rm -f conftest.$ac_objext conftest.$ac_ext
9856done
9857ac_cv_sizeof_short=$ac_lo
9858else
9859 if test "$cross_compiling" = yes; then
d3a24ed2 9860 { { echo "$as_me:9860: error: cannot run test program while cross compiling" >&5
f73dda09
JA
9861echo "$as_me: error: cannot run test program while cross compiling" >&2;}
9862 { (exit 1); exit 1; }; }
ccc6cda3 9863else
f73dda09 9864 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 9865#line 9865 "configure"
ccc6cda3 9866#include "confdefs.h"
f73dda09
JA
9867$ac_includes_default
9868int
9869main ()
9870{
9871FILE *f = fopen ("conftest.val", "w");
9872if (!f)
9873 exit (1);
9874fprintf (f, "%d", (sizeof (short)));
9875fclose (f);
9876 ;
9877 return 0;
9878}
9879_ACEOF
9880rm -f conftest$ac_exeext
d3a24ed2 9881if { (eval echo "$as_me:9881: \"$ac_link\"") >&5
f73dda09
JA
9882 (eval $ac_link) 2>&5
9883 ac_status=$?
d3a24ed2 9884 echo "$as_me:9884: \$? = $ac_status" >&5
f73dda09 9885 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3a24ed2 9886 { (eval echo "$as_me:9886: \"$ac_try\"") >&5
f73dda09
JA
9887 (eval $ac_try) 2>&5
9888 ac_status=$?
d3a24ed2 9889 echo "$as_me:9889: \$? = $ac_status" >&5
f73dda09
JA
9890 (exit $ac_status); }; }; then
9891 ac_cv_sizeof_short=`cat conftest.val`
ccc6cda3 9892else
f73dda09
JA
9893 echo "$as_me: program exited with status $ac_status" >&5
9894echo "$as_me: failed program was:" >&5
9895cat conftest.$ac_ext >&5
ccc6cda3 9896fi
f73dda09 9897rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ccc6cda3 9898fi
ccc6cda3 9899fi
f73dda09 9900rm -f conftest.val
ccc6cda3 9901else
f73dda09 9902 ac_cv_sizeof_short=0
ccc6cda3 9903fi
ccc6cda3 9904fi
d3a24ed2 9905echo "$as_me:9905: result: $ac_cv_sizeof_short" >&5
f73dda09
JA
9906echo "${ECHO_T}$ac_cv_sizeof_short" >&6
9907cat >>confdefs.h <<EOF
9908#define SIZEOF_SHORT $ac_cv_sizeof_short
ccc6cda3
JA
9909EOF
9910
d3a24ed2 9911echo "$as_me:9911: checking for int" >&5
f73dda09
JA
9912echo $ECHO_N "checking for int... $ECHO_C" >&6
9913if test "${ac_cv_type_int+set}" = set; then
9914 echo $ECHO_N "(cached) $ECHO_C" >&6
9915else
9916 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 9917#line 9917 "configure"
f73dda09
JA
9918#include "confdefs.h"
9919$ac_includes_default
9920int
9921main ()
9922{
9923if ((int *) 0)
9924 return 0;
9925if (sizeof (int))
9926 return 0;
9927 ;
9928 return 0;
9929}
9930_ACEOF
9931rm -f conftest.$ac_objext
d3a24ed2 9932if { (eval echo "$as_me:9932: \"$ac_compile\"") >&5
f73dda09
JA
9933 (eval $ac_compile) 2>&5
9934 ac_status=$?
d3a24ed2 9935 echo "$as_me:9935: \$? = $ac_status" >&5
f73dda09
JA
9936 (exit $ac_status); } &&
9937 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 9938 { (eval echo "$as_me:9938: \"$ac_try\"") >&5
f73dda09
JA
9939 (eval $ac_try) 2>&5
9940 ac_status=$?
d3a24ed2 9941 echo "$as_me:9941: \$? = $ac_status" >&5
f73dda09
JA
9942 (exit $ac_status); }; }; then
9943 ac_cv_type_int=yes
9944else
9945 echo "$as_me: failed program was:" >&5
9946cat conftest.$ac_ext >&5
9947ac_cv_type_int=no
9948fi
9949rm -f conftest.$ac_objext conftest.$ac_ext
9950fi
d3a24ed2 9951echo "$as_me:9951: result: $ac_cv_type_int" >&5
f73dda09
JA
9952echo "${ECHO_T}$ac_cv_type_int" >&6
9953
d3a24ed2 9954echo "$as_me:9954: checking size of int" >&5
f73dda09
JA
9955echo $ECHO_N "checking size of int... $ECHO_C" >&6
9956if test "${ac_cv_sizeof_int+set}" = set; then
9957 echo $ECHO_N "(cached) $ECHO_C" >&6
9958else
9959 if test "$ac_cv_type_int" = yes; then
9960 if test "$cross_compiling" = yes; then
9961 # Depending upon the size, compute the lo and hi bounds.
9962cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 9963#line 9963 "configure"
f73dda09
JA
9964#include "confdefs.h"
9965$ac_includes_default
9966int
9967main ()
9968{
9969int _array_ [1 - 2 * !((sizeof (int)) >= 0)]
9970 ;
9971 return 0;
9972}
9973_ACEOF
9974rm -f conftest.$ac_objext
d3a24ed2 9975if { (eval echo "$as_me:9975: \"$ac_compile\"") >&5
f73dda09
JA
9976 (eval $ac_compile) 2>&5
9977 ac_status=$?
d3a24ed2 9978 echo "$as_me:9978: \$? = $ac_status" >&5
f73dda09
JA
9979 (exit $ac_status); } &&
9980 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 9981 { (eval echo "$as_me:9981: \"$ac_try\"") >&5
f73dda09
JA
9982 (eval $ac_try) 2>&5
9983 ac_status=$?
d3a24ed2 9984 echo "$as_me:9984: \$? = $ac_status" >&5
f73dda09
JA
9985 (exit $ac_status); }; }; then
9986 ac_lo=0 ac_mid=0
9987 while :; do
9988 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 9989#line 9989 "configure"
f73dda09
JA
9990#include "confdefs.h"
9991$ac_includes_default
9992int
9993main ()
9994{
9995int _array_ [1 - 2 * !((sizeof (int)) <= $ac_mid)]
9996 ;
9997 return 0;
9998}
9999_ACEOF
10000rm -f conftest.$ac_objext
d3a24ed2 10001if { (eval echo "$as_me:10001: \"$ac_compile\"") >&5
f73dda09
JA
10002 (eval $ac_compile) 2>&5
10003 ac_status=$?
d3a24ed2 10004 echo "$as_me:10004: \$? = $ac_status" >&5
f73dda09
JA
10005 (exit $ac_status); } &&
10006 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 10007 { (eval echo "$as_me:10007: \"$ac_try\"") >&5
f73dda09
JA
10008 (eval $ac_try) 2>&5
10009 ac_status=$?
d3a24ed2 10010 echo "$as_me:10010: \$? = $ac_status" >&5
f73dda09
JA
10011 (exit $ac_status); }; }; then
10012 ac_hi=$ac_mid; break
10013else
10014 echo "$as_me: failed program was:" >&5
10015cat conftest.$ac_ext >&5
10016ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
10017fi
10018rm -f conftest.$ac_objext conftest.$ac_ext
10019 done
10020else
10021 echo "$as_me: failed program was:" >&5
10022cat conftest.$ac_ext >&5
10023ac_hi=-1 ac_mid=-1
10024 while :; do
10025 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 10026#line 10026 "configure"
f73dda09
JA
10027#include "confdefs.h"
10028$ac_includes_default
10029int
10030main ()
10031{
10032int _array_ [1 - 2 * !((sizeof (int)) >= $ac_mid)]
10033 ;
10034 return 0;
10035}
10036_ACEOF
10037rm -f conftest.$ac_objext
d3a24ed2 10038if { (eval echo "$as_me:10038: \"$ac_compile\"") >&5
f73dda09
JA
10039 (eval $ac_compile) 2>&5
10040 ac_status=$?
d3a24ed2 10041 echo "$as_me:10041: \$? = $ac_status" >&5
f73dda09
JA
10042 (exit $ac_status); } &&
10043 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 10044 { (eval echo "$as_me:10044: \"$ac_try\"") >&5
f73dda09
JA
10045 (eval $ac_try) 2>&5
10046 ac_status=$?
d3a24ed2 10047 echo "$as_me:10047: \$? = $ac_status" >&5
f73dda09
JA
10048 (exit $ac_status); }; }; then
10049 ac_lo=$ac_mid; break
10050else
10051 echo "$as_me: failed program was:" >&5
10052cat conftest.$ac_ext >&5
10053ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
10054fi
10055rm -f conftest.$ac_objext conftest.$ac_ext
10056 done
ccc6cda3 10057fi
f73dda09
JA
10058rm -f conftest.$ac_objext conftest.$ac_ext
10059# Binary search between lo and hi bounds.
10060while test "x$ac_lo" != "x$ac_hi"; do
10061 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10062 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 10063#line 10063 "configure"
f73dda09
JA
10064#include "confdefs.h"
10065$ac_includes_default
10066int
10067main ()
10068{
10069int _array_ [1 - 2 * !((sizeof (int)) <= $ac_mid)]
10070 ;
10071 return 0;
10072}
10073_ACEOF
10074rm -f conftest.$ac_objext
d3a24ed2 10075if { (eval echo "$as_me:10075: \"$ac_compile\"") >&5
f73dda09
JA
10076 (eval $ac_compile) 2>&5
10077 ac_status=$?
d3a24ed2 10078 echo "$as_me:10078: \$? = $ac_status" >&5
f73dda09
JA
10079 (exit $ac_status); } &&
10080 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 10081 { (eval echo "$as_me:10081: \"$ac_try\"") >&5
f73dda09
JA
10082 (eval $ac_try) 2>&5
10083 ac_status=$?
d3a24ed2 10084 echo "$as_me:10084: \$? = $ac_status" >&5
f73dda09
JA
10085 (exit $ac_status); }; }; then
10086 ac_hi=$ac_mid
10087else
10088 echo "$as_me: failed program was:" >&5
10089cat conftest.$ac_ext >&5
10090ac_lo=`expr $ac_mid + 1`
10091fi
10092rm -f conftest.$ac_objext conftest.$ac_ext
10093done
10094ac_cv_sizeof_int=$ac_lo
10095else
10096 if test "$cross_compiling" = yes; then
d3a24ed2 10097 { { echo "$as_me:10097: error: cannot run test program while cross compiling" >&5
f73dda09
JA
10098echo "$as_me: error: cannot run test program while cross compiling" >&2;}
10099 { (exit 1); exit 1; }; }
ccc6cda3 10100else
f73dda09 10101 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 10102#line 10102 "configure"
ccc6cda3 10103#include "confdefs.h"
f73dda09
JA
10104$ac_includes_default
10105int
10106main ()
10107{
10108FILE *f = fopen ("conftest.val", "w");
10109if (!f)
10110 exit (1);
10111fprintf (f, "%d", (sizeof (int)));
10112fclose (f);
10113 ;
10114 return 0;
10115}
10116_ACEOF
10117rm -f conftest$ac_exeext
d3a24ed2 10118if { (eval echo "$as_me:10118: \"$ac_link\"") >&5
f73dda09
JA
10119 (eval $ac_link) 2>&5
10120 ac_status=$?
d3a24ed2 10121 echo "$as_me:10121: \$? = $ac_status" >&5
f73dda09 10122 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3a24ed2 10123 { (eval echo "$as_me:10123: \"$ac_try\"") >&5
f73dda09
JA
10124 (eval $ac_try) 2>&5
10125 ac_status=$?
d3a24ed2 10126 echo "$as_me:10126: \$? = $ac_status" >&5
f73dda09
JA
10127 (exit $ac_status); }; }; then
10128 ac_cv_sizeof_int=`cat conftest.val`
ccc6cda3 10129else
f73dda09
JA
10130 echo "$as_me: program exited with status $ac_status" >&5
10131echo "$as_me: failed program was:" >&5
10132cat conftest.$ac_ext >&5
ccc6cda3 10133fi
f73dda09 10134rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ccc6cda3 10135fi
ccc6cda3 10136fi
f73dda09 10137rm -f conftest.val
ccc6cda3 10138else
f73dda09 10139 ac_cv_sizeof_int=0
ccc6cda3 10140fi
ccc6cda3 10141fi
d3a24ed2 10142echo "$as_me:10142: result: $ac_cv_sizeof_int" >&5
f73dda09
JA
10143echo "${ECHO_T}$ac_cv_sizeof_int" >&6
10144cat >>confdefs.h <<EOF
10145#define SIZEOF_INT $ac_cv_sizeof_int
ccc6cda3
JA
10146EOF
10147
d3a24ed2 10148echo "$as_me:10148: checking for long" >&5
f73dda09
JA
10149echo $ECHO_N "checking for long... $ECHO_C" >&6
10150if test "${ac_cv_type_long+set}" = set; then
10151 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 10152else
f73dda09 10153 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 10154#line 10154 "configure"
ccc6cda3 10155#include "confdefs.h"
f73dda09
JA
10156$ac_includes_default
10157int
10158main ()
10159{
10160if ((long *) 0)
10161 return 0;
10162if (sizeof (long))
10163 return 0;
10164 ;
10165 return 0;
10166}
10167_ACEOF
10168rm -f conftest.$ac_objext
d3a24ed2 10169if { (eval echo "$as_me:10169: \"$ac_compile\"") >&5
f73dda09
JA
10170 (eval $ac_compile) 2>&5
10171 ac_status=$?
d3a24ed2 10172 echo "$as_me:10172: \$? = $ac_status" >&5
f73dda09
JA
10173 (exit $ac_status); } &&
10174 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 10175 { (eval echo "$as_me:10175: \"$ac_try\"") >&5
f73dda09
JA
10176 (eval $ac_try) 2>&5
10177 ac_status=$?
d3a24ed2 10178 echo "$as_me:10178: \$? = $ac_status" >&5
f73dda09
JA
10179 (exit $ac_status); }; }; then
10180 ac_cv_type_long=yes
10181else
10182 echo "$as_me: failed program was:" >&5
10183cat conftest.$ac_ext >&5
10184ac_cv_type_long=no
10185fi
10186rm -f conftest.$ac_objext conftest.$ac_ext
10187fi
d3a24ed2 10188echo "$as_me:10188: result: $ac_cv_type_long" >&5
f73dda09
JA
10189echo "${ECHO_T}$ac_cv_type_long" >&6
10190
d3a24ed2 10191echo "$as_me:10191: checking size of long" >&5
f73dda09
JA
10192echo $ECHO_N "checking size of long... $ECHO_C" >&6
10193if test "${ac_cv_sizeof_long+set}" = set; then
10194 echo $ECHO_N "(cached) $ECHO_C" >&6
10195else
10196 if test "$ac_cv_type_long" = yes; then
10197 if test "$cross_compiling" = yes; then
10198 # Depending upon the size, compute the lo and hi bounds.
10199cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 10200#line 10200 "configure"
f73dda09
JA
10201#include "confdefs.h"
10202$ac_includes_default
10203int
10204main ()
10205{
10206int _array_ [1 - 2 * !((sizeof (long)) >= 0)]
10207 ;
10208 return 0;
10209}
10210_ACEOF
10211rm -f conftest.$ac_objext
d3a24ed2 10212if { (eval echo "$as_me:10212: \"$ac_compile\"") >&5
f73dda09
JA
10213 (eval $ac_compile) 2>&5
10214 ac_status=$?
d3a24ed2 10215 echo "$as_me:10215: \$? = $ac_status" >&5
f73dda09
JA
10216 (exit $ac_status); } &&
10217 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 10218 { (eval echo "$as_me:10218: \"$ac_try\"") >&5
f73dda09
JA
10219 (eval $ac_try) 2>&5
10220 ac_status=$?
d3a24ed2 10221 echo "$as_me:10221: \$? = $ac_status" >&5
f73dda09
JA
10222 (exit $ac_status); }; }; then
10223 ac_lo=0 ac_mid=0
10224 while :; do
10225 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 10226#line 10226 "configure"
f73dda09
JA
10227#include "confdefs.h"
10228$ac_includes_default
10229int
10230main ()
10231{
10232int _array_ [1 - 2 * !((sizeof (long)) <= $ac_mid)]
10233 ;
10234 return 0;
10235}
10236_ACEOF
10237rm -f conftest.$ac_objext
d3a24ed2 10238if { (eval echo "$as_me:10238: \"$ac_compile\"") >&5
f73dda09
JA
10239 (eval $ac_compile) 2>&5
10240 ac_status=$?
d3a24ed2 10241 echo "$as_me:10241: \$? = $ac_status" >&5
f73dda09
JA
10242 (exit $ac_status); } &&
10243 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 10244 { (eval echo "$as_me:10244: \"$ac_try\"") >&5
f73dda09
JA
10245 (eval $ac_try) 2>&5
10246 ac_status=$?
d3a24ed2 10247 echo "$as_me:10247: \$? = $ac_status" >&5
f73dda09
JA
10248 (exit $ac_status); }; }; then
10249 ac_hi=$ac_mid; break
10250else
10251 echo "$as_me: failed program was:" >&5
10252cat conftest.$ac_ext >&5
10253ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
10254fi
10255rm -f conftest.$ac_objext conftest.$ac_ext
10256 done
ccc6cda3 10257else
f73dda09
JA
10258 echo "$as_me: failed program was:" >&5
10259cat conftest.$ac_ext >&5
10260ac_hi=-1 ac_mid=-1
10261 while :; do
10262 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 10263#line 10263 "configure"
f73dda09
JA
10264#include "confdefs.h"
10265$ac_includes_default
10266int
10267main ()
10268{
10269int _array_ [1 - 2 * !((sizeof (long)) >= $ac_mid)]
10270 ;
10271 return 0;
10272}
10273_ACEOF
10274rm -f conftest.$ac_objext
d3a24ed2 10275if { (eval echo "$as_me:10275: \"$ac_compile\"") >&5
f73dda09
JA
10276 (eval $ac_compile) 2>&5
10277 ac_status=$?
d3a24ed2 10278 echo "$as_me:10278: \$? = $ac_status" >&5
f73dda09
JA
10279 (exit $ac_status); } &&
10280 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 10281 { (eval echo "$as_me:10281: \"$ac_try\"") >&5
f73dda09
JA
10282 (eval $ac_try) 2>&5
10283 ac_status=$?
d3a24ed2 10284 echo "$as_me:10284: \$? = $ac_status" >&5
f73dda09
JA
10285 (exit $ac_status); }; }; then
10286 ac_lo=$ac_mid; break
10287else
10288 echo "$as_me: failed program was:" >&5
10289cat conftest.$ac_ext >&5
10290ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
10291fi
10292rm -f conftest.$ac_objext conftest.$ac_ext
10293 done
ccc6cda3 10294fi
f73dda09
JA
10295rm -f conftest.$ac_objext conftest.$ac_ext
10296# Binary search between lo and hi bounds.
10297while test "x$ac_lo" != "x$ac_hi"; do
10298 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10299 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 10300#line 10300 "configure"
f73dda09
JA
10301#include "confdefs.h"
10302$ac_includes_default
10303int
10304main ()
10305{
10306int _array_ [1 - 2 * !((sizeof (long)) <= $ac_mid)]
10307 ;
10308 return 0;
10309}
10310_ACEOF
10311rm -f conftest.$ac_objext
d3a24ed2 10312if { (eval echo "$as_me:10312: \"$ac_compile\"") >&5
f73dda09
JA
10313 (eval $ac_compile) 2>&5
10314 ac_status=$?
d3a24ed2 10315 echo "$as_me:10315: \$? = $ac_status" >&5
f73dda09
JA
10316 (exit $ac_status); } &&
10317 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 10318 { (eval echo "$as_me:10318: \"$ac_try\"") >&5
f73dda09
JA
10319 (eval $ac_try) 2>&5
10320 ac_status=$?
d3a24ed2 10321 echo "$as_me:10321: \$? = $ac_status" >&5
f73dda09
JA
10322 (exit $ac_status); }; }; then
10323 ac_hi=$ac_mid
10324else
10325 echo "$as_me: failed program was:" >&5
10326cat conftest.$ac_ext >&5
10327ac_lo=`expr $ac_mid + 1`
10328fi
10329rm -f conftest.$ac_objext conftest.$ac_ext
10330done
10331ac_cv_sizeof_long=$ac_lo
bb70624e
JA
10332else
10333 if test "$cross_compiling" = yes; then
d3a24ed2 10334 { { echo "$as_me:10334: error: cannot run test program while cross compiling" >&5
f73dda09
JA
10335echo "$as_me: error: cannot run test program while cross compiling" >&2;}
10336 { (exit 1); exit 1; }; }
bb70624e 10337else
f73dda09 10338 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 10339#line 10339 "configure"
bb70624e 10340#include "confdefs.h"
f73dda09
JA
10341$ac_includes_default
10342int
10343main ()
bb70624e 10344{
f73dda09
JA
10345FILE *f = fopen ("conftest.val", "w");
10346if (!f)
10347 exit (1);
10348fprintf (f, "%d", (sizeof (long)));
10349fclose (f);
10350 ;
10351 return 0;
bb70624e 10352}
f73dda09
JA
10353_ACEOF
10354rm -f conftest$ac_exeext
d3a24ed2 10355if { (eval echo "$as_me:10355: \"$ac_link\"") >&5
f73dda09
JA
10356 (eval $ac_link) 2>&5
10357 ac_status=$?
d3a24ed2 10358 echo "$as_me:10358: \$? = $ac_status" >&5
f73dda09 10359 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3a24ed2 10360 { (eval echo "$as_me:10360: \"$ac_try\"") >&5
f73dda09
JA
10361 (eval $ac_try) 2>&5
10362 ac_status=$?
d3a24ed2 10363 echo "$as_me:10363: \$? = $ac_status" >&5
f73dda09
JA
10364 (exit $ac_status); }; }; then
10365 ac_cv_sizeof_long=`cat conftest.val`
bb70624e 10366else
f73dda09
JA
10367 echo "$as_me: program exited with status $ac_status" >&5
10368echo "$as_me: failed program was:" >&5
10369cat conftest.$ac_ext >&5
bb70624e 10370fi
f73dda09 10371rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bb70624e 10372fi
bb70624e 10373fi
f73dda09
JA
10374rm -f conftest.val
10375else
10376 ac_cv_sizeof_long=0
10377fi
10378fi
d3a24ed2 10379echo "$as_me:10379: result: $ac_cv_sizeof_long" >&5
f73dda09
JA
10380echo "${ECHO_T}$ac_cv_sizeof_long" >&6
10381cat >>confdefs.h <<EOF
10382#define SIZEOF_LONG $ac_cv_sizeof_long
bb70624e
JA
10383EOF
10384
d3a24ed2 10385echo "$as_me:10385: checking for char *" >&5
f73dda09
JA
10386echo $ECHO_N "checking for char *... $ECHO_C" >&6
10387if test "${ac_cv_type_char_p+set}" = set; then
10388 echo $ECHO_N "(cached) $ECHO_C" >&6
10389else
10390 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 10391#line 10391 "configure"
f73dda09
JA
10392#include "confdefs.h"
10393$ac_includes_default
10394int
10395main ()
10396{
10397if ((char * *) 0)
10398 return 0;
10399if (sizeof (char *))
10400 return 0;
10401 ;
10402 return 0;
10403}
10404_ACEOF
10405rm -f conftest.$ac_objext
d3a24ed2 10406if { (eval echo "$as_me:10406: \"$ac_compile\"") >&5
f73dda09
JA
10407 (eval $ac_compile) 2>&5
10408 ac_status=$?
d3a24ed2 10409 echo "$as_me:10409: \$? = $ac_status" >&5
f73dda09
JA
10410 (exit $ac_status); } &&
10411 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 10412 { (eval echo "$as_me:10412: \"$ac_try\"") >&5
f73dda09
JA
10413 (eval $ac_try) 2>&5
10414 ac_status=$?
d3a24ed2 10415 echo "$as_me:10415: \$? = $ac_status" >&5
f73dda09
JA
10416 (exit $ac_status); }; }; then
10417 ac_cv_type_char_p=yes
10418else
10419 echo "$as_me: failed program was:" >&5
10420cat conftest.$ac_ext >&5
10421ac_cv_type_char_p=no
10422fi
10423rm -f conftest.$ac_objext conftest.$ac_ext
10424fi
d3a24ed2 10425echo "$as_me:10425: result: $ac_cv_type_char_p" >&5
f73dda09
JA
10426echo "${ECHO_T}$ac_cv_type_char_p" >&6
10427
d3a24ed2 10428echo "$as_me:10428: checking size of char *" >&5
f73dda09
JA
10429echo $ECHO_N "checking size of char *... $ECHO_C" >&6
10430if test "${ac_cv_sizeof_char_p+set}" = set; then
10431 echo $ECHO_N "(cached) $ECHO_C" >&6
10432else
10433 if test "$ac_cv_type_char_p" = yes; then
10434 if test "$cross_compiling" = yes; then
10435 # Depending upon the size, compute the lo and hi bounds.
10436cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 10437#line 10437 "configure"
f73dda09
JA
10438#include "confdefs.h"
10439$ac_includes_default
10440int
10441main ()
10442{
10443int _array_ [1 - 2 * !((sizeof (char *)) >= 0)]
10444 ;
10445 return 0;
10446}
10447_ACEOF
10448rm -f conftest.$ac_objext
d3a24ed2 10449if { (eval echo "$as_me:10449: \"$ac_compile\"") >&5
f73dda09
JA
10450 (eval $ac_compile) 2>&5
10451 ac_status=$?
d3a24ed2 10452 echo "$as_me:10452: \$? = $ac_status" >&5
f73dda09
JA
10453 (exit $ac_status); } &&
10454 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 10455 { (eval echo "$as_me:10455: \"$ac_try\"") >&5
f73dda09
JA
10456 (eval $ac_try) 2>&5
10457 ac_status=$?
d3a24ed2 10458 echo "$as_me:10458: \$? = $ac_status" >&5
f73dda09
JA
10459 (exit $ac_status); }; }; then
10460 ac_lo=0 ac_mid=0
10461 while :; do
10462 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 10463#line 10463 "configure"
f73dda09
JA
10464#include "confdefs.h"
10465$ac_includes_default
10466int
10467main ()
10468{
10469int _array_ [1 - 2 * !((sizeof (char *)) <= $ac_mid)]
10470 ;
10471 return 0;
10472}
10473_ACEOF
10474rm -f conftest.$ac_objext
d3a24ed2 10475if { (eval echo "$as_me:10475: \"$ac_compile\"") >&5
f73dda09
JA
10476 (eval $ac_compile) 2>&5
10477 ac_status=$?
d3a24ed2 10478 echo "$as_me:10478: \$? = $ac_status" >&5
f73dda09
JA
10479 (exit $ac_status); } &&
10480 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 10481 { (eval echo "$as_me:10481: \"$ac_try\"") >&5
f73dda09
JA
10482 (eval $ac_try) 2>&5
10483 ac_status=$?
d3a24ed2 10484 echo "$as_me:10484: \$? = $ac_status" >&5
f73dda09
JA
10485 (exit $ac_status); }; }; then
10486 ac_hi=$ac_mid; break
10487else
10488 echo "$as_me: failed program was:" >&5
10489cat conftest.$ac_ext >&5
10490ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
10491fi
10492rm -f conftest.$ac_objext conftest.$ac_ext
10493 done
10494else
10495 echo "$as_me: failed program was:" >&5
10496cat conftest.$ac_ext >&5
10497ac_hi=-1 ac_mid=-1
10498 while :; do
10499 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 10500#line 10500 "configure"
f73dda09
JA
10501#include "confdefs.h"
10502$ac_includes_default
10503int
10504main ()
10505{
10506int _array_ [1 - 2 * !((sizeof (char *)) >= $ac_mid)]
10507 ;
10508 return 0;
10509}
10510_ACEOF
10511rm -f conftest.$ac_objext
d3a24ed2 10512if { (eval echo "$as_me:10512: \"$ac_compile\"") >&5
f73dda09
JA
10513 (eval $ac_compile) 2>&5
10514 ac_status=$?
d3a24ed2 10515 echo "$as_me:10515: \$? = $ac_status" >&5
f73dda09
JA
10516 (exit $ac_status); } &&
10517 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 10518 { (eval echo "$as_me:10518: \"$ac_try\"") >&5
f73dda09
JA
10519 (eval $ac_try) 2>&5
10520 ac_status=$?
d3a24ed2 10521 echo "$as_me:10521: \$? = $ac_status" >&5
f73dda09
JA
10522 (exit $ac_status); }; }; then
10523 ac_lo=$ac_mid; break
10524else
10525 echo "$as_me: failed program was:" >&5
10526cat conftest.$ac_ext >&5
10527ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
10528fi
10529rm -f conftest.$ac_objext conftest.$ac_ext
10530 done
10531fi
10532rm -f conftest.$ac_objext conftest.$ac_ext
10533# Binary search between lo and hi bounds.
10534while test "x$ac_lo" != "x$ac_hi"; do
10535 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10536 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 10537#line 10537 "configure"
f73dda09
JA
10538#include "confdefs.h"
10539$ac_includes_default
10540int
10541main ()
10542{
10543int _array_ [1 - 2 * !((sizeof (char *)) <= $ac_mid)]
10544 ;
10545 return 0;
10546}
10547_ACEOF
10548rm -f conftest.$ac_objext
d3a24ed2 10549if { (eval echo "$as_me:10549: \"$ac_compile\"") >&5
f73dda09
JA
10550 (eval $ac_compile) 2>&5
10551 ac_status=$?
d3a24ed2 10552 echo "$as_me:10552: \$? = $ac_status" >&5
f73dda09
JA
10553 (exit $ac_status); } &&
10554 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 10555 { (eval echo "$as_me:10555: \"$ac_try\"") >&5
f73dda09
JA
10556 (eval $ac_try) 2>&5
10557 ac_status=$?
d3a24ed2 10558 echo "$as_me:10558: \$? = $ac_status" >&5
f73dda09
JA
10559 (exit $ac_status); }; }; then
10560 ac_hi=$ac_mid
10561else
10562 echo "$as_me: failed program was:" >&5
10563cat conftest.$ac_ext >&5
10564ac_lo=`expr $ac_mid + 1`
10565fi
10566rm -f conftest.$ac_objext conftest.$ac_ext
10567done
10568ac_cv_sizeof_char_p=$ac_lo
bb70624e
JA
10569else
10570 if test "$cross_compiling" = yes; then
d3a24ed2 10571 { { echo "$as_me:10571: error: cannot run test program while cross compiling" >&5
f73dda09
JA
10572echo "$as_me: error: cannot run test program while cross compiling" >&2;}
10573 { (exit 1); exit 1; }; }
bb70624e 10574else
f73dda09 10575 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 10576#line 10576 "configure"
bb70624e 10577#include "confdefs.h"
f73dda09
JA
10578$ac_includes_default
10579int
10580main ()
bb70624e 10581{
f73dda09
JA
10582FILE *f = fopen ("conftest.val", "w");
10583if (!f)
10584 exit (1);
10585fprintf (f, "%d", (sizeof (char *)));
10586fclose (f);
10587 ;
10588 return 0;
bb70624e 10589}
f73dda09
JA
10590_ACEOF
10591rm -f conftest$ac_exeext
d3a24ed2 10592if { (eval echo "$as_me:10592: \"$ac_link\"") >&5
f73dda09
JA
10593 (eval $ac_link) 2>&5
10594 ac_status=$?
d3a24ed2 10595 echo "$as_me:10595: \$? = $ac_status" >&5
f73dda09 10596 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3a24ed2 10597 { (eval echo "$as_me:10597: \"$ac_try\"") >&5
f73dda09
JA
10598 (eval $ac_try) 2>&5
10599 ac_status=$?
d3a24ed2 10600 echo "$as_me:10600: \$? = $ac_status" >&5
f73dda09
JA
10601 (exit $ac_status); }; }; then
10602 ac_cv_sizeof_char_p=`cat conftest.val`
bb70624e 10603else
f73dda09
JA
10604 echo "$as_me: program exited with status $ac_status" >&5
10605echo "$as_me: failed program was:" >&5
10606cat conftest.$ac_ext >&5
bb70624e 10607fi
f73dda09 10608rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bb70624e 10609fi
bb70624e 10610fi
f73dda09
JA
10611rm -f conftest.val
10612else
10613 ac_cv_sizeof_char_p=0
10614fi
10615fi
d3a24ed2 10616echo "$as_me:10616: result: $ac_cv_sizeof_char_p" >&5
f73dda09
JA
10617echo "${ECHO_T}$ac_cv_sizeof_char_p" >&6
10618cat >>confdefs.h <<EOF
10619#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p
bb70624e
JA
10620EOF
10621
d3a24ed2 10622echo "$as_me:10622: checking for double" >&5
f73dda09
JA
10623echo $ECHO_N "checking for double... $ECHO_C" >&6
10624if test "${ac_cv_type_double+set}" = set; then
10625 echo $ECHO_N "(cached) $ECHO_C" >&6
cce855bc 10626else
f73dda09 10627 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 10628#line 10628 "configure"
f73dda09
JA
10629#include "confdefs.h"
10630$ac_includes_default
10631int
10632main ()
10633{
10634if ((double *) 0)
10635 return 0;
10636if (sizeof (double))
10637 return 0;
10638 ;
10639 return 0;
10640}
10641_ACEOF
10642rm -f conftest.$ac_objext
d3a24ed2 10643if { (eval echo "$as_me:10643: \"$ac_compile\"") >&5
f73dda09
JA
10644 (eval $ac_compile) 2>&5
10645 ac_status=$?
d3a24ed2 10646 echo "$as_me:10646: \$? = $ac_status" >&5
f73dda09
JA
10647 (exit $ac_status); } &&
10648 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 10649 { (eval echo "$as_me:10649: \"$ac_try\"") >&5
f73dda09
JA
10650 (eval $ac_try) 2>&5
10651 ac_status=$?
d3a24ed2 10652 echo "$as_me:10652: \$? = $ac_status" >&5
f73dda09
JA
10653 (exit $ac_status); }; }; then
10654 ac_cv_type_double=yes
10655else
10656 echo "$as_me: failed program was:" >&5
10657cat conftest.$ac_ext >&5
10658ac_cv_type_double=no
10659fi
10660rm -f conftest.$ac_objext conftest.$ac_ext
10661fi
d3a24ed2 10662echo "$as_me:10662: result: $ac_cv_type_double" >&5
f73dda09
JA
10663echo "${ECHO_T}$ac_cv_type_double" >&6
10664
d3a24ed2 10665echo "$as_me:10665: checking size of double" >&5
f73dda09
JA
10666echo $ECHO_N "checking size of double... $ECHO_C" >&6
10667if test "${ac_cv_sizeof_double+set}" = set; then
10668 echo $ECHO_N "(cached) $ECHO_C" >&6
10669else
10670 if test "$ac_cv_type_double" = yes; then
cce855bc 10671 if test "$cross_compiling" = yes; then
f73dda09
JA
10672 # Depending upon the size, compute the lo and hi bounds.
10673cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 10674#line 10674 "configure"
cce855bc 10675#include "confdefs.h"
f73dda09
JA
10676$ac_includes_default
10677int
10678main ()
cce855bc 10679{
f73dda09
JA
10680int _array_ [1 - 2 * !((sizeof (double)) >= 0)]
10681 ;
10682 return 0;
cce855bc 10683}
f73dda09
JA
10684_ACEOF
10685rm -f conftest.$ac_objext
d3a24ed2 10686if { (eval echo "$as_me:10686: \"$ac_compile\"") >&5
f73dda09
JA
10687 (eval $ac_compile) 2>&5
10688 ac_status=$?
d3a24ed2 10689 echo "$as_me:10689: \$? = $ac_status" >&5
f73dda09
JA
10690 (exit $ac_status); } &&
10691 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 10692 { (eval echo "$as_me:10692: \"$ac_try\"") >&5
f73dda09
JA
10693 (eval $ac_try) 2>&5
10694 ac_status=$?
d3a24ed2 10695 echo "$as_me:10695: \$? = $ac_status" >&5
f73dda09
JA
10696 (exit $ac_status); }; }; then
10697 ac_lo=0 ac_mid=0
10698 while :; do
10699 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 10700#line 10700 "configure"
f73dda09
JA
10701#include "confdefs.h"
10702$ac_includes_default
10703int
10704main ()
10705{
10706int _array_ [1 - 2 * !((sizeof (double)) <= $ac_mid)]
10707 ;
10708 return 0;
10709}
10710_ACEOF
10711rm -f conftest.$ac_objext
d3a24ed2 10712if { (eval echo "$as_me:10712: \"$ac_compile\"") >&5
f73dda09
JA
10713 (eval $ac_compile) 2>&5
10714 ac_status=$?
d3a24ed2 10715 echo "$as_me:10715: \$? = $ac_status" >&5
f73dda09
JA
10716 (exit $ac_status); } &&
10717 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 10718 { (eval echo "$as_me:10718: \"$ac_try\"") >&5
f73dda09
JA
10719 (eval $ac_try) 2>&5
10720 ac_status=$?
d3a24ed2 10721 echo "$as_me:10721: \$? = $ac_status" >&5
f73dda09
JA
10722 (exit $ac_status); }; }; then
10723 ac_hi=$ac_mid; break
10724else
10725 echo "$as_me: failed program was:" >&5
10726cat conftest.$ac_ext >&5
10727ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
10728fi
10729rm -f conftest.$ac_objext conftest.$ac_ext
10730 done
cce855bc 10731else
f73dda09
JA
10732 echo "$as_me: failed program was:" >&5
10733cat conftest.$ac_ext >&5
10734ac_hi=-1 ac_mid=-1
10735 while :; do
10736 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 10737#line 10737 "configure"
f73dda09
JA
10738#include "confdefs.h"
10739$ac_includes_default
10740int
10741main ()
10742{
10743int _array_ [1 - 2 * !((sizeof (double)) >= $ac_mid)]
10744 ;
10745 return 0;
10746}
10747_ACEOF
10748rm -f conftest.$ac_objext
d3a24ed2 10749if { (eval echo "$as_me:10749: \"$ac_compile\"") >&5
f73dda09
JA
10750 (eval $ac_compile) 2>&5
10751 ac_status=$?
d3a24ed2 10752 echo "$as_me:10752: \$? = $ac_status" >&5
f73dda09
JA
10753 (exit $ac_status); } &&
10754 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 10755 { (eval echo "$as_me:10755: \"$ac_try\"") >&5
f73dda09
JA
10756 (eval $ac_try) 2>&5
10757 ac_status=$?
d3a24ed2 10758 echo "$as_me:10758: \$? = $ac_status" >&5
f73dda09
JA
10759 (exit $ac_status); }; }; then
10760 ac_lo=$ac_mid; break
10761else
10762 echo "$as_me: failed program was:" >&5
10763cat conftest.$ac_ext >&5
10764ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
10765fi
10766rm -f conftest.$ac_objext conftest.$ac_ext
10767 done
cce855bc 10768fi
f73dda09
JA
10769rm -f conftest.$ac_objext conftest.$ac_ext
10770# Binary search between lo and hi bounds.
10771while test "x$ac_lo" != "x$ac_hi"; do
10772 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10773 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 10774#line 10774 "configure"
f73dda09
JA
10775#include "confdefs.h"
10776$ac_includes_default
10777int
10778main ()
10779{
10780int _array_ [1 - 2 * !((sizeof (double)) <= $ac_mid)]
10781 ;
10782 return 0;
10783}
10784_ACEOF
10785rm -f conftest.$ac_objext
d3a24ed2 10786if { (eval echo "$as_me:10786: \"$ac_compile\"") >&5
f73dda09
JA
10787 (eval $ac_compile) 2>&5
10788 ac_status=$?
d3a24ed2 10789 echo "$as_me:10789: \$? = $ac_status" >&5
f73dda09
JA
10790 (exit $ac_status); } &&
10791 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 10792 { (eval echo "$as_me:10792: \"$ac_try\"") >&5
f73dda09
JA
10793 (eval $ac_try) 2>&5
10794 ac_status=$?
d3a24ed2 10795 echo "$as_me:10795: \$? = $ac_status" >&5
f73dda09
JA
10796 (exit $ac_status); }; }; then
10797 ac_hi=$ac_mid
10798else
10799 echo "$as_me: failed program was:" >&5
10800cat conftest.$ac_ext >&5
10801ac_lo=`expr $ac_mid + 1`
10802fi
10803rm -f conftest.$ac_objext conftest.$ac_ext
10804done
10805ac_cv_sizeof_double=$ac_lo
cce855bc
JA
10806else
10807 if test "$cross_compiling" = yes; then
d3a24ed2 10808 { { echo "$as_me:10808: error: cannot run test program while cross compiling" >&5
f73dda09
JA
10809echo "$as_me: error: cannot run test program while cross compiling" >&2;}
10810 { (exit 1); exit 1; }; }
cce855bc 10811else
f73dda09 10812 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 10813#line 10813 "configure"
cce855bc 10814#include "confdefs.h"
f73dda09
JA
10815$ac_includes_default
10816int
10817main ()
cce855bc 10818{
f73dda09
JA
10819FILE *f = fopen ("conftest.val", "w");
10820if (!f)
10821 exit (1);
10822fprintf (f, "%d", (sizeof (double)));
10823fclose (f);
10824 ;
10825 return 0;
cce855bc 10826}
f73dda09
JA
10827_ACEOF
10828rm -f conftest$ac_exeext
d3a24ed2 10829if { (eval echo "$as_me:10829: \"$ac_link\"") >&5
f73dda09
JA
10830 (eval $ac_link) 2>&5
10831 ac_status=$?
d3a24ed2 10832 echo "$as_me:10832: \$? = $ac_status" >&5
f73dda09 10833 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3a24ed2 10834 { (eval echo "$as_me:10834: \"$ac_try\"") >&5
f73dda09
JA
10835 (eval $ac_try) 2>&5
10836 ac_status=$?
d3a24ed2 10837 echo "$as_me:10837: \$? = $ac_status" >&5
f73dda09
JA
10838 (exit $ac_status); }; }; then
10839 ac_cv_sizeof_double=`cat conftest.val`
cce855bc 10840else
f73dda09
JA
10841 echo "$as_me: program exited with status $ac_status" >&5
10842echo "$as_me: failed program was:" >&5
10843cat conftest.$ac_ext >&5
cce855bc 10844fi
f73dda09 10845rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
cce855bc 10846fi
cce855bc 10847fi
f73dda09
JA
10848rm -f conftest.val
10849else
10850 ac_cv_sizeof_double=0
10851fi
10852fi
d3a24ed2 10853echo "$as_me:10853: result: $ac_cv_sizeof_double" >&5
f73dda09
JA
10854echo "${ECHO_T}$ac_cv_sizeof_double" >&6
10855cat >>confdefs.h <<EOF
10856#define SIZEOF_DOUBLE $ac_cv_sizeof_double
cce855bc
JA
10857EOF
10858
d3a24ed2 10859echo "$as_me:10859: checking for long long" >&5
f73dda09
JA
10860echo $ECHO_N "checking for long long... $ECHO_C" >&6
10861if test "${ac_cv_type_long_long+set}" = set; then
10862 echo $ECHO_N "(cached) $ECHO_C" >&6
cce855bc 10863else
f73dda09 10864 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 10865#line 10865 "configure"
f73dda09
JA
10866#include "confdefs.h"
10867$ac_includes_default
10868int
10869main ()
10870{
10871if ((long long *) 0)
10872 return 0;
10873if (sizeof (long long))
10874 return 0;
10875 ;
10876 return 0;
10877}
10878_ACEOF
10879rm -f conftest.$ac_objext
d3a24ed2 10880if { (eval echo "$as_me:10880: \"$ac_compile\"") >&5
f73dda09
JA
10881 (eval $ac_compile) 2>&5
10882 ac_status=$?
d3a24ed2 10883 echo "$as_me:10883: \$? = $ac_status" >&5
f73dda09
JA
10884 (exit $ac_status); } &&
10885 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 10886 { (eval echo "$as_me:10886: \"$ac_try\"") >&5
f73dda09
JA
10887 (eval $ac_try) 2>&5
10888 ac_status=$?
d3a24ed2 10889 echo "$as_me:10889: \$? = $ac_status" >&5
f73dda09
JA
10890 (exit $ac_status); }; }; then
10891 ac_cv_type_long_long=yes
10892else
10893 echo "$as_me: failed program was:" >&5
10894cat conftest.$ac_ext >&5
10895ac_cv_type_long_long=no
10896fi
10897rm -f conftest.$ac_objext conftest.$ac_ext
10898fi
d3a24ed2 10899echo "$as_me:10899: result: $ac_cv_type_long_long" >&5
f73dda09
JA
10900echo "${ECHO_T}$ac_cv_type_long_long" >&6
10901
d3a24ed2 10902echo "$as_me:10902: checking size of long long" >&5
f73dda09
JA
10903echo $ECHO_N "checking size of long long... $ECHO_C" >&6
10904if test "${ac_cv_sizeof_long_long+set}" = set; then
10905 echo $ECHO_N "(cached) $ECHO_C" >&6
10906else
10907 if test "$ac_cv_type_long_long" = yes; then
cce855bc 10908 if test "$cross_compiling" = yes; then
f73dda09
JA
10909 # Depending upon the size, compute the lo and hi bounds.
10910cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 10911#line 10911 "configure"
cce855bc 10912#include "confdefs.h"
f73dda09
JA
10913$ac_includes_default
10914int
10915main ()
cce855bc 10916{
f73dda09
JA
10917int _array_ [1 - 2 * !((sizeof (long long)) >= 0)]
10918 ;
10919 return 0;
cce855bc 10920}
f73dda09
JA
10921_ACEOF
10922rm -f conftest.$ac_objext
d3a24ed2 10923if { (eval echo "$as_me:10923: \"$ac_compile\"") >&5
f73dda09
JA
10924 (eval $ac_compile) 2>&5
10925 ac_status=$?
d3a24ed2 10926 echo "$as_me:10926: \$? = $ac_status" >&5
f73dda09
JA
10927 (exit $ac_status); } &&
10928 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 10929 { (eval echo "$as_me:10929: \"$ac_try\"") >&5
f73dda09
JA
10930 (eval $ac_try) 2>&5
10931 ac_status=$?
d3a24ed2 10932 echo "$as_me:10932: \$? = $ac_status" >&5
f73dda09
JA
10933 (exit $ac_status); }; }; then
10934 ac_lo=0 ac_mid=0
10935 while :; do
10936 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 10937#line 10937 "configure"
f73dda09
JA
10938#include "confdefs.h"
10939$ac_includes_default
10940int
10941main ()
10942{
10943int _array_ [1 - 2 * !((sizeof (long long)) <= $ac_mid)]
10944 ;
10945 return 0;
10946}
10947_ACEOF
10948rm -f conftest.$ac_objext
d3a24ed2 10949if { (eval echo "$as_me:10949: \"$ac_compile\"") >&5
f73dda09
JA
10950 (eval $ac_compile) 2>&5
10951 ac_status=$?
d3a24ed2 10952 echo "$as_me:10952: \$? = $ac_status" >&5
f73dda09
JA
10953 (exit $ac_status); } &&
10954 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 10955 { (eval echo "$as_me:10955: \"$ac_try\"") >&5
f73dda09
JA
10956 (eval $ac_try) 2>&5
10957 ac_status=$?
d3a24ed2 10958 echo "$as_me:10958: \$? = $ac_status" >&5
f73dda09
JA
10959 (exit $ac_status); }; }; then
10960 ac_hi=$ac_mid; break
10961else
10962 echo "$as_me: failed program was:" >&5
10963cat conftest.$ac_ext >&5
10964ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
10965fi
10966rm -f conftest.$ac_objext conftest.$ac_ext
10967 done
cce855bc 10968else
f73dda09
JA
10969 echo "$as_me: failed program was:" >&5
10970cat conftest.$ac_ext >&5
10971ac_hi=-1 ac_mid=-1
10972 while :; do
10973 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 10974#line 10974 "configure"
f73dda09
JA
10975#include "confdefs.h"
10976$ac_includes_default
10977int
10978main ()
10979{
10980int _array_ [1 - 2 * !((sizeof (long long)) >= $ac_mid)]
10981 ;
10982 return 0;
10983}
10984_ACEOF
10985rm -f conftest.$ac_objext
d3a24ed2 10986if { (eval echo "$as_me:10986: \"$ac_compile\"") >&5
f73dda09
JA
10987 (eval $ac_compile) 2>&5
10988 ac_status=$?
d3a24ed2 10989 echo "$as_me:10989: \$? = $ac_status" >&5
f73dda09
JA
10990 (exit $ac_status); } &&
10991 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 10992 { (eval echo "$as_me:10992: \"$ac_try\"") >&5
f73dda09
JA
10993 (eval $ac_try) 2>&5
10994 ac_status=$?
d3a24ed2 10995 echo "$as_me:10995: \$? = $ac_status" >&5
f73dda09
JA
10996 (exit $ac_status); }; }; then
10997 ac_lo=$ac_mid; break
10998else
10999 echo "$as_me: failed program was:" >&5
11000cat conftest.$ac_ext >&5
11001ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11002fi
11003rm -f conftest.$ac_objext conftest.$ac_ext
11004 done
cce855bc 11005fi
f73dda09
JA
11006rm -f conftest.$ac_objext conftest.$ac_ext
11007# Binary search between lo and hi bounds.
11008while test "x$ac_lo" != "x$ac_hi"; do
11009 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11010 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 11011#line 11011 "configure"
f73dda09
JA
11012#include "confdefs.h"
11013$ac_includes_default
11014int
11015main ()
11016{
11017int _array_ [1 - 2 * !((sizeof (long long)) <= $ac_mid)]
11018 ;
11019 return 0;
11020}
11021_ACEOF
11022rm -f conftest.$ac_objext
d3a24ed2 11023if { (eval echo "$as_me:11023: \"$ac_compile\"") >&5
f73dda09
JA
11024 (eval $ac_compile) 2>&5
11025 ac_status=$?
d3a24ed2 11026 echo "$as_me:11026: \$? = $ac_status" >&5
f73dda09
JA
11027 (exit $ac_status); } &&
11028 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 11029 { (eval echo "$as_me:11029: \"$ac_try\"") >&5
f73dda09
JA
11030 (eval $ac_try) 2>&5
11031 ac_status=$?
d3a24ed2 11032 echo "$as_me:11032: \$? = $ac_status" >&5
f73dda09
JA
11033 (exit $ac_status); }; }; then
11034 ac_hi=$ac_mid
11035else
11036 echo "$as_me: failed program was:" >&5
11037cat conftest.$ac_ext >&5
11038ac_lo=`expr $ac_mid + 1`
11039fi
11040rm -f conftest.$ac_objext conftest.$ac_ext
11041done
11042ac_cv_sizeof_long_long=$ac_lo
b72432fd 11043else
bb70624e 11044 if test "$cross_compiling" = yes; then
d3a24ed2 11045 { { echo "$as_me:11045: error: cannot run test program while cross compiling" >&5
f73dda09
JA
11046echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11047 { (exit 1); exit 1; }; }
bb70624e 11048else
f73dda09 11049 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 11050#line 11050 "configure"
bb70624e 11051#include "confdefs.h"
f73dda09
JA
11052$ac_includes_default
11053int
11054main ()
bb70624e 11055{
f73dda09
JA
11056FILE *f = fopen ("conftest.val", "w");
11057if (!f)
11058 exit (1);
11059fprintf (f, "%d", (sizeof (long long)));
11060fclose (f);
11061 ;
11062 return 0;
bb70624e 11063}
f73dda09
JA
11064_ACEOF
11065rm -f conftest$ac_exeext
d3a24ed2 11066if { (eval echo "$as_me:11066: \"$ac_link\"") >&5
f73dda09
JA
11067 (eval $ac_link) 2>&5
11068 ac_status=$?
d3a24ed2 11069 echo "$as_me:11069: \$? = $ac_status" >&5
f73dda09 11070 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3a24ed2 11071 { (eval echo "$as_me:11071: \"$ac_try\"") >&5
f73dda09
JA
11072 (eval $ac_try) 2>&5
11073 ac_status=$?
d3a24ed2 11074 echo "$as_me:11074: \$? = $ac_status" >&5
f73dda09
JA
11075 (exit $ac_status); }; }; then
11076 ac_cv_sizeof_long_long=`cat conftest.val`
bb70624e 11077else
f73dda09
JA
11078 echo "$as_me: program exited with status $ac_status" >&5
11079echo "$as_me: failed program was:" >&5
11080cat conftest.$ac_ext >&5
bb70624e 11081fi
f73dda09 11082rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bb70624e 11083fi
bb70624e 11084fi
f73dda09
JA
11085rm -f conftest.val
11086else
11087 ac_cv_sizeof_long_long=0
11088fi
11089fi
d3a24ed2 11090echo "$as_me:11090: result: $ac_cv_sizeof_long_long" >&5
f73dda09
JA
11091echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
11092cat >>confdefs.h <<EOF
11093#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
bb70624e
JA
11094EOF
11095
d3a24ed2 11096echo "$as_me:11096: checking for u_int" >&5
f73dda09
JA
11097echo $ECHO_N "checking for u_int... $ECHO_C" >&6
11098if test "${ac_cv_type_u_int+set}" = set; then
11099 echo $ECHO_N "(cached) $ECHO_C" >&6
bb70624e 11100else
f73dda09 11101 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 11102#line 11102 "configure"
bb70624e 11103#include "confdefs.h"
f73dda09
JA
11104$ac_includes_default
11105int
11106main ()
11107{
11108if ((u_int *) 0)
11109 return 0;
11110if (sizeof (u_int))
11111 return 0;
11112 ;
11113 return 0;
11114}
11115_ACEOF
11116rm -f conftest.$ac_objext
d3a24ed2 11117if { (eval echo "$as_me:11117: \"$ac_compile\"") >&5
f73dda09
JA
11118 (eval $ac_compile) 2>&5
11119 ac_status=$?
d3a24ed2 11120 echo "$as_me:11120: \$? = $ac_status" >&5
f73dda09
JA
11121 (exit $ac_status); } &&
11122 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 11123 { (eval echo "$as_me:11123: \"$ac_try\"") >&5
f73dda09
JA
11124 (eval $ac_try) 2>&5
11125 ac_status=$?
d3a24ed2 11126 echo "$as_me:11126: \$? = $ac_status" >&5
f73dda09 11127 (exit $ac_status); }; }; then
bb70624e
JA
11128 ac_cv_type_u_int=yes
11129else
f73dda09
JA
11130 echo "$as_me: failed program was:" >&5
11131cat conftest.$ac_ext >&5
11132ac_cv_type_u_int=no
bb70624e 11133fi
f73dda09 11134rm -f conftest.$ac_objext conftest.$ac_ext
bb70624e 11135fi
d3a24ed2 11136echo "$as_me:11136: result: $ac_cv_type_u_int" >&5
f73dda09
JA
11137echo "${ECHO_T}$ac_cv_type_u_int" >&6
11138if test $ac_cv_type_u_int = yes; then
11139 :
11140else
11141
11142cat >>confdefs.h <<EOF
bb70624e
JA
11143#define u_int unsigned int
11144EOF
11145
11146fi
11147
d3a24ed2 11148echo "$as_me:11148: checking for u_long" >&5
f73dda09
JA
11149echo $ECHO_N "checking for u_long... $ECHO_C" >&6
11150if test "${ac_cv_type_u_long+set}" = set; then
11151 echo $ECHO_N "(cached) $ECHO_C" >&6
bb70624e 11152else
f73dda09 11153 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 11154#line 11154 "configure"
bb70624e 11155#include "confdefs.h"
f73dda09
JA
11156$ac_includes_default
11157int
11158main ()
11159{
11160if ((u_long *) 0)
11161 return 0;
11162if (sizeof (u_long))
11163 return 0;
11164 ;
11165 return 0;
11166}
11167_ACEOF
11168rm -f conftest.$ac_objext
d3a24ed2 11169if { (eval echo "$as_me:11169: \"$ac_compile\"") >&5
f73dda09
JA
11170 (eval $ac_compile) 2>&5
11171 ac_status=$?
d3a24ed2 11172 echo "$as_me:11172: \$? = $ac_status" >&5
f73dda09
JA
11173 (exit $ac_status); } &&
11174 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 11175 { (eval echo "$as_me:11175: \"$ac_try\"") >&5
f73dda09
JA
11176 (eval $ac_try) 2>&5
11177 ac_status=$?
d3a24ed2 11178 echo "$as_me:11178: \$? = $ac_status" >&5
f73dda09 11179 (exit $ac_status); }; }; then
bb70624e
JA
11180 ac_cv_type_u_long=yes
11181else
f73dda09
JA
11182 echo "$as_me: failed program was:" >&5
11183cat conftest.$ac_ext >&5
11184ac_cv_type_u_long=no
bb70624e 11185fi
f73dda09 11186rm -f conftest.$ac_objext conftest.$ac_ext
bb70624e 11187fi
d3a24ed2 11188echo "$as_me:11188: result: $ac_cv_type_u_long" >&5
f73dda09
JA
11189echo "${ECHO_T}$ac_cv_type_u_long" >&6
11190if test $ac_cv_type_u_long = yes; then
11191 :
11192else
11193
11194cat >>confdefs.h <<EOF
bb70624e
JA
11195#define u_long unsigned long
11196EOF
11197
11198fi
11199
bb70624e 11200if test "$ac_cv_sizeof_short" = 2; then
d3a24ed2 11201 echo "$as_me:11201: checking for bits16_t" >&5
f73dda09
JA
11202echo $ECHO_N "checking for bits16_t... $ECHO_C" >&6
11203if test "${ac_cv_type_bits16_t+set}" = set; then
11204 echo $ECHO_N "(cached) $ECHO_C" >&6
bb70624e 11205else
f73dda09 11206 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 11207#line 11207 "configure"
bb70624e 11208#include "confdefs.h"
f73dda09
JA
11209$ac_includes_default
11210int
11211main ()
11212{
11213if ((bits16_t *) 0)
11214 return 0;
11215if (sizeof (bits16_t))
11216 return 0;
11217 ;
11218 return 0;
11219}
11220_ACEOF
11221rm -f conftest.$ac_objext
d3a24ed2 11222if { (eval echo "$as_me:11222: \"$ac_compile\"") >&5
f73dda09
JA
11223 (eval $ac_compile) 2>&5
11224 ac_status=$?
d3a24ed2 11225 echo "$as_me:11225: \$? = $ac_status" >&5
f73dda09
JA
11226 (exit $ac_status); } &&
11227 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 11228 { (eval echo "$as_me:11228: \"$ac_try\"") >&5
f73dda09
JA
11229 (eval $ac_try) 2>&5
11230 ac_status=$?
d3a24ed2 11231 echo "$as_me:11231: \$? = $ac_status" >&5
f73dda09 11232 (exit $ac_status); }; }; then
bb70624e
JA
11233 ac_cv_type_bits16_t=yes
11234else
f73dda09
JA
11235 echo "$as_me: failed program was:" >&5
11236cat conftest.$ac_ext >&5
11237ac_cv_type_bits16_t=no
bb70624e 11238fi
f73dda09 11239rm -f conftest.$ac_objext conftest.$ac_ext
bb70624e 11240fi
d3a24ed2 11241echo "$as_me:11241: result: $ac_cv_type_bits16_t" >&5
f73dda09
JA
11242echo "${ECHO_T}$ac_cv_type_bits16_t" >&6
11243if test $ac_cv_type_bits16_t = yes; then
11244 :
11245else
11246
11247cat >>confdefs.h <<EOF
bb70624e
JA
11248#define bits16_t short
11249EOF
11250
11251fi
11252
11253elif test "$ac_cv_sizeof_char" = 2; then
d3a24ed2 11254 echo "$as_me:11254: checking for bits16_t" >&5
f73dda09
JA
11255echo $ECHO_N "checking for bits16_t... $ECHO_C" >&6
11256if test "${ac_cv_type_bits16_t+set}" = set; then
11257 echo $ECHO_N "(cached) $ECHO_C" >&6
bb70624e 11258else
f73dda09 11259 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 11260#line 11260 "configure"
bb70624e 11261#include "confdefs.h"
f73dda09
JA
11262$ac_includes_default
11263int
11264main ()
11265{
11266if ((bits16_t *) 0)
11267 return 0;
11268if (sizeof (bits16_t))
11269 return 0;
11270 ;
11271 return 0;
11272}
11273_ACEOF
11274rm -f conftest.$ac_objext
d3a24ed2 11275if { (eval echo "$as_me:11275: \"$ac_compile\"") >&5
f73dda09
JA
11276 (eval $ac_compile) 2>&5
11277 ac_status=$?
d3a24ed2 11278 echo "$as_me:11278: \$? = $ac_status" >&5
f73dda09
JA
11279 (exit $ac_status); } &&
11280 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 11281 { (eval echo "$as_me:11281: \"$ac_try\"") >&5
f73dda09
JA
11282 (eval $ac_try) 2>&5
11283 ac_status=$?
d3a24ed2 11284 echo "$as_me:11284: \$? = $ac_status" >&5
f73dda09 11285 (exit $ac_status); }; }; then
bb70624e
JA
11286 ac_cv_type_bits16_t=yes
11287else
f73dda09
JA
11288 echo "$as_me: failed program was:" >&5
11289cat conftest.$ac_ext >&5
11290ac_cv_type_bits16_t=no
bb70624e 11291fi
f73dda09 11292rm -f conftest.$ac_objext conftest.$ac_ext
bb70624e 11293fi
d3a24ed2 11294echo "$as_me:11294: result: $ac_cv_type_bits16_t" >&5
f73dda09
JA
11295echo "${ECHO_T}$ac_cv_type_bits16_t" >&6
11296if test $ac_cv_type_bits16_t = yes; then
11297 :
11298else
11299
11300cat >>confdefs.h <<EOF
bb70624e
JA
11301#define bits16_t char
11302EOF
11303
11304fi
11305
11306else
d3a24ed2 11307 echo "$as_me:11307: checking for bits16_t" >&5
f73dda09
JA
11308echo $ECHO_N "checking for bits16_t... $ECHO_C" >&6
11309if test "${ac_cv_type_bits16_t+set}" = set; then
11310 echo $ECHO_N "(cached) $ECHO_C" >&6
b72432fd 11311else
f73dda09 11312 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 11313#line 11313 "configure"
b72432fd 11314#include "confdefs.h"
f73dda09
JA
11315$ac_includes_default
11316int
11317main ()
11318{
11319if ((bits16_t *) 0)
11320 return 0;
11321if (sizeof (bits16_t))
11322 return 0;
11323 ;
11324 return 0;
11325}
11326_ACEOF
11327rm -f conftest.$ac_objext
d3a24ed2 11328if { (eval echo "$as_me:11328: \"$ac_compile\"") >&5
f73dda09
JA
11329 (eval $ac_compile) 2>&5
11330 ac_status=$?
d3a24ed2 11331 echo "$as_me:11331: \$? = $ac_status" >&5
f73dda09
JA
11332 (exit $ac_status); } &&
11333 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 11334 { (eval echo "$as_me:11334: \"$ac_try\"") >&5
f73dda09
JA
11335 (eval $ac_try) 2>&5
11336 ac_status=$?
d3a24ed2 11337 echo "$as_me:11337: \$? = $ac_status" >&5
f73dda09 11338 (exit $ac_status); }; }; then
bb70624e 11339 ac_cv_type_bits16_t=yes
b72432fd 11340else
f73dda09
JA
11341 echo "$as_me: failed program was:" >&5
11342cat conftest.$ac_ext >&5
11343ac_cv_type_bits16_t=no
b72432fd 11344fi
f73dda09 11345rm -f conftest.$ac_objext conftest.$ac_ext
b72432fd 11346fi
d3a24ed2 11347echo "$as_me:11347: result: $ac_cv_type_bits16_t" >&5
f73dda09
JA
11348echo "${ECHO_T}$ac_cv_type_bits16_t" >&6
11349if test $ac_cv_type_bits16_t = yes; then
11350 :
11351else
11352
11353cat >>confdefs.h <<EOF
bb70624e 11354#define bits16_t short
b72432fd
JA
11355EOF
11356
bb70624e 11357fi
b72432fd 11358
bb70624e 11359fi
b72432fd 11360
bb70624e 11361if test "$ac_cv_sizeof_short" = 2; then
d3a24ed2 11362 echo "$as_me:11362: checking for u_bits16_t" >&5
f73dda09
JA
11363echo $ECHO_N "checking for u_bits16_t... $ECHO_C" >&6
11364if test "${ac_cv_type_u_bits16_t+set}" = set; then
11365 echo $ECHO_N "(cached) $ECHO_C" >&6
cce855bc 11366else
f73dda09 11367 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 11368#line 11368 "configure"
cce855bc 11369#include "confdefs.h"
f73dda09
JA
11370$ac_includes_default
11371int
11372main ()
11373{
11374if ((u_bits16_t *) 0)
11375 return 0;
11376if (sizeof (u_bits16_t))
11377 return 0;
11378 ;
11379 return 0;
11380}
11381_ACEOF
11382rm -f conftest.$ac_objext
d3a24ed2 11383if { (eval echo "$as_me:11383: \"$ac_compile\"") >&5
f73dda09
JA
11384 (eval $ac_compile) 2>&5
11385 ac_status=$?
d3a24ed2 11386 echo "$as_me:11386: \$? = $ac_status" >&5
f73dda09
JA
11387 (exit $ac_status); } &&
11388 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 11389 { (eval echo "$as_me:11389: \"$ac_try\"") >&5
f73dda09
JA
11390 (eval $ac_try) 2>&5
11391 ac_status=$?
d3a24ed2 11392 echo "$as_me:11392: \$? = $ac_status" >&5
f73dda09 11393 (exit $ac_status); }; }; then
bb70624e 11394 ac_cv_type_u_bits16_t=yes
cce855bc 11395else
f73dda09
JA
11396 echo "$as_me: failed program was:" >&5
11397cat conftest.$ac_ext >&5
11398ac_cv_type_u_bits16_t=no
cce855bc 11399fi
f73dda09 11400rm -f conftest.$ac_objext conftest.$ac_ext
cce855bc 11401fi
d3a24ed2 11402echo "$as_me:11402: result: $ac_cv_type_u_bits16_t" >&5
f73dda09
JA
11403echo "${ECHO_T}$ac_cv_type_u_bits16_t" >&6
11404if test $ac_cv_type_u_bits16_t = yes; then
11405 :
11406else
11407
11408cat >>confdefs.h <<EOF
bb70624e 11409#define u_bits16_t unsigned short
cce855bc
JA
11410EOF
11411
11412fi
11413
bb70624e 11414elif test "$ac_cv_sizeof_char" = 2; then
d3a24ed2 11415 echo "$as_me:11415: checking for u_bits16_t" >&5
f73dda09
JA
11416echo $ECHO_N "checking for u_bits16_t... $ECHO_C" >&6
11417if test "${ac_cv_type_u_bits16_t+set}" = set; then
11418 echo $ECHO_N "(cached) $ECHO_C" >&6
cce855bc 11419else
f73dda09 11420 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 11421#line 11421 "configure"
cce855bc 11422#include "confdefs.h"
f73dda09
JA
11423$ac_includes_default
11424int
11425main ()
11426{
11427if ((u_bits16_t *) 0)
11428 return 0;
11429if (sizeof (u_bits16_t))
11430 return 0;
11431 ;
11432 return 0;
11433}
11434_ACEOF
11435rm -f conftest.$ac_objext
d3a24ed2 11436if { (eval echo "$as_me:11436: \"$ac_compile\"") >&5
f73dda09
JA
11437 (eval $ac_compile) 2>&5
11438 ac_status=$?
d3a24ed2 11439 echo "$as_me:11439: \$? = $ac_status" >&5
f73dda09
JA
11440 (exit $ac_status); } &&
11441 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 11442 { (eval echo "$as_me:11442: \"$ac_try\"") >&5
f73dda09
JA
11443 (eval $ac_try) 2>&5
11444 ac_status=$?
d3a24ed2 11445 echo "$as_me:11445: \$? = $ac_status" >&5
f73dda09 11446 (exit $ac_status); }; }; then
bb70624e 11447 ac_cv_type_u_bits16_t=yes
cce855bc 11448else
f73dda09
JA
11449 echo "$as_me: failed program was:" >&5
11450cat conftest.$ac_ext >&5
11451ac_cv_type_u_bits16_t=no
cce855bc 11452fi
f73dda09 11453rm -f conftest.$ac_objext conftest.$ac_ext
cce855bc 11454fi
d3a24ed2 11455echo "$as_me:11455: result: $ac_cv_type_u_bits16_t" >&5
f73dda09
JA
11456echo "${ECHO_T}$ac_cv_type_u_bits16_t" >&6
11457if test $ac_cv_type_u_bits16_t = yes; then
11458 :
11459else
11460
11461cat >>confdefs.h <<EOF
bb70624e 11462#define u_bits16_t unsigned char
b72432fd 11463EOF
cce855bc
JA
11464
11465fi
11466
b72432fd 11467else
d3a24ed2 11468 echo "$as_me:11468: checking for u_bits16_t" >&5
f73dda09
JA
11469echo $ECHO_N "checking for u_bits16_t... $ECHO_C" >&6
11470if test "${ac_cv_type_u_bits16_t+set}" = set; then
11471 echo $ECHO_N "(cached) $ECHO_C" >&6
b72432fd 11472else
f73dda09 11473 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 11474#line 11474 "configure"
b72432fd 11475#include "confdefs.h"
f73dda09
JA
11476$ac_includes_default
11477int
11478main ()
11479{
11480if ((u_bits16_t *) 0)
11481 return 0;
11482if (sizeof (u_bits16_t))
11483 return 0;
11484 ;
11485 return 0;
11486}
11487_ACEOF
11488rm -f conftest.$ac_objext
d3a24ed2 11489if { (eval echo "$as_me:11489: \"$ac_compile\"") >&5
f73dda09
JA
11490 (eval $ac_compile) 2>&5
11491 ac_status=$?
d3a24ed2 11492 echo "$as_me:11492: \$? = $ac_status" >&5
f73dda09
JA
11493 (exit $ac_status); } &&
11494 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 11495 { (eval echo "$as_me:11495: \"$ac_try\"") >&5
f73dda09
JA
11496 (eval $ac_try) 2>&5
11497 ac_status=$?
d3a24ed2 11498 echo "$as_me:11498: \$? = $ac_status" >&5
f73dda09 11499 (exit $ac_status); }; }; then
bb70624e 11500 ac_cv_type_u_bits16_t=yes
b72432fd 11501else
f73dda09
JA
11502 echo "$as_me: failed program was:" >&5
11503cat conftest.$ac_ext >&5
11504ac_cv_type_u_bits16_t=no
cce855bc 11505fi
f73dda09 11506rm -f conftest.$ac_objext conftest.$ac_ext
b72432fd 11507fi
d3a24ed2 11508echo "$as_me:11508: result: $ac_cv_type_u_bits16_t" >&5
f73dda09
JA
11509echo "${ECHO_T}$ac_cv_type_u_bits16_t" >&6
11510if test $ac_cv_type_u_bits16_t = yes; then
11511 :
11512else
11513
11514cat >>confdefs.h <<EOF
bb70624e 11515#define u_bits16_t unsigned short
cce855bc
JA
11516EOF
11517
b72432fd
JA
11518fi
11519
11520fi
11521
b72432fd 11522if test "$ac_cv_sizeof_int" = 4; then
d3a24ed2 11523 echo "$as_me:11523: checking for bits32_t" >&5
f73dda09
JA
11524echo $ECHO_N "checking for bits32_t... $ECHO_C" >&6
11525if test "${ac_cv_type_bits32_t+set}" = set; then
11526 echo $ECHO_N "(cached) $ECHO_C" >&6
cce855bc 11527else
f73dda09 11528 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 11529#line 11529 "configure"
b72432fd 11530#include "confdefs.h"
f73dda09
JA
11531$ac_includes_default
11532int
11533main ()
11534{
11535if ((bits32_t *) 0)
11536 return 0;
11537if (sizeof (bits32_t))
11538 return 0;
11539 ;
11540 return 0;
11541}
11542_ACEOF
11543rm -f conftest.$ac_objext
d3a24ed2 11544if { (eval echo "$as_me:11544: \"$ac_compile\"") >&5
f73dda09
JA
11545 (eval $ac_compile) 2>&5
11546 ac_status=$?
d3a24ed2 11547 echo "$as_me:11547: \$? = $ac_status" >&5
f73dda09
JA
11548 (exit $ac_status); } &&
11549 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 11550 { (eval echo "$as_me:11550: \"$ac_try\"") >&5
f73dda09
JA
11551 (eval $ac_try) 2>&5
11552 ac_status=$?
d3a24ed2 11553 echo "$as_me:11553: \$? = $ac_status" >&5
f73dda09 11554 (exit $ac_status); }; }; then
bb70624e 11555 ac_cv_type_bits32_t=yes
b72432fd 11556else
f73dda09
JA
11557 echo "$as_me: failed program was:" >&5
11558cat conftest.$ac_ext >&5
11559ac_cv_type_bits32_t=no
b72432fd 11560fi
f73dda09 11561rm -f conftest.$ac_objext conftest.$ac_ext
cce855bc 11562fi
d3a24ed2 11563echo "$as_me:11563: result: $ac_cv_type_bits32_t" >&5
f73dda09
JA
11564echo "${ECHO_T}$ac_cv_type_bits32_t" >&6
11565if test $ac_cv_type_bits32_t = yes; then
11566 :
11567else
11568
11569cat >>confdefs.h <<EOF
bb70624e 11570#define bits32_t int
b72432fd 11571EOF
cce855bc
JA
11572
11573fi
b72432fd
JA
11574
11575elif test "$ac_cv_sizeof_long" = 4; then
d3a24ed2 11576 echo "$as_me:11576: checking for bits32_t" >&5
f73dda09
JA
11577echo $ECHO_N "checking for bits32_t... $ECHO_C" >&6
11578if test "${ac_cv_type_bits32_t+set}" = set; then
11579 echo $ECHO_N "(cached) $ECHO_C" >&6
cce855bc 11580else
f73dda09 11581 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 11582#line 11582 "configure"
cce855bc 11583#include "confdefs.h"
f73dda09
JA
11584$ac_includes_default
11585int
11586main ()
11587{
11588if ((bits32_t *) 0)
11589 return 0;
11590if (sizeof (bits32_t))
11591 return 0;
11592 ;
11593 return 0;
11594}
11595_ACEOF
11596rm -f conftest.$ac_objext
d3a24ed2 11597if { (eval echo "$as_me:11597: \"$ac_compile\"") >&5
f73dda09
JA
11598 (eval $ac_compile) 2>&5
11599 ac_status=$?
d3a24ed2 11600 echo "$as_me:11600: \$? = $ac_status" >&5
f73dda09
JA
11601 (exit $ac_status); } &&
11602 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 11603 { (eval echo "$as_me:11603: \"$ac_try\"") >&5
f73dda09
JA
11604 (eval $ac_try) 2>&5
11605 ac_status=$?
d3a24ed2 11606 echo "$as_me:11606: \$? = $ac_status" >&5
f73dda09 11607 (exit $ac_status); }; }; then
bb70624e 11608 ac_cv_type_bits32_t=yes
cce855bc 11609else
f73dda09
JA
11610 echo "$as_me: failed program was:" >&5
11611cat conftest.$ac_ext >&5
11612ac_cv_type_bits32_t=no
cce855bc 11613fi
f73dda09 11614rm -f conftest.$ac_objext conftest.$ac_ext
cce855bc 11615fi
d3a24ed2 11616echo "$as_me:11616: result: $ac_cv_type_bits32_t" >&5
f73dda09
JA
11617echo "${ECHO_T}$ac_cv_type_bits32_t" >&6
11618if test $ac_cv_type_bits32_t = yes; then
11619 :
11620else
11621
11622cat >>confdefs.h <<EOF
bb70624e 11623#define bits32_t long
cce855bc
JA
11624EOF
11625
11626fi
11627
cce855bc 11628else
d3a24ed2 11629 echo "$as_me:11629: checking for bits32_t" >&5
f73dda09
JA
11630echo $ECHO_N "checking for bits32_t... $ECHO_C" >&6
11631if test "${ac_cv_type_bits32_t+set}" = set; then
11632 echo $ECHO_N "(cached) $ECHO_C" >&6
cce855bc 11633else
f73dda09 11634 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 11635#line 11635 "configure"
f73dda09
JA
11636#include "confdefs.h"
11637$ac_includes_default
11638int
11639main ()
11640{
11641if ((bits32_t *) 0)
11642 return 0;
11643if (sizeof (bits32_t))
11644 return 0;
11645 ;
11646 return 0;
11647}
11648_ACEOF
11649rm -f conftest.$ac_objext
d3a24ed2 11650if { (eval echo "$as_me:11650: \"$ac_compile\"") >&5
f73dda09
JA
11651 (eval $ac_compile) 2>&5
11652 ac_status=$?
d3a24ed2 11653 echo "$as_me:11653: \$? = $ac_status" >&5
f73dda09
JA
11654 (exit $ac_status); } &&
11655 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 11656 { (eval echo "$as_me:11656: \"$ac_try\"") >&5
f73dda09
JA
11657 (eval $ac_try) 2>&5
11658 ac_status=$?
d3a24ed2 11659 echo "$as_me:11659: \$? = $ac_status" >&5
f73dda09 11660 (exit $ac_status); }; }; then
bb70624e 11661 ac_cv_type_bits32_t=yes
cce855bc 11662else
f73dda09
JA
11663 echo "$as_me: failed program was:" >&5
11664cat conftest.$ac_ext >&5
11665ac_cv_type_bits32_t=no
cce855bc 11666fi
f73dda09 11667rm -f conftest.$ac_objext conftest.$ac_ext
cce855bc 11668fi
d3a24ed2 11669echo "$as_me:11669: result: $ac_cv_type_bits32_t" >&5
f73dda09
JA
11670echo "${ECHO_T}$ac_cv_type_bits32_t" >&6
11671if test $ac_cv_type_bits32_t = yes; then
11672 :
11673else
11674
11675cat >>confdefs.h <<EOF
bb70624e 11676#define bits32_t int
b72432fd 11677EOF
cce855bc
JA
11678
11679fi
11680
cce855bc 11681fi
cce855bc 11682
bb70624e 11683if test "$ac_cv_sizeof_int" = 4; then
d3a24ed2 11684 echo "$as_me:11684: checking for u_bits32_t" >&5
f73dda09
JA
11685echo $ECHO_N "checking for u_bits32_t... $ECHO_C" >&6
11686if test "${ac_cv_type_u_bits32_t+set}" = set; then
11687 echo $ECHO_N "(cached) $ECHO_C" >&6
cce855bc 11688else
f73dda09 11689 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 11690#line 11690 "configure"
b72432fd 11691#include "confdefs.h"
f73dda09
JA
11692$ac_includes_default
11693int
11694main ()
11695{
11696if ((u_bits32_t *) 0)
11697 return 0;
11698if (sizeof (u_bits32_t))
11699 return 0;
11700 ;
11701 return 0;
11702}
11703_ACEOF
11704rm -f conftest.$ac_objext
d3a24ed2 11705if { (eval echo "$as_me:11705: \"$ac_compile\"") >&5
f73dda09
JA
11706 (eval $ac_compile) 2>&5
11707 ac_status=$?
d3a24ed2 11708 echo "$as_me:11708: \$? = $ac_status" >&5
f73dda09
JA
11709 (exit $ac_status); } &&
11710 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 11711 { (eval echo "$as_me:11711: \"$ac_try\"") >&5
f73dda09
JA
11712 (eval $ac_try) 2>&5
11713 ac_status=$?
d3a24ed2 11714 echo "$as_me:11714: \$? = $ac_status" >&5
f73dda09 11715 (exit $ac_status); }; }; then
bb70624e 11716 ac_cv_type_u_bits32_t=yes
b72432fd 11717else
f73dda09
JA
11718 echo "$as_me: failed program was:" >&5
11719cat conftest.$ac_ext >&5
11720ac_cv_type_u_bits32_t=no
b72432fd 11721fi
f73dda09 11722rm -f conftest.$ac_objext conftest.$ac_ext
cce855bc 11723fi
d3a24ed2 11724echo "$as_me:11724: result: $ac_cv_type_u_bits32_t" >&5
f73dda09
JA
11725echo "${ECHO_T}$ac_cv_type_u_bits32_t" >&6
11726if test $ac_cv_type_u_bits32_t = yes; then
11727 :
11728else
11729
11730cat >>confdefs.h <<EOF
bb70624e 11731#define u_bits32_t unsigned int
b72432fd 11732EOF
cce855bc
JA
11733
11734fi
11735
bb70624e 11736elif test "$ac_cv_sizeof_long" = 4; then
d3a24ed2 11737 echo "$as_me:11737: checking for u_bits32_t" >&5
f73dda09
JA
11738echo $ECHO_N "checking for u_bits32_t... $ECHO_C" >&6
11739if test "${ac_cv_type_u_bits32_t+set}" = set; then
11740 echo $ECHO_N "(cached) $ECHO_C" >&6
cce855bc 11741else
f73dda09 11742 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 11743#line 11743 "configure"
cce855bc 11744#include "confdefs.h"
f73dda09
JA
11745$ac_includes_default
11746int
11747main ()
11748{
11749if ((u_bits32_t *) 0)
11750 return 0;
11751if (sizeof (u_bits32_t))
11752 return 0;
11753 ;
11754 return 0;
11755}
11756_ACEOF
11757rm -f conftest.$ac_objext
d3a24ed2 11758if { (eval echo "$as_me:11758: \"$ac_compile\"") >&5
f73dda09
JA
11759 (eval $ac_compile) 2>&5
11760 ac_status=$?
d3a24ed2 11761 echo "$as_me:11761: \$? = $ac_status" >&5
f73dda09
JA
11762 (exit $ac_status); } &&
11763 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 11764 { (eval echo "$as_me:11764: \"$ac_try\"") >&5
f73dda09
JA
11765 (eval $ac_try) 2>&5
11766 ac_status=$?
d3a24ed2 11767 echo "$as_me:11767: \$? = $ac_status" >&5
f73dda09 11768 (exit $ac_status); }; }; then
bb70624e 11769 ac_cv_type_u_bits32_t=yes
cce855bc 11770else
f73dda09
JA
11771 echo "$as_me: failed program was:" >&5
11772cat conftest.$ac_ext >&5
11773ac_cv_type_u_bits32_t=no
cce855bc 11774fi
f73dda09 11775rm -f conftest.$ac_objext conftest.$ac_ext
cce855bc 11776fi
d3a24ed2 11777echo "$as_me:11777: result: $ac_cv_type_u_bits32_t" >&5
f73dda09
JA
11778echo "${ECHO_T}$ac_cv_type_u_bits32_t" >&6
11779if test $ac_cv_type_u_bits32_t = yes; then
11780 :
11781else
11782
11783cat >>confdefs.h <<EOF
bb70624e 11784#define u_bits32_t unsigned long
cce855bc
JA
11785EOF
11786
11787fi
11788
cce855bc 11789else
d3a24ed2 11790 echo "$as_me:11790: checking for u_bits32_t" >&5
f73dda09
JA
11791echo $ECHO_N "checking for u_bits32_t... $ECHO_C" >&6
11792if test "${ac_cv_type_u_bits32_t+set}" = set; then
11793 echo $ECHO_N "(cached) $ECHO_C" >&6
cce855bc 11794else
f73dda09 11795 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 11796#line 11796 "configure"
b72432fd 11797#include "confdefs.h"
f73dda09
JA
11798$ac_includes_default
11799int
11800main ()
11801{
11802if ((u_bits32_t *) 0)
11803 return 0;
11804if (sizeof (u_bits32_t))
11805 return 0;
11806 ;
11807 return 0;
11808}
11809_ACEOF
11810rm -f conftest.$ac_objext
d3a24ed2 11811if { (eval echo "$as_me:11811: \"$ac_compile\"") >&5
f73dda09
JA
11812 (eval $ac_compile) 2>&5
11813 ac_status=$?
d3a24ed2 11814 echo "$as_me:11814: \$? = $ac_status" >&5
f73dda09
JA
11815 (exit $ac_status); } &&
11816 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 11817 { (eval echo "$as_me:11817: \"$ac_try\"") >&5
f73dda09
JA
11818 (eval $ac_try) 2>&5
11819 ac_status=$?
d3a24ed2 11820 echo "$as_me:11820: \$? = $ac_status" >&5
f73dda09 11821 (exit $ac_status); }; }; then
bb70624e 11822 ac_cv_type_u_bits32_t=yes
b72432fd 11823else
f73dda09
JA
11824 echo "$as_me: failed program was:" >&5
11825cat conftest.$ac_ext >&5
11826ac_cv_type_u_bits32_t=no
b72432fd 11827fi
f73dda09 11828rm -f conftest.$ac_objext conftest.$ac_ext
b72432fd 11829fi
d3a24ed2 11830echo "$as_me:11830: result: $ac_cv_type_u_bits32_t" >&5
f73dda09
JA
11831echo "${ECHO_T}$ac_cv_type_u_bits32_t" >&6
11832if test $ac_cv_type_u_bits32_t = yes; then
11833 :
11834else
11835
11836cat >>confdefs.h <<EOF
bb70624e 11837#define u_bits32_t unsigned int
b72432fd
JA
11838EOF
11839
11840fi
cce855bc 11841
b72432fd
JA
11842fi
11843
f73dda09 11844if test "$ac_cv_sizeof_char_p" = 8; then
d3a24ed2 11845 echo "$as_me:11845: checking for bits64_t" >&5
f73dda09
JA
11846echo $ECHO_N "checking for bits64_t... $ECHO_C" >&6
11847if test "${ac_cv_type_bits64_t+set}" = set; then
11848 echo $ECHO_N "(cached) $ECHO_C" >&6
cce855bc 11849else
f73dda09 11850 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 11851#line 11851 "configure"
cce855bc 11852#include "confdefs.h"
f73dda09
JA
11853$ac_includes_default
11854int
11855main ()
11856{
11857if ((bits64_t *) 0)
11858 return 0;
11859if (sizeof (bits64_t))
11860 return 0;
11861 ;
11862 return 0;
11863}
11864_ACEOF
11865rm -f conftest.$ac_objext
d3a24ed2 11866if { (eval echo "$as_me:11866: \"$ac_compile\"") >&5
f73dda09
JA
11867 (eval $ac_compile) 2>&5
11868 ac_status=$?
d3a24ed2 11869 echo "$as_me:11869: \$? = $ac_status" >&5
f73dda09
JA
11870 (exit $ac_status); } &&
11871 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 11872 { (eval echo "$as_me:11872: \"$ac_try\"") >&5
f73dda09
JA
11873 (eval $ac_try) 2>&5
11874 ac_status=$?
d3a24ed2 11875 echo "$as_me:11875: \$? = $ac_status" >&5
f73dda09 11876 (exit $ac_status); }; }; then
b72432fd
JA
11877 ac_cv_type_bits64_t=yes
11878else
f73dda09
JA
11879 echo "$as_me: failed program was:" >&5
11880cat conftest.$ac_ext >&5
11881ac_cv_type_bits64_t=no
b72432fd 11882fi
f73dda09 11883rm -f conftest.$ac_objext conftest.$ac_ext
b72432fd 11884fi
d3a24ed2 11885echo "$as_me:11885: result: $ac_cv_type_bits64_t" >&5
f73dda09
JA
11886echo "${ECHO_T}$ac_cv_type_bits64_t" >&6
11887if test $ac_cv_type_bits64_t = yes; then
11888 :
11889else
11890
11891cat >>confdefs.h <<EOF
b72432fd
JA
11892#define bits64_t char *
11893EOF
11894
11895fi
11896
11897elif test "$ac_cv_sizeof_double" = 8; then
d3a24ed2 11898 echo "$as_me:11898: checking for bits64_t" >&5
f73dda09
JA
11899echo $ECHO_N "checking for bits64_t... $ECHO_C" >&6
11900if test "${ac_cv_type_bits64_t+set}" = set; then
11901 echo $ECHO_N "(cached) $ECHO_C" >&6
b72432fd 11902else
f73dda09 11903 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 11904#line 11904 "configure"
b72432fd 11905#include "confdefs.h"
f73dda09
JA
11906$ac_includes_default
11907int
11908main ()
11909{
11910if ((bits64_t *) 0)
11911 return 0;
11912if (sizeof (bits64_t))
11913 return 0;
11914 ;
11915 return 0;
11916}
11917_ACEOF
11918rm -f conftest.$ac_objext
d3a24ed2 11919if { (eval echo "$as_me:11919: \"$ac_compile\"") >&5
f73dda09
JA
11920 (eval $ac_compile) 2>&5
11921 ac_status=$?
d3a24ed2 11922 echo "$as_me:11922: \$? = $ac_status" >&5
f73dda09
JA
11923 (exit $ac_status); } &&
11924 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 11925 { (eval echo "$as_me:11925: \"$ac_try\"") >&5
f73dda09
JA
11926 (eval $ac_try) 2>&5
11927 ac_status=$?
d3a24ed2 11928 echo "$as_me:11928: \$? = $ac_status" >&5
f73dda09 11929 (exit $ac_status); }; }; then
b72432fd 11930 ac_cv_type_bits64_t=yes
cce855bc 11931else
f73dda09
JA
11932 echo "$as_me: failed program was:" >&5
11933cat conftest.$ac_ext >&5
11934ac_cv_type_bits64_t=no
cce855bc 11935fi
f73dda09 11936rm -f conftest.$ac_objext conftest.$ac_ext
cce855bc 11937fi
d3a24ed2 11938echo "$as_me:11938: result: $ac_cv_type_bits64_t" >&5
f73dda09
JA
11939echo "${ECHO_T}$ac_cv_type_bits64_t" >&6
11940if test $ac_cv_type_bits64_t = yes; then
11941 :
11942else
11943
11944cat >>confdefs.h <<EOF
b72432fd
JA
11945#define bits64_t double
11946EOF
cce855bc
JA
11947
11948fi
11949
f73dda09 11950elif test -n "$ac_cv_type_long_long" && test "$ac_cv_sizeof_long_long" = 8; then
d3a24ed2 11951 echo "$as_me:11951: checking for bits64_t" >&5
f73dda09
JA
11952echo $ECHO_N "checking for bits64_t... $ECHO_C" >&6
11953if test "${ac_cv_type_bits64_t+set}" = set; then
11954 echo $ECHO_N "(cached) $ECHO_C" >&6
b72432fd 11955else
f73dda09 11956 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 11957#line 11957 "configure"
b72432fd 11958#include "confdefs.h"
f73dda09
JA
11959$ac_includes_default
11960int
11961main ()
11962{
11963if ((bits64_t *) 0)
11964 return 0;
11965if (sizeof (bits64_t))
11966 return 0;
11967 ;
11968 return 0;
11969}
11970_ACEOF
11971rm -f conftest.$ac_objext
d3a24ed2 11972if { (eval echo "$as_me:11972: \"$ac_compile\"") >&5
f73dda09
JA
11973 (eval $ac_compile) 2>&5
11974 ac_status=$?
d3a24ed2 11975 echo "$as_me:11975: \$? = $ac_status" >&5
f73dda09
JA
11976 (exit $ac_status); } &&
11977 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 11978 { (eval echo "$as_me:11978: \"$ac_try\"") >&5
f73dda09
JA
11979 (eval $ac_try) 2>&5
11980 ac_status=$?
d3a24ed2 11981 echo "$as_me:11981: \$? = $ac_status" >&5
f73dda09 11982 (exit $ac_status); }; }; then
b72432fd
JA
11983 ac_cv_type_bits64_t=yes
11984else
f73dda09
JA
11985 echo "$as_me: failed program was:" >&5
11986cat conftest.$ac_ext >&5
11987ac_cv_type_bits64_t=no
11988fi
11989rm -f conftest.$ac_objext conftest.$ac_ext
11990fi
d3a24ed2 11991echo "$as_me:11991: result: $ac_cv_type_bits64_t" >&5
f73dda09
JA
11992echo "${ECHO_T}$ac_cv_type_bits64_t" >&6
11993if test $ac_cv_type_bits64_t = yes; then
11994 :
11995else
11996
11997cat >>confdefs.h <<EOF
11998#define bits64_t long long
11999EOF
12000
cce855bc 12001fi
b72432fd 12002
f73dda09 12003elif test "$ac_cv_sizeof_long" = 8; then
d3a24ed2 12004 echo "$as_me:12004: checking for bits64_t" >&5
f73dda09
JA
12005echo $ECHO_N "checking for bits64_t... $ECHO_C" >&6
12006if test "${ac_cv_type_bits64_t+set}" = set; then
12007 echo $ECHO_N "(cached) $ECHO_C" >&6
12008else
12009 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 12010#line 12010 "configure"
f73dda09
JA
12011#include "confdefs.h"
12012$ac_includes_default
12013int
12014main ()
12015{
12016if ((bits64_t *) 0)
12017 return 0;
12018if (sizeof (bits64_t))
12019 return 0;
12020 ;
12021 return 0;
12022}
12023_ACEOF
12024rm -f conftest.$ac_objext
d3a24ed2 12025if { (eval echo "$as_me:12025: \"$ac_compile\"") >&5
f73dda09
JA
12026 (eval $ac_compile) 2>&5
12027 ac_status=$?
d3a24ed2 12028 echo "$as_me:12028: \$? = $ac_status" >&5
f73dda09
JA
12029 (exit $ac_status); } &&
12030 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 12031 { (eval echo "$as_me:12031: \"$ac_try\"") >&5
f73dda09
JA
12032 (eval $ac_try) 2>&5
12033 ac_status=$?
d3a24ed2 12034 echo "$as_me:12034: \$? = $ac_status" >&5
f73dda09
JA
12035 (exit $ac_status); }; }; then
12036 ac_cv_type_bits64_t=yes
12037else
12038 echo "$as_me: failed program was:" >&5
12039cat conftest.$ac_ext >&5
12040ac_cv_type_bits64_t=no
12041fi
12042rm -f conftest.$ac_objext conftest.$ac_ext
b72432fd 12043fi
d3a24ed2 12044echo "$as_me:12044: result: $ac_cv_type_bits64_t" >&5
f73dda09
JA
12045echo "${ECHO_T}$ac_cv_type_bits64_t" >&6
12046if test $ac_cv_type_bits64_t = yes; then
12047 :
12048else
12049
12050cat >>confdefs.h <<EOF
b72432fd 12051#define bits64_t long
cce855bc
JA
12052EOF
12053
b72432fd
JA
12054fi
12055
cce855bc 12056else
d3a24ed2 12057 echo "$as_me:12057: checking for bits64_t" >&5
f73dda09
JA
12058echo $ECHO_N "checking for bits64_t... $ECHO_C" >&6
12059if test "${ac_cv_type_bits64_t+set}" = set; then
12060 echo $ECHO_N "(cached) $ECHO_C" >&6
b72432fd 12061else
f73dda09 12062 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 12063#line 12063 "configure"
b72432fd 12064#include "confdefs.h"
f73dda09
JA
12065$ac_includes_default
12066int
12067main ()
12068{
12069if ((bits64_t *) 0)
12070 return 0;
12071if (sizeof (bits64_t))
12072 return 0;
12073 ;
12074 return 0;
12075}
12076_ACEOF
12077rm -f conftest.$ac_objext
d3a24ed2 12078if { (eval echo "$as_me:12078: \"$ac_compile\"") >&5
f73dda09
JA
12079 (eval $ac_compile) 2>&5
12080 ac_status=$?
d3a24ed2 12081 echo "$as_me:12081: \$? = $ac_status" >&5
f73dda09
JA
12082 (exit $ac_status); } &&
12083 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 12084 { (eval echo "$as_me:12084: \"$ac_try\"") >&5
f73dda09
JA
12085 (eval $ac_try) 2>&5
12086 ac_status=$?
d3a24ed2 12087 echo "$as_me:12087: \$? = $ac_status" >&5
f73dda09 12088 (exit $ac_status); }; }; then
b72432fd
JA
12089 ac_cv_type_bits64_t=yes
12090else
f73dda09
JA
12091 echo "$as_me: failed program was:" >&5
12092cat conftest.$ac_ext >&5
12093ac_cv_type_bits64_t=no
b72432fd 12094fi
f73dda09 12095rm -f conftest.$ac_objext conftest.$ac_ext
b72432fd 12096fi
d3a24ed2 12097echo "$as_me:12097: result: $ac_cv_type_bits64_t" >&5
f73dda09
JA
12098echo "${ECHO_T}$ac_cv_type_bits64_t" >&6
12099if test $ac_cv_type_bits64_t = yes; then
12100 :
12101else
12102
12103cat >>confdefs.h <<EOF
b72432fd 12104#define bits64_t double
cce855bc
JA
12105EOF
12106
12107fi
12108
12109fi
12110
bb70624e 12111if test "$ac_cv_sizeof_int" = "$ac_cv_sizeof_char_p"; then
d3a24ed2 12112 echo "$as_me:12112: checking for ptrdiff_t" >&5
f73dda09
JA
12113echo $ECHO_N "checking for ptrdiff_t... $ECHO_C" >&6
12114if test "${ac_cv_type_ptrdiff_t+set}" = set; then
12115 echo $ECHO_N "(cached) $ECHO_C" >&6
bb70624e 12116else
f73dda09 12117 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 12118#line 12118 "configure"
bb70624e 12119#include "confdefs.h"
f73dda09
JA
12120$ac_includes_default
12121int
12122main ()
12123{
12124if ((ptrdiff_t *) 0)
12125 return 0;
12126if (sizeof (ptrdiff_t))
12127 return 0;
12128 ;
12129 return 0;
12130}
12131_ACEOF
12132rm -f conftest.$ac_objext
d3a24ed2 12133if { (eval echo "$as_me:12133: \"$ac_compile\"") >&5
f73dda09
JA
12134 (eval $ac_compile) 2>&5
12135 ac_status=$?
d3a24ed2 12136 echo "$as_me:12136: \$? = $ac_status" >&5
f73dda09
JA
12137 (exit $ac_status); } &&
12138 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 12139 { (eval echo "$as_me:12139: \"$ac_try\"") >&5
f73dda09
JA
12140 (eval $ac_try) 2>&5
12141 ac_status=$?
d3a24ed2 12142 echo "$as_me:12142: \$? = $ac_status" >&5
f73dda09 12143 (exit $ac_status); }; }; then
bb70624e
JA
12144 ac_cv_type_ptrdiff_t=yes
12145else
f73dda09
JA
12146 echo "$as_me: failed program was:" >&5
12147cat conftest.$ac_ext >&5
12148ac_cv_type_ptrdiff_t=no
bb70624e 12149fi
f73dda09 12150rm -f conftest.$ac_objext conftest.$ac_ext
bb70624e 12151fi
d3a24ed2 12152echo "$as_me:12152: result: $ac_cv_type_ptrdiff_t" >&5
f73dda09
JA
12153echo "${ECHO_T}$ac_cv_type_ptrdiff_t" >&6
12154if test $ac_cv_type_ptrdiff_t = yes; then
12155 :
12156else
12157
12158cat >>confdefs.h <<EOF
bb70624e
JA
12159#define ptrdiff_t int
12160EOF
12161
12162fi
12163
12164elif test "$ac_cv_sizeof_long" = "$ac_cv_sizeof_char_p"; then
d3a24ed2 12165 echo "$as_me:12165: checking for ptrdiff_t" >&5
f73dda09
JA
12166echo $ECHO_N "checking for ptrdiff_t... $ECHO_C" >&6
12167if test "${ac_cv_type_ptrdiff_t+set}" = set; then
12168 echo $ECHO_N "(cached) $ECHO_C" >&6
bb70624e 12169else
f73dda09 12170 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 12171#line 12171 "configure"
bb70624e 12172#include "confdefs.h"
f73dda09
JA
12173$ac_includes_default
12174int
12175main ()
12176{
12177if ((ptrdiff_t *) 0)
12178 return 0;
12179if (sizeof (ptrdiff_t))
12180 return 0;
12181 ;
12182 return 0;
12183}
12184_ACEOF
12185rm -f conftest.$ac_objext
d3a24ed2 12186if { (eval echo "$as_me:12186: \"$ac_compile\"") >&5
f73dda09
JA
12187 (eval $ac_compile) 2>&5
12188 ac_status=$?
d3a24ed2 12189 echo "$as_me:12189: \$? = $ac_status" >&5
f73dda09
JA
12190 (exit $ac_status); } &&
12191 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 12192 { (eval echo "$as_me:12192: \"$ac_try\"") >&5
f73dda09
JA
12193 (eval $ac_try) 2>&5
12194 ac_status=$?
d3a24ed2 12195 echo "$as_me:12195: \$? = $ac_status" >&5
f73dda09 12196 (exit $ac_status); }; }; then
bb70624e
JA
12197 ac_cv_type_ptrdiff_t=yes
12198else
f73dda09
JA
12199 echo "$as_me: failed program was:" >&5
12200cat conftest.$ac_ext >&5
12201ac_cv_type_ptrdiff_t=no
bb70624e 12202fi
f73dda09 12203rm -f conftest.$ac_objext conftest.$ac_ext
bb70624e 12204fi
d3a24ed2 12205echo "$as_me:12205: result: $ac_cv_type_ptrdiff_t" >&5
f73dda09
JA
12206echo "${ECHO_T}$ac_cv_type_ptrdiff_t" >&6
12207if test $ac_cv_type_ptrdiff_t = yes; then
12208 :
12209else
12210
12211cat >>confdefs.h <<EOF
bb70624e
JA
12212#define ptrdiff_t long
12213EOF
12214
12215fi
12216
f73dda09 12217elif test "$ac_cv_type_long_long" = yes && test "$ac_cv_sizeof_long_long" = "$ac_cv_sizeof_char_p"; then
d3a24ed2 12218 echo "$as_me:12218: checking for ptrdiff_t" >&5
f73dda09
JA
12219echo $ECHO_N "checking for ptrdiff_t... $ECHO_C" >&6
12220if test "${ac_cv_type_ptrdiff_t+set}" = set; then
12221 echo $ECHO_N "(cached) $ECHO_C" >&6
bb70624e 12222else
f73dda09 12223 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 12224#line 12224 "configure"
bb70624e 12225#include "confdefs.h"
f73dda09
JA
12226$ac_includes_default
12227int
12228main ()
12229{
12230if ((ptrdiff_t *) 0)
12231 return 0;
12232if (sizeof (ptrdiff_t))
12233 return 0;
12234 ;
12235 return 0;
12236}
12237_ACEOF
12238rm -f conftest.$ac_objext
d3a24ed2 12239if { (eval echo "$as_me:12239: \"$ac_compile\"") >&5
f73dda09
JA
12240 (eval $ac_compile) 2>&5
12241 ac_status=$?
d3a24ed2 12242 echo "$as_me:12242: \$? = $ac_status" >&5
f73dda09
JA
12243 (exit $ac_status); } &&
12244 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 12245 { (eval echo "$as_me:12245: \"$ac_try\"") >&5
f73dda09
JA
12246 (eval $ac_try) 2>&5
12247 ac_status=$?
d3a24ed2 12248 echo "$as_me:12248: \$? = $ac_status" >&5
f73dda09 12249 (exit $ac_status); }; }; then
bb70624e
JA
12250 ac_cv_type_ptrdiff_t=yes
12251else
f73dda09
JA
12252 echo "$as_me: failed program was:" >&5
12253cat conftest.$ac_ext >&5
12254ac_cv_type_ptrdiff_t=no
12255fi
12256rm -f conftest.$ac_objext conftest.$ac_ext
12257fi
d3a24ed2 12258echo "$as_me:12258: result: $ac_cv_type_ptrdiff_t" >&5
f73dda09
JA
12259echo "${ECHO_T}$ac_cv_type_ptrdiff_t" >&6
12260if test $ac_cv_type_ptrdiff_t = yes; then
12261 :
12262else
12263
12264cat >>confdefs.h <<EOF
12265#define ptrdiff_t long long
12266EOF
12267
bb70624e 12268fi
bb70624e 12269
f73dda09 12270else
d3a24ed2 12271 echo "$as_me:12271: checking for ptrdiff_t" >&5
f73dda09
JA
12272echo $ECHO_N "checking for ptrdiff_t... $ECHO_C" >&6
12273if test "${ac_cv_type_ptrdiff_t+set}" = set; then
12274 echo $ECHO_N "(cached) $ECHO_C" >&6
12275else
12276 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 12277#line 12277 "configure"
f73dda09
JA
12278#include "confdefs.h"
12279$ac_includes_default
12280int
12281main ()
12282{
12283if ((ptrdiff_t *) 0)
12284 return 0;
12285if (sizeof (ptrdiff_t))
12286 return 0;
12287 ;
12288 return 0;
12289}
12290_ACEOF
12291rm -f conftest.$ac_objext
d3a24ed2 12292if { (eval echo "$as_me:12292: \"$ac_compile\"") >&5
f73dda09
JA
12293 (eval $ac_compile) 2>&5
12294 ac_status=$?
d3a24ed2 12295 echo "$as_me:12295: \$? = $ac_status" >&5
f73dda09
JA
12296 (exit $ac_status); } &&
12297 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 12298 { (eval echo "$as_me:12298: \"$ac_try\"") >&5
f73dda09
JA
12299 (eval $ac_try) 2>&5
12300 ac_status=$?
d3a24ed2 12301 echo "$as_me:12301: \$? = $ac_status" >&5
f73dda09
JA
12302 (exit $ac_status); }; }; then
12303 ac_cv_type_ptrdiff_t=yes
12304else
12305 echo "$as_me: failed program was:" >&5
12306cat conftest.$ac_ext >&5
12307ac_cv_type_ptrdiff_t=no
bb70624e 12308fi
f73dda09
JA
12309rm -f conftest.$ac_objext conftest.$ac_ext
12310fi
d3a24ed2 12311echo "$as_me:12311: result: $ac_cv_type_ptrdiff_t" >&5
f73dda09
JA
12312echo "${ECHO_T}$ac_cv_type_ptrdiff_t" >&6
12313if test $ac_cv_type_ptrdiff_t = yes; then
12314 :
12315else
12316
12317cat >>confdefs.h <<EOF
bb70624e
JA
12318#define ptrdiff_t int
12319EOF
12320
12321fi
12322
12323fi
12324
d3a24ed2 12325echo "$as_me:12325: checking whether stat file-mode macros are broken" >&5
f73dda09
JA
12326echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6
12327if test "${ac_cv_header_stat_broken+set}" = set; then
12328 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 12329else
f73dda09 12330 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 12331#line 12331 "configure"
ccc6cda3
JA
12332#include "confdefs.h"
12333#include <sys/types.h>
12334#include <sys/stat.h>
12335
12336#if defined(S_ISBLK) && defined(S_IFDIR)
12337# if S_ISBLK (S_IFDIR)
12338You lose.
12339# endif
12340#endif
12341
12342#if defined(S_ISBLK) && defined(S_IFCHR)
12343# if S_ISBLK (S_IFCHR)
12344You lose.
12345# endif
12346#endif
12347
12348#if defined(S_ISLNK) && defined(S_IFREG)
12349# if S_ISLNK (S_IFREG)
12350You lose.
12351# endif
12352#endif
12353
12354#if defined(S_ISSOCK) && defined(S_IFREG)
12355# if S_ISSOCK (S_IFREG)
12356You lose.
f73dda09
JA
12357# endif
12358#endif
12359
12360_ACEOF
12361if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12362 egrep "You lose" >/dev/null 2>&1; then
12363 ac_cv_header_stat_broken=yes
ccc6cda3 12364else
f73dda09 12365 ac_cv_header_stat_broken=no
ccc6cda3
JA
12366fi
12367rm -f conftest*
ccc6cda3
JA
12368
12369fi
d3a24ed2 12370echo "$as_me:12370: result: $ac_cv_header_stat_broken" >&5
f73dda09
JA
12371echo "${ECHO_T}$ac_cv_header_stat_broken" >&6
12372if test $ac_cv_header_stat_broken = yes; then
ccc6cda3 12373
f73dda09
JA
12374cat >>confdefs.h <<\EOF
12375#define STAT_MACROS_BROKEN 1
ccc6cda3
JA
12376EOF
12377
12378fi
12379
d3a24ed2 12380echo "$as_me:12380: checking whether #! works in shell scripts" >&5
f73dda09
JA
12381echo $ECHO_N "checking whether #! works in shell scripts... $ECHO_C" >&6
12382if test "${ac_cv_sys_interpreter+set}" = set; then
12383 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3
JA
12384else
12385 echo '#! /bin/cat
12386exit 69
f73dda09 12387' >conftest
ccc6cda3
JA
12388chmod u+x conftest
12389(SHELL=/bin/sh; export SHELL; ./conftest >/dev/null)
12390if test $? -ne 69; then
12391 ac_cv_sys_interpreter=yes
12392else
12393 ac_cv_sys_interpreter=no
12394fi
12395rm -f conftest
12396fi
d3a24ed2 12397echo "$as_me:12397: result: $ac_cv_sys_interpreter" >&5
f73dda09
JA
12398echo "${ECHO_T}$ac_cv_sys_interpreter" >&6
12399interpval=$ac_cv_sys_interpreter
ccc6cda3
JA
12400
12401if test $ac_cv_sys_interpreter = yes; then
f73dda09 12402cat >>confdefs.h <<\EOF
ccc6cda3
JA
12403#define HAVE_HASH_BANG_EXEC 1
12404EOF
12405
ccc6cda3
JA
12406fi
12407
ccc6cda3 12408if test "$ac_cv_func_lstat" = "no"; then
d3a24ed2 12409echo "$as_me:12409: checking for lstat" >&5
f73dda09
JA
12410echo $ECHO_N "checking for lstat... $ECHO_C" >&6
12411if test "${bash_cv_func_lstat+set}" = set; then
12412 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 12413else
f73dda09 12414 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 12415#line 12415 "configure"
ccc6cda3
JA
12416#include "confdefs.h"
12417
12418#include <sys/types.h>
12419#include <sys/stat.h>
12420
f73dda09
JA
12421int
12422main ()
12423{
12424 lstat(".",(struct stat *)0);
12425 ;
12426 return 0;
12427}
12428_ACEOF
12429rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 12430if { (eval echo "$as_me:12430: \"$ac_link\"") >&5
f73dda09
JA
12431 (eval $ac_link) 2>&5
12432 ac_status=$?
d3a24ed2 12433 echo "$as_me:12433: \$? = $ac_status" >&5
f73dda09
JA
12434 (exit $ac_status); } &&
12435 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 12436 { (eval echo "$as_me:12436: \"$ac_try\"") >&5
f73dda09
JA
12437 (eval $ac_try) 2>&5
12438 ac_status=$?
d3a24ed2 12439 echo "$as_me:12439: \$? = $ac_status" >&5
f73dda09 12440 (exit $ac_status); }; }; then
ccc6cda3
JA
12441 bash_cv_func_lstat=yes
12442else
f73dda09
JA
12443 echo "$as_me: failed program was:" >&5
12444cat conftest.$ac_ext >&5
12445bash_cv_func_lstat=no
ccc6cda3 12446fi
f73dda09 12447rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ccc6cda3 12448fi
d3a24ed2 12449echo "$as_me:12449: result: $bash_cv_func_lstat" >&5
f73dda09 12450echo "${ECHO_T}$bash_cv_func_lstat" >&6
ccc6cda3 12451if test $bash_cv_func_lstat = yes; then
f73dda09 12452 cat >>confdefs.h <<\EOF
ccc6cda3
JA
12453#define HAVE_LSTAT 1
12454EOF
12455
12456fi
12457
12458fi
12459
d3a24ed2
CR
12460echo "$as_me:12460: checking whether the ctype macros accept non-ascii characters" >&5
12461echo $ECHO_N "checking whether the ctype macros accept non-ascii characters... $ECHO_C" >&6
12462if test "${bash_cv_func_ctype_nonascii+set}" = set; then
12463 echo $ECHO_N "(cached) $ECHO_C" >&6
12464else
12465 if test "$cross_compiling" = yes; then
12466 { echo "$as_me:12466: WARNING: cannot check ctype macros if cross compiling -- defaulting to no" >&5
12467echo "$as_me: WARNING: cannot check ctype macros if cross compiling -- defaulting to no" >&2;}
12468 bash_cv_func_ctype_nonascii=no
12469
12470else
12471 cat >conftest.$ac_ext <<_ACEOF
12472#line 12472 "configure"
12473#include "confdefs.h"
12474
12475#ifdef HAVE_LOCALE_H
12476#include <locale.h>
12477#endif
12478#include <stdio.h>
12479#include <ctype.h>
12480
12481main(c, v)
12482int c;
12483char *v[];
12484{
12485 char *deflocale;
12486 unsigned char x;
12487 int r1, r2;
12488
12489#ifdef HAVE_SETLOCALE
12490 /* We take a shot here. If that locale is not known, try the
12491 system default. We try this one because '\342' (226) is
12492 known to be a printable character in that locale. */
12493 deflocale = setlocale(LC_ALL, "en_US.ISO8859-1");
12494 if (deflocale == 0)
12495 deflocale = setlocale(LC_ALL, "");
12496#endif
12497
12498 x = '\342';
12499 r1 = isprint(x);
12500 x -= 128;
12501 r2 = isprint(x);
12502 exit (r1 == 0 || r2 == 0);
12503}
12504
12505_ACEOF
12506rm -f conftest$ac_exeext
12507if { (eval echo "$as_me:12507: \"$ac_link\"") >&5
12508 (eval $ac_link) 2>&5
12509 ac_status=$?
12510 echo "$as_me:12510: \$? = $ac_status" >&5
12511 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12512 { (eval echo "$as_me:12512: \"$ac_try\"") >&5
12513 (eval $ac_try) 2>&5
12514 ac_status=$?
12515 echo "$as_me:12515: \$? = $ac_status" >&5
12516 (exit $ac_status); }; }; then
12517 bash_cv_func_ctype_nonascii=yes
12518else
12519 echo "$as_me: program exited with status $ac_status" >&5
12520echo "$as_me: failed program was:" >&5
12521cat conftest.$ac_ext >&5
12522bash_cv_func_ctype_nonascii=no
12523fi
12524rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12525fi
12526fi
12527
12528echo "$as_me:12528: result: $bash_cv_func_ctype_nonascii" >&5
12529echo "${ECHO_T}$bash_cv_func_ctype_nonascii" >&6
12530if test $bash_cv_func_ctype_nonascii = yes; then
12531cat >>confdefs.h <<\EOF
12532#define CTYPE_NON_ASCII 1
12533EOF
12534
12535fi
12536
12537echo "$as_me:12537: checking if dup2 fails to clear the close-on-exec flag" >&5
f73dda09
JA
12538echo $ECHO_N "checking if dup2 fails to clear the close-on-exec flag... $ECHO_C" >&6
12539if test "${bash_cv_dup2_broken+set}" = set; then
12540 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3
JA
12541else
12542 if test "$cross_compiling" = yes; then
d3a24ed2 12543 { echo "$as_me:12543: WARNING: cannot check dup2 if cross compiling -- defaulting to no" >&5
f73dda09 12544echo "$as_me: WARNING: cannot check dup2 if cross compiling -- defaulting to no" >&2;}
cce855bc 12545 bash_cv_dup2_broken=no
ccc6cda3 12546else
f73dda09 12547 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 12548#line 12548 "configure"
ccc6cda3
JA
12549#include "confdefs.h"
12550
12551#include <sys/types.h>
12552#include <fcntl.h>
12553main()
12554{
12555 int fd1, fd2, fl;
12556 fd1 = open("/dev/null", 2);
12557 if (fcntl(fd1, 2, 1) < 0)
12558 exit(1);
12559 fd2 = dup2(fd1, 1);
12560 if (fd2 < 0)
12561 exit(2);
12562 fl = fcntl(fd2, 1, 0);
12563 /* fl will be 1 if dup2 did not reset the close-on-exec flag. */
12564 exit(fl != 1);
12565}
12566
f73dda09
JA
12567_ACEOF
12568rm -f conftest$ac_exeext
d3a24ed2 12569if { (eval echo "$as_me:12569: \"$ac_link\"") >&5
f73dda09
JA
12570 (eval $ac_link) 2>&5
12571 ac_status=$?
d3a24ed2 12572 echo "$as_me:12572: \$? = $ac_status" >&5
f73dda09 12573 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3a24ed2 12574 { (eval echo "$as_me:12574: \"$ac_try\"") >&5
f73dda09
JA
12575 (eval $ac_try) 2>&5
12576 ac_status=$?
d3a24ed2 12577 echo "$as_me:12577: \$? = $ac_status" >&5
f73dda09 12578 (exit $ac_status); }; }; then
ccc6cda3
JA
12579 bash_cv_dup2_broken=yes
12580else
f73dda09
JA
12581 echo "$as_me: program exited with status $ac_status" >&5
12582echo "$as_me: failed program was:" >&5
12583cat conftest.$ac_ext >&5
12584bash_cv_dup2_broken=no
ccc6cda3 12585fi
f73dda09 12586rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ccc6cda3
JA
12587fi
12588
ccc6cda3
JA
12589fi
12590
d3a24ed2 12591echo "$as_me:12591: result: $bash_cv_dup2_broken" >&5
f73dda09 12592echo "${ECHO_T}$bash_cv_dup2_broken" >&6
ccc6cda3 12593if test $bash_cv_dup2_broken = yes; then
f73dda09 12594cat >>confdefs.h <<\EOF
ccc6cda3
JA
12595#define DUP2_BROKEN 1
12596EOF
12597
12598fi
12599
d3a24ed2 12600echo "$as_me:12600: checking whether pgrps need synchronization" >&5
f73dda09
JA
12601echo $ECHO_N "checking whether pgrps need synchronization... $ECHO_C" >&6
12602if test "${bash_cv_pgrp_pipe+set}" = set; then
12603 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3
JA
12604else
12605 if test "$cross_compiling" = yes; then
d3a24ed2 12606 { echo "$as_me:12606: WARNING: cannot check pgrp synchronization if cross compiling -- defaulting to no" >&5
f73dda09 12607echo "$as_me: WARNING: cannot check pgrp synchronization if cross compiling -- defaulting to no" >&2;}
cce855bc 12608 bash_cv_pgrp_pipe=no
ccc6cda3 12609else
f73dda09 12610 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 12611#line 12611 "configure"
ccc6cda3
JA
12612#include "confdefs.h"
12613
12614#ifdef HAVE_UNISTD_H
12615# include <unistd.h>
12616#endif
12617main()
12618{
12619# ifdef GETPGRP_VOID
12620# define getpgID() getpgrp()
12621# else
12622# define getpgID() getpgrp(0)
12623# define setpgid(x,y) setpgrp(x,y)
12624# endif
12625 int pid1, pid2, fds[2];
12626 int status;
12627 char ok;
12628
12629 switch (pid1 = fork()) {
12630 case -1:
12631 exit(1);
12632 case 0:
12633 setpgid(0, getpid());
12634 exit(0);
12635 }
12636 setpgid(pid1, pid1);
12637
12638 sleep(2); /* let first child die */
12639
12640 if (pipe(fds) < 0)
12641 exit(2);
12642
12643 switch (pid2 = fork()) {
12644 case -1:
12645 exit(3);
12646 case 0:
12647 setpgid(0, pid1);
12648 ok = getpgID() == pid1;
12649 write(fds[1], &ok, 1);
12650 exit(0);
12651 }
12652 setpgid(pid2, pid1);
12653
12654 close(fds[1]);
12655 if (read(fds[0], &ok, 1) != 1)
12656 exit(4);
12657 wait(&status);
12658 wait(&status);
12659 exit(ok ? 0 : 5);
12660}
12661
f73dda09
JA
12662_ACEOF
12663rm -f conftest$ac_exeext
d3a24ed2 12664if { (eval echo "$as_me:12664: \"$ac_link\"") >&5
f73dda09
JA
12665 (eval $ac_link) 2>&5
12666 ac_status=$?
d3a24ed2 12667 echo "$as_me:12667: \$? = $ac_status" >&5
f73dda09 12668 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3a24ed2 12669 { (eval echo "$as_me:12669: \"$ac_try\"") >&5
f73dda09
JA
12670 (eval $ac_try) 2>&5
12671 ac_status=$?
d3a24ed2 12672 echo "$as_me:12672: \$? = $ac_status" >&5
f73dda09 12673 (exit $ac_status); }; }; then
ccc6cda3
JA
12674 bash_cv_pgrp_pipe=no
12675else
f73dda09
JA
12676 echo "$as_me: program exited with status $ac_status" >&5
12677echo "$as_me: failed program was:" >&5
12678cat conftest.$ac_ext >&5
12679bash_cv_pgrp_pipe=yes
ccc6cda3 12680fi
f73dda09 12681rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ccc6cda3
JA
12682fi
12683
ccc6cda3
JA
12684fi
12685
d3a24ed2 12686echo "$as_me:12686: result: $bash_cv_pgrp_pipe" >&5
f73dda09 12687echo "${ECHO_T}$bash_cv_pgrp_pipe" >&6
ccc6cda3 12688if test $bash_cv_pgrp_pipe = yes; then
f73dda09 12689cat >>confdefs.h <<\EOF
ccc6cda3
JA
12690#define PGRP_PIPE 1
12691EOF
12692
12693fi
12694
d3a24ed2 12695echo "$as_me:12695: checking for type of signal functions" >&5
f73dda09
JA
12696echo $ECHO_N "checking for type of signal functions... $ECHO_C" >&6
12697if test "${bash_cv_signal_vintage+set}" = set; then
12698 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 12699else
f73dda09
JA
12700
12701 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 12702#line 12702 "configure"
ccc6cda3 12703#include "confdefs.h"
d166f048 12704#include <signal.h>
f73dda09
JA
12705int
12706main ()
12707{
d166f048
JA
12708
12709 sigset_t ss;
12710 struct sigaction sa;
12711 sigemptyset(&ss); sigsuspend(&ss);
12712 sigaction(SIGINT, &sa, (struct sigaction *) 0);
12713 sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
f73dda09
JA
12714
12715 ;
12716 return 0;
12717}
12718_ACEOF
12719rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 12720if { (eval echo "$as_me:12720: \"$ac_link\"") >&5
f73dda09
JA
12721 (eval $ac_link) 2>&5
12722 ac_status=$?
d3a24ed2 12723 echo "$as_me:12723: \$? = $ac_status" >&5
f73dda09
JA
12724 (exit $ac_status); } &&
12725 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 12726 { (eval echo "$as_me:12726: \"$ac_try\"") >&5
f73dda09
JA
12727 (eval $ac_try) 2>&5
12728 ac_status=$?
d3a24ed2 12729 echo "$as_me:12729: \$? = $ac_status" >&5
f73dda09 12730 (exit $ac_status); }; }; then
d166f048 12731 bash_cv_signal_vintage=posix
ccc6cda3 12732else
f73dda09
JA
12733 echo "$as_me: failed program was:" >&5
12734cat conftest.$ac_ext >&5
12735
12736 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 12737#line 12737 "configure"
d166f048
JA
12738#include "confdefs.h"
12739#include <signal.h>
f73dda09
JA
12740int
12741main ()
12742{
d166f048
JA
12743
12744 int mask = sigmask(SIGINT);
12745 sigsetmask(mask); sigblock(mask); sigpause(mask);
f73dda09
JA
12746
12747 ;
12748 return 0;
12749}
12750_ACEOF
12751rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 12752if { (eval echo "$as_me:12752: \"$ac_link\"") >&5
f73dda09
JA
12753 (eval $ac_link) 2>&5
12754 ac_status=$?
d3a24ed2 12755 echo "$as_me:12755: \$? = $ac_status" >&5
f73dda09
JA
12756 (exit $ac_status); } &&
12757 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 12758 { (eval echo "$as_me:12758: \"$ac_try\"") >&5
f73dda09
JA
12759 (eval $ac_try) 2>&5
12760 ac_status=$?
d3a24ed2 12761 echo "$as_me:12761: \$? = $ac_status" >&5
f73dda09 12762 (exit $ac_status); }; }; then
d166f048
JA
12763 bash_cv_signal_vintage=4.2bsd
12764else
f73dda09
JA
12765 echo "$as_me: failed program was:" >&5
12766cat conftest.$ac_ext >&5
12767
12768 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 12769#line 12769 "configure"
d166f048
JA
12770#include "confdefs.h"
12771
12772 #include <signal.h>
12773 RETSIGTYPE foo() { }
f73dda09
JA
12774int
12775main ()
12776{
d166f048
JA
12777
12778 int mask = sigmask(SIGINT);
12779 sigset(SIGINT, foo); sigrelse(SIGINT);
12780 sighold(SIGINT); sigpause(SIGINT);
f73dda09
JA
12781
12782 ;
12783 return 0;
12784}
12785_ACEOF
12786rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 12787if { (eval echo "$as_me:12787: \"$ac_link\"") >&5
f73dda09
JA
12788 (eval $ac_link) 2>&5
12789 ac_status=$?
d3a24ed2 12790 echo "$as_me:12790: \$? = $ac_status" >&5
f73dda09
JA
12791 (exit $ac_status); } &&
12792 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 12793 { (eval echo "$as_me:12793: \"$ac_try\"") >&5
f73dda09
JA
12794 (eval $ac_try) 2>&5
12795 ac_status=$?
d3a24ed2 12796 echo "$as_me:12796: \$? = $ac_status" >&5
f73dda09 12797 (exit $ac_status); }; }; then
d166f048
JA
12798 bash_cv_signal_vintage=svr3
12799else
f73dda09
JA
12800 echo "$as_me: failed program was:" >&5
12801cat conftest.$ac_ext >&5
12802bash_cv_signal_vintage=v7
12803
d166f048 12804fi
f73dda09
JA
12805rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12806
d166f048 12807fi
f73dda09 12808rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
d166f048
JA
12809
12810fi
f73dda09 12811rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
d166f048
JA
12812
12813fi
12814
d3a24ed2 12815echo "$as_me:12815: result: $bash_cv_signal_vintage" >&5
f73dda09 12816echo "${ECHO_T}$bash_cv_signal_vintage" >&6
d166f048 12817if test "$bash_cv_signal_vintage" = posix; then
f73dda09 12818cat >>confdefs.h <<\EOF
d166f048
JA
12819#define HAVE_POSIX_SIGNALS 1
12820EOF
12821
12822elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
f73dda09 12823cat >>confdefs.h <<\EOF
d166f048
JA
12824#define HAVE_BSD_SIGNALS 1
12825EOF
12826
12827elif test "$bash_cv_signal_vintage" = svr3; then
f73dda09 12828cat >>confdefs.h <<\EOF
d166f048
JA
12829#define HAVE_USG_SIGHOLD 1
12830EOF
12831
12832fi
12833
d3a24ed2 12834echo "$as_me:12834: checking for sys_errlist and sys_nerr" >&5
f73dda09
JA
12835echo $ECHO_N "checking for sys_errlist and sys_nerr... $ECHO_C" >&6
12836if test "${bash_cv_sys_errlist+set}" = set; then
12837 echo $ECHO_N "(cached) $ECHO_C" >&6
cce855bc 12838else
f73dda09 12839 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 12840#line 12840 "configure"
cce855bc 12841#include "confdefs.h"
f73dda09
JA
12842#include <errno.h>
12843int
cce855bc
JA
12844main ()
12845{
d166f048
JA
12846extern char *sys_errlist[];
12847 extern int sys_nerr;
12848 char *msg = sys_errlist[sys_nerr - 1];
f73dda09
JA
12849 ;
12850 return 0;
12851}
12852_ACEOF
12853rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 12854if { (eval echo "$as_me:12854: \"$ac_link\"") >&5
f73dda09
JA
12855 (eval $ac_link) 2>&5
12856 ac_status=$?
d3a24ed2 12857 echo "$as_me:12857: \$? = $ac_status" >&5
f73dda09
JA
12858 (exit $ac_status); } &&
12859 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 12860 { (eval echo "$as_me:12860: \"$ac_try\"") >&5
f73dda09
JA
12861 (eval $ac_try) 2>&5
12862 ac_status=$?
d3a24ed2 12863 echo "$as_me:12863: \$? = $ac_status" >&5
f73dda09 12864 (exit $ac_status); }; }; then
d166f048
JA
12865 bash_cv_sys_errlist=yes
12866else
f73dda09
JA
12867 echo "$as_me: failed program was:" >&5
12868cat conftest.$ac_ext >&5
12869bash_cv_sys_errlist=no
d166f048 12870fi
f73dda09 12871rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
d166f048 12872fi
d3a24ed2 12873echo "$as_me:12873: result: $bash_cv_sys_errlist" >&5
f73dda09 12874echo "${ECHO_T}$bash_cv_sys_errlist" >&6
d166f048 12875if test $bash_cv_sys_errlist = yes; then
f73dda09 12876cat >>confdefs.h <<\EOF
d166f048
JA
12877#define HAVE_SYS_ERRLIST 1
12878EOF
12879
12880fi
12881
d3a24ed2 12882echo "$as_me:12882: checking for sys_siglist in system C library" >&5
f73dda09
JA
12883echo $ECHO_N "checking for sys_siglist in system C library... $ECHO_C" >&6
12884if test "${bash_cv_sys_siglist+set}" = set; then
12885 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3
JA
12886else
12887 if test "$cross_compiling" = yes; then
d3a24ed2 12888 { echo "$as_me:12888: WARNING: cannot check for sys_siglist if cross compiling -- defaulting to no" >&5
f73dda09 12889echo "$as_me: WARNING: cannot check for sys_siglist if cross compiling -- defaulting to no" >&2;}
cce855bc 12890 bash_cv_sys_siglist=no
ccc6cda3 12891else
f73dda09 12892 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 12893#line 12893 "configure"
ccc6cda3
JA
12894#include "confdefs.h"
12895
12896#include <sys/types.h>
12897#include <signal.h>
12898#ifdef HAVE_UNISTD_H
12899#include <unistd.h>
12900#endif
12901#ifndef SYS_SIGLIST_DECLARED
12902extern char *sys_siglist[];
12903#endif
12904main()
12905{
12906char *msg = sys_siglist[2];
12907exit(msg == 0);
12908}
f73dda09
JA
12909_ACEOF
12910rm -f conftest$ac_exeext
d3a24ed2 12911if { (eval echo "$as_me:12911: \"$ac_link\"") >&5
f73dda09
JA
12912 (eval $ac_link) 2>&5
12913 ac_status=$?
d3a24ed2 12914 echo "$as_me:12914: \$? = $ac_status" >&5
f73dda09 12915 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3a24ed2 12916 { (eval echo "$as_me:12916: \"$ac_try\"") >&5
f73dda09
JA
12917 (eval $ac_try) 2>&5
12918 ac_status=$?
d3a24ed2 12919 echo "$as_me:12919: \$? = $ac_status" >&5
f73dda09 12920 (exit $ac_status); }; }; then
ccc6cda3
JA
12921 bash_cv_sys_siglist=yes
12922else
f73dda09
JA
12923 echo "$as_me: program exited with status $ac_status" >&5
12924echo "$as_me: failed program was:" >&5
12925cat conftest.$ac_ext >&5
12926bash_cv_sys_siglist=no
ccc6cda3 12927fi
f73dda09 12928rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ccc6cda3 12929fi
ccc6cda3 12930fi
cce855bc 12931
d3a24ed2 12932echo "$as_me:12932: result: $bash_cv_sys_siglist" >&5
f73dda09 12933echo "${ECHO_T}$bash_cv_sys_siglist" >&6
ccc6cda3 12934if test $bash_cv_sys_siglist = yes; then
f73dda09 12935cat >>confdefs.h <<\EOF
ccc6cda3
JA
12936#define HAVE_SYS_SIGLIST 1
12937EOF
12938
12939fi
12940
d3a24ed2 12941echo "$as_me:12941: checking for _sys_siglist in signal.h or unistd.h" >&5
f73dda09
JA
12942echo $ECHO_N "checking for _sys_siglist in signal.h or unistd.h... $ECHO_C" >&6
12943if test "${bash_cv_decl_under_sys_siglist+set}" = set; then
12944 echo $ECHO_N "(cached) $ECHO_C" >&6
e8ce775d 12945else
f73dda09 12946 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 12947#line 12947 "configure"
e8ce775d
JA
12948#include "confdefs.h"
12949
12950#include <sys/types.h>
12951#include <signal.h>
12952#ifdef HAVE_UNISTD_H
12953#include <unistd.h>
12954#endif
f73dda09
JA
12955int
12956main ()
12957{
12958 char *msg = _sys_siglist[2];
12959 ;
12960 return 0;
12961}
12962_ACEOF
12963rm -f conftest.$ac_objext
d3a24ed2 12964if { (eval echo "$as_me:12964: \"$ac_compile\"") >&5
f73dda09
JA
12965 (eval $ac_compile) 2>&5
12966 ac_status=$?
d3a24ed2 12967 echo "$as_me:12967: \$? = $ac_status" >&5
f73dda09
JA
12968 (exit $ac_status); } &&
12969 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 12970 { (eval echo "$as_me:12970: \"$ac_try\"") >&5
f73dda09
JA
12971 (eval $ac_try) 2>&5
12972 ac_status=$?
d3a24ed2 12973 echo "$as_me:12973: \$? = $ac_status" >&5
f73dda09 12974 (exit $ac_status); }; }; then
e8ce775d
JA
12975 bash_cv_decl_under_sys_siglist=yes
12976else
f73dda09
JA
12977 echo "$as_me: failed program was:" >&5
12978cat conftest.$ac_ext >&5
12979bash_cv_decl_under_sys_siglist=no
e8ce775d 12980fi
f73dda09 12981rm -f conftest.$ac_objext conftest.$ac_ext
e8ce775d 12982fi
d3a24ed2 12983echo "$as_me:12983: result: $bash_cv_decl_under_sys_siglist" >&5
f73dda09 12984echo "${ECHO_T}$bash_cv_decl_under_sys_siglist" >&6
e8ce775d 12985if test $bash_cv_decl_under_sys_siglist = yes; then
f73dda09 12986cat >>confdefs.h <<\EOF
e8ce775d
JA
12987#define UNDER_SYS_SIGLIST_DECLARED 1
12988EOF
12989
12990fi
12991
d3a24ed2 12992echo "$as_me:12992: checking for _sys_siglist in system C library" >&5
f73dda09
JA
12993echo $ECHO_N "checking for _sys_siglist in system C library... $ECHO_C" >&6
12994if test "${bash_cv_under_sys_siglist+set}" = set; then
12995 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3
JA
12996else
12997 if test "$cross_compiling" = yes; then
d3a24ed2 12998 { echo "$as_me:12998: WARNING: cannot check for _sys_siglist if cross compiling -- defaulting to no" >&5
f73dda09 12999echo "$as_me: WARNING: cannot check for _sys_siglist if cross compiling -- defaulting to no" >&2;}
cce855bc 13000 bash_cv_under_sys_siglist=no
ccc6cda3 13001else
f73dda09 13002 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 13003#line 13003 "configure"
ccc6cda3
JA
13004#include "confdefs.h"
13005
13006#include <sys/types.h>
13007#include <signal.h>
13008#ifdef HAVE_UNISTD_H
13009#include <unistd.h>
13010#endif
e8ce775d 13011#ifndef UNDER_SYS_SIGLIST_DECLARED
ccc6cda3
JA
13012extern char *_sys_siglist[];
13013#endif
13014main()
13015{
e8ce775d 13016char *msg = (char *)_sys_siglist[2];
ccc6cda3
JA
13017exit(msg == 0);
13018}
f73dda09
JA
13019_ACEOF
13020rm -f conftest$ac_exeext
d3a24ed2 13021if { (eval echo "$as_me:13021: \"$ac_link\"") >&5
f73dda09
JA
13022 (eval $ac_link) 2>&5
13023 ac_status=$?
d3a24ed2 13024 echo "$as_me:13024: \$? = $ac_status" >&5
f73dda09 13025 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3a24ed2 13026 { (eval echo "$as_me:13026: \"$ac_try\"") >&5
f73dda09
JA
13027 (eval $ac_try) 2>&5
13028 ac_status=$?
d3a24ed2 13029 echo "$as_me:13029: \$? = $ac_status" >&5
f73dda09 13030 (exit $ac_status); }; }; then
ccc6cda3
JA
13031 bash_cv_under_sys_siglist=yes
13032else
f73dda09
JA
13033 echo "$as_me: program exited with status $ac_status" >&5
13034echo "$as_me: failed program was:" >&5
13035cat conftest.$ac_ext >&5
13036bash_cv_under_sys_siglist=no
ccc6cda3 13037fi
f73dda09 13038rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ccc6cda3 13039fi
ccc6cda3 13040fi
cce855bc 13041
d3a24ed2 13042echo "$as_me:13042: result: $bash_cv_under_sys_siglist" >&5
f73dda09 13043echo "${ECHO_T}$bash_cv_under_sys_siglist" >&6
ccc6cda3 13044if test $bash_cv_under_sys_siglist = yes; then
f73dda09 13045cat >>confdefs.h <<\EOF
ccc6cda3
JA
13046#define HAVE_UNDER_SYS_SIGLIST 1
13047EOF
13048
13049fi
13050
d3a24ed2 13051echo "$as_me:13051: checking whether signal handlers are of type void" >&5
f73dda09
JA
13052echo $ECHO_N "checking whether signal handlers are of type void... $ECHO_C" >&6
13053if test "${bash_cv_void_sighandler+set}" = set; then
13054 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 13055else
f73dda09 13056 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 13057#line 13057 "configure"
ccc6cda3
JA
13058#include "confdefs.h"
13059#include <sys/types.h>
13060#include <signal.h>
13061#ifdef signal
13062#undef signal
13063#endif
13064#ifdef __cplusplus
13065extern "C"
13066#endif
13067void (*signal ()) ();
f73dda09
JA
13068int
13069main ()
13070{
ccc6cda3 13071int i;
f73dda09
JA
13072 ;
13073 return 0;
13074}
13075_ACEOF
13076rm -f conftest.$ac_objext
d3a24ed2 13077if { (eval echo "$as_me:13077: \"$ac_compile\"") >&5
f73dda09
JA
13078 (eval $ac_compile) 2>&5
13079 ac_status=$?
d3a24ed2 13080 echo "$as_me:13080: \$? = $ac_status" >&5
f73dda09
JA
13081 (exit $ac_status); } &&
13082 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 13083 { (eval echo "$as_me:13083: \"$ac_try\"") >&5
f73dda09
JA
13084 (eval $ac_try) 2>&5
13085 ac_status=$?
d3a24ed2 13086 echo "$as_me:13086: \$? = $ac_status" >&5
f73dda09 13087 (exit $ac_status); }; }; then
ccc6cda3
JA
13088 bash_cv_void_sighandler=yes
13089else
f73dda09
JA
13090 echo "$as_me: failed program was:" >&5
13091cat conftest.$ac_ext >&5
13092bash_cv_void_sighandler=no
ccc6cda3 13093fi
f73dda09 13094rm -f conftest.$ac_objext conftest.$ac_ext
ccc6cda3 13095fi
d3a24ed2 13096echo "$as_me:13096: result: $bash_cv_void_sighandler" >&5
f73dda09 13097echo "${ECHO_T}$bash_cv_void_sighandler" >&6
ccc6cda3 13098if test $bash_cv_void_sighandler = yes; then
f73dda09 13099cat >>confdefs.h <<\EOF
ccc6cda3
JA
13100#define VOID_SIGHANDLER 1
13101EOF
13102
13103fi
13104
d3a24ed2 13105echo "$as_me:13105: checking for clock_t" >&5
f73dda09
JA
13106echo $ECHO_N "checking for clock_t... $ECHO_C" >&6
13107if test "${bash_cv_type_clock_t+set}" = set; then
13108 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 13109else
f73dda09 13110 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 13111#line 13111 "configure"
ccc6cda3
JA
13112#include "confdefs.h"
13113#include <sys/types.h>
13114#if STDC_HEADERS
13115#include <stdlib.h>
f73dda09
JA
13116#include <stddef.h>
13117#endif
13118#if HAVE_INTTYPES_H
13119#include <inttypes.h>
ccc6cda3
JA
13120#endif
13121#include <sys/times.h>
13122
f73dda09 13123_ACEOF
ccc6cda3
JA
13124if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13125 egrep "clock_t" >/dev/null 2>&1; then
ccc6cda3
JA
13126 bash_cv_type_clock_t=yes
13127else
ccc6cda3
JA
13128 bash_cv_type_clock_t=no
13129fi
13130rm -f conftest*
13131
13132fi
13133
d3a24ed2 13134echo "$as_me:13134: result: $bash_cv_type_clock_t" >&5
f73dda09 13135echo "${ECHO_T}$bash_cv_type_clock_t" >&6
ccc6cda3
JA
13136
13137if test $bash_cv_type_clock_t = no; then
f73dda09 13138 cat >>confdefs.h <<EOF
ccc6cda3
JA
13139#define clock_t long
13140EOF
13141
13142fi
13143
d3a24ed2 13144echo "$as_me:13144: checking for sigset_t" >&5
f73dda09
JA
13145echo $ECHO_N "checking for sigset_t... $ECHO_C" >&6
13146if test "${bash_cv_type_sigset_t+set}" = set; then
13147 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 13148else
f73dda09 13149 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 13150#line 13150 "configure"
ccc6cda3
JA
13151#include "confdefs.h"
13152#include <sys/types.h>
13153#if STDC_HEADERS
13154#include <stdlib.h>
f73dda09
JA
13155#include <stddef.h>
13156#endif
13157#if HAVE_INTTYPES_H
13158#include <inttypes.h>
ccc6cda3
JA
13159#endif
13160#include <signal.h>
13161
f73dda09 13162_ACEOF
ccc6cda3
JA
13163if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13164 egrep "sigset_t" >/dev/null 2>&1; then
ccc6cda3
JA
13165 bash_cv_type_sigset_t=yes
13166else
ccc6cda3
JA
13167 bash_cv_type_sigset_t=no
13168fi
13169rm -f conftest*
13170
13171fi
13172
d3a24ed2 13173echo "$as_me:13173: result: $bash_cv_type_sigset_t" >&5
f73dda09 13174echo "${ECHO_T}$bash_cv_type_sigset_t" >&6
ccc6cda3
JA
13175
13176if test $bash_cv_type_sigset_t = no; then
f73dda09 13177 cat >>confdefs.h <<EOF
ccc6cda3
JA
13178#define sigset_t int
13179EOF
13180
13181fi
13182
d3a24ed2 13183echo "$as_me:13183: checking for quad_t" >&5
f73dda09
JA
13184echo $ECHO_N "checking for quad_t... $ECHO_C" >&6
13185if test "${bash_cv_type_quad_t+set}" = set; then
13186 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 13187else
f73dda09 13188 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 13189#line 13189 "configure"
ccc6cda3
JA
13190#include "confdefs.h"
13191#include <sys/types.h>
13192#if STDC_HEADERS
13193#include <stdlib.h>
f73dda09
JA
13194#include <stddef.h>
13195#endif
13196#if HAVE_INTTYPES_H
13197#include <inttypes.h>
ccc6cda3
JA
13198#endif
13199
f73dda09 13200_ACEOF
ccc6cda3
JA
13201if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13202 egrep "quad_t" >/dev/null 2>&1; then
ccc6cda3
JA
13203 bash_cv_type_quad_t=yes
13204else
ccc6cda3
JA
13205 bash_cv_type_quad_t=no
13206fi
13207rm -f conftest*
13208
13209fi
13210
d3a24ed2 13211echo "$as_me:13211: result: $bash_cv_type_quad_t" >&5
f73dda09 13212echo "${ECHO_T}$bash_cv_type_quad_t" >&6
ccc6cda3 13213if test $bash_cv_type_quad_t = yes; then
f73dda09 13214 cat >>confdefs.h <<\EOF
ccc6cda3
JA
13215#define HAVE_QUAD_T 1
13216EOF
13217
13218 fi
13219if test $bash_cv_type_quad_t = no; then
f73dda09 13220 cat >>confdefs.h <<EOF
ccc6cda3
JA
13221#define quad_t long
13222EOF
13223
13224fi
13225
d3a24ed2 13226echo "$as_me:13226: checking for intmax_t" >&5
f73dda09
JA
13227echo $ECHO_N "checking for intmax_t... $ECHO_C" >&6
13228if test "${bash_cv_type_intmax_t+set}" = set; then
13229 echo $ECHO_N "(cached) $ECHO_C" >&6
13230else
13231 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 13232#line 13232 "configure"
f73dda09
JA
13233#include "confdefs.h"
13234#include <sys/types.h>
13235#if STDC_HEADERS
13236#include <stdlib.h>
13237#include <stddef.h>
13238#endif
13239#if HAVE_INTTYPES_H
13240#include <inttypes.h>
13241#endif
13242
13243_ACEOF
13244if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13245 egrep "intmax_t" >/dev/null 2>&1; then
13246 bash_cv_type_intmax_t=yes
13247else
13248 bash_cv_type_intmax_t=no
13249fi
13250rm -f conftest*
13251
13252fi
13253
d3a24ed2 13254echo "$as_me:13254: result: $bash_cv_type_intmax_t" >&5
f73dda09
JA
13255echo "${ECHO_T}$bash_cv_type_intmax_t" >&6
13256
13257if test $bash_cv_type_intmax_t = no; then
13258 cat >>confdefs.h <<EOF
13259#define intmax_t $bash_cv_type_long_long
13260EOF
13261
13262fi
13263
d3a24ed2 13264echo "$as_me:13264: checking for uintmax_t" >&5
f73dda09
JA
13265echo $ECHO_N "checking for uintmax_t... $ECHO_C" >&6
13266if test "${bash_cv_type_uintmax_t+set}" = set; then
13267 echo $ECHO_N "(cached) $ECHO_C" >&6
13268else
13269 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 13270#line 13270 "configure"
f73dda09
JA
13271#include "confdefs.h"
13272#include <sys/types.h>
13273#if STDC_HEADERS
13274#include <stdlib.h>
13275#include <stddef.h>
13276#endif
13277#if HAVE_INTTYPES_H
13278#include <inttypes.h>
13279#endif
13280
13281_ACEOF
13282if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13283 egrep "uintmax_t" >/dev/null 2>&1; then
13284 bash_cv_type_uintmax_t=yes
13285else
13286 bash_cv_type_uintmax_t=no
13287fi
13288rm -f conftest*
13289
13290fi
13291
d3a24ed2 13292echo "$as_me:13292: result: $bash_cv_type_uintmax_t" >&5
f73dda09
JA
13293echo "${ECHO_T}$bash_cv_type_uintmax_t" >&6
13294
13295if test $bash_cv_type_uintmax_t = no; then
13296 cat >>confdefs.h <<EOF
13297#define uintmax_t $bash_cv_type_unsigned_long_long
13298EOF
13299
13300fi
13301
13302if test "$ac_cv_header_sys_socket_h" = "yes"; then
13303
d3a24ed2 13304echo "$as_me:13304: checking for socklen_t" >&5
f73dda09
JA
13305echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
13306if test "${bash_cv_type_socklen_t+set}" = set; then
13307 echo $ECHO_N "(cached) $ECHO_C" >&6
13308else
13309 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 13310#line 13310 "configure"
f73dda09
JA
13311#include "confdefs.h"
13312#include <sys/types.h>
13313#if STDC_HEADERS
13314#include <stdlib.h>
13315#include <stddef.h>
13316#endif
13317#if HAVE_INTTYPES_H
13318#include <inttypes.h>
13319#endif
13320#include <sys/socket.h>
13321
13322_ACEOF
13323if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13324 egrep "socklen_t" >/dev/null 2>&1; then
13325 bash_cv_type_socklen_t=yes
13326else
13327 bash_cv_type_socklen_t=no
13328fi
13329rm -f conftest*
13330
13331fi
13332
d3a24ed2 13333echo "$as_me:13333: result: $bash_cv_type_socklen_t" >&5
f73dda09
JA
13334echo "${ECHO_T}$bash_cv_type_socklen_t" >&6
13335if test $bash_cv_type_socklen_t = yes; then
13336 cat >>confdefs.h <<\EOF
13337#define HAVE_SOCKLEN_T 1
13338EOF
13339
13340 fi
13341if test $bash_cv_type_socklen_t = no; then
13342 cat >>confdefs.h <<EOF
13343#define socklen_t int
13344EOF
13345
13346fi
13347
13348fi
d3a24ed2 13349echo "$as_me:13349: checking for size and type of struct rlimit fields" >&5
f73dda09
JA
13350echo $ECHO_N "checking for size and type of struct rlimit fields... $ECHO_C" >&6
13351if test "${bash_cv_type_rlimit+set}" = set; then
13352 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 13353else
f73dda09 13354 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 13355#line 13355 "configure"
ccc6cda3
JA
13356#include "confdefs.h"
13357#include <sys/types.h>
cce855bc 13358#include <sys/resource.h>
f73dda09
JA
13359int
13360main ()
13361{
ccc6cda3 13362rlim_t xxx;
f73dda09
JA
13363 ;
13364 return 0;
13365}
13366_ACEOF
13367rm -f conftest.$ac_objext
d3a24ed2 13368if { (eval echo "$as_me:13368: \"$ac_compile\"") >&5
f73dda09
JA
13369 (eval $ac_compile) 2>&5
13370 ac_status=$?
d3a24ed2 13371 echo "$as_me:13371: \$? = $ac_status" >&5
f73dda09
JA
13372 (exit $ac_status); } &&
13373 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 13374 { (eval echo "$as_me:13374: \"$ac_try\"") >&5
f73dda09
JA
13375 (eval $ac_try) 2>&5
13376 ac_status=$?
d3a24ed2 13377 echo "$as_me:13377: \$? = $ac_status" >&5
f73dda09 13378 (exit $ac_status); }; }; then
ccc6cda3
JA
13379 bash_cv_type_rlimit=rlim_t
13380else
f73dda09
JA
13381 echo "$as_me: failed program was:" >&5
13382cat conftest.$ac_ext >&5
13383
ccc6cda3 13384if test "$cross_compiling" = yes; then
d3a24ed2 13385 { echo "$as_me:13385: WARNING: cannot check quad_t if cross compiling -- defaulting to long" >&5
f73dda09 13386echo "$as_me: WARNING: cannot check quad_t if cross compiling -- defaulting to long" >&2;}
cce855bc 13387 bash_cv_type_rlimit=long
ccc6cda3 13388else
f73dda09 13389 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 13390#line 13390 "configure"
ccc6cda3
JA
13391#include "confdefs.h"
13392
13393#include <sys/types.h>
13394#include <sys/time.h>
13395#include <sys/resource.h>
13396main()
13397{
13398#ifdef HAVE_QUAD_T
13399 struct rlimit rl;
13400 if (sizeof(rl.rlim_cur) == sizeof(quad_t))
13401 exit(0);
13402#endif
13403 exit(1);
13404}
f73dda09
JA
13405_ACEOF
13406rm -f conftest$ac_exeext
d3a24ed2 13407if { (eval echo "$as_me:13407: \"$ac_link\"") >&5
f73dda09
JA
13408 (eval $ac_link) 2>&5
13409 ac_status=$?
d3a24ed2 13410 echo "$as_me:13410: \$? = $ac_status" >&5
f73dda09 13411 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3a24ed2 13412 { (eval echo "$as_me:13412: \"$ac_try\"") >&5
f73dda09
JA
13413 (eval $ac_try) 2>&5
13414 ac_status=$?
d3a24ed2 13415 echo "$as_me:13415: \$? = $ac_status" >&5
f73dda09 13416 (exit $ac_status); }; }; then
ccc6cda3
JA
13417 bash_cv_type_rlimit=quad_t
13418else
f73dda09
JA
13419 echo "$as_me: program exited with status $ac_status" >&5
13420echo "$as_me: failed program was:" >&5
13421cat conftest.$ac_ext >&5
13422bash_cv_type_rlimit=long
ccc6cda3 13423fi
f73dda09 13424rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ccc6cda3 13425fi
ccc6cda3 13426fi
f73dda09 13427rm -f conftest.$ac_objext conftest.$ac_ext
ccc6cda3
JA
13428
13429fi
13430
d3a24ed2 13431echo "$as_me:13431: result: $bash_cv_type_rlimit" >&5
f73dda09 13432echo "${ECHO_T}$bash_cv_type_rlimit" >&6
ccc6cda3 13433if test $bash_cv_type_rlimit = quad_t; then
f73dda09 13434cat >>confdefs.h <<\EOF
ccc6cda3
JA
13435#define RLIMTYPE quad_t
13436EOF
13437
13438elif test $bash_cv_type_rlimit = rlim_t; then
f73dda09 13439cat >>confdefs.h <<\EOF
ccc6cda3
JA
13440#define RLIMTYPE rlim_t
13441EOF
13442
13443fi
13444
d3a24ed2 13445echo "$as_me:13445: checking for struct termios.c_line" >&5
f73dda09
JA
13446echo $ECHO_N "checking for struct termios.c_line... $ECHO_C" >&6
13447if test "${ac_cv_member_struct_termios_c_line+set}" = set; then
13448 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 13449else
f73dda09 13450 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 13451#line 13451 "configure"
ccc6cda3 13452#include "confdefs.h"
f73dda09 13453
ccc6cda3
JA
13454#include <sys/types.h>
13455#include <termios.h>
f73dda09
JA
13456
13457int
13458main ()
13459{
13460static struct termios ac_aggr;
13461if (ac_aggr.c_line)
13462return 0;
13463 ;
13464 return 0;
13465}
13466_ACEOF
13467rm -f conftest.$ac_objext
d3a24ed2 13468if { (eval echo "$as_me:13468: \"$ac_compile\"") >&5
f73dda09
JA
13469 (eval $ac_compile) 2>&5
13470 ac_status=$?
d3a24ed2 13471 echo "$as_me:13471: \$? = $ac_status" >&5
f73dda09
JA
13472 (exit $ac_status); } &&
13473 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 13474 { (eval echo "$as_me:13474: \"$ac_try\"") >&5
f73dda09
JA
13475 (eval $ac_try) 2>&5
13476 ac_status=$?
d3a24ed2 13477 echo "$as_me:13477: \$? = $ac_status" >&5
f73dda09
JA
13478 (exit $ac_status); }; }; then
13479 ac_cv_member_struct_termios_c_line=yes
13480else
13481 echo "$as_me: failed program was:" >&5
13482cat conftest.$ac_ext >&5
13483ac_cv_member_struct_termios_c_line=no
13484fi
13485rm -f conftest.$ac_objext conftest.$ac_ext
13486fi
d3a24ed2 13487echo "$as_me:13487: result: $ac_cv_member_struct_termios_c_line" >&5
f73dda09
JA
13488echo "${ECHO_T}$ac_cv_member_struct_termios_c_line" >&6
13489if test $ac_cv_member_struct_termios_c_line = yes; then
13490 cat >>confdefs.h <<\EOF
ccc6cda3
JA
13491#define TERMIOS_LDISC 1
13492EOF
13493
13494fi
13495
d3a24ed2 13496echo "$as_me:13496: checking for struct termio.c_line" >&5
f73dda09
JA
13497echo $ECHO_N "checking for struct termio.c_line... $ECHO_C" >&6
13498if test "${ac_cv_member_struct_termio_c_line+set}" = set; then
13499 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 13500else
f73dda09 13501 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 13502#line 13502 "configure"
ccc6cda3 13503#include "confdefs.h"
f73dda09 13504
ccc6cda3
JA
13505#include <sys/types.h>
13506#include <termio.h>
f73dda09
JA
13507
13508int
13509main ()
13510{
13511static struct termio ac_aggr;
13512if (ac_aggr.c_line)
13513return 0;
13514 ;
13515 return 0;
13516}
13517_ACEOF
13518rm -f conftest.$ac_objext
d3a24ed2 13519if { (eval echo "$as_me:13519: \"$ac_compile\"") >&5
f73dda09
JA
13520 (eval $ac_compile) 2>&5
13521 ac_status=$?
d3a24ed2 13522 echo "$as_me:13522: \$? = $ac_status" >&5
f73dda09
JA
13523 (exit $ac_status); } &&
13524 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 13525 { (eval echo "$as_me:13525: \"$ac_try\"") >&5
f73dda09
JA
13526 (eval $ac_try) 2>&5
13527 ac_status=$?
d3a24ed2 13528 echo "$as_me:13528: \$? = $ac_status" >&5
f73dda09
JA
13529 (exit $ac_status); }; }; then
13530 ac_cv_member_struct_termio_c_line=yes
13531else
13532 echo "$as_me: failed program was:" >&5
13533cat conftest.$ac_ext >&5
13534ac_cv_member_struct_termio_c_line=no
13535fi
13536rm -f conftest.$ac_objext conftest.$ac_ext
13537fi
d3a24ed2 13538echo "$as_me:13538: result: $ac_cv_member_struct_termio_c_line" >&5
f73dda09
JA
13539echo "${ECHO_T}$ac_cv_member_struct_termio_c_line" >&6
13540if test $ac_cv_member_struct_termio_c_line = yes; then
13541 cat >>confdefs.h <<\EOF
ccc6cda3
JA
13542#define TERMIO_LDISC 1
13543EOF
13544
13545fi
13546
d3a24ed2 13547echo "$as_me:13547: checking if struct dirent has a d_ino member" >&5
f73dda09
JA
13548echo $ECHO_N "checking if struct dirent has a d_ino member... $ECHO_C" >&6
13549if test "${bash_cv_dirent_has_dino+set}" = set; then
13550 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 13551else
f73dda09 13552 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 13553#line 13553 "configure"
ccc6cda3
JA
13554#include "confdefs.h"
13555
13556#include <stdio.h>
13557#include <sys/types.h>
13558#ifdef HAVE_UNISTD_H
13559# include <unistd.h>
13560#endif /* HAVE_UNISTD_H */
13561#if defined(HAVE_DIRENT_H)
13562# include <dirent.h>
13563#else
13564# define dirent direct
13565# ifdef HAVE_SYS_NDIR_H
13566# include <sys/ndir.h>
13567# endif /* SYSNDIR */
13568# ifdef HAVE_SYS_DIR_H
13569# include <sys/dir.h>
13570# endif /* SYSDIR */
13571# ifdef HAVE_NDIR_H
13572# include <ndir.h>
13573# endif
13574#endif /* HAVE_DIRENT_H */
13575
f73dda09
JA
13576int
13577main ()
13578{
ccc6cda3
JA
13579
13580struct dirent d; int z; z = d.d_ino;
13581
f73dda09
JA
13582 ;
13583 return 0;
13584}
13585_ACEOF
13586rm -f conftest.$ac_objext
d3a24ed2 13587if { (eval echo "$as_me:13587: \"$ac_compile\"") >&5
f73dda09
JA
13588 (eval $ac_compile) 2>&5
13589 ac_status=$?
d3a24ed2 13590 echo "$as_me:13590: \$? = $ac_status" >&5
f73dda09
JA
13591 (exit $ac_status); } &&
13592 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 13593 { (eval echo "$as_me:13593: \"$ac_try\"") >&5
f73dda09
JA
13594 (eval $ac_try) 2>&5
13595 ac_status=$?
d3a24ed2 13596 echo "$as_me:13596: \$? = $ac_status" >&5
f73dda09 13597 (exit $ac_status); }; }; then
ccc6cda3
JA
13598 bash_cv_dirent_has_dino=yes
13599else
f73dda09
JA
13600 echo "$as_me: failed program was:" >&5
13601cat conftest.$ac_ext >&5
13602bash_cv_dirent_has_dino=no
ccc6cda3 13603fi
f73dda09 13604rm -f conftest.$ac_objext conftest.$ac_ext
ccc6cda3
JA
13605fi
13606
d3a24ed2 13607echo "$as_me:13607: result: $bash_cv_dirent_has_dino" >&5
f73dda09 13608echo "${ECHO_T}$bash_cv_dirent_has_dino" >&6
ccc6cda3 13609if test $bash_cv_dirent_has_dino = yes; then
f73dda09 13610cat >>confdefs.h <<\EOF
ccc6cda3
JA
13611#define STRUCT_DIRENT_HAS_D_INO 1
13612EOF
13613
13614fi
13615
d3a24ed2 13616echo "$as_me:13616: checking if struct dirent has a d_fileno member" >&5
f73dda09
JA
13617echo $ECHO_N "checking if struct dirent has a d_fileno member... $ECHO_C" >&6
13618if test "${bash_cv_dirent_has_d_fileno+set}" = set; then
13619 echo $ECHO_N "(cached) $ECHO_C" >&6
d166f048 13620else
f73dda09 13621 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 13622#line 13622 "configure"
d166f048
JA
13623#include "confdefs.h"
13624
13625#include <stdio.h>
13626#include <sys/types.h>
13627#ifdef HAVE_UNISTD_H
13628# include <unistd.h>
13629#endif /* HAVE_UNISTD_H */
13630#if defined(HAVE_DIRENT_H)
13631# include <dirent.h>
13632#else
13633# define dirent direct
13634# ifdef HAVE_SYS_NDIR_H
13635# include <sys/ndir.h>
13636# endif /* SYSNDIR */
13637# ifdef HAVE_SYS_DIR_H
13638# include <sys/dir.h>
13639# endif /* SYSDIR */
13640# ifdef HAVE_NDIR_H
13641# include <ndir.h>
13642# endif
13643#endif /* HAVE_DIRENT_H */
13644
f73dda09
JA
13645int
13646main ()
13647{
d166f048
JA
13648
13649struct dirent d; int z; z = d.d_fileno;
13650
f73dda09
JA
13651 ;
13652 return 0;
13653}
13654_ACEOF
13655rm -f conftest.$ac_objext
d3a24ed2 13656if { (eval echo "$as_me:13656: \"$ac_compile\"") >&5
f73dda09
JA
13657 (eval $ac_compile) 2>&5
13658 ac_status=$?
d3a24ed2 13659 echo "$as_me:13659: \$? = $ac_status" >&5
f73dda09
JA
13660 (exit $ac_status); } &&
13661 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 13662 { (eval echo "$as_me:13662: \"$ac_try\"") >&5
f73dda09
JA
13663 (eval $ac_try) 2>&5
13664 ac_status=$?
d3a24ed2 13665 echo "$as_me:13665: \$? = $ac_status" >&5
f73dda09 13666 (exit $ac_status); }; }; then
d166f048
JA
13667 bash_cv_dirent_has_d_fileno=yes
13668else
f73dda09
JA
13669 echo "$as_me: failed program was:" >&5
13670cat conftest.$ac_ext >&5
13671bash_cv_dirent_has_d_fileno=no
d166f048 13672fi
f73dda09 13673rm -f conftest.$ac_objext conftest.$ac_ext
d166f048
JA
13674fi
13675
d3a24ed2 13676echo "$as_me:13676: result: $bash_cv_dirent_has_d_fileno" >&5
f73dda09 13677echo "${ECHO_T}$bash_cv_dirent_has_d_fileno" >&6
d166f048 13678if test $bash_cv_dirent_has_d_fileno = yes; then
f73dda09 13679cat >>confdefs.h <<\EOF
d166f048
JA
13680#define STRUCT_DIRENT_HAS_D_FILENO 1
13681EOF
13682
13683fi
13684
d3a24ed2 13685echo "$as_me:13685: checking for struct winsize in sys/ioctl.h and termios.h" >&5
f73dda09
JA
13686echo $ECHO_N "checking for struct winsize in sys/ioctl.h and termios.h... $ECHO_C" >&6
13687if test "${bash_cv_struct_winsize_header+set}" = set; then
13688 echo $ECHO_N "(cached) $ECHO_C" >&6
d166f048 13689else
f73dda09 13690 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 13691#line 13691 "configure"
d166f048
JA
13692#include "confdefs.h"
13693#include <sys/types.h>
13694#include <sys/ioctl.h>
f73dda09
JA
13695int
13696main ()
13697{
d166f048 13698struct winsize x;
f73dda09
JA
13699 ;
13700 return 0;
13701}
13702_ACEOF
13703rm -f conftest.$ac_objext
d3a24ed2 13704if { (eval echo "$as_me:13704: \"$ac_compile\"") >&5
f73dda09
JA
13705 (eval $ac_compile) 2>&5
13706 ac_status=$?
d3a24ed2 13707 echo "$as_me:13707: \$? = $ac_status" >&5
f73dda09
JA
13708 (exit $ac_status); } &&
13709 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 13710 { (eval echo "$as_me:13710: \"$ac_try\"") >&5
f73dda09
JA
13711 (eval $ac_try) 2>&5
13712 ac_status=$?
d3a24ed2 13713 echo "$as_me:13713: \$? = $ac_status" >&5
f73dda09 13714 (exit $ac_status); }; }; then
cce855bc
JA
13715 bash_cv_struct_winsize_header=ioctl_h
13716else
f73dda09
JA
13717 echo "$as_me: failed program was:" >&5
13718cat conftest.$ac_ext >&5
13719cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 13720#line 13720 "configure"
cce855bc
JA
13721#include "confdefs.h"
13722#include <sys/types.h>
13723#include <termios.h>
f73dda09
JA
13724int
13725main ()
13726{
cce855bc 13727struct winsize x;
f73dda09
JA
13728 ;
13729 return 0;
13730}
13731_ACEOF
13732rm -f conftest.$ac_objext
d3a24ed2 13733if { (eval echo "$as_me:13733: \"$ac_compile\"") >&5
f73dda09
JA
13734 (eval $ac_compile) 2>&5
13735 ac_status=$?
d3a24ed2 13736 echo "$as_me:13736: \$? = $ac_status" >&5
f73dda09
JA
13737 (exit $ac_status); } &&
13738 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 13739 { (eval echo "$as_me:13739: \"$ac_try\"") >&5
f73dda09
JA
13740 (eval $ac_try) 2>&5
13741 ac_status=$?
d3a24ed2 13742 echo "$as_me:13742: \$? = $ac_status" >&5
f73dda09 13743 (exit $ac_status); }; }; then
cce855bc 13744 bash_cv_struct_winsize_header=termios_h
d166f048 13745else
f73dda09
JA
13746 echo "$as_me: failed program was:" >&5
13747cat conftest.$ac_ext >&5
13748bash_cv_struct_winsize_header=other
cce855bc 13749fi
f73dda09 13750rm -f conftest.$ac_objext conftest.$ac_ext
cce855bc 13751
d166f048 13752fi
f73dda09 13753rm -f conftest.$ac_objext conftest.$ac_ext
d166f048
JA
13754fi
13755
cce855bc 13756if test $bash_cv_struct_winsize_header = ioctl_h; then
d3a24ed2 13757 echo "$as_me:13757: result: sys/ioctl.h" >&5
f73dda09
JA
13758echo "${ECHO_T}sys/ioctl.h" >&6
13759 cat >>confdefs.h <<\EOF
d166f048
JA
13760#define STRUCT_WINSIZE_IN_SYS_IOCTL 1
13761EOF
13762
cce855bc 13763elif test $bash_cv_struct_winsize_header = termios_h; then
d3a24ed2 13764 echo "$as_me:13764: result: termios.h" >&5
f73dda09
JA
13765echo "${ECHO_T}termios.h" >&6
13766 cat >>confdefs.h <<\EOF
cce855bc
JA
13767#define STRUCT_WINSIZE_IN_TERMIOS 1
13768EOF
13769
13770else
d3a24ed2 13771 echo "$as_me:13771: result: not found" >&5
f73dda09 13772echo "${ECHO_T}not found" >&6
d166f048
JA
13773fi
13774
d3a24ed2 13775echo "$as_me:13775: checking for struct timeval in sys/time.h and time.h" >&5
f73dda09
JA
13776echo $ECHO_N "checking for struct timeval in sys/time.h and time.h... $ECHO_C" >&6
13777if test "${bash_cv_struct_timeval+set}" = set; then
13778 echo $ECHO_N "(cached) $ECHO_C" >&6
bb70624e 13779else
f73dda09
JA
13780
13781cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 13782#line 13782 "configure"
bb70624e
JA
13783#include "confdefs.h"
13784#include <sys/time.h>
f73dda09
JA
13785
13786_ACEOF
bb70624e
JA
13787if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13788 egrep "struct timeval" >/dev/null 2>&1; then
bb70624e
JA
13789 bash_cv_struct_timeval=yes
13790else
f73dda09 13791 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 13792#line 13792 "configure"
bb70624e
JA
13793#include "confdefs.h"
13794#include <time.h>
f73dda09
JA
13795
13796_ACEOF
bb70624e
JA
13797if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13798 egrep "struct timeval" >/dev/null 2>&1; then
bb70624e
JA
13799 bash_cv_struct_timeval=yes
13800else
bb70624e
JA
13801 bash_cv_struct_timeval=no
13802fi
13803rm -f conftest*
13804
13805fi
13806rm -f conftest*
13807
bb70624e
JA
13808fi
13809
d3a24ed2 13810echo "$as_me:13810: result: $bash_cv_struct_timeval" >&5
f73dda09 13811echo "${ECHO_T}$bash_cv_struct_timeval" >&6
bb70624e 13812if test $bash_cv_struct_timeval = yes; then
f73dda09 13813 cat >>confdefs.h <<\EOF
bb70624e
JA
13814#define HAVE_TIMEVAL 1
13815EOF
13816
13817fi
13818
d3a24ed2 13819echo "$as_me:13819: checking for struct stat.st_blocks" >&5
f73dda09
JA
13820echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
13821if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
13822 echo $ECHO_N "(cached) $ECHO_C" >&6
13823else
13824 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 13825#line 13825 "configure"
f73dda09
JA
13826#include "confdefs.h"
13827$ac_includes_default
13828int
13829main ()
13830{
13831static struct stat ac_aggr;
13832if (ac_aggr.st_blocks)
13833return 0;
13834 ;
13835 return 0;
13836}
13837_ACEOF
13838rm -f conftest.$ac_objext
d3a24ed2 13839if { (eval echo "$as_me:13839: \"$ac_compile\"") >&5
f73dda09
JA
13840 (eval $ac_compile) 2>&5
13841 ac_status=$?
d3a24ed2 13842 echo "$as_me:13842: \$? = $ac_status" >&5
f73dda09
JA
13843 (exit $ac_status); } &&
13844 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 13845 { (eval echo "$as_me:13845: \"$ac_try\"") >&5
f73dda09
JA
13846 (eval $ac_try) 2>&5
13847 ac_status=$?
d3a24ed2 13848 echo "$as_me:13848: \$? = $ac_status" >&5
f73dda09
JA
13849 (exit $ac_status); }; }; then
13850 ac_cv_member_struct_stat_st_blocks=yes
13851else
13852 echo "$as_me: failed program was:" >&5
13853cat conftest.$ac_ext >&5
13854ac_cv_member_struct_stat_st_blocks=no
13855fi
13856rm -f conftest.$ac_objext conftest.$ac_ext
13857fi
d3a24ed2 13858echo "$as_me:13858: result: $ac_cv_member_struct_stat_st_blocks" >&5
f73dda09
JA
13859echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
13860if test $ac_cv_member_struct_stat_st_blocks = yes; then
13861
13862cat >>confdefs.h <<EOF
13863#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13864EOF
13865
13866fi
d166f048 13867
d3a24ed2 13868echo "$as_me:13868: checking whether struct tm is in sys/time.h or time.h" >&5
7117c2d2
JA
13869echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
13870if test "${ac_cv_struct_tm+set}" = set; then
13871 echo $ECHO_N "(cached) $ECHO_C" >&6
13872else
13873 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 13874#line 13874 "configure"
7117c2d2
JA
13875#include "confdefs.h"
13876#include <sys/types.h>
13877#include <time.h>
13878
13879int
13880main ()
13881{
13882struct tm *tp; tp->tm_sec;
13883 ;
13884 return 0;
13885}
13886_ACEOF
13887rm -f conftest.$ac_objext
d3a24ed2 13888if { (eval echo "$as_me:13888: \"$ac_compile\"") >&5
7117c2d2
JA
13889 (eval $ac_compile) 2>&5
13890 ac_status=$?
d3a24ed2 13891 echo "$as_me:13891: \$? = $ac_status" >&5
7117c2d2
JA
13892 (exit $ac_status); } &&
13893 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 13894 { (eval echo "$as_me:13894: \"$ac_try\"") >&5
7117c2d2
JA
13895 (eval $ac_try) 2>&5
13896 ac_status=$?
d3a24ed2 13897 echo "$as_me:13897: \$? = $ac_status" >&5
7117c2d2
JA
13898 (exit $ac_status); }; }; then
13899 ac_cv_struct_tm=time.h
13900else
13901 echo "$as_me: failed program was:" >&5
13902cat conftest.$ac_ext >&5
13903ac_cv_struct_tm=sys/time.h
13904fi
13905rm -f conftest.$ac_objext conftest.$ac_ext
13906fi
d3a24ed2 13907echo "$as_me:13907: result: $ac_cv_struct_tm" >&5
7117c2d2
JA
13908echo "${ECHO_T}$ac_cv_struct_tm" >&6
13909if test $ac_cv_struct_tm = sys/time.h; then
13910
13911cat >>confdefs.h <<\EOF
13912#define TM_IN_SYS_TIME 1
13913EOF
13914
13915fi
13916
d3a24ed2 13917echo "$as_me:13917: checking for struct tm.tm_zone" >&5
7117c2d2
JA
13918echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
13919if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
13920 echo $ECHO_N "(cached) $ECHO_C" >&6
13921else
13922 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 13923#line 13923 "configure"
7117c2d2
JA
13924#include "confdefs.h"
13925#include <sys/types.h>
13926#include <$ac_cv_struct_tm>
13927
13928int
13929main ()
13930{
13931static struct tm ac_aggr;
13932if (ac_aggr.tm_zone)
13933return 0;
13934 ;
13935 return 0;
13936}
13937_ACEOF
13938rm -f conftest.$ac_objext
d3a24ed2 13939if { (eval echo "$as_me:13939: \"$ac_compile\"") >&5
7117c2d2
JA
13940 (eval $ac_compile) 2>&5
13941 ac_status=$?
d3a24ed2 13942 echo "$as_me:13942: \$? = $ac_status" >&5
7117c2d2
JA
13943 (exit $ac_status); } &&
13944 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 13945 { (eval echo "$as_me:13945: \"$ac_try\"") >&5
7117c2d2
JA
13946 (eval $ac_try) 2>&5
13947 ac_status=$?
d3a24ed2 13948 echo "$as_me:13948: \$? = $ac_status" >&5
7117c2d2
JA
13949 (exit $ac_status); }; }; then
13950 ac_cv_member_struct_tm_tm_zone=yes
13951else
13952 echo "$as_me: failed program was:" >&5
13953cat conftest.$ac_ext >&5
13954ac_cv_member_struct_tm_tm_zone=no
13955fi
13956rm -f conftest.$ac_objext conftest.$ac_ext
13957fi
d3a24ed2 13958echo "$as_me:13958: result: $ac_cv_member_struct_tm_tm_zone" >&5
7117c2d2
JA
13959echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
13960if test $ac_cv_member_struct_tm_tm_zone = yes; then
13961
13962cat >>confdefs.h <<EOF
13963#define HAVE_STRUCT_TM_TM_ZONE 1
13964EOF
13965
13966fi
13967
13968if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13969
13970cat >>confdefs.h <<\EOF
13971#define HAVE_TM_ZONE 1
13972EOF
13973
13974else
d3a24ed2 13975 echo "$as_me:13975: checking for tzname" >&5
7117c2d2
JA
13976echo $ECHO_N "checking for tzname... $ECHO_C" >&6
13977if test "${ac_cv_var_tzname+set}" = set; then
13978 echo $ECHO_N "(cached) $ECHO_C" >&6
13979else
13980 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 13981#line 13981 "configure"
7117c2d2
JA
13982#include "confdefs.h"
13983#include <time.h>
13984#ifndef tzname /* For SGI. */
13985extern char *tzname[]; /* RS6000 and others reject char **tzname. */
13986#endif
13987
13988int
13989main ()
13990{
13991atoi(*tzname);
13992 ;
13993 return 0;
13994}
13995_ACEOF
13996rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 13997if { (eval echo "$as_me:13997: \"$ac_link\"") >&5
7117c2d2
JA
13998 (eval $ac_link) 2>&5
13999 ac_status=$?
d3a24ed2 14000 echo "$as_me:14000: \$? = $ac_status" >&5
7117c2d2
JA
14001 (exit $ac_status); } &&
14002 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 14003 { (eval echo "$as_me:14003: \"$ac_try\"") >&5
7117c2d2
JA
14004 (eval $ac_try) 2>&5
14005 ac_status=$?
d3a24ed2 14006 echo "$as_me:14006: \$? = $ac_status" >&5
7117c2d2
JA
14007 (exit $ac_status); }; }; then
14008 ac_cv_var_tzname=yes
14009else
14010 echo "$as_me: failed program was:" >&5
14011cat conftest.$ac_ext >&5
14012ac_cv_var_tzname=no
14013fi
14014rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14015fi
d3a24ed2 14016echo "$as_me:14016: result: $ac_cv_var_tzname" >&5
7117c2d2
JA
14017echo "${ECHO_T}$ac_cv_var_tzname" >&6
14018 if test $ac_cv_var_tzname = yes; then
14019
14020cat >>confdefs.h <<\EOF
14021#define HAVE_TZNAME 1
14022EOF
14023
14024 fi
14025fi
14026
d3a24ed2
CR
14027echo "$as_me:14027: checking for struct timezone in sys/time.h and time.h" >&5
14028echo $ECHO_N "checking for struct timezone in sys/time.h and time.h... $ECHO_C" >&6
14029if test "${bash_cv_struct_timezone+set}" = set; then
14030 echo $ECHO_N "(cached) $ECHO_C" >&6
14031else
14032
14033cat >conftest.$ac_ext <<_ACEOF
14034#line 14034 "configure"
14035#include "confdefs.h"
14036#include <sys/time.h>
14037
14038_ACEOF
14039if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14040 egrep "struct timezone" >/dev/null 2>&1; then
14041 bash_cv_struct_timezone=yes
14042else
14043 cat >conftest.$ac_ext <<_ACEOF
14044#line 14044 "configure"
14045#include "confdefs.h"
14046#include <time.h>
14047
14048_ACEOF
14049if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14050 egrep "struct timezone" >/dev/null 2>&1; then
14051 bash_cv_struct_timezone=yes
14052else
14053 bash_cv_struct_timezone=no
14054fi
14055rm -f conftest*
14056
14057fi
14058rm -f conftest*
14059
14060fi
14061
14062echo "$as_me:14062: result: $bash_cv_struct_timezone" >&5
14063echo "${ECHO_T}$bash_cv_struct_timezone" >&6
14064if test $bash_cv_struct_timezone = yes; then
14065 cat >>confdefs.h <<\EOF
14066#define HAVE_STRUCT_TIMEZONE 1
14067EOF
14068
14069fi
14070
14071echo "$as_me:14071: checking for the existence of strsignal" >&5
f73dda09
JA
14072echo $ECHO_N "checking for the existence of strsignal... $ECHO_C" >&6
14073if test "${bash_cv_have_strsignal+set}" = set; then
14074 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 14075else
f73dda09 14076 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 14077#line 14077 "configure"
ccc6cda3
JA
14078#include "confdefs.h"
14079#include <sys/types.h>
14080#include <signal.h>
f73dda09
JA
14081int
14082main ()
14083{
ccc6cda3 14084char *s = (char *)strsignal(2);
f73dda09
JA
14085 ;
14086 return 0;
14087}
14088_ACEOF
14089rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 14090if { (eval echo "$as_me:14090: \"$ac_link\"") >&5
f73dda09
JA
14091 (eval $ac_link) 2>&5
14092 ac_status=$?
d3a24ed2 14093 echo "$as_me:14093: \$? = $ac_status" >&5
f73dda09
JA
14094 (exit $ac_status); } &&
14095 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 14096 { (eval echo "$as_me:14096: \"$ac_try\"") >&5
f73dda09
JA
14097 (eval $ac_try) 2>&5
14098 ac_status=$?
d3a24ed2 14099 echo "$as_me:14099: \$? = $ac_status" >&5
f73dda09 14100 (exit $ac_status); }; }; then
ccc6cda3
JA
14101 bash_cv_have_strsignal=yes
14102else
f73dda09
JA
14103 echo "$as_me: failed program was:" >&5
14104cat conftest.$ac_ext >&5
14105bash_cv_have_strsignal=no
ccc6cda3 14106fi
f73dda09 14107rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
ccc6cda3
JA
14108fi
14109
d3a24ed2 14110echo "$as_me:14110: result: $bash_cv_have_strsignal" >&5
f73dda09 14111echo "${ECHO_T}$bash_cv_have_strsignal" >&6
ccc6cda3 14112if test $bash_cv_have_strsignal = yes; then
f73dda09 14113cat >>confdefs.h <<\EOF
ccc6cda3
JA
14114#define HAVE_STRSIGNAL 1
14115EOF
14116
14117fi
14118
d3a24ed2 14119echo "$as_me:14119: checking if opendir() opens non-directories" >&5
f73dda09
JA
14120echo $ECHO_N "checking if opendir() opens non-directories... $ECHO_C" >&6
14121if test "${bash_cv_opendir_not_robust+set}" = set; then
14122 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3
JA
14123else
14124 if test "$cross_compiling" = yes; then
d3a24ed2 14125 { echo "$as_me:14125: WARNING: cannot check opendir if cross compiling -- defaulting to no" >&5
f73dda09 14126echo "$as_me: WARNING: cannot check opendir if cross compiling -- defaulting to no" >&2;}
cce855bc
JA
14127 bash_cv_opendir_not_robust=no
14128
ccc6cda3 14129else
f73dda09 14130 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 14131#line 14131 "configure"
ccc6cda3
JA
14132#include "confdefs.h"
14133
14134#include <stdio.h>
14135#include <sys/types.h>
14136#include <fcntl.h>
14137#ifdef HAVE_UNISTD_H
14138# include <unistd.h>
14139#endif /* HAVE_UNISTD_H */
14140#if defined(HAVE_DIRENT_H)
14141# include <dirent.h>
14142#else
14143# define dirent direct
14144# ifdef HAVE_SYS_NDIR_H
14145# include <sys/ndir.h>
14146# endif /* SYSNDIR */
14147# ifdef HAVE_SYS_DIR_H
14148# include <sys/dir.h>
14149# endif /* SYSDIR */
14150# ifdef HAVE_NDIR_H
14151# include <ndir.h>
14152# endif
14153#endif /* HAVE_DIRENT_H */
14154main()
14155{
14156DIR *dir;
bb70624e
JA
14157int fd, err;
14158err = mkdir("/tmp/bash-aclocal", 0700);
14159if (err < 0) {
14160 perror("mkdir");
14161 exit(1);
14162}
14163unlink("/tmp/bash-aclocal/not_a_directory");
14164fd = open("/tmp/bash-aclocal/not_a_directory", O_WRONLY|O_CREAT|O_EXCL, 0666);
ccc6cda3
JA
14165write(fd, "\n", 1);
14166close(fd);
bb70624e
JA
14167dir = opendir("/tmp/bash-aclocal/not_a_directory");
14168unlink("/tmp/bash-aclocal/not_a_directory");
14169rmdir("/tmp/bash-aclocal");
ccc6cda3
JA
14170exit (dir == 0);
14171}
f73dda09
JA
14172_ACEOF
14173rm -f conftest$ac_exeext
d3a24ed2 14174if { (eval echo "$as_me:14174: \"$ac_link\"") >&5
f73dda09
JA
14175 (eval $ac_link) 2>&5
14176 ac_status=$?
d3a24ed2 14177 echo "$as_me:14177: \$? = $ac_status" >&5
f73dda09 14178 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3a24ed2 14179 { (eval echo "$as_me:14179: \"$ac_try\"") >&5
f73dda09
JA
14180 (eval $ac_try) 2>&5
14181 ac_status=$?
d3a24ed2 14182 echo "$as_me:14182: \$? = $ac_status" >&5
f73dda09 14183 (exit $ac_status); }; }; then
ccc6cda3
JA
14184 bash_cv_opendir_not_robust=yes
14185else
f73dda09
JA
14186 echo "$as_me: program exited with status $ac_status" >&5
14187echo "$as_me: failed program was:" >&5
14188cat conftest.$ac_ext >&5
14189bash_cv_opendir_not_robust=no
ccc6cda3 14190fi
f73dda09 14191rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ccc6cda3 14192fi
ccc6cda3
JA
14193fi
14194
d3a24ed2 14195echo "$as_me:14195: result: $bash_cv_opendir_not_robust" >&5
f73dda09 14196echo "${ECHO_T}$bash_cv_opendir_not_robust" >&6
ccc6cda3 14197if test $bash_cv_opendir_not_robust = yes; then
f73dda09 14198cat >>confdefs.h <<\EOF
ccc6cda3
JA
14199#define OPENDIR_NOT_ROBUST 1
14200EOF
14201
14202fi
14203
d3a24ed2 14204echo "$as_me:14204: checking whether ulimit can substitute for getdtablesize" >&5
f73dda09
JA
14205echo $ECHO_N "checking whether ulimit can substitute for getdtablesize... $ECHO_C" >&6
14206if test "${bash_cv_ulimit_maxfds+set}" = set; then
14207 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3
JA
14208else
14209 if test "$cross_compiling" = yes; then
d3a24ed2 14210 { echo "$as_me:14210: WARNING: cannot check ulimit if cross compiling -- defaulting to no" >&5
f73dda09 14211echo "$as_me: WARNING: cannot check ulimit if cross compiling -- defaulting to no" >&2;}
cce855bc
JA
14212 bash_cv_ulimit_maxfds=no
14213
ccc6cda3 14214else
f73dda09 14215 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 14216#line 14216 "configure"
ccc6cda3
JA
14217#include "confdefs.h"
14218
14219main()
14220{
14221long maxfds = ulimit(4, 0L);
14222exit (maxfds == -1L);
14223}
14224
f73dda09
JA
14225_ACEOF
14226rm -f conftest$ac_exeext
d3a24ed2 14227if { (eval echo "$as_me:14227: \"$ac_link\"") >&5
f73dda09
JA
14228 (eval $ac_link) 2>&5
14229 ac_status=$?
d3a24ed2 14230 echo "$as_me:14230: \$? = $ac_status" >&5
f73dda09 14231 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3a24ed2 14232 { (eval echo "$as_me:14232: \"$ac_try\"") >&5
f73dda09
JA
14233 (eval $ac_try) 2>&5
14234 ac_status=$?
d3a24ed2 14235 echo "$as_me:14235: \$? = $ac_status" >&5
f73dda09 14236 (exit $ac_status); }; }; then
ccc6cda3
JA
14237 bash_cv_ulimit_maxfds=yes
14238else
f73dda09
JA
14239 echo "$as_me: program exited with status $ac_status" >&5
14240echo "$as_me: failed program was:" >&5
14241cat conftest.$ac_ext >&5
14242bash_cv_ulimit_maxfds=no
ccc6cda3 14243fi
f73dda09 14244rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ccc6cda3 14245fi
ccc6cda3
JA
14246fi
14247
d3a24ed2 14248echo "$as_me:14248: result: $bash_cv_ulimit_maxfds" >&5
f73dda09 14249echo "${ECHO_T}$bash_cv_ulimit_maxfds" >&6
ccc6cda3 14250if test $bash_cv_ulimit_maxfds = yes; then
f73dda09 14251cat >>confdefs.h <<\EOF
ccc6cda3
JA
14252#define ULIMIT_MAXFDS 1
14253EOF
14254
14255fi
14256
d3a24ed2 14257echo "$as_me:14257: checking to see if getenv can be redefined" >&5
f73dda09
JA
14258echo $ECHO_N "checking to see if getenv can be redefined... $ECHO_C" >&6
14259if test "${bash_cv_getenv_redef+set}" = set; then
14260 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3
JA
14261else
14262 if test "$cross_compiling" = yes; then
d3a24ed2 14263 { echo "$as_me:14263: WARNING: cannot check getenv redefinition if cross compiling -- defaulting to yes" >&5
f73dda09 14264echo "$as_me: WARNING: cannot check getenv redefinition if cross compiling -- defaulting to yes" >&2;}
cce855bc
JA
14265 bash_cv_getenv_redef=yes
14266
ccc6cda3 14267else
f73dda09 14268 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 14269#line 14269 "configure"
ccc6cda3
JA
14270#include "confdefs.h"
14271
14272#ifdef HAVE_UNISTD_H
14273# include <unistd.h>
14274#endif
14275#ifndef __STDC__
14276# ifndef const
14277# define const
14278# endif
14279#endif
14280char *
14281getenv (name)
14282#if defined (__linux__) || defined (__bsdi__) || defined (convex)
14283 const char *name;
14284#else
14285 char const *name;
14286#endif /* !__linux__ && !__bsdi__ && !convex */
14287{
14288return "42";
14289}
14290main()
14291{
14292char *s;
14293/* The next allows this program to run, but does not allow bash to link
14294 when it redefines getenv. I'm not really interested in figuring out
14295 why not. */
14296#if defined (NeXT)
14297exit(1);
14298#endif
14299s = getenv("ABCDE");
14300exit(s == 0); /* force optimizer to leave getenv in */
14301}
14302
f73dda09
JA
14303_ACEOF
14304rm -f conftest$ac_exeext
d3a24ed2 14305if { (eval echo "$as_me:14305: \"$ac_link\"") >&5
f73dda09
JA
14306 (eval $ac_link) 2>&5
14307 ac_status=$?
d3a24ed2 14308 echo "$as_me:14308: \$? = $ac_status" >&5
f73dda09 14309 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3a24ed2 14310 { (eval echo "$as_me:14310: \"$ac_try\"") >&5
f73dda09
JA
14311 (eval $ac_try) 2>&5
14312 ac_status=$?
d3a24ed2 14313 echo "$as_me:14313: \$? = $ac_status" >&5
f73dda09 14314 (exit $ac_status); }; }; then
ccc6cda3
JA
14315 bash_cv_getenv_redef=yes
14316else
f73dda09
JA
14317 echo "$as_me: program exited with status $ac_status" >&5
14318echo "$as_me: failed program was:" >&5
14319cat conftest.$ac_ext >&5
14320bash_cv_getenv_redef=no
ccc6cda3 14321fi
f73dda09 14322rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ccc6cda3 14323fi
ccc6cda3
JA
14324fi
14325
d3a24ed2 14326echo "$as_me:14326: result: $bash_cv_getenv_redef" >&5
f73dda09 14327echo "${ECHO_T}$bash_cv_getenv_redef" >&6
ccc6cda3 14328if test $bash_cv_getenv_redef = yes; then
f73dda09 14329cat >>confdefs.h <<\EOF
ccc6cda3
JA
14330#define CAN_REDEFINE_GETENV 1
14331EOF
14332
14333fi
14334
7117c2d2 14335if test "$ac_cv_func_getcwd" = "yes"; then
d3a24ed2 14336echo "$as_me:14336: checking if getcwd() calls popen()" >&5
f73dda09
JA
14337echo $ECHO_N "checking if getcwd() calls popen()... $ECHO_C" >&6
14338if test "${bash_cv_getcwd_calls_popen+set}" = set; then
14339 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3
JA
14340else
14341 if test "$cross_compiling" = yes; then
d3a24ed2 14342 { echo "$as_me:14342: WARNING: cannot check whether getcwd calls popen if cross compiling -- defaulting to no" >&5
f73dda09 14343echo "$as_me: WARNING: cannot check whether getcwd calls popen if cross compiling -- defaulting to no" >&2;}
cce855bc
JA
14344 bash_cv_getcwd_calls_popen=no
14345
ccc6cda3 14346else
f73dda09 14347 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 14348#line 14348 "configure"
ccc6cda3
JA
14349#include "confdefs.h"
14350
14351#include <stdio.h>
14352#ifdef HAVE_UNISTD_H
14353#include <unistd.h>
14354#endif
14355
14356#ifndef __STDC__
14357#ifndef const
14358#define const
14359#endif
14360#endif
14361
14362int popen_called;
14363
14364FILE *
14365popen(command, type)
14366 const char *command;
14367 const char *type;
14368{
14369 popen_called = 1;
14370 return (FILE *)NULL;
14371}
14372
14373FILE *_popen(command, type)
14374 const char *command;
14375 const char *type;
14376{
14377 return (popen (command, type));
14378}
14379
14380int
14381pclose(stream)
14382FILE *stream;
14383{
14384 return 0;
14385}
14386
14387int
14388_pclose(stream)
14389FILE *stream;
14390{
14391 return 0;
14392}
14393
14394main()
14395{
14396 char lbuf[32];
14397 popen_called = 0;
14398 getcwd(lbuf, 32);
14399 exit (popen_called);
14400}
14401
f73dda09
JA
14402_ACEOF
14403rm -f conftest$ac_exeext
d3a24ed2 14404if { (eval echo "$as_me:14404: \"$ac_link\"") >&5
f73dda09
JA
14405 (eval $ac_link) 2>&5
14406 ac_status=$?
d3a24ed2 14407 echo "$as_me:14407: \$? = $ac_status" >&5
f73dda09 14408 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3a24ed2 14409 { (eval echo "$as_me:14409: \"$ac_try\"") >&5
f73dda09
JA
14410 (eval $ac_try) 2>&5
14411 ac_status=$?
d3a24ed2 14412 echo "$as_me:14412: \$? = $ac_status" >&5
f73dda09 14413 (exit $ac_status); }; }; then
ccc6cda3
JA
14414 bash_cv_getcwd_calls_popen=no
14415else
f73dda09
JA
14416 echo "$as_me: program exited with status $ac_status" >&5
14417echo "$as_me: failed program was:" >&5
14418cat conftest.$ac_ext >&5
14419bash_cv_getcwd_calls_popen=yes
ccc6cda3 14420fi
f73dda09 14421rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ccc6cda3 14422fi
ccc6cda3
JA
14423fi
14424
d3a24ed2 14425echo "$as_me:14425: result: $bash_cv_getcwd_calls_popen" >&5
f73dda09 14426echo "${ECHO_T}$bash_cv_getcwd_calls_popen" >&6
ccc6cda3 14427if test $bash_cv_getcwd_calls_popen = yes; then
f73dda09 14428cat >>confdefs.h <<\EOF
ccc6cda3
JA
14429#define GETCWD_BROKEN 1
14430EOF
14431
f73dda09 14432LIBOBJS="$LIBOBJS getcwd.$ac_objext"
ccc6cda3
JA
14433fi
14434
ccc6cda3
JA
14435fi
14436
d3a24ed2 14437echo "$as_me:14437: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5
f73dda09
JA
14438echo $ECHO_N "checking for presence of POSIX-style sigsetjmp/siglongjmp... $ECHO_C" >&6
14439if test "${bash_cv_func_sigsetjmp+set}" = set; then
14440 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3
JA
14441else
14442 if test "$cross_compiling" = yes; then
d3a24ed2 14443 { echo "$as_me:14443: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" >&5
f73dda09 14444echo "$as_me: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" >&2;}
cce855bc
JA
14445 bash_cv_func_sigsetjmp=missing
14446
ccc6cda3 14447else
f73dda09 14448 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 14449#line 14449 "configure"
ccc6cda3
JA
14450#include "confdefs.h"
14451
14452#ifdef HAVE_UNISTD_H
14453#include <unistd.h>
14454#endif
14455#include <sys/types.h>
14456#include <signal.h>
14457#include <setjmp.h>
14458
14459main()
14460{
14461#if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS)
14462exit (1);
14463#else
14464
14465int code;
14466sigset_t set, oset;
14467sigjmp_buf xx;
14468
14469/* get the mask */
14470sigemptyset(&set);
14471sigemptyset(&oset);
14472sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &set);
14473sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset);
14474
14475/* save it */
14476code = sigsetjmp(xx, 1);
14477if (code)
14478 exit(0); /* could get sigmask and compare to oset here. */
14479
14480/* change it */
14481sigaddset(&set, SIGINT);
14482sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL);
14483
14484/* and siglongjmp */
14485siglongjmp(xx, 10);
14486exit(1);
14487#endif
14488}
f73dda09
JA
14489_ACEOF
14490rm -f conftest$ac_exeext
d3a24ed2 14491if { (eval echo "$as_me:14491: \"$ac_link\"") >&5
f73dda09
JA
14492 (eval $ac_link) 2>&5
14493 ac_status=$?
d3a24ed2 14494 echo "$as_me:14494: \$? = $ac_status" >&5
f73dda09 14495 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3a24ed2 14496 { (eval echo "$as_me:14496: \"$ac_try\"") >&5
f73dda09
JA
14497 (eval $ac_try) 2>&5
14498 ac_status=$?
d3a24ed2 14499 echo "$as_me:14499: \$? = $ac_status" >&5
f73dda09 14500 (exit $ac_status); }; }; then
ccc6cda3
JA
14501 bash_cv_func_sigsetjmp=present
14502else
f73dda09
JA
14503 echo "$as_me: program exited with status $ac_status" >&5
14504echo "$as_me: failed program was:" >&5
14505cat conftest.$ac_ext >&5
14506bash_cv_func_sigsetjmp=missing
ccc6cda3 14507fi
f73dda09 14508rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ccc6cda3 14509fi
ccc6cda3
JA
14510fi
14511
d3a24ed2 14512echo "$as_me:14512: result: $bash_cv_func_sigsetjmp" >&5
f73dda09 14513echo "${ECHO_T}$bash_cv_func_sigsetjmp" >&6
ccc6cda3 14514if test $bash_cv_func_sigsetjmp = present; then
f73dda09 14515cat >>confdefs.h <<\EOF
ccc6cda3
JA
14516#define HAVE_POSIX_SIGSETJMP 1
14517EOF
14518
14519fi
14520
d3a24ed2 14521echo "$as_me:14521: checking whether or not strcoll and strcmp differ" >&5
f73dda09
JA
14522echo $ECHO_N "checking whether or not strcoll and strcmp differ... $ECHO_C" >&6
14523if test "${bash_cv_func_strcoll_broken+set}" = set; then
14524 echo $ECHO_N "(cached) $ECHO_C" >&6
d166f048
JA
14525else
14526 if test "$cross_compiling" = yes; then
d3a24ed2 14527 { echo "$as_me:14527: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&5
f73dda09 14528echo "$as_me: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&2;}
cce855bc
JA
14529 bash_cv_func_strcoll_broken=no
14530
d166f048 14531else
f73dda09 14532 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 14533#line 14533 "configure"
d166f048
JA
14534#include "confdefs.h"
14535
14536#include <stdio.h>
14537#if defined (HAVE_LOCALE_H)
14538#include <locale.h>
14539#endif
14540
14541main(c, v)
14542int c;
14543char *v[];
14544{
14545 int r1, r2;
14546 char *deflocale, *defcoll;
14547
14548#ifdef HAVE_SETLOCALE
14549 deflocale = setlocale(LC_ALL, "");
14550 defcoll = setlocale(LC_COLLATE, "");
14551#endif
14552
14553#ifdef HAVE_STRCOLL
14554 /* These two values are taken from tests/glob-test. */
14555 r1 = strcoll("abd", "aXd");
14556#else
14557 r1 = 0;
14558#endif
14559 r2 = strcmp("abd", "aXd");
14560
14561 /* These two should both be greater than 0. It is permissible for
14562 a system to return different values, as long as the sign is the
14563 same. */
14564
14565 /* Exit with 1 (failure) if these two values are both > 0, since
14566 this tests whether strcoll(3) is broken with respect to strcmp(3)
14567 in the default locale. */
14568 exit (r1 > 0 && r2 > 0);
14569}
14570
f73dda09
JA
14571_ACEOF
14572rm -f conftest$ac_exeext
d3a24ed2 14573if { (eval echo "$as_me:14573: \"$ac_link\"") >&5
f73dda09
JA
14574 (eval $ac_link) 2>&5
14575 ac_status=$?
d3a24ed2 14576 echo "$as_me:14576: \$? = $ac_status" >&5
f73dda09 14577 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3a24ed2 14578 { (eval echo "$as_me:14578: \"$ac_try\"") >&5
f73dda09
JA
14579 (eval $ac_try) 2>&5
14580 ac_status=$?
d3a24ed2 14581 echo "$as_me:14581: \$? = $ac_status" >&5
f73dda09 14582 (exit $ac_status); }; }; then
d166f048
JA
14583 bash_cv_func_strcoll_broken=yes
14584else
f73dda09
JA
14585 echo "$as_me: program exited with status $ac_status" >&5
14586echo "$as_me: failed program was:" >&5
14587cat conftest.$ac_ext >&5
14588bash_cv_func_strcoll_broken=no
d166f048 14589fi
f73dda09 14590rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d166f048 14591fi
d166f048
JA
14592fi
14593
d3a24ed2 14594echo "$as_me:14594: result: $bash_cv_func_strcoll_broken" >&5
f73dda09 14595echo "${ECHO_T}$bash_cv_func_strcoll_broken" >&6
d166f048 14596if test $bash_cv_func_strcoll_broken = yes; then
f73dda09 14597cat >>confdefs.h <<\EOF
d166f048
JA
14598#define STRCOLL_BROKEN 1
14599EOF
14600
14601fi
14602
7117c2d2
JA
14603if test "$ac_cv_func_putenv" = "yes"; then
14604
d3a24ed2 14605echo "$as_me:14605: checking for standard-conformant putenv declaration" >&5
7117c2d2
JA
14606echo $ECHO_N "checking for standard-conformant putenv declaration... $ECHO_C" >&6
14607if test "${bash_cv_std_putenv+set}" = set; then
14608 echo $ECHO_N "(cached) $ECHO_C" >&6
14609else
14610 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 14611#line 14611 "configure"
7117c2d2
JA
14612#include "confdefs.h"
14613
14614#if STDC_HEADERS
14615#include <stdlib.h>
14616#include <stddef.h>
14617#endif
14618#ifndef __STDC__
14619# ifndef const
14620# define const
14621# endif
14622#endif
14623#ifdef PROTOTYPES
14624extern int putenv (char *);
14625#else
14626extern int putenv ();
14627#endif
14628
14629int
14630main ()
14631{
14632return (putenv == 0);
14633 ;
14634 return 0;
14635}
14636_ACEOF
14637rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 14638if { (eval echo "$as_me:14638: \"$ac_link\"") >&5
7117c2d2
JA
14639 (eval $ac_link) 2>&5
14640 ac_status=$?
d3a24ed2 14641 echo "$as_me:14641: \$? = $ac_status" >&5
7117c2d2
JA
14642 (exit $ac_status); } &&
14643 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 14644 { (eval echo "$as_me:14644: \"$ac_try\"") >&5
7117c2d2
JA
14645 (eval $ac_try) 2>&5
14646 ac_status=$?
d3a24ed2 14647 echo "$as_me:14647: \$? = $ac_status" >&5
7117c2d2
JA
14648 (exit $ac_status); }; }; then
14649 bash_cv_std_putenv=yes
14650else
14651 echo "$as_me: failed program was:" >&5
14652cat conftest.$ac_ext >&5
14653bash_cv_std_putenv=no
14654
14655fi
14656rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14657fi
d3a24ed2 14658echo "$as_me:14658: result: $bash_cv_std_putenv" >&5
7117c2d2
JA
14659echo "${ECHO_T}$bash_cv_std_putenv" >&6
14660if test $bash_cv_std_putenv = yes; then
14661cat >>confdefs.h <<\EOF
14662#define HAVE_STD_PUTENV 1
14663EOF
14664
14665fi
14666
14667else
14668cat >>confdefs.h <<\EOF
14669#define HAVE_STD_PUTENV 1
14670EOF
14671
14672fi
14673if test "$ac_cv_func_unsetenv" = "yes"; then
14674
d3a24ed2 14675echo "$as_me:14675: checking for standard-conformant unsetenv declaration" >&5
7117c2d2
JA
14676echo $ECHO_N "checking for standard-conformant unsetenv declaration... $ECHO_C" >&6
14677if test "${bash_cv_std_unsetenv+set}" = set; then
14678 echo $ECHO_N "(cached) $ECHO_C" >&6
14679else
14680 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 14681#line 14681 "configure"
7117c2d2
JA
14682#include "confdefs.h"
14683
14684#if STDC_HEADERS
14685#include <stdlib.h>
14686#include <stddef.h>
14687#endif
14688#ifndef __STDC__
14689# ifndef const
14690# define const
14691# endif
14692#endif
14693#ifdef PROTOTYPES
14694extern int unsetenv (const char *);
14695#else
14696extern int unsetenv ();
14697#endif
14698
14699int
14700main ()
14701{
14702return (unsetenv == 0);
14703 ;
14704 return 0;
14705}
14706_ACEOF
14707rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 14708if { (eval echo "$as_me:14708: \"$ac_link\"") >&5
7117c2d2
JA
14709 (eval $ac_link) 2>&5
14710 ac_status=$?
d3a24ed2 14711 echo "$as_me:14711: \$? = $ac_status" >&5
7117c2d2
JA
14712 (exit $ac_status); } &&
14713 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 14714 { (eval echo "$as_me:14714: \"$ac_try\"") >&5
7117c2d2
JA
14715 (eval $ac_try) 2>&5
14716 ac_status=$?
d3a24ed2 14717 echo "$as_me:14717: \$? = $ac_status" >&5
7117c2d2
JA
14718 (exit $ac_status); }; }; then
14719 bash_cv_std_unsetenv=yes
14720else
14721 echo "$as_me: failed program was:" >&5
14722cat conftest.$ac_ext >&5
14723bash_cv_std_unsetenv=no
14724
14725fi
14726rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14727fi
d3a24ed2 14728echo "$as_me:14728: result: $bash_cv_std_unsetenv" >&5
7117c2d2
JA
14729echo "${ECHO_T}$bash_cv_std_unsetenv" >&6
14730if test $bash_cv_std_unsetenv = yes; then
14731cat >>confdefs.h <<\EOF
14732#define HAVE_STD_UNSETENV 1
14733EOF
14734
14735fi
14736
14737else
14738cat >>confdefs.h <<\EOF
14739#define HAVE_STD_UNSETENV 1
14740EOF
14741
14742fi
14743
d3a24ed2 14744echo "$as_me:14744: checking for printf floating point output in hex notation" >&5
f73dda09
JA
14745echo $ECHO_N "checking for printf floating point output in hex notation... $ECHO_C" >&6
14746if test "${bash_cv_printf_a_format+set}" = set; then
14747 echo $ECHO_N "(cached) $ECHO_C" >&6
14748else
14749 if test "$cross_compiling" = yes; then
d3a24ed2 14750 { echo "$as_me:14750: WARNING: cannot check printf if cross compiling -- defaulting to no" >&5
f73dda09
JA
14751echo "$as_me: WARNING: cannot check printf if cross compiling -- defaulting to no" >&2;}
14752 bash_cv_printf_a_format=no
14753
14754else
14755 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 14756#line 14756 "configure"
f73dda09
JA
14757#include "confdefs.h"
14758
14759#include <stdio.h>
14760#include <string.h>
14761
14762int
14763main()
14764{
14765 double y = 0.0;
14766 char abuf[1024];
14767
14768 sprintf(abuf, "%A", y);
14769 exit(strchr(abuf, 'P') == (char *)0);
14770}
14771
14772_ACEOF
14773rm -f conftest$ac_exeext
d3a24ed2 14774if { (eval echo "$as_me:14774: \"$ac_link\"") >&5
f73dda09
JA
14775 (eval $ac_link) 2>&5
14776 ac_status=$?
d3a24ed2 14777 echo "$as_me:14777: \$? = $ac_status" >&5
f73dda09 14778 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3a24ed2 14779 { (eval echo "$as_me:14779: \"$ac_try\"") >&5
f73dda09
JA
14780 (eval $ac_try) 2>&5
14781 ac_status=$?
d3a24ed2 14782 echo "$as_me:14782: \$? = $ac_status" >&5
f73dda09
JA
14783 (exit $ac_status); }; }; then
14784 bash_cv_printf_a_format=yes
14785else
14786 echo "$as_me: program exited with status $ac_status" >&5
14787echo "$as_me: failed program was:" >&5
14788cat conftest.$ac_ext >&5
14789bash_cv_printf_a_format=no
14790fi
14791rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14792fi
14793fi
d166f048 14794
d3a24ed2 14795echo "$as_me:14795: result: $bash_cv_printf_a_format" >&5
f73dda09
JA
14796echo "${ECHO_T}$bash_cv_printf_a_format" >&6
14797if test $bash_cv_printf_a_format = yes; then
14798cat >>confdefs.h <<\EOF
14799#define HAVE_PRINTF_A_FORMAT 1
14800EOF
d166f048 14801
f73dda09 14802fi
ccc6cda3 14803
d3a24ed2 14804echo "$as_me:14804: checking if signal handlers must be reinstalled when invoked" >&5
f73dda09
JA
14805echo $ECHO_N "checking if signal handlers must be reinstalled when invoked... $ECHO_C" >&6
14806if test "${bash_cv_must_reinstall_sighandlers+set}" = set; then
14807 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3
JA
14808else
14809 if test "$cross_compiling" = yes; then
d3a24ed2 14810 { echo "$as_me:14810: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&5
f73dda09 14811echo "$as_me: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&2;}
cce855bc
JA
14812 bash_cv_must_reinstall_sighandlers=no
14813
ccc6cda3 14814else
f73dda09 14815 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 14816#line 14816 "configure"
ccc6cda3
JA
14817#include "confdefs.h"
14818
14819#include <signal.h>
14820#ifdef HAVE_UNISTD_H
14821#include <unistd.h>
14822#endif
14823
14824typedef RETSIGTYPE sigfunc();
14825
14826int nsigint;
14827
14828#ifdef HAVE_POSIX_SIGNALS
14829sigfunc *
14830set_signal_handler(sig, handler)
14831 int sig;
14832 sigfunc *handler;
14833{
14834 struct sigaction act, oact;
14835 act.sa_handler = handler;
14836 act.sa_flags = 0;
14837 sigemptyset (&act.sa_mask);
14838 sigemptyset (&oact.sa_mask);
14839 sigaction (sig, &act, &oact);
14840 return (oact.sa_handler);
14841}
14842#else
14843#define set_signal_handler(s, h) signal(s, h)
14844#endif
14845
14846RETSIGTYPE
14847sigint(s)
14848int s;
14849{
14850 nsigint++;
14851}
14852
14853main()
14854{
14855 nsigint = 0;
14856 set_signal_handler(SIGINT, sigint);
14857 kill((int)getpid(), SIGINT);
14858 kill((int)getpid(), SIGINT);
14859 exit(nsigint != 2);
14860}
14861
f73dda09
JA
14862_ACEOF
14863rm -f conftest$ac_exeext
d3a24ed2 14864if { (eval echo "$as_me:14864: \"$ac_link\"") >&5
f73dda09
JA
14865 (eval $ac_link) 2>&5
14866 ac_status=$?
d3a24ed2 14867 echo "$as_me:14867: \$? = $ac_status" >&5
f73dda09 14868 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3a24ed2 14869 { (eval echo "$as_me:14869: \"$ac_try\"") >&5
f73dda09
JA
14870 (eval $ac_try) 2>&5
14871 ac_status=$?
d3a24ed2 14872 echo "$as_me:14872: \$? = $ac_status" >&5
f73dda09 14873 (exit $ac_status); }; }; then
ccc6cda3
JA
14874 bash_cv_must_reinstall_sighandlers=no
14875else
f73dda09
JA
14876 echo "$as_me: program exited with status $ac_status" >&5
14877echo "$as_me: failed program was:" >&5
14878cat conftest.$ac_ext >&5
14879bash_cv_must_reinstall_sighandlers=yes
ccc6cda3 14880fi
f73dda09 14881rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ccc6cda3 14882fi
ccc6cda3
JA
14883fi
14884
d3a24ed2 14885echo "$as_me:14885: result: $bash_cv_must_reinstall_sighandlers" >&5
f73dda09 14886echo "${ECHO_T}$bash_cv_must_reinstall_sighandlers" >&6
ccc6cda3 14887if test $bash_cv_must_reinstall_sighandlers = yes; then
f73dda09 14888cat >>confdefs.h <<\EOF
ccc6cda3
JA
14889#define MUST_REINSTALL_SIGHANDLERS 1
14890EOF
14891
14892fi
14893
d3a24ed2 14894echo "$as_me:14894: checking for presence of necessary job control definitions" >&5
f73dda09
JA
14895echo $ECHO_N "checking for presence of necessary job control definitions... $ECHO_C" >&6
14896if test "${bash_cv_job_control_missing+set}" = set; then
14897 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3
JA
14898else
14899 if test "$cross_compiling" = yes; then
d3a24ed2 14900 { echo "$as_me:14900: WARNING: cannot check job control if cross-compiling -- defaulting to missing" >&5
f73dda09 14901echo "$as_me: WARNING: cannot check job control if cross-compiling -- defaulting to missing" >&2;}
cce855bc
JA
14902 bash_cv_job_control_missing=missing
14903
ccc6cda3 14904else
f73dda09 14905 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 14906#line 14906 "configure"
ccc6cda3
JA
14907#include "confdefs.h"
14908
14909#include <sys/types.h>
14910#ifdef HAVE_SYS_WAIT_H
14911#include <sys/wait.h>
14912#endif
14913#ifdef HAVE_UNISTD_H
14914#include <unistd.h>
14915#endif
14916#include <signal.h>
14917
14918/* Add more tests in here as appropriate. */
14919main()
14920{
14921/* signal type */
14922#if !defined (HAVE_POSIX_SIGNALS) && !defined (HAVE_BSD_SIGNALS)
14923exit(1);
14924#endif
14925
14926/* signals and tty control. */
14927#if !defined (SIGTSTP) || !defined (SIGSTOP) || !defined (SIGCONT)
14928exit (1);
14929#endif
14930
14931/* process control */
f73dda09 14932#if !defined (WNOHANG) || !defined (WUNTRACED)
ccc6cda3
JA
14933exit(1);
14934#endif
14935
14936/* Posix systems have tcgetpgrp and waitpid. */
14937#if defined (_POSIX_VERSION) && !defined (HAVE_TCGETPGRP)
14938exit(1);
14939#endif
14940
14941#if defined (_POSIX_VERSION) && !defined (HAVE_WAITPID)
14942exit(1);
14943#endif
14944
14945/* Other systems have TIOCSPGRP/TIOCGPRGP and wait3. */
14946#if !defined (_POSIX_VERSION) && !defined (HAVE_WAIT3)
14947exit(1);
14948#endif
14949
14950exit(0);
14951}
f73dda09
JA
14952_ACEOF
14953rm -f conftest$ac_exeext
d3a24ed2 14954if { (eval echo "$as_me:14954: \"$ac_link\"") >&5
f73dda09
JA
14955 (eval $ac_link) 2>&5
14956 ac_status=$?
d3a24ed2 14957 echo "$as_me:14957: \$? = $ac_status" >&5
f73dda09 14958 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3a24ed2 14959 { (eval echo "$as_me:14959: \"$ac_try\"") >&5
f73dda09
JA
14960 (eval $ac_try) 2>&5
14961 ac_status=$?
d3a24ed2 14962 echo "$as_me:14962: \$? = $ac_status" >&5
f73dda09 14963 (exit $ac_status); }; }; then
ccc6cda3
JA
14964 bash_cv_job_control_missing=present
14965else
f73dda09
JA
14966 echo "$as_me: program exited with status $ac_status" >&5
14967echo "$as_me: failed program was:" >&5
14968cat conftest.$ac_ext >&5
14969bash_cv_job_control_missing=missing
ccc6cda3 14970fi
f73dda09 14971rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ccc6cda3 14972fi
ccc6cda3
JA
14973fi
14974
d3a24ed2 14975echo "$as_me:14975: result: $bash_cv_job_control_missing" >&5
f73dda09 14976echo "${ECHO_T}$bash_cv_job_control_missing" >&6
ccc6cda3 14977if test $bash_cv_job_control_missing = missing; then
f73dda09 14978cat >>confdefs.h <<\EOF
ccc6cda3
JA
14979#define JOB_CONTROL_MISSING 1
14980EOF
14981
14982fi
14983
d3a24ed2 14984echo "$as_me:14984: checking for presence of named pipes" >&5
f73dda09
JA
14985echo $ECHO_N "checking for presence of named pipes... $ECHO_C" >&6
14986if test "${bash_cv_sys_named_pipes+set}" = set; then
14987 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3
JA
14988else
14989 if test "$cross_compiling" = yes; then
d3a24ed2 14990 { echo "$as_me:14990: WARNING: cannot check for named pipes if cross-compiling -- defaulting to missing" >&5
f73dda09 14991echo "$as_me: WARNING: cannot check for named pipes if cross-compiling -- defaulting to missing" >&2;}
cce855bc
JA
14992 bash_cv_sys_named_pipes=missing
14993
ccc6cda3 14994else
f73dda09 14995 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 14996#line 14996 "configure"
ccc6cda3
JA
14997#include "confdefs.h"
14998
14999#include <sys/types.h>
15000#include <sys/stat.h>
15001#ifdef HAVE_UNISTD_H
15002#include <unistd.h>
15003#endif
15004
15005/* Add more tests in here as appropriate. */
15006main()
15007{
bb70624e 15008int fd, err;
ccc6cda3
JA
15009
15010#if defined (HAVE_MKFIFO)
15011exit (0);
15012#endif
15013
15014#if !defined (S_IFIFO) && (defined (_POSIX_VERSION) && !defined (S_ISFIFO))
15015exit (1);
15016#endif
15017
15018#if defined (NeXT)
15019exit (1);
15020#endif
bb70624e
JA
15021err = mkdir("/tmp/bash-aclocal", 0700);
15022if (err < 0) {
15023 perror ("mkdir");
15024 exit(1);
15025}
15026fd = mknod ("/tmp/bash-aclocal/sh-np-autoconf", 0666 | S_IFIFO, 0);
15027if (fd == -1) {
15028 rmdir ("/tmp/bash-aclocal");
ccc6cda3 15029 exit (1);
bb70624e 15030}
ccc6cda3 15031close(fd);
bb70624e
JA
15032unlink ("/tmp/bash-aclocal/sh-np-autoconf");
15033rmdir ("/tmp/bash-aclocal");
ccc6cda3
JA
15034exit(0);
15035}
f73dda09
JA
15036_ACEOF
15037rm -f conftest$ac_exeext
d3a24ed2 15038if { (eval echo "$as_me:15038: \"$ac_link\"") >&5
f73dda09
JA
15039 (eval $ac_link) 2>&5
15040 ac_status=$?
d3a24ed2 15041 echo "$as_me:15041: \$? = $ac_status" >&5
f73dda09 15042 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3a24ed2 15043 { (eval echo "$as_me:15043: \"$ac_try\"") >&5
f73dda09
JA
15044 (eval $ac_try) 2>&5
15045 ac_status=$?
d3a24ed2 15046 echo "$as_me:15046: \$? = $ac_status" >&5
f73dda09 15047 (exit $ac_status); }; }; then
ccc6cda3
JA
15048 bash_cv_sys_named_pipes=present
15049else
f73dda09
JA
15050 echo "$as_me: program exited with status $ac_status" >&5
15051echo "$as_me: failed program was:" >&5
15052cat conftest.$ac_ext >&5
15053bash_cv_sys_named_pipes=missing
ccc6cda3 15054fi
f73dda09 15055rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ccc6cda3 15056fi
ccc6cda3
JA
15057fi
15058
d3a24ed2 15059echo "$as_me:15059: result: $bash_cv_sys_named_pipes" >&5
f73dda09 15060echo "${ECHO_T}$bash_cv_sys_named_pipes" >&6
ccc6cda3 15061if test $bash_cv_sys_named_pipes = missing; then
f73dda09 15062cat >>confdefs.h <<\EOF
ccc6cda3
JA
15063#define NAMED_PIPES_MISSING 1
15064EOF
15065
15066fi
15067
d3a24ed2 15068echo "$as_me:15068: checking POSIX termios" >&5
f73dda09
JA
15069echo $ECHO_N "checking POSIX termios... $ECHO_C" >&6
15070if test "${ac_cv_sys_posix_termios+set}" = set; then
15071 echo $ECHO_N "(cached) $ECHO_C" >&6
15072else
15073 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 15074#line 15074 "configure"
f73dda09
JA
15075#include "confdefs.h"
15076#include <sys/types.h>
15077#include <unistd.h>
15078#include <termios.h>
15079int
15080main ()
15081{
15082/* SunOS 4.0.3 has termios.h but not the library calls. */
15083 tcgetattr(0, 0);
15084 ;
15085 return 0;
15086}
15087_ACEOF
15088rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 15089if { (eval echo "$as_me:15089: \"$ac_link\"") >&5
f73dda09
JA
15090 (eval $ac_link) 2>&5
15091 ac_status=$?
d3a24ed2 15092 echo "$as_me:15092: \$? = $ac_status" >&5
f73dda09
JA
15093 (exit $ac_status); } &&
15094 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 15095 { (eval echo "$as_me:15095: \"$ac_try\"") >&5
f73dda09
JA
15096 (eval $ac_try) 2>&5
15097 ac_status=$?
d3a24ed2 15098 echo "$as_me:15098: \$? = $ac_status" >&5
f73dda09
JA
15099 (exit $ac_status); }; }; then
15100 ac_cv_sys_posix_termios=yes
15101else
15102 echo "$as_me: failed program was:" >&5
15103cat conftest.$ac_ext >&5
15104ac_cv_sys_posix_termios=no
15105fi
15106rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15107fi
d3a24ed2 15108echo "$as_me:15108: result: $ac_cv_sys_posix_termios" >&5
f73dda09
JA
15109echo "${ECHO_T}$ac_cv_sys_posix_termios" >&6
15110
15111if test $ac_cv_sys_posix_termios = yes; then
d3a24ed2 15112 echo "$as_me:15112: checking whether termios.h defines TIOCGWINSZ" >&5
f73dda09
JA
15113echo $ECHO_N "checking whether termios.h defines TIOCGWINSZ... $ECHO_C" >&6
15114if test "${ac_cv_sys_tiocgwinsz_in_termios_h+set}" = set; then
15115 echo $ECHO_N "(cached) $ECHO_C" >&6
15116else
15117 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 15118#line 15118 "configure"
f73dda09
JA
15119#include "confdefs.h"
15120#include <sys/types.h>
15121#include <termios.h>
15122#ifdef TIOCGWINSZ
15123 yes
15124#endif
15125
15126_ACEOF
15127if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15128 egrep "yes" >/dev/null 2>&1; then
15129 ac_cv_sys_tiocgwinsz_in_termios_h=yes
15130else
15131 ac_cv_sys_tiocgwinsz_in_termios_h=no
15132fi
15133rm -f conftest*
15134
15135fi
d3a24ed2 15136echo "$as_me:15136: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5
f73dda09 15137echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_termios_h" >&6
d166f048 15138
f73dda09
JA
15139fi
15140if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then
d3a24ed2 15141 echo "$as_me:15141: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5
f73dda09
JA
15142echo $ECHO_N "checking whether sys/ioctl.h defines TIOCGWINSZ... $ECHO_C" >&6
15143if test "${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+set}" = set; then
15144 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 15145else
f73dda09 15146 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 15147#line 15147 "configure"
ccc6cda3
JA
15148#include "confdefs.h"
15149#include <sys/types.h>
15150#include <sys/ioctl.h>
f73dda09
JA
15151#ifdef TIOCGWINSZ
15152 yes
15153#endif
15154
15155_ACEOF
15156if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15157 egrep "yes" >/dev/null 2>&1; then
15158 ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes
ccc6cda3 15159else
f73dda09 15160 ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no
ccc6cda3
JA
15161fi
15162rm -f conftest*
f73dda09 15163
ccc6cda3 15164fi
d3a24ed2 15165echo "$as_me:15165: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5
f73dda09
JA
15166echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6
15167
15168 if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then
ccc6cda3 15169
f73dda09 15170cat >>confdefs.h <<\EOF
ccc6cda3
JA
15171#define GWINSZ_IN_SYS_IOCTL 1
15172EOF
15173
f73dda09 15174 fi
ccc6cda3
JA
15175fi
15176
d3a24ed2 15177echo "$as_me:15177: checking for TIOCSTAT in sys/ioctl.h" >&5
f73dda09
JA
15178echo $ECHO_N "checking for TIOCSTAT in sys/ioctl.h... $ECHO_C" >&6
15179if test "${bash_cv_tiocstat_in_ioctl+set}" = set; then
15180 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 15181else
f73dda09 15182 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 15183#line 15183 "configure"
ccc6cda3
JA
15184#include "confdefs.h"
15185#include <sys/types.h>
15186#include <sys/ioctl.h>
f73dda09
JA
15187int
15188main ()
15189{
ccc6cda3 15190int x = TIOCSTAT;
f73dda09
JA
15191 ;
15192 return 0;
15193}
15194_ACEOF
15195rm -f conftest.$ac_objext
d3a24ed2 15196if { (eval echo "$as_me:15196: \"$ac_compile\"") >&5
f73dda09
JA
15197 (eval $ac_compile) 2>&5
15198 ac_status=$?
d3a24ed2 15199 echo "$as_me:15199: \$? = $ac_status" >&5
f73dda09
JA
15200 (exit $ac_status); } &&
15201 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 15202 { (eval echo "$as_me:15202: \"$ac_try\"") >&5
f73dda09
JA
15203 (eval $ac_try) 2>&5
15204 ac_status=$?
d3a24ed2 15205 echo "$as_me:15205: \$? = $ac_status" >&5
f73dda09 15206 (exit $ac_status); }; }; then
ccc6cda3
JA
15207 bash_cv_tiocstat_in_ioctl=yes
15208else
f73dda09
JA
15209 echo "$as_me: failed program was:" >&5
15210cat conftest.$ac_ext >&5
15211bash_cv_tiocstat_in_ioctl=no
ccc6cda3 15212fi
f73dda09 15213rm -f conftest.$ac_objext conftest.$ac_ext
ccc6cda3
JA
15214fi
15215
d3a24ed2 15216echo "$as_me:15216: result: $bash_cv_tiocstat_in_ioctl" >&5
f73dda09
JA
15217echo "${ECHO_T}$bash_cv_tiocstat_in_ioctl" >&6
15218if test $bash_cv_tiocstat_in_ioctl = yes; then
15219cat >>confdefs.h <<\EOF
ccc6cda3
JA
15220#define TIOCSTAT_IN_SYS_IOCTL 1
15221EOF
15222
15223fi
15224
d3a24ed2 15225echo "$as_me:15225: checking for FIONREAD in sys/ioctl.h" >&5
f73dda09
JA
15226echo $ECHO_N "checking for FIONREAD in sys/ioctl.h... $ECHO_C" >&6
15227if test "${bash_cv_fionread_in_ioctl+set}" = set; then
15228 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 15229else
f73dda09 15230 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 15231#line 15231 "configure"
ccc6cda3
JA
15232#include "confdefs.h"
15233#include <sys/types.h>
15234#include <sys/ioctl.h>
f73dda09
JA
15235int
15236main ()
15237{
ccc6cda3 15238int x = FIONREAD;
f73dda09
JA
15239 ;
15240 return 0;
15241}
15242_ACEOF
15243rm -f conftest.$ac_objext
d3a24ed2 15244if { (eval echo "$as_me:15244: \"$ac_compile\"") >&5
f73dda09
JA
15245 (eval $ac_compile) 2>&5
15246 ac_status=$?
d3a24ed2 15247 echo "$as_me:15247: \$? = $ac_status" >&5
f73dda09
JA
15248 (exit $ac_status); } &&
15249 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 15250 { (eval echo "$as_me:15250: \"$ac_try\"") >&5
f73dda09
JA
15251 (eval $ac_try) 2>&5
15252 ac_status=$?
d3a24ed2 15253 echo "$as_me:15253: \$? = $ac_status" >&5
f73dda09 15254 (exit $ac_status); }; }; then
ccc6cda3
JA
15255 bash_cv_fionread_in_ioctl=yes
15256else
f73dda09
JA
15257 echo "$as_me: failed program was:" >&5
15258cat conftest.$ac_ext >&5
15259bash_cv_fionread_in_ioctl=no
ccc6cda3 15260fi
f73dda09 15261rm -f conftest.$ac_objext conftest.$ac_ext
ccc6cda3
JA
15262fi
15263
d3a24ed2 15264echo "$as_me:15264: result: $bash_cv_fionread_in_ioctl" >&5
f73dda09
JA
15265echo "${ECHO_T}$bash_cv_fionread_in_ioctl" >&6
15266if test $bash_cv_fionread_in_ioctl = yes; then
15267cat >>confdefs.h <<\EOF
ccc6cda3
JA
15268#define FIONREAD_IN_SYS_IOCTL 1
15269EOF
15270
15271fi
15272
d3a24ed2 15273echo "$as_me:15273: checking for speed_t in sys/types.h" >&5
f73dda09
JA
15274echo $ECHO_N "checking for speed_t in sys/types.h... $ECHO_C" >&6
15275if test "${bash_cv_speed_t_in_sys_types+set}" = set; then
15276 echo $ECHO_N "(cached) $ECHO_C" >&6
d166f048 15277else
f73dda09 15278 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 15279#line 15279 "configure"
d166f048
JA
15280#include "confdefs.h"
15281#include <sys/types.h>
f73dda09
JA
15282int
15283main ()
15284{
d166f048 15285speed_t x;
f73dda09
JA
15286 ;
15287 return 0;
15288}
15289_ACEOF
15290rm -f conftest.$ac_objext
d3a24ed2 15291if { (eval echo "$as_me:15291: \"$ac_compile\"") >&5
f73dda09
JA
15292 (eval $ac_compile) 2>&5
15293 ac_status=$?
d3a24ed2 15294 echo "$as_me:15294: \$? = $ac_status" >&5
f73dda09
JA
15295 (exit $ac_status); } &&
15296 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 15297 { (eval echo "$as_me:15297: \"$ac_try\"") >&5
f73dda09
JA
15298 (eval $ac_try) 2>&5
15299 ac_status=$?
d3a24ed2 15300 echo "$as_me:15300: \$? = $ac_status" >&5
f73dda09 15301 (exit $ac_status); }; }; then
d166f048
JA
15302 bash_cv_speed_t_in_sys_types=yes
15303else
f73dda09
JA
15304 echo "$as_me: failed program was:" >&5
15305cat conftest.$ac_ext >&5
15306bash_cv_speed_t_in_sys_types=no
d166f048 15307fi
f73dda09 15308rm -f conftest.$ac_objext conftest.$ac_ext
d166f048
JA
15309fi
15310
d3a24ed2 15311echo "$as_me:15311: result: $bash_cv_speed_t_in_sys_types" >&5
f73dda09
JA
15312echo "${ECHO_T}$bash_cv_speed_t_in_sys_types" >&6
15313if test $bash_cv_speed_t_in_sys_types = yes; then
15314cat >>confdefs.h <<\EOF
d166f048
JA
15315#define SPEED_T_IN_SYS_TYPES 1
15316EOF
15317
15318fi
15319
d3a24ed2 15320echo "$as_me:15320: checking whether getpw functions are declared in pwd.h" >&5
f73dda09
JA
15321echo $ECHO_N "checking whether getpw functions are declared in pwd.h... $ECHO_C" >&6
15322if test "${bash_cv_getpw_declared+set}" = set; then
15323 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 15324else
f73dda09 15325 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 15326#line 15326 "configure"
ccc6cda3 15327#include "confdefs.h"
28ef6c31 15328
ccc6cda3 15329#include <sys/types.h>
28ef6c31
JA
15330#ifdef HAVE_UNISTD_H
15331# include <unistd.h>
15332#endif
ccc6cda3 15333#include <pwd.h>
28ef6c31 15334
f73dda09 15335_ACEOF
28ef6c31
JA
15336if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15337 egrep "getpwuid" >/dev/null 2>&1; then
28ef6c31 15338 bash_cv_getpw_declared=yes
ccc6cda3 15339else
28ef6c31 15340 bash_cv_getpw_declared=no
ccc6cda3
JA
15341fi
15342rm -f conftest*
28ef6c31 15343
ccc6cda3
JA
15344fi
15345
d3a24ed2 15346echo "$as_me:15346: result: $bash_cv_getpw_declared" >&5
f73dda09 15347echo "${ECHO_T}$bash_cv_getpw_declared" >&6
28ef6c31 15348if test $bash_cv_getpw_declared = yes; then
f73dda09 15349cat >>confdefs.h <<\EOF
ccc6cda3
JA
15350#define HAVE_GETPW_DECLS 1
15351EOF
15352
15353fi
15354
d3a24ed2 15355echo "$as_me:15355: checking for unusable real-time signals due to large values" >&5
f73dda09
JA
15356echo $ECHO_N "checking for unusable real-time signals due to large values... $ECHO_C" >&6
15357if test "${bash_cv_unusable_rtsigs+set}" = set; then
15358 echo $ECHO_N "(cached) $ECHO_C" >&6
28ef6c31
JA
15359else
15360 if test "$cross_compiling" = yes; then
d3a24ed2 15361 { echo "$as_me:15361: WARNING: cannot check real-time signals if cross compiling -- defaulting to yes" >&5
f73dda09 15362echo "$as_me: WARNING: cannot check real-time signals if cross compiling -- defaulting to yes" >&2;}
28ef6c31
JA
15363 bash_cv_unusable_rtsigs=yes
15364
15365else
f73dda09 15366 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 15367#line 15367 "configure"
28ef6c31
JA
15368#include "confdefs.h"
15369
15370#include <sys/types.h>
15371#include <signal.h>
15372
15373#ifndef NSIG
15374# define NSIG 64
15375#endif
15376
15377main ()
15378{
15379 int n_sigs = 2 * NSIG;
15380#ifdef SIGRTMIN
15381 int rtmin = SIGRTMIN;
15382#else
15383 int rtmin = 0;
15384#endif
15385
15386 exit(rtmin < n_sigs);
15387}
f73dda09
JA
15388_ACEOF
15389rm -f conftest$ac_exeext
d3a24ed2 15390if { (eval echo "$as_me:15390: \"$ac_link\"") >&5
f73dda09
JA
15391 (eval $ac_link) 2>&5
15392 ac_status=$?
d3a24ed2 15393 echo "$as_me:15393: \$? = $ac_status" >&5
f73dda09 15394 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d3a24ed2 15395 { (eval echo "$as_me:15395: \"$ac_try\"") >&5
f73dda09
JA
15396 (eval $ac_try) 2>&5
15397 ac_status=$?
d3a24ed2 15398 echo "$as_me:15398: \$? = $ac_status" >&5
f73dda09 15399 (exit $ac_status); }; }; then
28ef6c31
JA
15400 bash_cv_unusable_rtsigs=yes
15401else
f73dda09
JA
15402 echo "$as_me: program exited with status $ac_status" >&5
15403echo "$as_me: failed program was:" >&5
15404cat conftest.$ac_ext >&5
15405bash_cv_unusable_rtsigs=no
28ef6c31 15406fi
f73dda09 15407rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
28ef6c31 15408fi
28ef6c31
JA
15409fi
15410
d3a24ed2 15411echo "$as_me:15411: result: $bash_cv_unusable_rtsigs" >&5
f73dda09 15412echo "${ECHO_T}$bash_cv_unusable_rtsigs" >&6
28ef6c31 15413if test $bash_cv_unusable_rtsigs = yes; then
f73dda09 15414cat >>confdefs.h <<\EOF
28ef6c31
JA
15415#define UNUSABLE_RT_SIGNALS 1
15416EOF
15417
15418fi
15419
f73dda09
JA
15420if test "$bash_cv_sys_siglist" = no && test "$bash_cv_under_sys_siglist" = no && test "$bash_cv_have_strsignal" = no; then
15421 SIGLIST_O=siglist.o
15422else
15423 SIGLIST_O=
15424fi
ccc6cda3
JA
15425
15426case "$host_os" in
d3a24ed2 15427hpux*) echo "$as_me:15427: checking whether $host_os needs _KERNEL for RLIMIT defines" >&5
f73dda09
JA
15428echo $ECHO_N "checking whether $host_os needs _KERNEL for RLIMIT defines... $ECHO_C" >&6
15429if test "${bash_cv_kernel_rlimit+set}" = set; then
15430 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 15431else
f73dda09 15432 cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 15433#line 15433 "configure"
ccc6cda3
JA
15434#include "confdefs.h"
15435
15436#include <sys/types.h>
15437#include <sys/resource.h>
15438
f73dda09
JA
15439int
15440main ()
15441{
ccc6cda3
JA
15442
15443 int f;
15444 f = RLIMIT_DATA;
15445
f73dda09
JA
15446 ;
15447 return 0;
15448}
15449_ACEOF
15450rm -f conftest.$ac_objext
d3a24ed2 15451if { (eval echo "$as_me:15451: \"$ac_compile\"") >&5
f73dda09
JA
15452 (eval $ac_compile) 2>&5
15453 ac_status=$?
d3a24ed2 15454 echo "$as_me:15454: \$? = $ac_status" >&5
f73dda09
JA
15455 (exit $ac_status); } &&
15456 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 15457 { (eval echo "$as_me:15457: \"$ac_try\"") >&5
f73dda09
JA
15458 (eval $ac_try) 2>&5
15459 ac_status=$?
d3a24ed2 15460 echo "$as_me:15460: \$? = $ac_status" >&5
f73dda09 15461 (exit $ac_status); }; }; then
ccc6cda3
JA
15462 bash_cv_kernel_rlimit=no
15463else
f73dda09
JA
15464 echo "$as_me: failed program was:" >&5
15465cat conftest.$ac_ext >&5
15466cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 15467#line 15467 "configure"
ccc6cda3
JA
15468#include "confdefs.h"
15469
cce855bc
JA
15470#include <sys/types.h>
15471#define _KERNEL
15472#include <sys/resource.h>
15473#undef _KERNEL
15474
f73dda09
JA
15475int
15476main ()
15477{
ccc6cda3
JA
15478
15479 int f;
15480 f = RLIMIT_DATA;
cce855bc 15481
f73dda09
JA
15482 ;
15483 return 0;
15484}
15485_ACEOF
15486rm -f conftest.$ac_objext
d3a24ed2 15487if { (eval echo "$as_me:15487: \"$ac_compile\"") >&5
f73dda09
JA
15488 (eval $ac_compile) 2>&5
15489 ac_status=$?
d3a24ed2 15490 echo "$as_me:15490: \$? = $ac_status" >&5
f73dda09
JA
15491 (exit $ac_status); } &&
15492 { ac_try='test -s conftest.$ac_objext'
d3a24ed2 15493 { (eval echo "$as_me:15493: \"$ac_try\"") >&5
f73dda09
JA
15494 (eval $ac_try) 2>&5
15495 ac_status=$?
d3a24ed2 15496 echo "$as_me:15496: \$? = $ac_status" >&5
f73dda09 15497 (exit $ac_status); }; }; then
ccc6cda3
JA
15498 bash_cv_kernel_rlimit=yes
15499else
f73dda09
JA
15500 echo "$as_me: failed program was:" >&5
15501cat conftest.$ac_ext >&5
15502bash_cv_kernel_rlimit=no
ccc6cda3 15503fi
f73dda09 15504rm -f conftest.$ac_objext conftest.$ac_ext
ccc6cda3
JA
15505
15506fi
f73dda09 15507rm -f conftest.$ac_objext conftest.$ac_ext
ccc6cda3
JA
15508fi
15509
d3a24ed2 15510echo "$as_me:15510: result: $bash_cv_kernel_rlimit" >&5
f73dda09 15511echo "${ECHO_T}$bash_cv_kernel_rlimit" >&6
ccc6cda3 15512if test $bash_cv_kernel_rlimit = yes; then
f73dda09 15513cat >>confdefs.h <<\EOF
ccc6cda3
JA
15514#define RLIMIT_NEEDS_KERNEL 1
15515EOF
15516
15517fi
15518 ;;
15519esac
15520
15521if test "$opt_readline" = yes; then
d166f048
JA
15522case "$host_os" in
15523aix*) prefer_curses=yes ;;
15524esac
ccc6cda3
JA
15525
15526if test "X$bash_cv_termcap_lib" = "X"; then
15527_bash_needmsg=yes
15528else
d3a24ed2 15529echo "$as_me:15529: checking which library has the termcap functions" >&5
f73dda09 15530echo $ECHO_N "checking which library has the termcap functions... $ECHO_C" >&6
ccc6cda3
JA
15531_bash_needmsg=
15532fi
f73dda09
JA
15533if test "${bash_cv_termcap_lib+set}" = set; then
15534 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 15535else
d3a24ed2
CR
15536 echo "$as_me:15536: checking for tgetent" >&5
15537echo $ECHO_N "checking for tgetent... $ECHO_C" >&6
15538if test "${ac_cv_func_tgetent+set}" = set; then
15539 echo $ECHO_N "(cached) $ECHO_C" >&6
15540else
15541 cat >conftest.$ac_ext <<_ACEOF
15542#line 15542 "configure"
15543#include "confdefs.h"
15544/* System header to define __stub macros and hopefully few prototypes,
15545 which can conflict with char tgetent (); below. */
15546#include <assert.h>
15547/* Override any gcc2 internal prototype to avoid an error. */
15548#ifdef __cplusplus
15549extern "C"
15550#endif
15551/* We use char because int might match the return type of a gcc2
15552 builtin and then its argument prototype would still apply. */
15553char tgetent ();
15554char (*f) ();
15555
15556int
15557main ()
15558{
15559/* The GNU C library defines this for functions which it implements
15560 to always fail with ENOSYS. Some functions are actually named
15561 something starting with __ and the normal name is an alias. */
15562#if defined (__stub_tgetent) || defined (__stub___tgetent)
15563choke me
15564#else
15565f = tgetent;
15566#endif
15567
15568 ;
15569 return 0;
15570}
15571_ACEOF
15572rm -f conftest.$ac_objext conftest$ac_exeext
15573if { (eval echo "$as_me:15573: \"$ac_link\"") >&5
15574 (eval $ac_link) 2>&5
15575 ac_status=$?
15576 echo "$as_me:15576: \$? = $ac_status" >&5
15577 (exit $ac_status); } &&
15578 { ac_try='test -s conftest$ac_exeext'
15579 { (eval echo "$as_me:15579: \"$ac_try\"") >&5
15580 (eval $ac_try) 2>&5
15581 ac_status=$?
15582 echo "$as_me:15582: \$? = $ac_status" >&5
15583 (exit $ac_status); }; }; then
15584 ac_cv_func_tgetent=yes
15585else
15586 echo "$as_me: failed program was:" >&5
15587cat conftest.$ac_ext >&5
15588ac_cv_func_tgetent=no
15589fi
15590rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15591fi
15592echo "$as_me:15592: result: $ac_cv_func_tgetent" >&5
15593echo "${ECHO_T}$ac_cv_func_tgetent" >&6
15594if test $ac_cv_func_tgetent = yes; then
15595 bash_cv_termcap_lib=libc
15596else
15597 echo "$as_me:15597: checking for tgetent in -ltermcap" >&5
f73dda09
JA
15598echo $ECHO_N "checking for tgetent in -ltermcap... $ECHO_C" >&6
15599if test "${ac_cv_lib_termcap_tgetent+set}" = set; then
15600 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 15601else
f73dda09 15602 ac_check_lib_save_LIBS=$LIBS
ccc6cda3 15603LIBS="-ltermcap $LIBS"
f73dda09 15604cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 15605#line 15605 "configure"
ccc6cda3 15606#include "confdefs.h"
f73dda09 15607
ccc6cda3 15608/* Override any gcc2 internal prototype to avoid an error. */
f73dda09
JA
15609#ifdef __cplusplus
15610extern "C"
15611#endif
ccc6cda3 15612/* We use char because int might match the return type of a gcc2
f73dda09
JA
15613 builtin and then its argument prototype would still apply. */
15614char tgetent ();
15615int
15616main ()
15617{
15618tgetent ();
15619 ;
15620 return 0;
15621}
15622_ACEOF
15623rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 15624if { (eval echo "$as_me:15624: \"$ac_link\"") >&5
f73dda09
JA
15625 (eval $ac_link) 2>&5
15626 ac_status=$?
d3a24ed2 15627 echo "$as_me:15627: \$? = $ac_status" >&5
f73dda09
JA
15628 (exit $ac_status); } &&
15629 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 15630 { (eval echo "$as_me:15630: \"$ac_try\"") >&5
f73dda09
JA
15631 (eval $ac_try) 2>&5
15632 ac_status=$?
d3a24ed2 15633 echo "$as_me:15633: \$? = $ac_status" >&5
f73dda09
JA
15634 (exit $ac_status); }; }; then
15635 ac_cv_lib_termcap_tgetent=yes
15636else
15637 echo "$as_me: failed program was:" >&5
15638cat conftest.$ac_ext >&5
15639ac_cv_lib_termcap_tgetent=no
15640fi
15641rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15642LIBS=$ac_check_lib_save_LIBS
15643fi
d3a24ed2 15644echo "$as_me:15644: result: $ac_cv_lib_termcap_tgetent" >&5
f73dda09
JA
15645echo "${ECHO_T}$ac_cv_lib_termcap_tgetent" >&6
15646if test $ac_cv_lib_termcap_tgetent = yes; then
ccc6cda3
JA
15647 bash_cv_termcap_lib=libtermcap
15648else
d3a24ed2 15649 echo "$as_me:15649: checking for tgetent in -ltinfo" >&5
f73dda09
JA
15650echo $ECHO_N "checking for tgetent in -ltinfo... $ECHO_C" >&6
15651if test "${ac_cv_lib_tinfo_tgetent+set}" = set; then
15652 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 15653else
f73dda09
JA
15654 ac_check_lib_save_LIBS=$LIBS
15655LIBS="-ltinfo $LIBS"
15656cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 15657#line 15657 "configure"
ccc6cda3 15658#include "confdefs.h"
f73dda09 15659
ccc6cda3 15660/* Override any gcc2 internal prototype to avoid an error. */
f73dda09
JA
15661#ifdef __cplusplus
15662extern "C"
15663#endif
ccc6cda3 15664/* We use char because int might match the return type of a gcc2
f73dda09
JA
15665 builtin and then its argument prototype would still apply. */
15666char tgetent ();
15667int
15668main ()
15669{
15670tgetent ();
15671 ;
15672 return 0;
15673}
15674_ACEOF
15675rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 15676if { (eval echo "$as_me:15676: \"$ac_link\"") >&5
f73dda09
JA
15677 (eval $ac_link) 2>&5
15678 ac_status=$?
d3a24ed2 15679 echo "$as_me:15679: \$? = $ac_status" >&5
f73dda09
JA
15680 (exit $ac_status); } &&
15681 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 15682 { (eval echo "$as_me:15682: \"$ac_try\"") >&5
f73dda09
JA
15683 (eval $ac_try) 2>&5
15684 ac_status=$?
d3a24ed2 15685 echo "$as_me:15685: \$? = $ac_status" >&5
f73dda09
JA
15686 (exit $ac_status); }; }; then
15687 ac_cv_lib_tinfo_tgetent=yes
15688else
15689 echo "$as_me: failed program was:" >&5
15690cat conftest.$ac_ext >&5
15691ac_cv_lib_tinfo_tgetent=no
15692fi
15693rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15694LIBS=$ac_check_lib_save_LIBS
15695fi
d3a24ed2 15696echo "$as_me:15696: result: $ac_cv_lib_tinfo_tgetent" >&5
f73dda09
JA
15697echo "${ECHO_T}$ac_cv_lib_tinfo_tgetent" >&6
15698if test $ac_cv_lib_tinfo_tgetent = yes; then
7117c2d2 15699 bash_cv_termcap_lib=libtinfo
f73dda09 15700else
d3a24ed2 15701 echo "$as_me:15701: checking for tgetent in -lcurses" >&5
f73dda09
JA
15702echo $ECHO_N "checking for tgetent in -lcurses... $ECHO_C" >&6
15703if test "${ac_cv_lib_curses_tgetent+set}" = set; then
15704 echo $ECHO_N "(cached) $ECHO_C" >&6
15705else
15706 ac_check_lib_save_LIBS=$LIBS
15707LIBS="-lcurses $LIBS"
15708cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 15709#line 15709 "configure"
f73dda09 15710#include "confdefs.h"
ccc6cda3 15711
f73dda09
JA
15712/* Override any gcc2 internal prototype to avoid an error. */
15713#ifdef __cplusplus
15714extern "C"
15715#endif
15716/* We use char because int might match the return type of a gcc2
15717 builtin and then its argument prototype would still apply. */
15718char tgetent ();
15719int
15720main ()
15721{
15722tgetent ();
15723 ;
15724 return 0;
15725}
15726_ACEOF
15727rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 15728if { (eval echo "$as_me:15728: \"$ac_link\"") >&5
f73dda09
JA
15729 (eval $ac_link) 2>&5
15730 ac_status=$?
d3a24ed2 15731 echo "$as_me:15731: \$? = $ac_status" >&5
f73dda09
JA
15732 (exit $ac_status); } &&
15733 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 15734 { (eval echo "$as_me:15734: \"$ac_try\"") >&5
f73dda09
JA
15735 (eval $ac_try) 2>&5
15736 ac_status=$?
d3a24ed2 15737 echo "$as_me:15737: \$? = $ac_status" >&5
f73dda09
JA
15738 (exit $ac_status); }; }; then
15739 ac_cv_lib_curses_tgetent=yes
15740else
15741 echo "$as_me: failed program was:" >&5
15742cat conftest.$ac_ext >&5
15743ac_cv_lib_curses_tgetent=no
15744fi
15745rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15746LIBS=$ac_check_lib_save_LIBS
15747fi
d3a24ed2 15748echo "$as_me:15748: result: $ac_cv_lib_curses_tgetent" >&5
f73dda09
JA
15749echo "${ECHO_T}$ac_cv_lib_curses_tgetent" >&6
15750if test $ac_cv_lib_curses_tgetent = yes; then
ccc6cda3
JA
15751 bash_cv_termcap_lib=libcurses
15752else
d3a24ed2 15753 echo "$as_me:15753: checking for tgetent in -lncurses" >&5
f73dda09
JA
15754echo $ECHO_N "checking for tgetent in -lncurses... $ECHO_C" >&6
15755if test "${ac_cv_lib_ncurses_tgetent+set}" = set; then
15756 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3 15757else
f73dda09 15758 ac_check_lib_save_LIBS=$LIBS
ccc6cda3 15759LIBS="-lncurses $LIBS"
f73dda09 15760cat >conftest.$ac_ext <<_ACEOF
d3a24ed2 15761#line 15761 "configure"
ccc6cda3 15762#include "confdefs.h"
f73dda09 15763
ccc6cda3 15764/* Override any gcc2 internal prototype to avoid an error. */
f73dda09
JA
15765#ifdef __cplusplus
15766extern "C"
15767#endif
ccc6cda3 15768/* We use char because int might match the return type of a gcc2
f73dda09
JA
15769 builtin and then its argument prototype would still apply. */
15770char tgetent ();
15771int
15772main ()
15773{
15774tgetent ();
15775 ;
15776 return 0;
15777}
15778_ACEOF
15779rm -f conftest.$ac_objext conftest$ac_exeext
d3a24ed2 15780if { (eval echo "$as_me:15780: \"$ac_link\"") >&5
f73dda09
JA
15781 (eval $ac_link) 2>&5
15782 ac_status=$?
d3a24ed2 15783 echo "$as_me:15783: \$? = $ac_status" >&5
f73dda09
JA
15784 (exit $ac_status); } &&
15785 { ac_try='test -s conftest$ac_exeext'
d3a24ed2 15786 { (eval echo "$as_me:15786: \"$ac_try\"") >&5
f73dda09
JA
15787 (eval $ac_try) 2>&5
15788 ac_status=$?
d3a24ed2 15789 echo "$as_me:15789: \$? = $ac_status" >&5
f73dda09
JA
15790 (exit $ac_status); }; }; then
15791 ac_cv_lib_ncurses_tgetent=yes
15792else
15793 echo "$as_me: failed program was:" >&5
15794cat conftest.$ac_ext >&5
15795ac_cv_lib_ncurses_tgetent=no
15796fi
15797rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15798LIBS=$ac_check_lib_save_LIBS
15799fi
d3a24ed2 15800echo "$as_me:15800: result: $ac_cv_lib_ncurses_tgetent" >&5
f73dda09
JA
15801echo "${ECHO_T}$ac_cv_lib_ncurses_tgetent" >&6
15802if test $ac_cv_lib_ncurses_tgetent = yes; then
15803 bash_cv_termcap_lib=libncurses
ccc6cda3 15804else
f73dda09 15805 bash_cv_termcap_lib=gnutermcap
ccc6cda3 15806fi
ccc6cda3 15807
ccc6cda3
JA
15808fi
15809
15810fi
15811
15812fi
15813
15814fi
15815
d3a24ed2
CR
15816fi
15817
ccc6cda3 15818if test "X$_bash_needmsg" = "Xyes"; then
d3a24ed2 15819echo "$as_me:15819: checking which library has the termcap functions" >&5
f73dda09 15820echo $ECHO_N "checking which library has the termcap functions... $ECHO_C" >&6
ccc6cda3 15821fi
d3a24ed2 15822echo "$as_me:15822: result: using $bash_cv_termcap_lib" >&5
f73dda09 15823echo "${ECHO_T}using $bash_cv_termcap_lib" >&6
cce855bc 15824if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
ccc6cda3
JA
15825LDFLAGS="$LDFLAGS -L./lib/termcap"
15826TERMCAP_LIB="./lib/termcap/libtermcap.a"
15827TERMCAP_DEP="./lib/termcap/libtermcap.a"
d166f048 15828elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
ccc6cda3
JA
15829TERMCAP_LIB=-ltermcap
15830TERMCAP_DEP=
f73dda09
JA
15831elif test $bash_cv_termcap_lib = libtinfo; then
15832TERMCAP_LIB=-ltinfo
15833TERMCAP_DEP=
ccc6cda3
JA
15834elif test $bash_cv_termcap_lib = libncurses; then
15835TERMCAP_LIB=-lncurses
15836TERMCAP_DEP=
d3a24ed2
CR
15837elif test $bash_cv_termcap_lib = libc; then
15838TERMCAP_LIB=
15839TERMCAP_DEP=
ccc6cda3
JA
15840else
15841TERMCAP_LIB=-lcurses
15842TERMCAP_DEP=
15843fi
15844
15845fi
15846
d3a24ed2 15847echo "$as_me:15847: checking whether /dev/fd is available" >&5
f73dda09
JA
15848echo $ECHO_N "checking whether /dev/fd is available... $ECHO_C" >&6
15849if test "${bash_cv_dev_fd+set}" = set; then
15850 echo $ECHO_N "(cached) $ECHO_C" >&6
d166f048 15851else
d3a24ed2 15852 if test -d /dev/fd && test -r /dev/fd/0 < /dev/null; then
d166f048 15853 bash_cv_dev_fd=standard
d3a24ed2 15854 elif test -d /proc/self/fd && test -r /proc/self/fd/0 < /dev/null; then
d166f048
JA
15855 bash_cv_dev_fd=whacky
15856 else
15857 bash_cv_dev_fd=absent
15858 fi
15859
15860fi
15861
d3a24ed2 15862echo "$as_me:15862: result: $bash_cv_dev_fd" >&5
f73dda09 15863echo "${ECHO_T}$bash_cv_dev_fd" >&6
d166f048 15864if test $bash_cv_dev_fd = "standard"; then
f73dda09 15865 cat >>confdefs.h <<\EOF
d166f048
JA
15866#define HAVE_DEV_FD 1
15867EOF
15868
f73dda09 15869 cat >>confdefs.h <<\EOF
d166f048
JA
15870#define DEV_FD_PREFIX "/dev/fd/"
15871EOF
15872
15873elif test $bash_cv_dev_fd = "whacky"; then
f73dda09 15874 cat >>confdefs.h <<\EOF
d166f048
JA
15875#define HAVE_DEV_FD 1
15876EOF
15877
f73dda09 15878 cat >>confdefs.h <<\EOF
d166f048
JA
15879#define DEV_FD_PREFIX "/proc/self/fd/"
15880EOF
15881
15882fi
15883
d3a24ed2 15884echo "$as_me:15884: checking whether /dev/stdin stdout stderr are available" >&5
f73dda09
JA
15885echo $ECHO_N "checking whether /dev/stdin stdout stderr are available... $ECHO_C" >&6
15886if test "${bash_cv_dev_stdin+set}" = set; then
15887 echo $ECHO_N "(cached) $ECHO_C" >&6
bb70624e 15888else
d3a24ed2 15889 if test -d /dev/fd && test -r /dev/stdin < /dev/null; then
bb70624e 15890 bash_cv_dev_stdin=present
d3a24ed2 15891 elif test -d /proc/self/fd && test -r /dev/stdin < /dev/null; then
bb70624e
JA
15892 bash_cv_dev_stdin=present
15893 else
15894 bash_cv_dev_stdin=absent
15895 fi
15896
15897fi
15898
d3a24ed2 15899echo "$as_me:15899: result: $bash_cv_dev_stdin" >&5
f73dda09 15900echo "${ECHO_T}$bash_cv_dev_stdin" >&6
bb70624e 15901if test $bash_cv_dev_stdin = "present"; then
f73dda09 15902 cat >>confdefs.h <<\EOF
bb70624e
JA
15903#define HAVE_DEV_STDIN 1
15904EOF
15905
15906fi
15907
d3a24ed2 15908echo "$as_me:15908: checking for default mail directory" >&5
f73dda09
JA
15909echo $ECHO_N "checking for default mail directory... $ECHO_C" >&6
15910if test "${bash_cv_mail_dir+set}" = set; then
15911 echo $ECHO_N "(cached) $ECHO_C" >&6
ccc6cda3
JA
15912else
15913 if test -d /var/mail; then
15914 bash_cv_mail_dir=/var/mail
ccc6cda3
JA
15915 elif test -d /var/spool/mail; then
15916 bash_cv_mail_dir=/var/spool/mail
7117c2d2
JA
15917 elif test -d /usr/mail; then
15918 bash_cv_mail_dir=/usr/mail
e8ce775d
JA
15919 elif test -d /usr/spool/mail; then
15920 bash_cv_mail_dir=/usr/spool/mail
ccc6cda3
JA
15921 else
15922 bash_cv_mail_dir=unknown
15923 fi
15924
15925fi
15926
d3a24ed2 15927echo "$as_me:15927: result: $bash_cv_mail_dir" >&5
f73dda09 15928echo "${ECHO_T}$bash_cv_mail_dir" >&6
7117c2d2
JA
15929cat >>confdefs.h <<EOF
15930#define DEFAULT_MAIL_DIRECTORY "$bash_cv_mail_dir"
ccc6cda3
JA
15931EOF
15932
ccc6cda3
JA
15933if test "$bash_cv_job_control_missing" = missing; then
15934 opt_job_control=no
15935fi
15936
15937if test "$opt_job_control" = yes; then
f73dda09 15938cat >>confdefs.h <<\EOF
ccc6cda3
JA
15939#define JOB_CONTROL 1
15940EOF
15941
15942JOBS_O=jobs.o
15943else
15944JOBS_O=nojobs.o
15945fi
15946
d166f048
JA
15947LOCAL_DEFS=-DSHELL
15948
b72432fd 15949case "${host_os}" in
f73dda09 15950sysv4.2*) cat >>confdefs.h <<\EOF
ccc6cda3
JA
15951#define SVR4_2 1
15952EOF
15953
f73dda09 15954 cat >>confdefs.h <<\EOF
ccc6cda3
JA
15955#define SVR4 1
15956EOF
15957 ;;
f73dda09 15958sysv4*) cat >>confdefs.h <<\EOF
ccc6cda3
JA
15959#define SVR4 1
15960EOF
15961 ;;
f73dda09 15962sysv5*) cat >>confdefs.h <<\EOF
b72432fd
JA
15963#define SVR5 1
15964EOF
15965 ;;
15966hpux9*) LOCAL_CFLAGS="-DHPUX9 -DHPUX" ;;
ccc6cda3
JA
15967hpux*) LOCAL_CFLAGS=-DHPUX ;;
15968dgux*) LOCAL_CFLAGS=-D_DGUX_SOURCE; LOCAL_LIBS=-ldgc ;;
bb70624e
JA
15969isc*) LOCAL_CFLAGS=-Disc386 ;;
15970rhapsody*) LOCAL_CFLAGS=-DRHAPSODY ;;
f73dda09 15971darwin*) LOCAL_CFLAGS=-DMACOSX ;;
7117c2d2
JA
15972sco3.2v5*) LOCAL_CFLAGS="-b elf -DWAITPID_BROKEN -DPATH_MAX=1024" ;;
15973sco3.2v4*) LOCAL_CFLAGS="-DMUST_UNBLOCK_CHLD -DPATH_MAX=1024" ;;
ccc6cda3 15974sco3.2*) LOCAL_CFLAGS=-DMUST_UNBLOCK_CHLD ;;
d166f048
JA
15975sunos4*) LOCAL_CFLAGS=-DSunOS4 ;;
15976solaris2.5*) LOCAL_CFLAGS=-DSunOS5 ;;
b72432fd 15977lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
d166f048 15978linux*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading
7117c2d2 15979*qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;;
b72432fd 15980powerux*) LOCAL_LIBS="-lgen" ;;
d3a24ed2 15981cygwin*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
f73dda09 15982opennt*|interix*) LOCAL_CFLAGS="-DNO_MAIN_ENV_ARG -DBROKEN_DIRENT_D_INO" ;;
b72432fd
JA
15983esac
15984
15985case "${host_os}-${CC}" in
15986aix4.2*-*gcc*) LOCAL_LDFLAGS="-Xlinker -bexpall -Xlinker -brtl" ;;
15987aix4.2*) LOCAL_LDFLAGS="-bexpall -brtl" ;;
15988bsdi4*-*gcc*) LOCAL_LDFLAGS="-rdynamic" ;; # allow dynamic loading, like Linux
ccc6cda3
JA
15989esac
15990
bb70624e 15991case "${host_os}" in
28ef6c31
JA
15992freebsd[3-9]*)
15993 if test -x /usr/bin/objformat && test "`/usr/bin/objformat`" = "elf" ; then
bb70624e
JA
15994 LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
15995 fi ;;
28ef6c31 15996freebsdelf*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading
bb70624e
JA
15997esac
15998
ccc6cda3
JA
15999case "$host_cpu" in
16000*cray*) LOCAL_CFLAGS="-DCRAY" ;; # shell var so config.h can use it
16001esac
16002
16003case "$host_cpu-$host_os" in
16004ibmrt-*bsd4*) LOCAL_CFLAGS="-ma -U__STDC__" ;;
16005esac
16006
16007case "$host_cpu-$host_vendor-$host_os" in
16008m88k-motorola-sysv3) LOCAL_CFLAGS=-DWAITPID_BROKEN ;;
16009mips-pyramid-sysv4) LOCAL_CFLAGS=-Xa ;;
16010esac
16011
b72432fd
JA
16012#
16013# Shared object configuration section. These values are generated by
16014# ${srcdir}/support/shobj-conf
16015#
16016if test "$ac_cv_func_dlopen" = "yes" && test -f ${srcdir}/support/shobj-conf
16017then
d3a24ed2 16018 echo "$as_me:16018: checking shared object configuration for loadable builtins" >&5
f73dda09 16019echo $ECHO_N "checking shared object configuration for loadable builtins... $ECHO_C" >&6
28ef6c31 16020 eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c "${host_cpu}" -o "${host_os}" -v "${host_vendor}"`
f73dda09 16021
d3a24ed2 16022 echo "$as_me:16022: result: $SHOBJ_STATUS" >&5
f73dda09 16023echo "${ECHO_T}$SHOBJ_STATUS" >&6
b72432fd
JA
16024fi
16025
ccc6cda3
JA
16026# try to create a directory tree if the source is elsewhere
16027# this should be packaged into a script accessible via ${srcdir}/support
16028case "$srcdir" in
16029.) ;;
cce855bc 16030*) for d in doc tests support lib examples; do # dirs
ccc6cda3
JA
16031 test -d $d || mkdir $d
16032 done
cce855bc 16033 for ld in readline glob tilde malloc sh termcap; do # libdirs
ccc6cda3
JA
16034 test -d lib/$ld || mkdir lib/$ld
16035 done
cce855bc 16036 test -d examples/loadables || mkdir examples/loadables # loadable builtins
bb70624e 16037 test -d examples/loadables/perl || mkdir examples/loadables/perl
ccc6cda3
JA
16038 ;;
16039esac
16040
16041BUILD_DIR=`pwd`
16042
d166f048
JA
16043#AC_SUBST(ALLOCA_SOURCE)
16044#AC_SUBST(ALLOCA_OBJECT)
16045
d3a24ed2 16046ac_config_files="$ac_config_files Makefile builtins/Makefile lib/readline/Makefile lib/glob/Makefile lib/malloc/Makefile lib/sh/Makefile lib/termcap/Makefile lib/tilde/Makefile doc/Makefile support/Makefile examples/loadables/Makefile examples/loadables/perl/Makefile pathnames.h"
f73dda09
JA
16047ac_config_commands="$ac_config_commands default"
16048cat >confcache <<\_ACEOF
ccc6cda3
JA
16049# This file is a shell script that caches the results of configure
16050# tests run on this system so they can be shared between configure
f73dda09
JA
16051# scripts and configure runs, see configure's option --config-cache.
16052# It is not useful on other systems. If it contains results you don't
16053# want to keep, you may remove or edit it.
726f6388 16054#
f73dda09
JA
16055# config.status only pays attention to the cache file if you give it
16056# the --recheck option to rerun configure.
ccc6cda3 16057#
f73dda09
JA
16058# `ac_cv_env_foo' variables (set or unset) will be overriden when
16059# loading this file, other *unset* `ac_cv_foo' will be assigned the
16060# following values.
16061
16062_ACEOF
16063
ccc6cda3
JA
16064# The following way of writing the cache mishandles newlines in values,
16065# but we know of no workaround that is simple, portable, and efficient.
16066# So, don't put newlines in cache variables' values.
16067# Ultrix sh set writes to stderr and can't be redirected directly,
16068# and sets the high bit in the cache file unless we assign to the vars.
f73dda09
JA
16069{
16070 (set) 2>&1 |
16071 case `(ac_space=' '; set | grep ac_space) 2>&1` in
16072 *ac_space=\ *)
16073 # `set' does not quote correctly, so add quotes (double-quote
16074 # substitution turns \\\\ into \\, and sed turns \\ into \).
16075 sed -n \
16076 "s/'/'\\\\''/g;
16077 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16078 ;;
16079 *)
16080 # `set' quotes correctly as required by POSIX, so do not add quotes.
16081 sed -n \
16082 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16083 ;;
16084 esac;
16085} |
16086 sed '
16087 t clear
16088 : clear
16089 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16090 t end
16091 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16092 : end' >>confcache
16093if cmp -s $cache_file confcache; then :; else
ccc6cda3 16094 if test -w $cache_file; then
f73dda09
JA
16095 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16096 cat confcache >$cache_file
ccc6cda3
JA
16097 else
16098 echo "not updating unwritable cache $cache_file"
16099 fi
16100fi
16101rm -f confcache
16102
ccc6cda3
JA
16103test "x$prefix" = xNONE && prefix=$ac_default_prefix
16104# Let make expand exec_prefix.
16105test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16106
f73dda09
JA
16107# VPATH may cause trouble with some makes, so we remove $(srcdir),
16108# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16109# trailing colons and then remove the whole line if VPATH becomes empty
16110# (actually we leave an empty line to preserve line numbers).
ccc6cda3 16111if test "x$srcdir" = x.; then
f73dda09
JA
16112 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16113s/:*\$(srcdir):*/:/;
16114s/:*\${srcdir}:*/:/;
16115s/:*@srcdir@:*/:/;
16116s/^\([^=]*=[ ]*\):*/\1/;
16117s/:*$//;
16118s/^[^=]*=[ ]*$//;
16119}'
ccc6cda3
JA
16120fi
16121
ccc6cda3
JA
16122DEFS=-DHAVE_CONFIG_H
16123
ccc6cda3 16124: ${CONFIG_STATUS=./config.status}
f73dda09
JA
16125ac_clean_files_save=$ac_clean_files
16126ac_clean_files="$ac_clean_files $CONFIG_STATUS"
d3a24ed2 16127{ echo "$as_me:16127: creating $CONFIG_STATUS" >&5
f73dda09
JA
16128echo "$as_me: creating $CONFIG_STATUS" >&6;}
16129cat >$CONFIG_STATUS <<_ACEOF
16130#! $SHELL
ccc6cda3
JA
16131# Generated automatically by configure.
16132# Run this file to recreate the current configuration.
ccc6cda3 16133# Compiler output produced by configure, useful for debugging
f73dda09 16134# configure, is in config.log if it exists.
ccc6cda3 16135
f73dda09
JA
16136debug=false
16137SHELL=\${CONFIG_SHELL-$SHELL}
16138ac_cs_invocation="\$0 \$@"
16139
16140_ACEOF
16141
16142cat >>$CONFIG_STATUS <<\_ACEOF
16143# Be Bourne compatible
16144if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16145 emulate sh
16146 NULLCMD=:
16147elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16148 set -o posix
16149fi
16150
16151# Name of the executable.
16152as_me=`echo "$0" |sed 's,.*[\\/],,'`
16153
16154if expr a : '\(a\)' >/dev/null 2>&1; then
16155 as_expr=expr
16156else
16157 as_expr=false
16158fi
16159
16160rm -f conf$$ conf$$.exe conf$$.file
16161echo >conf$$.file
16162if ln -s conf$$.file conf$$ 2>/dev/null; then
16163 # We could just check for DJGPP; but this test a) works b) is more generic
16164 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16165 if test -f conf$$.exe; then
16166 # Don't use ln at all; we don't have any links
16167 as_ln_s='cp -p'
16168 else
16169 as_ln_s='ln -s'
16170 fi
16171elif ln conf$$.file conf$$ 2>/dev/null; then
16172 as_ln_s=ln
16173else
16174 as_ln_s='cp -p'
16175fi
16176rm -f conf$$ conf$$.exe conf$$.file
16177
16178as_executable_p="test -f"
16179
16180# Support unset when possible.
16181if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16182 as_unset=unset
16183else
16184 as_unset=false
16185fi
16186
16187# NLS nuisances.
16188$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
16189$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
16190$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
16191$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
16192$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
16193$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
16194$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
16195$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
16196
16197# IFS
16198# We need space, tab and new line, in precisely that order.
16199as_nl='
16200'
16201IFS=" $as_nl"
16202
16203# CDPATH.
16204$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
16205
16206exec 6>&1
16207
16208_ACEOF
16209
16210# Files that config.status was made for.
16211if test -n "$ac_config_files"; then
16212 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16213fi
16214
16215if test -n "$ac_config_headers"; then
16216 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16217fi
16218
16219if test -n "$ac_config_links"; then
16220 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16221fi
16222
16223if test -n "$ac_config_commands"; then
16224 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16225fi
16226
16227cat >>$CONFIG_STATUS <<\EOF
16228
16229ac_cs_usage="\
16230\`$as_me' instantiates files from templates according to the
16231current configuration.
16232
16233Usage: $0 [OPTIONS] [FILE]...
16234
16235 -h, --help print this help, then exit
16236 -V, --version print version number, then exit
16237 -d, --debug don't remove temporary files
16238 --recheck update $as_me by reconfiguring in the same conditions
16239 --file=FILE[:TEMPLATE]
16240 instantiate the configuration file FILE
16241 --header=FILE[:TEMPLATE]
16242 instantiate the configuration header FILE
16243
16244Configuration files:
16245$config_files
16246
16247Configuration headers:
16248$config_headers
16249
16250Configuration commands:
16251$config_commands
16252
16253Report bugs to <bug-autoconf@gnu.org>."
16254EOF
16255
16256cat >>$CONFIG_STATUS <<EOF
16257ac_cs_version="\\
d3a24ed2 16258bash config.status 3.0-alpha
f73dda09
JA
16259configured by $0, generated by GNU Autoconf 2.52,
16260 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16261
16262Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16263Free Software Foundation, Inc.
16264This config.status script is free software; the Free Software Foundation
16265gives unlimited permission to copy, distribute and modify it."
16266srcdir=$srcdir
16267INSTALL="$INSTALL"
16268EOF
16269
16270cat >>$CONFIG_STATUS <<\EOF
16271# If no file are specified by the user, then we need to provide default
16272# value. By we need to know if files were specified by the user.
16273ac_need_defaults=:
16274while test $# != 0
ccc6cda3 16275do
f73dda09
JA
16276 case $1 in
16277 --*=*)
16278 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16279 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16280 shift
16281 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16282 shift
16283 ;;
16284 -*);;
16285 *) # This is not an option, so the user has probably given explicit
16286 # arguments.
16287 ac_need_defaults=false;;
16288 esac
16289
16290 case $1 in
16291 # Handling of the options.
16292EOF
16293cat >>$CONFIG_STATUS <<EOF
ccc6cda3 16294 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
f73dda09
JA
16295 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16296 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16297EOF
16298cat >>$CONFIG_STATUS <<\EOF
16299 --version | --vers* | -V )
16300 echo "$ac_cs_version"; exit 0 ;;
16301 --he | --h)
16302 # Conflict between --help and --header
d3a24ed2 16303 { { echo "$as_me:16303: error: ambiguous option: $1
f73dda09
JA
16304Try \`$0 --help' for more information." >&5
16305echo "$as_me: error: ambiguous option: $1
16306Try \`$0 --help' for more information." >&2;}
16307 { (exit 1); exit 1; }; };;
16308 --help | --hel | -h )
16309 echo "$ac_cs_usage"; exit 0 ;;
16310 --debug | --d* | -d )
16311 debug=: ;;
16312 --file | --fil | --fi | --f )
16313 shift
16314 CONFIG_FILES="$CONFIG_FILES $1"
16315 ac_need_defaults=false;;
16316 --header | --heade | --head | --hea )
16317 shift
16318 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16319 ac_need_defaults=false;;
16320
16321 # This is an error.
d3a24ed2 16322 -*) { { echo "$as_me:16322: error: unrecognized option: $1
f73dda09
JA
16323Try \`$0 --help' for more information." >&5
16324echo "$as_me: error: unrecognized option: $1
16325Try \`$0 --help' for more information." >&2;}
16326 { (exit 1); exit 1; }; } ;;
16327
16328 *) ac_config_targets="$ac_config_targets $1" ;;
16329
ccc6cda3 16330 esac
f73dda09 16331 shift
ccc6cda3
JA
16332done
16333
f73dda09
JA
16334exec 5>>config.log
16335cat >&5 << _ACEOF
ccc6cda3 16336
f73dda09
JA
16337## ----------------------- ##
16338## Running config.status. ##
16339## ----------------------- ##
16340
d3a24ed2 16341This file was extended by $as_me (bash 3.0-alpha) 2.52, executed with
f73dda09
JA
16342 CONFIG_FILES = $CONFIG_FILES
16343 CONFIG_HEADERS = $CONFIG_HEADERS
16344 CONFIG_LINKS = $CONFIG_LINKS
16345 CONFIG_COMMANDS = $CONFIG_COMMANDS
16346 > $ac_cs_invocation
16347on `(hostname || uname -n) 2>/dev/null | sed 1q`
16348
16349_ACEOF
ccc6cda3 16350EOF
ccc6cda3 16351
f73dda09
JA
16352cat >>$CONFIG_STATUS <<\EOF
16353for ac_config_target in $ac_config_targets
16354do
16355 case "$ac_config_target" in
16356 # Handling of arguments.
16357 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16358 "builtins/Makefile" ) CONFIG_FILES="$CONFIG_FILES builtins/Makefile" ;;
16359 "lib/readline/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/readline/Makefile" ;;
16360 "lib/glob/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/glob/Makefile" ;;
16361 "lib/malloc/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/malloc/Makefile" ;;
16362 "lib/sh/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/sh/Makefile" ;;
16363 "lib/termcap/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/termcap/Makefile" ;;
16364 "lib/tilde/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/tilde/Makefile" ;;
16365 "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
16366 "support/Makefile" ) CONFIG_FILES="$CONFIG_FILES support/Makefile" ;;
16367 "examples/loadables/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/loadables/Makefile" ;;
16368 "examples/loadables/perl/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/loadables/perl/Makefile" ;;
d3a24ed2 16369 "pathnames.h" ) CONFIG_FILES="$CONFIG_FILES pathnames.h" ;;
f73dda09
JA
16370 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16371 "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
d3a24ed2 16372 *) { { echo "$as_me:16372: error: invalid argument: $ac_config_target" >&5
f73dda09
JA
16373echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16374 { (exit 1); exit 1; }; };;
16375 esac
16376done
16377
16378# If the user did not use the arguments to specify the items to instantiate,
16379# then the envvar interface is used. Set only those that are not.
16380# We use the long form for the default assignment because of an extremely
16381# bizarre bug on SunOS 4.1.3.
16382if $ac_need_defaults; then
16383 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16384 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16385 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16386fi
16387
16388# Create a temporary directory, and hook for its removal unless debugging.
16389$debug ||
16390{
16391 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16392 trap '{ (exit 1); exit 1; }' 1 2 13 15
16393}
16394
16395# Create a (secure) tmp directory for tmp files.
16396: ${TMPDIR=/tmp}
16397{
16398 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16399 test -n "$tmp" && test -d "$tmp"
16400} ||
16401{
16402 tmp=$TMPDIR/cs$$-$RANDOM
16403 (umask 077 && mkdir $tmp)
16404} ||
16405{
16406 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16407 { (exit 1); exit 1; }
16408}
ccc6cda3 16409
ccc6cda3
JA
16410EOF
16411
f73dda09 16412cat >>$CONFIG_STATUS <<EOF
ccc6cda3 16413
f73dda09
JA
16414#
16415# CONFIG_FILES section.
16416#
16417
16418# No need to generate the scripts if there are no CONFIG_FILES.
16419# This happens for instance when ./config.status config.h
16420if test -n "\$CONFIG_FILES"; then
16421 # Protect against being on the right side of a sed subst in config.status.
16422 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16423 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16424s,@SHELL@,$SHELL,;t t
16425s,@exec_prefix@,$exec_prefix,;t t
16426s,@prefix@,$prefix,;t t
16427s,@program_transform_name@,$program_transform_name,;t t
16428s,@bindir@,$bindir,;t t
16429s,@sbindir@,$sbindir,;t t
16430s,@libexecdir@,$libexecdir,;t t
16431s,@datadir@,$datadir,;t t
16432s,@sysconfdir@,$sysconfdir,;t t
16433s,@sharedstatedir@,$sharedstatedir,;t t
16434s,@localstatedir@,$localstatedir,;t t
16435s,@libdir@,$libdir,;t t
16436s,@includedir@,$includedir,;t t
16437s,@oldincludedir@,$oldincludedir,;t t
16438s,@infodir@,$infodir,;t t
16439s,@mandir@,$mandir,;t t
16440s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16441s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16442s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16443s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16444s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16445s,@build_alias@,$build_alias,;t t
16446s,@host_alias@,$host_alias,;t t
16447s,@target_alias@,$target_alias,;t t
16448s,@ECHO_C@,$ECHO_C,;t t
16449s,@ECHO_N@,$ECHO_N,;t t
16450s,@ECHO_T@,$ECHO_T,;t t
16451s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16452s,@DEFS@,$DEFS,;t t
16453s,@LIBS@,$LIBS,;t t
16454s,@build@,$build,;t t
16455s,@build_cpu@,$build_cpu,;t t
16456s,@build_vendor@,$build_vendor,;t t
16457s,@build_os@,$build_os,;t t
16458s,@host@,$host,;t t
16459s,@host_cpu@,$host_cpu,;t t
16460s,@host_vendor@,$host_vendor,;t t
16461s,@host_os@,$host_os,;t t
d3a24ed2
CR
16462s,@EMACS@,$EMACS,;t t
16463s,@lispdir@,$lispdir,;t t
16464s,@DEBUGGER_START_FILE@,$DEBUGGER_START_FILE,;t t
f73dda09
JA
16465s,@TESTSCRIPT@,$TESTSCRIPT,;t t
16466s,@PURIFY@,$PURIFY,;t t
16467s,@MALLOC_TARGET@,$MALLOC_TARGET,;t t
16468s,@MALLOC_SRC@,$MALLOC_SRC,;t t
16469s,@MALLOC_LIB@,$MALLOC_LIB,;t t
16470s,@MALLOC_LIBRARY@,$MALLOC_LIBRARY,;t t
16471s,@MALLOC_LDFLAGS@,$MALLOC_LDFLAGS,;t t
16472s,@MALLOC_DEP@,$MALLOC_DEP,;t t
16473s,@htmldir@,$htmldir,;t t
7117c2d2
JA
16474s,@HELPDIR@,$HELPDIR,;t t
16475s,@HELPDIRDEFINE@,$HELPDIRDEFINE,;t t
16476s,@HELPINSTALL@,$HELPINSTALL,;t t
f73dda09
JA
16477s,@CC@,$CC,;t t
16478s,@CFLAGS@,$CFLAGS,;t t
16479s,@LDFLAGS@,$LDFLAGS,;t t
16480s,@CPPFLAGS@,$CPPFLAGS,;t t
16481s,@ac_ct_CC@,$ac_ct_CC,;t t
16482s,@EXEEXT@,$EXEEXT,;t t
16483s,@OBJEXT@,$OBJEXT,;t t
16484s,@CPP@,$CPP,;t t
16485s,@SIGNAMES_H@,$SIGNAMES_H,;t t
16486s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
16487s,@STATIC_LD@,$STATIC_LD,;t t
7117c2d2
JA
16488s,@CFLAGS_FOR_BUILD@,$CFLAGS_FOR_BUILD,;t t
16489s,@CPPFLAGS_FOR_BUILD@,$CPPFLAGS_FOR_BUILD,;t t
16490s,@LDFLAGS_FOR_BUILD@,$LDFLAGS_FOR_BUILD,;t t
f73dda09
JA
16491s,@RL_VERSION@,$RL_VERSION,;t t
16492s,@RL_MAJOR@,$RL_MAJOR,;t t
16493s,@RL_MINOR@,$RL_MINOR,;t t
16494s,@READLINE_LIB@,$READLINE_LIB,;t t
16495s,@READLINE_DEP@,$READLINE_DEP,;t t
16496s,@RL_LIBDIR@,$RL_LIBDIR,;t t
16497s,@RL_INCLUDEDIR@,$RL_INCLUDEDIR,;t t
16498s,@RL_INCLUDE@,$RL_INCLUDE,;t t
16499s,@HISTORY_LIB@,$HISTORY_LIB,;t t
16500s,@HISTORY_DEP@,$HISTORY_DEP,;t t
16501s,@HIST_LIBDIR@,$HIST_LIBDIR,;t t
16502s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16503s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16504s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16505s,@AR@,$AR,;t t
16506s,@RANLIB@,$RANLIB,;t t
16507s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16508s,@YACC@,$YACC,;t t
16509s,@SET_MAKE@,$SET_MAKE,;t t
16510s,@MAKE_SHELL@,$MAKE_SHELL,;t t
16511s,@ALLOCA@,$ALLOCA,;t t
16512s,@LIBOBJS@,$LIBOBJS,;t t
16513s,@SIGLIST_O@,$SIGLIST_O,;t t
16514s,@TERMCAP_LIB@,$TERMCAP_LIB,;t t
16515s,@TERMCAP_DEP@,$TERMCAP_DEP,;t t
16516s,@JOBS_O@,$JOBS_O,;t t
16517s,@SHOBJ_CC@,$SHOBJ_CC,;t t
16518s,@SHOBJ_CFLAGS@,$SHOBJ_CFLAGS,;t t
16519s,@SHOBJ_LD@,$SHOBJ_LD,;t t
16520s,@SHOBJ_LDFLAGS@,$SHOBJ_LDFLAGS,;t t
16521s,@SHOBJ_XLDFLAGS@,$SHOBJ_XLDFLAGS,;t t
16522s,@SHOBJ_LIBS@,$SHOBJ_LIBS,;t t
16523s,@SHOBJ_STATUS@,$SHOBJ_STATUS,;t t
16524s,@PROFILE_FLAGS@,$PROFILE_FLAGS,;t t
16525s,@incdir@,$incdir,;t t
16526s,@BUILD_DIR@,$BUILD_DIR,;t t
16527s,@ARFLAGS@,$ARFLAGS,;t t
16528s,@BASHVERS@,$BASHVERS,;t t
7117c2d2
JA
16529s,@RELSTATUS@,$RELSTATUS,;t t
16530s,@DEBUG@,$DEBUG,;t t
16531s,@MALLOC_DEBUG@,$MALLOC_DEBUG,;t t
f73dda09
JA
16532s,@LOCAL_LIBS@,$LOCAL_LIBS,;t t
16533s,@LOCAL_CFLAGS@,$LOCAL_CFLAGS,;t t
16534s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
16535s,@LOCAL_DEFS@,$LOCAL_DEFS,;t t
16536CEOF
16537
16538EOF
16539
16540 cat >>$CONFIG_STATUS <<\EOF
16541 # Split the substitutions into bite-sized pieces for seds with
16542 # small command number limits, like on Digital OSF/1 and HP-UX.
16543 ac_max_sed_lines=48
16544 ac_sed_frag=1 # Number of current file.
16545 ac_beg=1 # First line for current file.
16546 ac_end=$ac_max_sed_lines # Line after last line for current file.
16547 ac_more_lines=:
16548 ac_sed_cmds=
16549 while $ac_more_lines; do
16550 if test $ac_beg -gt 1; then
16551 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16552 else
16553 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16554 fi
16555 if test ! -s $tmp/subs.frag; then
16556 ac_more_lines=false
ccc6cda3 16557 else
f73dda09
JA
16558 # The purpose of the label and of the branching condition is to
16559 # speed up the sed processing (if there are no `@' at all, there
16560 # is no need to browse any of the substitutions).
16561 # These are the two extra sed commands mentioned above.
16562 (echo ':t
16563 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16564 if test -z "$ac_sed_cmds"; then
16565 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16566 else
16567 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16568 fi
16569 ac_sed_frag=`expr $ac_sed_frag + 1`
16570 ac_beg=$ac_end
16571 ac_end=`expr $ac_end + $ac_max_sed_lines`
ccc6cda3 16572 fi
f73dda09
JA
16573 done
16574 if test -z "$ac_sed_cmds"; then
16575 ac_sed_cmds=cat
ccc6cda3 16576 fi
f73dda09 16577fi # test -n "$CONFIG_FILES"
ccc6cda3 16578
ccc6cda3 16579EOF
f73dda09
JA
16580cat >>$CONFIG_STATUS <<\EOF
16581for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
ccc6cda3 16582 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
f73dda09
JA
16583 case $ac_file in
16584 - | *:- | *:-:* ) # input from stdin
16585 cat >$tmp/stdin
16586 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16587 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16588 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16589 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16590 * ) ac_file_in=$ac_file.in ;;
ccc6cda3
JA
16591 esac
16592
f73dda09
JA
16593 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16594 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16595 X"$ac_file" : 'X\(//\)[^/]' \| \
16596 X"$ac_file" : 'X\(//\)$' \| \
16597 X"$ac_file" : 'X\(/\)' \| \
16598 . : '\(.\)' 2>/dev/null ||
16599echo X"$ac_file" |
16600 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16601 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16602 /^X\(\/\/\)$/{ s//\1/; q; }
16603 /^X\(\/\).*/{ s//\1/; q; }
16604 s/.*/./; q'`
ccc6cda3 16605 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
f73dda09
JA
16606 { case "$ac_dir" in
16607 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16608 *) as_incr_dir=.;;
16609esac
16610as_dummy="$ac_dir"
16611for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16612 case $as_mkdir_dir in
16613 # Skip DOS drivespec
16614 ?:) as_incr_dir=$as_mkdir_dir ;;
16615 *)
16616 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16617 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16618 ;;
16619 esac
16620done; }
16621
16622 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
ccc6cda3 16623 # A "../" for each directory in $ac_dir_suffix.
f73dda09 16624 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
ccc6cda3
JA
16625 else
16626 ac_dir_suffix= ac_dots=
16627 fi
16628
f73dda09
JA
16629 case $srcdir in
16630 .) ac_srcdir=.
16631 if test -z "$ac_dots"; then
16632 ac_top_srcdir=.
16633 else
16634 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
16635 fi ;;
16636 [\\/]* | ?:[\\/]* )
16637 ac_srcdir=$srcdir$ac_dir_suffix;
16638 ac_top_srcdir=$srcdir ;;
ccc6cda3 16639 *) # Relative path.
f73dda09
JA
16640 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
16641 ac_top_srcdir=$ac_dots$srcdir ;;
ccc6cda3
JA
16642 esac
16643
f73dda09
JA
16644 case $INSTALL in
16645 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16646 *) ac_INSTALL=$ac_dots$INSTALL ;;
ccc6cda3
JA
16647 esac
16648
f73dda09 16649 if test x"$ac_file" != x-; then
d3a24ed2 16650 { echo "$as_me:16650: creating $ac_file" >&5
f73dda09
JA
16651echo "$as_me: creating $ac_file" >&6;}
16652 rm -f "$ac_file"
16653 fi
16654 # Let's still pretend it is `configure' which instantiates (i.e., don't
16655 # use $as_me), people would be surprised to read:
16656 # /* config.h. Generated automatically by config.status. */
16657 configure_input="Generated automatically from `echo $ac_file_in |
16658 sed 's,.*/,,'` by configure."
16659
16660 # First look for the input files in the build tree, otherwise in the
16661 # src tree.
16662 ac_file_inputs=`IFS=:
16663 for f in $ac_file_in; do
16664 case $f in
16665 -) echo $tmp/stdin ;;
16666 [\\/$]*)
16667 # Absolute (can't be DOS-style, as IFS=:)
d3a24ed2 16668 test -f "$f" || { { echo "$as_me:16668: error: cannot find input file: $f" >&5
f73dda09
JA
16669echo "$as_me: error: cannot find input file: $f" >&2;}
16670 { (exit 1); exit 1; }; }
16671 echo $f;;
16672 *) # Relative
16673 if test -f "$f"; then
16674 # Build tree
16675 echo $f
16676 elif test -f "$srcdir/$f"; then
16677 # Source tree
16678 echo $srcdir/$f
16679 else
16680 # /dev/null tree
d3a24ed2 16681 { { echo "$as_me:16681: error: cannot find input file: $f" >&5
f73dda09
JA
16682echo "$as_me: error: cannot find input file: $f" >&2;}
16683 { (exit 1); exit 1; }; }
16684 fi;;
16685 esac
16686 done` || { (exit 1); exit 1; }
16687EOF
16688cat >>$CONFIG_STATUS <<EOF
16689 sed "$ac_vpsub
16690$extrasub
16691EOF
16692cat >>$CONFIG_STATUS <<\EOF
16693:t
16694/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16695s,@configure_input@,$configure_input,;t t
16696s,@srcdir@,$ac_srcdir,;t t
16697s,@top_srcdir@,$ac_top_srcdir,;t t
16698s,@INSTALL@,$ac_INSTALL,;t t
16699" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16700 rm -f $tmp/stdin
16701 if test x"$ac_file" != x-; then
16702 mv $tmp/out $ac_file
16703 else
16704 cat $tmp/out
16705 rm -f $tmp/out
16706 fi
16707
16708done
16709EOF
16710cat >>$CONFIG_STATUS <<\EOF
ccc6cda3 16711
f73dda09
JA
16712#
16713# CONFIG_HEADER section.
16714#
ccc6cda3
JA
16715
16716# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16717# NAME is the cpp macro being defined and VALUE is the value it is being given.
16718#
16719# ac_d sets the value in "#define NAME VALUE" lines.
f73dda09
JA
16720ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
16721ac_dB='[ ].*$,\1#\2'
16722ac_dC=' '
16723ac_dD=',;t'
16724# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16725ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16726ac_uB='$,\1#\2define\3'
ccc6cda3 16727ac_uC=' '
f73dda09 16728ac_uD=',;t'
ccc6cda3 16729
f73dda09 16730for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
ccc6cda3 16731 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
f73dda09
JA
16732 case $ac_file in
16733 - | *:- | *:-:* ) # input from stdin
16734 cat >$tmp/stdin
16735 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16736 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16737 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16738 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16739 * ) ac_file_in=$ac_file.in ;;
ccc6cda3
JA
16740 esac
16741
d3a24ed2 16742 test x"$ac_file" != x- && { echo "$as_me:16742: creating $ac_file" >&5
f73dda09
JA
16743echo "$as_me: creating $ac_file" >&6;}
16744
16745 # First look for the input files in the build tree, otherwise in the
16746 # src tree.
16747 ac_file_inputs=`IFS=:
16748 for f in $ac_file_in; do
16749 case $f in
16750 -) echo $tmp/stdin ;;
16751 [\\/$]*)
16752 # Absolute (can't be DOS-style, as IFS=:)
d3a24ed2 16753 test -f "$f" || { { echo "$as_me:16753: error: cannot find input file: $f" >&5
f73dda09
JA
16754echo "$as_me: error: cannot find input file: $f" >&2;}
16755 { (exit 1); exit 1; }; }
16756 echo $f;;
16757 *) # Relative
16758 if test -f "$f"; then
16759 # Build tree
16760 echo $f
16761 elif test -f "$srcdir/$f"; then
16762 # Source tree
16763 echo $srcdir/$f
16764 else
16765 # /dev/null tree
d3a24ed2 16766 { { echo "$as_me:16766: error: cannot find input file: $f" >&5
f73dda09
JA
16767echo "$as_me: error: cannot find input file: $f" >&2;}
16768 { (exit 1); exit 1; }; }
16769 fi;;
16770 esac
16771 done` || { (exit 1); exit 1; }
16772 # Remove the trailing spaces.
16773 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
16774
16775EOF
16776
16777# Transform confdefs.h into two sed scripts, `conftest.defines' and
16778# `conftest.undefs', that substitutes the proper values into
16779# config.h.in to produce config.h. The first handles `#define'
16780# templates, and the second `#undef' templates.
16781# And first: Protect against being on the right side of a sed subst in
16782# config.status. Protect against being in an unquoted here document
16783# in config.status.
16784rm -f conftest.defines conftest.undefs
16785# Using a here document instead of a string reduces the quoting nightmare.
16786# Putting comments in sed scripts is not portable.
16787#
16788# `end' is used to avoid that the second main sed command (meant for
16789# 0-ary CPP macros) applies to n-ary macro definitions.
16790# See the Autoconf documentation for `clear'.
16791cat >confdef2sed.sed <<\EOF
16792s/[\\&,]/\\&/g
16793s,[\\$`],\\&,g
16794t clear
16795: clear
16796s,^[ ]*#[ ]*define[ ][ ]*\(\([^ (][^ (]*\)([^)]*)\)[ ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
16797t end
16798s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
16799: end
16800EOF
16801# If some macros were called several times there might be several times
16802# the same #defines, which is useless. Nevertheless, we may not want to
16803# sort them, since we want the *last* AC-DEFINE to be honored.
16804uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
16805sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
16806rm -f confdef2sed.sed
ccc6cda3
JA
16807
16808# This sed command replaces #undef with comments. This is necessary, for
16809# example, in the case of _POSIX_SOURCE, which is predefined and required
16810# on some systems where configure will not decide to define it.
f73dda09
JA
16811cat >>conftest.undefs <<\EOF
16812s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
ccc6cda3
JA
16813EOF
16814
f73dda09
JA
16815# Break up conftest.defines because some shells have a limit on the size
16816# of here documents, and old seds have small limits too (100 cmds).
16817echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
16818echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
16819echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
16820echo ' :' >>$CONFIG_STATUS
16821rm -f conftest.tail
16822while grep . conftest.defines >/dev/null
16823do
16824 # Write a limited-size here document to $tmp/defines.sed.
16825 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
16826 # Speed up: don't consider the non `#define' lines.
16827 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
16828 # Work around the forget-to-reset-the-flag bug.
16829 echo 't clr' >>$CONFIG_STATUS
16830 echo ': clr' >>$CONFIG_STATUS
16831 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
16832 echo 'CEOF
16833 sed -f $tmp/defines.sed $tmp/in >$tmp/out
16834 rm -f $tmp/in
16835 mv $tmp/out $tmp/in
16836' >>$CONFIG_STATUS
16837 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
16838 rm -f conftest.defines
16839 mv conftest.tail conftest.defines
16840done
16841rm -f conftest.defines
16842echo ' fi # egrep' >>$CONFIG_STATUS
16843echo >>$CONFIG_STATUS
ccc6cda3 16844
f73dda09
JA
16845# Break up conftest.undefs because some shells have a limit on the size
16846# of here documents, and old seds have small limits too (100 cmds).
16847echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
ccc6cda3 16848rm -f conftest.tail
f73dda09 16849while grep . conftest.undefs >/dev/null
ccc6cda3 16850do
f73dda09
JA
16851 # Write a limited-size here document to $tmp/undefs.sed.
16852 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
16853 # Speed up: don't consider the non `#undef'
16854 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
16855 # Work around the forget-to-reset-the-flag bug.
16856 echo 't clr' >>$CONFIG_STATUS
16857 echo ': clr' >>$CONFIG_STATUS
16858 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
ccc6cda3 16859 echo 'CEOF
f73dda09
JA
16860 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
16861 rm -f $tmp/in
16862 mv $tmp/out $tmp/in
16863' >>$CONFIG_STATUS
16864 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
16865 rm -f conftest.undefs
16866 mv conftest.tail conftest.undefs
ccc6cda3 16867done
f73dda09
JA
16868rm -f conftest.undefs
16869
16870cat >>$CONFIG_STATUS <<\EOF
16871 # Let's still pretend it is `configure' which instantiates (i.e., don't
16872 # use $as_me), people would be surprised to read:
16873 # /* config.h. Generated automatically by config.status. */
16874 if test x"$ac_file" = x-; then
16875 echo "/* Generated automatically by configure. */" >$tmp/config.h
ccc6cda3 16876 else
f73dda09
JA
16877 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
16878 fi
16879 cat $tmp/in >>$tmp/config.h
16880 rm -f $tmp/in
16881 if test x"$ac_file" != x-; then
16882 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
d3a24ed2 16883 { echo "$as_me:16883: $ac_file is unchanged" >&5
f73dda09
JA
16884echo "$as_me: $ac_file is unchanged" >&6;}
16885 else
16886 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16887 X"$ac_file" : 'X\(//\)[^/]' \| \
16888 X"$ac_file" : 'X\(//\)$' \| \
16889 X"$ac_file" : 'X\(/\)' \| \
16890 . : '\(.\)' 2>/dev/null ||
16891echo X"$ac_file" |
16892 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16893 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16894 /^X\(\/\/\)$/{ s//\1/; q; }
16895 /^X\(\/\).*/{ s//\1/; q; }
16896 s/.*/./; q'`
ccc6cda3 16897 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
f73dda09
JA
16898 { case "$ac_dir" in
16899 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16900 *) as_incr_dir=.;;
16901esac
16902as_dummy="$ac_dir"
16903for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16904 case $as_mkdir_dir in
16905 # Skip DOS drivespec
16906 ?:) as_incr_dir=$as_mkdir_dir ;;
16907 *)
16908 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16909 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16910 ;;
16911 esac
16912done; }
16913
16914 fi
16915 rm -f $ac_file
16916 mv $tmp/config.h $ac_file
ccc6cda3 16917 fi
f73dda09
JA
16918 else
16919 cat $tmp/config.h
16920 rm -f $tmp/config.h
ccc6cda3 16921 fi
f73dda09 16922done
ccc6cda3 16923EOF
f73dda09 16924cat >>$CONFIG_STATUS <<\EOF
ccc6cda3 16925
f73dda09
JA
16926#
16927# CONFIG_COMMANDS section.
16928#
16929for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
16930 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
16931 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
ccc6cda3 16932
f73dda09
JA
16933 case $ac_dest in
16934 default )
ccc6cda3
JA
16935# Makefile uses this timestamp file to record whether config.h is up to date.
16936echo timestamp > stamp-h
f73dda09
JA
16937 ;;
16938 esac
16939done
16940EOF
ccc6cda3 16941
f73dda09
JA
16942cat >>$CONFIG_STATUS <<\EOF
16943
16944{ (exit 0); exit 0; }
ccc6cda3
JA
16945EOF
16946chmod +x $CONFIG_STATUS
f73dda09
JA
16947ac_clean_files=$ac_clean_files_save
16948
16949# configure is writing to config.log, and then calls config.status.
16950# config.status does its own redirection, appending to config.log.
16951# Unfortunately, on DOS this fails, as config.log is still kept open
16952# by configure, so config.status won't be able to write to it; its
16953# output is simply discarded. So we exec the FD to /dev/null,
16954# effectively closing config.log, so it can be properly (re)opened and
16955# appended to by config.status. When coming back to configure, we
16956# need to make the FD available again.
16957if test "$no_create" != yes; then
16958 ac_cs_success=:
16959 exec 5>/dev/null
16960 $SHELL $CONFIG_STATUS || ac_cs_success=false
16961 exec 5>>config.log
16962 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16963 # would make configure fail if this is the last instruction.
16964 $ac_cs_success || { (exit 1); exit 1; }
16965fi
ccc6cda3 16966