]> git.ipfire.org Git - thirdparty/bash.git/blame - configure
Imported from ../bash-2.01.1.tar.gz.
[thirdparty/bash.git] / configure
CommitLineData
ccc6cda3
JA
1#! /bin/sh
2
e8ce775d
JA
3# From configure.in for Bash 2.01, version 1.28, from autoconf version 2.12
4
5
d166f048
JA
6
7
8
9
10
11
ccc6cda3
JA
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79# Guess values for system-dependent variables and create Makefiles.
80# Generated automatically using autoconf version 2.12
81# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
726f6388 82#
ccc6cda3
JA
83# This configure script is free software; the Free Software Foundation
84# gives unlimited permission to copy, distribute and modify it.
85
86# Defaults:
87ac_help=
88ac_default_prefix=/usr/local
89# Any additions from configure.in:
90ac_help="$ac_help
d166f048
JA
91--with-afs if you are running AFS"
92ac_help="$ac_help
93--with-curses use the curses library instead of the termcap library"
ccc6cda3
JA
94ac_help="$ac_help
95--with-glibc-malloc use the GNU C library version of malloc"
96ac_help="$ac_help
d166f048 97--with-gnu-malloc use the GNU version of malloc"
ccc6cda3 98ac_help="$ac_help
d166f048 99--with-purecov configure to postprocess with pure coverage"
ccc6cda3 100ac_help="$ac_help
d166f048 101--with-purify configure to postprocess with purify"
ccc6cda3 102ac_help="$ac_help
d166f048 103--enable-minimal-config a minimal sh-like configuration"
ccc6cda3
JA
104ac_help="$ac_help
105--enable-alias enable shell aliases"
106ac_help="$ac_help
d166f048 107--enable-array-variables include shell array variables"
ccc6cda3
JA
108ac_help="$ac_help
109--enable-bang-history turn on csh-style history substitution"
110ac_help="$ac_help
d166f048 111--enable-brace-expansion include brace expansion"
ccc6cda3 112ac_help="$ac_help
d166f048 113--enable-command-timing enable the time reserved word and command timing"
ccc6cda3 114ac_help="$ac_help
d166f048 115--enable-directory-stack enable builtins pushd/popd/dirs"
ccc6cda3 116ac_help="$ac_help
d166f048 117--enable-disabled-builtins allow disabled builtins to still be invoked"
ccc6cda3 118ac_help="$ac_help
d166f048 119--enable-dparen-arithmetic include ((...)) command"
ccc6cda3
JA
120ac_help="$ac_help
121--enable-help-builtin include the help builtin"
122ac_help="$ac_help
d166f048 123--enable-history turn on command history"
ccc6cda3 124ac_help="$ac_help
d166f048 125--enable-job-control enable job control features"
ccc6cda3 126ac_help="$ac_help
d166f048 127--enable-process-substitution enable process substitution"
ccc6cda3 128ac_help="$ac_help
d166f048 129--enable-prompt-string-decoding turn on escape character decoding in prompts"
ccc6cda3 130ac_help="$ac_help
d166f048
JA
131--enable-readline turn on command line editing"
132ac_help="$ac_help
133--enable-restricted enable a restricted shell"
134ac_help="$ac_help
135--enable-select include select command"
ccc6cda3
JA
136ac_help="$ac_help
137--enable-usg-echo-default make the echo builtin expand escape sequences by default"
138
139# Initialize some variables set by options.
140# The variables have the same names as the options, with
141# dashes changed to underlines.
142build=NONE
143cache_file=./config.cache
144exec_prefix=NONE
145host=NONE
146no_create=
147nonopt=NONE
148no_recursion=
149prefix=NONE
150program_prefix=NONE
151program_suffix=NONE
152program_transform_name=s,x,x,
153silent=
154site=
155srcdir=
156target=NONE
157verbose=
158x_includes=NONE
159x_libraries=NONE
160bindir='${exec_prefix}/bin'
161sbindir='${exec_prefix}/sbin'
162libexecdir='${exec_prefix}/libexec'
163datadir='${prefix}/share'
164sysconfdir='${prefix}/etc'
165sharedstatedir='${prefix}/com'
166localstatedir='${prefix}/var'
167libdir='${exec_prefix}/lib'
168includedir='${prefix}/include'
169oldincludedir='/usr/include'
170infodir='${prefix}/info'
171mandir='${prefix}/man'
172
173# Initialize some other variables.
174subdirs=
175MFLAGS= MAKEFLAGS=
176# Maximum number of lines to put in a shell here document.
177ac_max_here_lines=12
178
179ac_prev=
180for ac_option
181do
182
183 # If the previous option needs an argument, assign it.
184 if test -n "$ac_prev"; then
185 eval "$ac_prev=\$ac_option"
186 ac_prev=
187 continue
188 fi
189
190 case "$ac_option" in
191 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
192 *) ac_optarg= ;;
193 esac
194
195 # Accept the important Cygnus configure options, so we can diagnose typos.
196
197 case "$ac_option" in
198
199 -bindir | --bindir | --bindi | --bind | --bin | --bi)
200 ac_prev=bindir ;;
201 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
202 bindir="$ac_optarg" ;;
203
204 -build | --build | --buil | --bui | --bu)
205 ac_prev=build ;;
206 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
207 build="$ac_optarg" ;;
208
209 -cache-file | --cache-file | --cache-fil | --cache-fi \
210 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
211 ac_prev=cache_file ;;
212 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
213 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
214 cache_file="$ac_optarg" ;;
215
216 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
217 ac_prev=datadir ;;
218 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
219 | --da=*)
220 datadir="$ac_optarg" ;;
221
222 -disable-* | --disable-*)
223 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
224 # Reject names that are not valid shell variable names.
225 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
226 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
227 fi
228 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
229 eval "enable_${ac_feature}=no" ;;
230
231 -enable-* | --enable-*)
232 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
233 # Reject names that are not valid shell variable names.
234 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
235 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
236 fi
237 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
238 case "$ac_option" in
239 *=*) ;;
240 *) ac_optarg=yes ;;
241 esac
242 eval "enable_${ac_feature}='$ac_optarg'" ;;
243
244 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
245 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
246 | --exec | --exe | --ex)
247 ac_prev=exec_prefix ;;
248 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
249 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
250 | --exec=* | --exe=* | --ex=*)
251 exec_prefix="$ac_optarg" ;;
252
253 -gas | --gas | --ga | --g)
254 # Obsolete; use --with-gas.
255 with_gas=yes ;;
256
257 -help | --help | --hel | --he)
258 # Omit some internal or obsolete options to make the list less imposing.
259 # This message is too long to be a string in the A/UX 3.1 sh.
260 cat << EOF
261Usage: configure [options] [host]
262Options: [defaults in brackets after descriptions]
263Configuration:
264 --cache-file=FILE cache test results in FILE
265 --help print this message
266 --no-create do not create output files
267 --quiet, --silent do not print \`checking...' messages
268 --version print the version of autoconf that created configure
269Directory and file names:
270 --prefix=PREFIX install architecture-independent files in PREFIX
271 [$ac_default_prefix]
272 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
273 [same as prefix]
274 --bindir=DIR user executables in DIR [EPREFIX/bin]
275 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
276 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
277 --datadir=DIR read-only architecture-independent data in DIR
278 [PREFIX/share]
279 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
280 --sharedstatedir=DIR modifiable architecture-independent data in DIR
281 [PREFIX/com]
282 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
283 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
284 --includedir=DIR C header files in DIR [PREFIX/include]
285 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
286 --infodir=DIR info documentation in DIR [PREFIX/info]
287 --mandir=DIR man documentation in DIR [PREFIX/man]
288 --srcdir=DIR find the sources in DIR [configure dir or ..]
289 --program-prefix=PREFIX prepend PREFIX to installed program names
290 --program-suffix=SUFFIX append SUFFIX to installed program names
291 --program-transform-name=PROGRAM
292 run sed PROGRAM on installed program names
293EOF
294 cat << EOF
295Host type:
296 --build=BUILD configure for building on BUILD [BUILD=HOST]
297 --host=HOST configure for HOST [guessed]
298 --target=TARGET configure for TARGET [TARGET=HOST]
299Features and packages:
300 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
301 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
302 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
303 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
304 --x-includes=DIR X include files are in DIR
305 --x-libraries=DIR X library files are in DIR
306EOF
307 if test -n "$ac_help"; then
308 echo "--enable and --with options recognized:$ac_help"
309 fi
310 exit 0 ;;
311
312 -host | --host | --hos | --ho)
313 ac_prev=host ;;
314 -host=* | --host=* | --hos=* | --ho=*)
315 host="$ac_optarg" ;;
316
317 -includedir | --includedir | --includedi | --included | --include \
318 | --includ | --inclu | --incl | --inc)
319 ac_prev=includedir ;;
320 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
321 | --includ=* | --inclu=* | --incl=* | --inc=*)
322 includedir="$ac_optarg" ;;
323
324 -infodir | --infodir | --infodi | --infod | --info | --inf)
325 ac_prev=infodir ;;
326 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
327 infodir="$ac_optarg" ;;
328
329 -libdir | --libdir | --libdi | --libd)
330 ac_prev=libdir ;;
331 -libdir=* | --libdir=* | --libdi=* | --libd=*)
332 libdir="$ac_optarg" ;;
333
334 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
335 | --libexe | --libex | --libe)
336 ac_prev=libexecdir ;;
337 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
338 | --libexe=* | --libex=* | --libe=*)
339 libexecdir="$ac_optarg" ;;
340
341 -localstatedir | --localstatedir | --localstatedi | --localstated \
342 | --localstate | --localstat | --localsta | --localst \
343 | --locals | --local | --loca | --loc | --lo)
344 ac_prev=localstatedir ;;
345 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
346 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
347 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
348 localstatedir="$ac_optarg" ;;
349
350 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
351 ac_prev=mandir ;;
352 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
353 mandir="$ac_optarg" ;;
354
355 -nfp | --nfp | --nf)
356 # Obsolete; use --without-fp.
357 with_fp=no ;;
358
359 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
360 | --no-cr | --no-c)
361 no_create=yes ;;
362
363 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
364 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
365 no_recursion=yes ;;
366
367 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
368 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
369 | --oldin | --oldi | --old | --ol | --o)
370 ac_prev=oldincludedir ;;
371 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
372 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
373 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
374 oldincludedir="$ac_optarg" ;;
375
376 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
377 ac_prev=prefix ;;
378 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
379 prefix="$ac_optarg" ;;
380
381 -program-prefix | --program-prefix | --program-prefi | --program-pref \
382 | --program-pre | --program-pr | --program-p)
383 ac_prev=program_prefix ;;
384 -program-prefix=* | --program-prefix=* | --program-prefi=* \
385 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
386 program_prefix="$ac_optarg" ;;
387
388 -program-suffix | --program-suffix | --program-suffi | --program-suff \
389 | --program-suf | --program-su | --program-s)
390 ac_prev=program_suffix ;;
391 -program-suffix=* | --program-suffix=* | --program-suffi=* \
392 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
393 program_suffix="$ac_optarg" ;;
394
395 -program-transform-name | --program-transform-name \
396 | --program-transform-nam | --program-transform-na \
397 | --program-transform-n | --program-transform- \
398 | --program-transform | --program-transfor \
399 | --program-transfo | --program-transf \
400 | --program-trans | --program-tran \
401 | --progr-tra | --program-tr | --program-t)
402 ac_prev=program_transform_name ;;
403 -program-transform-name=* | --program-transform-name=* \
404 | --program-transform-nam=* | --program-transform-na=* \
405 | --program-transform-n=* | --program-transform-=* \
406 | --program-transform=* | --program-transfor=* \
407 | --program-transfo=* | --program-transf=* \
408 | --program-trans=* | --program-tran=* \
409 | --progr-tra=* | --program-tr=* | --program-t=*)
410 program_transform_name="$ac_optarg" ;;
411
412 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
413 | -silent | --silent | --silen | --sile | --sil)
414 silent=yes ;;
415
416 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
417 ac_prev=sbindir ;;
418 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
419 | --sbi=* | --sb=*)
420 sbindir="$ac_optarg" ;;
421
422 -sharedstatedir | --sharedstatedir | --sharedstatedi \
423 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
424 | --sharedst | --shareds | --shared | --share | --shar \
425 | --sha | --sh)
426 ac_prev=sharedstatedir ;;
427 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
428 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
429 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
430 | --sha=* | --sh=*)
431 sharedstatedir="$ac_optarg" ;;
432
433 -site | --site | --sit)
434 ac_prev=site ;;
435 -site=* | --site=* | --sit=*)
436 site="$ac_optarg" ;;
437
438 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
439 ac_prev=srcdir ;;
440 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
441 srcdir="$ac_optarg" ;;
442
443 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
444 | --syscon | --sysco | --sysc | --sys | --sy)
445 ac_prev=sysconfdir ;;
446 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
447 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
448 sysconfdir="$ac_optarg" ;;
449
450 -target | --target | --targe | --targ | --tar | --ta | --t)
451 ac_prev=target ;;
452 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
453 target="$ac_optarg" ;;
454
455 -v | -verbose | --verbose | --verbos | --verbo | --verb)
456 verbose=yes ;;
457
458 -version | --version | --versio | --versi | --vers)
459 echo "configure generated by autoconf version 2.12"
460 exit 0 ;;
461
462 -with-* | --with-*)
463 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
464 # Reject names that are not valid shell variable names.
465 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
466 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
467 fi
468 ac_package=`echo $ac_package| sed 's/-/_/g'`
469 case "$ac_option" in
470 *=*) ;;
471 *) ac_optarg=yes ;;
472 esac
473 eval "with_${ac_package}='$ac_optarg'" ;;
474
475 -without-* | --without-*)
476 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
477 # Reject names that are not valid shell variable names.
478 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
479 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
480 fi
481 ac_package=`echo $ac_package| sed 's/-/_/g'`
482 eval "with_${ac_package}=no" ;;
483
484 --x)
485 # Obsolete; use --with-x.
486 with_x=yes ;;
487
488 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
489 | --x-incl | --x-inc | --x-in | --x-i)
490 ac_prev=x_includes ;;
491 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
492 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
493 x_includes="$ac_optarg" ;;
494
495 -x-libraries | --x-libraries | --x-librarie | --x-librari \
496 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
497 ac_prev=x_libraries ;;
498 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
499 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
500 x_libraries="$ac_optarg" ;;
501
502 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
503 ;;
504
505 *)
506 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
507 echo "configure: warning: $ac_option: invalid host type" 1>&2
508 fi
509 if test "x$nonopt" != xNONE; then
510 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
511 fi
512 nonopt="$ac_option"
513 ;;
514
515 esac
516done
517
518if test -n "$ac_prev"; then
519 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
520fi
521
522trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
523
524# File descriptor usage:
525# 0 standard input
526# 1 file creation
527# 2 errors and warnings
528# 3 some systems may open it to /dev/tty
529# 4 used on the Kubota Titan
530# 6 checking for... messages and results
531# 5 compiler messages saved in config.log
532if test "$silent" = yes; then
533 exec 6>/dev/null
534else
535 exec 6>&1
536fi
537exec 5>./config.log
538
539echo "\
540This file contains any messages produced by compilers while
541running configure, to aid debugging if configure makes a mistake.
542" 1>&5
543
544# Strip out --no-create and --no-recursion so they do not pile up.
545# Also quote any args containing shell metacharacters.
546ac_configure_args=
547for ac_arg
548do
549 case "$ac_arg" in
550 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
551 | --no-cr | --no-c) ;;
552 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
553 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
554 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
555 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
556 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
557 esac
558done
559
560# NLS nuisances.
561# Only set these to C if already set. These must not be set unconditionally
562# because not all systems understand e.g. LANG=C (notably SCO).
563# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
564# Non-C LC_CTYPE values break the ctype check.
565if test "${LANG+set}" = set; then LANG=C; export LANG; fi
566if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
567if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
568if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
569
570# confdefs.h avoids OS command line length limits that DEFS can exceed.
571rm -rf conftest* confdefs.h
572# AIX cpp loses on an empty file, so make sure it contains at least a newline.
573echo > confdefs.h
574
575# A filename unique to this package, relative to the directory that
576# configure is in, which we can look for to find out if srcdir is correct.
577ac_unique_file=shell.h
578
579# Find the source files, if location was not specified.
580if test -z "$srcdir"; then
581 ac_srcdir_defaulted=yes
582 # Try the directory containing this script, then its parent.
583 ac_prog=$0
584 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
585 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
586 srcdir=$ac_confdir
587 if test ! -r $srcdir/$ac_unique_file; then
588 srcdir=..
589 fi
590else
591 ac_srcdir_defaulted=no
592fi
593if test ! -r $srcdir/$ac_unique_file; then
594 if test "$ac_srcdir_defaulted" = yes; then
595 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
596 else
597 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
598 fi
599fi
600srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
601
602# Prefer explicitly selected file to automatically selected ones.
603if test -z "$CONFIG_SITE"; then
604 if test "x$prefix" != xNONE; then
605 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
606 else
607 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
608 fi
609fi
610for ac_site_file in $CONFIG_SITE; do
611 if test -r "$ac_site_file"; then
612 echo "loading site script $ac_site_file"
613 . "$ac_site_file"
614 fi
615done
616
617if test -r "$cache_file"; then
618 echo "loading cache $cache_file"
619 . $cache_file
620else
621 echo "creating cache $cache_file"
622 > $cache_file
623fi
624
625ac_ext=c
626# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
627ac_cpp='$CPP $CPPFLAGS'
628ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
629ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
630cross_compiling=$ac_cv_prog_cc_cross
631
632if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
633 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
634 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
635 ac_n= ac_c='
636' ac_t=' '
637 else
638 ac_n=-n ac_c= ac_t=
639 fi
640else
641 ac_n= ac_c='\c' ac_t=
642fi
643
644
645
646
647
648
649ac_aux_dir=
650for ac_dir in ./support $srcdir/./support; do
651 if test -f $ac_dir/install-sh; then
652 ac_aux_dir=$ac_dir
653 ac_install_sh="$ac_aux_dir/install-sh -c"
654 break
655 elif test -f $ac_dir/install.sh; then
656 ac_aux_dir=$ac_dir
657 ac_install_sh="$ac_aux_dir/install.sh -c"
658 break
659 fi
660done
661if test -z "$ac_aux_dir"; then
662 { echo "configure: error: can not find install-sh or install.sh in ./support $srcdir/./support" 1>&2; exit 1; }
663fi
664ac_config_guess=$ac_aux_dir/config.guess
665ac_config_sub=$ac_aux_dir/config.sub
666ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
667
668
669
670# Make sure we can run config.sub.
671if $ac_config_sub sun4 >/dev/null 2>&1; then :
672else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
673fi
674
675echo $ac_n "checking host system type""... $ac_c" 1>&6
e8ce775d 676echo "configure:677: checking host system type" >&5
ccc6cda3
JA
677
678host_alias=$host
679case "$host_alias" in
680NONE)
681 case $nonopt in
682 NONE)
683 if host_alias=`$ac_config_guess`; then :
684 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
685 fi ;;
686 *) host_alias=$nonopt ;;
687 esac ;;
688esac
689
690host=`$ac_config_sub $host_alias`
691host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
692host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
693host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
694echo "$ac_t""$host" 1>&6
695
696
697opt_gnu_malloc=yes
698opt_glibc_malloc=no
699opt_purify=no
d166f048 700opt_purecov=no
ccc6cda3 701opt_afs=no
d166f048 702opt_curses=no
ccc6cda3
JA
703
704case "${host_cpu}-${host_os}" in
705alpha-*) opt_gnu_malloc=no ;; # alpha running osf/1 or linux
706*cray*-*) opt_gnu_malloc=no ;; # Crays
707*-osf1*) opt_gnu_malloc=no ;; # other osf/1 machines
708sparc-svr4*) opt_gnu_malloc=no ;; # sparc SVR4, SVR4.2
709sparc-netbsd*) opt_gnu_malloc=no ;; # needs 8-byte alignment
e8ce775d 710sgi-irix6*) opt_gnu_malloc=no ;; # needs 8-byte alignment
ccc6cda3 711sparc-linux*) opt_gnu_malloc=no ;; # sparc running linux; requires ELF
d166f048 712*-freebsd*) opt_gnu_malloc=no ;; # they claim it's better
ccc6cda3
JA
713*-aix*) opt_gnu_malloc=no ;; # AIX machines
714*-nextstep*) opt_gnu_malloc=no ;; # NeXT machines running NeXTstep
715*-dgux*) opt_gnu_malloc=no ;; # DG/UX machines
d166f048
JA
716*-qnx*) opt_gnu_malloc=no ;; # QNX 4.2
717*-machten4) opt_gnu_malloc=no ;; # MachTen 4.x
e8ce775d 718*-bsdi2.1|*-bsdi3.0) opt_gnu_malloc=no ; : ${CC:=shlicc2} ;; # for loadable builtins
ccc6cda3
JA
719esac
720
d166f048
JA
721# Check whether --with-afs or --without-afs was given.
722if test "${with_afs+set}" = set; then
723 withval="$with_afs"
724 opt_afs=$withval
725fi
726
727# Check whether --with-curses or --without-curses was given.
728if test "${with_curses+set}" = set; then
729 withval="$with_curses"
730 opt_curses=$withval
ccc6cda3
JA
731fi
732
733# Check whether --with-glibc-malloc or --without-glibc-malloc was given.
734if test "${with_glibc_malloc+set}" = set; then
735 withval="$with_glibc_malloc"
736 opt_glibc_malloc=$withval
737fi
738
d166f048
JA
739# Check whether --with-gnu-malloc or --without-gnu-malloc was given.
740if test "${with_gnu_malloc+set}" = set; then
741 withval="$with_gnu_malloc"
742 opt_gnu_malloc=$withval
743fi
744
745# Check whether --with-purecov or --without-purecov was given.
746if test "${with_purecov+set}" = set; then
747 withval="$with_purecov"
748 opt_purecov=$withval
749fi
750
ccc6cda3
JA
751# Check whether --with-purify or --without-purify was given.
752if test "${with_purify+set}" = set; then
753 withval="$with_purify"
754 opt_purify=$withval
755fi
756
ccc6cda3
JA
757
758if test "$opt_glibc_malloc" = yes; then
d166f048
JA
759 MALLOC_TARGET=gmalloc
760 MALLOC_SRC=gmalloc.c
ccc6cda3 761elif test "$opt_gnu_malloc" = yes; then
d166f048
JA
762 MALLOC_TARGET=malloc
763 MALLOC_SRC=malloc.c
ccc6cda3 764else
d166f048
JA
765 MALLOC_TARGET=stubmalloc
766 MALLOC_SRC=stub.c
ccc6cda3
JA
767fi
768
769if test "$opt_purify" = yes; then
d166f048 770 PURIFY="purify "
ccc6cda3
JA
771else
772 PURIFY=
773fi
774
d166f048
JA
775if test "$opt_purecov" = yes; then
776 PURIFY="${PURIFY}purecov"
777fi
778
ccc6cda3
JA
779if test "$opt_afs" = yes; then
780 cat >> confdefs.h <<\EOF
781#define AFS 1
782EOF
783
784fi
785
d166f048
JA
786if test "$opt_curses" = yes; then
787 prefer_curses=yes
788fi
789
ccc6cda3
JA
790opt_minimal_config=no
791
792opt_job_control=yes
793opt_alias=yes
794opt_readline=yes
795opt_history=yes
796opt_bang_history=yes
797opt_dirstack=yes
798opt_restricted=yes
799opt_process_subst=yes
800opt_prompt_decoding=yes
801opt_select=yes
802opt_help=yes
803opt_array_variables=yes
804opt_dparen_arith=yes
805opt_brace_expansion=yes
806opt_disabled_builtins=no
807opt_command_timing=yes
808opt_usg_echo=no
809
810# Check whether --enable-minimal-config or --disable-minimal-config was given.
811if test "${enable_minimal_config+set}" = set; then
812 enableval="$enable_minimal_config"
813 opt_minimal_config=$enableval
814fi
815
816
817if test $opt_minimal_config = yes; then
818 opt_job_control=no opt_alias=no opt_readline=no
819 opt_history=no opt_bang_history=no opt_dirstack=no
820 opt_restricted=no opt_process_subst=no opt_prompt_decoding=no
821 opt_select=no opt_help=no opt_array_variables=no opt_dparen_arith=no
822 opt_brace_expansion=no opt_disabled_builtins=no opt_command_timing=no
823fi
824
ccc6cda3
JA
825# Check whether --enable-alias or --disable-alias was given.
826if test "${enable_alias+set}" = set; then
827 enableval="$enable_alias"
828 opt_alias=$enableval
829fi
830
d166f048
JA
831# Check whether --enable-array-variables or --disable-array-variables was given.
832if test "${enable_array_variables+set}" = set; then
833 enableval="$enable_array_variables"
834 opt_array_variables=$enableval
ccc6cda3
JA
835fi
836
837# Check whether --enable-bang-history or --disable-bang-history was given.
838if test "${enable_bang_history+set}" = set; then
839 enableval="$enable_bang_history"
840 opt_bang_history=$enableval
841fi
842
d166f048
JA
843# Check whether --enable-brace-expansion or --disable-brace-expansion was given.
844if test "${enable_brace_expansion+set}" = set; then
845 enableval="$enable_brace_expansion"
846 opt_brace_expansion=$enableval
ccc6cda3
JA
847fi
848
d166f048
JA
849# Check whether --enable-command-timing or --disable-command-timing was given.
850if test "${enable_command_timing+set}" = set; then
851 enableval="$enable_command_timing"
852 opt_command_timing=$enableval
ccc6cda3
JA
853fi
854
d166f048
JA
855# Check whether --enable-directory-stack or --disable-directory-stack was given.
856if test "${enable_directory_stack+set}" = set; then
857 enableval="$enable_directory_stack"
858 opt_dirstack=$enableval
ccc6cda3
JA
859fi
860
d166f048
JA
861# Check whether --enable-disabled-builtins or --disable-disabled-builtins was given.
862if test "${enable_disabled_builtins+set}" = set; then
863 enableval="$enable_disabled_builtins"
864 opt_disabled_builtins=$enableval
ccc6cda3
JA
865fi
866
d166f048
JA
867# Check whether --enable-dparen-arithmetic or --disable-dparen-arithmetic was given.
868if test "${enable_dparen_arithmetic+set}" = set; then
869 enableval="$enable_dparen_arithmetic"
870 opt_dparen_arith=$enableval
ccc6cda3
JA
871fi
872
873# Check whether --enable-help-builtin or --disable-help-builtin was given.
874if test "${enable_help_builtin+set}" = set; then
875 enableval="$enable_help_builtin"
876 opt_help=$enableval
877fi
878
d166f048
JA
879# Check whether --enable-history or --disable-history was given.
880if test "${enable_history+set}" = set; then
881 enableval="$enable_history"
882 opt_history=$enableval
ccc6cda3
JA
883fi
884
d166f048
JA
885# Check whether --enable-job-control or --disable-job-control was given.
886if test "${enable_job_control+set}" = set; then
887 enableval="$enable_job_control"
888 opt_job_control=$enableval
ccc6cda3
JA
889fi
890
d166f048
JA
891# Check whether --enable-process-substitution or --disable-process-substitution was given.
892if test "${enable_process_substitution+set}" = set; then
893 enableval="$enable_process_substitution"
894 opt_process_subst=$enableval
ccc6cda3
JA
895fi
896
d166f048
JA
897# Check whether --enable-prompt-string-decoding or --disable-prompt-string-decoding was given.
898if test "${enable_prompt_string_decoding+set}" = set; then
899 enableval="$enable_prompt_string_decoding"
900 opt_prompt_decoding=$enableval
ccc6cda3
JA
901fi
902
d166f048
JA
903# Check whether --enable-readline or --disable-readline was given.
904if test "${enable_readline+set}" = set; then
905 enableval="$enable_readline"
906 opt_readline=$enableval
907fi
908
909# Check whether --enable-restricted or --disable-restricted was given.
910if test "${enable_restricted+set}" = set; then
911 enableval="$enable_restricted"
912 opt_restricted=$enableval
913fi
914
915# Check whether --enable-select or --disable-select was given.
916if test "${enable_select+set}" = set; then
917 enableval="$enable_select"
918 opt_select=$enableval
ccc6cda3
JA
919fi
920
921# Check whether --enable-usg-echo-default or --disable-usg-echo-default was given.
922if test "${enable_usg_echo_default+set}" = set; then
923 enableval="$enable_usg_echo_default"
924 opt_usg_echo=$enableval
925fi
926
927
928
929if test $opt_alias = yes; then
930cat >> confdefs.h <<\EOF
931#define ALIAS 1
932EOF
933
934fi
935if test $opt_readline = yes; then
936cat >> confdefs.h <<\EOF
937#define READLINE 1
938EOF
939
940READLINE_LIB=-lreadline
941READLINE_DEP='$(READLINE_LIBRARY)'
942else
943READLINE_LIB= READLINE_DEP=
944fi
945if test $opt_history = yes; then
946cat >> confdefs.h <<\EOF
947#define HISTORY 1
948EOF
949
950HISTORY_LIB=-lhistory
951HISTORY_DEP='$(HISTORY_LIBRARY)'
952else
953HISTORY_LIB= HISTORY_DEP=
954fi
955if test $opt_bang_history = yes; then
956cat >> confdefs.h <<\EOF
957#define BANG_HISTORY 1
958EOF
959
960HISTORY_LIB=-lhistory
961HISTORY_DEP='$(HISTORY_LIBRARY)'
962else
963HISTORY_LIB= HISTORY_DEP=
964fi
965if test $opt_dirstack = yes; then
966cat >> confdefs.h <<\EOF
967#define PUSHD_AND_POPD 1
968EOF
969
970fi
971if test $opt_restricted = yes; then
972cat >> confdefs.h <<\EOF
973#define RESTRICTED_SHELL 1
974EOF
975
976fi
977if test $opt_process_subst = yes; then
978cat >> confdefs.h <<\EOF
979#define PROCESS_SUBSTITUTION 1
980EOF
981
982fi
983if test $opt_prompt_decoding = yes; then
984cat >> confdefs.h <<\EOF
985#define PROMPT_STRING_DECODE 1
986EOF
987
988fi
989if test $opt_select = yes; then
990cat >> confdefs.h <<\EOF
991#define SELECT_COMMAND 1
992EOF
993
994fi
995if test $opt_help = yes; then
996cat >> confdefs.h <<\EOF
997#define HELP_BUILTIN 1
998EOF
999
1000fi
1001if test $opt_array_variables = yes; then
1002cat >> confdefs.h <<\EOF
1003#define ARRAY_VARS 1
1004EOF
1005
1006fi
1007if test $opt_dparen_arith = yes; then
1008cat >> confdefs.h <<\EOF
1009#define DPAREN_ARITHMETIC 1
1010EOF
1011
1012fi
1013if test $opt_brace_expansion = yes; then
1014cat >> confdefs.h <<\EOF
1015#define BRACE_EXPANSION 1
1016EOF
1017
1018fi
1019if test $opt_disabled_builtins = yes; then
1020cat >> confdefs.h <<\EOF
1021#define DISABLED_BUILTINS 1
1022EOF
1023
1024fi
1025if test $opt_command_timing = yes; then
1026cat >> confdefs.h <<\EOF
1027#define COMMAND_TIMING 1
1028EOF
1029
1030fi
1031if test $opt_usg_echo = yes ; then
1032cat >> confdefs.h <<\EOF
1033#define DEFAULT_ECHO_TO_USG 1
1034EOF
1035
1036fi
1037
d166f048
JA
1038if test "$opt_minimal_config" = yes; then
1039 TESTSCRIPT=run-minimal
1040else
1041 TESTSCRIPT=run-all
1042fi
1043
1044
ccc6cda3
JA
1045
1046
1047
1048
1049
1050
1051
1052
d166f048 1053BASHVERS=2.01
e8ce775d 1054BASHPATCH=1
d166f048
JA
1055
1056echo "Beginning configuration for bash-$BASHVERS"
ccc6cda3
JA
1057
1058# Extract the first word of "gcc", so it can be a program name with args.
1059set dummy gcc; ac_word=$2
1060echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8ce775d 1061echo "configure:1062: checking for $ac_word" >&5
ccc6cda3
JA
1062if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1063 echo $ac_n "(cached) $ac_c" 1>&6
1064else
1065 if test -n "$CC"; then
1066 ac_cv_prog_CC="$CC" # Let the user override the test.
1067else
1068 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1069 for ac_dir in $PATH; do
1070 test -z "$ac_dir" && ac_dir=.
1071 if test -f $ac_dir/$ac_word; then
1072 ac_cv_prog_CC="gcc"
1073 break
1074 fi
1075 done
1076 IFS="$ac_save_ifs"
1077fi
1078fi
1079CC="$ac_cv_prog_CC"
1080if test -n "$CC"; then
1081 echo "$ac_t""$CC" 1>&6
1082else
1083 echo "$ac_t""no" 1>&6
1084fi
1085
1086if test -z "$CC"; then
1087 # Extract the first word of "cc", so it can be a program name with args.
1088set dummy cc; ac_word=$2
1089echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8ce775d 1090echo "configure:1091: checking for $ac_word" >&5
ccc6cda3
JA
1091if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1092 echo $ac_n "(cached) $ac_c" 1>&6
1093else
1094 if test -n "$CC"; then
1095 ac_cv_prog_CC="$CC" # Let the user override the test.
1096else
1097 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1098 ac_prog_rejected=no
1099 for ac_dir in $PATH; do
1100 test -z "$ac_dir" && ac_dir=.
1101 if test -f $ac_dir/$ac_word; then
1102 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1103 ac_prog_rejected=yes
1104 continue
1105 fi
1106 ac_cv_prog_CC="cc"
1107 break
1108 fi
1109 done
1110 IFS="$ac_save_ifs"
1111if test $ac_prog_rejected = yes; then
1112 # We found a bogon in the path, so make sure we never use it.
1113 set dummy $ac_cv_prog_CC
1114 shift
1115 if test $# -gt 0; then
1116 # We chose a different compiler from the bogus one.
1117 # However, it has the same basename, so the bogon will be chosen
1118 # first if we set CC to just the basename; use the full file name.
1119 shift
1120 set dummy "$ac_dir/$ac_word" "$@"
1121 shift
1122 ac_cv_prog_CC="$@"
1123 fi
1124fi
1125fi
1126fi
1127CC="$ac_cv_prog_CC"
1128if test -n "$CC"; then
1129 echo "$ac_t""$CC" 1>&6
1130else
1131 echo "$ac_t""no" 1>&6
1132fi
1133
1134 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1135fi
1136
1137echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
e8ce775d 1138echo "configure:1139: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ccc6cda3
JA
1139
1140ac_ext=c
1141# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1142ac_cpp='$CPP $CPPFLAGS'
1143ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1144ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1145cross_compiling=$ac_cv_prog_cc_cross
1146
1147cat > conftest.$ac_ext <<EOF
e8ce775d 1148#line 1149 "configure"
ccc6cda3
JA
1149#include "confdefs.h"
1150main(){return(0);}
1151EOF
e8ce775d 1152if { (eval echo configure:1153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ccc6cda3
JA
1153 ac_cv_prog_cc_works=yes
1154 # If we can't run a trivial program, we are probably using a cross compiler.
1155 if (./conftest; exit) 2>/dev/null; then
1156 ac_cv_prog_cc_cross=no
1157 else
1158 ac_cv_prog_cc_cross=yes
1159 fi
1160else
1161 echo "configure: failed program was:" >&5
1162 cat conftest.$ac_ext >&5
1163 ac_cv_prog_cc_works=no
1164fi
1165rm -fr conftest*
1166
1167echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1168if test $ac_cv_prog_cc_works = no; then
1169 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1170fi
1171echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
e8ce775d 1172echo "configure:1173: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
ccc6cda3
JA
1173echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1174cross_compiling=$ac_cv_prog_cc_cross
1175
1176echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
e8ce775d 1177echo "configure:1178: checking whether we are using GNU C" >&5
ccc6cda3
JA
1178if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1179 echo $ac_n "(cached) $ac_c" 1>&6
1180else
1181 cat > conftest.c <<EOF
1182#ifdef __GNUC__
1183 yes;
1184#endif
1185EOF
e8ce775d 1186if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1187: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ccc6cda3
JA
1187 ac_cv_prog_gcc=yes
1188else
1189 ac_cv_prog_gcc=no
1190fi
1191fi
1192
1193echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1194
1195if test $ac_cv_prog_gcc = yes; then
1196 GCC=yes
1197 ac_test_CFLAGS="${CFLAGS+set}"
1198 ac_save_CFLAGS="$CFLAGS"
1199 CFLAGS=
1200 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
e8ce775d 1201echo "configure:1202: checking whether ${CC-cc} accepts -g" >&5
ccc6cda3
JA
1202if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1203 echo $ac_n "(cached) $ac_c" 1>&6
1204else
1205 echo 'void f(){}' > conftest.c
1206if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1207 ac_cv_prog_cc_g=yes
1208else
1209 ac_cv_prog_cc_g=no
1210fi
1211rm -f conftest*
1212
1213fi
1214
1215echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1216 if test "$ac_test_CFLAGS" = set; then
1217 CFLAGS="$ac_save_CFLAGS"
1218 elif test $ac_cv_prog_cc_g = yes; then
1219 CFLAGS="-g -O2"
1220 else
1221 CFLAGS="-O2"
1222 fi
1223else
1224 GCC=
1225 test "${CFLAGS+set}" = set || CFLAGS="-g"
1226fi
1227
1228echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
e8ce775d 1229echo "configure:1230: checking for POSIXized ISC" >&5
ccc6cda3
JA
1230if test -d /etc/conf/kconfig.d &&
1231 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1232then
1233 echo "$ac_t""yes" 1>&6
1234 ISC=yes # If later tests want to check for ISC.
1235 cat >> confdefs.h <<\EOF
1236#define _POSIX_SOURCE 1
1237EOF
1238
1239 if test "$GCC" = yes; then
1240 CC="$CC -posix"
1241 else
1242 CC="$CC -Xp"
1243 fi
1244else
1245 echo "$ac_t""no" 1>&6
1246 ISC=
1247fi
1248
1249echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
e8ce775d 1250echo "configure:1251: checking how to run the C preprocessor" >&5
ccc6cda3
JA
1251# On Suns, sometimes $CPP names a directory.
1252if test -n "$CPP" && test -d "$CPP"; then
1253 CPP=
1254fi
1255if test -z "$CPP"; then
1256if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1257 echo $ac_n "(cached) $ac_c" 1>&6
1258else
1259 # This must be in double quotes, not single quotes, because CPP may get
1260 # substituted into the Makefile and "${CC-cc}" will confuse make.
1261 CPP="${CC-cc} -E"
1262 # On the NeXT, cc -E runs the code through the compiler's parser,
1263 # not just through cpp.
1264 cat > conftest.$ac_ext <<EOF
e8ce775d 1265#line 1266 "configure"
ccc6cda3
JA
1266#include "confdefs.h"
1267#include <assert.h>
1268Syntax Error
1269EOF
1270ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
e8ce775d 1271{ (eval echo configure:1272: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ccc6cda3
JA
1272ac_err=`grep -v '^ *+' conftest.out`
1273if test -z "$ac_err"; then
1274 :
1275else
1276 echo "$ac_err" >&5
1277 echo "configure: failed program was:" >&5
1278 cat conftest.$ac_ext >&5
1279 rm -rf conftest*
1280 CPP="${CC-cc} -E -traditional-cpp"
1281 cat > conftest.$ac_ext <<EOF
e8ce775d 1282#line 1283 "configure"
ccc6cda3
JA
1283#include "confdefs.h"
1284#include <assert.h>
1285Syntax Error
1286EOF
1287ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
e8ce775d 1288{ (eval echo configure:1289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ccc6cda3
JA
1289ac_err=`grep -v '^ *+' conftest.out`
1290if test -z "$ac_err"; then
1291 :
1292else
1293 echo "$ac_err" >&5
1294 echo "configure: failed program was:" >&5
1295 cat conftest.$ac_ext >&5
1296 rm -rf conftest*
1297 CPP=/lib/cpp
1298fi
1299rm -f conftest*
1300fi
1301rm -f conftest*
1302 ac_cv_prog_CPP="$CPP"
1303fi
1304 CPP="$ac_cv_prog_CPP"
1305else
1306 ac_cv_prog_CPP="$CPP"
1307fi
1308echo "$ac_t""$CPP" 1>&6
1309
1310ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
1311echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
e8ce775d 1312echo "configure:1313: checking for minix/config.h" >&5
ccc6cda3
JA
1313if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1314 echo $ac_n "(cached) $ac_c" 1>&6
1315else
1316 cat > conftest.$ac_ext <<EOF
e8ce775d 1317#line 1318 "configure"
ccc6cda3
JA
1318#include "confdefs.h"
1319#include <minix/config.h>
1320EOF
1321ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
e8ce775d 1322{ (eval echo configure:1323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ccc6cda3
JA
1323ac_err=`grep -v '^ *+' conftest.out`
1324if test -z "$ac_err"; then
1325 rm -rf conftest*
1326 eval "ac_cv_header_$ac_safe=yes"
1327else
1328 echo "$ac_err" >&5
1329 echo "configure: failed program was:" >&5
1330 cat conftest.$ac_ext >&5
1331 rm -rf conftest*
1332 eval "ac_cv_header_$ac_safe=no"
1333fi
1334rm -f conftest*
1335fi
1336if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1337 echo "$ac_t""yes" 1>&6
1338 MINIX=yes
1339else
1340 echo "$ac_t""no" 1>&6
1341MINIX=
1342fi
1343
1344if test "$MINIX" = yes; then
1345 cat >> confdefs.h <<\EOF
1346#define _POSIX_SOURCE 1
1347EOF
1348
1349 cat >> confdefs.h <<\EOF
1350#define _POSIX_1_SOURCE 2
1351EOF
1352
1353 cat >> confdefs.h <<\EOF
1354#define _MINIX 1
1355EOF
1356
1357fi
1358
1359
ccc6cda3
JA
1360test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1
1361
1362test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O2"
1363
1364
1365
1366
1367
1368if test $ac_cv_prog_gcc = yes; then
1369 echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
e8ce775d 1370echo "configure:1371: checking whether ${CC-cc} needs -traditional" >&5
ccc6cda3
JA
1371if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
1372 echo $ac_n "(cached) $ac_c" 1>&6
1373else
1374 ac_pattern="Autoconf.*'x'"
1375 cat > conftest.$ac_ext <<EOF
e8ce775d 1376#line 1377 "configure"
ccc6cda3
JA
1377#include "confdefs.h"
1378#include <sgtty.h>
1379Autoconf TIOCGETP
1380EOF
1381if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1382 egrep "$ac_pattern" >/dev/null 2>&1; then
1383 rm -rf conftest*
1384 ac_cv_prog_gcc_traditional=yes
1385else
1386 rm -rf conftest*
1387 ac_cv_prog_gcc_traditional=no
1388fi
1389rm -f conftest*
1390
1391
1392 if test $ac_cv_prog_gcc_traditional = no; then
1393 cat > conftest.$ac_ext <<EOF
e8ce775d 1394#line 1395 "configure"
ccc6cda3
JA
1395#include "confdefs.h"
1396#include <termio.h>
1397Autoconf TCGETA
1398EOF
1399if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1400 egrep "$ac_pattern" >/dev/null 2>&1; then
1401 rm -rf conftest*
1402 ac_cv_prog_gcc_traditional=yes
1403fi
1404rm -f conftest*
1405
1406 fi
1407fi
1408
1409echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
1410 if test $ac_cv_prog_gcc_traditional = yes; then
1411 CC="$CC -traditional"
1412 fi
1413fi
1414
1415
1416# Find a good install program. We prefer a C program (faster),
1417# so one script is as good as another. But avoid the broken or
1418# incompatible versions:
1419# SysV /etc/install, /usr/sbin/install
1420# SunOS /usr/etc/install
1421# IRIX /sbin/install
1422# AIX /bin/install
1423# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1424# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1425# ./install, which can be erroneously created by make from ./install.sh.
1426echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
e8ce775d 1427echo "configure:1428: checking for a BSD compatible install" >&5
ccc6cda3
JA
1428if test -z "$INSTALL"; then
1429if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1430 echo $ac_n "(cached) $ac_c" 1>&6
1431else
1432 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
1433 for ac_dir in $PATH; do
1434 # Account for people who put trailing slashes in PATH elements.
1435 case "$ac_dir/" in
1436 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1437 *)
1438 # OSF1 and SCO ODT 3.0 have their own names for install.
1439 for ac_prog in ginstall installbsd scoinst install; do
1440 if test -f $ac_dir/$ac_prog; then
1441 if test $ac_prog = install &&
1442 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1443 # AIX install. It has an incompatible calling convention.
1444 # OSF/1 installbsd also uses dspmsg, but is usable.
1445 :
1446 else
1447 ac_cv_path_install="$ac_dir/$ac_prog -c"
1448 break 2
1449 fi
1450 fi
1451 done
1452 ;;
1453 esac
1454 done
1455 IFS="$ac_save_IFS"
1456
1457fi
1458 if test "${ac_cv_path_install+set}" = set; then
1459 INSTALL="$ac_cv_path_install"
1460 else
1461 # As a last resort, use the slow shell script. We don't cache a
1462 # path for INSTALL within a source directory, because that will
1463 # break other packages using the cache if that directory is
1464 # removed, or if the path is relative.
1465 INSTALL="$ac_install_sh"
1466 fi
1467fi
1468echo "$ac_t""$INSTALL" 1>&6
1469
1470# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1471# It thinks the first close brace ends the variable substitution.
1472test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1473
1474test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1475
1476# Extract the first word of "ar", so it can be a program name with args.
1477set dummy ar; ac_word=$2
1478echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8ce775d 1479echo "configure:1480: checking for $ac_word" >&5
ccc6cda3
JA
1480if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1481 echo $ac_n "(cached) $ac_c" 1>&6
1482else
1483 if test -n "$AR"; then
1484 ac_cv_prog_AR="$AR" # Let the user override the test.
1485else
1486 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1487 for ac_dir in $PATH; do
1488 test -z "$ac_dir" && ac_dir=.
1489 if test -f $ac_dir/$ac_word; then
1490 ac_cv_prog_AR="ar"
1491 break
1492 fi
1493 done
1494 IFS="$ac_save_ifs"
1495fi
1496fi
1497AR="$ac_cv_prog_AR"
1498if test -n "$AR"; then
1499 echo "$ac_t""$AR" 1>&6
1500else
1501 echo "$ac_t""no" 1>&6
1502fi
1503
1504# Extract the first word of "ranlib", so it can be a program name with args.
1505set dummy ranlib; ac_word=$2
1506echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8ce775d 1507echo "configure:1508: checking for $ac_word" >&5
ccc6cda3
JA
1508if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1509 echo $ac_n "(cached) $ac_c" 1>&6
1510else
1511 if test -n "$RANLIB"; then
1512 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1513else
1514 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1515 for ac_dir in $PATH; do
1516 test -z "$ac_dir" && ac_dir=.
1517 if test -f $ac_dir/$ac_word; then
1518 ac_cv_prog_RANLIB="ranlib"
1519 break
1520 fi
1521 done
1522 IFS="$ac_save_ifs"
1523 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1524fi
1525fi
1526RANLIB="$ac_cv_prog_RANLIB"
1527if test -n "$RANLIB"; then
1528 echo "$ac_t""$RANLIB" 1>&6
1529else
1530 echo "$ac_t""no" 1>&6
1531fi
1532
1533for ac_prog in 'bison -y' byacc
1534do
1535# Extract the first word of "$ac_prog", so it can be a program name with args.
1536set dummy $ac_prog; ac_word=$2
1537echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e8ce775d 1538echo "configure:1539: checking for $ac_word" >&5
ccc6cda3
JA
1539if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1540 echo $ac_n "(cached) $ac_c" 1>&6
1541else
1542 if test -n "$YACC"; then
1543 ac_cv_prog_YACC="$YACC" # Let the user override the test.
1544else
1545 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1546 for ac_dir in $PATH; do
1547 test -z "$ac_dir" && ac_dir=.
1548 if test -f $ac_dir/$ac_word; then
1549 ac_cv_prog_YACC="$ac_prog"
1550 break
1551 fi
1552 done
1553 IFS="$ac_save_ifs"
1554fi
1555fi
1556YACC="$ac_cv_prog_YACC"
1557if test -n "$YACC"; then
1558 echo "$ac_t""$YACC" 1>&6
1559else
1560 echo "$ac_t""no" 1>&6
1561fi
1562
1563test -n "$YACC" && break
1564done
1565test -n "$YACC" || YACC="yacc"
1566
1567echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
e8ce775d 1568echo "configure:1569: checking whether ${MAKE-make} sets \${MAKE}" >&5
ccc6cda3
JA
1569set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1570if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1571 echo $ac_n "(cached) $ac_c" 1>&6
1572else
1573 cat > conftestmake <<\EOF
1574all:
1575 @echo 'ac_maketemp="${MAKE}"'
1576EOF
1577# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1578eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1579if test -n "$ac_maketemp"; then
1580 eval ac_cv_prog_make_${ac_make}_set=yes
1581else
1582 eval ac_cv_prog_make_${ac_make}_set=no
1583fi
1584rm -f conftestmake
1585fi
1586if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1587 echo "$ac_t""yes" 1>&6
1588 SET_MAKE=
1589else
1590 echo "$ac_t""no" 1>&6
1591 SET_MAKE="MAKE=${MAKE-make}"
1592fi
1593
1594
1595# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1596# for constant arguments. Useless!
1597echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
e8ce775d 1598echo "configure:1599: checking for working alloca.h" >&5
ccc6cda3
JA
1599if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1600 echo $ac_n "(cached) $ac_c" 1>&6
1601else
1602 cat > conftest.$ac_ext <<EOF
e8ce775d 1603#line 1604 "configure"
ccc6cda3
JA
1604#include "confdefs.h"
1605#include <alloca.h>
1606int main() {
1607char *p = alloca(2 * sizeof(int));
1608; return 0; }
1609EOF
e8ce775d 1610if { (eval echo configure:1611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ccc6cda3
JA
1611 rm -rf conftest*
1612 ac_cv_header_alloca_h=yes
1613else
1614 echo "configure: failed program was:" >&5
1615 cat conftest.$ac_ext >&5
1616 rm -rf conftest*
1617 ac_cv_header_alloca_h=no
1618fi
1619rm -f conftest*
1620fi
1621
1622echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1623if test $ac_cv_header_alloca_h = yes; then
1624 cat >> confdefs.h <<\EOF
1625#define HAVE_ALLOCA_H 1
1626EOF
1627
1628fi
1629
1630echo $ac_n "checking for alloca""... $ac_c" 1>&6
e8ce775d 1631echo "configure:1632: checking for alloca" >&5
ccc6cda3
JA
1632if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1633 echo $ac_n "(cached) $ac_c" 1>&6
1634else
1635 cat > conftest.$ac_ext <<EOF
e8ce775d 1636#line 1637 "configure"
ccc6cda3
JA
1637#include "confdefs.h"
1638
1639#ifdef __GNUC__
1640# define alloca __builtin_alloca
1641#else
1642# if HAVE_ALLOCA_H
1643# include <alloca.h>
1644# else
1645# ifdef _AIX
1646 #pragma alloca
1647# else
1648# ifndef alloca /* predefined by HP cc +Olibcalls */
1649char *alloca ();
1650# endif
1651# endif
1652# endif
1653#endif
1654
1655int main() {
1656char *p = (char *) alloca(1);
1657; return 0; }
1658EOF
e8ce775d 1659if { (eval echo configure:1660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ccc6cda3
JA
1660 rm -rf conftest*
1661 ac_cv_func_alloca_works=yes
1662else
1663 echo "configure: failed program was:" >&5
1664 cat conftest.$ac_ext >&5
1665 rm -rf conftest*
1666 ac_cv_func_alloca_works=no
1667fi
1668rm -f conftest*
1669fi
1670
1671echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1672if test $ac_cv_func_alloca_works = yes; then
1673 cat >> confdefs.h <<\EOF
1674#define HAVE_ALLOCA 1
1675EOF
1676
1677fi
1678
1679if test $ac_cv_func_alloca_works = no; then
1680 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1681 # that cause trouble. Some versions do not even contain alloca or
1682 # contain a buggy version. If you still want to use their alloca,
1683 # use ar to extract alloca.o from them instead of compiling alloca.c.
1684 ALLOCA=alloca.o
1685 cat >> confdefs.h <<\EOF
1686#define C_ALLOCA 1
1687EOF
1688
1689
1690echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
e8ce775d 1691echo "configure:1692: checking whether alloca needs Cray hooks" >&5
ccc6cda3
JA
1692if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1693 echo $ac_n "(cached) $ac_c" 1>&6
1694else
1695 cat > conftest.$ac_ext <<EOF
e8ce775d 1696#line 1697 "configure"
ccc6cda3
JA
1697#include "confdefs.h"
1698#if defined(CRAY) && ! defined(CRAY2)
1699webecray
1700#else
1701wenotbecray
1702#endif
1703
1704EOF
1705if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1706 egrep "webecray" >/dev/null 2>&1; then
1707 rm -rf conftest*
1708 ac_cv_os_cray=yes
1709else
1710 rm -rf conftest*
1711 ac_cv_os_cray=no
1712fi
1713rm -f conftest*
1714
1715fi
1716
1717echo "$ac_t""$ac_cv_os_cray" 1>&6
1718if test $ac_cv_os_cray = yes; then
1719for ac_func in _getb67 GETB67 getb67; do
1720 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
e8ce775d 1721echo "configure:1722: checking for $ac_func" >&5
ccc6cda3
JA
1722if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1723 echo $ac_n "(cached) $ac_c" 1>&6
1724else
1725 cat > conftest.$ac_ext <<EOF
e8ce775d 1726#line 1727 "configure"
ccc6cda3
JA
1727#include "confdefs.h"
1728/* System header to define __stub macros and hopefully few prototypes,
1729 which can conflict with char $ac_func(); below. */
1730#include <assert.h>
1731/* Override any gcc2 internal prototype to avoid an error. */
1732/* We use char because int might match the return type of a gcc2
1733 builtin and then its argument prototype would still apply. */
1734char $ac_func();
1735
1736int main() {
1737
1738/* The GNU C library defines this for functions which it implements
1739 to always fail with ENOSYS. Some functions are actually named
1740 something starting with __ and the normal name is an alias. */
1741#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1742choke me
1743#else
1744$ac_func();
1745#endif
1746
1747; return 0; }
1748EOF
e8ce775d 1749if { (eval echo configure:1750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ccc6cda3
JA
1750 rm -rf conftest*
1751 eval "ac_cv_func_$ac_func=yes"
1752else
1753 echo "configure: failed program was:" >&5
1754 cat conftest.$ac_ext >&5
1755 rm -rf conftest*
1756 eval "ac_cv_func_$ac_func=no"
1757fi
1758rm -f conftest*
1759fi
1760
1761if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1762 echo "$ac_t""yes" 1>&6
1763 cat >> confdefs.h <<EOF
1764#define CRAY_STACKSEG_END $ac_func
1765EOF
1766
1767 break
1768else
1769 echo "$ac_t""no" 1>&6
1770fi
1771
1772done
1773fi
1774
1775echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
e8ce775d 1776echo "configure:1777: checking stack direction for C alloca" >&5
ccc6cda3
JA
1777if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1778 echo $ac_n "(cached) $ac_c" 1>&6
1779else
1780 if test "$cross_compiling" = yes; then
1781 ac_cv_c_stack_direction=0
1782else
1783 cat > conftest.$ac_ext <<EOF
e8ce775d 1784#line 1785 "configure"
ccc6cda3
JA
1785#include "confdefs.h"
1786find_stack_direction ()
1787{
1788 static char *addr = 0;
1789 auto char dummy;
1790 if (addr == 0)
1791 {
1792 addr = &dummy;
1793 return find_stack_direction ();
1794 }
1795 else
1796 return (&dummy > addr) ? 1 : -1;
1797}
1798main ()
1799{
1800 exit (find_stack_direction() < 0);
1801}
1802EOF
e8ce775d 1803if { (eval echo configure:1804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
1804then
1805 ac_cv_c_stack_direction=1
1806else
1807 echo "configure: failed program was:" >&5
1808 cat conftest.$ac_ext >&5
1809 rm -fr conftest*
1810 ac_cv_c_stack_direction=-1
1811fi
1812rm -fr conftest*
1813fi
1814
1815fi
1816
1817echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1818cat >> confdefs.h <<EOF
1819#define STACK_DIRECTION $ac_cv_c_stack_direction
1820EOF
1821
1822fi
1823
1824echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
e8ce775d 1825echo "configure:1826: checking whether getpgrp takes no argument" >&5
ccc6cda3
JA
1826if eval "test \"`echo '$''{'ac_cv_func_getpgrp_void'+set}'`\" = set"; then
1827 echo $ac_n "(cached) $ac_c" 1>&6
1828else
1829 if test "$cross_compiling" = yes; then
1830 { echo "configure: error: cannot check getpgrp if cross compiling" 1>&2; exit 1; }
1831else
1832 cat > conftest.$ac_ext <<EOF
e8ce775d 1833#line 1834 "configure"
ccc6cda3
JA
1834#include "confdefs.h"
1835
1836/*
1837 * If this system has a BSD-style getpgrp(),
1838 * which takes a pid argument, exit unsuccessfully.
1839 *
1840 * Snarfed from Chet Ramey's bash pgrp.c test program
1841 */
1842#include <stdio.h>
1843#include <sys/types.h>
1844
1845int pid;
1846int pg1, pg2, pg3, pg4;
1847int ng, np, s, child;
1848
1849main()
1850{
1851 pid = getpid();
1852 pg1 = getpgrp(0);
1853 pg2 = getpgrp();
1854 pg3 = getpgrp(pid);
1855 pg4 = getpgrp(1);
1856
1857 /*
1858 * If all of these values are the same, it's pretty sure that
1859 * we're on a system that ignores getpgrp's first argument.
1860 */
1861 if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
1862 exit(0);
1863
1864 child = fork();
1865 if (child < 0)
1866 exit(1);
1867 else if (child == 0) {
1868 np = getpid();
1869 /*
1870 * If this is Sys V, this will not work; pgrp will be
1871 * set to np because setpgrp just changes a pgrp to be
1872 * the same as the pid.
1873 */
1874 setpgrp(np, pg1);
1875 ng = getpgrp(0); /* Same result for Sys V and BSD */
1876 if (ng == pg1) {
1877 exit(1);
1878 } else {
1879 exit(0);
1880 }
1881 } else {
1882 wait(&s);
1883 exit(s>>8);
1884 }
1885}
1886
1887EOF
e8ce775d 1888if { (eval echo configure:1889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
1889then
1890 ac_cv_func_getpgrp_void=yes
1891else
1892 echo "configure: failed program was:" >&5
1893 cat conftest.$ac_ext >&5
1894 rm -fr conftest*
1895 ac_cv_func_getpgrp_void=no
1896fi
1897rm -fr conftest*
1898fi
1899
1900
1901fi
1902
1903echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
1904if test $ac_cv_func_getpgrp_void = yes; then
1905 cat >> confdefs.h <<\EOF
1906#define GETPGRP_VOID 1
1907EOF
1908
1909fi
1910
1911echo $ac_n "checking whether setvbuf arguments are reversed""... $ac_c" 1>&6
e8ce775d 1912echo "configure:1913: checking whether setvbuf arguments are reversed" >&5
ccc6cda3
JA
1913if eval "test \"`echo '$''{'ac_cv_func_setvbuf_reversed'+set}'`\" = set"; then
1914 echo $ac_n "(cached) $ac_c" 1>&6
1915else
1916 if test "$cross_compiling" = yes; then
1917 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1918else
1919 cat > conftest.$ac_ext <<EOF
e8ce775d 1920#line 1921 "configure"
ccc6cda3
JA
1921#include "confdefs.h"
1922#include <stdio.h>
1923/* If setvbuf has the reversed format, exit 0. */
1924main () {
1925 /* This call has the arguments reversed.
1926 A reversed system may check and see that the address of main
1927 is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */
1928 if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
1929 exit(1);
1930 putc('\r', stdout);
1931 exit(0); /* Non-reversed systems segv here. */
1932}
1933EOF
e8ce775d 1934if { (eval echo configure:1935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
1935then
1936 ac_cv_func_setvbuf_reversed=yes
1937else
1938 echo "configure: failed program was:" >&5
1939 cat conftest.$ac_ext >&5
1940 rm -fr conftest*
1941 ac_cv_func_setvbuf_reversed=no
1942fi
1943rm -fr conftest*
1944fi
1945
1946rm -f core core.* *.core
1947fi
1948
1949echo "$ac_t""$ac_cv_func_setvbuf_reversed" 1>&6
1950if test $ac_cv_func_setvbuf_reversed = yes; then
1951 cat >> confdefs.h <<\EOF
1952#define SETVBUF_REVERSED 1
1953EOF
1954
1955fi
1956
1957echo $ac_n "checking for vprintf""... $ac_c" 1>&6
e8ce775d 1958echo "configure:1959: checking for vprintf" >&5
ccc6cda3
JA
1959if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
1960 echo $ac_n "(cached) $ac_c" 1>&6
1961else
1962 cat > conftest.$ac_ext <<EOF
e8ce775d 1963#line 1964 "configure"
ccc6cda3
JA
1964#include "confdefs.h"
1965/* System header to define __stub macros and hopefully few prototypes,
1966 which can conflict with char vprintf(); below. */
1967#include <assert.h>
1968/* Override any gcc2 internal prototype to avoid an error. */
1969/* We use char because int might match the return type of a gcc2
1970 builtin and then its argument prototype would still apply. */
1971char vprintf();
1972
1973int main() {
1974
1975/* The GNU C library defines this for functions which it implements
1976 to always fail with ENOSYS. Some functions are actually named
1977 something starting with __ and the normal name is an alias. */
1978#if defined (__stub_vprintf) || defined (__stub___vprintf)
1979choke me
1980#else
1981vprintf();
1982#endif
1983
1984; return 0; }
1985EOF
e8ce775d 1986if { (eval echo configure:1987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ccc6cda3
JA
1987 rm -rf conftest*
1988 eval "ac_cv_func_vprintf=yes"
1989else
1990 echo "configure: failed program was:" >&5
1991 cat conftest.$ac_ext >&5
1992 rm -rf conftest*
1993 eval "ac_cv_func_vprintf=no"
1994fi
1995rm -f conftest*
1996fi
1997
1998if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
1999 echo "$ac_t""yes" 1>&6
2000 cat >> confdefs.h <<\EOF
2001#define HAVE_VPRINTF 1
2002EOF
2003
2004else
2005 echo "$ac_t""no" 1>&6
2006fi
2007
2008if test "$ac_cv_func_vprintf" != yes; then
2009echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
e8ce775d 2010echo "configure:2011: checking for _doprnt" >&5
ccc6cda3
JA
2011if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
2012 echo $ac_n "(cached) $ac_c" 1>&6
2013else
2014 cat > conftest.$ac_ext <<EOF
e8ce775d 2015#line 2016 "configure"
ccc6cda3
JA
2016#include "confdefs.h"
2017/* System header to define __stub macros and hopefully few prototypes,
2018 which can conflict with char _doprnt(); below. */
2019#include <assert.h>
2020/* Override any gcc2 internal prototype to avoid an error. */
2021/* We use char because int might match the return type of a gcc2
2022 builtin and then its argument prototype would still apply. */
2023char _doprnt();
2024
2025int main() {
2026
2027/* The GNU C library defines this for functions which it implements
2028 to always fail with ENOSYS. Some functions are actually named
2029 something starting with __ and the normal name is an alias. */
2030#if defined (__stub__doprnt) || defined (__stub____doprnt)
2031choke me
2032#else
2033_doprnt();
2034#endif
2035
2036; return 0; }
2037EOF
e8ce775d 2038if { (eval echo configure:2039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ccc6cda3
JA
2039 rm -rf conftest*
2040 eval "ac_cv_func__doprnt=yes"
2041else
2042 echo "configure: failed program was:" >&5
2043 cat conftest.$ac_ext >&5
2044 rm -rf conftest*
2045 eval "ac_cv_func__doprnt=no"
2046fi
2047rm -f conftest*
2048fi
2049
2050if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
2051 echo "$ac_t""yes" 1>&6
2052 cat >> confdefs.h <<\EOF
2053#define HAVE_DOPRNT 1
2054EOF
2055
2056else
2057 echo "$ac_t""no" 1>&6
2058fi
2059
2060fi
2061
2062echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6
e8ce775d 2063echo "configure:2064: checking for wait3 that fills in rusage" >&5
ccc6cda3
JA
2064if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then
2065 echo $ac_n "(cached) $ac_c" 1>&6
2066else
2067 if test "$cross_compiling" = yes; then
2068 ac_cv_func_wait3_rusage=no
2069else
2070 cat > conftest.$ac_ext <<EOF
e8ce775d 2071#line 2072 "configure"
ccc6cda3
JA
2072#include "confdefs.h"
2073#include <sys/types.h>
2074#include <sys/time.h>
2075#include <sys/resource.h>
2076#include <stdio.h>
2077/* HP-UX has wait3 but does not fill in rusage at all. */
2078main() {
2079 struct rusage r;
2080 int i;
2081 /* Use a field that we can force nonzero --
2082 voluntary context switches.
2083 For systems like NeXT and OSF/1 that don't set it,
2084 also use the system CPU time. And page faults (I/O) for Linux. */
2085 r.ru_nvcsw = 0;
2086 r.ru_stime.tv_sec = 0;
2087 r.ru_stime.tv_usec = 0;
2088 r.ru_majflt = r.ru_minflt = 0;
2089 switch (fork()) {
2090 case 0: /* Child. */
2091 sleep(1); /* Give up the CPU. */
2092 _exit(0);
2093 case -1: _exit(0); /* What can we do? */
2094 default: /* Parent. */
2095 wait3(&i, 0, &r);
2096 sleep(2); /* Avoid "text file busy" from rm on fast HP-UX machines. */
2097 exit(r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0
2098 && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0);
2099 }
2100}
2101EOF
e8ce775d 2102if { (eval echo configure:2103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
2103then
2104 ac_cv_func_wait3_rusage=yes
2105else
2106 echo "configure: failed program was:" >&5
2107 cat conftest.$ac_ext >&5
2108 rm -fr conftest*
2109 ac_cv_func_wait3_rusage=no
2110fi
2111rm -fr conftest*
2112fi
2113
2114fi
2115
2116echo "$ac_t""$ac_cv_func_wait3_rusage" 1>&6
2117if test $ac_cv_func_wait3_rusage = yes; then
2118 cat >> confdefs.h <<\EOF
2119#define HAVE_WAIT3 1
2120EOF
2121
2122fi
2123
2124echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
e8ce775d 2125echo "configure:2126: checking for working strcoll" >&5
ccc6cda3
JA
2126if eval "test \"`echo '$''{'ac_cv_func_strcoll_works'+set}'`\" = set"; then
2127 echo $ac_n "(cached) $ac_c" 1>&6
2128else
2129 if test "$cross_compiling" = yes; then
2130 ac_cv_func_strcoll_works=no
2131else
2132 cat > conftest.$ac_ext <<EOF
e8ce775d 2133#line 2134 "configure"
ccc6cda3
JA
2134#include "confdefs.h"
2135#include <string.h>
2136main ()
2137{
2138 exit (strcoll ("abc", "def") >= 0 ||
2139 strcoll ("ABC", "DEF") >= 0 ||
2140 strcoll ("123", "456") >= 0);
2141}
2142EOF
e8ce775d 2143if { (eval echo configure:2144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
2144then
2145 ac_cv_func_strcoll_works=yes
2146else
2147 echo "configure: failed program was:" >&5
2148 cat conftest.$ac_ext >&5
2149 rm -fr conftest*
2150 ac_cv_func_strcoll_works=no
2151fi
2152rm -fr conftest*
2153fi
2154
2155fi
2156
2157echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
2158if test $ac_cv_func_strcoll_works = yes; then
2159 cat >> confdefs.h <<\EOF
2160#define HAVE_STRCOLL 1
2161EOF
2162
2163fi
2164
2165
2166if test "$ac_cv_func_vprintf" = no; then
2167 echo $ac_n "checking for declaration of vprintf in stdio.h""... $ac_c" 1>&6
e8ce775d 2168echo "configure:2169: checking for declaration of vprintf in stdio.h" >&5
ccc6cda3 2169 cat > conftest.$ac_ext <<EOF
e8ce775d 2170#line 2171 "configure"
ccc6cda3
JA
2171#include "confdefs.h"
2172#include <stdio.h>
2173EOF
2174if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2175 egrep "[int[ ]*vprintf[^a-zA-Z0-9]]" >/dev/null 2>&1; then
2176 rm -rf conftest*
2177 ac_cv_func_vprintf=yes
2178fi
2179rm -f conftest*
2180
2181 echo "$ac_t""$ac_cv_func_vprintf" 1>&6
2182 if test $ac_cv_func_vprintf = yes; then
2183 cat >> confdefs.h <<\EOF
2184#define HAVE_VPRINTF 1
2185EOF
2186
2187 fi
2188fi
2189
2190echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
e8ce775d 2191echo "configure:2192: checking return type of signal handlers" >&5
ccc6cda3
JA
2192if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2193 echo $ac_n "(cached) $ac_c" 1>&6
2194else
2195 cat > conftest.$ac_ext <<EOF
e8ce775d 2196#line 2197 "configure"
ccc6cda3
JA
2197#include "confdefs.h"
2198#include <sys/types.h>
2199#include <signal.h>
2200#ifdef signal
2201#undef signal
2202#endif
2203#ifdef __cplusplus
2204extern "C" void (*signal (int, void (*)(int)))(int);
2205#else
2206void (*signal ()) ();
2207#endif
2208
2209int main() {
2210int i;
2211; return 0; }
2212EOF
e8ce775d 2213if { (eval echo configure:2214: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ccc6cda3
JA
2214 rm -rf conftest*
2215 ac_cv_type_signal=void
2216else
2217 echo "configure: failed program was:" >&5
2218 cat conftest.$ac_ext >&5
2219 rm -rf conftest*
2220 ac_cv_type_signal=int
2221fi
2222rm -f conftest*
2223fi
2224
2225echo "$ac_t""$ac_cv_type_signal" 1>&6
2226cat >> confdefs.h <<EOF
2227#define RETSIGTYPE $ac_cv_type_signal
2228EOF
2229
2230
2231
2232echo $ac_n "checking for __setostype""... $ac_c" 1>&6
e8ce775d 2233echo "configure:2234: checking for __setostype" >&5
ccc6cda3
JA
2234if eval "test \"`echo '$''{'ac_cv_func___setostype'+set}'`\" = set"; then
2235 echo $ac_n "(cached) $ac_c" 1>&6
2236else
2237 cat > conftest.$ac_ext <<EOF
e8ce775d 2238#line 2239 "configure"
ccc6cda3
JA
2239#include "confdefs.h"
2240/* System header to define __stub macros and hopefully few prototypes,
2241 which can conflict with char __setostype(); below. */
2242#include <assert.h>
2243/* Override any gcc2 internal prototype to avoid an error. */
2244/* We use char because int might match the return type of a gcc2
2245 builtin and then its argument prototype would still apply. */
2246char __setostype();
2247
2248int main() {
2249
2250/* The GNU C library defines this for functions which it implements
2251 to always fail with ENOSYS. Some functions are actually named
2252 something starting with __ and the normal name is an alias. */
2253#if defined (__stub___setostype) || defined (__stub_____setostype)
2254choke me
2255#else
2256__setostype();
2257#endif
2258
2259; return 0; }
2260EOF
e8ce775d 2261if { (eval echo configure:2262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ccc6cda3
JA
2262 rm -rf conftest*
2263 eval "ac_cv_func___setostype=yes"
2264else
2265 echo "configure: failed program was:" >&5
2266 cat conftest.$ac_ext >&5
2267 rm -rf conftest*
2268 eval "ac_cv_func___setostype=no"
2269fi
2270rm -f conftest*
2271fi
2272
2273if eval "test \"`echo '$ac_cv_func_'__setostype`\" = yes"; then
2274 echo "$ac_t""yes" 1>&6
2275 cat >> confdefs.h <<\EOF
2276#define HAVE_SETOSTYPE 1
2277EOF
2278
2279else
2280 echo "$ac_t""no" 1>&6
2281fi
2282
2283echo $ac_n "checking for wait3""... $ac_c" 1>&6
e8ce775d 2284echo "configure:2285: checking for wait3" >&5
ccc6cda3
JA
2285if eval "test \"`echo '$''{'ac_cv_func_wait3'+set}'`\" = set"; then
2286 echo $ac_n "(cached) $ac_c" 1>&6
2287else
2288 cat > conftest.$ac_ext <<EOF
e8ce775d 2289#line 2290 "configure"
ccc6cda3
JA
2290#include "confdefs.h"
2291/* System header to define __stub macros and hopefully few prototypes,
2292 which can conflict with char wait3(); below. */
2293#include <assert.h>
2294/* Override any gcc2 internal prototype to avoid an error. */
2295/* We use char because int might match the return type of a gcc2
2296 builtin and then its argument prototype would still apply. */
2297char wait3();
2298
2299int main() {
2300
2301/* The GNU C library defines this for functions which it implements
2302 to always fail with ENOSYS. Some functions are actually named
2303 something starting with __ and the normal name is an alias. */
2304#if defined (__stub_wait3) || defined (__stub___wait3)
2305choke me
2306#else
2307wait3();
2308#endif
2309
2310; return 0; }
2311EOF
e8ce775d 2312if { (eval echo configure:2313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ccc6cda3
JA
2313 rm -rf conftest*
2314 eval "ac_cv_func_wait3=yes"
2315else
2316 echo "configure: failed program was:" >&5
2317 cat conftest.$ac_ext >&5
2318 rm -rf conftest*
2319 eval "ac_cv_func_wait3=no"
2320fi
2321rm -f conftest*
2322fi
2323
2324if eval "test \"`echo '$ac_cv_func_'wait3`\" = yes"; then
2325 echo "$ac_t""yes" 1>&6
2326 cat >> confdefs.h <<\EOF
2327#define HAVE_WAIT3 1
2328EOF
2329
2330else
2331 echo "$ac_t""no" 1>&6
2332fi
2333
2334
2335echo $ac_n "checking for mkfifo""... $ac_c" 1>&6
e8ce775d 2336echo "configure:2337: checking for mkfifo" >&5
ccc6cda3
JA
2337if eval "test \"`echo '$''{'ac_cv_func_mkfifo'+set}'`\" = set"; then
2338 echo $ac_n "(cached) $ac_c" 1>&6
2339else
2340 cat > conftest.$ac_ext <<EOF
e8ce775d 2341#line 2342 "configure"
ccc6cda3
JA
2342#include "confdefs.h"
2343/* System header to define __stub macros and hopefully few prototypes,
2344 which can conflict with char mkfifo(); below. */
2345#include <assert.h>
2346/* Override any gcc2 internal prototype to avoid an error. */
2347/* We use char because int might match the return type of a gcc2
2348 builtin and then its argument prototype would still apply. */
2349char mkfifo();
2350
2351int main() {
2352
2353/* The GNU C library defines this for functions which it implements
2354 to always fail with ENOSYS. Some functions are actually named
2355 something starting with __ and the normal name is an alias. */
2356#if defined (__stub_mkfifo) || defined (__stub___mkfifo)
2357choke me
2358#else
2359mkfifo();
2360#endif
2361
2362; return 0; }
2363EOF
e8ce775d 2364if { (eval echo configure:2365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ccc6cda3
JA
2365 rm -rf conftest*
2366 eval "ac_cv_func_mkfifo=yes"
2367else
2368 echo "configure: failed program was:" >&5
2369 cat conftest.$ac_ext >&5
2370 rm -rf conftest*
2371 eval "ac_cv_func_mkfifo=no"
2372fi
2373rm -f conftest*
2374fi
2375
2376if eval "test \"`echo '$ac_cv_func_'mkfifo`\" = yes"; then
2377 echo "$ac_t""yes" 1>&6
2378 cat >> confdefs.h <<\EOF
2379#define HAVE_MKFIFO 1
2380EOF
2381
2382else
2383 echo "$ac_t""no" 1>&6
2384cat >> confdefs.h <<\EOF
2385#define MKFIFO_MISSING 1
2386EOF
2387
2388fi
2389
2390
2391for ac_func in dup2 select getdtablesize getgroups gethostname \
2392 setdtablesize getpagesize killpg lstat getpeername \
2393 getrlimit getrusage gettimeofday waitpid tcgetpgrp
2394do
2395echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
e8ce775d 2396echo "configure:2397: checking for $ac_func" >&5
ccc6cda3
JA
2397if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2398 echo $ac_n "(cached) $ac_c" 1>&6
2399else
2400 cat > conftest.$ac_ext <<EOF
e8ce775d 2401#line 2402 "configure"
ccc6cda3
JA
2402#include "confdefs.h"
2403/* System header to define __stub macros and hopefully few prototypes,
2404 which can conflict with char $ac_func(); below. */
2405#include <assert.h>
2406/* Override any gcc2 internal prototype to avoid an error. */
2407/* We use char because int might match the return type of a gcc2
2408 builtin and then its argument prototype would still apply. */
2409char $ac_func();
2410
2411int main() {
2412
2413/* The GNU C library defines this for functions which it implements
2414 to always fail with ENOSYS. Some functions are actually named
2415 something starting with __ and the normal name is an alias. */
2416#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2417choke me
2418#else
2419$ac_func();
2420#endif
2421
2422; return 0; }
2423EOF
e8ce775d 2424if { (eval echo configure:2425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ccc6cda3
JA
2425 rm -rf conftest*
2426 eval "ac_cv_func_$ac_func=yes"
2427else
2428 echo "configure: failed program was:" >&5
2429 cat conftest.$ac_ext >&5
2430 rm -rf conftest*
2431 eval "ac_cv_func_$ac_func=no"
2432fi
2433rm -f conftest*
2434fi
2435
2436if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2437 echo "$ac_t""yes" 1>&6
2438 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2439 cat >> confdefs.h <<EOF
2440#define $ac_tr_func 1
2441EOF
2442
2443else
2444 echo "$ac_t""no" 1>&6
2445fi
2446done
2447
2448
2449for ac_func in bcopy bzero confstr getcwd strcasecmp setenv putenv \
2450 setlinebuf setlocale strchr strerror tcgetattr uname \
2451 sysconf ulimit times tzset siginterrupt memmove
2452do
2453echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
e8ce775d 2454echo "configure:2455: checking for $ac_func" >&5
ccc6cda3
JA
2455if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2456 echo $ac_n "(cached) $ac_c" 1>&6
2457else
2458 cat > conftest.$ac_ext <<EOF
e8ce775d 2459#line 2460 "configure"
ccc6cda3
JA
2460#include "confdefs.h"
2461/* System header to define __stub macros and hopefully few prototypes,
2462 which can conflict with char $ac_func(); below. */
2463#include <assert.h>
2464/* Override any gcc2 internal prototype to avoid an error. */
2465/* We use char because int might match the return type of a gcc2
2466 builtin and then its argument prototype would still apply. */
2467char $ac_func();
2468
2469int main() {
2470
2471/* The GNU C library defines this for functions which it implements
2472 to always fail with ENOSYS. Some functions are actually named
2473 something starting with __ and the normal name is an alias. */
2474#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2475choke me
2476#else
2477$ac_func();
2478#endif
2479
2480; return 0; }
2481EOF
e8ce775d 2482if { (eval echo configure:2483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ccc6cda3
JA
2483 rm -rf conftest*
2484 eval "ac_cv_func_$ac_func=yes"
2485else
2486 echo "configure: failed program was:" >&5
2487 cat conftest.$ac_ext >&5
2488 rm -rf conftest*
2489 eval "ac_cv_func_$ac_func=no"
2490fi
2491rm -f conftest*
2492fi
2493
2494if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2495 echo "$ac_t""yes" 1>&6
2496 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2497 cat >> confdefs.h <<EOF
2498#define $ac_tr_func 1
2499EOF
2500
2501else
2502 echo "$ac_t""no" 1>&6
2503fi
2504done
2505
2506
2507for ac_hdr in libintl.h
2508do
2509ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2510echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
e8ce775d 2511echo "configure:2512: checking for $ac_hdr" >&5
ccc6cda3
JA
2512if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2513 echo $ac_n "(cached) $ac_c" 1>&6
2514else
2515 cat > conftest.$ac_ext <<EOF
e8ce775d 2516#line 2517 "configure"
ccc6cda3
JA
2517#include "confdefs.h"
2518#include <$ac_hdr>
2519EOF
2520ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
e8ce775d 2521{ (eval echo configure:2522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ccc6cda3
JA
2522ac_err=`grep -v '^ *+' conftest.out`
2523if test -z "$ac_err"; then
2524 rm -rf conftest*
2525 eval "ac_cv_header_$ac_safe=yes"
2526else
2527 echo "$ac_err" >&5
2528 echo "configure: failed program was:" >&5
2529 cat conftest.$ac_ext >&5
2530 rm -rf conftest*
2531 eval "ac_cv_header_$ac_safe=no"
2532fi
2533rm -f conftest*
2534fi
2535if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2536 echo "$ac_t""yes" 1>&6
2537 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2538 cat >> confdefs.h <<EOF
2539#define $ac_tr_hdr 1
2540EOF
2541
2542else
2543 echo "$ac_t""no" 1>&6
2544fi
2545done
2546
2547for ac_func in gettext textdomain bindtextdomain
2548do
2549echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
e8ce775d 2550echo "configure:2551: checking for $ac_func" >&5
ccc6cda3
JA
2551if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2552 echo $ac_n "(cached) $ac_c" 1>&6
2553else
2554 cat > conftest.$ac_ext <<EOF
e8ce775d 2555#line 2556 "configure"
ccc6cda3
JA
2556#include "confdefs.h"
2557/* System header to define __stub macros and hopefully few prototypes,
2558 which can conflict with char $ac_func(); below. */
2559#include <assert.h>
2560/* Override any gcc2 internal prototype to avoid an error. */
2561/* We use char because int might match the return type of a gcc2
2562 builtin and then its argument prototype would still apply. */
2563char $ac_func();
2564
2565int main() {
2566
2567/* The GNU C library defines this for functions which it implements
2568 to always fail with ENOSYS. Some functions are actually named
2569 something starting with __ and the normal name is an alias. */
2570#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2571choke me
2572#else
2573$ac_func();
2574#endif
2575
2576; return 0; }
2577EOF
e8ce775d 2578if { (eval echo configure:2579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ccc6cda3
JA
2579 rm -rf conftest*
2580 eval "ac_cv_func_$ac_func=yes"
2581else
2582 echo "configure: failed program was:" >&5
2583 cat conftest.$ac_ext >&5
2584 rm -rf conftest*
2585 eval "ac_cv_func_$ac_func=no"
2586fi
2587rm -f conftest*
2588fi
2589
2590if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2591 echo "$ac_t""yes" 1>&6
2592 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2593 cat >> confdefs.h <<EOF
2594#define $ac_tr_func 1
2595EOF
2596
2597else
2598 echo "$ac_t""no" 1>&6
2599fi
2600done
2601
2602
2603if test "$ac_cv_func_bindtextdomain" = "no"; then
2604 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
e8ce775d 2605echo "configure:2606: checking for bindtextdomain in -lintl" >&5
ccc6cda3
JA
2606ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2607if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2608 echo $ac_n "(cached) $ac_c" 1>&6
2609else
2610 ac_save_LIBS="$LIBS"
2611LIBS="-lintl $LIBS"
2612cat > conftest.$ac_ext <<EOF
e8ce775d 2613#line 2614 "configure"
ccc6cda3
JA
2614#include "confdefs.h"
2615/* Override any gcc2 internal prototype to avoid an error. */
2616/* We use char because int might match the return type of a gcc2
2617 builtin and then its argument prototype would still apply. */
2618char bindtextdomain();
2619
2620int main() {
2621bindtextdomain()
2622; return 0; }
2623EOF
e8ce775d 2624if { (eval echo configure:2625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ccc6cda3
JA
2625 rm -rf conftest*
2626 eval "ac_cv_lib_$ac_lib_var=yes"
2627else
2628 echo "configure: failed program was:" >&5
2629 cat conftest.$ac_ext >&5
2630 rm -rf conftest*
2631 eval "ac_cv_lib_$ac_lib_var=no"
2632fi
2633rm -f conftest*
2634LIBS="$ac_save_LIBS"
2635
2636fi
2637if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2638 echo "$ac_t""yes" 1>&6
2639 ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2640 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2641 cat >> confdefs.h <<EOF
2642#define $ac_tr_lib 1
2643EOF
2644
2645 LIBS="-lintl $LIBS"
2646
2647else
2648 echo "$ac_t""no" 1>&6
2649fi
2650
2651 if test "$ac_cv_lib_intl" = "yes"; then
2652 for ac_func in gettext textdomain bindtextdomain
2653do
2654echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
e8ce775d 2655echo "configure:2656: checking for $ac_func" >&5
ccc6cda3
JA
2656if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2657 echo $ac_n "(cached) $ac_c" 1>&6
2658else
2659 cat > conftest.$ac_ext <<EOF
e8ce775d 2660#line 2661 "configure"
ccc6cda3
JA
2661#include "confdefs.h"
2662/* System header to define __stub macros and hopefully few prototypes,
2663 which can conflict with char $ac_func(); below. */
2664#include <assert.h>
2665/* Override any gcc2 internal prototype to avoid an error. */
2666/* We use char because int might match the return type of a gcc2
2667 builtin and then its argument prototype would still apply. */
2668char $ac_func();
2669
2670int main() {
2671
2672/* The GNU C library defines this for functions which it implements
2673 to always fail with ENOSYS. Some functions are actually named
2674 something starting with __ and the normal name is an alias. */
2675#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2676choke me
2677#else
2678$ac_func();
2679#endif
2680
2681; return 0; }
2682EOF
e8ce775d 2683if { (eval echo configure:2684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ccc6cda3
JA
2684 rm -rf conftest*
2685 eval "ac_cv_func_$ac_func=yes"
2686else
2687 echo "configure: failed program was:" >&5
2688 cat conftest.$ac_ext >&5
2689 rm -rf conftest*
2690 eval "ac_cv_func_$ac_func=no"
2691fi
2692rm -f conftest*
2693fi
2694
2695if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2696 echo "$ac_t""yes" 1>&6
2697 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2698 cat >> confdefs.h <<EOF
2699#define $ac_tr_func 1
2700EOF
2701
2702else
2703 echo "$ac_t""no" 1>&6
2704fi
2705done
2706
2707 fi
2708fi
2709
2710echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
e8ce775d 2711echo "configure:2712: checking for dlopen in -ldl" >&5
ccc6cda3
JA
2712ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2713if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2714 echo $ac_n "(cached) $ac_c" 1>&6
2715else
2716 ac_save_LIBS="$LIBS"
2717LIBS="-ldl $LIBS"
2718cat > conftest.$ac_ext <<EOF
e8ce775d 2719#line 2720 "configure"
ccc6cda3
JA
2720#include "confdefs.h"
2721/* Override any gcc2 internal prototype to avoid an error. */
2722/* We use char because int might match the return type of a gcc2
2723 builtin and then its argument prototype would still apply. */
2724char dlopen();
2725
2726int main() {
2727dlopen()
2728; return 0; }
2729EOF
e8ce775d 2730if { (eval echo configure:2731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ccc6cda3
JA
2731 rm -rf conftest*
2732 eval "ac_cv_lib_$ac_lib_var=yes"
2733else
2734 echo "configure: failed program was:" >&5
2735 cat conftest.$ac_ext >&5
2736 rm -rf conftest*
2737 eval "ac_cv_lib_$ac_lib_var=no"
2738fi
2739rm -f conftest*
2740LIBS="$ac_save_LIBS"
2741
2742fi
2743if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2744 echo "$ac_t""yes" 1>&6
2745 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2746 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2747 cat >> confdefs.h <<EOF
2748#define $ac_tr_lib 1
2749EOF
2750
2751 LIBS="-ldl $LIBS"
2752
2753else
2754 echo "$ac_t""no" 1>&6
2755fi
2756
2757for ac_func in dlopen dlclose dlsym
2758do
2759echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
e8ce775d 2760echo "configure:2761: checking for $ac_func" >&5
ccc6cda3
JA
2761if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2762 echo $ac_n "(cached) $ac_c" 1>&6
2763else
2764 cat > conftest.$ac_ext <<EOF
e8ce775d 2765#line 2766 "configure"
ccc6cda3
JA
2766#include "confdefs.h"
2767/* System header to define __stub macros and hopefully few prototypes,
2768 which can conflict with char $ac_func(); below. */
2769#include <assert.h>
2770/* Override any gcc2 internal prototype to avoid an error. */
2771/* We use char because int might match the return type of a gcc2
2772 builtin and then its argument prototype would still apply. */
2773char $ac_func();
2774
2775int main() {
2776
2777/* The GNU C library defines this for functions which it implements
2778 to always fail with ENOSYS. Some functions are actually named
2779 something starting with __ and the normal name is an alias. */
2780#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2781choke me
2782#else
2783$ac_func();
2784#endif
2785
2786; return 0; }
2787EOF
e8ce775d 2788if { (eval echo configure:2789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ccc6cda3
JA
2789 rm -rf conftest*
2790 eval "ac_cv_func_$ac_func=yes"
2791else
2792 echo "configure: failed program was:" >&5
2793 cat conftest.$ac_ext >&5
2794 rm -rf conftest*
2795 eval "ac_cv_func_$ac_func=no"
2796fi
2797rm -f conftest*
2798fi
2799
2800if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2801 echo "$ac_t""yes" 1>&6
2802 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2803 cat >> confdefs.h <<EOF
2804#define $ac_tr_func 1
2805EOF
2806
2807else
2808 echo "$ac_t""no" 1>&6
2809fi
2810done
2811
2812
2813echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
e8ce775d 2814echo "configure:2815: checking for sys_siglist declaration in signal.h or unistd.h" >&5
ccc6cda3
JA
2815if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
2816 echo $ac_n "(cached) $ac_c" 1>&6
2817else
2818 cat > conftest.$ac_ext <<EOF
e8ce775d 2819#line 2820 "configure"
ccc6cda3
JA
2820#include "confdefs.h"
2821#include <sys/types.h>
2822#include <signal.h>
2823/* NetBSD declares sys_siglist in unistd.h. */
2824#ifdef HAVE_UNISTD_H
2825#include <unistd.h>
2826#endif
2827int main() {
2828char *msg = *(sys_siglist + 1);
2829; return 0; }
2830EOF
e8ce775d 2831if { (eval echo configure:2832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ccc6cda3
JA
2832 rm -rf conftest*
2833 ac_cv_decl_sys_siglist=yes
2834else
2835 echo "configure: failed program was:" >&5
2836 cat conftest.$ac_ext >&5
2837 rm -rf conftest*
2838 ac_cv_decl_sys_siglist=no
2839fi
2840rm -f conftest*
2841fi
2842
2843echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
2844if test $ac_cv_decl_sys_siglist = yes; then
2845 cat >> confdefs.h <<\EOF
2846#define SYS_SIGLIST_DECLARED 1
2847EOF
2848
2849fi
2850
2851
2852ac_header_dirent=no
2853for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
2854do
2855ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2856echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
e8ce775d 2857echo "configure:2858: checking for $ac_hdr that defines DIR" >&5
ccc6cda3
JA
2858if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
2859 echo $ac_n "(cached) $ac_c" 1>&6
2860else
2861 cat > conftest.$ac_ext <<EOF
e8ce775d 2862#line 2863 "configure"
ccc6cda3
JA
2863#include "confdefs.h"
2864#include <sys/types.h>
2865#include <$ac_hdr>
2866int main() {
2867DIR *dirp = 0;
2868; return 0; }
2869EOF
e8ce775d 2870if { (eval echo configure:2871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ccc6cda3
JA
2871 rm -rf conftest*
2872 eval "ac_cv_header_dirent_$ac_safe=yes"
2873else
2874 echo "configure: failed program was:" >&5
2875 cat conftest.$ac_ext >&5
2876 rm -rf conftest*
2877 eval "ac_cv_header_dirent_$ac_safe=no"
2878fi
2879rm -f conftest*
2880fi
2881if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2882 echo "$ac_t""yes" 1>&6
2883 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2884 cat >> confdefs.h <<EOF
2885#define $ac_tr_hdr 1
2886EOF
2887 ac_header_dirent=$ac_hdr; break
2888else
2889 echo "$ac_t""no" 1>&6
2890fi
2891done
2892# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2893if test $ac_header_dirent = dirent.h; then
2894echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
e8ce775d 2895echo "configure:2896: checking for opendir in -ldir" >&5
ccc6cda3
JA
2896ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2897if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2898 echo $ac_n "(cached) $ac_c" 1>&6
2899else
2900 ac_save_LIBS="$LIBS"
2901LIBS="-ldir $LIBS"
2902cat > conftest.$ac_ext <<EOF
e8ce775d 2903#line 2904 "configure"
ccc6cda3
JA
2904#include "confdefs.h"
2905/* Override any gcc2 internal prototype to avoid an error. */
2906/* We use char because int might match the return type of a gcc2
2907 builtin and then its argument prototype would still apply. */
2908char opendir();
2909
2910int main() {
2911opendir()
2912; return 0; }
2913EOF
e8ce775d 2914if { (eval echo configure:2915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ccc6cda3
JA
2915 rm -rf conftest*
2916 eval "ac_cv_lib_$ac_lib_var=yes"
2917else
2918 echo "configure: failed program was:" >&5
2919 cat conftest.$ac_ext >&5
2920 rm -rf conftest*
2921 eval "ac_cv_lib_$ac_lib_var=no"
2922fi
2923rm -f conftest*
2924LIBS="$ac_save_LIBS"
2925
2926fi
2927if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2928 echo "$ac_t""yes" 1>&6
2929 LIBS="$LIBS -ldir"
2930else
2931 echo "$ac_t""no" 1>&6
2932fi
2933
2934else
2935echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
e8ce775d 2936echo "configure:2937: checking for opendir in -lx" >&5
ccc6cda3
JA
2937ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2938if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2939 echo $ac_n "(cached) $ac_c" 1>&6
2940else
2941 ac_save_LIBS="$LIBS"
2942LIBS="-lx $LIBS"
2943cat > conftest.$ac_ext <<EOF
e8ce775d 2944#line 2945 "configure"
ccc6cda3
JA
2945#include "confdefs.h"
2946/* Override any gcc2 internal prototype to avoid an error. */
2947/* We use char because int might match the return type of a gcc2
2948 builtin and then its argument prototype would still apply. */
2949char opendir();
2950
2951int main() {
2952opendir()
2953; return 0; }
2954EOF
e8ce775d 2955if { (eval echo configure:2956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ccc6cda3
JA
2956 rm -rf conftest*
2957 eval "ac_cv_lib_$ac_lib_var=yes"
2958else
2959 echo "configure: failed program was:" >&5
2960 cat conftest.$ac_ext >&5
2961 rm -rf conftest*
2962 eval "ac_cv_lib_$ac_lib_var=no"
2963fi
2964rm -f conftest*
2965LIBS="$ac_save_LIBS"
2966
2967fi
2968if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2969 echo "$ac_t""yes" 1>&6
2970 LIBS="$LIBS -lx"
2971else
2972 echo "$ac_t""no" 1>&6
2973fi
2974
2975fi
2976
2977echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
e8ce775d 2978echo "configure:2979: checking whether time.h and sys/time.h may both be included" >&5
ccc6cda3
JA
2979if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2980 echo $ac_n "(cached) $ac_c" 1>&6
2981else
2982 cat > conftest.$ac_ext <<EOF
e8ce775d 2983#line 2984 "configure"
ccc6cda3
JA
2984#include "confdefs.h"
2985#include <sys/types.h>
2986#include <sys/time.h>
2987#include <time.h>
2988int main() {
2989struct tm *tp;
2990; return 0; }
2991EOF
e8ce775d 2992if { (eval echo configure:2993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ccc6cda3
JA
2993 rm -rf conftest*
2994 ac_cv_header_time=yes
2995else
2996 echo "configure: failed program was:" >&5
2997 cat conftest.$ac_ext >&5
2998 rm -rf conftest*
2999 ac_cv_header_time=no
3000fi
3001rm -f conftest*
3002fi
3003
3004echo "$ac_t""$ac_cv_header_time" 1>&6
3005if test $ac_cv_header_time = yes; then
3006 cat >> confdefs.h <<\EOF
3007#define TIME_WITH_SYS_TIME 1
3008EOF
3009
3010fi
3011
3012
3013for ac_hdr in unistd.h stdlib.h stdarg.h varargs.h limits.h string.h \
d166f048 3014 memory.h locale.h termcap.h termio.h termios.h dlfcn.h
ccc6cda3
JA
3015do
3016ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3017echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
e8ce775d 3018echo "configure:3019: checking for $ac_hdr" >&5
ccc6cda3
JA
3019if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3020 echo $ac_n "(cached) $ac_c" 1>&6
3021else
3022 cat > conftest.$ac_ext <<EOF
e8ce775d 3023#line 3024 "configure"
ccc6cda3
JA
3024#include "confdefs.h"
3025#include <$ac_hdr>
3026EOF
3027ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
e8ce775d 3028{ (eval echo configure:3029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ccc6cda3
JA
3029ac_err=`grep -v '^ *+' conftest.out`
3030if test -z "$ac_err"; then
3031 rm -rf conftest*
3032 eval "ac_cv_header_$ac_safe=yes"
3033else
3034 echo "$ac_err" >&5
3035 echo "configure: failed program was:" >&5
3036 cat conftest.$ac_ext >&5
3037 rm -rf conftest*
3038 eval "ac_cv_header_$ac_safe=no"
3039fi
3040rm -f conftest*
3041fi
3042if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3043 echo "$ac_t""yes" 1>&6
3044 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3045 cat >> confdefs.h <<EOF
3046#define $ac_tr_hdr 1
3047EOF
3048
3049else
3050 echo "$ac_t""no" 1>&6
3051fi
3052done
3053
3054for ac_hdr in sys/ptem.h sys/pte.h sys/stream.h sys/select.h sys/file.h \
3055 sys/resource.h sys/param.h sys/socket.h \
3056 sys/time.h sys/times.h sys/wait.h
3057do
3058ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3059echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
e8ce775d 3060echo "configure:3061: checking for $ac_hdr" >&5
ccc6cda3
JA
3061if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3062 echo $ac_n "(cached) $ac_c" 1>&6
3063else
3064 cat > conftest.$ac_ext <<EOF
e8ce775d 3065#line 3066 "configure"
ccc6cda3
JA
3066#include "confdefs.h"
3067#include <$ac_hdr>
3068EOF
3069ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
e8ce775d 3070{ (eval echo configure:3071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ccc6cda3
JA
3071ac_err=`grep -v '^ *+' conftest.out`
3072if test -z "$ac_err"; then
3073 rm -rf conftest*
3074 eval "ac_cv_header_$ac_safe=yes"
3075else
3076 echo "$ac_err" >&5
3077 echo "configure: failed program was:" >&5
3078 cat conftest.$ac_ext >&5
3079 rm -rf conftest*
3080 eval "ac_cv_header_$ac_safe=no"
3081fi
3082rm -f conftest*
3083fi
3084if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3085 echo "$ac_t""yes" 1>&6
3086 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3087 cat >> confdefs.h <<EOF
3088#define $ac_tr_hdr 1
3089EOF
3090
3091else
3092 echo "$ac_t""no" 1>&6
3093fi
3094done
3095
3096
d166f048
JA
3097if test "$ac_cv_func_getpeername" = no; then
3098
ccc6cda3
JA
3099if test "X$bash_cv_have_socklib" = "X"; then
3100_bash_needmsg=
3101else
3102echo $ac_n "checking for socket library""... $ac_c" 1>&6
e8ce775d 3103echo "configure:3104: checking for socket library" >&5
ccc6cda3
JA
3104_bash_needmsg=yes
3105fi
3106if eval "test \"`echo '$''{'bash_cv_have_socklib'+set}'`\" = set"; then
3107 echo $ac_n "(cached) $ac_c" 1>&6
3108else
3109 echo $ac_n "checking for getpeername in -lsocket""... $ac_c" 1>&6
e8ce775d 3110echo "configure:3111: checking for getpeername in -lsocket" >&5
ccc6cda3
JA
3111ac_lib_var=`echo socket'_'getpeername | sed 'y%./+-%__p_%'`
3112if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3113 echo $ac_n "(cached) $ac_c" 1>&6
3114else
3115 ac_save_LIBS="$LIBS"
3116LIBS="-lsocket -lnsl $LIBS"
3117cat > conftest.$ac_ext <<EOF
e8ce775d 3118#line 3119 "configure"
ccc6cda3
JA
3119#include "confdefs.h"
3120/* Override any gcc2 internal prototype to avoid an error. */
3121/* We use char because int might match the return type of a gcc2
3122 builtin and then its argument prototype would still apply. */
3123char getpeername();
3124
3125int main() {
3126getpeername()
3127; return 0; }
3128EOF
e8ce775d 3129if { (eval echo configure:3130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ccc6cda3
JA
3130 rm -rf conftest*
3131 eval "ac_cv_lib_$ac_lib_var=yes"
3132else
3133 echo "configure: failed program was:" >&5
3134 cat conftest.$ac_ext >&5
3135 rm -rf conftest*
3136 eval "ac_cv_lib_$ac_lib_var=no"
3137fi
3138rm -f conftest*
3139LIBS="$ac_save_LIBS"
3140
3141fi
3142if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3143 echo "$ac_t""yes" 1>&6
3144 bash_cv_have_socklib=yes
3145else
3146 echo "$ac_t""no" 1>&6
3147bash_cv_have_socklib=no
3148fi
3149
3150fi
3151
3152if test "X$_bash_needmsg" = Xyes; then
3153 echo "$ac_t""$bash_cv_have_socklib" 1>&6
3154 _bash_needmsg=
3155fi
3156if test $bash_cv_have_socklib = yes; then
3157 # check for libnsl, add it to LIBS if present
3158 if test "X$bash_cv_have_libnsl" = "X"; then
3159 _bash_needmsg=
3160 else
3161 echo $ac_n "checking for libnsl""... $ac_c" 1>&6
e8ce775d 3162echo "configure:3163: checking for libnsl" >&5
ccc6cda3
JA
3163 _bash_needmsg=yes
3164 fi
3165 if eval "test \"`echo '$''{'bash_cv_have_libnsl'+set}'`\" = set"; then
3166 echo $ac_n "(cached) $ac_c" 1>&6
3167else
3168 echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
e8ce775d 3169echo "configure:3170: checking for t_open in -lnsl" >&5
ccc6cda3
JA
3170ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
3171if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3172 echo $ac_n "(cached) $ac_c" 1>&6
3173else
3174 ac_save_LIBS="$LIBS"
3175LIBS="-lnsl $LIBS"
3176cat > conftest.$ac_ext <<EOF
e8ce775d 3177#line 3178 "configure"
ccc6cda3
JA
3178#include "confdefs.h"
3179/* Override any gcc2 internal prototype to avoid an error. */
3180/* We use char because int might match the return type of a gcc2
3181 builtin and then its argument prototype would still apply. */
3182char t_open();
3183
3184int main() {
3185t_open()
3186; return 0; }
3187EOF
e8ce775d 3188if { (eval echo configure:3189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ccc6cda3
JA
3189 rm -rf conftest*
3190 eval "ac_cv_lib_$ac_lib_var=yes"
3191else
3192 echo "configure: failed program was:" >&5
3193 cat conftest.$ac_ext >&5
3194 rm -rf conftest*
3195 eval "ac_cv_lib_$ac_lib_var=no"
3196fi
3197rm -f conftest*
3198LIBS="$ac_save_LIBS"
3199
3200fi
3201if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3202 echo "$ac_t""yes" 1>&6
3203 bash_cv_have_libnsl=yes
3204else
3205 echo "$ac_t""no" 1>&6
3206bash_cv_have_libnsl=no
3207fi
3208
3209fi
3210
3211 if test "X$_bash_needmsg" = Xyes; then
3212 echo "$ac_t""$bash_cv_have_libnsl" 1>&6
3213 _bash_needmsg=
3214 fi
3215 if test $bash_cv_have_libnsl = yes; then
3216 LIBS="-lsocket -lnsl $LIBS"
3217 else
3218 LIBS="-lsocket $LIBS"
3219 fi
3220 cat >> confdefs.h <<\EOF
3221#define HAVE_LIBSOCKET 1
3222EOF
3223
3224 cat >> confdefs.h <<\EOF
3225#define HAVE_GETPEERNAME 1
3226EOF
3227
3228fi
3229
d166f048 3230fi
ccc6cda3
JA
3231
3232echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
e8ce775d 3233echo "configure:3234: checking for uid_t in sys/types.h" >&5
ccc6cda3
JA
3234if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3235 echo $ac_n "(cached) $ac_c" 1>&6
3236else
3237 cat > conftest.$ac_ext <<EOF
e8ce775d 3238#line 3239 "configure"
ccc6cda3
JA
3239#include "confdefs.h"
3240#include <sys/types.h>
3241EOF
3242if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3243 egrep "uid_t" >/dev/null 2>&1; then
3244 rm -rf conftest*
3245 ac_cv_type_uid_t=yes
3246else
3247 rm -rf conftest*
3248 ac_cv_type_uid_t=no
3249fi
3250rm -f conftest*
3251
3252fi
3253
3254echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3255if test $ac_cv_type_uid_t = no; then
3256 cat >> confdefs.h <<\EOF
3257#define uid_t int
3258EOF
3259
3260 cat >> confdefs.h <<\EOF
3261#define gid_t int
3262EOF
3263
3264fi
3265
3266echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
e8ce775d 3267echo "configure:3268: checking type of array argument to getgroups" >&5
ccc6cda3
JA
3268if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
3269 echo $ac_n "(cached) $ac_c" 1>&6
3270else
3271 if test "$cross_compiling" = yes; then
3272 ac_cv_type_getgroups=cross
3273else
3274 cat > conftest.$ac_ext <<EOF
e8ce775d 3275#line 3276 "configure"
ccc6cda3
JA
3276#include "confdefs.h"
3277
3278/* Thanks to Mike Rendell for this test. */
3279#include <sys/types.h>
3280#define NGID 256
3281#undef MAX
3282#define MAX(x, y) ((x) > (y) ? (x) : (y))
3283main()
3284{
3285 gid_t gidset[NGID];
3286 int i, n;
3287 union { gid_t gval; long lval; } val;
3288
3289 val.lval = -1;
3290 for (i = 0; i < NGID; i++)
3291 gidset[i] = val.gval;
3292 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
3293 gidset);
3294 /* Exit non-zero if getgroups seems to require an array of ints. This
3295 happens when gid_t is short but getgroups modifies an array of ints. */
3296 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
3297}
3298
3299EOF
e8ce775d 3300if { (eval echo configure:3301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
3301then
3302 ac_cv_type_getgroups=gid_t
3303else
3304 echo "configure: failed program was:" >&5
3305 cat conftest.$ac_ext >&5
3306 rm -fr conftest*
3307 ac_cv_type_getgroups=int
3308fi
3309rm -fr conftest*
3310fi
3311
3312if test $ac_cv_type_getgroups = cross; then
3313 cat > conftest.$ac_ext <<EOF
e8ce775d 3314#line 3315 "configure"
ccc6cda3
JA
3315#include "confdefs.h"
3316#include <unistd.h>
3317EOF
3318if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3319 egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
3320 rm -rf conftest*
3321 ac_cv_type_getgroups=gid_t
3322else
3323 rm -rf conftest*
3324 ac_cv_type_getgroups=int
3325fi
3326rm -f conftest*
3327
3328fi
3329fi
3330
3331echo "$ac_t""$ac_cv_type_getgroups" 1>&6
3332cat >> confdefs.h <<EOF
3333#define GETGROUPS_T $ac_cv_type_getgroups
3334EOF
3335
3336
3337echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
e8ce775d 3338echo "configure:3339: checking for ANSI C header files" >&5
ccc6cda3
JA
3339if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
3340 echo $ac_n "(cached) $ac_c" 1>&6
3341else
3342 cat > conftest.$ac_ext <<EOF
e8ce775d 3343#line 3344 "configure"
ccc6cda3
JA
3344#include "confdefs.h"
3345#include <stdlib.h>
3346#include <stdarg.h>
3347#include <string.h>
3348#include <float.h>
3349EOF
3350ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
e8ce775d 3351{ (eval echo configure:3352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ccc6cda3
JA
3352ac_err=`grep -v '^ *+' conftest.out`
3353if test -z "$ac_err"; then
3354 rm -rf conftest*
3355 ac_cv_header_stdc=yes
3356else
3357 echo "$ac_err" >&5
3358 echo "configure: failed program was:" >&5
3359 cat conftest.$ac_ext >&5
3360 rm -rf conftest*
3361 ac_cv_header_stdc=no
3362fi
3363rm -f conftest*
3364
3365if test $ac_cv_header_stdc = yes; then
3366 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3367cat > conftest.$ac_ext <<EOF
e8ce775d 3368#line 3369 "configure"
ccc6cda3
JA
3369#include "confdefs.h"
3370#include <string.h>
3371EOF
3372if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3373 egrep "memchr" >/dev/null 2>&1; then
3374 :
3375else
3376 rm -rf conftest*
3377 ac_cv_header_stdc=no
3378fi
3379rm -f conftest*
3380
3381fi
3382
3383if test $ac_cv_header_stdc = yes; then
3384 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3385cat > conftest.$ac_ext <<EOF
e8ce775d 3386#line 3387 "configure"
ccc6cda3
JA
3387#include "confdefs.h"
3388#include <stdlib.h>
3389EOF
3390if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3391 egrep "free" >/dev/null 2>&1; then
3392 :
3393else
3394 rm -rf conftest*
3395 ac_cv_header_stdc=no
3396fi
3397rm -f conftest*
3398
3399fi
3400
3401if test $ac_cv_header_stdc = yes; then
3402 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3403if test "$cross_compiling" = yes; then
3404 :
3405else
3406 cat > conftest.$ac_ext <<EOF
e8ce775d 3407#line 3408 "configure"
ccc6cda3
JA
3408#include "confdefs.h"
3409#include <ctype.h>
3410#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3411#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3412#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3413int main () { int i; for (i = 0; i < 256; i++)
3414if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3415exit (0); }
3416
3417EOF
e8ce775d 3418if { (eval echo configure:3419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
3419then
3420 :
3421else
3422 echo "configure: failed program was:" >&5
3423 cat conftest.$ac_ext >&5
3424 rm -fr conftest*
3425 ac_cv_header_stdc=no
3426fi
3427rm -fr conftest*
3428fi
3429
3430fi
3431fi
3432
3433echo "$ac_t""$ac_cv_header_stdc" 1>&6
3434if test $ac_cv_header_stdc = yes; then
3435 cat >> confdefs.h <<\EOF
3436#define STDC_HEADERS 1
3437EOF
3438
3439fi
3440
3441echo $ac_n "checking for off_t""... $ac_c" 1>&6
e8ce775d 3442echo "configure:3443: checking for off_t" >&5
ccc6cda3
JA
3443if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3444 echo $ac_n "(cached) $ac_c" 1>&6
3445else
3446 cat > conftest.$ac_ext <<EOF
e8ce775d 3447#line 3448 "configure"
ccc6cda3
JA
3448#include "confdefs.h"
3449#include <sys/types.h>
3450#if STDC_HEADERS
3451#include <stdlib.h>
3452#include <stddef.h>
3453#endif
3454EOF
3455if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3456 egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3457 rm -rf conftest*
3458 ac_cv_type_off_t=yes
3459else
3460 rm -rf conftest*
3461 ac_cv_type_off_t=no
3462fi
3463rm -f conftest*
3464
3465fi
3466echo "$ac_t""$ac_cv_type_off_t" 1>&6
3467if test $ac_cv_type_off_t = no; then
3468 cat >> confdefs.h <<\EOF
3469#define off_t long
3470EOF
3471
3472fi
3473
3474echo $ac_n "checking for mode_t""... $ac_c" 1>&6
e8ce775d 3475echo "configure:3476: checking for mode_t" >&5
ccc6cda3
JA
3476if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3477 echo $ac_n "(cached) $ac_c" 1>&6
3478else
3479 cat > conftest.$ac_ext <<EOF
e8ce775d 3480#line 3481 "configure"
ccc6cda3
JA
3481#include "confdefs.h"
3482#include <sys/types.h>
3483#if STDC_HEADERS
3484#include <stdlib.h>
3485#include <stddef.h>
3486#endif
3487EOF
3488if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3489 egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3490 rm -rf conftest*
3491 ac_cv_type_mode_t=yes
3492else
3493 rm -rf conftest*
3494 ac_cv_type_mode_t=no
3495fi
3496rm -f conftest*
3497
3498fi
3499echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3500if test $ac_cv_type_mode_t = no; then
3501 cat >> confdefs.h <<\EOF
3502#define mode_t int
3503EOF
3504
3505fi
3506
3507echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
e8ce775d 3508echo "configure:3509: checking for uid_t in sys/types.h" >&5
ccc6cda3
JA
3509if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3510 echo $ac_n "(cached) $ac_c" 1>&6
3511else
3512 cat > conftest.$ac_ext <<EOF
e8ce775d 3513#line 3514 "configure"
ccc6cda3
JA
3514#include "confdefs.h"
3515#include <sys/types.h>
3516EOF
3517if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3518 egrep "uid_t" >/dev/null 2>&1; then
3519 rm -rf conftest*
3520 ac_cv_type_uid_t=yes
3521else
3522 rm -rf conftest*
3523 ac_cv_type_uid_t=no
3524fi
3525rm -f conftest*
3526
3527fi
3528
3529echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3530if test $ac_cv_type_uid_t = no; then
3531 cat >> confdefs.h <<\EOF
3532#define uid_t int
3533EOF
3534
3535 cat >> confdefs.h <<\EOF
3536#define gid_t int
3537EOF
3538
3539fi
3540
3541echo $ac_n "checking for pid_t""... $ac_c" 1>&6
e8ce775d 3542echo "configure:3543: checking for pid_t" >&5
ccc6cda3
JA
3543if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3544 echo $ac_n "(cached) $ac_c" 1>&6
3545else
3546 cat > conftest.$ac_ext <<EOF
e8ce775d 3547#line 3548 "configure"
ccc6cda3
JA
3548#include "confdefs.h"
3549#include <sys/types.h>
3550#if STDC_HEADERS
3551#include <stdlib.h>
3552#include <stddef.h>
3553#endif
3554EOF
3555if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3556 egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3557 rm -rf conftest*
3558 ac_cv_type_pid_t=yes
3559else
3560 rm -rf conftest*
3561 ac_cv_type_pid_t=no
3562fi
3563rm -f conftest*
3564
3565fi
3566echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3567if test $ac_cv_type_pid_t = no; then
3568 cat >> confdefs.h <<\EOF
3569#define pid_t int
3570EOF
3571
3572fi
3573
3574echo $ac_n "checking for size_t""... $ac_c" 1>&6
e8ce775d 3575echo "configure:3576: checking for size_t" >&5
ccc6cda3
JA
3576if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3577 echo $ac_n "(cached) $ac_c" 1>&6
3578else
3579 cat > conftest.$ac_ext <<EOF
e8ce775d 3580#line 3581 "configure"
ccc6cda3
JA
3581#include "confdefs.h"
3582#include <sys/types.h>
3583#if STDC_HEADERS
3584#include <stdlib.h>
3585#include <stddef.h>
3586#endif
3587EOF
3588if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3589 egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3590 rm -rf conftest*
3591 ac_cv_type_size_t=yes
3592else
3593 rm -rf conftest*
3594 ac_cv_type_size_t=no
3595fi
3596rm -f conftest*
3597
3598fi
3599echo "$ac_t""$ac_cv_type_size_t" 1>&6
3600if test $ac_cv_type_size_t = no; then
3601 cat >> confdefs.h <<\EOF
3602#define size_t unsigned
3603EOF
3604
3605fi
3606
3607echo $ac_n "checking for time_t""... $ac_c" 1>&6
e8ce775d 3608echo "configure:3609: checking for time_t" >&5
ccc6cda3
JA
3609if eval "test \"`echo '$''{'ac_cv_type_time_t'+set}'`\" = set"; then
3610 echo $ac_n "(cached) $ac_c" 1>&6
3611else
3612 cat > conftest.$ac_ext <<EOF
e8ce775d 3613#line 3614 "configure"
ccc6cda3
JA
3614#include "confdefs.h"
3615#include <sys/types.h>
3616#if STDC_HEADERS
3617#include <stdlib.h>
3618#include <stddef.h>
3619#endif
3620EOF
3621if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3622 egrep "time_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3623 rm -rf conftest*
3624 ac_cv_type_time_t=yes
3625else
3626 rm -rf conftest*
3627 ac_cv_type_time_t=no
3628fi
3629rm -f conftest*
3630
3631fi
3632echo "$ac_t""$ac_cv_type_time_t" 1>&6
3633if test $ac_cv_type_time_t = no; then
3634 cat >> confdefs.h <<\EOF
3635#define time_t long
3636EOF
3637
3638fi
3639
3640
3641echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
e8ce775d 3642echo "configure:3643: checking return type of signal handlers" >&5
ccc6cda3
JA
3643if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3644 echo $ac_n "(cached) $ac_c" 1>&6
3645else
3646 cat > conftest.$ac_ext <<EOF
e8ce775d 3647#line 3648 "configure"
ccc6cda3
JA
3648#include "confdefs.h"
3649#include <sys/types.h>
3650#include <signal.h>
3651#ifdef signal
3652#undef signal
3653#endif
3654#ifdef __cplusplus
3655extern "C" void (*signal (int, void (*)(int)))(int);
3656#else
3657void (*signal ()) ();
3658#endif
3659
3660int main() {
3661int i;
3662; return 0; }
3663EOF
e8ce775d 3664if { (eval echo configure:3665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ccc6cda3
JA
3665 rm -rf conftest*
3666 ac_cv_type_signal=void
3667else
3668 echo "configure: failed program was:" >&5
3669 cat conftest.$ac_ext >&5
3670 rm -rf conftest*
3671 ac_cv_type_signal=int
3672fi
3673rm -f conftest*
3674fi
3675
3676echo "$ac_t""$ac_cv_type_signal" 1>&6
3677cat >> confdefs.h <<EOF
3678#define RETSIGTYPE $ac_cv_type_signal
3679EOF
3680
3681
3682
3683echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
e8ce775d 3684echo "configure:3685: checking whether stat file-mode macros are broken" >&5
ccc6cda3
JA
3685if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
3686 echo $ac_n "(cached) $ac_c" 1>&6
3687else
3688 cat > conftest.$ac_ext <<EOF
e8ce775d 3689#line 3690 "configure"
ccc6cda3
JA
3690#include "confdefs.h"
3691#include <sys/types.h>
3692#include <sys/stat.h>
3693
3694#if defined(S_ISBLK) && defined(S_IFDIR)
3695# if S_ISBLK (S_IFDIR)
3696You lose.
3697# endif
3698#endif
3699
3700#if defined(S_ISBLK) && defined(S_IFCHR)
3701# if S_ISBLK (S_IFCHR)
3702You lose.
3703# endif
3704#endif
3705
3706#if defined(S_ISLNK) && defined(S_IFREG)
3707# if S_ISLNK (S_IFREG)
3708You lose.
3709# endif
3710#endif
3711
3712#if defined(S_ISSOCK) && defined(S_IFREG)
3713# if S_ISSOCK (S_IFREG)
3714You lose.
3715# endif
3716#endif
3717
3718EOF
3719if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3720 egrep "You lose" >/dev/null 2>&1; then
3721 rm -rf conftest*
3722 ac_cv_header_stat_broken=yes
3723else
3724 rm -rf conftest*
3725 ac_cv_header_stat_broken=no
3726fi
3727rm -f conftest*
3728
3729fi
3730
3731echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
3732if test $ac_cv_header_stat_broken = yes; then
3733 cat >> confdefs.h <<\EOF
3734#define STAT_MACROS_BROKEN 1
3735EOF
3736
3737fi
3738
3739cat > conftest.$ac_ext <<EOF
e8ce775d 3740#line 3741 "configure"
ccc6cda3
JA
3741#include "confdefs.h"
3742#include <sys/time.h>
3743EOF
3744if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3745 egrep "struct timeval" >/dev/null 2>&1; then
3746 rm -rf conftest*
3747 bash_cv_struct_timeval=yes
3748fi
3749rm -f conftest*
3750
3751if test -z "$bash_cv_struct_timeval"; then
3752cat > conftest.$ac_ext <<EOF
e8ce775d 3753#line 3754 "configure"
ccc6cda3
JA
3754#include "confdefs.h"
3755#include <time.h>
3756EOF
3757if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3758 egrep "struct timeval" >/dev/null 2>&1; then
3759 rm -rf conftest*
3760 bash_cv_struct_timeval=yes
3761else
3762 rm -rf conftest*
3763 bash_cv_struct_timeval=no
3764fi
3765rm -f conftest*
3766
3767fi
3768if test $bash_cv_struct_timeval = yes; then
3769cat >> confdefs.h <<\EOF
3770#define HAVE_TIMEVAL 1
3771EOF
3772
3773fi
3774
3775echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
e8ce775d 3776echo "configure:3777: checking whether byte ordering is bigendian" >&5
ccc6cda3
JA
3777if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3778 echo $ac_n "(cached) $ac_c" 1>&6
3779else
3780 ac_cv_c_bigendian=unknown
3781# See if sys/param.h defines the BYTE_ORDER macro.
3782cat > conftest.$ac_ext <<EOF
e8ce775d 3783#line 3784 "configure"
ccc6cda3
JA
3784#include "confdefs.h"
3785#include <sys/types.h>
3786#include <sys/param.h>
3787int main() {
3788
3789#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3790 bogus endian macros
3791#endif
3792; return 0; }
3793EOF
e8ce775d 3794if { (eval echo configure:3795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ccc6cda3
JA
3795 rm -rf conftest*
3796 # It does; now see whether it defined to BIG_ENDIAN or not.
3797cat > conftest.$ac_ext <<EOF
e8ce775d 3798#line 3799 "configure"
ccc6cda3
JA
3799#include "confdefs.h"
3800#include <sys/types.h>
3801#include <sys/param.h>
3802int main() {
3803
3804#if BYTE_ORDER != BIG_ENDIAN
3805 not big endian
3806#endif
3807; return 0; }
3808EOF
e8ce775d 3809if { (eval echo configure:3810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ccc6cda3
JA
3810 rm -rf conftest*
3811 ac_cv_c_bigendian=yes
3812else
3813 echo "configure: failed program was:" >&5
3814 cat conftest.$ac_ext >&5
3815 rm -rf conftest*
3816 ac_cv_c_bigendian=no
3817fi
3818rm -f conftest*
3819else
3820 echo "configure: failed program was:" >&5
3821 cat conftest.$ac_ext >&5
3822fi
3823rm -f conftest*
3824if test $ac_cv_c_bigendian = unknown; then
3825if test "$cross_compiling" = yes; then
3826 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3827else
3828 cat > conftest.$ac_ext <<EOF
e8ce775d 3829#line 3830 "configure"
ccc6cda3
JA
3830#include "confdefs.h"
3831main () {
3832 /* Are we little or big endian? From Harbison&Steele. */
3833 union
3834 {
3835 long l;
3836 char c[sizeof (long)];
3837 } u;
3838 u.l = 1;
3839 exit (u.c[sizeof (long) - 1] == 1);
3840}
3841EOF
e8ce775d 3842if { (eval echo configure:3843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
3843then
3844 ac_cv_c_bigendian=no
3845else
3846 echo "configure: failed program was:" >&5
3847 cat conftest.$ac_ext >&5
3848 rm -fr conftest*
3849 ac_cv_c_bigendian=yes
3850fi
3851rm -fr conftest*
3852fi
3853
3854fi
3855fi
3856
3857echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3858if test $ac_cv_c_bigendian = yes; then
3859 cat >> confdefs.h <<\EOF
3860#define WORDS_BIGENDIAN 1
3861EOF
3862
3863fi
3864
3865
3866# Pull the hash mark out of the macro call to avoid m4 problems.
3867ac_msg="whether #! works in shell scripts"
3868echo $ac_n "checking $ac_msg""... $ac_c" 1>&6
e8ce775d 3869echo "configure:3870: checking $ac_msg" >&5
ccc6cda3
JA
3870if eval "test \"`echo '$''{'ac_cv_sys_interpreter'+set}'`\" = set"; then
3871 echo $ac_n "(cached) $ac_c" 1>&6
3872else
3873 echo '#! /bin/cat
3874exit 69
3875' > conftest
3876chmod u+x conftest
3877(SHELL=/bin/sh; export SHELL; ./conftest >/dev/null)
3878if test $? -ne 69; then
3879 ac_cv_sys_interpreter=yes
3880else
3881 ac_cv_sys_interpreter=no
3882fi
3883rm -f conftest
3884fi
3885
3886echo "$ac_t""$ac_cv_sys_interpreter" 1>&6
3887
3888if test $ac_cv_sys_interpreter = yes; then
3889cat >> confdefs.h <<\EOF
3890#define HAVE_HASH_BANG_EXEC 1
3891EOF
3892
3893fi
3894echo $ac_n "checking for restartable system calls""... $ac_c" 1>&6
e8ce775d 3895echo "configure:3896: checking for restartable system calls" >&5
ccc6cda3
JA
3896if eval "test \"`echo '$''{'ac_cv_sys_restartable_syscalls'+set}'`\" = set"; then
3897 echo $ac_n "(cached) $ac_c" 1>&6
3898else
3899 if test "$cross_compiling" = yes; then
3900 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3901else
3902 cat > conftest.$ac_ext <<EOF
e8ce775d 3903#line 3904 "configure"
ccc6cda3
JA
3904#include "confdefs.h"
3905/* Exit 0 (true) if wait returns something other than -1,
3906 i.e. the pid of the child, which means that wait was restarted
3907 after getting the signal. */
3908#include <sys/types.h>
3909#include <signal.h>
3910ucatch (isig) { }
3911main () {
3912 int i = fork (), status;
3913 if (i == 0) { sleep (3); kill (getppid (), SIGINT); sleep (3); exit (0); }
3914 signal (SIGINT, ucatch);
3915 status = wait(&i);
3916 if (status == -1) wait(&i);
3917 exit (status == -1);
3918}
3919
3920EOF
e8ce775d 3921if { (eval echo configure:3922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
3922then
3923 ac_cv_sys_restartable_syscalls=yes
3924else
3925 echo "configure: failed program was:" >&5
3926 cat conftest.$ac_ext >&5
3927 rm -fr conftest*
3928 ac_cv_sys_restartable_syscalls=no
3929fi
3930rm -fr conftest*
3931fi
3932
3933fi
3934
3935echo "$ac_t""$ac_cv_sys_restartable_syscalls" 1>&6
3936if test $ac_cv_sys_restartable_syscalls = yes; then
3937 cat >> confdefs.h <<\EOF
3938#define HAVE_RESTARTABLE_SYSCALLS 1
3939EOF
3940
3941fi
3942
3943
3944if test "$ac_cv_func_lstat" = "no"; then
3945echo $ac_n "checking for lstat""... $ac_c" 1>&6
e8ce775d 3946echo "configure:3947: checking for lstat" >&5
ccc6cda3
JA
3947if eval "test \"`echo '$''{'bash_cv_func_lstat'+set}'`\" = set"; then
3948 echo $ac_n "(cached) $ac_c" 1>&6
3949else
3950 cat > conftest.$ac_ext <<EOF
e8ce775d 3951#line 3952 "configure"
ccc6cda3
JA
3952#include "confdefs.h"
3953
3954#include <sys/types.h>
3955#include <sys/stat.h>
3956
3957int main() {
3958 lstat("",(struct stat *)0);
3959; return 0; }
3960EOF
e8ce775d 3961if { (eval echo configure:3962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ccc6cda3
JA
3962 rm -rf conftest*
3963 bash_cv_func_lstat=yes
3964else
3965 echo "configure: failed program was:" >&5
3966 cat conftest.$ac_ext >&5
3967 rm -rf conftest*
3968 bash_cv_func_lstat=no
3969fi
3970rm -f conftest*
3971fi
3972
3973echo "$ac_t""$bash_cv_func_lstat" 1>&6
3974if test $bash_cv_func_lstat = yes; then
3975 cat >> confdefs.h <<\EOF
3976#define HAVE_LSTAT 1
3977EOF
3978
3979fi
3980
3981fi
3982
3983echo $ac_n "checking if dup2 fails to clear the close-on-exec flag""... $ac_c" 1>&6
e8ce775d 3984echo "configure:3985: checking if dup2 fails to clear the close-on-exec flag" >&5
ccc6cda3
JA
3985if eval "test \"`echo '$''{'bash_cv_dup2_broken'+set}'`\" = set"; then
3986 echo $ac_n "(cached) $ac_c" 1>&6
3987else
3988 if test "$cross_compiling" = yes; then
3989 { echo "configure: error: cannot check dup2 if cross compiling" 1>&2; exit 1; }
3990else
3991 cat > conftest.$ac_ext <<EOF
e8ce775d 3992#line 3993 "configure"
ccc6cda3
JA
3993#include "confdefs.h"
3994
3995#include <sys/types.h>
3996#include <fcntl.h>
3997main()
3998{
3999 int fd1, fd2, fl;
4000 fd1 = open("/dev/null", 2);
4001 if (fcntl(fd1, 2, 1) < 0)
4002 exit(1);
4003 fd2 = dup2(fd1, 1);
4004 if (fd2 < 0)
4005 exit(2);
4006 fl = fcntl(fd2, 1, 0);
4007 /* fl will be 1 if dup2 did not reset the close-on-exec flag. */
4008 exit(fl != 1);
4009}
4010
4011EOF
e8ce775d 4012if { (eval echo configure:4013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
4013then
4014 bash_cv_dup2_broken=yes
4015else
4016 echo "configure: failed program was:" >&5
4017 cat conftest.$ac_ext >&5
4018 rm -fr conftest*
4019 bash_cv_dup2_broken=no
4020fi
4021rm -fr conftest*
4022fi
4023
4024
4025fi
4026
4027echo "$ac_t""$bash_cv_dup2_broken" 1>&6
4028if test $bash_cv_dup2_broken = yes; then
4029cat >> confdefs.h <<\EOF
4030#define DUP2_BROKEN 1
4031EOF
4032
4033fi
4034
4035
4036echo $ac_n "checking whether pgrps need synchronization""... $ac_c" 1>&6
e8ce775d 4037echo "configure:4038: checking whether pgrps need synchronization" >&5
ccc6cda3
JA
4038if eval "test \"`echo '$''{'bash_cv_pgrp_pipe'+set}'`\" = set"; then
4039 echo $ac_n "(cached) $ac_c" 1>&6
4040else
4041 if test "$cross_compiling" = yes; then
4042 { echo "configure: error: cannot check pgrp synchronization if cross compiling" 1>&2; exit 1; }
4043else
4044 cat > conftest.$ac_ext <<EOF
e8ce775d 4045#line 4046 "configure"
ccc6cda3
JA
4046#include "confdefs.h"
4047
4048#ifdef HAVE_UNISTD_H
4049# include <unistd.h>
4050#endif
4051main()
4052{
4053# ifdef GETPGRP_VOID
4054# define getpgID() getpgrp()
4055# else
4056# define getpgID() getpgrp(0)
4057# define setpgid(x,y) setpgrp(x,y)
4058# endif
4059 int pid1, pid2, fds[2];
4060 int status;
4061 char ok;
4062
4063 switch (pid1 = fork()) {
4064 case -1:
4065 exit(1);
4066 case 0:
4067 setpgid(0, getpid());
4068 exit(0);
4069 }
4070 setpgid(pid1, pid1);
4071
4072 sleep(2); /* let first child die */
4073
4074 if (pipe(fds) < 0)
4075 exit(2);
4076
4077 switch (pid2 = fork()) {
4078 case -1:
4079 exit(3);
4080 case 0:
4081 setpgid(0, pid1);
4082 ok = getpgID() == pid1;
4083 write(fds[1], &ok, 1);
4084 exit(0);
4085 }
4086 setpgid(pid2, pid1);
4087
4088 close(fds[1]);
4089 if (read(fds[0], &ok, 1) != 1)
4090 exit(4);
4091 wait(&status);
4092 wait(&status);
4093 exit(ok ? 0 : 5);
4094}
4095
4096EOF
e8ce775d 4097if { (eval echo configure:4098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
4098then
4099 bash_cv_pgrp_pipe=no
4100else
4101 echo "configure: failed program was:" >&5
4102 cat conftest.$ac_ext >&5
4103 rm -fr conftest*
4104 bash_cv_pgrp_pipe=yes
4105fi
4106rm -fr conftest*
4107fi
4108
4109
4110fi
4111
4112echo "$ac_t""$bash_cv_pgrp_pipe" 1>&6
4113if test $bash_cv_pgrp_pipe = yes; then
4114cat >> confdefs.h <<\EOF
4115#define PGRP_PIPE 1
4116EOF
4117
4118fi
4119
d166f048
JA
4120
4121echo $ac_n "checking for type of signal functions""... $ac_c" 1>&6
e8ce775d 4122echo "configure:4123: checking for type of signal functions" >&5
d166f048 4123if eval "test \"`echo '$''{'bash_cv_signal_vintage'+set}'`\" = set"; then
ccc6cda3
JA
4124 echo $ac_n "(cached) $ac_c" 1>&6
4125else
d166f048 4126
ccc6cda3 4127 cat > conftest.$ac_ext <<EOF
e8ce775d 4128#line 4129 "configure"
ccc6cda3 4129#include "confdefs.h"
d166f048 4130#include <signal.h>
ccc6cda3 4131int main() {
d166f048
JA
4132
4133 sigset_t ss;
4134 struct sigaction sa;
4135 sigemptyset(&ss); sigsuspend(&ss);
4136 sigaction(SIGINT, &sa, (struct sigaction *) 0);
4137 sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
4138
ccc6cda3
JA
4139; return 0; }
4140EOF
e8ce775d 4141if { (eval echo configure:4142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ccc6cda3 4142 rm -rf conftest*
d166f048 4143 bash_cv_signal_vintage=posix
ccc6cda3
JA
4144else
4145 echo "configure: failed program was:" >&5
4146 cat conftest.$ac_ext >&5
4147 rm -rf conftest*
d166f048
JA
4148
4149 cat > conftest.$ac_ext <<EOF
e8ce775d 4150#line 4151 "configure"
d166f048
JA
4151#include "confdefs.h"
4152#include <signal.h>
4153int main() {
4154
4155 int mask = sigmask(SIGINT);
4156 sigsetmask(mask); sigblock(mask); sigpause(mask);
4157
4158; return 0; }
4159EOF
e8ce775d 4160if { (eval echo configure:4161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
d166f048
JA
4161 rm -rf conftest*
4162 bash_cv_signal_vintage=4.2bsd
4163else
4164 echo "configure: failed program was:" >&5
4165 cat conftest.$ac_ext >&5
4166 rm -rf conftest*
4167
4168 cat > conftest.$ac_ext <<EOF
e8ce775d 4169#line 4170 "configure"
d166f048
JA
4170#include "confdefs.h"
4171
4172 #include <signal.h>
4173 RETSIGTYPE foo() { }
4174int main() {
4175
4176 int mask = sigmask(SIGINT);
4177 sigset(SIGINT, foo); sigrelse(SIGINT);
4178 sighold(SIGINT); sigpause(SIGINT);
4179
4180; return 0; }
4181EOF
e8ce775d 4182if { (eval echo configure:4183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
d166f048
JA
4183 rm -rf conftest*
4184 bash_cv_signal_vintage=svr3
4185else
4186 echo "configure: failed program was:" >&5
4187 cat conftest.$ac_ext >&5
4188 rm -rf conftest*
4189 bash_cv_signal_vintage=v7
4190
4191fi
4192rm -f conftest*
4193
4194fi
4195rm -f conftest*
4196
4197fi
4198rm -f conftest*
4199
4200fi
4201
4202echo "$ac_t""$bash_cv_signal_vintage" 1>&6
4203if test "$bash_cv_signal_vintage" = posix; then
4204cat >> confdefs.h <<\EOF
4205#define HAVE_POSIX_SIGNALS 1
4206EOF
4207
4208elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
4209cat >> confdefs.h <<\EOF
4210#define HAVE_BSD_SIGNALS 1
4211EOF
4212
4213elif test "$bash_cv_signal_vintage" = svr3; then
4214cat >> confdefs.h <<\EOF
4215#define HAVE_USG_SIGHOLD 1
4216EOF
4217
4218fi
4219
4220
4221echo $ac_n "checking for sys_errlist and sys_nerr""... $ac_c" 1>&6
e8ce775d 4222echo "configure:4223: checking for sys_errlist and sys_nerr" >&5
d166f048
JA
4223if eval "test \"`echo '$''{'bash_cv_sys_errlist'+set}'`\" = set"; then
4224 echo $ac_n "(cached) $ac_c" 1>&6
4225else
4226 cat > conftest.$ac_ext <<EOF
e8ce775d 4227#line 4228 "configure"
d166f048
JA
4228#include "confdefs.h"
4229#include <errno.h>
4230int main() {
4231extern char *sys_errlist[];
4232 extern int sys_nerr;
4233 char *msg = sys_errlist[sys_nerr - 1];
4234; return 0; }
4235EOF
e8ce775d 4236if { (eval echo configure:4237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
d166f048
JA
4237 rm -rf conftest*
4238 bash_cv_sys_errlist=yes
4239else
4240 echo "configure: failed program was:" >&5
4241 cat conftest.$ac_ext >&5
4242 rm -rf conftest*
4243 bash_cv_sys_errlist=no
4244fi
4245rm -f conftest*
4246fi
4247echo "$ac_t""$bash_cv_sys_errlist" 1>&6
4248if test $bash_cv_sys_errlist = yes; then
4249cat >> confdefs.h <<\EOF
4250#define HAVE_SYS_ERRLIST 1
4251EOF
4252
4253fi
4254
ccc6cda3
JA
4255
4256echo $ac_n "checking for sys_siglist in system C library""... $ac_c" 1>&6
e8ce775d 4257echo "configure:4258: checking for sys_siglist in system C library" >&5
ccc6cda3
JA
4258if eval "test \"`echo '$''{'bash_cv_sys_siglist'+set}'`\" = set"; then
4259 echo $ac_n "(cached) $ac_c" 1>&6
4260else
4261 if test "$cross_compiling" = yes; then
4262 { echo "configure: error: cannot check for sys_siglist if cross compiling" 1>&2; exit 1; }
4263else
4264 cat > conftest.$ac_ext <<EOF
e8ce775d 4265#line 4266 "configure"
ccc6cda3
JA
4266#include "confdefs.h"
4267
4268#include <sys/types.h>
4269#include <signal.h>
4270#ifdef HAVE_UNISTD_H
4271#include <unistd.h>
4272#endif
4273#ifndef SYS_SIGLIST_DECLARED
4274extern char *sys_siglist[];
4275#endif
4276main()
4277{
4278char *msg = sys_siglist[2];
4279exit(msg == 0);
4280}
4281EOF
e8ce775d 4282if { (eval echo configure:4283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
4283then
4284 bash_cv_sys_siglist=yes
4285else
4286 echo "configure: failed program was:" >&5
4287 cat conftest.$ac_ext >&5
4288 rm -fr conftest*
4289 bash_cv_sys_siglist=no
4290fi
4291rm -fr conftest*
4292fi
4293
4294fi
4295echo "$ac_t""$bash_cv_sys_siglist" 1>&6
4296if test $bash_cv_sys_siglist = yes; then
4297cat >> confdefs.h <<\EOF
4298#define HAVE_SYS_SIGLIST 1
4299EOF
4300
4301fi
4302
e8ce775d
JA
4303echo $ac_n "checking for _sys_siglist in signal.h or unistd.h""... $ac_c" 1>&6
4304echo "configure:4305: checking for _sys_siglist in signal.h or unistd.h" >&5
4305if eval "test \"`echo '$''{'bash_cv_decl_under_sys_siglist'+set}'`\" = set"; then
4306 echo $ac_n "(cached) $ac_c" 1>&6
4307else
4308 cat > conftest.$ac_ext <<EOF
4309#line 4310 "configure"
4310#include "confdefs.h"
4311
4312#include <sys/types.h>
4313#include <signal.h>
4314#ifdef HAVE_UNISTD_H
4315#include <unistd.h>
4316#endif
4317int main() {
4318 char *msg = _sys_siglist[2];
4319; return 0; }
4320EOF
4321if { (eval echo configure:4322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4322 rm -rf conftest*
4323 bash_cv_decl_under_sys_siglist=yes
4324else
4325 echo "configure: failed program was:" >&5
4326 cat conftest.$ac_ext >&5
4327 rm -rf conftest*
4328 bash_cv_decl_under_sys_siglist=no
4329fi
4330rm -f conftest*
4331fi
4332echo "$ac_t""$bash_cv_decl_under_sys_siglist" 1>&6
4333if test $bash_cv_decl_under_sys_siglist = yes; then
4334cat >> confdefs.h <<\EOF
4335#define UNDER_SYS_SIGLIST_DECLARED 1
4336EOF
4337
4338fi
4339
4340
ccc6cda3 4341echo $ac_n "checking for _sys_siglist in system C library""... $ac_c" 1>&6
e8ce775d 4342echo "configure:4343: checking for _sys_siglist in system C library" >&5
ccc6cda3
JA
4343if eval "test \"`echo '$''{'bash_cv_under_sys_siglist'+set}'`\" = set"; then
4344 echo $ac_n "(cached) $ac_c" 1>&6
4345else
4346 if test "$cross_compiling" = yes; then
4347 { echo "configure: error: cannot check for _sys_siglist if cross compiling" 1>&2; exit 1; }
4348else
4349 cat > conftest.$ac_ext <<EOF
e8ce775d 4350#line 4351 "configure"
ccc6cda3
JA
4351#include "confdefs.h"
4352
4353#include <sys/types.h>
4354#include <signal.h>
4355#ifdef HAVE_UNISTD_H
4356#include <unistd.h>
4357#endif
e8ce775d 4358#ifndef UNDER_SYS_SIGLIST_DECLARED
ccc6cda3
JA
4359extern char *_sys_siglist[];
4360#endif
4361main()
4362{
e8ce775d 4363char *msg = (char *)_sys_siglist[2];
ccc6cda3
JA
4364exit(msg == 0);
4365}
4366EOF
e8ce775d 4367if { (eval echo configure:4368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
4368then
4369 bash_cv_under_sys_siglist=yes
4370else
4371 echo "configure: failed program was:" >&5
4372 cat conftest.$ac_ext >&5
4373 rm -fr conftest*
4374 bash_cv_under_sys_siglist=no
4375fi
4376rm -fr conftest*
4377fi
4378
4379fi
4380echo "$ac_t""$bash_cv_under_sys_siglist" 1>&6
4381if test $bash_cv_under_sys_siglist = yes; then
4382cat >> confdefs.h <<\EOF
4383#define HAVE_UNDER_SYS_SIGLIST 1
4384EOF
4385
4386fi
4387
4388
ccc6cda3 4389echo $ac_n "checking whether signal handlers are of type void""... $ac_c" 1>&6
e8ce775d 4390echo "configure:4391: checking whether signal handlers are of type void" >&5
ccc6cda3
JA
4391if eval "test \"`echo '$''{'bash_cv_void_sighandler'+set}'`\" = set"; then
4392 echo $ac_n "(cached) $ac_c" 1>&6
4393else
4394 cat > conftest.$ac_ext <<EOF
e8ce775d 4395#line 4396 "configure"
ccc6cda3
JA
4396#include "confdefs.h"
4397#include <sys/types.h>
4398#include <signal.h>
4399#ifdef signal
4400#undef signal
4401#endif
4402#ifdef __cplusplus
4403extern "C"
4404#endif
4405void (*signal ()) ();
4406int main() {
4407int i;
4408; return 0; }
4409EOF
e8ce775d 4410if { (eval echo configure:4411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ccc6cda3
JA
4411 rm -rf conftest*
4412 bash_cv_void_sighandler=yes
4413else
4414 echo "configure: failed program was:" >&5
4415 cat conftest.$ac_ext >&5
4416 rm -rf conftest*
4417 bash_cv_void_sighandler=no
4418fi
4419rm -f conftest*
4420fi
4421echo "$ac_t""$bash_cv_void_sighandler" 1>&6
4422if test $bash_cv_void_sighandler = yes; then
4423cat >> confdefs.h <<\EOF
4424#define VOID_SIGHANDLER 1
4425EOF
4426
4427fi
4428
4429echo $ac_n "checking for clock_t""... $ac_c" 1>&6
e8ce775d 4430echo "configure:4431: checking for clock_t" >&5
ccc6cda3
JA
4431if eval "test \"`echo '$''{'bash_cv_type_clock_t'+set}'`\" = set"; then
4432 echo $ac_n "(cached) $ac_c" 1>&6
4433else
4434 cat > conftest.$ac_ext <<EOF
e8ce775d 4435#line 4436 "configure"
ccc6cda3
JA
4436#include "confdefs.h"
4437#include <sys/types.h>
4438#if STDC_HEADERS
4439#include <stdlib.h>
4440#endif
4441#include <sys/times.h>
4442
4443EOF
4444if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4445 egrep "clock_t" >/dev/null 2>&1; then
4446 rm -rf conftest*
4447 bash_cv_type_clock_t=yes
4448else
4449 rm -rf conftest*
4450 bash_cv_type_clock_t=no
4451fi
4452rm -f conftest*
4453
4454fi
4455
4456echo "$ac_t""$bash_cv_type_clock_t" 1>&6
4457
4458if test $bash_cv_type_clock_t = no; then
4459 cat >> confdefs.h <<\EOF
4460#define clock_t long
4461EOF
4462
4463fi
4464
4465echo $ac_n "checking for sigset_t""... $ac_c" 1>&6
e8ce775d 4466echo "configure:4467: checking for sigset_t" >&5
ccc6cda3
JA
4467if eval "test \"`echo '$''{'bash_cv_type_sigset_t'+set}'`\" = set"; then
4468 echo $ac_n "(cached) $ac_c" 1>&6
4469else
4470 cat > conftest.$ac_ext <<EOF
e8ce775d 4471#line 4472 "configure"
ccc6cda3
JA
4472#include "confdefs.h"
4473#include <sys/types.h>
4474#if STDC_HEADERS
4475#include <stdlib.h>
4476#endif
4477#include <signal.h>
4478
4479EOF
4480if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4481 egrep "sigset_t" >/dev/null 2>&1; then
4482 rm -rf conftest*
4483 bash_cv_type_sigset_t=yes
4484else
4485 rm -rf conftest*
4486 bash_cv_type_sigset_t=no
4487fi
4488rm -f conftest*
4489
4490fi
4491
4492echo "$ac_t""$bash_cv_type_sigset_t" 1>&6
4493
4494if test $bash_cv_type_sigset_t = no; then
4495 cat >> confdefs.h <<\EOF
4496#define sigset_t int
4497EOF
4498
4499fi
4500
4501echo $ac_n "checking for quad_t""... $ac_c" 1>&6
e8ce775d 4502echo "configure:4503: checking for quad_t" >&5
ccc6cda3
JA
4503if eval "test \"`echo '$''{'bash_cv_type_quad_t'+set}'`\" = set"; then
4504 echo $ac_n "(cached) $ac_c" 1>&6
4505else
4506 cat > conftest.$ac_ext <<EOF
e8ce775d 4507#line 4508 "configure"
ccc6cda3
JA
4508#include "confdefs.h"
4509#include <sys/types.h>
4510#if STDC_HEADERS
4511#include <stdlib.h>
4512#endif
4513
4514
4515EOF
4516if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4517 egrep "quad_t" >/dev/null 2>&1; then
4518 rm -rf conftest*
4519 bash_cv_type_quad_t=yes
4520else
4521 rm -rf conftest*
4522 bash_cv_type_quad_t=no
4523fi
4524rm -f conftest*
4525
4526fi
4527
4528echo "$ac_t""$bash_cv_type_quad_t" 1>&6
4529if test $bash_cv_type_quad_t = yes; then
4530 cat >> confdefs.h <<\EOF
4531#define HAVE_QUAD_T 1
4532EOF
4533
4534 fi
4535if test $bash_cv_type_quad_t = no; then
4536 cat >> confdefs.h <<\EOF
4537#define quad_t long
4538EOF
4539
4540fi
4541
4542echo $ac_n "checking for size and type of struct rlimit fields""... $ac_c" 1>&6
e8ce775d 4543echo "configure:4544: checking for size and type of struct rlimit fields" >&5
ccc6cda3
JA
4544if eval "test \"`echo '$''{'bash_cv_type_rlimit'+set}'`\" = set"; then
4545 echo $ac_n "(cached) $ac_c" 1>&6
4546else
4547 cat > conftest.$ac_ext <<EOF
e8ce775d 4548#line 4549 "configure"
ccc6cda3
JA
4549#include "confdefs.h"
4550#include <sys/types.h>
4551int main() {
4552rlim_t xxx;
4553; return 0; }
4554EOF
e8ce775d 4555if { (eval echo configure:4556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ccc6cda3
JA
4556 rm -rf conftest*
4557 bash_cv_type_rlimit=rlim_t
4558else
4559 echo "configure: failed program was:" >&5
4560 cat conftest.$ac_ext >&5
4561 rm -rf conftest*
4562
4563if test "$cross_compiling" = yes; then
4564 { echo "configure: error: cannot check quad_t if cross compiling" 1>&2; exit 1; }
4565else
4566 cat > conftest.$ac_ext <<EOF
e8ce775d 4567#line 4568 "configure"
ccc6cda3
JA
4568#include "confdefs.h"
4569
4570#include <sys/types.h>
4571#include <sys/time.h>
4572#include <sys/resource.h>
4573main()
4574{
4575#ifdef HAVE_QUAD_T
4576 struct rlimit rl;
4577 if (sizeof(rl.rlim_cur) == sizeof(quad_t))
4578 exit(0);
4579#endif
4580 exit(1);
4581}
4582EOF
e8ce775d 4583if { (eval echo configure:4584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
4584then
4585 bash_cv_type_rlimit=quad_t
4586else
4587 echo "configure: failed program was:" >&5
4588 cat conftest.$ac_ext >&5
4589 rm -fr conftest*
4590 bash_cv_type_rlimit=long
4591fi
4592rm -fr conftest*
4593fi
4594
4595fi
4596rm -f conftest*
4597
4598fi
4599
4600echo "$ac_t""$bash_cv_type_rlimit" 1>&6
4601if test $bash_cv_type_rlimit = quad_t; then
4602cat >> confdefs.h <<\EOF
4603#define RLIMTYPE quad_t
4604EOF
4605
4606elif test $bash_cv_type_rlimit = rlim_t; then
4607cat >> confdefs.h <<\EOF
4608#define RLIMTYPE rlim_t
4609EOF
4610
4611fi
4612
d166f048 4613
ccc6cda3 4614echo $ac_n "checking for a c_line member of struct termios""... $ac_c" 1>&6
e8ce775d 4615echo "configure:4616: checking for a c_line member of struct termios" >&5
ccc6cda3
JA
4616if eval "test \"`echo '$''{'bash_cv_termios_ldisc'+set}'`\" = set"; then
4617 echo $ac_n "(cached) $ac_c" 1>&6
4618else
4619 cat > conftest.$ac_ext <<EOF
e8ce775d 4620#line 4621 "configure"
ccc6cda3
JA
4621#include "confdefs.h"
4622#include <sys/types.h>
4623#include <termios.h>
4624int main() {
4625struct termios t; int i; i = t.c_line;
4626; return 0; }
4627EOF
e8ce775d 4628if { (eval echo configure:4629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ccc6cda3
JA
4629 rm -rf conftest*
4630 bash_cv_termios_ldisc=yes
4631else
4632 echo "configure: failed program was:" >&5
4633 cat conftest.$ac_ext >&5
4634 rm -rf conftest*
4635 bash_cv_termios_ldisc=no
4636fi
4637rm -f conftest*
4638fi
4639echo "$ac_t""$bash_cv_termios_ldisc" 1>&6
4640if test $bash_cv_termios_ldisc = yes; then
4641cat >> confdefs.h <<\EOF
4642#define TERMIOS_LDISC 1
4643EOF
4644
4645fi
4646
4647echo $ac_n "checking for a c_line member of struct termio""... $ac_c" 1>&6
e8ce775d 4648echo "configure:4649: checking for a c_line member of struct termio" >&5
ccc6cda3
JA
4649if eval "test \"`echo '$''{'bash_cv_termio_ldisc'+set}'`\" = set"; then
4650 echo $ac_n "(cached) $ac_c" 1>&6
4651else
4652 cat > conftest.$ac_ext <<EOF
e8ce775d 4653#line 4654 "configure"
ccc6cda3
JA
4654#include "confdefs.h"
4655#include <sys/types.h>
4656#include <termio.h>
4657int main() {
4658struct termio t; int i; i = t.c_line;
4659; return 0; }
4660EOF
e8ce775d 4661if { (eval echo configure:4662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ccc6cda3
JA
4662 rm -rf conftest*
4663 bash_cv_termio_ldisc=yes
4664else
4665 echo "configure: failed program was:" >&5
4666 cat conftest.$ac_ext >&5
4667 rm -rf conftest*
4668 bash_cv_termio_ldisc=no
4669fi
4670rm -f conftest*
4671fi
4672echo "$ac_t""$bash_cv_termio_ldisc" 1>&6
4673if test $bash_cv_termio_ldisc = yes; then
4674cat >> confdefs.h <<\EOF
4675#define TERMIO_LDISC 1
4676EOF
4677
4678fi
4679
4680
4681echo $ac_n "checking if struct dirent has a d_ino member""... $ac_c" 1>&6
e8ce775d 4682echo "configure:4683: checking if struct dirent has a d_ino member" >&5
ccc6cda3
JA
4683if eval "test \"`echo '$''{'bash_cv_dirent_has_dino'+set}'`\" = set"; then
4684 echo $ac_n "(cached) $ac_c" 1>&6
4685else
4686 cat > conftest.$ac_ext <<EOF
e8ce775d 4687#line 4688 "configure"
ccc6cda3
JA
4688#include "confdefs.h"
4689
4690#include <stdio.h>
4691#include <sys/types.h>
4692#ifdef HAVE_UNISTD_H
4693# include <unistd.h>
4694#endif /* HAVE_UNISTD_H */
4695#if defined(HAVE_DIRENT_H)
4696# include <dirent.h>
4697#else
4698# define dirent direct
4699# ifdef HAVE_SYS_NDIR_H
4700# include <sys/ndir.h>
4701# endif /* SYSNDIR */
4702# ifdef HAVE_SYS_DIR_H
4703# include <sys/dir.h>
4704# endif /* SYSDIR */
4705# ifdef HAVE_NDIR_H
4706# include <ndir.h>
4707# endif
4708#endif /* HAVE_DIRENT_H */
4709
4710int main() {
4711
4712struct dirent d; int z; z = d.d_ino;
4713
4714; return 0; }
4715EOF
e8ce775d 4716if { (eval echo configure:4717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ccc6cda3
JA
4717 rm -rf conftest*
4718 bash_cv_dirent_has_dino=yes
4719else
4720 echo "configure: failed program was:" >&5
4721 cat conftest.$ac_ext >&5
4722 rm -rf conftest*
4723 bash_cv_dirent_has_dino=no
4724fi
4725rm -f conftest*
4726fi
4727
4728echo "$ac_t""$bash_cv_dirent_has_dino" 1>&6
4729if test $bash_cv_dirent_has_dino = yes; then
4730cat >> confdefs.h <<\EOF
4731#define STRUCT_DIRENT_HAS_D_INO 1
4732EOF
4733
4734fi
4735
d166f048
JA
4736
4737echo $ac_n "checking if struct dirent has a d_fileno member""... $ac_c" 1>&6
e8ce775d 4738echo "configure:4739: checking if struct dirent has a d_fileno member" >&5
d166f048
JA
4739if eval "test \"`echo '$''{'bash_cv_dirent_has_d_fileno'+set}'`\" = set"; then
4740 echo $ac_n "(cached) $ac_c" 1>&6
4741else
4742 cat > conftest.$ac_ext <<EOF
e8ce775d 4743#line 4744 "configure"
d166f048
JA
4744#include "confdefs.h"
4745
4746#include <stdio.h>
4747#include <sys/types.h>
4748#ifdef HAVE_UNISTD_H
4749# include <unistd.h>
4750#endif /* HAVE_UNISTD_H */
4751#if defined(HAVE_DIRENT_H)
4752# include <dirent.h>
4753#else
4754# define dirent direct
4755# ifdef HAVE_SYS_NDIR_H
4756# include <sys/ndir.h>
4757# endif /* SYSNDIR */
4758# ifdef HAVE_SYS_DIR_H
4759# include <sys/dir.h>
4760# endif /* SYSDIR */
4761# ifdef HAVE_NDIR_H
4762# include <ndir.h>
4763# endif
4764#endif /* HAVE_DIRENT_H */
4765
4766int main() {
4767
4768struct dirent d; int z; z = d.d_fileno;
4769
4770; return 0; }
4771EOF
e8ce775d 4772if { (eval echo configure:4773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d166f048
JA
4773 rm -rf conftest*
4774 bash_cv_dirent_has_d_fileno=yes
4775else
4776 echo "configure: failed program was:" >&5
4777 cat conftest.$ac_ext >&5
4778 rm -rf conftest*
4779 bash_cv_dirent_has_d_fileno=no
4780fi
4781rm -f conftest*
4782fi
4783
4784echo "$ac_t""$bash_cv_dirent_has_d_fileno" 1>&6
4785if test $bash_cv_dirent_has_d_fileno = yes; then
4786cat >> confdefs.h <<\EOF
4787#define STRUCT_DIRENT_HAS_D_FILENO 1
4788EOF
4789
4790fi
4791
4792echo $ac_n "checking for struct winsize in sys/ioctl.h""... $ac_c" 1>&6
e8ce775d 4793echo "configure:4794: checking for struct winsize in sys/ioctl.h" >&5
d166f048
JA
4794if eval "test \"`echo '$''{'bash_cv_struct_winsize_in_ioctl'+set}'`\" = set"; then
4795 echo $ac_n "(cached) $ac_c" 1>&6
4796else
4797 cat > conftest.$ac_ext <<EOF
e8ce775d 4798#line 4799 "configure"
d166f048
JA
4799#include "confdefs.h"
4800#include <sys/types.h>
4801#include <sys/ioctl.h>
4802int main() {
4803struct winsize x;
4804; return 0; }
4805EOF
e8ce775d 4806if { (eval echo configure:4807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d166f048
JA
4807 rm -rf conftest*
4808 bash_cv_struct_winsize_in_ioctl=yes
4809else
4810 echo "configure: failed program was:" >&5
4811 cat conftest.$ac_ext >&5
4812 rm -rf conftest*
4813 bash_cv_struct_winsize_in_ioctl=no
4814fi
4815rm -f conftest*
4816fi
4817
4818echo "$ac_t""$bash_cv_struct_winsize_in_ioctl" 1>&6
4819if test $bash_cv_struct_winsize_in_ioctl = yes; then
4820cat >> confdefs.h <<\EOF
4821#define STRUCT_WINSIZE_IN_SYS_IOCTL 1
4822EOF
4823
4824fi
4825
4826
ccc6cda3 4827echo $ac_n "checking for the existance of strsignal""... $ac_c" 1>&6
e8ce775d 4828echo "configure:4829: checking for the existance of strsignal" >&5
ccc6cda3
JA
4829if eval "test \"`echo '$''{'bash_cv_have_strsignal'+set}'`\" = set"; then
4830 echo $ac_n "(cached) $ac_c" 1>&6
4831else
4832 cat > conftest.$ac_ext <<EOF
e8ce775d 4833#line 4834 "configure"
ccc6cda3
JA
4834#include "confdefs.h"
4835#include <sys/types.h>
4836#include <signal.h>
4837int main() {
4838char *s = (char *)strsignal(2);
4839; return 0; }
4840EOF
e8ce775d 4841if { (eval echo configure:4842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ccc6cda3
JA
4842 rm -rf conftest*
4843 bash_cv_have_strsignal=yes
4844else
4845 echo "configure: failed program was:" >&5
4846 cat conftest.$ac_ext >&5
4847 rm -rf conftest*
4848 bash_cv_have_strsignal=no
4849fi
4850rm -f conftest*
4851fi
4852
4853echo "$ac_t""$bash_cv_have_strsignal" 1>&6
4854if test $bash_cv_have_strsignal = yes; then
4855cat >> confdefs.h <<\EOF
4856#define HAVE_STRSIGNAL 1
4857EOF
4858
4859fi
4860
4861echo $ac_n "checking if opendir() opens non-directories""... $ac_c" 1>&6
e8ce775d 4862echo "configure:4863: checking if opendir() opens non-directories" >&5
ccc6cda3
JA
4863if eval "test \"`echo '$''{'bash_cv_opendir_not_robust'+set}'`\" = set"; then
4864 echo $ac_n "(cached) $ac_c" 1>&6
4865else
4866 if test "$cross_compiling" = yes; then
4867 { echo "configure: error: cannot check opendir if cross compiling" 1>&2; exit 1; }
4868else
4869 cat > conftest.$ac_ext <<EOF
e8ce775d 4870#line 4871 "configure"
ccc6cda3
JA
4871#include "confdefs.h"
4872
4873#include <stdio.h>
4874#include <sys/types.h>
4875#include <fcntl.h>
4876#ifdef HAVE_UNISTD_H
4877# include <unistd.h>
4878#endif /* HAVE_UNISTD_H */
4879#if defined(HAVE_DIRENT_H)
4880# include <dirent.h>
4881#else
4882# define dirent direct
4883# ifdef HAVE_SYS_NDIR_H
4884# include <sys/ndir.h>
4885# endif /* SYSNDIR */
4886# ifdef HAVE_SYS_DIR_H
4887# include <sys/dir.h>
4888# endif /* SYSDIR */
4889# ifdef HAVE_NDIR_H
4890# include <ndir.h>
4891# endif
4892#endif /* HAVE_DIRENT_H */
4893main()
4894{
4895DIR *dir;
4896int fd;
4897unlink("/tmp/not_a_directory");
4898fd = open("/tmp/not_a_directory", O_WRONLY|O_CREAT, 0666);
4899write(fd, "\n", 1);
4900close(fd);
4901dir = opendir("/tmp/not_a_directory");
4902unlink("/tmp/not_a_directory");
4903exit (dir == 0);
4904}
4905EOF
e8ce775d 4906if { (eval echo configure:4907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
4907then
4908 bash_cv_opendir_not_robust=yes
4909else
4910 echo "configure: failed program was:" >&5
4911 cat conftest.$ac_ext >&5
4912 rm -fr conftest*
4913 bash_cv_opendir_not_robust=no
4914fi
4915rm -fr conftest*
4916fi
4917
4918fi
4919
4920echo "$ac_t""$bash_cv_opendir_not_robust" 1>&6
4921if test $bash_cv_opendir_not_robust = yes; then
4922cat >> confdefs.h <<\EOF
4923#define OPENDIR_NOT_ROBUST 1
4924EOF
4925
4926fi
4927
4928echo $ac_n "checking for declaration of printf in <stdio.h>""... $ac_c" 1>&6
e8ce775d 4929echo "configure:4930: checking for declaration of printf in <stdio.h>" >&5
ccc6cda3
JA
4930if eval "test \"`echo '$''{'bash_cv_printf_declared'+set}'`\" = set"; then
4931 echo $ac_n "(cached) $ac_c" 1>&6
4932else
4933 if test "$cross_compiling" = yes; then
4934 { echo "configure: error: cannot check printf declaration if cross compiling" 1>&2; exit 1; }
4935else
4936 cat > conftest.$ac_ext <<EOF
e8ce775d 4937#line 4938 "configure"
ccc6cda3
JA
4938#include "confdefs.h"
4939
4940#include <stdio.h>
4941#ifdef __STDC__
4942typedef int (*_bashfunc)(const char *, ...);
4943#else
4944typedef int (*_bashfunc)();
4945#endif
4946main()
4947{
4948_bashfunc pf;
e8ce775d 4949pf = (_bashfunc) printf;
ccc6cda3
JA
4950exit(pf == 0);
4951}
4952
4953EOF
e8ce775d 4954if { (eval echo configure:4955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
4955then
4956 bash_cv_printf_declared=yes
4957else
4958 echo "configure: failed program was:" >&5
4959 cat conftest.$ac_ext >&5
4960 rm -fr conftest*
4961 bash_cv_printf_declared=no
4962fi
4963rm -fr conftest*
4964fi
4965
4966fi
4967
4968echo "$ac_t""$bash_cv_printf_declared" 1>&6
4969if test $bash_cv_printf_declared = yes; then
4970cat >> confdefs.h <<\EOF
4971#define PRINTF_DECLARED 1
4972EOF
4973
4974fi
4975
4976echo $ac_n "checking whether ulimit can substitute for getdtablesize""... $ac_c" 1>&6
e8ce775d 4977echo "configure:4978: checking whether ulimit can substitute for getdtablesize" >&5
ccc6cda3
JA
4978if eval "test \"`echo '$''{'bash_cv_ulimit_maxfds'+set}'`\" = set"; then
4979 echo $ac_n "(cached) $ac_c" 1>&6
4980else
4981 if test "$cross_compiling" = yes; then
4982 { echo "configure: error: cannot check ulimit if cross compiling" 1>&2; exit 1; }
4983else
4984 cat > conftest.$ac_ext <<EOF
e8ce775d 4985#line 4986 "configure"
ccc6cda3
JA
4986#include "confdefs.h"
4987
4988main()
4989{
4990long maxfds = ulimit(4, 0L);
4991exit (maxfds == -1L);
4992}
4993
4994EOF
e8ce775d 4995if { (eval echo configure:4996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
4996then
4997 bash_cv_ulimit_maxfds=yes
4998else
4999 echo "configure: failed program was:" >&5
5000 cat conftest.$ac_ext >&5
5001 rm -fr conftest*
5002 bash_cv_ulimit_maxfds=no
5003fi
5004rm -fr conftest*
5005fi
5006
5007fi
5008
5009echo "$ac_t""$bash_cv_ulimit_maxfds" 1>&6
5010if test $bash_cv_ulimit_maxfds = yes; then
5011cat >> confdefs.h <<\EOF
5012#define ULIMIT_MAXFDS 1
5013EOF
5014
5015fi
5016
5017echo $ac_n "checking to see if getenv can be redefined""... $ac_c" 1>&6
e8ce775d 5018echo "configure:5019: checking to see if getenv can be redefined" >&5
ccc6cda3
JA
5019if eval "test \"`echo '$''{'bash_cv_getenv_redef'+set}'`\" = set"; then
5020 echo $ac_n "(cached) $ac_c" 1>&6
5021else
5022 if test "$cross_compiling" = yes; then
5023 { echo "configure: error: cannot check getenv redefinition if cross compiling" 1>&2; exit 1; }
5024else
5025 cat > conftest.$ac_ext <<EOF
e8ce775d 5026#line 5027 "configure"
ccc6cda3
JA
5027#include "confdefs.h"
5028
5029#ifdef HAVE_UNISTD_H
5030# include <unistd.h>
5031#endif
5032#ifndef __STDC__
5033# ifndef const
5034# define const
5035# endif
5036#endif
5037char *
5038getenv (name)
5039#if defined (__linux__) || defined (__bsdi__) || defined (convex)
5040 const char *name;
5041#else
5042 char const *name;
5043#endif /* !__linux__ && !__bsdi__ && !convex */
5044{
5045return "42";
5046}
5047main()
5048{
5049char *s;
5050/* The next allows this program to run, but does not allow bash to link
5051 when it redefines getenv. I'm not really interested in figuring out
5052 why not. */
5053#if defined (NeXT)
5054exit(1);
5055#endif
5056s = getenv("ABCDE");
5057exit(s == 0); /* force optimizer to leave getenv in */
5058}
5059
5060EOF
e8ce775d 5061if { (eval echo configure:5062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
5062then
5063 bash_cv_getenv_redef=yes
5064else
5065 echo "configure: failed program was:" >&5
5066 cat conftest.$ac_ext >&5
5067 rm -fr conftest*
5068 bash_cv_getenv_redef=no
5069fi
5070rm -fr conftest*
5071fi
5072
5073fi
5074
5075echo "$ac_t""$bash_cv_getenv_redef" 1>&6
5076if test $bash_cv_getenv_redef = yes; then
5077cat >> confdefs.h <<\EOF
5078#define CAN_REDEFINE_GETENV 1
5079EOF
5080
5081fi
5082
5083echo $ac_n "checking if getcwd() calls popen()""... $ac_c" 1>&6
e8ce775d 5084echo "configure:5085: checking if getcwd() calls popen()" >&5
ccc6cda3
JA
5085if eval "test \"`echo '$''{'bash_cv_getcwd_calls_popen'+set}'`\" = set"; then
5086 echo $ac_n "(cached) $ac_c" 1>&6
5087else
5088 if test "$cross_compiling" = yes; then
5089 { echo "configure: error: cannot check whether getcwd calls popen if cross compiling" 1>&2; exit 1; }
5090else
5091 cat > conftest.$ac_ext <<EOF
e8ce775d 5092#line 5093 "configure"
ccc6cda3
JA
5093#include "confdefs.h"
5094
5095#include <stdio.h>
5096#ifdef HAVE_UNISTD_H
5097#include <unistd.h>
5098#endif
5099
5100#ifndef __STDC__
5101#ifndef const
5102#define const
5103#endif
5104#endif
5105
5106int popen_called;
5107
5108FILE *
5109popen(command, type)
5110 const char *command;
5111 const char *type;
5112{
5113 popen_called = 1;
5114 return (FILE *)NULL;
5115}
5116
5117FILE *_popen(command, type)
5118 const char *command;
5119 const char *type;
5120{
5121 return (popen (command, type));
5122}
5123
5124int
5125pclose(stream)
5126FILE *stream;
5127{
5128 return 0;
5129}
5130
5131int
5132_pclose(stream)
5133FILE *stream;
5134{
5135 return 0;
5136}
5137
5138main()
5139{
5140 char lbuf[32];
5141 popen_called = 0;
5142 getcwd(lbuf, 32);
5143 exit (popen_called);
5144}
5145
5146EOF
e8ce775d 5147if { (eval echo configure:5148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
5148then
5149 bash_cv_getcwd_calls_popen=no
5150else
5151 echo "configure: failed program was:" >&5
5152 cat conftest.$ac_ext >&5
5153 rm -fr conftest*
5154 bash_cv_getcwd_calls_popen=yes
5155fi
5156rm -fr conftest*
5157fi
5158
5159fi
5160
5161echo "$ac_t""$bash_cv_getcwd_calls_popen" 1>&6
5162if test $bash_cv_getcwd_calls_popen = yes; then
5163cat >> confdefs.h <<\EOF
5164#define GETCWD_BROKEN 1
5165EOF
5166
5167fi
5168
5169echo $ac_n "checking for declaration of sbrk in <unistd.h>""... $ac_c" 1>&6
e8ce775d 5170echo "configure:5171: checking for declaration of sbrk in <unistd.h>" >&5
ccc6cda3
JA
5171if eval "test \"`echo '$''{'bash_cv_sbrk_declared'+set}'`\" = set"; then
5172 echo $ac_n "(cached) $ac_c" 1>&6
5173else
5174 cat > conftest.$ac_ext <<EOF
e8ce775d 5175#line 5176 "configure"
ccc6cda3
JA
5176#include "confdefs.h"
5177#include <unistd.h>
5178EOF
5179if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5180 egrep "sbrk" >/dev/null 2>&1; then
5181 rm -rf conftest*
5182 bash_cv_sbrk_declared=yes
5183else
5184 rm -rf conftest*
5185 bash_cv_sbrk_declared=no
5186fi
5187rm -f conftest*
5188
5189fi
5190
5191echo "$ac_t""$bash_cv_sbrk_declared" 1>&6
5192if test $bash_cv_sbrk_declared = yes; then
5193cat >> confdefs.h <<\EOF
5194#define SBRK_DECLARED 1
5195EOF
5196
5197fi
5198
5199
5200echo $ac_n "checking for presence of POSIX-style sigsetjmp/siglongjmp""... $ac_c" 1>&6
e8ce775d 5201echo "configure:5202: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5
ccc6cda3
JA
5202if eval "test \"`echo '$''{'bash_cv_func_sigsetjmp'+set}'`\" = set"; then
5203 echo $ac_n "(cached) $ac_c" 1>&6
5204else
5205 if test "$cross_compiling" = yes; then
5206 { echo "configure: error: cannot check for sigsetjmp/siglongjmp if cross-compiling" 1>&2; exit 1; }
5207else
5208 cat > conftest.$ac_ext <<EOF
e8ce775d 5209#line 5210 "configure"
ccc6cda3
JA
5210#include "confdefs.h"
5211
5212#ifdef HAVE_UNISTD_H
5213#include <unistd.h>
5214#endif
5215#include <sys/types.h>
5216#include <signal.h>
5217#include <setjmp.h>
5218
5219main()
5220{
5221#if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS)
5222exit (1);
5223#else
5224
5225int code;
5226sigset_t set, oset;
5227sigjmp_buf xx;
5228
5229/* get the mask */
5230sigemptyset(&set);
5231sigemptyset(&oset);
5232sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &set);
5233sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset);
5234
5235/* save it */
5236code = sigsetjmp(xx, 1);
5237if (code)
5238 exit(0); /* could get sigmask and compare to oset here. */
5239
5240/* change it */
5241sigaddset(&set, SIGINT);
5242sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL);
5243
5244/* and siglongjmp */
5245siglongjmp(xx, 10);
5246exit(1);
5247#endif
5248}
5249EOF
e8ce775d 5250if { (eval echo configure:5251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
5251then
5252 bash_cv_func_sigsetjmp=present
5253else
5254 echo "configure: failed program was:" >&5
5255 cat conftest.$ac_ext >&5
5256 rm -fr conftest*
5257 bash_cv_func_sigsetjmp=missing
5258fi
5259rm -fr conftest*
5260fi
5261
5262
5263fi
5264
5265echo "$ac_t""$bash_cv_func_sigsetjmp" 1>&6
5266if test $bash_cv_func_sigsetjmp = present; then
5267cat >> confdefs.h <<\EOF
5268#define HAVE_POSIX_SIGSETJMP 1
5269EOF
5270
5271fi
5272
5273
d166f048 5274echo $ac_n "checking whether or not strcoll and strcmp differ""... $ac_c" 1>&6
e8ce775d 5275echo "configure:5276: checking whether or not strcoll and strcmp differ" >&5
d166f048
JA
5276if eval "test \"`echo '$''{'bash_cv_func_strcoll_broken'+set}'`\" = set"; then
5277 echo $ac_n "(cached) $ac_c" 1>&6
5278else
5279 if test "$cross_compiling" = yes; then
5280 { echo "configure: error: cannot check strcoll if cross compiling" 1>&2; exit 1; }
5281else
5282 cat > conftest.$ac_ext <<EOF
e8ce775d 5283#line 5284 "configure"
d166f048
JA
5284#include "confdefs.h"
5285
5286#include <stdio.h>
5287#if defined (HAVE_LOCALE_H)
5288#include <locale.h>
5289#endif
5290
5291main(c, v)
5292int c;
5293char *v[];
5294{
5295 int r1, r2;
5296 char *deflocale, *defcoll;
5297
5298#ifdef HAVE_SETLOCALE
5299 deflocale = setlocale(LC_ALL, "");
5300 defcoll = setlocale(LC_COLLATE, "");
5301#endif
5302
5303#ifdef HAVE_STRCOLL
5304 /* These two values are taken from tests/glob-test. */
5305 r1 = strcoll("abd", "aXd");
5306#else
5307 r1 = 0;
5308#endif
5309 r2 = strcmp("abd", "aXd");
5310
5311 /* These two should both be greater than 0. It is permissible for
5312 a system to return different values, as long as the sign is the
5313 same. */
5314
5315 /* Exit with 1 (failure) if these two values are both > 0, since
5316 this tests whether strcoll(3) is broken with respect to strcmp(3)
5317 in the default locale. */
5318 exit (r1 > 0 && r2 > 0);
5319}
5320
5321EOF
e8ce775d 5322if { (eval echo configure:5323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
d166f048
JA
5323then
5324 bash_cv_func_strcoll_broken=yes
5325else
5326 echo "configure: failed program was:" >&5
5327 cat conftest.$ac_ext >&5
5328 rm -fr conftest*
5329 bash_cv_func_strcoll_broken=no
5330fi
5331rm -fr conftest*
5332fi
5333
5334
5335fi
5336
5337echo "$ac_t""$bash_cv_func_strcoll_broken" 1>&6
5338if test $bash_cv_func_strcoll_broken = yes; then
5339cat >> confdefs.h <<\EOF
5340#define STRCOLL_BROKEN 1
5341EOF
5342
5343fi
5344
5345
5346
ccc6cda3
JA
5347
5348echo $ac_n "checking if signal handlers must be reinstalled when invoked""... $ac_c" 1>&6
e8ce775d 5349echo "configure:5350: checking if signal handlers must be reinstalled when invoked" >&5
ccc6cda3
JA
5350if eval "test \"`echo '$''{'bash_cv_must_reinstall_sighandlers'+set}'`\" = set"; then
5351 echo $ac_n "(cached) $ac_c" 1>&6
5352else
5353 if test "$cross_compiling" = yes; then
5354 { echo "configure: error: cannot check signal handling if cross compiling" 1>&2; exit 1; }
5355else
5356 cat > conftest.$ac_ext <<EOF
e8ce775d 5357#line 5358 "configure"
ccc6cda3
JA
5358#include "confdefs.h"
5359
5360#include <signal.h>
5361#ifdef HAVE_UNISTD_H
5362#include <unistd.h>
5363#endif
5364
5365typedef RETSIGTYPE sigfunc();
5366
5367int nsigint;
5368
5369#ifdef HAVE_POSIX_SIGNALS
5370sigfunc *
5371set_signal_handler(sig, handler)
5372 int sig;
5373 sigfunc *handler;
5374{
5375 struct sigaction act, oact;
5376 act.sa_handler = handler;
5377 act.sa_flags = 0;
5378 sigemptyset (&act.sa_mask);
5379 sigemptyset (&oact.sa_mask);
5380 sigaction (sig, &act, &oact);
5381 return (oact.sa_handler);
5382}
5383#else
5384#define set_signal_handler(s, h) signal(s, h)
5385#endif
5386
5387RETSIGTYPE
5388sigint(s)
5389int s;
5390{
5391 nsigint++;
5392}
5393
5394main()
5395{
5396 nsigint = 0;
5397 set_signal_handler(SIGINT, sigint);
5398 kill((int)getpid(), SIGINT);
5399 kill((int)getpid(), SIGINT);
5400 exit(nsigint != 2);
5401}
5402
5403EOF
e8ce775d 5404if { (eval echo configure:5405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
5405then
5406 bash_cv_must_reinstall_sighandlers=no
5407else
5408 echo "configure: failed program was:" >&5
5409 cat conftest.$ac_ext >&5
5410 rm -fr conftest*
5411 bash_cv_must_reinstall_sighandlers=yes
5412fi
5413rm -fr conftest*
5414fi
5415
5416fi
5417
5418echo "$ac_t""$bash_cv_must_reinstall_sighandlers" 1>&6
5419if test $bash_cv_must_reinstall_sighandlers = yes; then
5420cat >> confdefs.h <<\EOF
5421#define MUST_REINSTALL_SIGHANDLERS 1
5422EOF
5423
5424fi
5425
5426
5427echo $ac_n "checking for presence of necessary job control definitions""... $ac_c" 1>&6
e8ce775d 5428echo "configure:5429: checking for presence of necessary job control definitions" >&5
ccc6cda3
JA
5429if eval "test \"`echo '$''{'bash_cv_job_control_missing'+set}'`\" = set"; then
5430 echo $ac_n "(cached) $ac_c" 1>&6
5431else
5432 if test "$cross_compiling" = yes; then
5433 { echo "configure: error: cannot check job control if cross-compiling" 1>&2; exit 1; }
5434else
5435 cat > conftest.$ac_ext <<EOF
e8ce775d 5436#line 5437 "configure"
ccc6cda3
JA
5437#include "confdefs.h"
5438
5439#include <sys/types.h>
5440#ifdef HAVE_SYS_WAIT_H
5441#include <sys/wait.h>
5442#endif
5443#ifdef HAVE_UNISTD_H
5444#include <unistd.h>
5445#endif
5446#include <signal.h>
5447
5448/* Add more tests in here as appropriate. */
5449main()
5450{
5451/* signal type */
5452#if !defined (HAVE_POSIX_SIGNALS) && !defined (HAVE_BSD_SIGNALS)
5453exit(1);
5454#endif
5455
5456/* signals and tty control. */
5457#if !defined (SIGTSTP) || !defined (SIGSTOP) || !defined (SIGCONT)
5458exit (1);
5459#endif
5460
5461/* process control */
5462#if !defined (WNOHANG) || !defined (WUNTRACED)
5463exit(1);
5464#endif
5465
5466/* Posix systems have tcgetpgrp and waitpid. */
5467#if defined (_POSIX_VERSION) && !defined (HAVE_TCGETPGRP)
5468exit(1);
5469#endif
5470
5471#if defined (_POSIX_VERSION) && !defined (HAVE_WAITPID)
5472exit(1);
5473#endif
5474
5475/* Other systems have TIOCSPGRP/TIOCGPRGP and wait3. */
5476#if !defined (_POSIX_VERSION) && !defined (HAVE_WAIT3)
5477exit(1);
5478#endif
5479
5480exit(0);
5481}
5482EOF
e8ce775d 5483if { (eval echo configure:5484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
5484then
5485 bash_cv_job_control_missing=present
5486else
5487 echo "configure: failed program was:" >&5
5488 cat conftest.$ac_ext >&5
5489 rm -fr conftest*
5490 bash_cv_job_control_missing=missing
5491fi
5492rm -fr conftest*
5493fi
5494
5495
5496fi
5497
5498echo "$ac_t""$bash_cv_job_control_missing" 1>&6
5499if test $bash_cv_job_control_missing = missing; then
5500cat >> confdefs.h <<\EOF
5501#define JOB_CONTROL_MISSING 1
5502EOF
5503
5504fi
5505
5506echo $ac_n "checking for presence of named pipes""... $ac_c" 1>&6
e8ce775d 5507echo "configure:5508: checking for presence of named pipes" >&5
ccc6cda3
JA
5508if eval "test \"`echo '$''{'bash_cv_sys_named_pipes'+set}'`\" = set"; then
5509 echo $ac_n "(cached) $ac_c" 1>&6
5510else
5511 if test "$cross_compiling" = yes; then
5512 { echo "configure: error: cannot check for named pipes if cross-compiling" 1>&2; exit 1; }
5513else
5514 cat > conftest.$ac_ext <<EOF
e8ce775d 5515#line 5516 "configure"
ccc6cda3
JA
5516#include "confdefs.h"
5517
5518#include <sys/types.h>
5519#include <sys/stat.h>
5520#ifdef HAVE_UNISTD_H
5521#include <unistd.h>
5522#endif
5523
5524/* Add more tests in here as appropriate. */
5525main()
5526{
5527int fd;
5528
5529#if defined (HAVE_MKFIFO)
5530exit (0);
5531#endif
5532
5533#if !defined (S_IFIFO) && (defined (_POSIX_VERSION) && !defined (S_ISFIFO))
5534exit (1);
5535#endif
5536
5537#if defined (NeXT)
5538exit (1);
5539#endif
5540
5541fd = mknod ("/tmp/sh-np-autoconf", 0666 | S_IFIFO, 0);
5542if (fd == -1)
5543 exit (1);
5544close(fd);
5545unlink ("/tmp/sh-np-autoconf");
5546exit(0);
5547}
5548EOF
e8ce775d 5549if { (eval echo configure:5550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
5550then
5551 bash_cv_sys_named_pipes=present
5552else
5553 echo "configure: failed program was:" >&5
5554 cat conftest.$ac_ext >&5
5555 rm -fr conftest*
5556 bash_cv_sys_named_pipes=missing
5557fi
5558rm -fr conftest*
5559fi
5560
5561
5562fi
5563
5564echo "$ac_t""$bash_cv_sys_named_pipes" 1>&6
5565if test $bash_cv_sys_named_pipes = missing; then
5566cat >> confdefs.h <<\EOF
5567#define NAMED_PIPES_MISSING 1
5568EOF
5569
5570fi
5571
d166f048 5572
ccc6cda3 5573echo $ac_n "checking for TIOCGWINSZ in sys/ioctl.h""... $ac_c" 1>&6
e8ce775d 5574echo "configure:5575: checking for TIOCGWINSZ in sys/ioctl.h" >&5
ccc6cda3
JA
5575if eval "test \"`echo '$''{'bash_cv_tiocgwinsz_in_ioctl'+set}'`\" = set"; then
5576 echo $ac_n "(cached) $ac_c" 1>&6
5577else
5578 cat > conftest.$ac_ext <<EOF
e8ce775d 5579#line 5580 "configure"
ccc6cda3
JA
5580#include "confdefs.h"
5581#include <sys/types.h>
5582#include <sys/ioctl.h>
5583int main() {
5584int x = TIOCGWINSZ;
5585; return 0; }
5586EOF
e8ce775d 5587if { (eval echo configure:5588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ccc6cda3
JA
5588 rm -rf conftest*
5589 bash_cv_tiocgwinsz_in_ioctl=yes
5590else
5591 echo "configure: failed program was:" >&5
5592 cat conftest.$ac_ext >&5
5593 rm -rf conftest*
5594 bash_cv_tiocgwinsz_in_ioctl=no
5595fi
5596rm -f conftest*
5597fi
5598
5599echo "$ac_t""$bash_cv_tiocgwinsz_in_ioctl" 1>&6
5600if test $bash_cv_tiocgwinsz_in_ioctl = yes; then
5601cat >> confdefs.h <<\EOF
5602#define GWINSZ_IN_SYS_IOCTL 1
5603EOF
5604
5605fi
5606
5607echo $ac_n "checking for TIOCSTAT in sys/ioctl.h""... $ac_c" 1>&6
e8ce775d 5608echo "configure:5609: checking for TIOCSTAT in sys/ioctl.h" >&5
ccc6cda3
JA
5609if eval "test \"`echo '$''{'bash_cv_tiocstat_in_ioctl'+set}'`\" = set"; then
5610 echo $ac_n "(cached) $ac_c" 1>&6
5611else
5612 cat > conftest.$ac_ext <<EOF
e8ce775d 5613#line 5614 "configure"
ccc6cda3
JA
5614#include "confdefs.h"
5615#include <sys/types.h>
5616#include <sys/ioctl.h>
5617int main() {
5618int x = TIOCSTAT;
5619; return 0; }
5620EOF
e8ce775d 5621if { (eval echo configure:5622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ccc6cda3
JA
5622 rm -rf conftest*
5623 bash_cv_tiocstat_in_ioctl=yes
5624else
5625 echo "configure: failed program was:" >&5
5626 cat conftest.$ac_ext >&5
5627 rm -rf conftest*
5628 bash_cv_tiocstat_in_ioctl=no
5629fi
5630rm -f conftest*
5631fi
5632
5633echo "$ac_t""$bash_cv_tiocstat_in_ioctl" 1>&6
5634if test $bash_cv_tiocstat_in_ioctl = yes; then
5635cat >> confdefs.h <<\EOF
5636#define TIOCSTAT_IN_SYS_IOCTL 1
5637EOF
5638
5639fi
5640
5641echo $ac_n "checking for FIONREAD in sys/ioctl.h""... $ac_c" 1>&6
e8ce775d 5642echo "configure:5643: checking for FIONREAD in sys/ioctl.h" >&5
ccc6cda3
JA
5643if eval "test \"`echo '$''{'bash_cv_fionread_in_ioctl'+set}'`\" = set"; then
5644 echo $ac_n "(cached) $ac_c" 1>&6
5645else
5646 cat > conftest.$ac_ext <<EOF
e8ce775d 5647#line 5648 "configure"
ccc6cda3
JA
5648#include "confdefs.h"
5649#include <sys/types.h>
5650#include <sys/ioctl.h>
5651int main() {
5652int x = FIONREAD;
5653; return 0; }
5654EOF
e8ce775d 5655if { (eval echo configure:5656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ccc6cda3
JA
5656 rm -rf conftest*
5657 bash_cv_fionread_in_ioctl=yes
5658else
5659 echo "configure: failed program was:" >&5
5660 cat conftest.$ac_ext >&5
5661 rm -rf conftest*
5662 bash_cv_fionread_in_ioctl=no
5663fi
5664rm -f conftest*
5665fi
5666
5667echo "$ac_t""$bash_cv_fionread_in_ioctl" 1>&6
5668if test $bash_cv_fionread_in_ioctl = yes; then
5669cat >> confdefs.h <<\EOF
5670#define FIONREAD_IN_SYS_IOCTL 1
5671EOF
5672
5673fi
5674
d166f048
JA
5675
5676echo $ac_n "checking for speed_t in sys/types.h""... $ac_c" 1>&6
e8ce775d 5677echo "configure:5678: checking for speed_t in sys/types.h" >&5
d166f048
JA
5678if eval "test \"`echo '$''{'bash_cv_speed_t_in_sys_types'+set}'`\" = set"; then
5679 echo $ac_n "(cached) $ac_c" 1>&6
5680else
5681 cat > conftest.$ac_ext <<EOF
e8ce775d 5682#line 5683 "configure"
d166f048
JA
5683#include "confdefs.h"
5684#include <sys/types.h>
5685int main() {
5686speed_t x;
5687; return 0; }
5688EOF
e8ce775d 5689if { (eval echo configure:5690: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d166f048
JA
5690 rm -rf conftest*
5691 bash_cv_speed_t_in_sys_types=yes
5692else
5693 echo "configure: failed program was:" >&5
5694 cat conftest.$ac_ext >&5
5695 rm -rf conftest*
5696 bash_cv_speed_t_in_sys_types=no
5697fi
5698rm -f conftest*
5699fi
5700
5701echo "$ac_t""$bash_cv_speed_t_in_sys_types" 1>&6
5702if test $bash_cv_speed_t_in_sys_types = yes; then
5703cat >> confdefs.h <<\EOF
5704#define SPEED_T_IN_SYS_TYPES 1
5705EOF
5706
5707fi
5708
ccc6cda3 5709echo $ac_n "checking whether programs are able to redeclare getpw functions""... $ac_c" 1>&6
e8ce775d 5710echo "configure:5711: checking whether programs are able to redeclare getpw functions" >&5
ccc6cda3
JA
5711if eval "test \"`echo '$''{'bash_cv_can_redecl_getpw'+set}'`\" = set"; then
5712 echo $ac_n "(cached) $ac_c" 1>&6
5713else
5714 cat > conftest.$ac_ext <<EOF
e8ce775d 5715#line 5716 "configure"
ccc6cda3
JA
5716#include "confdefs.h"
5717#include <sys/types.h>
5718#include <pwd.h>
5719extern struct passwd *getpwent();
e8ce775d
JA
5720extern struct passwd *getpwuid();
5721extern struct passwd *getpwnam();
ccc6cda3 5722int main() {
e8ce775d 5723struct passwd *z; z = getpwent(); z = getpwuid(0); z = getpwnam("root");
ccc6cda3
JA
5724; return 0; }
5725EOF
e8ce775d 5726if { (eval echo configure:5727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ccc6cda3
JA
5727 rm -rf conftest*
5728 bash_cv_can_redecl_getpw=yes
5729else
5730 echo "configure: failed program was:" >&5
5731 cat conftest.$ac_ext >&5
5732 rm -rf conftest*
5733 bash_cv_can_redecl_getpw=no
5734fi
5735rm -f conftest*
5736fi
5737
5738echo "$ac_t""$bash_cv_can_redecl_getpw" 1>&6
5739if test $bash_cv_can_redecl_getpw = no; then
5740cat >> confdefs.h <<\EOF
5741#define HAVE_GETPW_DECLS 1
5742EOF
5743
5744fi
5745
ccc6cda3
JA
5746
5747case "$host_os" in
5748hpux*) echo $ac_n "checking whether $host_os needs _KERNEL for RLIMIT defines""... $ac_c" 1>&6
e8ce775d 5749echo "configure:5750: checking whether $host_os needs _KERNEL for RLIMIT defines" >&5
ccc6cda3
JA
5750if eval "test \"`echo '$''{'bash_cv_kernel_rlimit'+set}'`\" = set"; then
5751 echo $ac_n "(cached) $ac_c" 1>&6
5752else
5753 cat > conftest.$ac_ext <<EOF
e8ce775d 5754#line 5755 "configure"
ccc6cda3
JA
5755#include "confdefs.h"
5756
5757#include <sys/types.h>
5758#include <sys/resource.h>
5759
5760int main() {
5761
5762 int f;
5763 f = RLIMIT_DATA;
5764
5765; return 0; }
5766EOF
e8ce775d 5767if { (eval echo configure:5768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ccc6cda3
JA
5768 rm -rf conftest*
5769 bash_cv_kernel_rlimit=no
5770else
5771 echo "configure: failed program was:" >&5
5772 cat conftest.$ac_ext >&5
5773 rm -rf conftest*
5774 cat > conftest.$ac_ext <<EOF
e8ce775d 5775#line 5776 "configure"
ccc6cda3
JA
5776#include "confdefs.h"
5777
5778 #include <sys/types.h>
5779 #define _KERNEL
5780 #include <sys/resource.h>
5781 #undef _KERNEL
5782
5783int main() {
5784
5785 int f;
5786 f = RLIMIT_DATA;
5787
5788; return 0; }
5789EOF
e8ce775d 5790if { (eval echo configure:5791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ccc6cda3
JA
5791 rm -rf conftest*
5792 bash_cv_kernel_rlimit=yes
5793else
5794 echo "configure: failed program was:" >&5
5795 cat conftest.$ac_ext >&5
5796 rm -rf conftest*
5797 bash_cv_kernel_rlimit=no
5798fi
5799rm -f conftest*
5800
5801fi
5802rm -f conftest*
5803fi
5804
5805echo "$ac_t""$bash_cv_kernel_rlimit" 1>&6
5806if test $bash_cv_kernel_rlimit = yes; then
5807cat >> confdefs.h <<\EOF
5808#define RLIMIT_NEEDS_KERNEL 1
5809EOF
5810
5811fi
5812 ;;
5813esac
5814
5815if test "$opt_readline" = yes; then
d166f048
JA
5816case "$host_os" in
5817aix*) prefer_curses=yes ;;
5818esac
ccc6cda3
JA
5819
5820if test "X$bash_cv_termcap_lib" = "X"; then
5821_bash_needmsg=yes
5822else
5823echo $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6
e8ce775d 5824echo "configure:5825: checking which library has the termcap functions" >&5
ccc6cda3
JA
5825_bash_needmsg=
5826fi
5827if eval "test \"`echo '$''{'bash_cv_termcap_lib'+set}'`\" = set"; then
5828 echo $ac_n "(cached) $ac_c" 1>&6
5829else
5830 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
e8ce775d 5831echo "configure:5832: checking for tgetent in -ltermcap" >&5
ccc6cda3
JA
5832ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
5833if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5834 echo $ac_n "(cached) $ac_c" 1>&6
5835else
5836 ac_save_LIBS="$LIBS"
5837LIBS="-ltermcap $LIBS"
5838cat > conftest.$ac_ext <<EOF
e8ce775d 5839#line 5840 "configure"
ccc6cda3
JA
5840#include "confdefs.h"
5841/* Override any gcc2 internal prototype to avoid an error. */
5842/* We use char because int might match the return type of a gcc2
5843 builtin and then its argument prototype would still apply. */
5844char tgetent();
5845
5846int main() {
5847tgetent()
5848; return 0; }
5849EOF
e8ce775d 5850if { (eval echo configure:5851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ccc6cda3
JA
5851 rm -rf conftest*
5852 eval "ac_cv_lib_$ac_lib_var=yes"
5853else
5854 echo "configure: failed program was:" >&5
5855 cat conftest.$ac_ext >&5
5856 rm -rf conftest*
5857 eval "ac_cv_lib_$ac_lib_var=no"
5858fi
5859rm -f conftest*
5860LIBS="$ac_save_LIBS"
5861
5862fi
5863if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5864 echo "$ac_t""yes" 1>&6
5865 bash_cv_termcap_lib=libtermcap
5866else
5867 echo "$ac_t""no" 1>&6
5868echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
e8ce775d 5869echo "configure:5870: checking for tgetent in -lcurses" >&5
ccc6cda3
JA
5870ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
5871if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5872 echo $ac_n "(cached) $ac_c" 1>&6
5873else
5874 ac_save_LIBS="$LIBS"
5875LIBS="-lcurses $LIBS"
5876cat > conftest.$ac_ext <<EOF
e8ce775d 5877#line 5878 "configure"
ccc6cda3
JA
5878#include "confdefs.h"
5879/* Override any gcc2 internal prototype to avoid an error. */
5880/* We use char because int might match the return type of a gcc2
5881 builtin and then its argument prototype would still apply. */
5882char tgetent();
5883
5884int main() {
5885tgetent()
5886; return 0; }
5887EOF
e8ce775d 5888if { (eval echo configure:5889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ccc6cda3
JA
5889 rm -rf conftest*
5890 eval "ac_cv_lib_$ac_lib_var=yes"
5891else
5892 echo "configure: failed program was:" >&5
5893 cat conftest.$ac_ext >&5
5894 rm -rf conftest*
5895 eval "ac_cv_lib_$ac_lib_var=no"
5896fi
5897rm -f conftest*
5898LIBS="$ac_save_LIBS"
5899
5900fi
5901if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5902 echo "$ac_t""yes" 1>&6
5903 bash_cv_termcap_lib=libcurses
5904else
5905 echo "$ac_t""no" 1>&6
5906echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
e8ce775d 5907echo "configure:5908: checking for tgetent in -lncurses" >&5
ccc6cda3
JA
5908ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
5909if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5910 echo $ac_n "(cached) $ac_c" 1>&6
5911else
5912 ac_save_LIBS="$LIBS"
5913LIBS="-lncurses $LIBS"
5914cat > conftest.$ac_ext <<EOF
e8ce775d 5915#line 5916 "configure"
ccc6cda3
JA
5916#include "confdefs.h"
5917/* Override any gcc2 internal prototype to avoid an error. */
5918/* We use char because int might match the return type of a gcc2
5919 builtin and then its argument prototype would still apply. */
5920char tgetent();
5921
5922int main() {
5923tgetent()
5924; return 0; }
5925EOF
e8ce775d 5926if { (eval echo configure:5927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ccc6cda3
JA
5927 rm -rf conftest*
5928 eval "ac_cv_lib_$ac_lib_var=yes"
5929else
5930 echo "configure: failed program was:" >&5
5931 cat conftest.$ac_ext >&5
5932 rm -rf conftest*
5933 eval "ac_cv_lib_$ac_lib_var=no"
5934fi
5935rm -f conftest*
5936LIBS="$ac_save_LIBS"
5937
5938fi
5939if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5940 echo "$ac_t""yes" 1>&6
5941 bash_cv_termcap_lib=libncurses
5942else
5943 echo "$ac_t""no" 1>&6
5944bash_cv_termcap_lib=gnutermcap
5945fi
5946
5947fi
5948
5949fi
5950
5951fi
5952
5953if test "X$_bash_needmsg" = "Xyes"; then
5954echo $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6
e8ce775d 5955echo "configure:5956: checking which library has the termcap functions" >&5
ccc6cda3
JA
5956fi
5957echo "$ac_t""using $bash_cv_termcap_lib" 1>&6
5958if test $bash_cv_termcap_lib = gnutermcap; then
5959LDFLAGS="$LDFLAGS -L./lib/termcap"
5960TERMCAP_LIB="./lib/termcap/libtermcap.a"
5961TERMCAP_DEP="./lib/termcap/libtermcap.a"
d166f048 5962elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
ccc6cda3
JA
5963TERMCAP_LIB=-ltermcap
5964TERMCAP_DEP=
5965elif test $bash_cv_termcap_lib = libncurses; then
5966TERMCAP_LIB=-lncurses
5967TERMCAP_DEP=
5968else
5969TERMCAP_LIB=-lcurses
5970TERMCAP_DEP=
5971fi
5972
5973fi
5974
5975
5976
d166f048 5977echo $ac_n "checking whether /dev/fd is available""... $ac_c" 1>&6
e8ce775d 5978echo "configure:5979: checking whether /dev/fd is available" >&5
d166f048
JA
5979if eval "test \"`echo '$''{'bash_cv_dev_fd'+set}'`\" = set"; then
5980 echo $ac_n "(cached) $ac_c" 1>&6
5981else
5982 if test -d /dev/fd && test -r /dev/fd/0; then
5983 bash_cv_dev_fd=standard
5984 elif test -d /proc/self/fd && test -r /proc/self/fd/0; then
5985 bash_cv_dev_fd=whacky
5986 else
5987 bash_cv_dev_fd=absent
5988 fi
5989
5990fi
5991
5992echo "$ac_t""$bash_cv_dev_fd" 1>&6
5993if test $bash_cv_dev_fd = "standard"; then
5994 cat >> confdefs.h <<\EOF
5995#define HAVE_DEV_FD 1
5996EOF
5997
5998 cat >> confdefs.h <<\EOF
5999#define DEV_FD_PREFIX "/dev/fd/"
6000EOF
6001
6002elif test $bash_cv_dev_fd = "whacky"; then
6003 cat >> confdefs.h <<\EOF
6004#define HAVE_DEV_FD 1
6005EOF
6006
6007 cat >> confdefs.h <<\EOF
6008#define DEV_FD_PREFIX "/proc/self/fd/"
6009EOF
6010
6011fi
6012
ccc6cda3 6013echo $ac_n "checking for default mail directory""... $ac_c" 1>&6
e8ce775d 6014echo "configure:6015: checking for default mail directory" >&5
ccc6cda3
JA
6015if eval "test \"`echo '$''{'bash_cv_mail_dir'+set}'`\" = set"; then
6016 echo $ac_n "(cached) $ac_c" 1>&6
6017else
6018 if test -d /var/mail; then
6019 bash_cv_mail_dir=/var/mail
6020 elif test -d /usr/mail; then
6021 bash_cv_mail_dir=/usr/mail
ccc6cda3
JA
6022 elif test -d /var/spool/mail; then
6023 bash_cv_mail_dir=/var/spool/mail
e8ce775d
JA
6024 elif test -d /usr/spool/mail; then
6025 bash_cv_mail_dir=/usr/spool/mail
ccc6cda3
JA
6026 else
6027 bash_cv_mail_dir=unknown
6028 fi
6029
6030fi
6031
6032echo "$ac_t""$bash_cv_mail_dir" 1>&6
6033if test $bash_cv_mail_dir = "/var/mail"; then
6034 cat >> confdefs.h <<\EOF
6035#define DEFAULT_MAIL_DIRECTORY "/var/mail"
6036EOF
6037
6038elif test $bash_cv_mail_dir = "/usr/mail"; then
6039 cat >> confdefs.h <<\EOF
6040#define DEFAULT_MAIL_DIRECTORY "/usr/mail"
6041EOF
6042
6043elif test $bash_cv_mail_dir = "/var/spool/mail"; then
6044 cat >> confdefs.h <<\EOF
6045#define DEFAULT_MAIL_DIRECTORY "/var/spool/mail"
6046EOF
6047
6048elif test $bash_cv_mail_dir = "/usr/spool/mail"; then
6049 cat >> confdefs.h <<\EOF
6050#define DEFAULT_MAIL_DIRECTORY "/usr/spool/mail"
6051EOF
6052
6053else
6054 cat >> confdefs.h <<\EOF
6055#define DEFAULT_MAIL_DIRECTORY "unknown"
6056EOF
6057
6058fi
6059
6060
6061if test "$bash_cv_job_control_missing" = missing; then
6062 opt_job_control=no
6063fi
6064
6065if test "$opt_job_control" = yes; then
6066cat >> confdefs.h <<\EOF
6067#define JOB_CONTROL 1
6068EOF
6069
6070JOBS_O=jobs.o
6071else
6072JOBS_O=nojobs.o
6073fi
6074
6075
6076
6077
d166f048
JA
6078LOCAL_DEFS=-DSHELL
6079
6080
ccc6cda3 6081case "$host_os" in
e8ce775d 6082sysv4.2*) cat >> confdefs.h <<\EOF
ccc6cda3
JA
6083#define SVR4_2 1
6084EOF
6085
6086 cat >> confdefs.h <<\EOF
6087#define SVR4 1
6088EOF
6089 ;;
6090sysv4*) cat >> confdefs.h <<\EOF
6091#define SVR4 1
6092EOF
6093 ;;
6094hpux*) LOCAL_CFLAGS=-DHPUX ;;
6095dgux*) LOCAL_CFLAGS=-D_DGUX_SOURCE; LOCAL_LIBS=-ldgc ;;
6096isc*) LOCAL_CFLAGS=-Disc386;;
6097sco3.2v5*) LOCAL_CFLAGS="-DWAITPID_BROKEN -DNO_MEMSCRAMBLE -DPATH_MAX=1024" ;;
6098sco3.2v4*) LOCAL_CFLAGS="-DMUST_UNBLOCK_CHLD -DNO_MEMSCRAMBLE -DPATH_MAX=1024" ;;
6099sco3.2*) LOCAL_CFLAGS=-DMUST_UNBLOCK_CHLD ;;
d166f048
JA
6100sunos4*) LOCAL_CFLAGS=-DSunOS4 ;;
6101solaris2.5*) LOCAL_CFLAGS=-DSunOS5 ;;
6102linux*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading
6103aix4.2*) LOCAL_LDFLAGS="-bexpall -brtl" ;;# allow dynamic loading
6104*qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s -lunix -lncurses" ;;
6105powerux) LOCAL_LIBS="-lgen" ;;
ccc6cda3
JA
6106esac
6107
6108case "$host_cpu" in
6109*cray*) LOCAL_CFLAGS="-DCRAY" ;; # shell var so config.h can use it
6110esac
6111
6112case "$host_cpu-$host_os" in
6113ibmrt-*bsd4*) LOCAL_CFLAGS="-ma -U__STDC__" ;;
6114esac
6115
6116case "$host_cpu-$host_vendor-$host_os" in
6117m88k-motorola-sysv3) LOCAL_CFLAGS=-DWAITPID_BROKEN ;;
6118mips-pyramid-sysv4) LOCAL_CFLAGS=-Xa ;;
6119esac
6120
6121# try to create a directory tree if the source is elsewhere
6122# this should be packaged into a script accessible via ${srcdir}/support
6123case "$srcdir" in
6124.) ;;
6125*) for d in doc tests support lib ; do # dirs
6126 test -d $d || mkdir $d
6127 done
6128 for ld in readline glob tilde malloc termcap; do # libdirs
6129 test -d lib/$ld || mkdir lib/$ld
6130 done
6131 ;;
6132esac
6133
6134BUILD_DIR=`pwd`
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
d166f048
JA
6152
6153#AC_SUBST(ALLOCA_SOURCE)
6154#AC_SUBST(ALLOCA_OBJECT)
6155
ccc6cda3
JA
6156trap '' 1 2 15
6157cat > confcache <<\EOF
6158# This file is a shell script that caches the results of configure
6159# tests run on this system so they can be shared between configure
6160# scripts and configure runs. It is not useful on other systems.
6161# If it contains results you don't want to keep, you may remove or edit it.
726f6388 6162#
ccc6cda3
JA
6163# By default, configure uses ./config.cache as the cache file,
6164# creating it if it does not exist already. You can give configure
6165# the --cache-file=FILE option to use a different cache file; that is
6166# what configure does when it calls configure scripts in
6167# subdirectories, so they share the cache.
6168# Giving --cache-file=/dev/null disables caching, for debugging configure.
6169# config.status only pays attention to the cache file if you give it the
6170# --recheck option to rerun configure.
6171#
6172EOF
6173# The following way of writing the cache mishandles newlines in values,
6174# but we know of no workaround that is simple, portable, and efficient.
6175# So, don't put newlines in cache variables' values.
6176# Ultrix sh set writes to stderr and can't be redirected directly,
6177# and sets the high bit in the cache file unless we assign to the vars.
6178(set) 2>&1 |
6179 case `(ac_space=' '; set) 2>&1` in
6180 *ac_space=\ *)
6181 # `set' does not quote correctly, so add quotes (double-quote substitution
6182 # turns \\\\ into \\, and sed turns \\ into \).
6183 sed -n \
6184 -e "s/'/'\\\\''/g" \
6185 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6186 ;;
6187 *)
6188 # `set' quotes correctly as required by POSIX, so do not add quotes.
6189 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6190 ;;
6191 esac >> confcache
6192if cmp -s $cache_file confcache; then
6193 :
6194else
6195 if test -w $cache_file; then
6196 echo "updating cache $cache_file"
6197 cat confcache > $cache_file
6198 else
6199 echo "not updating unwritable cache $cache_file"
6200 fi
6201fi
6202rm -f confcache
6203
6204trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6205
6206test "x$prefix" = xNONE && prefix=$ac_default_prefix
6207# Let make expand exec_prefix.
6208test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6209
6210# Any assignment to VPATH causes Sun make to only execute
6211# the first set of double-colon rules, so remove it if not needed.
6212# If there is a colon in the path, we need to keep it.
6213if test "x$srcdir" = x.; then
6214 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6215fi
6216
6217trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6218
6219DEFS=-DHAVE_CONFIG_H
6220
6221# Without the "./", some shells look in PATH for config.status.
6222: ${CONFIG_STATUS=./config.status}
6223
6224echo creating $CONFIG_STATUS
6225rm -f $CONFIG_STATUS
6226cat > $CONFIG_STATUS <<EOF
6227#! /bin/sh
6228# Generated automatically by configure.
6229# Run this file to recreate the current configuration.
6230# This directory was configured as follows,
6231# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6232#
6233# $0 $ac_configure_args
6234#
6235# Compiler output produced by configure, useful for debugging
6236# configure, is in ./config.log if it exists.
6237
6238ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6239for ac_option
6240do
6241 case "\$ac_option" in
6242 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6243 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6244 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6245 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6246 echo "$CONFIG_STATUS generated by autoconf version 2.12"
6247 exit 0 ;;
6248 -help | --help | --hel | --he | --h)
6249 echo "\$ac_cs_usage"; exit 0 ;;
6250 *) echo "\$ac_cs_usage"; exit 1 ;;
6251 esac
6252done
6253
6254ac_given_srcdir=$srcdir
6255ac_given_INSTALL="$INSTALL"
6256
6257trap 'rm -fr `echo "Makefile builtins/Makefile lib/readline/Makefile lib/glob/Makefile \
6258 lib/malloc/Makefile lib/termcap/Makefile lib/tilde/Makefile \
6259 doc/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6260EOF
6261cat >> $CONFIG_STATUS <<EOF
6262
6263# Protect against being on the right side of a sed subst in config.status.
6264sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6265 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6266$ac_vpsub
6267$extrasub
6268s%@CFLAGS@%$CFLAGS%g
6269s%@CPPFLAGS@%$CPPFLAGS%g
6270s%@CXXFLAGS@%$CXXFLAGS%g
6271s%@DEFS@%$DEFS%g
6272s%@LDFLAGS@%$LDFLAGS%g
6273s%@LIBS@%$LIBS%g
6274s%@exec_prefix@%$exec_prefix%g
6275s%@prefix@%$prefix%g
6276s%@program_transform_name@%$program_transform_name%g
6277s%@bindir@%$bindir%g
6278s%@sbindir@%$sbindir%g
6279s%@libexecdir@%$libexecdir%g
6280s%@datadir@%$datadir%g
6281s%@sysconfdir@%$sysconfdir%g
6282s%@sharedstatedir@%$sharedstatedir%g
6283s%@localstatedir@%$localstatedir%g
6284s%@libdir@%$libdir%g
6285s%@includedir@%$includedir%g
6286s%@oldincludedir@%$oldincludedir%g
6287s%@infodir@%$infodir%g
6288s%@mandir@%$mandir%g
6289s%@host@%$host%g
6290s%@host_alias@%$host_alias%g
6291s%@host_cpu@%$host_cpu%g
6292s%@host_vendor@%$host_vendor%g
6293s%@host_os@%$host_os%g
d166f048 6294s%@TESTSCRIPT@%$TESTSCRIPT%g
ccc6cda3 6295s%@PURIFY@%$PURIFY%g
d166f048 6296s%@MALLOC_TARGET@%$MALLOC_TARGET%g
ccc6cda3
JA
6297s%@MALLOC_SRC@%$MALLOC_SRC%g
6298s%@READLINE_LIB@%$READLINE_LIB%g
6299s%@READLINE_DEP@%$READLINE_DEP%g
6300s%@HISTORY_LIB@%$HISTORY_LIB%g
6301s%@HISTORY_DEP@%$HISTORY_DEP%g
6302s%@CC@%$CC%g
6303s%@CPP@%$CPP%g
6304s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6305s%@INSTALL_DATA@%$INSTALL_DATA%g
6306s%@AR@%$AR%g
6307s%@RANLIB@%$RANLIB%g
6308s%@YACC@%$YACC%g
6309s%@SET_MAKE@%$SET_MAKE%g
6310s%@ALLOCA@%$ALLOCA%g
6311s%@TERMCAP_LIB@%$TERMCAP_LIB%g
6312s%@TERMCAP_DEP@%$TERMCAP_DEP%g
6313s%@JOBS_O@%$JOBS_O%g
6314s%@incdir@%$incdir%g
6315s%@BUILD_DIR@%$BUILD_DIR%g
d166f048
JA
6316s%@BASHVERS@%$BASHVERS%g
6317s%@BASHPATCH@%$BASHPATCH%g
ccc6cda3
JA
6318s%@LOCAL_LIBS@%$LOCAL_LIBS%g
6319s%@LOCAL_CFLAGS@%$LOCAL_CFLAGS%g
6320s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
d166f048 6321s%@LOCAL_DEFS@%$LOCAL_DEFS%g
ccc6cda3
JA
6322
6323CEOF
6324EOF
6325
6326cat >> $CONFIG_STATUS <<\EOF
6327
6328# Split the substitutions into bite-sized pieces for seds with
6329# small command number limits, like on Digital OSF/1 and HP-UX.
6330ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6331ac_file=1 # Number of current file.
6332ac_beg=1 # First line for current file.
6333ac_end=$ac_max_sed_cmds # Line after last line for current file.
6334ac_more_lines=:
6335ac_sed_cmds=""
6336while $ac_more_lines; do
6337 if test $ac_beg -gt 1; then
6338 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6339 else
6340 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6341 fi
6342 if test ! -s conftest.s$ac_file; then
6343 ac_more_lines=false
6344 rm -f conftest.s$ac_file
6345 else
6346 if test -z "$ac_sed_cmds"; then
6347 ac_sed_cmds="sed -f conftest.s$ac_file"
6348 else
6349 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6350 fi
6351 ac_file=`expr $ac_file + 1`
6352 ac_beg=$ac_end
6353 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6354 fi
6355done
6356if test -z "$ac_sed_cmds"; then
6357 ac_sed_cmds=cat
6358fi
6359EOF
6360
6361cat >> $CONFIG_STATUS <<EOF
6362
6363CONFIG_FILES=\${CONFIG_FILES-"Makefile builtins/Makefile lib/readline/Makefile lib/glob/Makefile \
6364 lib/malloc/Makefile lib/termcap/Makefile lib/tilde/Makefile \
6365 doc/Makefile"}
6366EOF
6367cat >> $CONFIG_STATUS <<\EOF
6368for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6369 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6370 case "$ac_file" in
6371 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6372 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6373 *) ac_file_in="${ac_file}.in" ;;
6374 esac
6375
6376 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6377
6378 # Remove last slash and all that follows it. Not all systems have dirname.
6379 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6380 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6381 # The file is in a subdirectory.
6382 test ! -d "$ac_dir" && mkdir "$ac_dir"
6383 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6384 # A "../" for each directory in $ac_dir_suffix.
6385 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6386 else
6387 ac_dir_suffix= ac_dots=
6388 fi
6389
6390 case "$ac_given_srcdir" in
6391 .) srcdir=.
6392 if test -z "$ac_dots"; then top_srcdir=.
6393 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6394 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6395 *) # Relative path.
6396 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6397 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6398 esac
6399
6400 case "$ac_given_INSTALL" in
6401 [/$]*) INSTALL="$ac_given_INSTALL" ;;
6402 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6403 esac
6404
6405 echo creating "$ac_file"
6406 rm -f "$ac_file"
6407 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6408 case "$ac_file" in
6409 *Makefile*) ac_comsub="1i\\
6410# $configure_input" ;;
6411 *) ac_comsub= ;;
6412 esac
6413
6414 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6415 sed -e "$ac_comsub
6416s%@configure_input@%$configure_input%g
6417s%@srcdir@%$srcdir%g
6418s%@top_srcdir@%$top_srcdir%g
6419s%@INSTALL@%$INSTALL%g
6420" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6421fi; done
6422rm -f conftest.s*
6423
6424# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6425# NAME is the cpp macro being defined and VALUE is the value it is being given.
6426#
6427# ac_d sets the value in "#define NAME VALUE" lines.
6428ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
6429ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
6430ac_dC='\3'
6431ac_dD='%g'
6432# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
6433ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6434ac_uB='\([ ]\)%\1#\2define\3'
6435ac_uC=' '
6436ac_uD='\4%g'
6437# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
6438ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6439ac_eB='$%\1#\2define\3'
6440ac_eC=' '
6441ac_eD='%g'
6442
6443if test "${CONFIG_HEADERS+set}" != set; then
6444EOF
6445cat >> $CONFIG_STATUS <<EOF
6446 CONFIG_HEADERS="config.h"
6447EOF
6448cat >> $CONFIG_STATUS <<\EOF
6449fi
6450for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
6451 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6452 case "$ac_file" in
6453 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6454 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6455 *) ac_file_in="${ac_file}.in" ;;
6456 esac
6457
6458 echo creating $ac_file
6459
6460 rm -f conftest.frag conftest.in conftest.out
6461 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6462 cat $ac_file_inputs > conftest.in
6463
6464EOF
6465
6466# Transform confdefs.h into a sed script conftest.vals that substitutes
6467# the proper values into config.h.in to produce config.h. And first:
6468# Protect against being on the right side of a sed subst in config.status.
6469# Protect against being in an unquoted here document in config.status.
6470rm -f conftest.vals
6471cat > conftest.hdr <<\EOF
6472s/[\\&%]/\\&/g
6473s%[\\$`]%\\&%g
6474s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
6475s%ac_d%ac_u%gp
6476s%ac_u%ac_e%gp
6477EOF
6478sed -n -f conftest.hdr confdefs.h > conftest.vals
6479rm -f conftest.hdr
6480
6481# This sed command replaces #undef with comments. This is necessary, for
6482# example, in the case of _POSIX_SOURCE, which is predefined and required
6483# on some systems where configure will not decide to define it.
6484cat >> conftest.vals <<\EOF
6485s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6486EOF
6487
6488# Break up conftest.vals because some shells have a limit on
6489# the size of here documents, and old seds have small limits too.
6490
6491rm -f conftest.tail
6492while :
6493do
6494 ac_lines=`grep -c . conftest.vals`
6495 # grep -c gives empty output for an empty file on some AIX systems.
6496 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6497 # Write a limited-size here document to conftest.frag.
6498 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6499 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6500 echo 'CEOF
6501 sed -f conftest.frag conftest.in > conftest.out
6502 rm -f conftest.in
6503 mv conftest.out conftest.in
6504' >> $CONFIG_STATUS
6505 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6506 rm -f conftest.vals
6507 mv conftest.tail conftest.vals
6508done
6509rm -f conftest.vals
6510
6511cat >> $CONFIG_STATUS <<\EOF
6512 rm -f conftest.frag conftest.h
6513 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
6514 cat conftest.in >> conftest.h
6515 rm -f conftest.in
6516 if cmp -s $ac_file conftest.h 2>/dev/null; then
6517 echo "$ac_file is unchanged"
6518 rm -f conftest.h
6519 else
6520 # Remove last slash and all that follows it. Not all systems have dirname.
6521 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6522 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6523 # The file is in a subdirectory.
6524 test ! -d "$ac_dir" && mkdir "$ac_dir"
6525 fi
6526 rm -f $ac_file
6527 mv conftest.h $ac_file
6528 fi
6529fi; done
6530
6531EOF
6532cat >> $CONFIG_STATUS <<EOF
6533
6534EOF
6535cat >> $CONFIG_STATUS <<\EOF
6536
6537# Makefile uses this timestamp file to record whether config.h is up to date.
6538echo timestamp > stamp-h
6539
726f6388 6540exit 0
ccc6cda3
JA
6541EOF
6542chmod +x $CONFIG_STATUS
6543rm -fr confdefs* $ac_clean_files
6544test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
6545