]> git.ipfire.org Git - thirdparty/bash.git/blame - configure
Imported from ../bash-2.05.tar.gz.
[thirdparty/bash.git] / configure
CommitLineData
ccc6cda3
JA
1#! /bin/sh
2
28ef6c31
JA
3# From configure.in for Bash 2.05, version 2.90, from autoconf version 2.13
4
5
bb70624e
JA
6
7
8
9
10
11
12
13
14
15
16
17
b72432fd
JA
18
19
20
cce855bc
JA
21
22
23
24
25
26
27
28
29
30
e8ce775d
JA
31
32
d166f048
JA
33
34
35
36
37
38
ccc6cda3
JA
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106# Guess values for system-dependent variables and create Makefiles.
bb70624e 107# Generated automatically using autoconf version 2.13
ccc6cda3 108# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
726f6388 109#
ccc6cda3
JA
110# This configure script is free software; the Free Software Foundation
111# gives unlimited permission to copy, distribute and modify it.
112
113# Defaults:
114ac_help=
115ac_default_prefix=/usr/local
116# Any additions from configure.in:
117ac_help="$ac_help
d166f048
JA
118--with-afs if you are running AFS"
119ac_help="$ac_help
bb70624e
JA
120--with-bash-malloc use the Bash version of malloc"
121ac_help="$ac_help
d166f048 122--with-curses use the curses library instead of the termcap library"
ccc6cda3
JA
123ac_help="$ac_help
124--with-glibc-malloc use the GNU C library version of malloc"
125ac_help="$ac_help
bb70624e 126--with-gnu-malloc synonym for --with-bash-malloc"
ccc6cda3 127ac_help="$ac_help
b72432fd
JA
128--with-installed-readline use a version of the readline library that is already installed"
129ac_help="$ac_help
d166f048 130--with-purecov configure to postprocess with pure coverage"
ccc6cda3 131ac_help="$ac_help
d166f048 132--with-purify configure to postprocess with purify"
ccc6cda3 133ac_help="$ac_help
d166f048 134--enable-minimal-config a minimal sh-like configuration"
ccc6cda3
JA
135ac_help="$ac_help
136--enable-alias enable shell aliases"
137ac_help="$ac_help
bb70624e
JA
138--enable-arith-for-command enable arithmetic for command"
139ac_help="$ac_help
d166f048 140--enable-array-variables include shell array variables"
ccc6cda3
JA
141ac_help="$ac_help
142--enable-bang-history turn on csh-style history substitution"
143ac_help="$ac_help
d166f048 144--enable-brace-expansion include brace expansion"
ccc6cda3 145ac_help="$ac_help
d166f048 146--enable-command-timing enable the time reserved word and command timing"
ccc6cda3 147ac_help="$ac_help
cce855bc
JA
148--enable-cond-command enable the conditional command"
149ac_help="$ac_help
d166f048 150--enable-directory-stack enable builtins pushd/popd/dirs"
ccc6cda3 151ac_help="$ac_help
d166f048 152--enable-disabled-builtins allow disabled builtins to still be invoked"
ccc6cda3 153ac_help="$ac_help
d166f048 154--enable-dparen-arithmetic include ((...)) command"
ccc6cda3 155ac_help="$ac_help
cce855bc
JA
156--enable-extended-glob include ksh-style extended pattern matching"
157ac_help="$ac_help
ccc6cda3
JA
158--enable-help-builtin include the help builtin"
159ac_help="$ac_help
d166f048 160--enable-history turn on command history"
ccc6cda3 161ac_help="$ac_help
d166f048 162--enable-job-control enable job control features"
ccc6cda3 163ac_help="$ac_help
bb70624e
JA
164--enable-net-redirections enable /dev/tcp/host/port redirection"
165ac_help="$ac_help
d166f048 166--enable-process-substitution enable process substitution"
ccc6cda3 167ac_help="$ac_help
bb70624e
JA
168--enable-progcomp enable programmable completion and the complete builtin"
169ac_help="$ac_help
d166f048 170--enable-prompt-string-decoding turn on escape character decoding in prompts"
ccc6cda3 171ac_help="$ac_help
d166f048
JA
172--enable-readline turn on command line editing"
173ac_help="$ac_help
174--enable-restricted enable a restricted shell"
175ac_help="$ac_help
176--enable-select include select command"
ccc6cda3 177ac_help="$ac_help
bb70624e
JA
178--enable-usg-echo-default a synonym for --enable-xpg-echo-default"
179ac_help="$ac_help
180--enable-xpg-echo-default make the echo builtin expand escape sequences by default"
cce855bc
JA
181ac_help="$ac_help
182--enable-profiling allow profiling with gprof"
183ac_help="$ac_help
184--enable-static-link link bash statically, for use as a root shell"
ccc6cda3
JA
185
186# Initialize some variables set by options.
187# The variables have the same names as the options, with
188# dashes changed to underlines.
189build=NONE
190cache_file=./config.cache
191exec_prefix=NONE
192host=NONE
193no_create=
194nonopt=NONE
195no_recursion=
196prefix=NONE
197program_prefix=NONE
198program_suffix=NONE
199program_transform_name=s,x,x,
200silent=
201site=
202srcdir=
203target=NONE
204verbose=
205x_includes=NONE
206x_libraries=NONE
207bindir='${exec_prefix}/bin'
208sbindir='${exec_prefix}/sbin'
209libexecdir='${exec_prefix}/libexec'
210datadir='${prefix}/share'
211sysconfdir='${prefix}/etc'
212sharedstatedir='${prefix}/com'
213localstatedir='${prefix}/var'
214libdir='${exec_prefix}/lib'
215includedir='${prefix}/include'
216oldincludedir='/usr/include'
217infodir='${prefix}/info'
218mandir='${prefix}/man'
219
220# Initialize some other variables.
221subdirs=
222MFLAGS= MAKEFLAGS=
bb70624e 223SHELL=${CONFIG_SHELL-/bin/sh}
ccc6cda3
JA
224# Maximum number of lines to put in a shell here document.
225ac_max_here_lines=12
226
227ac_prev=
228for ac_option
229do
230
231 # If the previous option needs an argument, assign it.
232 if test -n "$ac_prev"; then
233 eval "$ac_prev=\$ac_option"
234 ac_prev=
235 continue
236 fi
237
238 case "$ac_option" in
239 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
240 *) ac_optarg= ;;
241 esac
242
243 # Accept the important Cygnus configure options, so we can diagnose typos.
244
245 case "$ac_option" in
246
247 -bindir | --bindir | --bindi | --bind | --bin | --bi)
248 ac_prev=bindir ;;
249 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
250 bindir="$ac_optarg" ;;
251
252 -build | --build | --buil | --bui | --bu)
253 ac_prev=build ;;
254 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
255 build="$ac_optarg" ;;
256
257 -cache-file | --cache-file | --cache-fil | --cache-fi \
258 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
259 ac_prev=cache_file ;;
260 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
261 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
262 cache_file="$ac_optarg" ;;
263
264 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
265 ac_prev=datadir ;;
266 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
267 | --da=*)
268 datadir="$ac_optarg" ;;
269
270 -disable-* | --disable-*)
271 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
272 # Reject names that are not valid shell variable names.
273 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
274 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
275 fi
276 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
277 eval "enable_${ac_feature}=no" ;;
278
279 -enable-* | --enable-*)
280 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
281 # Reject names that are not valid shell variable names.
282 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
283 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
284 fi
285 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
286 case "$ac_option" in
287 *=*) ;;
288 *) ac_optarg=yes ;;
289 esac
290 eval "enable_${ac_feature}='$ac_optarg'" ;;
291
292 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
293 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
294 | --exec | --exe | --ex)
295 ac_prev=exec_prefix ;;
296 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
297 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
298 | --exec=* | --exe=* | --ex=*)
299 exec_prefix="$ac_optarg" ;;
300
301 -gas | --gas | --ga | --g)
302 # Obsolete; use --with-gas.
303 with_gas=yes ;;
304
305 -help | --help | --hel | --he)
306 # Omit some internal or obsolete options to make the list less imposing.
307 # This message is too long to be a string in the A/UX 3.1 sh.
308 cat << EOF
309Usage: configure [options] [host]
310Options: [defaults in brackets after descriptions]
311Configuration:
312 --cache-file=FILE cache test results in FILE
313 --help print this message
314 --no-create do not create output files
315 --quiet, --silent do not print \`checking...' messages
316 --version print the version of autoconf that created configure
317Directory and file names:
318 --prefix=PREFIX install architecture-independent files in PREFIX
319 [$ac_default_prefix]
320 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
321 [same as prefix]
322 --bindir=DIR user executables in DIR [EPREFIX/bin]
323 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
324 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
325 --datadir=DIR read-only architecture-independent data in DIR
326 [PREFIX/share]
327 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
328 --sharedstatedir=DIR modifiable architecture-independent data in DIR
329 [PREFIX/com]
330 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
331 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
332 --includedir=DIR C header files in DIR [PREFIX/include]
333 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
334 --infodir=DIR info documentation in DIR [PREFIX/info]
335 --mandir=DIR man documentation in DIR [PREFIX/man]
336 --srcdir=DIR find the sources in DIR [configure dir or ..]
337 --program-prefix=PREFIX prepend PREFIX to installed program names
338 --program-suffix=SUFFIX append SUFFIX to installed program names
339 --program-transform-name=PROGRAM
340 run sed PROGRAM on installed program names
341EOF
342 cat << EOF
343Host type:
344 --build=BUILD configure for building on BUILD [BUILD=HOST]
345 --host=HOST configure for HOST [guessed]
346 --target=TARGET configure for TARGET [TARGET=HOST]
347Features and packages:
348 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
349 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
350 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
351 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
352 --x-includes=DIR X include files are in DIR
353 --x-libraries=DIR X library files are in DIR
354EOF
355 if test -n "$ac_help"; then
356 echo "--enable and --with options recognized:$ac_help"
357 fi
358 exit 0 ;;
359
360 -host | --host | --hos | --ho)
361 ac_prev=host ;;
362 -host=* | --host=* | --hos=* | --ho=*)
363 host="$ac_optarg" ;;
364
365 -includedir | --includedir | --includedi | --included | --include \
366 | --includ | --inclu | --incl | --inc)
367 ac_prev=includedir ;;
368 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
369 | --includ=* | --inclu=* | --incl=* | --inc=*)
370 includedir="$ac_optarg" ;;
371
372 -infodir | --infodir | --infodi | --infod | --info | --inf)
373 ac_prev=infodir ;;
374 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
375 infodir="$ac_optarg" ;;
376
377 -libdir | --libdir | --libdi | --libd)
378 ac_prev=libdir ;;
379 -libdir=* | --libdir=* | --libdi=* | --libd=*)
380 libdir="$ac_optarg" ;;
381
382 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
383 | --libexe | --libex | --libe)
384 ac_prev=libexecdir ;;
385 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
386 | --libexe=* | --libex=* | --libe=*)
387 libexecdir="$ac_optarg" ;;
388
389 -localstatedir | --localstatedir | --localstatedi | --localstated \
390 | --localstate | --localstat | --localsta | --localst \
391 | --locals | --local | --loca | --loc | --lo)
392 ac_prev=localstatedir ;;
393 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
394 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
395 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
396 localstatedir="$ac_optarg" ;;
397
398 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
399 ac_prev=mandir ;;
400 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
401 mandir="$ac_optarg" ;;
402
403 -nfp | --nfp | --nf)
404 # Obsolete; use --without-fp.
405 with_fp=no ;;
406
407 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
408 | --no-cr | --no-c)
409 no_create=yes ;;
410
411 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
412 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
413 no_recursion=yes ;;
414
415 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
416 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
417 | --oldin | --oldi | --old | --ol | --o)
418 ac_prev=oldincludedir ;;
419 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
420 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
421 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
422 oldincludedir="$ac_optarg" ;;
423
424 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
425 ac_prev=prefix ;;
426 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
427 prefix="$ac_optarg" ;;
428
429 -program-prefix | --program-prefix | --program-prefi | --program-pref \
430 | --program-pre | --program-pr | --program-p)
431 ac_prev=program_prefix ;;
432 -program-prefix=* | --program-prefix=* | --program-prefi=* \
433 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
434 program_prefix="$ac_optarg" ;;
435
436 -program-suffix | --program-suffix | --program-suffi | --program-suff \
437 | --program-suf | --program-su | --program-s)
438 ac_prev=program_suffix ;;
439 -program-suffix=* | --program-suffix=* | --program-suffi=* \
440 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
441 program_suffix="$ac_optarg" ;;
442
443 -program-transform-name | --program-transform-name \
444 | --program-transform-nam | --program-transform-na \
445 | --program-transform-n | --program-transform- \
446 | --program-transform | --program-transfor \
447 | --program-transfo | --program-transf \
448 | --program-trans | --program-tran \
449 | --progr-tra | --program-tr | --program-t)
450 ac_prev=program_transform_name ;;
451 -program-transform-name=* | --program-transform-name=* \
452 | --program-transform-nam=* | --program-transform-na=* \
453 | --program-transform-n=* | --program-transform-=* \
454 | --program-transform=* | --program-transfor=* \
455 | --program-transfo=* | --program-transf=* \
456 | --program-trans=* | --program-tran=* \
457 | --progr-tra=* | --program-tr=* | --program-t=*)
458 program_transform_name="$ac_optarg" ;;
459
460 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
461 | -silent | --silent | --silen | --sile | --sil)
462 silent=yes ;;
463
464 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
465 ac_prev=sbindir ;;
466 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
467 | --sbi=* | --sb=*)
468 sbindir="$ac_optarg" ;;
469
470 -sharedstatedir | --sharedstatedir | --sharedstatedi \
471 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
472 | --sharedst | --shareds | --shared | --share | --shar \
473 | --sha | --sh)
474 ac_prev=sharedstatedir ;;
475 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
476 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
477 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
478 | --sha=* | --sh=*)
479 sharedstatedir="$ac_optarg" ;;
480
481 -site | --site | --sit)
482 ac_prev=site ;;
483 -site=* | --site=* | --sit=*)
484 site="$ac_optarg" ;;
485
486 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
487 ac_prev=srcdir ;;
488 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
489 srcdir="$ac_optarg" ;;
490
491 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
492 | --syscon | --sysco | --sysc | --sys | --sy)
493 ac_prev=sysconfdir ;;
494 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
495 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
496 sysconfdir="$ac_optarg" ;;
497
498 -target | --target | --targe | --targ | --tar | --ta | --t)
499 ac_prev=target ;;
500 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
501 target="$ac_optarg" ;;
502
503 -v | -verbose | --verbose | --verbos | --verbo | --verb)
504 verbose=yes ;;
505
506 -version | --version | --versio | --versi | --vers)
bb70624e 507 echo "configure generated by autoconf version 2.13"
ccc6cda3
JA
508 exit 0 ;;
509
510 -with-* | --with-*)
511 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
512 # Reject names that are not valid shell variable names.
513 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
514 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
515 fi
516 ac_package=`echo $ac_package| sed 's/-/_/g'`
517 case "$ac_option" in
518 *=*) ;;
519 *) ac_optarg=yes ;;
520 esac
521 eval "with_${ac_package}='$ac_optarg'" ;;
522
523 -without-* | --without-*)
524 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
525 # Reject names that are not valid shell variable names.
526 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
527 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
528 fi
529 ac_package=`echo $ac_package| sed 's/-/_/g'`
530 eval "with_${ac_package}=no" ;;
531
532 --x)
533 # Obsolete; use --with-x.
534 with_x=yes ;;
535
536 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
537 | --x-incl | --x-inc | --x-in | --x-i)
538 ac_prev=x_includes ;;
539 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
540 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
541 x_includes="$ac_optarg" ;;
542
543 -x-libraries | --x-libraries | --x-librarie | --x-librari \
544 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
545 ac_prev=x_libraries ;;
546 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
547 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
548 x_libraries="$ac_optarg" ;;
549
550 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
551 ;;
552
553 *)
554 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
555 echo "configure: warning: $ac_option: invalid host type" 1>&2
556 fi
557 if test "x$nonopt" != xNONE; then
558 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
559 fi
560 nonopt="$ac_option"
561 ;;
562
563 esac
564done
565
566if test -n "$ac_prev"; then
567 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
568fi
569
570trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
571
572# File descriptor usage:
573# 0 standard input
574# 1 file creation
575# 2 errors and warnings
576# 3 some systems may open it to /dev/tty
577# 4 used on the Kubota Titan
578# 6 checking for... messages and results
579# 5 compiler messages saved in config.log
580if test "$silent" = yes; then
581 exec 6>/dev/null
582else
583 exec 6>&1
584fi
585exec 5>./config.log
586
587echo "\
588This file contains any messages produced by compilers while
589running configure, to aid debugging if configure makes a mistake.
590" 1>&5
591
592# Strip out --no-create and --no-recursion so they do not pile up.
593# Also quote any args containing shell metacharacters.
594ac_configure_args=
595for ac_arg
596do
597 case "$ac_arg" in
598 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
599 | --no-cr | --no-c) ;;
600 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
601 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
602 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
603 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
604 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
605 esac
606done
607
608# NLS nuisances.
609# Only set these to C if already set. These must not be set unconditionally
610# because not all systems understand e.g. LANG=C (notably SCO).
611# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
612# Non-C LC_CTYPE values break the ctype check.
613if test "${LANG+set}" = set; then LANG=C; export LANG; fi
614if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
615if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
616if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
617
618# confdefs.h avoids OS command line length limits that DEFS can exceed.
619rm -rf conftest* confdefs.h
620# AIX cpp loses on an empty file, so make sure it contains at least a newline.
621echo > confdefs.h
622
623# A filename unique to this package, relative to the directory that
624# configure is in, which we can look for to find out if srcdir is correct.
625ac_unique_file=shell.h
626
627# Find the source files, if location was not specified.
628if test -z "$srcdir"; then
629 ac_srcdir_defaulted=yes
630 # Try the directory containing this script, then its parent.
631 ac_prog=$0
632 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
633 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
634 srcdir=$ac_confdir
635 if test ! -r $srcdir/$ac_unique_file; then
636 srcdir=..
637 fi
638else
639 ac_srcdir_defaulted=no
640fi
641if test ! -r $srcdir/$ac_unique_file; then
642 if test "$ac_srcdir_defaulted" = yes; then
643 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
644 else
645 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
646 fi
647fi
648srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
649
650# Prefer explicitly selected file to automatically selected ones.
651if test -z "$CONFIG_SITE"; then
652 if test "x$prefix" != xNONE; then
653 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
654 else
655 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
656 fi
657fi
658for ac_site_file in $CONFIG_SITE; do
659 if test -r "$ac_site_file"; then
660 echo "loading site script $ac_site_file"
661 . "$ac_site_file"
662 fi
663done
664
665if test -r "$cache_file"; then
666 echo "loading cache $cache_file"
667 . $cache_file
668else
669 echo "creating cache $cache_file"
670 > $cache_file
671fi
672
673ac_ext=c
674# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
675ac_cpp='$CPP $CPPFLAGS'
676ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
bb70624e 677ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
ccc6cda3
JA
678cross_compiling=$ac_cv_prog_cc_cross
679
bb70624e
JA
680ac_exeext=
681ac_objext=o
ccc6cda3
JA
682if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
683 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
684 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
685 ac_n= ac_c='
686' ac_t=' '
687 else
688 ac_n=-n ac_c= ac_t=
689 fi
690else
691 ac_n= ac_c='\c' ac_t=
692fi
693
694
695
696
697
698
699ac_aux_dir=
700for ac_dir in ./support $srcdir/./support; do
701 if test -f $ac_dir/install-sh; then
702 ac_aux_dir=$ac_dir
703 ac_install_sh="$ac_aux_dir/install-sh -c"
704 break
705 elif test -f $ac_dir/install.sh; then
706 ac_aux_dir=$ac_dir
707 ac_install_sh="$ac_aux_dir/install.sh -c"
708 break
709 fi
710done
711if test -z "$ac_aux_dir"; then
712 { echo "configure: error: can not find install-sh or install.sh in ./support $srcdir/./support" 1>&2; exit 1; }
713fi
714ac_config_guess=$ac_aux_dir/config.guess
715ac_config_sub=$ac_aux_dir/config.sub
716ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
717
718
719
720# Make sure we can run config.sub.
bb70624e 721if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
ccc6cda3
JA
722else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
723fi
724
725echo $ac_n "checking host system type""... $ac_c" 1>&6
28ef6c31 726echo "configure:727: checking host system type" >&5
ccc6cda3
JA
727
728host_alias=$host
729case "$host_alias" in
730NONE)
731 case $nonopt in
732 NONE)
bb70624e 733 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
ccc6cda3
JA
734 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
735 fi ;;
736 *) host_alias=$nonopt ;;
737 esac ;;
738esac
739
bb70624e 740host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
ccc6cda3
JA
741host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
742host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
743host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
744echo "$ac_t""$host" 1>&6
745
746
bb70624e 747opt_bash_malloc=yes
ccc6cda3
JA
748opt_glibc_malloc=no
749opt_purify=no
d166f048 750opt_purecov=no
ccc6cda3 751opt_afs=no
d166f048 752opt_curses=no
b72432fd 753opt_with_installed_readline=no
ccc6cda3 754
bb70624e
JA
755#htmldir=
756
ccc6cda3 757case "${host_cpu}-${host_os}" in
bb70624e 758alpha*-*) opt_bash_malloc=no ;; # alpha running osf/1 or linux
28ef6c31 759*[Cc]ray*-*) opt_bash_malloc=no ;; # Crays
bb70624e
JA
760*-osf1*) opt_bash_malloc=no ;; # other osf/1 machines
761sparc-svr4*) opt_bash_malloc=no ;; # sparc SVR4, SVR4.2
762sparc-netbsd*) opt_bash_malloc=no ;; # needs 8-byte alignment
763mips-irix6*) opt_bash_malloc=no ;; # needs 8-byte alignment
764m68k-sysv) opt_bash_malloc=no ;; # fixes file descriptor leak in closedir
765sparc-linux*) opt_bash_malloc=no ;; # sparc running linux; requires ELF
766#*-freebsd*) opt_bash_malloc=no ;; # they claim it's better
767*-aix*) opt_bash_malloc=no ;; # AIX machines
768*-nextstep*) opt_bash_malloc=no ;; # NeXT machines running NeXTstep
28ef6c31
JA
769*-macos*) opt_bash_malloc=no ;; # Apple MacOS X
770*-rhapsody*) opt_bash_malloc=no ;; # Apple Rhapsody (MacOS X)
771*-darwin*) opt_bash_malloc=no ;; # Apple Darwin (MacOS X)
bb70624e
JA
772*-dgux*) opt_bash_malloc=no ;; # DG/UX machines
773*-qnx*) opt_bash_malloc=no ;; # QNX 4.2
774*-machten4) opt_bash_malloc=no ;; # MachTen 4.x
775*-bsdi2.1|*-bsdi3.?) opt_bash_malloc=no ; : ${CC:=shlicc2} ;; # for loadable builtins
776*-beos*) opt_bash_malloc=no ;; # they say it's suitable
28ef6c31
JA
777*-cygwin*) opt_bash_malloc=no ;; # Cygnus's CYGWIN environment
778*-opennt*|*-interix*) opt_bash_malloc=no ;; # Interix, now owned by Microsoft
ccc6cda3
JA
779esac
780
d166f048
JA
781# Check whether --with-afs or --without-afs was given.
782if test "${with_afs+set}" = set; then
783 withval="$with_afs"
784 opt_afs=$withval
785fi
786
bb70624e
JA
787# Check whether --with-bash-malloc or --without-bash-malloc was given.
788if test "${with_bash_malloc+set}" = set; then
789 withval="$with_bash_malloc"
790 opt_bash_malloc=$withval
791fi
792
d166f048
JA
793# Check whether --with-curses or --without-curses was given.
794if test "${with_curses+set}" = set; then
795 withval="$with_curses"
796 opt_curses=$withval
ccc6cda3
JA
797fi
798
799# Check whether --with-glibc-malloc or --without-glibc-malloc was given.
800if test "${with_glibc_malloc+set}" = set; then
801 withval="$with_glibc_malloc"
802 opt_glibc_malloc=$withval
803fi
804
d166f048
JA
805# Check whether --with-gnu-malloc or --without-gnu-malloc was given.
806if test "${with_gnu_malloc+set}" = set; then
807 withval="$with_gnu_malloc"
bb70624e 808 opt_bash_malloc=$withval
d166f048
JA
809fi
810
b72432fd
JA
811# Check whether --with-installed-readline or --without-installed-readline was given.
812if test "${with_installed_readline+set}" = set; then
813 withval="$with_installed_readline"
814 opt_with_installed_readline=$withval
815fi
816
d166f048
JA
817# Check whether --with-purecov or --without-purecov was given.
818if test "${with_purecov+set}" = set; then
819 withval="$with_purecov"
820 opt_purecov=$withval
821fi
822
ccc6cda3
JA
823# Check whether --with-purify or --without-purify was given.
824if test "${with_purify+set}" = set; then
825 withval="$with_purify"
826 opt_purify=$withval
827fi
828
ccc6cda3
JA
829
830if test "$opt_glibc_malloc" = yes; then
d166f048
JA
831 MALLOC_TARGET=gmalloc
832 MALLOC_SRC=gmalloc.c
bb70624e 833elif test "$opt_bash_malloc" = yes; then
d166f048
JA
834 MALLOC_TARGET=malloc
835 MALLOC_SRC=malloc.c
bb70624e
JA
836 cat >> confdefs.h <<\EOF
837#define USING_BASH_MALLOC 1
838EOF
839
ccc6cda3 840else
d166f048
JA
841 MALLOC_TARGET=stubmalloc
842 MALLOC_SRC=stub.c
ccc6cda3
JA
843fi
844
845if test "$opt_purify" = yes; then
d166f048 846 PURIFY="purify "
ccc6cda3
JA
847else
848 PURIFY=
849fi
850
d166f048
JA
851if test "$opt_purecov" = yes; then
852 PURIFY="${PURIFY}purecov"
853fi
854
ccc6cda3
JA
855if test "$opt_afs" = yes; then
856 cat >> confdefs.h <<\EOF
857#define AFS 1
858EOF
859
860fi
861
d166f048
JA
862if test "$opt_curses" = yes; then
863 prefer_curses=yes
864fi
865
ccc6cda3
JA
866opt_minimal_config=no
867
868opt_job_control=yes
869opt_alias=yes
870opt_readline=yes
871opt_history=yes
872opt_bang_history=yes
873opt_dirstack=yes
874opt_restricted=yes
875opt_process_subst=yes
876opt_prompt_decoding=yes
877opt_select=yes
878opt_help=yes
879opt_array_variables=yes
880opt_dparen_arith=yes
cce855bc 881opt_extended_glob=yes
ccc6cda3
JA
882opt_brace_expansion=yes
883opt_disabled_builtins=no
884opt_command_timing=yes
bb70624e 885opt_xpg_echo=no
cce855bc 886opt_cond_command=yes
bb70624e
JA
887opt_arith_for_command=yes
888opt_net_redirs=yes
889opt_progcomp=yes
cce855bc
JA
890
891opt_static_link=no
892opt_profiling=no
ccc6cda3
JA
893
894# Check whether --enable-minimal-config or --disable-minimal-config was given.
895if test "${enable_minimal_config+set}" = set; then
896 enableval="$enable_minimal_config"
897 opt_minimal_config=$enableval
898fi
899
900
901if test $opt_minimal_config = yes; then
902 opt_job_control=no opt_alias=no opt_readline=no
903 opt_history=no opt_bang_history=no opt_dirstack=no
904 opt_restricted=no opt_process_subst=no opt_prompt_decoding=no
905 opt_select=no opt_help=no opt_array_variables=no opt_dparen_arith=no
906 opt_brace_expansion=no opt_disabled_builtins=no opt_command_timing=no
bb70624e
JA
907 opt_extended_glob=no opt_cond_command=no opt_arith_for_command=no
908 opt_net_redirs=no opt_progcomp=no
ccc6cda3
JA
909fi
910
ccc6cda3
JA
911# Check whether --enable-alias or --disable-alias was given.
912if test "${enable_alias+set}" = set; then
913 enableval="$enable_alias"
914 opt_alias=$enableval
915fi
916
bb70624e
JA
917# Check whether --enable-arith-for-command or --disable-arith-for-command was given.
918if test "${enable_arith_for_command+set}" = set; then
919 enableval="$enable_arith_for_command"
920 opt_arith_for_command=$enableval
921fi
922
d166f048
JA
923# Check whether --enable-array-variables or --disable-array-variables was given.
924if test "${enable_array_variables+set}" = set; then
925 enableval="$enable_array_variables"
926 opt_array_variables=$enableval
ccc6cda3
JA
927fi
928
929# Check whether --enable-bang-history or --disable-bang-history was given.
930if test "${enable_bang_history+set}" = set; then
931 enableval="$enable_bang_history"
932 opt_bang_history=$enableval
933fi
934
d166f048
JA
935# Check whether --enable-brace-expansion or --disable-brace-expansion was given.
936if test "${enable_brace_expansion+set}" = set; then
937 enableval="$enable_brace_expansion"
938 opt_brace_expansion=$enableval
ccc6cda3
JA
939fi
940
d166f048
JA
941# Check whether --enable-command-timing or --disable-command-timing was given.
942if test "${enable_command_timing+set}" = set; then
943 enableval="$enable_command_timing"
944 opt_command_timing=$enableval
ccc6cda3
JA
945fi
946
cce855bc
JA
947# Check whether --enable-cond-command or --disable-cond-command was given.
948if test "${enable_cond_command+set}" = set; then
949 enableval="$enable_cond_command"
950 opt_cond_command=$enableval
951fi
952
d166f048
JA
953# Check whether --enable-directory-stack or --disable-directory-stack was given.
954if test "${enable_directory_stack+set}" = set; then
955 enableval="$enable_directory_stack"
956 opt_dirstack=$enableval
ccc6cda3
JA
957fi
958
d166f048
JA
959# Check whether --enable-disabled-builtins or --disable-disabled-builtins was given.
960if test "${enable_disabled_builtins+set}" = set; then
961 enableval="$enable_disabled_builtins"
962 opt_disabled_builtins=$enableval
ccc6cda3
JA
963fi
964
d166f048
JA
965# Check whether --enable-dparen-arithmetic or --disable-dparen-arithmetic was given.
966if test "${enable_dparen_arithmetic+set}" = set; then
967 enableval="$enable_dparen_arithmetic"
968 opt_dparen_arith=$enableval
ccc6cda3
JA
969fi
970
cce855bc
JA
971# Check whether --enable-extended-glob or --disable-extended-glob was given.
972if test "${enable_extended_glob+set}" = set; then
973 enableval="$enable_extended_glob"
974 opt_extended_glob=$enableval
975fi
976
ccc6cda3
JA
977# Check whether --enable-help-builtin or --disable-help-builtin was given.
978if test "${enable_help_builtin+set}" = set; then
979 enableval="$enable_help_builtin"
980 opt_help=$enableval
981fi
982
d166f048
JA
983# Check whether --enable-history or --disable-history was given.
984if test "${enable_history+set}" = set; then
985 enableval="$enable_history"
986 opt_history=$enableval
ccc6cda3
JA
987fi
988
d166f048
JA
989# Check whether --enable-job-control or --disable-job-control was given.
990if test "${enable_job_control+set}" = set; then
991 enableval="$enable_job_control"
992 opt_job_control=$enableval
ccc6cda3
JA
993fi
994
bb70624e
JA
995# Check whether --enable-net-redirections or --disable-net-redirections was given.
996if test "${enable_net_redirections+set}" = set; then
997 enableval="$enable_net_redirections"
998 opt_net_redirs=$enableval
999fi
1000
d166f048
JA
1001# Check whether --enable-process-substitution or --disable-process-substitution was given.
1002if test "${enable_process_substitution+set}" = set; then
1003 enableval="$enable_process_substitution"
1004 opt_process_subst=$enableval
ccc6cda3
JA
1005fi
1006
bb70624e
JA
1007# Check whether --enable-progcomp or --disable-progcomp was given.
1008if test "${enable_progcomp+set}" = set; then
1009 enableval="$enable_progcomp"
1010 opt_progcomp=$enableval
1011fi
1012
d166f048
JA
1013# Check whether --enable-prompt-string-decoding or --disable-prompt-string-decoding was given.
1014if test "${enable_prompt_string_decoding+set}" = set; then
1015 enableval="$enable_prompt_string_decoding"
1016 opt_prompt_decoding=$enableval
ccc6cda3
JA
1017fi
1018
d166f048
JA
1019# Check whether --enable-readline or --disable-readline was given.
1020if test "${enable_readline+set}" = set; then
1021 enableval="$enable_readline"
1022 opt_readline=$enableval
1023fi
1024
1025# Check whether --enable-restricted or --disable-restricted was given.
1026if test "${enable_restricted+set}" = set; then
1027 enableval="$enable_restricted"
1028 opt_restricted=$enableval
1029fi
1030
1031# Check whether --enable-select or --disable-select was given.
1032if test "${enable_select+set}" = set; then
1033 enableval="$enable_select"
1034 opt_select=$enableval
ccc6cda3
JA
1035fi
1036
1037# Check whether --enable-usg-echo-default or --disable-usg-echo-default was given.
1038if test "${enable_usg_echo_default+set}" = set; then
1039 enableval="$enable_usg_echo_default"
bb70624e
JA
1040 opt_xpg_echo=$enableval
1041fi
1042
1043# Check whether --enable-xpg-echo-default or --disable-xpg-echo-default was given.
1044if test "${enable_xpg_echo_default+set}" = set; then
1045 enableval="$enable_xpg_echo_default"
1046 opt_xpg_echo=$enableval
ccc6cda3
JA
1047fi
1048
1049
cce855bc
JA
1050# Check whether --enable-profiling or --disable-profiling was given.
1051if test "${enable_profiling+set}" = set; then
1052 enableval="$enable_profiling"
1053 opt_profiling=$enableval
1054fi
1055
1056# Check whether --enable-static-link or --disable-static-link was given.
1057if test "${enable_static_link+set}" = set; then
1058 enableval="$enable_static_link"
1059 opt_static_link=$enableval
1060fi
1061
1062
ccc6cda3 1063
b72432fd 1064
ccc6cda3
JA
1065if test $opt_alias = yes; then
1066cat >> confdefs.h <<\EOF
1067#define ALIAS 1
1068EOF
1069
ccc6cda3
JA
1070fi
1071if test $opt_dirstack = yes; then
1072cat >> confdefs.h <<\EOF
1073#define PUSHD_AND_POPD 1
1074EOF
1075
1076fi
1077if test $opt_restricted = yes; then
1078cat >> confdefs.h <<\EOF
1079#define RESTRICTED_SHELL 1
1080EOF
1081
1082fi
1083if test $opt_process_subst = yes; then
1084cat >> confdefs.h <<\EOF
1085#define PROCESS_SUBSTITUTION 1
1086EOF
1087
1088fi
1089if test $opt_prompt_decoding = yes; then
1090cat >> confdefs.h <<\EOF
1091#define PROMPT_STRING_DECODE 1
1092EOF
1093
1094fi
1095if test $opt_select = yes; then
1096cat >> confdefs.h <<\EOF
1097#define SELECT_COMMAND 1
1098EOF
1099
1100fi
1101if test $opt_help = yes; then
1102cat >> confdefs.h <<\EOF
1103#define HELP_BUILTIN 1
1104EOF
1105
1106fi
1107if test $opt_array_variables = yes; then
1108cat >> confdefs.h <<\EOF
1109#define ARRAY_VARS 1
1110EOF
1111
1112fi
1113if test $opt_dparen_arith = yes; then
1114cat >> confdefs.h <<\EOF
1115#define DPAREN_ARITHMETIC 1
1116EOF
1117
1118fi
1119if test $opt_brace_expansion = yes; then
1120cat >> confdefs.h <<\EOF
1121#define BRACE_EXPANSION 1
1122EOF
1123
1124fi
1125if test $opt_disabled_builtins = yes; then
1126cat >> confdefs.h <<\EOF
1127#define DISABLED_BUILTINS 1
1128EOF
1129
1130fi
1131if test $opt_command_timing = yes; then
1132cat >> confdefs.h <<\EOF
1133#define COMMAND_TIMING 1
1134EOF
1135
1136fi
bb70624e 1137if test $opt_xpg_echo = yes ; then
ccc6cda3 1138cat >> confdefs.h <<\EOF
bb70624e 1139#define DEFAULT_ECHO_TO_XPG 1
ccc6cda3
JA
1140EOF
1141
cce855bc
JA
1142fi
1143if test $opt_extended_glob = yes ; then
1144cat >> confdefs.h <<\EOF
1145#define EXTENDED_GLOB 1
1146EOF
1147
1148fi
1149if test $opt_cond_command = yes ; then
1150cat >> confdefs.h <<\EOF
1151#define COND_COMMAND 1
1152EOF
1153
bb70624e
JA
1154fi
1155if test $opt_arith_for_command = yes; then
1156cat >> confdefs.h <<\EOF
1157#define ARITH_FOR_COMMAND 1
1158EOF
1159
1160fi
1161if test $opt_net_redirs = yes; then
1162cat >> confdefs.h <<\EOF
1163#define NETWORK_REDIRECTIONS 1
1164EOF
1165
1166fi
1167if test $opt_progcomp = yes; then
1168cat >> confdefs.h <<\EOF
1169#define PROGRAMMABLE_COMPLETION 1
1170EOF
1171
ccc6cda3
JA
1172fi
1173
d166f048
JA
1174if test "$opt_minimal_config" = yes; then
1175 TESTSCRIPT=run-minimal
1176else
1177 TESTSCRIPT=run-all
1178fi
1179
1180
ccc6cda3
JA
1181
1182
1183
1184
bb70624e
JA
1185
1186
28ef6c31 1187BASHVERS=2.05
b72432fd 1188BASHPATCH=0
d166f048 1189
cce855bc 1190echo "Beginning configuration for bash-$BASHVERS for ${host_cpu}-${host_vendor}-${host_os}"
ccc6cda3
JA
1191
1192# Extract the first word of "gcc", so it can be a program name with args.
1193set dummy gcc; ac_word=$2
1194echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
28ef6c31 1195echo "configure:1196: checking for $ac_word" >&5
ccc6cda3
JA
1196if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1197 echo $ac_n "(cached) $ac_c" 1>&6
1198else
1199 if test -n "$CC"; then
1200 ac_cv_prog_CC="$CC" # Let the user override the test.
1201else
bb70624e
JA
1202 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1203 ac_dummy="$PATH"
1204 for ac_dir in $ac_dummy; do
ccc6cda3
JA
1205 test -z "$ac_dir" && ac_dir=.
1206 if test -f $ac_dir/$ac_word; then
1207 ac_cv_prog_CC="gcc"
1208 break
1209 fi
1210 done
1211 IFS="$ac_save_ifs"
1212fi
1213fi
1214CC="$ac_cv_prog_CC"
1215if test -n "$CC"; then
1216 echo "$ac_t""$CC" 1>&6
1217else
1218 echo "$ac_t""no" 1>&6
1219fi
1220
1221if test -z "$CC"; then
1222 # Extract the first word of "cc", so it can be a program name with args.
1223set dummy cc; ac_word=$2
1224echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
28ef6c31 1225echo "configure:1226: checking for $ac_word" >&5
ccc6cda3
JA
1226if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1227 echo $ac_n "(cached) $ac_c" 1>&6
1228else
1229 if test -n "$CC"; then
1230 ac_cv_prog_CC="$CC" # Let the user override the test.
1231else
bb70624e 1232 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ccc6cda3 1233 ac_prog_rejected=no
bb70624e
JA
1234 ac_dummy="$PATH"
1235 for ac_dir in $ac_dummy; do
ccc6cda3
JA
1236 test -z "$ac_dir" && ac_dir=.
1237 if test -f $ac_dir/$ac_word; then
1238 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1239 ac_prog_rejected=yes
1240 continue
1241 fi
1242 ac_cv_prog_CC="cc"
1243 break
1244 fi
1245 done
1246 IFS="$ac_save_ifs"
1247if test $ac_prog_rejected = yes; then
1248 # We found a bogon in the path, so make sure we never use it.
1249 set dummy $ac_cv_prog_CC
1250 shift
1251 if test $# -gt 0; then
1252 # We chose a different compiler from the bogus one.
1253 # However, it has the same basename, so the bogon will be chosen
1254 # first if we set CC to just the basename; use the full file name.
1255 shift
1256 set dummy "$ac_dir/$ac_word" "$@"
1257 shift
1258 ac_cv_prog_CC="$@"
1259 fi
1260fi
1261fi
1262fi
1263CC="$ac_cv_prog_CC"
1264if test -n "$CC"; then
1265 echo "$ac_t""$CC" 1>&6
1266else
1267 echo "$ac_t""no" 1>&6
1268fi
1269
bb70624e
JA
1270 if test -z "$CC"; then
1271 case "`uname -s`" in
1272 *win32* | *WIN32*)
1273 # Extract the first word of "cl", so it can be a program name with args.
1274set dummy cl; ac_word=$2
1275echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
28ef6c31 1276echo "configure:1277: checking for $ac_word" >&5
bb70624e
JA
1277if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1278 echo $ac_n "(cached) $ac_c" 1>&6
1279else
1280 if test -n "$CC"; then
1281 ac_cv_prog_CC="$CC" # Let the user override the test.
1282else
1283 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1284 ac_dummy="$PATH"
1285 for ac_dir in $ac_dummy; do
1286 test -z "$ac_dir" && ac_dir=.
1287 if test -f $ac_dir/$ac_word; then
1288 ac_cv_prog_CC="cl"
1289 break
1290 fi
1291 done
1292 IFS="$ac_save_ifs"
1293fi
1294fi
1295CC="$ac_cv_prog_CC"
1296if test -n "$CC"; then
1297 echo "$ac_t""$CC" 1>&6
1298else
1299 echo "$ac_t""no" 1>&6
1300fi
1301 ;;
1302 esac
1303 fi
ccc6cda3
JA
1304 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1305fi
1306
1307echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
28ef6c31 1308echo "configure:1309: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ccc6cda3
JA
1309
1310ac_ext=c
1311# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1312ac_cpp='$CPP $CPPFLAGS'
1313ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
bb70624e 1314ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
ccc6cda3
JA
1315cross_compiling=$ac_cv_prog_cc_cross
1316
bb70624e
JA
1317cat > conftest.$ac_ext << EOF
1318
28ef6c31 1319#line 1320 "configure"
ccc6cda3 1320#include "confdefs.h"
bb70624e 1321
ccc6cda3
JA
1322main(){return(0);}
1323EOF
28ef6c31 1324if { (eval echo configure:1325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ccc6cda3
JA
1325 ac_cv_prog_cc_works=yes
1326 # If we can't run a trivial program, we are probably using a cross compiler.
1327 if (./conftest; exit) 2>/dev/null; then
1328 ac_cv_prog_cc_cross=no
1329 else
1330 ac_cv_prog_cc_cross=yes
1331 fi
1332else
1333 echo "configure: failed program was:" >&5
1334 cat conftest.$ac_ext >&5
1335 ac_cv_prog_cc_works=no
1336fi
1337rm -fr conftest*
bb70624e
JA
1338ac_ext=c
1339# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1340ac_cpp='$CPP $CPPFLAGS'
1341ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1342ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1343cross_compiling=$ac_cv_prog_cc_cross
ccc6cda3
JA
1344
1345echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1346if test $ac_cv_prog_cc_works = no; then
1347 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1348fi
1349echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
28ef6c31 1350echo "configure:1351: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
ccc6cda3
JA
1351echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1352cross_compiling=$ac_cv_prog_cc_cross
1353
1354echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
28ef6c31 1355echo "configure:1356: checking whether we are using GNU C" >&5
ccc6cda3
JA
1356if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1357 echo $ac_n "(cached) $ac_c" 1>&6
1358else
1359 cat > conftest.c <<EOF
1360#ifdef __GNUC__
1361 yes;
1362#endif
1363EOF
28ef6c31 1364if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1365: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ccc6cda3
JA
1365 ac_cv_prog_gcc=yes
1366else
1367 ac_cv_prog_gcc=no
1368fi
1369fi
1370
1371echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1372
1373if test $ac_cv_prog_gcc = yes; then
1374 GCC=yes
bb70624e
JA
1375else
1376 GCC=
1377fi
1378
1379ac_test_CFLAGS="${CFLAGS+set}"
1380ac_save_CFLAGS="$CFLAGS"
1381CFLAGS=
1382echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
28ef6c31 1383echo "configure:1384: checking whether ${CC-cc} accepts -g" >&5
ccc6cda3
JA
1384if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1385 echo $ac_n "(cached) $ac_c" 1>&6
1386else
1387 echo 'void f(){}' > conftest.c
1388if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1389 ac_cv_prog_cc_g=yes
1390else
1391 ac_cv_prog_cc_g=no
1392fi
1393rm -f conftest*
1394
1395fi
1396
1397echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
bb70624e
JA
1398if test "$ac_test_CFLAGS" = set; then
1399 CFLAGS="$ac_save_CFLAGS"
1400elif test $ac_cv_prog_cc_g = yes; then
1401 if test "$GCC" = yes; then
ccc6cda3
JA
1402 CFLAGS="-g -O2"
1403 else
bb70624e 1404 CFLAGS="-g"
ccc6cda3
JA
1405 fi
1406else
bb70624e
JA
1407 if test "$GCC" = yes; then
1408 CFLAGS="-O2"
1409 else
1410 CFLAGS=
1411 fi
ccc6cda3
JA
1412fi
1413
cce855bc 1414echo $ac_n "checking whether large file support needs explicit enabling""... $ac_c" 1>&6
28ef6c31 1415echo "configure:1416: checking whether large file support needs explicit enabling" >&5
cce855bc
JA
1416ac_getconfs=''
1417ac_result=yes
1418ac_set=''
1419ac_shellvars='CPPFLAGS LDFLAGS LIBS'
1420for ac_shellvar in $ac_shellvars; do
1421 case $ac_shellvar in
1422 CPPFLAGS) ac_lfsvar=LFS_CFLAGS ac_lfs64var=LFS64_CFLAGS ;;
1423 *) ac_lfsvar=LFS_$ac_shellvar ac_lfs64var=LFS64_$ac_shellvar ;;
1424 esac
1425 eval test '"${'$ac_shellvar'+set}"' = set && ac_set=$ac_shellvar
1426 (getconf $ac_lfsvar) >/dev/null 2>&1 || { ac_result=no; break; }
1427 ac_getconf=`getconf $ac_lfsvar`
1428 ac_getconf64=`getconf $ac_lfs64var`
1429 ac_getconfs=$ac_getconfs$ac_getconf\ $ac_getconf64
1430 eval ac_test_$ac_shellvar="\$ac_getconf\ \$ac_getconf64"
1431done
1432case "$ac_result$ac_getconfs" in
1433yes) ac_result=no ;;
1434esac
1435case "$ac_result$ac_set" in
1436yes?*) ac_result="yes, but $ac_set is already set, so use its settings"
1437esac
1438echo "$ac_t""$ac_result" 1>&6
1439case $ac_result in
1440yes)
1441 for ac_shellvar in $ac_shellvars; do
1442 eval $ac_shellvar=\$ac_test_$ac_shellvar
1443 done ;;
1444esac
1445
bb70624e 1446
ccc6cda3 1447echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
28ef6c31 1448echo "configure:1449: checking for POSIXized ISC" >&5
ccc6cda3
JA
1449if test -d /etc/conf/kconfig.d &&
1450 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1451then
1452 echo "$ac_t""yes" 1>&6
1453 ISC=yes # If later tests want to check for ISC.
1454 cat >> confdefs.h <<\EOF
1455#define _POSIX_SOURCE 1
1456EOF
1457
1458 if test "$GCC" = yes; then
1459 CC="$CC -posix"
1460 else
1461 CC="$CC -Xp"
1462 fi
1463else
1464 echo "$ac_t""no" 1>&6
1465 ISC=
1466fi
1467
1468echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
28ef6c31 1469echo "configure:1470: checking how to run the C preprocessor" >&5
ccc6cda3
JA
1470# On Suns, sometimes $CPP names a directory.
1471if test -n "$CPP" && test -d "$CPP"; then
1472 CPP=
1473fi
1474if test -z "$CPP"; then
1475if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1476 echo $ac_n "(cached) $ac_c" 1>&6
1477else
1478 # This must be in double quotes, not single quotes, because CPP may get
1479 # substituted into the Makefile and "${CC-cc}" will confuse make.
1480 CPP="${CC-cc} -E"
1481 # On the NeXT, cc -E runs the code through the compiler's parser,
1482 # not just through cpp.
1483 cat > conftest.$ac_ext <<EOF
28ef6c31 1484#line 1485 "configure"
ccc6cda3
JA
1485#include "confdefs.h"
1486#include <assert.h>
1487Syntax Error
1488EOF
1489ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
28ef6c31 1490{ (eval echo configure:1491: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
bb70624e 1491ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
ccc6cda3
JA
1492if test -z "$ac_err"; then
1493 :
1494else
1495 echo "$ac_err" >&5
1496 echo "configure: failed program was:" >&5
1497 cat conftest.$ac_ext >&5
1498 rm -rf conftest*
1499 CPP="${CC-cc} -E -traditional-cpp"
1500 cat > conftest.$ac_ext <<EOF
28ef6c31 1501#line 1502 "configure"
bb70624e
JA
1502#include "confdefs.h"
1503#include <assert.h>
1504Syntax Error
1505EOF
1506ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
28ef6c31 1507{ (eval echo configure:1508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
bb70624e
JA
1508ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1509if test -z "$ac_err"; then
1510 :
1511else
1512 echo "$ac_err" >&5
1513 echo "configure: failed program was:" >&5
1514 cat conftest.$ac_ext >&5
1515 rm -rf conftest*
1516 CPP="${CC-cc} -nologo -E"
1517 cat > conftest.$ac_ext <<EOF
28ef6c31 1518#line 1519 "configure"
ccc6cda3
JA
1519#include "confdefs.h"
1520#include <assert.h>
1521Syntax Error
1522EOF
1523ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
28ef6c31 1524{ (eval echo configure:1525: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
bb70624e 1525ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
ccc6cda3
JA
1526if test -z "$ac_err"; then
1527 :
1528else
1529 echo "$ac_err" >&5
1530 echo "configure: failed program was:" >&5
1531 cat conftest.$ac_ext >&5
1532 rm -rf conftest*
1533 CPP=/lib/cpp
1534fi
1535rm -f conftest*
1536fi
bb70624e
JA
1537rm -f conftest*
1538fi
ccc6cda3
JA
1539rm -f conftest*
1540 ac_cv_prog_CPP="$CPP"
1541fi
1542 CPP="$ac_cv_prog_CPP"
1543else
1544 ac_cv_prog_CPP="$CPP"
1545fi
1546echo "$ac_t""$CPP" 1>&6
1547
1548ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
1549echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
28ef6c31 1550echo "configure:1551: checking for minix/config.h" >&5
ccc6cda3
JA
1551if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1552 echo $ac_n "(cached) $ac_c" 1>&6
1553else
1554 cat > conftest.$ac_ext <<EOF
28ef6c31 1555#line 1556 "configure"
ccc6cda3
JA
1556#include "confdefs.h"
1557#include <minix/config.h>
1558EOF
1559ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
28ef6c31 1560{ (eval echo configure:1561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
bb70624e 1561ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
ccc6cda3
JA
1562if test -z "$ac_err"; then
1563 rm -rf conftest*
1564 eval "ac_cv_header_$ac_safe=yes"
1565else
1566 echo "$ac_err" >&5
1567 echo "configure: failed program was:" >&5
1568 cat conftest.$ac_ext >&5
1569 rm -rf conftest*
1570 eval "ac_cv_header_$ac_safe=no"
1571fi
1572rm -f conftest*
1573fi
1574if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1575 echo "$ac_t""yes" 1>&6
1576 MINIX=yes
1577else
1578 echo "$ac_t""no" 1>&6
1579MINIX=
1580fi
1581
1582if test "$MINIX" = yes; then
1583 cat >> confdefs.h <<\EOF
1584#define _POSIX_SOURCE 1
1585EOF
1586
1587 cat >> confdefs.h <<\EOF
1588#define _POSIX_1_SOURCE 2
1589EOF
1590
1591 cat >> confdefs.h <<\EOF
1592#define _MINIX 1
1593EOF
1594
1595fi
1596
1597
bb70624e 1598echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
28ef6c31 1599echo "configure:1600: checking for Cygwin environment" >&5
bb70624e
JA
1600if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1601 echo $ac_n "(cached) $ac_c" 1>&6
1602else
1603 cat > conftest.$ac_ext <<EOF
28ef6c31 1604#line 1605 "configure"
bb70624e
JA
1605#include "confdefs.h"
1606
1607int main() {
1608
1609#ifndef __CYGWIN__
1610#define __CYGWIN__ __CYGWIN32__
1611#endif
1612return __CYGWIN__;
1613; return 0; }
1614EOF
28ef6c31 1615if { (eval echo configure:1616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
bb70624e
JA
1616 rm -rf conftest*
1617 ac_cv_cygwin=yes
1618else
1619 echo "configure: failed program was:" >&5
1620 cat conftest.$ac_ext >&5
1621 rm -rf conftest*
1622 ac_cv_cygwin=no
1623fi
1624rm -f conftest*
1625rm -f conftest*
1626fi
1627
1628echo "$ac_t""$ac_cv_cygwin" 1>&6
1629CYGWIN=
1630test "$ac_cv_cygwin" = yes && CYGWIN=yes
1631echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
28ef6c31 1632echo "configure:1633: checking for mingw32 environment" >&5
bb70624e
JA
1633if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1634 echo $ac_n "(cached) $ac_c" 1>&6
1635else
1636 cat > conftest.$ac_ext <<EOF
28ef6c31 1637#line 1638 "configure"
bb70624e
JA
1638#include "confdefs.h"
1639
1640int main() {
1641return __MINGW32__;
1642; return 0; }
1643EOF
28ef6c31 1644if { (eval echo configure:1645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
bb70624e
JA
1645 rm -rf conftest*
1646 ac_cv_mingw32=yes
1647else
1648 echo "configure: failed program was:" >&5
1649 cat conftest.$ac_ext >&5
1650 rm -rf conftest*
1651 ac_cv_mingw32=no
1652fi
1653rm -f conftest*
1654rm -f conftest*
1655fi
1656
1657echo "$ac_t""$ac_cv_mingw32" 1>&6
1658MINGW32=
1659test "$ac_cv_mingw32" = yes && MINGW32=yes
1660
1661
1662echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
28ef6c31 1663echo "configure:1664: checking for executable suffix" >&5
bb70624e
JA
1664if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1665 echo $ac_n "(cached) $ac_c" 1>&6
1666else
1667 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1668 ac_cv_exeext=.exe
1669else
1670 rm -f conftest*
1671 echo 'int main () { return 0; }' > conftest.$ac_ext
1672 ac_cv_exeext=
28ef6c31 1673 if { (eval echo configure:1674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
bb70624e
JA
1674 for file in conftest.*; do
1675 case $file in
1676 *.c | *.o | *.obj) ;;
1677 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1678 esac
1679 done
1680 else
1681 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1682 fi
1683 rm -f conftest*
1684 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1685fi
1686fi
1687
1688EXEEXT=""
1689test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1690echo "$ac_t""${ac_cv_exeext}" 1>&6
1691ac_exeext=$EXEEXT
1692
1693
cce855bc 1694
b72432fd
JA
1695SIGNAMES_H=lsignames.h
1696
1697
1698
cce855bc
JA
1699if test "x$cross_compiling" = "xyes"; then
1700 case "${host}" in
28ef6c31 1701 *-cygwin*)
cce855bc 1702 cross_cache=${srcdir}/cross-build/cygwin32.cache
b72432fd 1703 SIGNAMES_H='$(srcdir)/cross-build/win32sig.h'
cce855bc 1704 ;;
b72432fd
JA
1705 i[3456]86-*-beos*)
1706 cross_cache=${srcdir}/cross-build/x86-beos.cache
1707 SIGNAMES_H='${srcdir}/cross-build/beos-sig.h'
1708 ;;
1709 *) echo "configure: cross-compiling for $host is not supported" >&2
cce855bc
JA
1710 ;;
1711 esac
b72432fd
JA
1712 if test -n "${cross_cache}" && test -r "${cross_cache}"; then
1713 echo "loading cross-build cache file ${cross_cache}"
1714 . ${cross_cache}
1715 fi
1716 unset cross_cache
cce855bc
JA
1717fi
1718
b72432fd 1719
cce855bc
JA
1720if test -z "$CC_FOR_BUILD"; then
1721 if test "x$cross_compiling" = "xno"; then
1722 CC_FOR_BUILD='$(CC)'
1723 else
1724 CC_FOR_BUILD=gcc
1725 fi
1726fi
1727
1728
cce855bc 1729
ccc6cda3
JA
1730test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1
1731
1732test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O2"
1733
cce855bc
JA
1734if test "$opt_profiling" = "yes"; then
1735 PROFILE_FLAGS=-pg
b72432fd
JA
1736 case "$host_os" in
1737 solaris2*) ;;
1738 *) opt_static_link=yes ;;
1739 esac
cce855bc
JA
1740fi
1741
1742if test "$opt_static_link" = yes; then
1743 # if we're using gcc, add `-static' to LDFLAGS
1744 if test -n "$GCC" || test "$ac_cv_prog_gcc" = "yes"; then
b72432fd 1745 STATIC_LD="-static"
28ef6c31 1746 LDFLAGS="$LDFLAGS -static" # XXX experimental
cce855bc
JA
1747 fi
1748fi
1749
ccc6cda3
JA
1750
1751
1752
1753
b72432fd 1754
ccc6cda3
JA
1755if test $ac_cv_prog_gcc = yes; then
1756 echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
28ef6c31 1757echo "configure:1758: checking whether ${CC-cc} needs -traditional" >&5
ccc6cda3
JA
1758if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
1759 echo $ac_n "(cached) $ac_c" 1>&6
1760else
1761 ac_pattern="Autoconf.*'x'"
1762 cat > conftest.$ac_ext <<EOF
28ef6c31 1763#line 1764 "configure"
ccc6cda3
JA
1764#include "confdefs.h"
1765#include <sgtty.h>
1766Autoconf TIOCGETP
1767EOF
1768if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1769 egrep "$ac_pattern" >/dev/null 2>&1; then
1770 rm -rf conftest*
1771 ac_cv_prog_gcc_traditional=yes
1772else
1773 rm -rf conftest*
1774 ac_cv_prog_gcc_traditional=no
1775fi
1776rm -f conftest*
1777
1778
1779 if test $ac_cv_prog_gcc_traditional = no; then
1780 cat > conftest.$ac_ext <<EOF
28ef6c31 1781#line 1782 "configure"
ccc6cda3
JA
1782#include "confdefs.h"
1783#include <termio.h>
1784Autoconf TCGETA
1785EOF
1786if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1787 egrep "$ac_pattern" >/dev/null 2>&1; then
1788 rm -rf conftest*
1789 ac_cv_prog_gcc_traditional=yes
1790fi
1791rm -f conftest*
1792
1793 fi
1794fi
1795
1796echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
1797 if test $ac_cv_prog_gcc_traditional = yes; then
1798 CC="$CC -traditional"
1799 fi
1800fi
1801
1802
b72432fd
JA
1803
1804if test "$opt_readline" = yes && test "$opt_with_installed_readline" = "yes"
1805then
1806
1807
bb70624e
JA
1808 if test -z "$TERMCAP_LIB" ; then
1809
1810if test "X$bash_cv_termcap_lib" = "X"; then
1811_bash_needmsg=yes
1812else
1813echo $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6
28ef6c31 1814echo "configure:1815: checking which library has the termcap functions" >&5
bb70624e
JA
1815_bash_needmsg=
1816fi
1817if eval "test \"`echo '$''{'bash_cv_termcap_lib'+set}'`\" = set"; then
1818 echo $ac_n "(cached) $ac_c" 1>&6
1819else
1820 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
28ef6c31 1821echo "configure:1822: checking for tgetent in -ltermcap" >&5
bb70624e
JA
1822ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
1823if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1824 echo $ac_n "(cached) $ac_c" 1>&6
1825else
1826 ac_save_LIBS="$LIBS"
1827LIBS="-ltermcap $LIBS"
1828cat > conftest.$ac_ext <<EOF
28ef6c31 1829#line 1830 "configure"
bb70624e
JA
1830#include "confdefs.h"
1831/* Override any gcc2 internal prototype to avoid an error. */
1832/* We use char because int might match the return type of a gcc2
1833 builtin and then its argument prototype would still apply. */
1834char tgetent();
b72432fd 1835
bb70624e
JA
1836int main() {
1837tgetent()
1838; return 0; }
1839EOF
28ef6c31 1840if { (eval echo configure:1841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
bb70624e
JA
1841 rm -rf conftest*
1842 eval "ac_cv_lib_$ac_lib_var=yes"
1843else
1844 echo "configure: failed program was:" >&5
1845 cat conftest.$ac_ext >&5
1846 rm -rf conftest*
1847 eval "ac_cv_lib_$ac_lib_var=no"
1848fi
1849rm -f conftest*
1850LIBS="$ac_save_LIBS"
b72432fd 1851
b72432fd 1852fi
bb70624e
JA
1853if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1854 echo "$ac_t""yes" 1>&6
1855 bash_cv_termcap_lib=libtermcap
1856else
1857 echo "$ac_t""no" 1>&6
1858echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
28ef6c31 1859echo "configure:1860: checking for tgetent in -lcurses" >&5
bb70624e
JA
1860ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
1861if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1862 echo $ac_n "(cached) $ac_c" 1>&6
1863else
1864 ac_save_LIBS="$LIBS"
1865LIBS="-lcurses $LIBS"
1866cat > conftest.$ac_ext <<EOF
28ef6c31 1867#line 1868 "configure"
bb70624e
JA
1868#include "confdefs.h"
1869/* Override any gcc2 internal prototype to avoid an error. */
1870/* We use char because int might match the return type of a gcc2
1871 builtin and then its argument prototype would still apply. */
1872char tgetent();
b72432fd 1873
bb70624e
JA
1874int main() {
1875tgetent()
1876; return 0; }
b72432fd 1877EOF
28ef6c31 1878if { (eval echo configure:1879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
bb70624e
JA
1879 rm -rf conftest*
1880 eval "ac_cv_lib_$ac_lib_var=yes"
b72432fd 1881else
bb70624e
JA
1882 echo "configure: failed program was:" >&5
1883 cat conftest.$ac_ext >&5
1884 rm -rf conftest*
1885 eval "ac_cv_lib_$ac_lib_var=no"
b72432fd 1886fi
bb70624e
JA
1887rm -f conftest*
1888LIBS="$ac_save_LIBS"
b72432fd 1889
bb70624e
JA
1890fi
1891if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1892 echo "$ac_t""yes" 1>&6
1893 bash_cv_termcap_lib=libcurses
1894else
1895 echo "$ac_t""no" 1>&6
1896echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
28ef6c31 1897echo "configure:1898: checking for tgetent in -lncurses" >&5
bb70624e
JA
1898ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
1899if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1900 echo $ac_n "(cached) $ac_c" 1>&6
1901else
1902 ac_save_LIBS="$LIBS"
1903LIBS="-lncurses $LIBS"
1904cat > conftest.$ac_ext <<EOF
28ef6c31 1905#line 1906 "configure"
bb70624e
JA
1906#include "confdefs.h"
1907/* Override any gcc2 internal prototype to avoid an error. */
1908/* We use char because int might match the return type of a gcc2
1909 builtin and then its argument prototype would still apply. */
1910char tgetent();
1911
1912int main() {
1913tgetent()
1914; return 0; }
1915EOF
28ef6c31 1916if { (eval echo configure:1917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
bb70624e
JA
1917 rm -rf conftest*
1918 eval "ac_cv_lib_$ac_lib_var=yes"
1919else
1920 echo "configure: failed program was:" >&5
1921 cat conftest.$ac_ext >&5
1922 rm -rf conftest*
1923 eval "ac_cv_lib_$ac_lib_var=no"
1924fi
1925rm -f conftest*
1926LIBS="$ac_save_LIBS"
1927
1928fi
1929if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1930 echo "$ac_t""yes" 1>&6
1931 bash_cv_termcap_lib=libncurses
1932else
1933 echo "$ac_t""no" 1>&6
1934bash_cv_termcap_lib=gnutermcap
1935fi
1936
1937fi
1938
1939fi
1940
1941fi
1942
1943if test "X$_bash_needmsg" = "Xyes"; then
1944echo $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6
28ef6c31 1945echo "configure:1946: checking which library has the termcap functions" >&5
bb70624e
JA
1946fi
1947echo "$ac_t""using $bash_cv_termcap_lib" 1>&6
1948if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
1949LDFLAGS="$LDFLAGS -L./lib/termcap"
1950TERMCAP_LIB="./lib/termcap/libtermcap.a"
1951TERMCAP_DEP="./lib/termcap/libtermcap.a"
1952elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
1953TERMCAP_LIB=-ltermcap
1954TERMCAP_DEP=
1955elif test $bash_cv_termcap_lib = libncurses; then
1956TERMCAP_LIB=-lncurses
1957TERMCAP_DEP=
1958else
1959TERMCAP_LIB=-lcurses
1960TERMCAP_DEP=
1961fi
1962
1963 fi
1964
1965 test "x$prefix" = xNONE && _rl_prefix=$ac_default_prefix || _rl_prefix=${prefix}
1966 test "x$exec_prefix" = xNONE && _rl_exec_prefix=${_rl_prefix} || _rl_exec_prefix=${exec_prefix}
1967
1968 echo $ac_n "checking version of installed readline library""... $ac_c" 1>&6
28ef6c31
JA
1969echo "configure:1970: checking version of installed readline library" >&5
1970 _rl_version=`exec_prefix=${_rl_exec_prefix} ${CONFIG_SHELL-/bin/sh} ${srcdir}/support/rlvers.sh -C "${CC}" -L ${libdir} -I ${includedir} -T ${TERMCAP_LIB}`
bb70624e
JA
1971 echo "$ac_t""$_rl_version" 1>&6
1972
1973 case "$_rl_version" in
28ef6c31 1974 4.[2-9]*|5*|6*|7*|8*|9*) ;;
bb70624e
JA
1975 *) opt_with_installed_readline=no
1976 echo "configure: warning: installed readline library is too old to be linked with bash" 1>&2
1977 echo "configure: warning: using private bash version" 1>&2
1978 ;;
1979 esac
1980 unset _rl_version _rl_prefix _rl_exec_prefix
1981fi
1982
1983if test $opt_readline = yes; then
1984 cat >> confdefs.h <<\EOF
1985#define READLINE 1
1986EOF
1987
1988 READLINE_LIB=-lreadline
1989 if test "$opt_with_installed_readline" = "yes" ; then
1990 RL_LIBDIR='$(libdir)'
1991 READLINE_DEP=
1992 RL_INCLUDE='-I$(includedir)'
1993 else
1994 RL_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
1995 READLINE_DEP='$(READLINE_LIBRARY)'
1996 fi
1997else
1998 RL_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
1999 READLINE_LIB= READLINE_DEP=
2000fi
2001if test $opt_history = yes || test $opt_bang_history = yes; then
2002 if test $opt_history = yes; then
2003 cat >> confdefs.h <<\EOF
2004#define HISTORY 1
2005EOF
2006
2007 fi
2008 if test $opt_bang_history = yes; then
2009 cat >> confdefs.h <<\EOF
2010#define BANG_HISTORY 1
2011EOF
b72432fd
JA
2012
2013 fi
2014 HISTORY_LIB=-lhistory
2015 if test "$opt_with_installed_readline" = "yes"; then
2016 HIST_LIBDIR='$(libdir)'
2017 HISTORY_DEP=
2018 RL_INCLUDE='-I$(includedir)'
2019 else
2020 HIST_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
2021 HISTORY_DEP='$(HISTORY_LIBRARY)'
2022 fi
2023else
2024 HIST_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
2025 HISTORY_LIB= HISTORY_DEP=
2026fi
2027
2028
2029
2030
2031
2032
2033
2034
2035
ccc6cda3
JA
2036# Find a good install program. We prefer a C program (faster),
2037# so one script is as good as another. But avoid the broken or
2038# incompatible versions:
2039# SysV /etc/install, /usr/sbin/install
2040# SunOS /usr/etc/install
2041# IRIX /sbin/install
2042# AIX /bin/install
bb70624e 2043# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ccc6cda3
JA
2044# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2045# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2046# ./install, which can be erroneously created by make from ./install.sh.
2047echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
28ef6c31 2048echo "configure:2049: checking for a BSD compatible install" >&5
ccc6cda3
JA
2049if test -z "$INSTALL"; then
2050if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2051 echo $ac_n "(cached) $ac_c" 1>&6
2052else
bb70624e 2053 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
ccc6cda3
JA
2054 for ac_dir in $PATH; do
2055 # Account for people who put trailing slashes in PATH elements.
2056 case "$ac_dir/" in
2057 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2058 *)
2059 # OSF1 and SCO ODT 3.0 have their own names for install.
bb70624e
JA
2060 # Don't use installbsd from OSF since it installs stuff as root
2061 # by default.
2062 for ac_prog in ginstall scoinst install; do
ccc6cda3
JA
2063 if test -f $ac_dir/$ac_prog; then
2064 if test $ac_prog = install &&
2065 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2066 # AIX install. It has an incompatible calling convention.
ccc6cda3
JA
2067 :
2068 else
2069 ac_cv_path_install="$ac_dir/$ac_prog -c"
2070 break 2
2071 fi
2072 fi
2073 done
2074 ;;
2075 esac
2076 done
2077 IFS="$ac_save_IFS"
2078
2079fi
2080 if test "${ac_cv_path_install+set}" = set; then
2081 INSTALL="$ac_cv_path_install"
2082 else
2083 # As a last resort, use the slow shell script. We don't cache a
2084 # path for INSTALL within a source directory, because that will
2085 # break other packages using the cache if that directory is
2086 # removed, or if the path is relative.
2087 INSTALL="$ac_install_sh"
2088 fi
2089fi
2090echo "$ac_t""$INSTALL" 1>&6
2091
2092# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2093# It thinks the first close brace ends the variable substitution.
2094test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2095
bb70624e
JA
2096test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2097
ccc6cda3
JA
2098test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2099
2100# Extract the first word of "ar", so it can be a program name with args.
2101set dummy ar; ac_word=$2
2102echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
28ef6c31 2103echo "configure:2104: checking for $ac_word" >&5
ccc6cda3
JA
2104if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
2105 echo $ac_n "(cached) $ac_c" 1>&6
2106else
2107 if test -n "$AR"; then
2108 ac_cv_prog_AR="$AR" # Let the user override the test.
2109else
bb70624e
JA
2110 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2111 ac_dummy="$PATH"
2112 for ac_dir in $ac_dummy; do
ccc6cda3
JA
2113 test -z "$ac_dir" && ac_dir=.
2114 if test -f $ac_dir/$ac_word; then
2115 ac_cv_prog_AR="ar"
2116 break
2117 fi
2118 done
2119 IFS="$ac_save_ifs"
2120fi
2121fi
2122AR="$ac_cv_prog_AR"
2123if test -n "$AR"; then
2124 echo "$ac_t""$AR" 1>&6
2125else
2126 echo "$ac_t""no" 1>&6
2127fi
2128
b72432fd 2129test -n "$ARFLAGS" || ARFLAGS="cr"
ccc6cda3
JA
2130# Extract the first word of "ranlib", so it can be a program name with args.
2131set dummy ranlib; ac_word=$2
2132echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
28ef6c31 2133echo "configure:2134: checking for $ac_word" >&5
ccc6cda3
JA
2134if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2135 echo $ac_n "(cached) $ac_c" 1>&6
2136else
2137 if test -n "$RANLIB"; then
2138 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2139else
bb70624e
JA
2140 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2141 ac_dummy="$PATH"
2142 for ac_dir in $ac_dummy; do
ccc6cda3
JA
2143 test -z "$ac_dir" && ac_dir=.
2144 if test -f $ac_dir/$ac_word; then
2145 ac_cv_prog_RANLIB="ranlib"
2146 break
2147 fi
2148 done
2149 IFS="$ac_save_ifs"
2150 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2151fi
2152fi
2153RANLIB="$ac_cv_prog_RANLIB"
2154if test -n "$RANLIB"; then
2155 echo "$ac_t""$RANLIB" 1>&6
2156else
2157 echo "$ac_t""no" 1>&6
2158fi
2159
2160for ac_prog in 'bison -y' byacc
2161do
2162# Extract the first word of "$ac_prog", so it can be a program name with args.
2163set dummy $ac_prog; ac_word=$2
2164echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
28ef6c31 2165echo "configure:2166: checking for $ac_word" >&5
ccc6cda3
JA
2166if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
2167 echo $ac_n "(cached) $ac_c" 1>&6
2168else
2169 if test -n "$YACC"; then
2170 ac_cv_prog_YACC="$YACC" # Let the user override the test.
2171else
bb70624e
JA
2172 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2173 ac_dummy="$PATH"
2174 for ac_dir in $ac_dummy; do
ccc6cda3
JA
2175 test -z "$ac_dir" && ac_dir=.
2176 if test -f $ac_dir/$ac_word; then
2177 ac_cv_prog_YACC="$ac_prog"
2178 break
2179 fi
2180 done
2181 IFS="$ac_save_ifs"
2182fi
2183fi
2184YACC="$ac_cv_prog_YACC"
2185if test -n "$YACC"; then
2186 echo "$ac_t""$YACC" 1>&6
2187else
2188 echo "$ac_t""no" 1>&6
2189fi
2190
2191test -n "$YACC" && break
2192done
2193test -n "$YACC" || YACC="yacc"
2194
2195echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
28ef6c31 2196echo "configure:2197: checking whether ${MAKE-make} sets \${MAKE}" >&5
ccc6cda3
JA
2197set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
2198if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
2199 echo $ac_n "(cached) $ac_c" 1>&6
2200else
2201 cat > conftestmake <<\EOF
2202all:
2203 @echo 'ac_maketemp="${MAKE}"'
2204EOF
2205# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2206eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
2207if test -n "$ac_maketemp"; then
2208 eval ac_cv_prog_make_${ac_make}_set=yes
2209else
2210 eval ac_cv_prog_make_${ac_make}_set=no
2211fi
2212rm -f conftestmake
2213fi
2214if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2215 echo "$ac_t""yes" 1>&6
2216 SET_MAKE=
2217else
2218 echo "$ac_t""no" 1>&6
2219 SET_MAKE="MAKE=${MAKE-make}"
2220fi
2221
2222
b72432fd 2223case "$host_os" in
bb70624e 2224opennt*|interix*) MAKE_SHELL="$INTERIX_ROOT/bin/sh" ;;
b72432fd
JA
2225*) MAKE_SHELL=/bin/sh ;;
2226esac
2227
2228
ccc6cda3
JA
2229# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
2230# for constant arguments. Useless!
2231echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
28ef6c31 2232echo "configure:2233: checking for working alloca.h" >&5
ccc6cda3
JA
2233if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
2234 echo $ac_n "(cached) $ac_c" 1>&6
2235else
2236 cat > conftest.$ac_ext <<EOF
28ef6c31 2237#line 2238 "configure"
ccc6cda3
JA
2238#include "confdefs.h"
2239#include <alloca.h>
2240int main() {
2241char *p = alloca(2 * sizeof(int));
2242; return 0; }
2243EOF
28ef6c31 2244if { (eval echo configure:2245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ccc6cda3
JA
2245 rm -rf conftest*
2246 ac_cv_header_alloca_h=yes
2247else
2248 echo "configure: failed program was:" >&5
2249 cat conftest.$ac_ext >&5
2250 rm -rf conftest*
2251 ac_cv_header_alloca_h=no
2252fi
2253rm -f conftest*
2254fi
2255
2256echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
2257if test $ac_cv_header_alloca_h = yes; then
2258 cat >> confdefs.h <<\EOF
2259#define HAVE_ALLOCA_H 1
2260EOF
2261
2262fi
2263
2264echo $ac_n "checking for alloca""... $ac_c" 1>&6
28ef6c31 2265echo "configure:2266: checking for alloca" >&5
ccc6cda3
JA
2266if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
2267 echo $ac_n "(cached) $ac_c" 1>&6
2268else
2269 cat > conftest.$ac_ext <<EOF
28ef6c31 2270#line 2271 "configure"
ccc6cda3
JA
2271#include "confdefs.h"
2272
2273#ifdef __GNUC__
2274# define alloca __builtin_alloca
2275#else
bb70624e
JA
2276# ifdef _MSC_VER
2277# include <malloc.h>
2278# define alloca _alloca
ccc6cda3 2279# else
bb70624e
JA
2280# if HAVE_ALLOCA_H
2281# include <alloca.h>
ccc6cda3 2282# else
bb70624e
JA
2283# ifdef _AIX
2284 #pragma alloca
2285# else
2286# ifndef alloca /* predefined by HP cc +Olibcalls */
ccc6cda3 2287char *alloca ();
bb70624e 2288# endif
ccc6cda3
JA
2289# endif
2290# endif
2291# endif
2292#endif
2293
2294int main() {
2295char *p = (char *) alloca(1);
2296; return 0; }
2297EOF
28ef6c31 2298if { (eval echo configure:2299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ccc6cda3
JA
2299 rm -rf conftest*
2300 ac_cv_func_alloca_works=yes
2301else
2302 echo "configure: failed program was:" >&5
2303 cat conftest.$ac_ext >&5
2304 rm -rf conftest*
2305 ac_cv_func_alloca_works=no
2306fi
2307rm -f conftest*
2308fi
2309
2310echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
2311if test $ac_cv_func_alloca_works = yes; then
2312 cat >> confdefs.h <<\EOF
2313#define HAVE_ALLOCA 1
2314EOF
2315
2316fi
2317
2318if test $ac_cv_func_alloca_works = no; then
2319 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
2320 # that cause trouble. Some versions do not even contain alloca or
2321 # contain a buggy version. If you still want to use their alloca,
2322 # use ar to extract alloca.o from them instead of compiling alloca.c.
bb70624e 2323 ALLOCA=alloca.${ac_objext}
ccc6cda3
JA
2324 cat >> confdefs.h <<\EOF
2325#define C_ALLOCA 1
2326EOF
2327
2328
2329echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
28ef6c31 2330echo "configure:2331: checking whether alloca needs Cray hooks" >&5
ccc6cda3
JA
2331if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
2332 echo $ac_n "(cached) $ac_c" 1>&6
2333else
2334 cat > conftest.$ac_ext <<EOF
28ef6c31 2335#line 2336 "configure"
ccc6cda3
JA
2336#include "confdefs.h"
2337#if defined(CRAY) && ! defined(CRAY2)
2338webecray
2339#else
2340wenotbecray
2341#endif
2342
2343EOF
2344if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2345 egrep "webecray" >/dev/null 2>&1; then
2346 rm -rf conftest*
2347 ac_cv_os_cray=yes
2348else
2349 rm -rf conftest*
2350 ac_cv_os_cray=no
2351fi
2352rm -f conftest*
2353
2354fi
2355
2356echo "$ac_t""$ac_cv_os_cray" 1>&6
2357if test $ac_cv_os_cray = yes; then
2358for ac_func in _getb67 GETB67 getb67; do
2359 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
28ef6c31 2360echo "configure:2361: checking for $ac_func" >&5
ccc6cda3
JA
2361if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2362 echo $ac_n "(cached) $ac_c" 1>&6
2363else
2364 cat > conftest.$ac_ext <<EOF
28ef6c31 2365#line 2366 "configure"
ccc6cda3
JA
2366#include "confdefs.h"
2367/* System header to define __stub macros and hopefully few prototypes,
2368 which can conflict with char $ac_func(); below. */
2369#include <assert.h>
2370/* Override any gcc2 internal prototype to avoid an error. */
2371/* We use char because int might match the return type of a gcc2
2372 builtin and then its argument prototype would still apply. */
2373char $ac_func();
2374
2375int main() {
2376
2377/* The GNU C library defines this for functions which it implements
2378 to always fail with ENOSYS. Some functions are actually named
2379 something starting with __ and the normal name is an alias. */
2380#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2381choke me
2382#else
2383$ac_func();
2384#endif
2385
2386; return 0; }
2387EOF
28ef6c31 2388if { (eval echo configure:2389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ccc6cda3
JA
2389 rm -rf conftest*
2390 eval "ac_cv_func_$ac_func=yes"
2391else
2392 echo "configure: failed program was:" >&5
2393 cat conftest.$ac_ext >&5
2394 rm -rf conftest*
2395 eval "ac_cv_func_$ac_func=no"
2396fi
2397rm -f conftest*
2398fi
2399
2400if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2401 echo "$ac_t""yes" 1>&6
2402 cat >> confdefs.h <<EOF
2403#define CRAY_STACKSEG_END $ac_func
2404EOF
2405
2406 break
2407else
2408 echo "$ac_t""no" 1>&6
2409fi
2410
2411done
2412fi
2413
2414echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
28ef6c31 2415echo "configure:2416: checking stack direction for C alloca" >&5
ccc6cda3
JA
2416if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
2417 echo $ac_n "(cached) $ac_c" 1>&6
2418else
2419 if test "$cross_compiling" = yes; then
2420 ac_cv_c_stack_direction=0
2421else
2422 cat > conftest.$ac_ext <<EOF
28ef6c31 2423#line 2424 "configure"
ccc6cda3
JA
2424#include "confdefs.h"
2425find_stack_direction ()
2426{
2427 static char *addr = 0;
2428 auto char dummy;
2429 if (addr == 0)
2430 {
2431 addr = &dummy;
2432 return find_stack_direction ();
2433 }
2434 else
2435 return (&dummy > addr) ? 1 : -1;
2436}
2437main ()
2438{
2439 exit (find_stack_direction() < 0);
2440}
2441EOF
28ef6c31 2442if { (eval echo configure:2443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
2443then
2444 ac_cv_c_stack_direction=1
2445else
2446 echo "configure: failed program was:" >&5
2447 cat conftest.$ac_ext >&5
2448 rm -fr conftest*
2449 ac_cv_c_stack_direction=-1
2450fi
2451rm -fr conftest*
2452fi
2453
2454fi
2455
2456echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
2457cat >> confdefs.h <<EOF
2458#define STACK_DIRECTION $ac_cv_c_stack_direction
2459EOF
2460
2461fi
2462
2463echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
28ef6c31 2464echo "configure:2465: checking whether getpgrp takes no argument" >&5
ccc6cda3
JA
2465if eval "test \"`echo '$''{'ac_cv_func_getpgrp_void'+set}'`\" = set"; then
2466 echo $ac_n "(cached) $ac_c" 1>&6
2467else
2468 if test "$cross_compiling" = yes; then
2469 { echo "configure: error: cannot check getpgrp if cross compiling" 1>&2; exit 1; }
2470else
2471 cat > conftest.$ac_ext <<EOF
28ef6c31 2472#line 2473 "configure"
ccc6cda3
JA
2473#include "confdefs.h"
2474
2475/*
2476 * If this system has a BSD-style getpgrp(),
2477 * which takes a pid argument, exit unsuccessfully.
2478 *
2479 * Snarfed from Chet Ramey's bash pgrp.c test program
2480 */
2481#include <stdio.h>
2482#include <sys/types.h>
2483
2484int pid;
2485int pg1, pg2, pg3, pg4;
2486int ng, np, s, child;
2487
2488main()
2489{
2490 pid = getpid();
2491 pg1 = getpgrp(0);
2492 pg2 = getpgrp();
2493 pg3 = getpgrp(pid);
2494 pg4 = getpgrp(1);
2495
2496 /*
2497 * If all of these values are the same, it's pretty sure that
2498 * we're on a system that ignores getpgrp's first argument.
2499 */
2500 if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
2501 exit(0);
2502
2503 child = fork();
2504 if (child < 0)
2505 exit(1);
2506 else if (child == 0) {
2507 np = getpid();
2508 /*
2509 * If this is Sys V, this will not work; pgrp will be
2510 * set to np because setpgrp just changes a pgrp to be
2511 * the same as the pid.
2512 */
2513 setpgrp(np, pg1);
2514 ng = getpgrp(0); /* Same result for Sys V and BSD */
2515 if (ng == pg1) {
2516 exit(1);
2517 } else {
2518 exit(0);
2519 }
2520 } else {
2521 wait(&s);
2522 exit(s>>8);
2523 }
2524}
2525
2526EOF
28ef6c31 2527if { (eval echo configure:2528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
2528then
2529 ac_cv_func_getpgrp_void=yes
2530else
2531 echo "configure: failed program was:" >&5
2532 cat conftest.$ac_ext >&5
2533 rm -fr conftest*
2534 ac_cv_func_getpgrp_void=no
2535fi
2536rm -fr conftest*
2537fi
2538
2539
2540fi
2541
2542echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
2543if test $ac_cv_func_getpgrp_void = yes; then
2544 cat >> confdefs.h <<\EOF
2545#define GETPGRP_VOID 1
2546EOF
2547
2548fi
2549
2550echo $ac_n "checking whether setvbuf arguments are reversed""... $ac_c" 1>&6
28ef6c31 2551echo "configure:2552: checking whether setvbuf arguments are reversed" >&5
ccc6cda3
JA
2552if eval "test \"`echo '$''{'ac_cv_func_setvbuf_reversed'+set}'`\" = set"; then
2553 echo $ac_n "(cached) $ac_c" 1>&6
2554else
2555 if test "$cross_compiling" = yes; then
2556 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2557else
2558 cat > conftest.$ac_ext <<EOF
28ef6c31 2559#line 2560 "configure"
ccc6cda3
JA
2560#include "confdefs.h"
2561#include <stdio.h>
2562/* If setvbuf has the reversed format, exit 0. */
2563main () {
2564 /* This call has the arguments reversed.
2565 A reversed system may check and see that the address of main
2566 is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */
2567 if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
2568 exit(1);
2569 putc('\r', stdout);
2570 exit(0); /* Non-reversed systems segv here. */
2571}
2572EOF
28ef6c31 2573if { (eval echo configure:2574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
2574then
2575 ac_cv_func_setvbuf_reversed=yes
2576else
2577 echo "configure: failed program was:" >&5
2578 cat conftest.$ac_ext >&5
2579 rm -fr conftest*
2580 ac_cv_func_setvbuf_reversed=no
2581fi
2582rm -fr conftest*
2583fi
2584
2585rm -f core core.* *.core
2586fi
2587
2588echo "$ac_t""$ac_cv_func_setvbuf_reversed" 1>&6
2589if test $ac_cv_func_setvbuf_reversed = yes; then
2590 cat >> confdefs.h <<\EOF
2591#define SETVBUF_REVERSED 1
2592EOF
2593
2594fi
2595
2596echo $ac_n "checking for vprintf""... $ac_c" 1>&6
28ef6c31 2597echo "configure:2598: checking for vprintf" >&5
ccc6cda3
JA
2598if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
2599 echo $ac_n "(cached) $ac_c" 1>&6
2600else
2601 cat > conftest.$ac_ext <<EOF
28ef6c31 2602#line 2603 "configure"
ccc6cda3
JA
2603#include "confdefs.h"
2604/* System header to define __stub macros and hopefully few prototypes,
2605 which can conflict with char vprintf(); below. */
2606#include <assert.h>
2607/* Override any gcc2 internal prototype to avoid an error. */
2608/* We use char because int might match the return type of a gcc2
2609 builtin and then its argument prototype would still apply. */
2610char vprintf();
2611
2612int main() {
2613
2614/* The GNU C library defines this for functions which it implements
2615 to always fail with ENOSYS. Some functions are actually named
2616 something starting with __ and the normal name is an alias. */
2617#if defined (__stub_vprintf) || defined (__stub___vprintf)
2618choke me
2619#else
2620vprintf();
2621#endif
2622
2623; return 0; }
2624EOF
28ef6c31 2625if { (eval echo configure:2626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ccc6cda3
JA
2626 rm -rf conftest*
2627 eval "ac_cv_func_vprintf=yes"
2628else
2629 echo "configure: failed program was:" >&5
2630 cat conftest.$ac_ext >&5
2631 rm -rf conftest*
2632 eval "ac_cv_func_vprintf=no"
2633fi
2634rm -f conftest*
2635fi
2636
2637if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
2638 echo "$ac_t""yes" 1>&6
2639 cat >> confdefs.h <<\EOF
2640#define HAVE_VPRINTF 1
2641EOF
2642
2643else
2644 echo "$ac_t""no" 1>&6
2645fi
2646
2647if test "$ac_cv_func_vprintf" != yes; then
2648echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
28ef6c31 2649echo "configure:2650: checking for _doprnt" >&5
ccc6cda3
JA
2650if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
2651 echo $ac_n "(cached) $ac_c" 1>&6
2652else
2653 cat > conftest.$ac_ext <<EOF
28ef6c31 2654#line 2655 "configure"
ccc6cda3
JA
2655#include "confdefs.h"
2656/* System header to define __stub macros and hopefully few prototypes,
2657 which can conflict with char _doprnt(); below. */
2658#include <assert.h>
2659/* Override any gcc2 internal prototype to avoid an error. */
2660/* We use char because int might match the return type of a gcc2
2661 builtin and then its argument prototype would still apply. */
2662char _doprnt();
2663
2664int main() {
2665
2666/* The GNU C library defines this for functions which it implements
2667 to always fail with ENOSYS. Some functions are actually named
2668 something starting with __ and the normal name is an alias. */
2669#if defined (__stub__doprnt) || defined (__stub____doprnt)
2670choke me
2671#else
2672_doprnt();
2673#endif
2674
2675; return 0; }
2676EOF
28ef6c31 2677if { (eval echo configure:2678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ccc6cda3
JA
2678 rm -rf conftest*
2679 eval "ac_cv_func__doprnt=yes"
2680else
2681 echo "configure: failed program was:" >&5
2682 cat conftest.$ac_ext >&5
2683 rm -rf conftest*
2684 eval "ac_cv_func__doprnt=no"
2685fi
2686rm -f conftest*
2687fi
2688
2689if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
2690 echo "$ac_t""yes" 1>&6
2691 cat >> confdefs.h <<\EOF
2692#define HAVE_DOPRNT 1
2693EOF
2694
2695else
2696 echo "$ac_t""no" 1>&6
2697fi
2698
2699fi
2700
2701echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6
28ef6c31 2702echo "configure:2703: checking for wait3 that fills in rusage" >&5
ccc6cda3
JA
2703if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then
2704 echo $ac_n "(cached) $ac_c" 1>&6
2705else
2706 if test "$cross_compiling" = yes; then
2707 ac_cv_func_wait3_rusage=no
2708else
2709 cat > conftest.$ac_ext <<EOF
28ef6c31 2710#line 2711 "configure"
ccc6cda3
JA
2711#include "confdefs.h"
2712#include <sys/types.h>
2713#include <sys/time.h>
2714#include <sys/resource.h>
2715#include <stdio.h>
2716/* HP-UX has wait3 but does not fill in rusage at all. */
2717main() {
2718 struct rusage r;
2719 int i;
2720 /* Use a field that we can force nonzero --
2721 voluntary context switches.
2722 For systems like NeXT and OSF/1 that don't set it,
2723 also use the system CPU time. And page faults (I/O) for Linux. */
2724 r.ru_nvcsw = 0;
2725 r.ru_stime.tv_sec = 0;
2726 r.ru_stime.tv_usec = 0;
2727 r.ru_majflt = r.ru_minflt = 0;
2728 switch (fork()) {
2729 case 0: /* Child. */
2730 sleep(1); /* Give up the CPU. */
2731 _exit(0);
2732 case -1: _exit(0); /* What can we do? */
2733 default: /* Parent. */
2734 wait3(&i, 0, &r);
2735 sleep(2); /* Avoid "text file busy" from rm on fast HP-UX machines. */
2736 exit(r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0
2737 && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0);
2738 }
2739}
2740EOF
28ef6c31 2741if { (eval echo configure:2742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
2742then
2743 ac_cv_func_wait3_rusage=yes
2744else
2745 echo "configure: failed program was:" >&5
2746 cat conftest.$ac_ext >&5
2747 rm -fr conftest*
2748 ac_cv_func_wait3_rusage=no
2749fi
2750rm -fr conftest*
2751fi
2752
2753fi
2754
2755echo "$ac_t""$ac_cv_func_wait3_rusage" 1>&6
2756if test $ac_cv_func_wait3_rusage = yes; then
2757 cat >> confdefs.h <<\EOF
2758#define HAVE_WAIT3 1
2759EOF
2760
2761fi
2762
2763echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
28ef6c31 2764echo "configure:2765: checking for working strcoll" >&5
ccc6cda3
JA
2765if eval "test \"`echo '$''{'ac_cv_func_strcoll_works'+set}'`\" = set"; then
2766 echo $ac_n "(cached) $ac_c" 1>&6
2767else
2768 if test "$cross_compiling" = yes; then
2769 ac_cv_func_strcoll_works=no
2770else
2771 cat > conftest.$ac_ext <<EOF
28ef6c31 2772#line 2773 "configure"
ccc6cda3
JA
2773#include "confdefs.h"
2774#include <string.h>
2775main ()
2776{
2777 exit (strcoll ("abc", "def") >= 0 ||
2778 strcoll ("ABC", "DEF") >= 0 ||
2779 strcoll ("123", "456") >= 0);
2780}
2781EOF
28ef6c31 2782if { (eval echo configure:2783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
2783then
2784 ac_cv_func_strcoll_works=yes
2785else
2786 echo "configure: failed program was:" >&5
2787 cat conftest.$ac_ext >&5
2788 rm -fr conftest*
2789 ac_cv_func_strcoll_works=no
2790fi
2791rm -fr conftest*
2792fi
2793
2794fi
2795
2796echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
2797if test $ac_cv_func_strcoll_works = yes; then
2798 cat >> confdefs.h <<\EOF
2799#define HAVE_STRCOLL 1
2800EOF
2801
2802fi
2803
2804
2805if test "$ac_cv_func_vprintf" = no; then
2806 echo $ac_n "checking for declaration of vprintf in stdio.h""... $ac_c" 1>&6
28ef6c31 2807echo "configure:2808: checking for declaration of vprintf in stdio.h" >&5
ccc6cda3 2808 cat > conftest.$ac_ext <<EOF
28ef6c31 2809#line 2810 "configure"
ccc6cda3
JA
2810#include "confdefs.h"
2811#include <stdio.h>
2812EOF
2813if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2814 egrep "[int[ ]*vprintf[^a-zA-Z0-9]]" >/dev/null 2>&1; then
2815 rm -rf conftest*
2816 ac_cv_func_vprintf=yes
2817fi
2818rm -f conftest*
2819
2820 echo "$ac_t""$ac_cv_func_vprintf" 1>&6
2821 if test $ac_cv_func_vprintf = yes; then
2822 cat >> confdefs.h <<\EOF
2823#define HAVE_VPRINTF 1
2824EOF
2825
2826 fi
2827fi
2828
2829echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
28ef6c31 2830echo "configure:2831: checking return type of signal handlers" >&5
ccc6cda3
JA
2831if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2832 echo $ac_n "(cached) $ac_c" 1>&6
2833else
2834 cat > conftest.$ac_ext <<EOF
28ef6c31 2835#line 2836 "configure"
ccc6cda3
JA
2836#include "confdefs.h"
2837#include <sys/types.h>
2838#include <signal.h>
2839#ifdef signal
2840#undef signal
2841#endif
2842#ifdef __cplusplus
2843extern "C" void (*signal (int, void (*)(int)))(int);
2844#else
2845void (*signal ()) ();
2846#endif
2847
2848int main() {
2849int i;
2850; return 0; }
2851EOF
28ef6c31 2852if { (eval echo configure:2853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ccc6cda3
JA
2853 rm -rf conftest*
2854 ac_cv_type_signal=void
2855else
2856 echo "configure: failed program was:" >&5
2857 cat conftest.$ac_ext >&5
2858 rm -rf conftest*
2859 ac_cv_type_signal=int
2860fi
2861rm -f conftest*
2862fi
2863
2864echo "$ac_t""$ac_cv_type_signal" 1>&6
2865cat >> confdefs.h <<EOF
2866#define RETSIGTYPE $ac_cv_type_signal
2867EOF
2868
2869
2870
2871echo $ac_n "checking for __setostype""... $ac_c" 1>&6
28ef6c31 2872echo "configure:2873: checking for __setostype" >&5
ccc6cda3
JA
2873if eval "test \"`echo '$''{'ac_cv_func___setostype'+set}'`\" = set"; then
2874 echo $ac_n "(cached) $ac_c" 1>&6
2875else
2876 cat > conftest.$ac_ext <<EOF
28ef6c31 2877#line 2878 "configure"
ccc6cda3
JA
2878#include "confdefs.h"
2879/* System header to define __stub macros and hopefully few prototypes,
2880 which can conflict with char __setostype(); below. */
2881#include <assert.h>
2882/* Override any gcc2 internal prototype to avoid an error. */
2883/* We use char because int might match the return type of a gcc2
2884 builtin and then its argument prototype would still apply. */
2885char __setostype();
2886
2887int main() {
2888
2889/* The GNU C library defines this for functions which it implements
2890 to always fail with ENOSYS. Some functions are actually named
2891 something starting with __ and the normal name is an alias. */
2892#if defined (__stub___setostype) || defined (__stub_____setostype)
2893choke me
2894#else
2895__setostype();
2896#endif
2897
2898; return 0; }
2899EOF
28ef6c31 2900if { (eval echo configure:2901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ccc6cda3
JA
2901 rm -rf conftest*
2902 eval "ac_cv_func___setostype=yes"
2903else
2904 echo "configure: failed program was:" >&5
2905 cat conftest.$ac_ext >&5
2906 rm -rf conftest*
2907 eval "ac_cv_func___setostype=no"
2908fi
2909rm -f conftest*
2910fi
2911
2912if eval "test \"`echo '$ac_cv_func_'__setostype`\" = yes"; then
2913 echo "$ac_t""yes" 1>&6
2914 cat >> confdefs.h <<\EOF
2915#define HAVE_SETOSTYPE 1
2916EOF
2917
2918else
2919 echo "$ac_t""no" 1>&6
2920fi
2921
2922echo $ac_n "checking for wait3""... $ac_c" 1>&6
28ef6c31 2923echo "configure:2924: checking for wait3" >&5
ccc6cda3
JA
2924if eval "test \"`echo '$''{'ac_cv_func_wait3'+set}'`\" = set"; then
2925 echo $ac_n "(cached) $ac_c" 1>&6
2926else
2927 cat > conftest.$ac_ext <<EOF
28ef6c31 2928#line 2929 "configure"
ccc6cda3
JA
2929#include "confdefs.h"
2930/* System header to define __stub macros and hopefully few prototypes,
2931 which can conflict with char wait3(); below. */
2932#include <assert.h>
2933/* Override any gcc2 internal prototype to avoid an error. */
2934/* We use char because int might match the return type of a gcc2
2935 builtin and then its argument prototype would still apply. */
2936char wait3();
2937
2938int main() {
2939
2940/* The GNU C library defines this for functions which it implements
2941 to always fail with ENOSYS. Some functions are actually named
2942 something starting with __ and the normal name is an alias. */
2943#if defined (__stub_wait3) || defined (__stub___wait3)
2944choke me
2945#else
2946wait3();
2947#endif
2948
2949; return 0; }
2950EOF
28ef6c31 2951if { (eval echo configure:2952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ccc6cda3
JA
2952 rm -rf conftest*
2953 eval "ac_cv_func_wait3=yes"
2954else
2955 echo "configure: failed program was:" >&5
2956 cat conftest.$ac_ext >&5
2957 rm -rf conftest*
2958 eval "ac_cv_func_wait3=no"
2959fi
2960rm -f conftest*
2961fi
2962
2963if eval "test \"`echo '$ac_cv_func_'wait3`\" = yes"; then
2964 echo "$ac_t""yes" 1>&6
2965 cat >> confdefs.h <<\EOF
2966#define HAVE_WAIT3 1
2967EOF
2968
2969else
2970 echo "$ac_t""no" 1>&6
2971fi
2972
2973
2974echo $ac_n "checking for mkfifo""... $ac_c" 1>&6
28ef6c31 2975echo "configure:2976: checking for mkfifo" >&5
ccc6cda3
JA
2976if eval "test \"`echo '$''{'ac_cv_func_mkfifo'+set}'`\" = set"; then
2977 echo $ac_n "(cached) $ac_c" 1>&6
2978else
2979 cat > conftest.$ac_ext <<EOF
28ef6c31 2980#line 2981 "configure"
ccc6cda3
JA
2981#include "confdefs.h"
2982/* System header to define __stub macros and hopefully few prototypes,
2983 which can conflict with char mkfifo(); below. */
2984#include <assert.h>
2985/* Override any gcc2 internal prototype to avoid an error. */
2986/* We use char because int might match the return type of a gcc2
2987 builtin and then its argument prototype would still apply. */
2988char mkfifo();
2989
2990int main() {
2991
2992/* The GNU C library defines this for functions which it implements
2993 to always fail with ENOSYS. Some functions are actually named
2994 something starting with __ and the normal name is an alias. */
2995#if defined (__stub_mkfifo) || defined (__stub___mkfifo)
2996choke me
2997#else
2998mkfifo();
2999#endif
3000
3001; return 0; }
3002EOF
28ef6c31 3003if { (eval echo configure:3004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ccc6cda3
JA
3004 rm -rf conftest*
3005 eval "ac_cv_func_mkfifo=yes"
3006else
3007 echo "configure: failed program was:" >&5
3008 cat conftest.$ac_ext >&5
3009 rm -rf conftest*
3010 eval "ac_cv_func_mkfifo=no"
3011fi
3012rm -f conftest*
3013fi
3014
3015if eval "test \"`echo '$ac_cv_func_'mkfifo`\" = yes"; then
3016 echo "$ac_t""yes" 1>&6
3017 cat >> confdefs.h <<\EOF
3018#define HAVE_MKFIFO 1
3019EOF
3020
3021else
3022 echo "$ac_t""no" 1>&6
3023cat >> confdefs.h <<\EOF
3024#define MKFIFO_MISSING 1
3025EOF
3026
3027fi
3028
3029
3030for ac_func in dup2 select getdtablesize getgroups gethostname \
b72432fd 3031 setdtablesize getpagesize killpg lstat getpeername sbrk \
28ef6c31
JA
3032 getrlimit getrusage gettimeofday waitpid tcgetpgrp \
3033 readlink rename
ccc6cda3
JA
3034do
3035echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
28ef6c31 3036echo "configure:3037: checking for $ac_func" >&5
ccc6cda3
JA
3037if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3038 echo $ac_n "(cached) $ac_c" 1>&6
3039else
3040 cat > conftest.$ac_ext <<EOF
28ef6c31 3041#line 3042 "configure"
ccc6cda3
JA
3042#include "confdefs.h"
3043/* System header to define __stub macros and hopefully few prototypes,
3044 which can conflict with char $ac_func(); below. */
3045#include <assert.h>
3046/* Override any gcc2 internal prototype to avoid an error. */
3047/* We use char because int might match the return type of a gcc2
3048 builtin and then its argument prototype would still apply. */
3049char $ac_func();
3050
3051int main() {
3052
3053/* The GNU C library defines this for functions which it implements
3054 to always fail with ENOSYS. Some functions are actually named
3055 something starting with __ and the normal name is an alias. */
3056#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3057choke me
3058#else
3059$ac_func();
3060#endif
3061
3062; return 0; }
3063EOF
28ef6c31 3064if { (eval echo configure:3065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ccc6cda3
JA
3065 rm -rf conftest*
3066 eval "ac_cv_func_$ac_func=yes"
3067else
3068 echo "configure: failed program was:" >&5
3069 cat conftest.$ac_ext >&5
3070 rm -rf conftest*
3071 eval "ac_cv_func_$ac_func=no"
3072fi
3073rm -f conftest*
3074fi
3075
3076if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3077 echo "$ac_t""yes" 1>&6
3078 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3079 cat >> confdefs.h <<EOF
3080#define $ac_tr_func 1
3081EOF
3082
3083else
3084 echo "$ac_t""no" 1>&6
3085fi
3086done
3087
3088
3089for ac_func in bcopy bzero confstr getcwd strcasecmp setenv putenv \
cce855bc
JA
3090 setlinebuf setlocale strchr strerror strtod strtol \
3091 strtoul tcgetattr uname sysconf ulimit times tzset \
28ef6c31
JA
3092 siginterrupt memmove ttyname gethostbyname getservbyname \
3093 inet_aton strpbrk setvbuf pathconf
ccc6cda3
JA
3094do
3095echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
28ef6c31 3096echo "configure:3097: checking for $ac_func" >&5
ccc6cda3
JA
3097if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3098 echo $ac_n "(cached) $ac_c" 1>&6
3099else
3100 cat > conftest.$ac_ext <<EOF
28ef6c31 3101#line 3102 "configure"
ccc6cda3
JA
3102#include "confdefs.h"
3103/* System header to define __stub macros and hopefully few prototypes,
3104 which can conflict with char $ac_func(); below. */
3105#include <assert.h>
3106/* Override any gcc2 internal prototype to avoid an error. */
3107/* We use char because int might match the return type of a gcc2
3108 builtin and then its argument prototype would still apply. */
3109char $ac_func();
3110
3111int main() {
3112
3113/* The GNU C library defines this for functions which it implements
3114 to always fail with ENOSYS. Some functions are actually named
3115 something starting with __ and the normal name is an alias. */
3116#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3117choke me
3118#else
3119$ac_func();
3120#endif
3121
3122; return 0; }
3123EOF
28ef6c31 3124if { (eval echo configure:3125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ccc6cda3
JA
3125 rm -rf conftest*
3126 eval "ac_cv_func_$ac_func=yes"
3127else
3128 echo "configure: failed program was:" >&5
3129 cat conftest.$ac_ext >&5
3130 rm -rf conftest*
3131 eval "ac_cv_func_$ac_func=no"
3132fi
3133rm -f conftest*
3134fi
3135
3136if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3137 echo "$ac_t""yes" 1>&6
3138 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3139 cat >> confdefs.h <<EOF
3140#define $ac_tr_func 1
3141EOF
3142
3143else
3144 echo "$ac_t""no" 1>&6
3145fi
3146done
3147
3148
3149for ac_hdr in libintl.h
3150do
3151ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3152echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
28ef6c31 3153echo "configure:3154: checking for $ac_hdr" >&5
ccc6cda3
JA
3154if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3155 echo $ac_n "(cached) $ac_c" 1>&6
3156else
3157 cat > conftest.$ac_ext <<EOF
28ef6c31 3158#line 3159 "configure"
ccc6cda3
JA
3159#include "confdefs.h"
3160#include <$ac_hdr>
3161EOF
3162ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
28ef6c31 3163{ (eval echo configure:3164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
bb70624e 3164ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
ccc6cda3
JA
3165if test -z "$ac_err"; then
3166 rm -rf conftest*
3167 eval "ac_cv_header_$ac_safe=yes"
3168else
3169 echo "$ac_err" >&5
3170 echo "configure: failed program was:" >&5
3171 cat conftest.$ac_ext >&5
3172 rm -rf conftest*
3173 eval "ac_cv_header_$ac_safe=no"
3174fi
3175rm -f conftest*
3176fi
3177if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3178 echo "$ac_t""yes" 1>&6
3179 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3180 cat >> confdefs.h <<EOF
3181#define $ac_tr_hdr 1
3182EOF
3183
3184else
3185 echo "$ac_t""no" 1>&6
3186fi
3187done
3188
3189for ac_func in gettext textdomain bindtextdomain
3190do
3191echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
28ef6c31 3192echo "configure:3193: checking for $ac_func" >&5
ccc6cda3
JA
3193if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3194 echo $ac_n "(cached) $ac_c" 1>&6
3195else
3196 cat > conftest.$ac_ext <<EOF
28ef6c31 3197#line 3198 "configure"
ccc6cda3
JA
3198#include "confdefs.h"
3199/* System header to define __stub macros and hopefully few prototypes,
3200 which can conflict with char $ac_func(); below. */
3201#include <assert.h>
3202/* Override any gcc2 internal prototype to avoid an error. */
3203/* We use char because int might match the return type of a gcc2
3204 builtin and then its argument prototype would still apply. */
3205char $ac_func();
3206
3207int main() {
3208
3209/* The GNU C library defines this for functions which it implements
3210 to always fail with ENOSYS. Some functions are actually named
3211 something starting with __ and the normal name is an alias. */
3212#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3213choke me
3214#else
3215$ac_func();
3216#endif
3217
3218; return 0; }
3219EOF
28ef6c31 3220if { (eval echo configure:3221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ccc6cda3
JA
3221 rm -rf conftest*
3222 eval "ac_cv_func_$ac_func=yes"
3223else
3224 echo "configure: failed program was:" >&5
3225 cat conftest.$ac_ext >&5
3226 rm -rf conftest*
3227 eval "ac_cv_func_$ac_func=no"
3228fi
3229rm -f conftest*
3230fi
3231
3232if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3233 echo "$ac_t""yes" 1>&6
3234 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3235 cat >> confdefs.h <<EOF
3236#define $ac_tr_func 1
3237EOF
3238
3239else
3240 echo "$ac_t""no" 1>&6
3241fi
3242done
3243
3244
3245if test "$ac_cv_func_bindtextdomain" = "no"; then
3246 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
28ef6c31 3247echo "configure:3248: checking for bindtextdomain in -lintl" >&5
ccc6cda3
JA
3248ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
3249if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3250 echo $ac_n "(cached) $ac_c" 1>&6
3251else
3252 ac_save_LIBS="$LIBS"
3253LIBS="-lintl $LIBS"
3254cat > conftest.$ac_ext <<EOF
28ef6c31 3255#line 3256 "configure"
ccc6cda3
JA
3256#include "confdefs.h"
3257/* Override any gcc2 internal prototype to avoid an error. */
3258/* We use char because int might match the return type of a gcc2
3259 builtin and then its argument prototype would still apply. */
3260char bindtextdomain();
3261
3262int main() {
3263bindtextdomain()
3264; return 0; }
3265EOF
28ef6c31 3266if { (eval echo configure:3267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ccc6cda3
JA
3267 rm -rf conftest*
3268 eval "ac_cv_lib_$ac_lib_var=yes"
3269else
3270 echo "configure: failed program was:" >&5
3271 cat conftest.$ac_ext >&5
3272 rm -rf conftest*
3273 eval "ac_cv_lib_$ac_lib_var=no"
3274fi
3275rm -f conftest*
3276LIBS="$ac_save_LIBS"
3277
3278fi
3279if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3280 echo "$ac_t""yes" 1>&6
3281 ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3282 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3283 cat >> confdefs.h <<EOF
3284#define $ac_tr_lib 1
3285EOF
3286
3287 LIBS="-lintl $LIBS"
3288
3289else
3290 echo "$ac_t""no" 1>&6
3291fi
3292
3293 if test "$ac_cv_lib_intl" = "yes"; then
3294 for ac_func in gettext textdomain bindtextdomain
3295do
3296echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
28ef6c31 3297echo "configure:3298: checking for $ac_func" >&5
ccc6cda3
JA
3298if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3299 echo $ac_n "(cached) $ac_c" 1>&6
3300else
3301 cat > conftest.$ac_ext <<EOF
28ef6c31 3302#line 3303 "configure"
ccc6cda3
JA
3303#include "confdefs.h"
3304/* System header to define __stub macros and hopefully few prototypes,
3305 which can conflict with char $ac_func(); below. */
3306#include <assert.h>
3307/* Override any gcc2 internal prototype to avoid an error. */
3308/* We use char because int might match the return type of a gcc2
3309 builtin and then its argument prototype would still apply. */
3310char $ac_func();
3311
3312int main() {
3313
3314/* The GNU C library defines this for functions which it implements
3315 to always fail with ENOSYS. Some functions are actually named
3316 something starting with __ and the normal name is an alias. */
3317#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3318choke me
3319#else
3320$ac_func();
3321#endif
3322
3323; return 0; }
3324EOF
28ef6c31 3325if { (eval echo configure:3326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ccc6cda3
JA
3326 rm -rf conftest*
3327 eval "ac_cv_func_$ac_func=yes"
3328else
3329 echo "configure: failed program was:" >&5
3330 cat conftest.$ac_ext >&5
3331 rm -rf conftest*
3332 eval "ac_cv_func_$ac_func=no"
3333fi
3334rm -f conftest*
3335fi
3336
3337if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3338 echo "$ac_t""yes" 1>&6
3339 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3340 cat >> confdefs.h <<EOF
3341#define $ac_tr_func 1
3342EOF
3343
3344else
3345 echo "$ac_t""no" 1>&6
3346fi
3347done
3348
3349 fi
3350fi
3351
cce855bc 3352if test "$opt_static_link" != yes; then
ccc6cda3 3353echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
28ef6c31 3354echo "configure:3355: checking for dlopen in -ldl" >&5
ccc6cda3
JA
3355ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3356if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3357 echo $ac_n "(cached) $ac_c" 1>&6
3358else
3359 ac_save_LIBS="$LIBS"
3360LIBS="-ldl $LIBS"
3361cat > conftest.$ac_ext <<EOF
28ef6c31 3362#line 3363 "configure"
ccc6cda3
JA
3363#include "confdefs.h"
3364/* Override any gcc2 internal prototype to avoid an error. */
3365/* We use char because int might match the return type of a gcc2
3366 builtin and then its argument prototype would still apply. */
3367char dlopen();
3368
3369int main() {
3370dlopen()
3371; return 0; }
3372EOF
28ef6c31 3373if { (eval echo configure:3374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ccc6cda3
JA
3374 rm -rf conftest*
3375 eval "ac_cv_lib_$ac_lib_var=yes"
3376else
3377 echo "configure: failed program was:" >&5
3378 cat conftest.$ac_ext >&5
3379 rm -rf conftest*
3380 eval "ac_cv_lib_$ac_lib_var=no"
3381fi
3382rm -f conftest*
3383LIBS="$ac_save_LIBS"
3384
3385fi
3386if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3387 echo "$ac_t""yes" 1>&6
3388 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3389 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3390 cat >> confdefs.h <<EOF
3391#define $ac_tr_lib 1
3392EOF
3393
3394 LIBS="-ldl $LIBS"
3395
3396else
3397 echo "$ac_t""no" 1>&6
3398fi
3399
3400for ac_func in dlopen dlclose dlsym
3401do
3402echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
28ef6c31 3403echo "configure:3404: checking for $ac_func" >&5
ccc6cda3
JA
3404if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3405 echo $ac_n "(cached) $ac_c" 1>&6
3406else
3407 cat > conftest.$ac_ext <<EOF
28ef6c31 3408#line 3409 "configure"
ccc6cda3
JA
3409#include "confdefs.h"
3410/* System header to define __stub macros and hopefully few prototypes,
3411 which can conflict with char $ac_func(); below. */
3412#include <assert.h>
3413/* Override any gcc2 internal prototype to avoid an error. */
3414/* We use char because int might match the return type of a gcc2
3415 builtin and then its argument prototype would still apply. */
3416char $ac_func();
3417
3418int main() {
3419
3420/* The GNU C library defines this for functions which it implements
3421 to always fail with ENOSYS. Some functions are actually named
3422 something starting with __ and the normal name is an alias. */
3423#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3424choke me
3425#else
3426$ac_func();
3427#endif
3428
3429; return 0; }
3430EOF
28ef6c31 3431if { (eval echo configure:3432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ccc6cda3
JA
3432 rm -rf conftest*
3433 eval "ac_cv_func_$ac_func=yes"
3434else
3435 echo "configure: failed program was:" >&5
3436 cat conftest.$ac_ext >&5
3437 rm -rf conftest*
3438 eval "ac_cv_func_$ac_func=no"
3439fi
3440rm -f conftest*
3441fi
3442
3443if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3444 echo "$ac_t""yes" 1>&6
3445 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3446 cat >> confdefs.h <<EOF
3447#define $ac_tr_func 1
3448EOF
3449
3450else
3451 echo "$ac_t""no" 1>&6
3452fi
3453done
3454
cce855bc 3455fi
ccc6cda3
JA
3456
3457echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
28ef6c31 3458echo "configure:3459: checking for sys_siglist declaration in signal.h or unistd.h" >&5
ccc6cda3
JA
3459if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
3460 echo $ac_n "(cached) $ac_c" 1>&6
3461else
3462 cat > conftest.$ac_ext <<EOF
28ef6c31 3463#line 3464 "configure"
ccc6cda3
JA
3464#include "confdefs.h"
3465#include <sys/types.h>
3466#include <signal.h>
3467/* NetBSD declares sys_siglist in unistd.h. */
3468#ifdef HAVE_UNISTD_H
3469#include <unistd.h>
3470#endif
3471int main() {
3472char *msg = *(sys_siglist + 1);
3473; return 0; }
3474EOF
28ef6c31 3475if { (eval echo configure:3476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ccc6cda3
JA
3476 rm -rf conftest*
3477 ac_cv_decl_sys_siglist=yes
3478else
3479 echo "configure: failed program was:" >&5
3480 cat conftest.$ac_ext >&5
3481 rm -rf conftest*
3482 ac_cv_decl_sys_siglist=no
3483fi
3484rm -f conftest*
3485fi
3486
3487echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3488if test $ac_cv_decl_sys_siglist = yes; then
3489 cat >> confdefs.h <<\EOF
3490#define SYS_SIGLIST_DECLARED 1
3491EOF
3492
3493fi
3494
3495
3496ac_header_dirent=no
3497for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
3498do
3499ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3500echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
28ef6c31 3501echo "configure:3502: checking for $ac_hdr that defines DIR" >&5
ccc6cda3
JA
3502if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
3503 echo $ac_n "(cached) $ac_c" 1>&6
3504else
3505 cat > conftest.$ac_ext <<EOF
28ef6c31 3506#line 3507 "configure"
ccc6cda3
JA
3507#include "confdefs.h"
3508#include <sys/types.h>
3509#include <$ac_hdr>
3510int main() {
3511DIR *dirp = 0;
3512; return 0; }
3513EOF
28ef6c31 3514if { (eval echo configure:3515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ccc6cda3
JA
3515 rm -rf conftest*
3516 eval "ac_cv_header_dirent_$ac_safe=yes"
3517else
3518 echo "configure: failed program was:" >&5
3519 cat conftest.$ac_ext >&5
3520 rm -rf conftest*
3521 eval "ac_cv_header_dirent_$ac_safe=no"
3522fi
3523rm -f conftest*
3524fi
3525if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
3526 echo "$ac_t""yes" 1>&6
3527 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3528 cat >> confdefs.h <<EOF
3529#define $ac_tr_hdr 1
3530EOF
3531 ac_header_dirent=$ac_hdr; break
3532else
3533 echo "$ac_t""no" 1>&6
3534fi
3535done
3536# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3537if test $ac_header_dirent = dirent.h; then
3538echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
28ef6c31 3539echo "configure:3540: checking for opendir in -ldir" >&5
ccc6cda3
JA
3540ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
3541if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3542 echo $ac_n "(cached) $ac_c" 1>&6
3543else
3544 ac_save_LIBS="$LIBS"
3545LIBS="-ldir $LIBS"
3546cat > conftest.$ac_ext <<EOF
28ef6c31 3547#line 3548 "configure"
ccc6cda3
JA
3548#include "confdefs.h"
3549/* Override any gcc2 internal prototype to avoid an error. */
3550/* We use char because int might match the return type of a gcc2
3551 builtin and then its argument prototype would still apply. */
3552char opendir();
3553
3554int main() {
3555opendir()
3556; return 0; }
3557EOF
28ef6c31 3558if { (eval echo configure:3559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ccc6cda3
JA
3559 rm -rf conftest*
3560 eval "ac_cv_lib_$ac_lib_var=yes"
3561else
3562 echo "configure: failed program was:" >&5
3563 cat conftest.$ac_ext >&5
3564 rm -rf conftest*
3565 eval "ac_cv_lib_$ac_lib_var=no"
3566fi
3567rm -f conftest*
3568LIBS="$ac_save_LIBS"
3569
3570fi
3571if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3572 echo "$ac_t""yes" 1>&6
3573 LIBS="$LIBS -ldir"
3574else
3575 echo "$ac_t""no" 1>&6
3576fi
3577
3578else
3579echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
28ef6c31 3580echo "configure:3581: checking for opendir in -lx" >&5
ccc6cda3
JA
3581ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
3582if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3583 echo $ac_n "(cached) $ac_c" 1>&6
3584else
3585 ac_save_LIBS="$LIBS"
3586LIBS="-lx $LIBS"
3587cat > conftest.$ac_ext <<EOF
28ef6c31 3588#line 3589 "configure"
ccc6cda3
JA
3589#include "confdefs.h"
3590/* Override any gcc2 internal prototype to avoid an error. */
3591/* We use char because int might match the return type of a gcc2
3592 builtin and then its argument prototype would still apply. */
3593char opendir();
3594
3595int main() {
3596opendir()
3597; return 0; }
3598EOF
28ef6c31 3599if { (eval echo configure:3600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ccc6cda3
JA
3600 rm -rf conftest*
3601 eval "ac_cv_lib_$ac_lib_var=yes"
3602else
3603 echo "configure: failed program was:" >&5
3604 cat conftest.$ac_ext >&5
3605 rm -rf conftest*
3606 eval "ac_cv_lib_$ac_lib_var=no"
3607fi
3608rm -f conftest*
3609LIBS="$ac_save_LIBS"
3610
3611fi
3612if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3613 echo "$ac_t""yes" 1>&6
3614 LIBS="$LIBS -lx"
3615else
3616 echo "$ac_t""no" 1>&6
3617fi
3618
3619fi
3620
3621echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
28ef6c31 3622echo "configure:3623: checking whether time.h and sys/time.h may both be included" >&5
ccc6cda3
JA
3623if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
3624 echo $ac_n "(cached) $ac_c" 1>&6
3625else
3626 cat > conftest.$ac_ext <<EOF
28ef6c31 3627#line 3628 "configure"
ccc6cda3
JA
3628#include "confdefs.h"
3629#include <sys/types.h>
3630#include <sys/time.h>
3631#include <time.h>
3632int main() {
3633struct tm *tp;
3634; return 0; }
3635EOF
28ef6c31 3636if { (eval echo configure:3637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ccc6cda3
JA
3637 rm -rf conftest*
3638 ac_cv_header_time=yes
3639else
3640 echo "configure: failed program was:" >&5
3641 cat conftest.$ac_ext >&5
3642 rm -rf conftest*
3643 ac_cv_header_time=no
3644fi
3645rm -f conftest*
3646fi
3647
3648echo "$ac_t""$ac_cv_header_time" 1>&6
3649if test $ac_cv_header_time = yes; then
3650 cat >> confdefs.h <<\EOF
3651#define TIME_WITH_SYS_TIME 1
3652EOF
3653
3654fi
3655
3656
3657for ac_hdr in unistd.h stdlib.h stdarg.h varargs.h limits.h string.h \
cce855bc 3658 memory.h locale.h termcap.h termio.h termios.h dlfcn.h \
bb70624e 3659 stddef.h netdb.h
ccc6cda3
JA
3660do
3661ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3662echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
28ef6c31 3663echo "configure:3664: checking for $ac_hdr" >&5
ccc6cda3
JA
3664if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3665 echo $ac_n "(cached) $ac_c" 1>&6
3666else
3667 cat > conftest.$ac_ext <<EOF
28ef6c31 3668#line 3669 "configure"
ccc6cda3
JA
3669#include "confdefs.h"
3670#include <$ac_hdr>
3671EOF
3672ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
28ef6c31 3673{ (eval echo configure:3674: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
bb70624e 3674ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
ccc6cda3
JA
3675if test -z "$ac_err"; then
3676 rm -rf conftest*
3677 eval "ac_cv_header_$ac_safe=yes"
3678else
3679 echo "$ac_err" >&5
3680 echo "configure: failed program was:" >&5
3681 cat conftest.$ac_ext >&5
3682 rm -rf conftest*
3683 eval "ac_cv_header_$ac_safe=no"
3684fi
3685rm -f conftest*
3686fi
3687if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3688 echo "$ac_t""yes" 1>&6
3689 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3690 cat >> confdefs.h <<EOF
3691#define $ac_tr_hdr 1
3692EOF
3693
3694else
3695 echo "$ac_t""no" 1>&6
3696fi
3697done
3698
3699for ac_hdr in sys/ptem.h sys/pte.h sys/stream.h sys/select.h sys/file.h \
3700 sys/resource.h sys/param.h sys/socket.h \
3701 sys/time.h sys/times.h sys/wait.h
3702do
3703ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3704echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
28ef6c31 3705echo "configure:3706: checking for $ac_hdr" >&5
ccc6cda3
JA
3706if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3707 echo $ac_n "(cached) $ac_c" 1>&6
3708else
3709 cat > conftest.$ac_ext <<EOF
28ef6c31 3710#line 3711 "configure"
ccc6cda3
JA
3711#include "confdefs.h"
3712#include <$ac_hdr>
3713EOF
3714ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
28ef6c31 3715{ (eval echo configure:3716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
bb70624e 3716ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
ccc6cda3
JA
3717if test -z "$ac_err"; then
3718 rm -rf conftest*
3719 eval "ac_cv_header_$ac_safe=yes"
3720else
3721 echo "$ac_err" >&5
3722 echo "configure: failed program was:" >&5
3723 cat conftest.$ac_ext >&5
3724 rm -rf conftest*
3725 eval "ac_cv_header_$ac_safe=no"
3726fi
3727rm -f conftest*
3728fi
3729if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3730 echo "$ac_t""yes" 1>&6
3731 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3732 cat >> confdefs.h <<EOF
3733#define $ac_tr_hdr 1
3734EOF
3735
3736else
3737 echo "$ac_t""no" 1>&6
3738fi
3739done
3740
bb70624e
JA
3741for ac_hdr in netinet/in.h arpa/inet.h
3742do
3743ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3744echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
28ef6c31 3745echo "configure:3746: checking for $ac_hdr" >&5
bb70624e
JA
3746if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3747 echo $ac_n "(cached) $ac_c" 1>&6
3748else
3749 cat > conftest.$ac_ext <<EOF
28ef6c31 3750#line 3751 "configure"
bb70624e
JA
3751#include "confdefs.h"
3752#include <$ac_hdr>
3753EOF
3754ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
28ef6c31 3755{ (eval echo configure:3756: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
bb70624e
JA
3756ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3757if test -z "$ac_err"; then
3758 rm -rf conftest*
3759 eval "ac_cv_header_$ac_safe=yes"
3760else
3761 echo "$ac_err" >&5
3762 echo "configure: failed program was:" >&5
3763 cat conftest.$ac_ext >&5
3764 rm -rf conftest*
3765 eval "ac_cv_header_$ac_safe=no"
3766fi
3767rm -f conftest*
3768fi
3769if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3770 echo "$ac_t""yes" 1>&6
3771 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3772 cat >> confdefs.h <<EOF
3773#define $ac_tr_hdr 1
3774EOF
3775
3776else
3777 echo "$ac_t""no" 1>&6
3778fi
3779done
3780
3781
3782if test "$ac_cv_func_inet_aton" != 'yes'; then
3783
3784echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
28ef6c31 3785echo "configure:3786: checking for inet_aton" >&5
bb70624e
JA
3786if eval "test \"`echo '$''{'bash_cv_func_inet_aton'+set}'`\" = set"; then
3787 echo $ac_n "(cached) $ac_c" 1>&6
3788else
3789 cat > conftest.$ac_ext <<EOF
28ef6c31 3790#line 3791 "configure"
bb70624e
JA
3791#include "confdefs.h"
3792
3793#include <sys/types.h>
3794#include <netinet/in.h>
3795#include <arpa/inet.h>
3796struct in_addr ap;
3797int main() {
3798 inet_aton("127.0.0.1", &ap);
3799; return 0; }
3800EOF
28ef6c31 3801if { (eval echo configure:3802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
bb70624e
JA
3802 rm -rf conftest*
3803 bash_cv_func_inet_aton=yes
3804else
3805 echo "configure: failed program was:" >&5
3806 cat conftest.$ac_ext >&5
3807 rm -rf conftest*
3808 bash_cv_func_inet_aton=no
3809fi
3810rm -f conftest*
3811fi
3812
3813echo "$ac_t""$bash_cv_func_inet_aton" 1>&6
3814if test $bash_cv_func_inet_aton = yes; then
3815 cat >> confdefs.h <<\EOF
3816#define HAVE_INET_ATON 1
3817EOF
3818
3819fi
3820
3821fi
3822
3823case "$host_os" in
3824irix4*) echo $ac_n "checking for getpwent in -lsun""... $ac_c" 1>&6
28ef6c31 3825echo "configure:3826: checking for getpwent in -lsun" >&5
bb70624e
JA
3826ac_lib_var=`echo sun'_'getpwent | sed 'y%./+-%__p_%'`
3827if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3828 echo $ac_n "(cached) $ac_c" 1>&6
3829else
3830 ac_save_LIBS="$LIBS"
3831LIBS="-lsun $LIBS"
3832cat > conftest.$ac_ext <<EOF
28ef6c31 3833#line 3834 "configure"
bb70624e
JA
3834#include "confdefs.h"
3835/* Override any gcc2 internal prototype to avoid an error. */
3836/* We use char because int might match the return type of a gcc2
3837 builtin and then its argument prototype would still apply. */
3838char getpwent();
3839
3840int main() {
3841getpwent()
3842; return 0; }
3843EOF
28ef6c31 3844if { (eval echo configure:3845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
bb70624e
JA
3845 rm -rf conftest*
3846 eval "ac_cv_lib_$ac_lib_var=yes"
3847else
3848 echo "configure: failed program was:" >&5
3849 cat conftest.$ac_ext >&5
3850 rm -rf conftest*
3851 eval "ac_cv_lib_$ac_lib_var=no"
3852fi
3853rm -f conftest*
3854LIBS="$ac_save_LIBS"
3855
3856fi
3857if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3858 echo "$ac_t""yes" 1>&6
3859 ac_tr_lib=HAVE_LIB`echo sun | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3860 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3861 cat >> confdefs.h <<EOF
3862#define $ac_tr_lib 1
3863EOF
3864
3865 LIBS="-lsun $LIBS"
3866
3867else
3868 echo "$ac_t""no" 1>&6
3869fi
3870 ;;
3871esac
ccc6cda3 3872
d166f048
JA
3873if test "$ac_cv_func_getpeername" = no; then
3874
ccc6cda3
JA
3875if test "X$bash_cv_have_socklib" = "X"; then
3876_bash_needmsg=
3877else
3878echo $ac_n "checking for socket library""... $ac_c" 1>&6
28ef6c31 3879echo "configure:3880: checking for socket library" >&5
ccc6cda3
JA
3880_bash_needmsg=yes
3881fi
3882if eval "test \"`echo '$''{'bash_cv_have_socklib'+set}'`\" = set"; then
3883 echo $ac_n "(cached) $ac_c" 1>&6
3884else
3885 echo $ac_n "checking for getpeername in -lsocket""... $ac_c" 1>&6
28ef6c31 3886echo "configure:3887: checking for getpeername in -lsocket" >&5
ccc6cda3
JA
3887ac_lib_var=`echo socket'_'getpeername | sed 'y%./+-%__p_%'`
3888if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3889 echo $ac_n "(cached) $ac_c" 1>&6
3890else
3891 ac_save_LIBS="$LIBS"
3892LIBS="-lsocket -lnsl $LIBS"
3893cat > conftest.$ac_ext <<EOF
28ef6c31 3894#line 3895 "configure"
ccc6cda3
JA
3895#include "confdefs.h"
3896/* Override any gcc2 internal prototype to avoid an error. */
3897/* We use char because int might match the return type of a gcc2
3898 builtin and then its argument prototype would still apply. */
3899char getpeername();
3900
3901int main() {
3902getpeername()
3903; return 0; }
3904EOF
28ef6c31 3905if { (eval echo configure:3906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ccc6cda3
JA
3906 rm -rf conftest*
3907 eval "ac_cv_lib_$ac_lib_var=yes"
3908else
3909 echo "configure: failed program was:" >&5
3910 cat conftest.$ac_ext >&5
3911 rm -rf conftest*
3912 eval "ac_cv_lib_$ac_lib_var=no"
3913fi
3914rm -f conftest*
3915LIBS="$ac_save_LIBS"
3916
3917fi
3918if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3919 echo "$ac_t""yes" 1>&6
3920 bash_cv_have_socklib=yes
3921else
3922 echo "$ac_t""no" 1>&6
3923bash_cv_have_socklib=no
3924fi
3925
3926fi
3927
3928if test "X$_bash_needmsg" = Xyes; then
3929 echo "$ac_t""$bash_cv_have_socklib" 1>&6
3930 _bash_needmsg=
3931fi
3932if test $bash_cv_have_socklib = yes; then
3933 # check for libnsl, add it to LIBS if present
3934 if test "X$bash_cv_have_libnsl" = "X"; then
3935 _bash_needmsg=
3936 else
3937 echo $ac_n "checking for libnsl""... $ac_c" 1>&6
28ef6c31 3938echo "configure:3939: checking for libnsl" >&5
ccc6cda3
JA
3939 _bash_needmsg=yes
3940 fi
3941 if eval "test \"`echo '$''{'bash_cv_have_libnsl'+set}'`\" = set"; then
3942 echo $ac_n "(cached) $ac_c" 1>&6
3943else
3944 echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
28ef6c31 3945echo "configure:3946: checking for t_open in -lnsl" >&5
ccc6cda3
JA
3946ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
3947if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3948 echo $ac_n "(cached) $ac_c" 1>&6
3949else
3950 ac_save_LIBS="$LIBS"
3951LIBS="-lnsl $LIBS"
3952cat > conftest.$ac_ext <<EOF
28ef6c31 3953#line 3954 "configure"
ccc6cda3
JA
3954#include "confdefs.h"
3955/* Override any gcc2 internal prototype to avoid an error. */
3956/* We use char because int might match the return type of a gcc2
3957 builtin and then its argument prototype would still apply. */
3958char t_open();
3959
3960int main() {
3961t_open()
3962; return 0; }
3963EOF
28ef6c31 3964if { (eval echo configure:3965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ccc6cda3
JA
3965 rm -rf conftest*
3966 eval "ac_cv_lib_$ac_lib_var=yes"
3967else
3968 echo "configure: failed program was:" >&5
3969 cat conftest.$ac_ext >&5
3970 rm -rf conftest*
3971 eval "ac_cv_lib_$ac_lib_var=no"
3972fi
3973rm -f conftest*
3974LIBS="$ac_save_LIBS"
3975
3976fi
3977if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3978 echo "$ac_t""yes" 1>&6
3979 bash_cv_have_libnsl=yes
3980else
3981 echo "$ac_t""no" 1>&6
3982bash_cv_have_libnsl=no
3983fi
3984
3985fi
3986
3987 if test "X$_bash_needmsg" = Xyes; then
3988 echo "$ac_t""$bash_cv_have_libnsl" 1>&6
3989 _bash_needmsg=
3990 fi
3991 if test $bash_cv_have_libnsl = yes; then
3992 LIBS="-lsocket -lnsl $LIBS"
3993 else
3994 LIBS="-lsocket $LIBS"
3995 fi
3996 cat >> confdefs.h <<\EOF
3997#define HAVE_LIBSOCKET 1
3998EOF
3999
4000 cat >> confdefs.h <<\EOF
4001#define HAVE_GETPEERNAME 1
4002EOF
4003
4004fi
4005
bb70624e
JA
4006fi
4007if test "$ac_cv_func_gethostbyname" = no; then
4008 if test "X$bash_cv_have_gethostbyname" = "X"; then
4009_bash_needmsg=yes
4010else
4011echo $ac_n "checking for gethostbyname in socket library""... $ac_c" 1>&6
28ef6c31 4012echo "configure:4013: checking for gethostbyname in socket library" >&5
bb70624e
JA
4013_bash_needmsg=
4014fi
4015if eval "test \"`echo '$''{'bash_cv_have_gethostbyname'+set}'`\" = set"; then
4016 echo $ac_n "(cached) $ac_c" 1>&6
4017else
4018 cat > conftest.$ac_ext <<EOF
28ef6c31 4019#line 4020 "configure"
bb70624e
JA
4020#include "confdefs.h"
4021#include <netdb.h>
4022int main() {
4023 struct hostent *hp;
4024 hp = gethostbyname("localhost");
4025
4026; return 0; }
4027EOF
28ef6c31 4028if { (eval echo configure:4029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
bb70624e
JA
4029 rm -rf conftest*
4030 bash_cv_have_gethostbyname=yes
4031else
4032 echo "configure: failed program was:" >&5
4033 cat conftest.$ac_ext >&5
4034 rm -rf conftest*
4035 bash_cv_have_gethostbyname=no
4036fi
4037rm -f conftest*
4038
4039fi
4040
4041if test "X$_bash_needmsg" = Xyes; then
4042 echo $ac_n "checking for gethostbyname in socket library""... $ac_c" 1>&6
28ef6c31 4043echo "configure:4044: checking for gethostbyname in socket library" >&5
bb70624e
JA
4044fi
4045echo "$ac_t""$bash_cv_have_gethostbyname" 1>&6
4046if test "$bash_cv_have_gethostbyname" = yes; then
4047cat >> confdefs.h <<\EOF
4048#define HAVE_GETHOSTBYNAME 1
4049EOF
4050
4051fi
4052
d166f048 4053fi
ccc6cda3
JA
4054
4055echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
28ef6c31 4056echo "configure:4057: checking for uid_t in sys/types.h" >&5
ccc6cda3
JA
4057if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
4058 echo $ac_n "(cached) $ac_c" 1>&6
4059else
4060 cat > conftest.$ac_ext <<EOF
28ef6c31 4061#line 4062 "configure"
ccc6cda3
JA
4062#include "confdefs.h"
4063#include <sys/types.h>
4064EOF
4065if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4066 egrep "uid_t" >/dev/null 2>&1; then
4067 rm -rf conftest*
4068 ac_cv_type_uid_t=yes
4069else
4070 rm -rf conftest*
4071 ac_cv_type_uid_t=no
4072fi
4073rm -f conftest*
4074
4075fi
4076
4077echo "$ac_t""$ac_cv_type_uid_t" 1>&6
4078if test $ac_cv_type_uid_t = no; then
4079 cat >> confdefs.h <<\EOF
4080#define uid_t int
4081EOF
4082
4083 cat >> confdefs.h <<\EOF
4084#define gid_t int
4085EOF
4086
4087fi
4088
4089echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
28ef6c31 4090echo "configure:4091: checking type of array argument to getgroups" >&5
ccc6cda3
JA
4091if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
4092 echo $ac_n "(cached) $ac_c" 1>&6
4093else
4094 if test "$cross_compiling" = yes; then
4095 ac_cv_type_getgroups=cross
4096else
4097 cat > conftest.$ac_ext <<EOF
28ef6c31 4098#line 4099 "configure"
ccc6cda3
JA
4099#include "confdefs.h"
4100
4101/* Thanks to Mike Rendell for this test. */
4102#include <sys/types.h>
4103#define NGID 256
4104#undef MAX
4105#define MAX(x, y) ((x) > (y) ? (x) : (y))
4106main()
4107{
4108 gid_t gidset[NGID];
4109 int i, n;
4110 union { gid_t gval; long lval; } val;
4111
4112 val.lval = -1;
4113 for (i = 0; i < NGID; i++)
4114 gidset[i] = val.gval;
4115 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
4116 gidset);
4117 /* Exit non-zero if getgroups seems to require an array of ints. This
4118 happens when gid_t is short but getgroups modifies an array of ints. */
4119 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
4120}
4121
4122EOF
28ef6c31 4123if { (eval echo configure:4124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
4124then
4125 ac_cv_type_getgroups=gid_t
4126else
4127 echo "configure: failed program was:" >&5
4128 cat conftest.$ac_ext >&5
4129 rm -fr conftest*
4130 ac_cv_type_getgroups=int
4131fi
4132rm -fr conftest*
4133fi
4134
4135if test $ac_cv_type_getgroups = cross; then
4136 cat > conftest.$ac_ext <<EOF
28ef6c31 4137#line 4138 "configure"
ccc6cda3
JA
4138#include "confdefs.h"
4139#include <unistd.h>
4140EOF
4141if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4142 egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
4143 rm -rf conftest*
4144 ac_cv_type_getgroups=gid_t
4145else
4146 rm -rf conftest*
4147 ac_cv_type_getgroups=int
4148fi
4149rm -f conftest*
4150
4151fi
4152fi
4153
4154echo "$ac_t""$ac_cv_type_getgroups" 1>&6
4155cat >> confdefs.h <<EOF
4156#define GETGROUPS_T $ac_cv_type_getgroups
4157EOF
4158
4159
4160echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
28ef6c31 4161echo "configure:4162: checking for ANSI C header files" >&5
ccc6cda3
JA
4162if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4163 echo $ac_n "(cached) $ac_c" 1>&6
4164else
4165 cat > conftest.$ac_ext <<EOF
28ef6c31 4166#line 4167 "configure"
ccc6cda3
JA
4167#include "confdefs.h"
4168#include <stdlib.h>
4169#include <stdarg.h>
4170#include <string.h>
4171#include <float.h>
4172EOF
4173ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
28ef6c31 4174{ (eval echo configure:4175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
bb70624e 4175ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
ccc6cda3
JA
4176if test -z "$ac_err"; then
4177 rm -rf conftest*
4178 ac_cv_header_stdc=yes
4179else
4180 echo "$ac_err" >&5
4181 echo "configure: failed program was:" >&5
4182 cat conftest.$ac_ext >&5
4183 rm -rf conftest*
4184 ac_cv_header_stdc=no
4185fi
4186rm -f conftest*
4187
4188if test $ac_cv_header_stdc = yes; then
4189 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4190cat > conftest.$ac_ext <<EOF
28ef6c31 4191#line 4192 "configure"
ccc6cda3
JA
4192#include "confdefs.h"
4193#include <string.h>
4194EOF
4195if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4196 egrep "memchr" >/dev/null 2>&1; then
4197 :
4198else
4199 rm -rf conftest*
4200 ac_cv_header_stdc=no
4201fi
4202rm -f conftest*
4203
4204fi
4205
4206if test $ac_cv_header_stdc = yes; then
4207 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4208cat > conftest.$ac_ext <<EOF
28ef6c31 4209#line 4210 "configure"
ccc6cda3
JA
4210#include "confdefs.h"
4211#include <stdlib.h>
4212EOF
4213if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4214 egrep "free" >/dev/null 2>&1; then
4215 :
4216else
4217 rm -rf conftest*
4218 ac_cv_header_stdc=no
4219fi
4220rm -f conftest*
4221
4222fi
4223
4224if test $ac_cv_header_stdc = yes; then
4225 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4226if test "$cross_compiling" = yes; then
4227 :
4228else
4229 cat > conftest.$ac_ext <<EOF
28ef6c31 4230#line 4231 "configure"
ccc6cda3
JA
4231#include "confdefs.h"
4232#include <ctype.h>
4233#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4234#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4235#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4236int main () { int i; for (i = 0; i < 256; i++)
4237if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4238exit (0); }
4239
4240EOF
28ef6c31 4241if { (eval echo configure:4242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
4242then
4243 :
4244else
4245 echo "configure: failed program was:" >&5
4246 cat conftest.$ac_ext >&5
4247 rm -fr conftest*
4248 ac_cv_header_stdc=no
4249fi
4250rm -fr conftest*
4251fi
4252
4253fi
4254fi
4255
4256echo "$ac_t""$ac_cv_header_stdc" 1>&6
4257if test $ac_cv_header_stdc = yes; then
4258 cat >> confdefs.h <<\EOF
4259#define STDC_HEADERS 1
4260EOF
4261
4262fi
4263
4264echo $ac_n "checking for off_t""... $ac_c" 1>&6
28ef6c31 4265echo "configure:4266: checking for off_t" >&5
ccc6cda3
JA
4266if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
4267 echo $ac_n "(cached) $ac_c" 1>&6
4268else
4269 cat > conftest.$ac_ext <<EOF
28ef6c31 4270#line 4271 "configure"
ccc6cda3
JA
4271#include "confdefs.h"
4272#include <sys/types.h>
4273#if STDC_HEADERS
4274#include <stdlib.h>
4275#include <stddef.h>
4276#endif
4277EOF
4278if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
bb70624e 4279 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
ccc6cda3
JA
4280 rm -rf conftest*
4281 ac_cv_type_off_t=yes
4282else
4283 rm -rf conftest*
4284 ac_cv_type_off_t=no
4285fi
4286rm -f conftest*
4287
4288fi
4289echo "$ac_t""$ac_cv_type_off_t" 1>&6
4290if test $ac_cv_type_off_t = no; then
4291 cat >> confdefs.h <<\EOF
4292#define off_t long
4293EOF
4294
4295fi
4296
4297echo $ac_n "checking for mode_t""... $ac_c" 1>&6
28ef6c31 4298echo "configure:4299: checking for mode_t" >&5
ccc6cda3
JA
4299if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
4300 echo $ac_n "(cached) $ac_c" 1>&6
4301else
4302 cat > conftest.$ac_ext <<EOF
28ef6c31 4303#line 4304 "configure"
ccc6cda3
JA
4304#include "confdefs.h"
4305#include <sys/types.h>
4306#if STDC_HEADERS
4307#include <stdlib.h>
4308#include <stddef.h>
4309#endif
4310EOF
4311if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
bb70624e 4312 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
ccc6cda3
JA
4313 rm -rf conftest*
4314 ac_cv_type_mode_t=yes
4315else
4316 rm -rf conftest*
4317 ac_cv_type_mode_t=no
4318fi
4319rm -f conftest*
4320
4321fi
4322echo "$ac_t""$ac_cv_type_mode_t" 1>&6
4323if test $ac_cv_type_mode_t = no; then
4324 cat >> confdefs.h <<\EOF
4325#define mode_t int
4326EOF
4327
4328fi
4329
4330echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
28ef6c31 4331echo "configure:4332: checking for uid_t in sys/types.h" >&5
ccc6cda3
JA
4332if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
4333 echo $ac_n "(cached) $ac_c" 1>&6
4334else
4335 cat > conftest.$ac_ext <<EOF
28ef6c31 4336#line 4337 "configure"
ccc6cda3
JA
4337#include "confdefs.h"
4338#include <sys/types.h>
4339EOF
4340if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4341 egrep "uid_t" >/dev/null 2>&1; then
4342 rm -rf conftest*
4343 ac_cv_type_uid_t=yes
4344else
4345 rm -rf conftest*
4346 ac_cv_type_uid_t=no
4347fi
4348rm -f conftest*
4349
4350fi
4351
4352echo "$ac_t""$ac_cv_type_uid_t" 1>&6
4353if test $ac_cv_type_uid_t = no; then
4354 cat >> confdefs.h <<\EOF
4355#define uid_t int
4356EOF
4357
4358 cat >> confdefs.h <<\EOF
4359#define gid_t int
4360EOF
4361
4362fi
4363
4364echo $ac_n "checking for pid_t""... $ac_c" 1>&6
28ef6c31 4365echo "configure:4366: checking for pid_t" >&5
ccc6cda3
JA
4366if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
4367 echo $ac_n "(cached) $ac_c" 1>&6
4368else
4369 cat > conftest.$ac_ext <<EOF
28ef6c31 4370#line 4371 "configure"
ccc6cda3
JA
4371#include "confdefs.h"
4372#include <sys/types.h>
4373#if STDC_HEADERS
4374#include <stdlib.h>
4375#include <stddef.h>
4376#endif
4377EOF
4378if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
bb70624e 4379 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
ccc6cda3
JA
4380 rm -rf conftest*
4381 ac_cv_type_pid_t=yes
4382else
4383 rm -rf conftest*
4384 ac_cv_type_pid_t=no
4385fi
4386rm -f conftest*
4387
4388fi
4389echo "$ac_t""$ac_cv_type_pid_t" 1>&6
4390if test $ac_cv_type_pid_t = no; then
4391 cat >> confdefs.h <<\EOF
4392#define pid_t int
4393EOF
4394
4395fi
4396
4397echo $ac_n "checking for size_t""... $ac_c" 1>&6
28ef6c31 4398echo "configure:4399: checking for size_t" >&5
ccc6cda3
JA
4399if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
4400 echo $ac_n "(cached) $ac_c" 1>&6
4401else
4402 cat > conftest.$ac_ext <<EOF
28ef6c31 4403#line 4404 "configure"
ccc6cda3
JA
4404#include "confdefs.h"
4405#include <sys/types.h>
4406#if STDC_HEADERS
4407#include <stdlib.h>
4408#include <stddef.h>
4409#endif
4410EOF
4411if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
bb70624e 4412 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
ccc6cda3
JA
4413 rm -rf conftest*
4414 ac_cv_type_size_t=yes
4415else
4416 rm -rf conftest*
4417 ac_cv_type_size_t=no
4418fi
4419rm -f conftest*
4420
4421fi
4422echo "$ac_t""$ac_cv_type_size_t" 1>&6
4423if test $ac_cv_type_size_t = no; then
4424 cat >> confdefs.h <<\EOF
4425#define size_t unsigned
4426EOF
4427
4428fi
4429
4430echo $ac_n "checking for time_t""... $ac_c" 1>&6
28ef6c31 4431echo "configure:4432: checking for time_t" >&5
ccc6cda3
JA
4432if eval "test \"`echo '$''{'ac_cv_type_time_t'+set}'`\" = set"; then
4433 echo $ac_n "(cached) $ac_c" 1>&6
4434else
4435 cat > conftest.$ac_ext <<EOF
28ef6c31 4436#line 4437 "configure"
ccc6cda3
JA
4437#include "confdefs.h"
4438#include <sys/types.h>
4439#if STDC_HEADERS
4440#include <stdlib.h>
4441#include <stddef.h>
4442#endif
4443EOF
4444if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
bb70624e 4445 egrep "(^|[^a-zA-Z_0-9])time_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
ccc6cda3
JA
4446 rm -rf conftest*
4447 ac_cv_type_time_t=yes
4448else
4449 rm -rf conftest*
4450 ac_cv_type_time_t=no
4451fi
4452rm -f conftest*
4453
4454fi
4455echo "$ac_t""$ac_cv_type_time_t" 1>&6
4456if test $ac_cv_type_time_t = no; then
4457 cat >> confdefs.h <<\EOF
4458#define time_t long
4459EOF
4460
4461fi
4462
4463
4464echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
28ef6c31 4465echo "configure:4466: checking return type of signal handlers" >&5
ccc6cda3
JA
4466if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
4467 echo $ac_n "(cached) $ac_c" 1>&6
4468else
4469 cat > conftest.$ac_ext <<EOF
28ef6c31 4470#line 4471 "configure"
ccc6cda3
JA
4471#include "confdefs.h"
4472#include <sys/types.h>
4473#include <signal.h>
4474#ifdef signal
4475#undef signal
4476#endif
4477#ifdef __cplusplus
4478extern "C" void (*signal (int, void (*)(int)))(int);
4479#else
4480void (*signal ()) ();
4481#endif
4482
4483int main() {
4484int i;
4485; return 0; }
4486EOF
28ef6c31 4487if { (eval echo configure:4488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ccc6cda3
JA
4488 rm -rf conftest*
4489 ac_cv_type_signal=void
4490else
4491 echo "configure: failed program was:" >&5
4492 cat conftest.$ac_ext >&5
4493 rm -rf conftest*
4494 ac_cv_type_signal=int
4495fi
4496rm -f conftest*
4497fi
4498
4499echo "$ac_t""$ac_cv_type_signal" 1>&6
4500cat >> confdefs.h <<EOF
4501#define RETSIGTYPE $ac_cv_type_signal
4502EOF
4503
4504
4505
bb70624e 4506echo $ac_n "checking size of char""... $ac_c" 1>&6
28ef6c31 4507echo "configure:4508: checking size of char" >&5
bb70624e
JA
4508if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
4509 echo $ac_n "(cached) $ac_c" 1>&6
4510else
4511 if test "$cross_compiling" = yes; then
4512 ac_cv_sizeof_char=1
4513else
4514 cat > conftest.$ac_ext <<EOF
28ef6c31 4515#line 4516 "configure"
bb70624e
JA
4516#include "confdefs.h"
4517#include <stdio.h>
4518main()
4519{
4520 FILE *f=fopen("conftestval", "w");
4521 if (!f) exit(1);
4522 fprintf(f, "%d\n", sizeof(char));
4523 exit(0);
4524}
4525EOF
28ef6c31 4526if { (eval echo configure:4527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
bb70624e
JA
4527then
4528 ac_cv_sizeof_char=`cat conftestval`
4529else
4530 echo "configure: failed program was:" >&5
4531 cat conftest.$ac_ext >&5
4532 rm -fr conftest*
4533 ac_cv_sizeof_char=0
4534fi
4535rm -fr conftest*
4536fi
4537
4538fi
4539echo "$ac_t""$ac_cv_sizeof_char" 1>&6
4540cat >> confdefs.h <<EOF
4541#define SIZEOF_CHAR $ac_cv_sizeof_char
4542EOF
4543
4544
4545echo $ac_n "checking size of short""... $ac_c" 1>&6
28ef6c31 4546echo "configure:4547: checking size of short" >&5
bb70624e
JA
4547if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
4548 echo $ac_n "(cached) $ac_c" 1>&6
4549else
4550 if test "$cross_compiling" = yes; then
4551 ac_cv_sizeof_short=2
4552else
4553 cat > conftest.$ac_ext <<EOF
28ef6c31 4554#line 4555 "configure"
bb70624e
JA
4555#include "confdefs.h"
4556#include <stdio.h>
4557main()
4558{
4559 FILE *f=fopen("conftestval", "w");
4560 if (!f) exit(1);
4561 fprintf(f, "%d\n", sizeof(short));
4562 exit(0);
4563}
4564EOF
28ef6c31 4565if { (eval echo configure:4566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
bb70624e
JA
4566then
4567 ac_cv_sizeof_short=`cat conftestval`
4568else
4569 echo "configure: failed program was:" >&5
4570 cat conftest.$ac_ext >&5
4571 rm -fr conftest*
4572 ac_cv_sizeof_short=0
4573fi
4574rm -fr conftest*
4575fi
4576
4577fi
4578echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4579cat >> confdefs.h <<EOF
4580#define SIZEOF_SHORT $ac_cv_sizeof_short
4581EOF
4582
4583
cce855bc 4584echo $ac_n "checking size of int""... $ac_c" 1>&6
28ef6c31 4585echo "configure:4586: checking size of int" >&5
cce855bc
JA
4586if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
4587 echo $ac_n "(cached) $ac_c" 1>&6
4588else
4589 if test "$cross_compiling" = yes; then
b72432fd 4590 ac_cv_sizeof_int=4
cce855bc
JA
4591else
4592 cat > conftest.$ac_ext <<EOF
28ef6c31 4593#line 4594 "configure"
cce855bc
JA
4594#include "confdefs.h"
4595#include <stdio.h>
4596main()
4597{
4598 FILE *f=fopen("conftestval", "w");
4599 if (!f) exit(1);
4600 fprintf(f, "%d\n", sizeof(int));
4601 exit(0);
4602}
4603EOF
28ef6c31 4604if { (eval echo configure:4605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
cce855bc
JA
4605then
4606 ac_cv_sizeof_int=`cat conftestval`
4607else
4608 echo "configure: failed program was:" >&5
4609 cat conftest.$ac_ext >&5
4610 rm -fr conftest*
4611 ac_cv_sizeof_int=0
4612fi
4613rm -fr conftest*
4614fi
4615
4616fi
4617echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4618cat >> confdefs.h <<EOF
4619#define SIZEOF_INT $ac_cv_sizeof_int
4620EOF
4621
4622
4623echo $ac_n "checking size of long""... $ac_c" 1>&6
28ef6c31 4624echo "configure:4625: checking size of long" >&5
cce855bc
JA
4625if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
4626 echo $ac_n "(cached) $ac_c" 1>&6
4627else
4628 if test "$cross_compiling" = yes; then
b72432fd 4629 ac_cv_sizeof_long=4
cce855bc
JA
4630else
4631 cat > conftest.$ac_ext <<EOF
28ef6c31 4632#line 4633 "configure"
cce855bc
JA
4633#include "confdefs.h"
4634#include <stdio.h>
4635main()
4636{
4637 FILE *f=fopen("conftestval", "w");
4638 if (!f) exit(1);
4639 fprintf(f, "%d\n", sizeof(long));
4640 exit(0);
4641}
4642EOF
28ef6c31 4643if { (eval echo configure:4644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
cce855bc
JA
4644then
4645 ac_cv_sizeof_long=`cat conftestval`
4646else
4647 echo "configure: failed program was:" >&5
4648 cat conftest.$ac_ext >&5
4649 rm -fr conftest*
4650 ac_cv_sizeof_long=0
4651fi
4652rm -fr conftest*
4653fi
4654
4655fi
4656echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4657cat >> confdefs.h <<EOF
4658#define SIZEOF_LONG $ac_cv_sizeof_long
4659EOF
4660
4661
4662echo $ac_n "checking size of char *""... $ac_c" 1>&6
28ef6c31 4663echo "configure:4664: checking size of char *" >&5
cce855bc
JA
4664if eval "test \"`echo '$''{'ac_cv_sizeof_char_p'+set}'`\" = set"; then
4665 echo $ac_n "(cached) $ac_c" 1>&6
4666else
4667 if test "$cross_compiling" = yes; then
b72432fd 4668 ac_cv_sizeof_char_p=4
cce855bc
JA
4669else
4670 cat > conftest.$ac_ext <<EOF
28ef6c31 4671#line 4672 "configure"
cce855bc
JA
4672#include "confdefs.h"
4673#include <stdio.h>
4674main()
4675{
4676 FILE *f=fopen("conftestval", "w");
4677 if (!f) exit(1);
4678 fprintf(f, "%d\n", sizeof(char *));
4679 exit(0);
4680}
4681EOF
28ef6c31 4682if { (eval echo configure:4683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
cce855bc
JA
4683then
4684 ac_cv_sizeof_char_p=`cat conftestval`
4685else
4686 echo "configure: failed program was:" >&5
4687 cat conftest.$ac_ext >&5
4688 rm -fr conftest*
4689 ac_cv_sizeof_char_p=0
4690fi
4691rm -fr conftest*
4692fi
4693
4694fi
4695echo "$ac_t""$ac_cv_sizeof_char_p" 1>&6
4696cat >> confdefs.h <<EOF
4697#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p
4698EOF
4699
4700
b72432fd 4701echo $ac_n "checking size of double""... $ac_c" 1>&6
28ef6c31 4702echo "configure:4703: checking size of double" >&5
b72432fd
JA
4703if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
4704 echo $ac_n "(cached) $ac_c" 1>&6
4705else
bb70624e
JA
4706 if test "$cross_compiling" = yes; then
4707 ac_cv_sizeof_double=8
4708else
4709 cat > conftest.$ac_ext <<EOF
28ef6c31 4710#line 4711 "configure"
bb70624e
JA
4711#include "confdefs.h"
4712#include <stdio.h>
4713main()
4714{
4715 FILE *f=fopen("conftestval", "w");
4716 if (!f) exit(1);
4717 fprintf(f, "%d\n", sizeof(double));
4718 exit(0);
4719}
4720EOF
28ef6c31 4721if { (eval echo configure:4722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
bb70624e
JA
4722then
4723 ac_cv_sizeof_double=`cat conftestval`
4724else
4725 echo "configure: failed program was:" >&5
4726 cat conftest.$ac_ext >&5
4727 rm -fr conftest*
4728 ac_cv_sizeof_double=0
4729fi
4730rm -fr conftest*
4731fi
4732
4733fi
4734echo "$ac_t""$ac_cv_sizeof_double" 1>&6
4735cat >> confdefs.h <<EOF
4736#define SIZEOF_DOUBLE $ac_cv_sizeof_double
4737EOF
4738
4739
4740
4741echo $ac_n "checking for u_int""... $ac_c" 1>&6
28ef6c31 4742echo "configure:4743: checking for u_int" >&5
bb70624e
JA
4743if eval "test \"`echo '$''{'ac_cv_type_u_int'+set}'`\" = set"; then
4744 echo $ac_n "(cached) $ac_c" 1>&6
4745else
4746 cat > conftest.$ac_ext <<EOF
28ef6c31 4747#line 4748 "configure"
bb70624e
JA
4748#include "confdefs.h"
4749#include <sys/types.h>
4750#if STDC_HEADERS
4751#include <stdlib.h>
4752#include <stddef.h>
4753#endif
4754EOF
4755if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4756 egrep "(^|[^a-zA-Z_0-9])u_int[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4757 rm -rf conftest*
4758 ac_cv_type_u_int=yes
4759else
4760 rm -rf conftest*
4761 ac_cv_type_u_int=no
4762fi
4763rm -f conftest*
4764
4765fi
4766echo "$ac_t""$ac_cv_type_u_int" 1>&6
4767if test $ac_cv_type_u_int = no; then
4768 cat >> confdefs.h <<\EOF
4769#define u_int unsigned int
4770EOF
4771
4772fi
4773
4774echo $ac_n "checking for u_long""... $ac_c" 1>&6
28ef6c31 4775echo "configure:4776: checking for u_long" >&5
bb70624e
JA
4776if eval "test \"`echo '$''{'ac_cv_type_u_long'+set}'`\" = set"; then
4777 echo $ac_n "(cached) $ac_c" 1>&6
4778else
4779 cat > conftest.$ac_ext <<EOF
28ef6c31 4780#line 4781 "configure"
bb70624e
JA
4781#include "confdefs.h"
4782#include <sys/types.h>
4783#if STDC_HEADERS
4784#include <stdlib.h>
4785#include <stddef.h>
4786#endif
4787EOF
4788if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4789 egrep "(^|[^a-zA-Z_0-9])u_long[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4790 rm -rf conftest*
4791 ac_cv_type_u_long=yes
4792else
4793 rm -rf conftest*
4794 ac_cv_type_u_long=no
4795fi
4796rm -f conftest*
4797
4798fi
4799echo "$ac_t""$ac_cv_type_u_long" 1>&6
4800if test $ac_cv_type_u_long = no; then
4801 cat >> confdefs.h <<\EOF
4802#define u_long unsigned long
4803EOF
4804
4805fi
4806
4807
4808
4809if test "$ac_cv_sizeof_short" = 2; then
4810 echo $ac_n "checking for bits16_t""... $ac_c" 1>&6
28ef6c31 4811echo "configure:4812: checking for bits16_t" >&5
bb70624e
JA
4812if eval "test \"`echo '$''{'ac_cv_type_bits16_t'+set}'`\" = set"; then
4813 echo $ac_n "(cached) $ac_c" 1>&6
4814else
4815 cat > conftest.$ac_ext <<EOF
28ef6c31 4816#line 4817 "configure"
bb70624e
JA
4817#include "confdefs.h"
4818#include <sys/types.h>
4819#if STDC_HEADERS
4820#include <stdlib.h>
4821#include <stddef.h>
4822#endif
4823EOF
4824if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4825 egrep "(^|[^a-zA-Z_0-9])bits16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4826 rm -rf conftest*
4827 ac_cv_type_bits16_t=yes
4828else
4829 rm -rf conftest*
4830 ac_cv_type_bits16_t=no
4831fi
4832rm -f conftest*
4833
4834fi
4835echo "$ac_t""$ac_cv_type_bits16_t" 1>&6
4836if test $ac_cv_type_bits16_t = no; then
4837 cat >> confdefs.h <<\EOF
4838#define bits16_t short
4839EOF
4840
4841fi
4842
4843elif test "$ac_cv_sizeof_char" = 2; then
4844 echo $ac_n "checking for bits16_t""... $ac_c" 1>&6
28ef6c31 4845echo "configure:4846: checking for bits16_t" >&5
bb70624e
JA
4846if eval "test \"`echo '$''{'ac_cv_type_bits16_t'+set}'`\" = set"; then
4847 echo $ac_n "(cached) $ac_c" 1>&6
4848else
4849 cat > conftest.$ac_ext <<EOF
28ef6c31 4850#line 4851 "configure"
bb70624e
JA
4851#include "confdefs.h"
4852#include <sys/types.h>
4853#if STDC_HEADERS
4854#include <stdlib.h>
4855#include <stddef.h>
4856#endif
4857EOF
4858if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4859 egrep "(^|[^a-zA-Z_0-9])bits16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4860 rm -rf conftest*
4861 ac_cv_type_bits16_t=yes
4862else
4863 rm -rf conftest*
4864 ac_cv_type_bits16_t=no
4865fi
4866rm -f conftest*
4867
4868fi
4869echo "$ac_t""$ac_cv_type_bits16_t" 1>&6
4870if test $ac_cv_type_bits16_t = no; then
4871 cat >> confdefs.h <<\EOF
4872#define bits16_t char
4873EOF
4874
4875fi
4876
4877else
4878 echo $ac_n "checking for bits16_t""... $ac_c" 1>&6
28ef6c31 4879echo "configure:4880: checking for bits16_t" >&5
bb70624e
JA
4880if eval "test \"`echo '$''{'ac_cv_type_bits16_t'+set}'`\" = set"; then
4881 echo $ac_n "(cached) $ac_c" 1>&6
b72432fd
JA
4882else
4883 cat > conftest.$ac_ext <<EOF
28ef6c31 4884#line 4885 "configure"
b72432fd 4885#include "confdefs.h"
bb70624e
JA
4886#include <sys/types.h>
4887#if STDC_HEADERS
4888#include <stdlib.h>
4889#include <stddef.h>
4890#endif
b72432fd 4891EOF
bb70624e
JA
4892if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4893 egrep "(^|[^a-zA-Z_0-9])bits16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4894 rm -rf conftest*
4895 ac_cv_type_bits16_t=yes
b72432fd 4896else
bb70624e
JA
4897 rm -rf conftest*
4898 ac_cv_type_bits16_t=no
b72432fd 4899fi
bb70624e 4900rm -f conftest*
b72432fd
JA
4901
4902fi
bb70624e
JA
4903echo "$ac_t""$ac_cv_type_bits16_t" 1>&6
4904if test $ac_cv_type_bits16_t = no; then
4905 cat >> confdefs.h <<\EOF
4906#define bits16_t short
b72432fd
JA
4907EOF
4908
bb70624e 4909fi
b72432fd 4910
bb70624e 4911fi
b72432fd 4912
cce855bc 4913
bb70624e
JA
4914if test "$ac_cv_sizeof_short" = 2; then
4915 echo $ac_n "checking for u_bits16_t""... $ac_c" 1>&6
28ef6c31 4916echo "configure:4917: checking for u_bits16_t" >&5
bb70624e 4917if eval "test \"`echo '$''{'ac_cv_type_u_bits16_t'+set}'`\" = set"; then
cce855bc
JA
4918 echo $ac_n "(cached) $ac_c" 1>&6
4919else
4920 cat > conftest.$ac_ext <<EOF
28ef6c31 4921#line 4922 "configure"
cce855bc
JA
4922#include "confdefs.h"
4923#include <sys/types.h>
4924#if STDC_HEADERS
4925#include <stdlib.h>
4926#include <stddef.h>
4927#endif
4928EOF
4929if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
bb70624e 4930 egrep "(^|[^a-zA-Z_0-9])u_bits16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
cce855bc 4931 rm -rf conftest*
bb70624e 4932 ac_cv_type_u_bits16_t=yes
cce855bc
JA
4933else
4934 rm -rf conftest*
bb70624e 4935 ac_cv_type_u_bits16_t=no
cce855bc
JA
4936fi
4937rm -f conftest*
4938
4939fi
bb70624e
JA
4940echo "$ac_t""$ac_cv_type_u_bits16_t" 1>&6
4941if test $ac_cv_type_u_bits16_t = no; then
cce855bc 4942 cat >> confdefs.h <<\EOF
bb70624e 4943#define u_bits16_t unsigned short
cce855bc
JA
4944EOF
4945
4946fi
4947
bb70624e
JA
4948elif test "$ac_cv_sizeof_char" = 2; then
4949 echo $ac_n "checking for u_bits16_t""... $ac_c" 1>&6
28ef6c31 4950echo "configure:4951: checking for u_bits16_t" >&5
bb70624e 4951if eval "test \"`echo '$''{'ac_cv_type_u_bits16_t'+set}'`\" = set"; then
cce855bc 4952 echo $ac_n "(cached) $ac_c" 1>&6
cce855bc
JA
4953else
4954 cat > conftest.$ac_ext <<EOF
28ef6c31 4955#line 4956 "configure"
cce855bc 4956#include "confdefs.h"
b72432fd
JA
4957#include <sys/types.h>
4958#if STDC_HEADERS
4959#include <stdlib.h>
4960#include <stddef.h>
cce855bc 4961#endif
cce855bc 4962EOF
b72432fd 4963if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
bb70624e 4964 egrep "(^|[^a-zA-Z_0-9])u_bits16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
b72432fd 4965 rm -rf conftest*
bb70624e 4966 ac_cv_type_u_bits16_t=yes
cce855bc 4967else
b72432fd 4968 rm -rf conftest*
bb70624e 4969 ac_cv_type_u_bits16_t=no
cce855bc 4970fi
b72432fd
JA
4971rm -f conftest*
4972
cce855bc 4973fi
bb70624e
JA
4974echo "$ac_t""$ac_cv_type_u_bits16_t" 1>&6
4975if test $ac_cv_type_u_bits16_t = no; then
b72432fd 4976 cat >> confdefs.h <<\EOF
bb70624e 4977#define u_bits16_t unsigned char
b72432fd 4978EOF
cce855bc
JA
4979
4980fi
4981
b72432fd 4982else
bb70624e 4983 echo $ac_n "checking for u_bits16_t""... $ac_c" 1>&6
28ef6c31 4984echo "configure:4985: checking for u_bits16_t" >&5
bb70624e 4985if eval "test \"`echo '$''{'ac_cv_type_u_bits16_t'+set}'`\" = set"; then
b72432fd
JA
4986 echo $ac_n "(cached) $ac_c" 1>&6
4987else
4988 cat > conftest.$ac_ext <<EOF
28ef6c31 4989#line 4990 "configure"
b72432fd
JA
4990#include "confdefs.h"
4991#include <sys/types.h>
4992#if STDC_HEADERS
4993#include <stdlib.h>
4994#include <stddef.h>
4995#endif
4996EOF
4997if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
bb70624e 4998 egrep "(^|[^a-zA-Z_0-9])u_bits16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
b72432fd 4999 rm -rf conftest*
bb70624e 5000 ac_cv_type_u_bits16_t=yes
b72432fd
JA
5001else
5002 rm -rf conftest*
bb70624e 5003 ac_cv_type_u_bits16_t=no
cce855bc 5004fi
b72432fd
JA
5005rm -f conftest*
5006
5007fi
bb70624e
JA
5008echo "$ac_t""$ac_cv_type_u_bits16_t" 1>&6
5009if test $ac_cv_type_u_bits16_t = no; then
b72432fd 5010 cat >> confdefs.h <<\EOF
bb70624e 5011#define u_bits16_t unsigned short
cce855bc
JA
5012EOF
5013
b72432fd
JA
5014fi
5015
5016fi
5017
5018
5019if test "$ac_cv_sizeof_int" = 4; then
bb70624e 5020 echo $ac_n "checking for bits32_t""... $ac_c" 1>&6
28ef6c31 5021echo "configure:5022: checking for bits32_t" >&5
bb70624e 5022if eval "test \"`echo '$''{'ac_cv_type_bits32_t'+set}'`\" = set"; then
b72432fd 5023 echo $ac_n "(cached) $ac_c" 1>&6
cce855bc 5024else
b72432fd 5025 cat > conftest.$ac_ext <<EOF
28ef6c31 5026#line 5027 "configure"
b72432fd
JA
5027#include "confdefs.h"
5028#include <sys/types.h>
5029#if STDC_HEADERS
5030#include <stdlib.h>
5031#include <stddef.h>
5032#endif
cce855bc 5033EOF
b72432fd 5034if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
bb70624e 5035 egrep "(^|[^a-zA-Z_0-9])bits32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
b72432fd 5036 rm -rf conftest*
bb70624e 5037 ac_cv_type_bits32_t=yes
b72432fd
JA
5038else
5039 rm -rf conftest*
bb70624e 5040 ac_cv_type_bits32_t=no
b72432fd
JA
5041fi
5042rm -f conftest*
cce855bc
JA
5043
5044fi
bb70624e
JA
5045echo "$ac_t""$ac_cv_type_bits32_t" 1>&6
5046if test $ac_cv_type_bits32_t = no; then
b72432fd 5047 cat >> confdefs.h <<\EOF
bb70624e 5048#define bits32_t int
b72432fd 5049EOF
cce855bc
JA
5050
5051fi
b72432fd
JA
5052
5053elif test "$ac_cv_sizeof_long" = 4; then
bb70624e 5054 echo $ac_n "checking for bits32_t""... $ac_c" 1>&6
28ef6c31 5055echo "configure:5056: checking for bits32_t" >&5
bb70624e 5056if eval "test \"`echo '$''{'ac_cv_type_bits32_t'+set}'`\" = set"; then
cce855bc
JA
5057 echo $ac_n "(cached) $ac_c" 1>&6
5058else
5059 cat > conftest.$ac_ext <<EOF
28ef6c31 5060#line 5061 "configure"
cce855bc
JA
5061#include "confdefs.h"
5062#include <sys/types.h>
5063#if STDC_HEADERS
5064#include <stdlib.h>
5065#include <stddef.h>
5066#endif
5067EOF
5068if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
bb70624e 5069 egrep "(^|[^a-zA-Z_0-9])bits32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
cce855bc 5070 rm -rf conftest*
bb70624e 5071 ac_cv_type_bits32_t=yes
cce855bc
JA
5072else
5073 rm -rf conftest*
bb70624e 5074 ac_cv_type_bits32_t=no
cce855bc
JA
5075fi
5076rm -f conftest*
5077
5078fi
bb70624e
JA
5079echo "$ac_t""$ac_cv_type_bits32_t" 1>&6
5080if test $ac_cv_type_bits32_t = no; then
cce855bc 5081 cat >> confdefs.h <<\EOF
bb70624e 5082#define bits32_t long
cce855bc
JA
5083EOF
5084
5085fi
5086
cce855bc 5087else
bb70624e 5088 echo $ac_n "checking for bits32_t""... $ac_c" 1>&6
28ef6c31 5089echo "configure:5090: checking for bits32_t" >&5
bb70624e 5090if eval "test \"`echo '$''{'ac_cv_type_bits32_t'+set}'`\" = set"; then
cce855bc 5091 echo $ac_n "(cached) $ac_c" 1>&6
cce855bc
JA
5092else
5093 cat > conftest.$ac_ext <<EOF
28ef6c31 5094#line 5095 "configure"
cce855bc 5095#include "confdefs.h"
b72432fd
JA
5096#include <sys/types.h>
5097#if STDC_HEADERS
5098#include <stdlib.h>
5099#include <stddef.h>
cce855bc 5100#endif
cce855bc 5101EOF
b72432fd 5102if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
bb70624e 5103 egrep "(^|[^a-zA-Z_0-9])bits32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
b72432fd 5104 rm -rf conftest*
bb70624e 5105 ac_cv_type_bits32_t=yes
cce855bc 5106else
b72432fd 5107 rm -rf conftest*
bb70624e 5108 ac_cv_type_bits32_t=no
cce855bc 5109fi
b72432fd
JA
5110rm -f conftest*
5111
cce855bc 5112fi
bb70624e
JA
5113echo "$ac_t""$ac_cv_type_bits32_t" 1>&6
5114if test $ac_cv_type_bits32_t = no; then
b72432fd 5115 cat >> confdefs.h <<\EOF
bb70624e 5116#define bits32_t int
b72432fd 5117EOF
cce855bc
JA
5118
5119fi
5120
cce855bc 5121fi
cce855bc 5122
b72432fd 5123
bb70624e
JA
5124if test "$ac_cv_sizeof_int" = 4; then
5125 echo $ac_n "checking for u_bits32_t""... $ac_c" 1>&6
28ef6c31 5126echo "configure:5127: checking for u_bits32_t" >&5
bb70624e 5127if eval "test \"`echo '$''{'ac_cv_type_u_bits32_t'+set}'`\" = set"; then
b72432fd 5128 echo $ac_n "(cached) $ac_c" 1>&6
cce855bc 5129else
b72432fd 5130 cat > conftest.$ac_ext <<EOF
28ef6c31 5131#line 5132 "configure"
b72432fd
JA
5132#include "confdefs.h"
5133#include <sys/types.h>
5134#if STDC_HEADERS
5135#include <stdlib.h>
5136#include <stddef.h>
5137#endif
cce855bc 5138EOF
b72432fd 5139if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
bb70624e 5140 egrep "(^|[^a-zA-Z_0-9])u_bits32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
b72432fd 5141 rm -rf conftest*
bb70624e 5142 ac_cv_type_u_bits32_t=yes
b72432fd
JA
5143else
5144 rm -rf conftest*
bb70624e 5145 ac_cv_type_u_bits32_t=no
b72432fd
JA
5146fi
5147rm -f conftest*
cce855bc
JA
5148
5149fi
bb70624e
JA
5150echo "$ac_t""$ac_cv_type_u_bits32_t" 1>&6
5151if test $ac_cv_type_u_bits32_t = no; then
b72432fd 5152 cat >> confdefs.h <<\EOF
bb70624e 5153#define u_bits32_t unsigned int
b72432fd 5154EOF
cce855bc
JA
5155
5156fi
5157
bb70624e
JA
5158elif test "$ac_cv_sizeof_long" = 4; then
5159 echo $ac_n "checking for u_bits32_t""... $ac_c" 1>&6
28ef6c31 5160echo "configure:5161: checking for u_bits32_t" >&5
bb70624e 5161if eval "test \"`echo '$''{'ac_cv_type_u_bits32_t'+set}'`\" = set"; then
cce855bc
JA
5162 echo $ac_n "(cached) $ac_c" 1>&6
5163else
5164 cat > conftest.$ac_ext <<EOF
28ef6c31 5165#line 5166 "configure"
cce855bc
JA
5166#include "confdefs.h"
5167#include <sys/types.h>
5168#if STDC_HEADERS
5169#include <stdlib.h>
5170#include <stddef.h>
5171#endif
5172EOF
5173if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
bb70624e 5174 egrep "(^|[^a-zA-Z_0-9])u_bits32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
cce855bc 5175 rm -rf conftest*
bb70624e 5176 ac_cv_type_u_bits32_t=yes
cce855bc
JA
5177else
5178 rm -rf conftest*
bb70624e 5179 ac_cv_type_u_bits32_t=no
cce855bc
JA
5180fi
5181rm -f conftest*
5182
5183fi
bb70624e
JA
5184echo "$ac_t""$ac_cv_type_u_bits32_t" 1>&6
5185if test $ac_cv_type_u_bits32_t = no; then
cce855bc 5186 cat >> confdefs.h <<\EOF
bb70624e 5187#define u_bits32_t unsigned long
cce855bc
JA
5188EOF
5189
5190fi
5191
cce855bc 5192else
bb70624e 5193 echo $ac_n "checking for u_bits32_t""... $ac_c" 1>&6
28ef6c31 5194echo "configure:5195: checking for u_bits32_t" >&5
bb70624e 5195if eval "test \"`echo '$''{'ac_cv_type_u_bits32_t'+set}'`\" = set"; then
cce855bc
JA
5196 echo $ac_n "(cached) $ac_c" 1>&6
5197else
b72432fd 5198 cat > conftest.$ac_ext <<EOF
28ef6c31 5199#line 5200 "configure"
b72432fd
JA
5200#include "confdefs.h"
5201#include <sys/types.h>
5202#if STDC_HEADERS
5203#include <stdlib.h>
5204#include <stddef.h>
5205#endif
5206EOF
5207if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
bb70624e 5208 egrep "(^|[^a-zA-Z_0-9])u_bits32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
b72432fd 5209 rm -rf conftest*
bb70624e 5210 ac_cv_type_u_bits32_t=yes
b72432fd
JA
5211else
5212 rm -rf conftest*
bb70624e 5213 ac_cv_type_u_bits32_t=no
b72432fd
JA
5214fi
5215rm -f conftest*
5216
5217fi
bb70624e
JA
5218echo "$ac_t""$ac_cv_type_u_bits32_t" 1>&6
5219if test $ac_cv_type_u_bits32_t = no; then
b72432fd 5220 cat >> confdefs.h <<\EOF
bb70624e 5221#define u_bits32_t unsigned int
b72432fd
JA
5222EOF
5223
5224fi
cce855bc 5225
b72432fd
JA
5226fi
5227
5228
5229if test "$ac_sv_sizeof_char_p" = 8; then
5230 echo $ac_n "checking for bits64_t""... $ac_c" 1>&6
28ef6c31 5231echo "configure:5232: checking for bits64_t" >&5
b72432fd
JA
5232if eval "test \"`echo '$''{'ac_cv_type_bits64_t'+set}'`\" = set"; then
5233 echo $ac_n "(cached) $ac_c" 1>&6
cce855bc
JA
5234else
5235 cat > conftest.$ac_ext <<EOF
28ef6c31 5236#line 5237 "configure"
cce855bc 5237#include "confdefs.h"
b72432fd
JA
5238#include <sys/types.h>
5239#if STDC_HEADERS
5240#include <stdlib.h>
5241#include <stddef.h>
5242#endif
5243EOF
5244if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
bb70624e 5245 egrep "(^|[^a-zA-Z_0-9])bits64_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
b72432fd
JA
5246 rm -rf conftest*
5247 ac_cv_type_bits64_t=yes
5248else
5249 rm -rf conftest*
5250 ac_cv_type_bits64_t=no
5251fi
5252rm -f conftest*
cce855bc 5253
b72432fd
JA
5254fi
5255echo "$ac_t""$ac_cv_type_bits64_t" 1>&6
5256if test $ac_cv_type_bits64_t = no; then
5257 cat >> confdefs.h <<\EOF
5258#define bits64_t char *
5259EOF
5260
5261fi
5262
5263elif test "$ac_cv_sizeof_double" = 8; then
5264 echo $ac_n "checking for bits64_t""... $ac_c" 1>&6
28ef6c31 5265echo "configure:5266: checking for bits64_t" >&5
b72432fd
JA
5266if eval "test \"`echo '$''{'ac_cv_type_bits64_t'+set}'`\" = set"; then
5267 echo $ac_n "(cached) $ac_c" 1>&6
5268else
5269 cat > conftest.$ac_ext <<EOF
28ef6c31 5270#line 5271 "configure"
b72432fd
JA
5271#include "confdefs.h"
5272#include <sys/types.h>
5273#if STDC_HEADERS
5274#include <stdlib.h>
5275#include <stddef.h>
cce855bc 5276#endif
cce855bc 5277EOF
b72432fd 5278if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
bb70624e 5279 egrep "(^|[^a-zA-Z_0-9])bits64_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
b72432fd
JA
5280 rm -rf conftest*
5281 ac_cv_type_bits64_t=yes
cce855bc 5282else
b72432fd
JA
5283 rm -rf conftest*
5284 ac_cv_type_bits64_t=no
cce855bc 5285fi
b72432fd
JA
5286rm -f conftest*
5287
cce855bc 5288fi
b72432fd
JA
5289echo "$ac_t""$ac_cv_type_bits64_t" 1>&6
5290if test $ac_cv_type_bits64_t = no; then
5291 cat >> confdefs.h <<\EOF
5292#define bits64_t double
5293EOF
cce855bc
JA
5294
5295fi
5296
b72432fd
JA
5297elif test "$ac_cv_sizeof_long" = 8; then
5298 echo $ac_n "checking for bits64_t""... $ac_c" 1>&6
28ef6c31 5299echo "configure:5300: checking for bits64_t" >&5
b72432fd
JA
5300if eval "test \"`echo '$''{'ac_cv_type_bits64_t'+set}'`\" = set"; then
5301 echo $ac_n "(cached) $ac_c" 1>&6
5302else
5303 cat > conftest.$ac_ext <<EOF
28ef6c31 5304#line 5305 "configure"
b72432fd
JA
5305#include "confdefs.h"
5306#include <sys/types.h>
5307#if STDC_HEADERS
5308#include <stdlib.h>
5309#include <stddef.h>
5310#endif
5311EOF
5312if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
bb70624e 5313 egrep "(^|[^a-zA-Z_0-9])bits64_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
b72432fd
JA
5314 rm -rf conftest*
5315 ac_cv_type_bits64_t=yes
5316else
5317 rm -rf conftest*
5318 ac_cv_type_bits64_t=no
cce855bc 5319fi
b72432fd
JA
5320rm -f conftest*
5321
5322fi
5323echo "$ac_t""$ac_cv_type_bits64_t" 1>&6
5324if test $ac_cv_type_bits64_t = no; then
5325 cat >> confdefs.h <<\EOF
5326#define bits64_t long
cce855bc
JA
5327EOF
5328
b72432fd
JA
5329fi
5330
cce855bc 5331else
b72432fd 5332 echo $ac_n "checking for bits64_t""... $ac_c" 1>&6
28ef6c31 5333echo "configure:5334: checking for bits64_t" >&5
b72432fd
JA
5334if eval "test \"`echo '$''{'ac_cv_type_bits64_t'+set}'`\" = set"; then
5335 echo $ac_n "(cached) $ac_c" 1>&6
5336else
5337 cat > conftest.$ac_ext <<EOF
28ef6c31 5338#line 5339 "configure"
b72432fd
JA
5339#include "confdefs.h"
5340#include <sys/types.h>
5341#if STDC_HEADERS
5342#include <stdlib.h>
5343#include <stddef.h>
5344#endif
5345EOF
5346if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
bb70624e 5347 egrep "(^|[^a-zA-Z_0-9])bits64_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
b72432fd
JA
5348 rm -rf conftest*
5349 ac_cv_type_bits64_t=yes
5350else
5351 rm -rf conftest*
5352 ac_cv_type_bits64_t=no
5353fi
5354rm -f conftest*
5355
5356fi
5357echo "$ac_t""$ac_cv_type_bits64_t" 1>&6
5358if test $ac_cv_type_bits64_t = no; then
5359 cat >> confdefs.h <<\EOF
5360#define bits64_t double
cce855bc
JA
5361EOF
5362
5363fi
5364
5365fi
5366
b72432fd 5367
bb70624e
JA
5368
5369if test "$ac_cv_sizeof_int" = "$ac_cv_sizeof_char_p"; then
5370 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
28ef6c31 5371echo "configure:5372: checking for ptrdiff_t" >&5
bb70624e
JA
5372if eval "test \"`echo '$''{'ac_cv_type_ptrdiff_t'+set}'`\" = set"; then
5373 echo $ac_n "(cached) $ac_c" 1>&6
5374else
5375 cat > conftest.$ac_ext <<EOF
28ef6c31 5376#line 5377 "configure"
bb70624e
JA
5377#include "confdefs.h"
5378#include <sys/types.h>
5379#if STDC_HEADERS
5380#include <stdlib.h>
5381#include <stddef.h>
5382#endif
5383EOF
5384if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5385 egrep "(^|[^a-zA-Z_0-9])ptrdiff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5386 rm -rf conftest*
5387 ac_cv_type_ptrdiff_t=yes
5388else
5389 rm -rf conftest*
5390 ac_cv_type_ptrdiff_t=no
5391fi
5392rm -f conftest*
5393
5394fi
5395echo "$ac_t""$ac_cv_type_ptrdiff_t" 1>&6
5396if test $ac_cv_type_ptrdiff_t = no; then
5397 cat >> confdefs.h <<\EOF
5398#define ptrdiff_t int
5399EOF
5400
5401fi
5402
5403elif test "$ac_cv_sizeof_long" = "$ac_cv_sizeof_char_p"; then
5404 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
28ef6c31 5405echo "configure:5406: checking for ptrdiff_t" >&5
bb70624e
JA
5406if eval "test \"`echo '$''{'ac_cv_type_ptrdiff_t'+set}'`\" = set"; then
5407 echo $ac_n "(cached) $ac_c" 1>&6
5408else
5409 cat > conftest.$ac_ext <<EOF
28ef6c31 5410#line 5411 "configure"
bb70624e
JA
5411#include "confdefs.h"
5412#include <sys/types.h>
5413#if STDC_HEADERS
5414#include <stdlib.h>
5415#include <stddef.h>
5416#endif
5417EOF
5418if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5419 egrep "(^|[^a-zA-Z_0-9])ptrdiff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5420 rm -rf conftest*
5421 ac_cv_type_ptrdiff_t=yes
5422else
5423 rm -rf conftest*
5424 ac_cv_type_ptrdiff_t=no
5425fi
5426rm -f conftest*
5427
5428fi
5429echo "$ac_t""$ac_cv_type_ptrdiff_t" 1>&6
5430if test $ac_cv_type_ptrdiff_t = no; then
5431 cat >> confdefs.h <<\EOF
5432#define ptrdiff_t long
5433EOF
5434
5435fi
5436
5437else
5438 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
28ef6c31 5439echo "configure:5440: checking for ptrdiff_t" >&5
bb70624e
JA
5440if eval "test \"`echo '$''{'ac_cv_type_ptrdiff_t'+set}'`\" = set"; then
5441 echo $ac_n "(cached) $ac_c" 1>&6
5442else
5443 cat > conftest.$ac_ext <<EOF
28ef6c31 5444#line 5445 "configure"
bb70624e
JA
5445#include "confdefs.h"
5446#include <sys/types.h>
5447#if STDC_HEADERS
5448#include <stdlib.h>
5449#include <stddef.h>
5450#endif
5451EOF
5452if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5453 egrep "(^|[^a-zA-Z_0-9])ptrdiff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5454 rm -rf conftest*
5455 ac_cv_type_ptrdiff_t=yes
5456else
5457 rm -rf conftest*
5458 ac_cv_type_ptrdiff_t=no
5459fi
5460rm -f conftest*
5461
5462fi
5463echo "$ac_t""$ac_cv_type_ptrdiff_t" 1>&6
5464if test $ac_cv_type_ptrdiff_t = no; then
5465 cat >> confdefs.h <<\EOF
5466#define ptrdiff_t int
5467EOF
5468
5469fi
5470
5471fi
5472
5473
ccc6cda3 5474echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
28ef6c31 5475echo "configure:5476: checking whether stat file-mode macros are broken" >&5
ccc6cda3
JA
5476if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
5477 echo $ac_n "(cached) $ac_c" 1>&6
5478else
5479 cat > conftest.$ac_ext <<EOF
28ef6c31 5480#line 5481 "configure"
ccc6cda3
JA
5481#include "confdefs.h"
5482#include <sys/types.h>
5483#include <sys/stat.h>
5484
5485#if defined(S_ISBLK) && defined(S_IFDIR)
5486# if S_ISBLK (S_IFDIR)
5487You lose.
5488# endif
5489#endif
5490
5491#if defined(S_ISBLK) && defined(S_IFCHR)
5492# if S_ISBLK (S_IFCHR)
5493You lose.
5494# endif
5495#endif
5496
5497#if defined(S_ISLNK) && defined(S_IFREG)
5498# if S_ISLNK (S_IFREG)
5499You lose.
5500# endif
5501#endif
5502
5503#if defined(S_ISSOCK) && defined(S_IFREG)
5504# if S_ISSOCK (S_IFREG)
5505You lose.
5506# endif
5507#endif
5508
5509EOF
5510if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5511 egrep "You lose" >/dev/null 2>&1; then
5512 rm -rf conftest*
5513 ac_cv_header_stat_broken=yes
5514else
5515 rm -rf conftest*
5516 ac_cv_header_stat_broken=no
5517fi
5518rm -f conftest*
5519
5520fi
5521
5522echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
5523if test $ac_cv_header_stat_broken = yes; then
5524 cat >> confdefs.h <<\EOF
5525#define STAT_MACROS_BROKEN 1
5526EOF
5527
5528fi
5529
ccc6cda3
JA
5530
5531echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
28ef6c31 5532echo "configure:5533: checking whether byte ordering is bigendian" >&5
ccc6cda3
JA
5533if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
5534 echo $ac_n "(cached) $ac_c" 1>&6
5535else
5536 ac_cv_c_bigendian=unknown
5537# See if sys/param.h defines the BYTE_ORDER macro.
5538cat > conftest.$ac_ext <<EOF
28ef6c31 5539#line 5540 "configure"
ccc6cda3
JA
5540#include "confdefs.h"
5541#include <sys/types.h>
5542#include <sys/param.h>
5543int main() {
5544
5545#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
5546 bogus endian macros
5547#endif
5548; return 0; }
5549EOF
28ef6c31 5550if { (eval echo configure:5551: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ccc6cda3
JA
5551 rm -rf conftest*
5552 # It does; now see whether it defined to BIG_ENDIAN or not.
5553cat > conftest.$ac_ext <<EOF
28ef6c31 5554#line 5555 "configure"
ccc6cda3
JA
5555#include "confdefs.h"
5556#include <sys/types.h>
5557#include <sys/param.h>
5558int main() {
5559
5560#if BYTE_ORDER != BIG_ENDIAN
5561 not big endian
5562#endif
5563; return 0; }
5564EOF
28ef6c31 5565if { (eval echo configure:5566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ccc6cda3
JA
5566 rm -rf conftest*
5567 ac_cv_c_bigendian=yes
5568else
5569 echo "configure: failed program was:" >&5
5570 cat conftest.$ac_ext >&5
5571 rm -rf conftest*
5572 ac_cv_c_bigendian=no
5573fi
5574rm -f conftest*
5575else
5576 echo "configure: failed program was:" >&5
5577 cat conftest.$ac_ext >&5
5578fi
5579rm -f conftest*
5580if test $ac_cv_c_bigendian = unknown; then
5581if test "$cross_compiling" = yes; then
5582 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5583else
5584 cat > conftest.$ac_ext <<EOF
28ef6c31 5585#line 5586 "configure"
ccc6cda3
JA
5586#include "confdefs.h"
5587main () {
5588 /* Are we little or big endian? From Harbison&Steele. */
5589 union
5590 {
5591 long l;
5592 char c[sizeof (long)];
5593 } u;
5594 u.l = 1;
5595 exit (u.c[sizeof (long) - 1] == 1);
5596}
5597EOF
28ef6c31 5598if { (eval echo configure:5599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
5599then
5600 ac_cv_c_bigendian=no
5601else
5602 echo "configure: failed program was:" >&5
5603 cat conftest.$ac_ext >&5
5604 rm -fr conftest*
5605 ac_cv_c_bigendian=yes
5606fi
5607rm -fr conftest*
5608fi
5609
5610fi
5611fi
5612
5613echo "$ac_t""$ac_cv_c_bigendian" 1>&6
5614if test $ac_cv_c_bigendian = yes; then
5615 cat >> confdefs.h <<\EOF
5616#define WORDS_BIGENDIAN 1
5617EOF
5618
5619fi
5620
5621
5622# Pull the hash mark out of the macro call to avoid m4 problems.
5623ac_msg="whether #! works in shell scripts"
5624echo $ac_n "checking $ac_msg""... $ac_c" 1>&6
28ef6c31 5625echo "configure:5626: checking $ac_msg" >&5
ccc6cda3
JA
5626if eval "test \"`echo '$''{'ac_cv_sys_interpreter'+set}'`\" = set"; then
5627 echo $ac_n "(cached) $ac_c" 1>&6
5628else
5629 echo '#! /bin/cat
5630exit 69
5631' > conftest
5632chmod u+x conftest
5633(SHELL=/bin/sh; export SHELL; ./conftest >/dev/null)
5634if test $? -ne 69; then
5635 ac_cv_sys_interpreter=yes
5636else
5637 ac_cv_sys_interpreter=no
5638fi
5639rm -f conftest
5640fi
5641
5642echo "$ac_t""$ac_cv_sys_interpreter" 1>&6
bb70624e 5643interpval="$ac_cv_sys_interpreter"
ccc6cda3
JA
5644
5645if test $ac_cv_sys_interpreter = yes; then
5646cat >> confdefs.h <<\EOF
5647#define HAVE_HASH_BANG_EXEC 1
5648EOF
5649
5650fi
5651echo $ac_n "checking for restartable system calls""... $ac_c" 1>&6
28ef6c31 5652echo "configure:5653: checking for restartable system calls" >&5
ccc6cda3
JA
5653if eval "test \"`echo '$''{'ac_cv_sys_restartable_syscalls'+set}'`\" = set"; then
5654 echo $ac_n "(cached) $ac_c" 1>&6
5655else
5656 if test "$cross_compiling" = yes; then
5657 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5658else
5659 cat > conftest.$ac_ext <<EOF
28ef6c31 5660#line 5661 "configure"
ccc6cda3
JA
5661#include "confdefs.h"
5662/* Exit 0 (true) if wait returns something other than -1,
5663 i.e. the pid of the child, which means that wait was restarted
5664 after getting the signal. */
5665#include <sys/types.h>
5666#include <signal.h>
5667ucatch (isig) { }
5668main () {
5669 int i = fork (), status;
5670 if (i == 0) { sleep (3); kill (getppid (), SIGINT); sleep (3); exit (0); }
5671 signal (SIGINT, ucatch);
5672 status = wait(&i);
5673 if (status == -1) wait(&i);
5674 exit (status == -1);
5675}
5676
5677EOF
28ef6c31 5678if { (eval echo configure:5679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
5679then
5680 ac_cv_sys_restartable_syscalls=yes
5681else
5682 echo "configure: failed program was:" >&5
5683 cat conftest.$ac_ext >&5
5684 rm -fr conftest*
5685 ac_cv_sys_restartable_syscalls=no
5686fi
5687rm -fr conftest*
5688fi
5689
5690fi
5691
5692echo "$ac_t""$ac_cv_sys_restartable_syscalls" 1>&6
5693if test $ac_cv_sys_restartable_syscalls = yes; then
5694 cat >> confdefs.h <<\EOF
5695#define HAVE_RESTARTABLE_SYSCALLS 1
5696EOF
5697
5698fi
5699
5700
5701if test "$ac_cv_func_lstat" = "no"; then
5702echo $ac_n "checking for lstat""... $ac_c" 1>&6
28ef6c31 5703echo "configure:5704: checking for lstat" >&5
ccc6cda3
JA
5704if eval "test \"`echo '$''{'bash_cv_func_lstat'+set}'`\" = set"; then
5705 echo $ac_n "(cached) $ac_c" 1>&6
5706else
5707 cat > conftest.$ac_ext <<EOF
28ef6c31 5708#line 5709 "configure"
ccc6cda3
JA
5709#include "confdefs.h"
5710
5711#include <sys/types.h>
5712#include <sys/stat.h>
5713
5714int main() {
cce855bc 5715 lstat(".",(struct stat *)0);
ccc6cda3
JA
5716; return 0; }
5717EOF
28ef6c31 5718if { (eval echo configure:5719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ccc6cda3
JA
5719 rm -rf conftest*
5720 bash_cv_func_lstat=yes
5721else
5722 echo "configure: failed program was:" >&5
5723 cat conftest.$ac_ext >&5
5724 rm -rf conftest*
5725 bash_cv_func_lstat=no
5726fi
5727rm -f conftest*
5728fi
5729
5730echo "$ac_t""$bash_cv_func_lstat" 1>&6
5731if test $bash_cv_func_lstat = yes; then
5732 cat >> confdefs.h <<\EOF
5733#define HAVE_LSTAT 1
5734EOF
5735
5736fi
5737
5738fi
5739
5740echo $ac_n "checking if dup2 fails to clear the close-on-exec flag""... $ac_c" 1>&6
28ef6c31 5741echo "configure:5742: checking if dup2 fails to clear the close-on-exec flag" >&5
ccc6cda3
JA
5742if eval "test \"`echo '$''{'bash_cv_dup2_broken'+set}'`\" = set"; then
5743 echo $ac_n "(cached) $ac_c" 1>&6
5744else
5745 if test "$cross_compiling" = yes; then
b72432fd 5746 echo "configure: warning: cannot check dup2 if cross compiling -- defaulting to no" 1>&2
cce855bc 5747 bash_cv_dup2_broken=no
ccc6cda3
JA
5748else
5749 cat > conftest.$ac_ext <<EOF
28ef6c31 5750#line 5751 "configure"
ccc6cda3
JA
5751#include "confdefs.h"
5752
5753#include <sys/types.h>
5754#include <fcntl.h>
5755main()
5756{
5757 int fd1, fd2, fl;
5758 fd1 = open("/dev/null", 2);
5759 if (fcntl(fd1, 2, 1) < 0)
5760 exit(1);
5761 fd2 = dup2(fd1, 1);
5762 if (fd2 < 0)
5763 exit(2);
5764 fl = fcntl(fd2, 1, 0);
5765 /* fl will be 1 if dup2 did not reset the close-on-exec flag. */
5766 exit(fl != 1);
5767}
5768
5769EOF
28ef6c31 5770if { (eval echo configure:5771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
5771then
5772 bash_cv_dup2_broken=yes
5773else
5774 echo "configure: failed program was:" >&5
5775 cat conftest.$ac_ext >&5
5776 rm -fr conftest*
5777 bash_cv_dup2_broken=no
5778fi
5779rm -fr conftest*
5780fi
5781
5782
5783fi
5784
5785echo "$ac_t""$bash_cv_dup2_broken" 1>&6
5786if test $bash_cv_dup2_broken = yes; then
5787cat >> confdefs.h <<\EOF
5788#define DUP2_BROKEN 1
5789EOF
5790
5791fi
5792
5793
5794echo $ac_n "checking whether pgrps need synchronization""... $ac_c" 1>&6
28ef6c31 5795echo "configure:5796: checking whether pgrps need synchronization" >&5
ccc6cda3
JA
5796if eval "test \"`echo '$''{'bash_cv_pgrp_pipe'+set}'`\" = set"; then
5797 echo $ac_n "(cached) $ac_c" 1>&6
5798else
5799 if test "$cross_compiling" = yes; then
b72432fd 5800 echo "configure: warning: cannot check pgrp synchronization if cross compiling -- defaulting to no" 1>&2
cce855bc 5801 bash_cv_pgrp_pipe=no
ccc6cda3
JA
5802else
5803 cat > conftest.$ac_ext <<EOF
28ef6c31 5804#line 5805 "configure"
ccc6cda3
JA
5805#include "confdefs.h"
5806
5807#ifdef HAVE_UNISTD_H
5808# include <unistd.h>
5809#endif
5810main()
5811{
5812# ifdef GETPGRP_VOID
5813# define getpgID() getpgrp()
5814# else
5815# define getpgID() getpgrp(0)
5816# define setpgid(x,y) setpgrp(x,y)
5817# endif
5818 int pid1, pid2, fds[2];
5819 int status;
5820 char ok;
5821
5822 switch (pid1 = fork()) {
5823 case -1:
5824 exit(1);
5825 case 0:
5826 setpgid(0, getpid());
5827 exit(0);
5828 }
5829 setpgid(pid1, pid1);
5830
5831 sleep(2); /* let first child die */
5832
5833 if (pipe(fds) < 0)
5834 exit(2);
5835
5836 switch (pid2 = fork()) {
5837 case -1:
5838 exit(3);
5839 case 0:
5840 setpgid(0, pid1);
5841 ok = getpgID() == pid1;
5842 write(fds[1], &ok, 1);
5843 exit(0);
5844 }
5845 setpgid(pid2, pid1);
5846
5847 close(fds[1]);
5848 if (read(fds[0], &ok, 1) != 1)
5849 exit(4);
5850 wait(&status);
5851 wait(&status);
5852 exit(ok ? 0 : 5);
5853}
5854
5855EOF
28ef6c31 5856if { (eval echo configure:5857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
5857then
5858 bash_cv_pgrp_pipe=no
5859else
5860 echo "configure: failed program was:" >&5
5861 cat conftest.$ac_ext >&5
5862 rm -fr conftest*
5863 bash_cv_pgrp_pipe=yes
5864fi
5865rm -fr conftest*
5866fi
5867
5868
5869fi
5870
5871echo "$ac_t""$bash_cv_pgrp_pipe" 1>&6
5872if test $bash_cv_pgrp_pipe = yes; then
5873cat >> confdefs.h <<\EOF
5874#define PGRP_PIPE 1
5875EOF
5876
5877fi
5878
d166f048
JA
5879
5880echo $ac_n "checking for type of signal functions""... $ac_c" 1>&6
28ef6c31 5881echo "configure:5882: checking for type of signal functions" >&5
d166f048 5882if eval "test \"`echo '$''{'bash_cv_signal_vintage'+set}'`\" = set"; then
ccc6cda3
JA
5883 echo $ac_n "(cached) $ac_c" 1>&6
5884else
d166f048 5885
ccc6cda3 5886 cat > conftest.$ac_ext <<EOF
28ef6c31 5887#line 5888 "configure"
ccc6cda3 5888#include "confdefs.h"
d166f048 5889#include <signal.h>
ccc6cda3 5890int main() {
d166f048
JA
5891
5892 sigset_t ss;
5893 struct sigaction sa;
5894 sigemptyset(&ss); sigsuspend(&ss);
5895 sigaction(SIGINT, &sa, (struct sigaction *) 0);
5896 sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
5897
ccc6cda3
JA
5898; return 0; }
5899EOF
28ef6c31 5900if { (eval echo configure:5901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ccc6cda3 5901 rm -rf conftest*
d166f048 5902 bash_cv_signal_vintage=posix
ccc6cda3
JA
5903else
5904 echo "configure: failed program was:" >&5
5905 cat conftest.$ac_ext >&5
5906 rm -rf conftest*
d166f048
JA
5907
5908 cat > conftest.$ac_ext <<EOF
28ef6c31 5909#line 5910 "configure"
d166f048
JA
5910#include "confdefs.h"
5911#include <signal.h>
5912int main() {
5913
5914 int mask = sigmask(SIGINT);
5915 sigsetmask(mask); sigblock(mask); sigpause(mask);
5916
5917; return 0; }
5918EOF
28ef6c31 5919if { (eval echo configure:5920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
d166f048
JA
5920 rm -rf conftest*
5921 bash_cv_signal_vintage=4.2bsd
5922else
5923 echo "configure: failed program was:" >&5
5924 cat conftest.$ac_ext >&5
5925 rm -rf conftest*
5926
5927 cat > conftest.$ac_ext <<EOF
28ef6c31 5928#line 5929 "configure"
d166f048
JA
5929#include "confdefs.h"
5930
5931 #include <signal.h>
5932 RETSIGTYPE foo() { }
5933int main() {
5934
5935 int mask = sigmask(SIGINT);
5936 sigset(SIGINT, foo); sigrelse(SIGINT);
5937 sighold(SIGINT); sigpause(SIGINT);
5938
5939; return 0; }
5940EOF
28ef6c31 5941if { (eval echo configure:5942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
d166f048
JA
5942 rm -rf conftest*
5943 bash_cv_signal_vintage=svr3
5944else
5945 echo "configure: failed program was:" >&5
5946 cat conftest.$ac_ext >&5
5947 rm -rf conftest*
5948 bash_cv_signal_vintage=v7
5949
5950fi
5951rm -f conftest*
5952
5953fi
5954rm -f conftest*
5955
5956fi
5957rm -f conftest*
5958
5959fi
5960
5961echo "$ac_t""$bash_cv_signal_vintage" 1>&6
5962if test "$bash_cv_signal_vintage" = posix; then
5963cat >> confdefs.h <<\EOF
5964#define HAVE_POSIX_SIGNALS 1
5965EOF
5966
5967elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
5968cat >> confdefs.h <<\EOF
5969#define HAVE_BSD_SIGNALS 1
5970EOF
5971
5972elif test "$bash_cv_signal_vintage" = svr3; then
5973cat >> confdefs.h <<\EOF
5974#define HAVE_USG_SIGHOLD 1
5975EOF
5976
5977fi
5978
5979
cce855bc
JA
5980if test "$ac_cv_sys_restartable_syscalls" = "no"; then
5981
28ef6c31
JA
5982echo $ac_n "checking whether posix sigaction restarts system calls by default""... $ac_c" 1>&6
5983echo "configure:5984: checking whether posix sigaction restarts system calls by default" >&5
cce855bc
JA
5984if eval "test \"`echo '$''{'bash_cv_sys_restartable_syscalls'+set}'`\" = set"; then
5985 echo $ac_n "(cached) $ac_c" 1>&6
5986else
5987 if test "$cross_compiling" = yes; then
b72432fd 5988 echo "configure: warning: cannot check restartable syscalls if cross compiling" 1>&2
cce855bc
JA
5989else
5990 cat > conftest.$ac_ext <<EOF
28ef6c31 5991#line 5992 "configure"
cce855bc
JA
5992#include "confdefs.h"
5993/* Exit 0 (true) if wait returns something other than -1,
5994 i.e. the pid of the child, which means that wait was restarted
5995 after getting the signal. */
28ef6c31
JA
5996#ifdef HAVE_UNISTD_H
5997# include <unistd.h>
5998#endif
cce855bc
JA
5999#include <sys/types.h>
6000#include <signal.h>
6001static int caught = 0;
6002void ucatch (isig) int isig; { caught = 1; }
6003main ()
6004{
6005#if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS)
6006 exit (1);
6007#else
6008 struct sigaction act, oact;
6009 int i, status;
6010
6011 act.sa_handler = ucatch;
6012 /* Might want to add SA_RESTART here, but bash's set_signal_handler
6013 does not. */
6014 act.sa_flags = 0;
6015 sigemptyset(&act.sa_mask);
6016 sigemptyset(&oact.sa_mask);
6017 i = fork ();
6018 /* A possible race condition here, but in practice it never happens. */
6019 if (i == 0) { sleep (3); kill (getppid (), SIGINT); sleep (3); exit (0); }
6020 sigaction(SIGINT, &act, &oact);
6021 status = wait(&i);
6022 if (status == -1) wait(&i);
6023 exit (status == -1);
6024#endif
6025}
6026
6027EOF
28ef6c31 6028if { (eval echo configure:6029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
cce855bc
JA
6029then
6030 bash_cv_sys_restartable_syscalls=yes
6031else
6032 echo "configure: failed program was:" >&5
6033 cat conftest.$ac_ext >&5
6034 rm -fr conftest*
6035 bash_cv_sys_restartable_syscalls=no
6036fi
6037rm -fr conftest*
6038fi
6039
6040
6041fi
6042
6043echo "$ac_t""$bash_cv_sys_restartable_syscalls" 1>&6
6044if test $bash_cv_sys_restartable_syscalls = yes; then
6045 cat >> confdefs.h <<\EOF
6046#define HAVE_RESTARTABLE_SYSCALLS 1
6047EOF
6048
6049fi
6050
6051fi
6052
d166f048 6053echo $ac_n "checking for sys_errlist and sys_nerr""... $ac_c" 1>&6
28ef6c31 6054echo "configure:6055: checking for sys_errlist and sys_nerr" >&5
d166f048
JA
6055if eval "test \"`echo '$''{'bash_cv_sys_errlist'+set}'`\" = set"; then
6056 echo $ac_n "(cached) $ac_c" 1>&6
6057else
6058 cat > conftest.$ac_ext <<EOF
28ef6c31 6059#line 6060 "configure"
d166f048
JA
6060#include "confdefs.h"
6061#include <errno.h>
6062int main() {
6063extern char *sys_errlist[];
6064 extern int sys_nerr;
6065 char *msg = sys_errlist[sys_nerr - 1];
6066; return 0; }
6067EOF
28ef6c31 6068if { (eval echo configure:6069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
d166f048
JA
6069 rm -rf conftest*
6070 bash_cv_sys_errlist=yes
6071else
6072 echo "configure: failed program was:" >&5
6073 cat conftest.$ac_ext >&5
6074 rm -rf conftest*
6075 bash_cv_sys_errlist=no
6076fi
6077rm -f conftest*
6078fi
6079echo "$ac_t""$bash_cv_sys_errlist" 1>&6
6080if test $bash_cv_sys_errlist = yes; then
6081cat >> confdefs.h <<\EOF
6082#define HAVE_SYS_ERRLIST 1
6083EOF
6084
6085fi
6086
ccc6cda3
JA
6087
6088echo $ac_n "checking for sys_siglist in system C library""... $ac_c" 1>&6
28ef6c31 6089echo "configure:6090: checking for sys_siglist in system C library" >&5
ccc6cda3
JA
6090if eval "test \"`echo '$''{'bash_cv_sys_siglist'+set}'`\" = set"; then
6091 echo $ac_n "(cached) $ac_c" 1>&6
6092else
6093 if test "$cross_compiling" = yes; then
b72432fd 6094 echo "configure: warning: cannot check for sys_siglist if cross compiling -- defaulting to no" 1>&2
cce855bc 6095 bash_cv_sys_siglist=no
ccc6cda3
JA
6096else
6097 cat > conftest.$ac_ext <<EOF
28ef6c31 6098#line 6099 "configure"
ccc6cda3
JA
6099#include "confdefs.h"
6100
6101#include <sys/types.h>
6102#include <signal.h>
6103#ifdef HAVE_UNISTD_H
6104#include <unistd.h>
6105#endif
6106#ifndef SYS_SIGLIST_DECLARED
6107extern char *sys_siglist[];
6108#endif
6109main()
6110{
6111char *msg = sys_siglist[2];
6112exit(msg == 0);
6113}
6114EOF
28ef6c31 6115if { (eval echo configure:6116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
6116then
6117 bash_cv_sys_siglist=yes
6118else
6119 echo "configure: failed program was:" >&5
6120 cat conftest.$ac_ext >&5
6121 rm -fr conftest*
6122 bash_cv_sys_siglist=no
6123fi
6124rm -fr conftest*
6125fi
6126
6127fi
cce855bc 6128
ccc6cda3
JA
6129echo "$ac_t""$bash_cv_sys_siglist" 1>&6
6130if test $bash_cv_sys_siglist = yes; then
6131cat >> confdefs.h <<\EOF
6132#define HAVE_SYS_SIGLIST 1
6133EOF
6134
6135fi
6136
e8ce775d 6137echo $ac_n "checking for _sys_siglist in signal.h or unistd.h""... $ac_c" 1>&6
28ef6c31 6138echo "configure:6139: checking for _sys_siglist in signal.h or unistd.h" >&5
e8ce775d
JA
6139if eval "test \"`echo '$''{'bash_cv_decl_under_sys_siglist'+set}'`\" = set"; then
6140 echo $ac_n "(cached) $ac_c" 1>&6
6141else
6142 cat > conftest.$ac_ext <<EOF
28ef6c31 6143#line 6144 "configure"
e8ce775d
JA
6144#include "confdefs.h"
6145
6146#include <sys/types.h>
6147#include <signal.h>
6148#ifdef HAVE_UNISTD_H
6149#include <unistd.h>
6150#endif
6151int main() {
6152 char *msg = _sys_siglist[2];
6153; return 0; }
6154EOF
28ef6c31 6155if { (eval echo configure:6156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
e8ce775d
JA
6156 rm -rf conftest*
6157 bash_cv_decl_under_sys_siglist=yes
6158else
6159 echo "configure: failed program was:" >&5
6160 cat conftest.$ac_ext >&5
6161 rm -rf conftest*
6162 bash_cv_decl_under_sys_siglist=no
6163fi
6164rm -f conftest*
6165fi
6166echo "$ac_t""$bash_cv_decl_under_sys_siglist" 1>&6
6167if test $bash_cv_decl_under_sys_siglist = yes; then
6168cat >> confdefs.h <<\EOF
6169#define UNDER_SYS_SIGLIST_DECLARED 1
6170EOF
6171
6172fi
6173
6174
ccc6cda3 6175echo $ac_n "checking for _sys_siglist in system C library""... $ac_c" 1>&6
28ef6c31 6176echo "configure:6177: checking for _sys_siglist in system C library" >&5
ccc6cda3
JA
6177if eval "test \"`echo '$''{'bash_cv_under_sys_siglist'+set}'`\" = set"; then
6178 echo $ac_n "(cached) $ac_c" 1>&6
6179else
6180 if test "$cross_compiling" = yes; then
b72432fd 6181 echo "configure: warning: cannot check for _sys_siglist if cross compiling -- defaulting to no" 1>&2
cce855bc 6182 bash_cv_under_sys_siglist=no
ccc6cda3
JA
6183else
6184 cat > conftest.$ac_ext <<EOF
28ef6c31 6185#line 6186 "configure"
ccc6cda3
JA
6186#include "confdefs.h"
6187
6188#include <sys/types.h>
6189#include <signal.h>
6190#ifdef HAVE_UNISTD_H
6191#include <unistd.h>
6192#endif
e8ce775d 6193#ifndef UNDER_SYS_SIGLIST_DECLARED
ccc6cda3
JA
6194extern char *_sys_siglist[];
6195#endif
6196main()
6197{
e8ce775d 6198char *msg = (char *)_sys_siglist[2];
ccc6cda3
JA
6199exit(msg == 0);
6200}
6201EOF
28ef6c31 6202if { (eval echo configure:6203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
6203then
6204 bash_cv_under_sys_siglist=yes
6205else
6206 echo "configure: failed program was:" >&5
6207 cat conftest.$ac_ext >&5
6208 rm -fr conftest*
6209 bash_cv_under_sys_siglist=no
6210fi
6211rm -fr conftest*
6212fi
6213
6214fi
cce855bc 6215
ccc6cda3
JA
6216echo "$ac_t""$bash_cv_under_sys_siglist" 1>&6
6217if test $bash_cv_under_sys_siglist = yes; then
6218cat >> confdefs.h <<\EOF
6219#define HAVE_UNDER_SYS_SIGLIST 1
6220EOF
6221
6222fi
6223
6224
ccc6cda3 6225echo $ac_n "checking whether signal handlers are of type void""... $ac_c" 1>&6
28ef6c31 6226echo "configure:6227: checking whether signal handlers are of type void" >&5
ccc6cda3
JA
6227if eval "test \"`echo '$''{'bash_cv_void_sighandler'+set}'`\" = set"; then
6228 echo $ac_n "(cached) $ac_c" 1>&6
6229else
6230 cat > conftest.$ac_ext <<EOF
28ef6c31 6231#line 6232 "configure"
ccc6cda3
JA
6232#include "confdefs.h"
6233#include <sys/types.h>
6234#include <signal.h>
6235#ifdef signal
6236#undef signal
6237#endif
6238#ifdef __cplusplus
6239extern "C"
6240#endif
6241void (*signal ()) ();
6242int main() {
6243int i;
6244; return 0; }
6245EOF
28ef6c31 6246if { (eval echo configure:6247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ccc6cda3
JA
6247 rm -rf conftest*
6248 bash_cv_void_sighandler=yes
6249else
6250 echo "configure: failed program was:" >&5
6251 cat conftest.$ac_ext >&5
6252 rm -rf conftest*
6253 bash_cv_void_sighandler=no
6254fi
6255rm -f conftest*
6256fi
6257echo "$ac_t""$bash_cv_void_sighandler" 1>&6
6258if test $bash_cv_void_sighandler = yes; then
6259cat >> confdefs.h <<\EOF
6260#define VOID_SIGHANDLER 1
6261EOF
6262
6263fi
6264
6265echo $ac_n "checking for clock_t""... $ac_c" 1>&6
28ef6c31 6266echo "configure:6267: checking for clock_t" >&5
ccc6cda3
JA
6267if eval "test \"`echo '$''{'bash_cv_type_clock_t'+set}'`\" = set"; then
6268 echo $ac_n "(cached) $ac_c" 1>&6
6269else
6270 cat > conftest.$ac_ext <<EOF
28ef6c31 6271#line 6272 "configure"
ccc6cda3
JA
6272#include "confdefs.h"
6273#include <sys/types.h>
6274#if STDC_HEADERS
6275#include <stdlib.h>
6276#endif
6277#include <sys/times.h>
6278
6279EOF
6280if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6281 egrep "clock_t" >/dev/null 2>&1; then
6282 rm -rf conftest*
6283 bash_cv_type_clock_t=yes
6284else
6285 rm -rf conftest*
6286 bash_cv_type_clock_t=no
6287fi
6288rm -f conftest*
6289
6290fi
6291
6292echo "$ac_t""$bash_cv_type_clock_t" 1>&6
6293
6294if test $bash_cv_type_clock_t = no; then
6295 cat >> confdefs.h <<\EOF
6296#define clock_t long
6297EOF
6298
6299fi
6300
6301echo $ac_n "checking for sigset_t""... $ac_c" 1>&6
28ef6c31 6302echo "configure:6303: checking for sigset_t" >&5
ccc6cda3
JA
6303if eval "test \"`echo '$''{'bash_cv_type_sigset_t'+set}'`\" = set"; then
6304 echo $ac_n "(cached) $ac_c" 1>&6
6305else
6306 cat > conftest.$ac_ext <<EOF
28ef6c31 6307#line 6308 "configure"
ccc6cda3
JA
6308#include "confdefs.h"
6309#include <sys/types.h>
6310#if STDC_HEADERS
6311#include <stdlib.h>
6312#endif
6313#include <signal.h>
6314
6315EOF
6316if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6317 egrep "sigset_t" >/dev/null 2>&1; then
6318 rm -rf conftest*
6319 bash_cv_type_sigset_t=yes
6320else
6321 rm -rf conftest*
6322 bash_cv_type_sigset_t=no
6323fi
6324rm -f conftest*
6325
6326fi
6327
6328echo "$ac_t""$bash_cv_type_sigset_t" 1>&6
6329
6330if test $bash_cv_type_sigset_t = no; then
6331 cat >> confdefs.h <<\EOF
6332#define sigset_t int
6333EOF
6334
6335fi
6336
6337echo $ac_n "checking for quad_t""... $ac_c" 1>&6
28ef6c31 6338echo "configure:6339: checking for quad_t" >&5
ccc6cda3
JA
6339if eval "test \"`echo '$''{'bash_cv_type_quad_t'+set}'`\" = set"; then
6340 echo $ac_n "(cached) $ac_c" 1>&6
6341else
6342 cat > conftest.$ac_ext <<EOF
28ef6c31 6343#line 6344 "configure"
ccc6cda3
JA
6344#include "confdefs.h"
6345#include <sys/types.h>
6346#if STDC_HEADERS
6347#include <stdlib.h>
6348#endif
6349
6350
6351EOF
6352if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6353 egrep "quad_t" >/dev/null 2>&1; then
6354 rm -rf conftest*
6355 bash_cv_type_quad_t=yes
6356else
6357 rm -rf conftest*
6358 bash_cv_type_quad_t=no
6359fi
6360rm -f conftest*
6361
6362fi
6363
6364echo "$ac_t""$bash_cv_type_quad_t" 1>&6
6365if test $bash_cv_type_quad_t = yes; then
6366 cat >> confdefs.h <<\EOF
6367#define HAVE_QUAD_T 1
6368EOF
6369
6370 fi
6371if test $bash_cv_type_quad_t = no; then
6372 cat >> confdefs.h <<\EOF
6373#define quad_t long
6374EOF
6375
6376fi
6377
6378echo $ac_n "checking for size and type of struct rlimit fields""... $ac_c" 1>&6
28ef6c31 6379echo "configure:6380: checking for size and type of struct rlimit fields" >&5
ccc6cda3
JA
6380if eval "test \"`echo '$''{'bash_cv_type_rlimit'+set}'`\" = set"; then
6381 echo $ac_n "(cached) $ac_c" 1>&6
6382else
6383 cat > conftest.$ac_ext <<EOF
28ef6c31 6384#line 6385 "configure"
ccc6cda3
JA
6385#include "confdefs.h"
6386#include <sys/types.h>
cce855bc 6387#include <sys/resource.h>
ccc6cda3
JA
6388int main() {
6389rlim_t xxx;
6390; return 0; }
6391EOF
28ef6c31 6392if { (eval echo configure:6393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ccc6cda3
JA
6393 rm -rf conftest*
6394 bash_cv_type_rlimit=rlim_t
6395else
6396 echo "configure: failed program was:" >&5
6397 cat conftest.$ac_ext >&5
6398 rm -rf conftest*
6399
6400if test "$cross_compiling" = yes; then
b72432fd 6401 echo "configure: warning: cannot check quad_t if cross compiling -- defaulting to long" 1>&2
cce855bc 6402 bash_cv_type_rlimit=long
ccc6cda3
JA
6403else
6404 cat > conftest.$ac_ext <<EOF
28ef6c31 6405#line 6406 "configure"
ccc6cda3
JA
6406#include "confdefs.h"
6407
6408#include <sys/types.h>
6409#include <sys/time.h>
6410#include <sys/resource.h>
6411main()
6412{
6413#ifdef HAVE_QUAD_T
6414 struct rlimit rl;
6415 if (sizeof(rl.rlim_cur) == sizeof(quad_t))
6416 exit(0);
6417#endif
6418 exit(1);
6419}
6420EOF
28ef6c31 6421if { (eval echo configure:6422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
6422then
6423 bash_cv_type_rlimit=quad_t
6424else
6425 echo "configure: failed program was:" >&5
6426 cat conftest.$ac_ext >&5
6427 rm -fr conftest*
6428 bash_cv_type_rlimit=long
6429fi
6430rm -fr conftest*
6431fi
6432
6433fi
6434rm -f conftest*
6435
6436fi
6437
6438echo "$ac_t""$bash_cv_type_rlimit" 1>&6
6439if test $bash_cv_type_rlimit = quad_t; then
6440cat >> confdefs.h <<\EOF
6441#define RLIMTYPE quad_t
6442EOF
6443
6444elif test $bash_cv_type_rlimit = rlim_t; then
6445cat >> confdefs.h <<\EOF
6446#define RLIMTYPE rlim_t
6447EOF
6448
6449fi
6450
d166f048 6451
ccc6cda3 6452echo $ac_n "checking for a c_line member of struct termios""... $ac_c" 1>&6
28ef6c31 6453echo "configure:6454: checking for a c_line member of struct termios" >&5
ccc6cda3
JA
6454if eval "test \"`echo '$''{'bash_cv_termios_ldisc'+set}'`\" = set"; then
6455 echo $ac_n "(cached) $ac_c" 1>&6
6456else
6457 cat > conftest.$ac_ext <<EOF
28ef6c31 6458#line 6459 "configure"
ccc6cda3
JA
6459#include "confdefs.h"
6460#include <sys/types.h>
6461#include <termios.h>
6462int main() {
6463struct termios t; int i; i = t.c_line;
6464; return 0; }
6465EOF
28ef6c31 6466if { (eval echo configure:6467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ccc6cda3
JA
6467 rm -rf conftest*
6468 bash_cv_termios_ldisc=yes
6469else
6470 echo "configure: failed program was:" >&5
6471 cat conftest.$ac_ext >&5
6472 rm -rf conftest*
6473 bash_cv_termios_ldisc=no
6474fi
6475rm -f conftest*
6476fi
6477echo "$ac_t""$bash_cv_termios_ldisc" 1>&6
6478if test $bash_cv_termios_ldisc = yes; then
6479cat >> confdefs.h <<\EOF
6480#define TERMIOS_LDISC 1
6481EOF
6482
6483fi
6484
6485echo $ac_n "checking for a c_line member of struct termio""... $ac_c" 1>&6
28ef6c31 6486echo "configure:6487: checking for a c_line member of struct termio" >&5
ccc6cda3
JA
6487if eval "test \"`echo '$''{'bash_cv_termio_ldisc'+set}'`\" = set"; then
6488 echo $ac_n "(cached) $ac_c" 1>&6
6489else
6490 cat > conftest.$ac_ext <<EOF
28ef6c31 6491#line 6492 "configure"
ccc6cda3
JA
6492#include "confdefs.h"
6493#include <sys/types.h>
6494#include <termio.h>
6495int main() {
6496struct termio t; int i; i = t.c_line;
6497; return 0; }
6498EOF
28ef6c31 6499if { (eval echo configure:6500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ccc6cda3
JA
6500 rm -rf conftest*
6501 bash_cv_termio_ldisc=yes
6502else
6503 echo "configure: failed program was:" >&5
6504 cat conftest.$ac_ext >&5
6505 rm -rf conftest*
6506 bash_cv_termio_ldisc=no
6507fi
6508rm -f conftest*
6509fi
6510echo "$ac_t""$bash_cv_termio_ldisc" 1>&6
6511if test $bash_cv_termio_ldisc = yes; then
6512cat >> confdefs.h <<\EOF
6513#define TERMIO_LDISC 1
6514EOF
6515
6516fi
6517
6518
6519echo $ac_n "checking if struct dirent has a d_ino member""... $ac_c" 1>&6
28ef6c31 6520echo "configure:6521: checking if struct dirent has a d_ino member" >&5
ccc6cda3
JA
6521if eval "test \"`echo '$''{'bash_cv_dirent_has_dino'+set}'`\" = set"; then
6522 echo $ac_n "(cached) $ac_c" 1>&6
6523else
6524 cat > conftest.$ac_ext <<EOF
28ef6c31 6525#line 6526 "configure"
ccc6cda3
JA
6526#include "confdefs.h"
6527
6528#include <stdio.h>
6529#include <sys/types.h>
6530#ifdef HAVE_UNISTD_H
6531# include <unistd.h>
6532#endif /* HAVE_UNISTD_H */
6533#if defined(HAVE_DIRENT_H)
6534# include <dirent.h>
6535#else
6536# define dirent direct
6537# ifdef HAVE_SYS_NDIR_H
6538# include <sys/ndir.h>
6539# endif /* SYSNDIR */
6540# ifdef HAVE_SYS_DIR_H
6541# include <sys/dir.h>
6542# endif /* SYSDIR */
6543# ifdef HAVE_NDIR_H
6544# include <ndir.h>
6545# endif
6546#endif /* HAVE_DIRENT_H */
6547
6548int main() {
6549
6550struct dirent d; int z; z = d.d_ino;
6551
6552; return 0; }
6553EOF
28ef6c31 6554if { (eval echo configure:6555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ccc6cda3
JA
6555 rm -rf conftest*
6556 bash_cv_dirent_has_dino=yes
6557else
6558 echo "configure: failed program was:" >&5
6559 cat conftest.$ac_ext >&5
6560 rm -rf conftest*
6561 bash_cv_dirent_has_dino=no
6562fi
6563rm -f conftest*
6564fi
6565
6566echo "$ac_t""$bash_cv_dirent_has_dino" 1>&6
6567if test $bash_cv_dirent_has_dino = yes; then
6568cat >> confdefs.h <<\EOF
6569#define STRUCT_DIRENT_HAS_D_INO 1
6570EOF
6571
6572fi
6573
d166f048
JA
6574
6575echo $ac_n "checking if struct dirent has a d_fileno member""... $ac_c" 1>&6
28ef6c31 6576echo "configure:6577: checking if struct dirent has a d_fileno member" >&5
d166f048
JA
6577if eval "test \"`echo '$''{'bash_cv_dirent_has_d_fileno'+set}'`\" = set"; then
6578 echo $ac_n "(cached) $ac_c" 1>&6
6579else
6580 cat > conftest.$ac_ext <<EOF
28ef6c31 6581#line 6582 "configure"
d166f048
JA
6582#include "confdefs.h"
6583
6584#include <stdio.h>
6585#include <sys/types.h>
6586#ifdef HAVE_UNISTD_H
6587# include <unistd.h>
6588#endif /* HAVE_UNISTD_H */
6589#if defined(HAVE_DIRENT_H)
6590# include <dirent.h>
6591#else
6592# define dirent direct
6593# ifdef HAVE_SYS_NDIR_H
6594# include <sys/ndir.h>
6595# endif /* SYSNDIR */
6596# ifdef HAVE_SYS_DIR_H
6597# include <sys/dir.h>
6598# endif /* SYSDIR */
6599# ifdef HAVE_NDIR_H
6600# include <ndir.h>
6601# endif
6602#endif /* HAVE_DIRENT_H */
6603
6604int main() {
6605
6606struct dirent d; int z; z = d.d_fileno;
6607
6608; return 0; }
6609EOF
28ef6c31 6610if { (eval echo configure:6611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d166f048
JA
6611 rm -rf conftest*
6612 bash_cv_dirent_has_d_fileno=yes
6613else
6614 echo "configure: failed program was:" >&5
6615 cat conftest.$ac_ext >&5
6616 rm -rf conftest*
6617 bash_cv_dirent_has_d_fileno=no
6618fi
6619rm -f conftest*
6620fi
6621
6622echo "$ac_t""$bash_cv_dirent_has_d_fileno" 1>&6
6623if test $bash_cv_dirent_has_d_fileno = yes; then
6624cat >> confdefs.h <<\EOF
6625#define STRUCT_DIRENT_HAS_D_FILENO 1
6626EOF
6627
6628fi
6629
cce855bc 6630echo $ac_n "checking for struct winsize in sys/ioctl.h and termios.h""... $ac_c" 1>&6
28ef6c31 6631echo "configure:6632: checking for struct winsize in sys/ioctl.h and termios.h" >&5
cce855bc 6632if eval "test \"`echo '$''{'bash_cv_struct_winsize_header'+set}'`\" = set"; then
d166f048
JA
6633 echo $ac_n "(cached) $ac_c" 1>&6
6634else
6635 cat > conftest.$ac_ext <<EOF
28ef6c31 6636#line 6637 "configure"
d166f048
JA
6637#include "confdefs.h"
6638#include <sys/types.h>
6639#include <sys/ioctl.h>
6640int main() {
6641struct winsize x;
6642; return 0; }
6643EOF
28ef6c31 6644if { (eval echo configure:6645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
cce855bc
JA
6645 rm -rf conftest*
6646 bash_cv_struct_winsize_header=ioctl_h
6647else
6648 echo "configure: failed program was:" >&5
6649 cat conftest.$ac_ext >&5
6650 rm -rf conftest*
6651 cat > conftest.$ac_ext <<EOF
28ef6c31 6652#line 6653 "configure"
cce855bc
JA
6653#include "confdefs.h"
6654#include <sys/types.h>
6655#include <termios.h>
6656int main() {
6657struct winsize x;
6658; return 0; }
6659EOF
28ef6c31 6660if { (eval echo configure:6661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d166f048 6661 rm -rf conftest*
cce855bc 6662 bash_cv_struct_winsize_header=termios_h
d166f048
JA
6663else
6664 echo "configure: failed program was:" >&5
6665 cat conftest.$ac_ext >&5
6666 rm -rf conftest*
cce855bc
JA
6667 bash_cv_struct_winsize_header=other
6668fi
6669rm -f conftest*
6670
d166f048
JA
6671fi
6672rm -f conftest*
6673fi
6674
cce855bc
JA
6675if test $bash_cv_struct_winsize_header = ioctl_h; then
6676 echo "$ac_t""sys/ioctl.h" 1>&6
6677 cat >> confdefs.h <<\EOF
d166f048
JA
6678#define STRUCT_WINSIZE_IN_SYS_IOCTL 1
6679EOF
6680
cce855bc
JA
6681elif test $bash_cv_struct_winsize_header = termios_h; then
6682 echo "$ac_t""termios.h" 1>&6
6683 cat >> confdefs.h <<\EOF
6684#define STRUCT_WINSIZE_IN_TERMIOS 1
6685EOF
6686
6687else
6688 echo "$ac_t""not found" 1>&6
d166f048
JA
6689fi
6690
bb70624e 6691echo $ac_n "checking for struct timeval in sys/time.h and time.h""... $ac_c" 1>&6
28ef6c31 6692echo "configure:6693: checking for struct timeval in sys/time.h and time.h" >&5
bb70624e
JA
6693if eval "test \"`echo '$''{'bash_cv_struct_timeval'+set}'`\" = set"; then
6694 echo $ac_n "(cached) $ac_c" 1>&6
6695else
6696
6697cat > conftest.$ac_ext <<EOF
28ef6c31 6698#line 6699 "configure"
bb70624e
JA
6699#include "confdefs.h"
6700#include <sys/time.h>
6701EOF
6702if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6703 egrep "struct timeval" >/dev/null 2>&1; then
6704 rm -rf conftest*
6705 bash_cv_struct_timeval=yes
6706else
6707 rm -rf conftest*
6708 cat > conftest.$ac_ext <<EOF
28ef6c31 6709#line 6710 "configure"
bb70624e
JA
6710#include "confdefs.h"
6711#include <time.h>
6712EOF
6713if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6714 egrep "struct timeval" >/dev/null 2>&1; then
6715 rm -rf conftest*
6716 bash_cv_struct_timeval=yes
6717else
6718 rm -rf conftest*
6719 bash_cv_struct_timeval=no
6720fi
6721rm -f conftest*
6722
6723fi
6724rm -f conftest*
6725
6726
6727fi
6728
6729echo "$ac_t""$bash_cv_struct_timeval" 1>&6
6730if test $bash_cv_struct_timeval = yes; then
6731 cat >> confdefs.h <<\EOF
6732#define HAVE_TIMEVAL 1
6733EOF
6734
6735fi
6736
d166f048 6737
cce855bc 6738echo $ac_n "checking for the existence of strsignal""... $ac_c" 1>&6
28ef6c31 6739echo "configure:6740: checking for the existence of strsignal" >&5
ccc6cda3
JA
6740if eval "test \"`echo '$''{'bash_cv_have_strsignal'+set}'`\" = set"; then
6741 echo $ac_n "(cached) $ac_c" 1>&6
6742else
6743 cat > conftest.$ac_ext <<EOF
28ef6c31 6744#line 6745 "configure"
ccc6cda3
JA
6745#include "confdefs.h"
6746#include <sys/types.h>
6747#include <signal.h>
6748int main() {
6749char *s = (char *)strsignal(2);
6750; return 0; }
6751EOF
28ef6c31 6752if { (eval echo configure:6753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ccc6cda3
JA
6753 rm -rf conftest*
6754 bash_cv_have_strsignal=yes
6755else
6756 echo "configure: failed program was:" >&5
6757 cat conftest.$ac_ext >&5
6758 rm -rf conftest*
6759 bash_cv_have_strsignal=no
6760fi
6761rm -f conftest*
6762fi
6763
6764echo "$ac_t""$bash_cv_have_strsignal" 1>&6
6765if test $bash_cv_have_strsignal = yes; then
6766cat >> confdefs.h <<\EOF
6767#define HAVE_STRSIGNAL 1
6768EOF
6769
6770fi
6771
6772echo $ac_n "checking if opendir() opens non-directories""... $ac_c" 1>&6
28ef6c31 6773echo "configure:6774: checking if opendir() opens non-directories" >&5
ccc6cda3
JA
6774if eval "test \"`echo '$''{'bash_cv_opendir_not_robust'+set}'`\" = set"; then
6775 echo $ac_n "(cached) $ac_c" 1>&6
6776else
6777 if test "$cross_compiling" = yes; then
b72432fd 6778 echo "configure: warning: cannot check opendir if cross compiling -- defaulting to no" 1>&2
cce855bc
JA
6779 bash_cv_opendir_not_robust=no
6780
ccc6cda3
JA
6781else
6782 cat > conftest.$ac_ext <<EOF
28ef6c31 6783#line 6784 "configure"
ccc6cda3
JA
6784#include "confdefs.h"
6785
6786#include <stdio.h>
6787#include <sys/types.h>
6788#include <fcntl.h>
6789#ifdef HAVE_UNISTD_H
6790# include <unistd.h>
6791#endif /* HAVE_UNISTD_H */
6792#if defined(HAVE_DIRENT_H)
6793# include <dirent.h>
6794#else
6795# define dirent direct
6796# ifdef HAVE_SYS_NDIR_H
6797# include <sys/ndir.h>
6798# endif /* SYSNDIR */
6799# ifdef HAVE_SYS_DIR_H
6800# include <sys/dir.h>
6801# endif /* SYSDIR */
6802# ifdef HAVE_NDIR_H
6803# include <ndir.h>
6804# endif
6805#endif /* HAVE_DIRENT_H */
6806main()
6807{
6808DIR *dir;
bb70624e
JA
6809int fd, err;
6810err = mkdir("/tmp/bash-aclocal", 0700);
6811if (err < 0) {
6812 perror("mkdir");
6813 exit(1);
6814}
6815unlink("/tmp/bash-aclocal/not_a_directory");
6816fd = open("/tmp/bash-aclocal/not_a_directory", O_WRONLY|O_CREAT|O_EXCL, 0666);
ccc6cda3
JA
6817write(fd, "\n", 1);
6818close(fd);
bb70624e
JA
6819dir = opendir("/tmp/bash-aclocal/not_a_directory");
6820unlink("/tmp/bash-aclocal/not_a_directory");
6821rmdir("/tmp/bash-aclocal");
ccc6cda3
JA
6822exit (dir == 0);
6823}
6824EOF
28ef6c31 6825if { (eval echo configure:6826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
6826then
6827 bash_cv_opendir_not_robust=yes
6828else
6829 echo "configure: failed program was:" >&5
6830 cat conftest.$ac_ext >&5
6831 rm -fr conftest*
6832 bash_cv_opendir_not_robust=no
6833fi
6834rm -fr conftest*
6835fi
6836
6837fi
6838
6839echo "$ac_t""$bash_cv_opendir_not_robust" 1>&6
6840if test $bash_cv_opendir_not_robust = yes; then
6841cat >> confdefs.h <<\EOF
6842#define OPENDIR_NOT_ROBUST 1
6843EOF
6844
6845fi
6846
6847echo $ac_n "checking for declaration of printf in <stdio.h>""... $ac_c" 1>&6
28ef6c31 6848echo "configure:6849: checking for declaration of printf in <stdio.h>" >&5
ccc6cda3
JA
6849if eval "test \"`echo '$''{'bash_cv_printf_declared'+set}'`\" = set"; then
6850 echo $ac_n "(cached) $ac_c" 1>&6
6851else
6852 if test "$cross_compiling" = yes; then
b72432fd 6853 echo "configure: warning: cannot check printf declaration if cross compiling -- defaulting to yes" 1>&2
cce855bc
JA
6854 bash_cv_printf_declared=yes
6855
ccc6cda3
JA
6856else
6857 cat > conftest.$ac_ext <<EOF
28ef6c31 6858#line 6859 "configure"
ccc6cda3
JA
6859#include "confdefs.h"
6860
6861#include <stdio.h>
6862#ifdef __STDC__
6863typedef int (*_bashfunc)(const char *, ...);
6864#else
6865typedef int (*_bashfunc)();
6866#endif
6867main()
6868{
6869_bashfunc pf;
e8ce775d 6870pf = (_bashfunc) printf;
ccc6cda3
JA
6871exit(pf == 0);
6872}
6873
6874EOF
28ef6c31 6875if { (eval echo configure:6876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
6876then
6877 bash_cv_printf_declared=yes
6878else
6879 echo "configure: failed program was:" >&5
6880 cat conftest.$ac_ext >&5
6881 rm -fr conftest*
6882 bash_cv_printf_declared=no
6883fi
6884rm -fr conftest*
6885fi
6886
6887fi
6888
6889echo "$ac_t""$bash_cv_printf_declared" 1>&6
6890if test $bash_cv_printf_declared = yes; then
6891cat >> confdefs.h <<\EOF
6892#define PRINTF_DECLARED 1
6893EOF
6894
6895fi
6896
6897echo $ac_n "checking whether ulimit can substitute for getdtablesize""... $ac_c" 1>&6
28ef6c31 6898echo "configure:6899: checking whether ulimit can substitute for getdtablesize" >&5
ccc6cda3
JA
6899if eval "test \"`echo '$''{'bash_cv_ulimit_maxfds'+set}'`\" = set"; then
6900 echo $ac_n "(cached) $ac_c" 1>&6
6901else
6902 if test "$cross_compiling" = yes; then
b72432fd 6903 echo "configure: warning: cannot check ulimit if cross compiling -- defaulting to no" 1>&2
cce855bc
JA
6904 bash_cv_ulimit_maxfds=no
6905
ccc6cda3
JA
6906else
6907 cat > conftest.$ac_ext <<EOF
28ef6c31 6908#line 6909 "configure"
ccc6cda3
JA
6909#include "confdefs.h"
6910
6911main()
6912{
6913long maxfds = ulimit(4, 0L);
6914exit (maxfds == -1L);
6915}
6916
6917EOF
28ef6c31 6918if { (eval echo configure:6919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
6919then
6920 bash_cv_ulimit_maxfds=yes
6921else
6922 echo "configure: failed program was:" >&5
6923 cat conftest.$ac_ext >&5
6924 rm -fr conftest*
6925 bash_cv_ulimit_maxfds=no
6926fi
6927rm -fr conftest*
6928fi
6929
6930fi
6931
6932echo "$ac_t""$bash_cv_ulimit_maxfds" 1>&6
6933if test $bash_cv_ulimit_maxfds = yes; then
6934cat >> confdefs.h <<\EOF
6935#define ULIMIT_MAXFDS 1
6936EOF
6937
6938fi
6939
6940echo $ac_n "checking to see if getenv can be redefined""... $ac_c" 1>&6
28ef6c31 6941echo "configure:6942: checking to see if getenv can be redefined" >&5
ccc6cda3
JA
6942if eval "test \"`echo '$''{'bash_cv_getenv_redef'+set}'`\" = set"; then
6943 echo $ac_n "(cached) $ac_c" 1>&6
6944else
6945 if test "$cross_compiling" = yes; then
b72432fd 6946 echo "configure: warning: cannot check getenv redefinition if cross compiling -- defaulting to yes" 1>&2
cce855bc
JA
6947 bash_cv_getenv_redef=yes
6948
ccc6cda3
JA
6949else
6950 cat > conftest.$ac_ext <<EOF
28ef6c31 6951#line 6952 "configure"
ccc6cda3
JA
6952#include "confdefs.h"
6953
6954#ifdef HAVE_UNISTD_H
6955# include <unistd.h>
6956#endif
6957#ifndef __STDC__
6958# ifndef const
6959# define const
6960# endif
6961#endif
6962char *
6963getenv (name)
6964#if defined (__linux__) || defined (__bsdi__) || defined (convex)
6965 const char *name;
6966#else
6967 char const *name;
6968#endif /* !__linux__ && !__bsdi__ && !convex */
6969{
6970return "42";
6971}
6972main()
6973{
6974char *s;
6975/* The next allows this program to run, but does not allow bash to link
6976 when it redefines getenv. I'm not really interested in figuring out
6977 why not. */
6978#if defined (NeXT)
6979exit(1);
6980#endif
6981s = getenv("ABCDE");
6982exit(s == 0); /* force optimizer to leave getenv in */
6983}
6984
6985EOF
28ef6c31 6986if { (eval echo configure:6987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
6987then
6988 bash_cv_getenv_redef=yes
6989else
6990 echo "configure: failed program was:" >&5
6991 cat conftest.$ac_ext >&5
6992 rm -fr conftest*
6993 bash_cv_getenv_redef=no
6994fi
6995rm -fr conftest*
6996fi
6997
6998fi
6999
7000echo "$ac_t""$bash_cv_getenv_redef" 1>&6
7001if test $bash_cv_getenv_redef = yes; then
7002cat >> confdefs.h <<\EOF
7003#define CAN_REDEFINE_GETENV 1
7004EOF
7005
7006fi
7007
7008echo $ac_n "checking if getcwd() calls popen()""... $ac_c" 1>&6
28ef6c31 7009echo "configure:7010: checking if getcwd() calls popen()" >&5
ccc6cda3
JA
7010if eval "test \"`echo '$''{'bash_cv_getcwd_calls_popen'+set}'`\" = set"; then
7011 echo $ac_n "(cached) $ac_c" 1>&6
7012else
7013 if test "$cross_compiling" = yes; then
b72432fd 7014 echo "configure: warning: cannot check whether getcwd calls popen if cross compiling -- defaulting to no" 1>&2
cce855bc
JA
7015 bash_cv_getcwd_calls_popen=no
7016
ccc6cda3
JA
7017else
7018 cat > conftest.$ac_ext <<EOF
28ef6c31 7019#line 7020 "configure"
ccc6cda3
JA
7020#include "confdefs.h"
7021
7022#include <stdio.h>
7023#ifdef HAVE_UNISTD_H
7024#include <unistd.h>
7025#endif
7026
7027#ifndef __STDC__
7028#ifndef const
7029#define const
7030#endif
7031#endif
7032
7033int popen_called;
7034
7035FILE *
7036popen(command, type)
7037 const char *command;
7038 const char *type;
7039{
7040 popen_called = 1;
7041 return (FILE *)NULL;
7042}
7043
7044FILE *_popen(command, type)
7045 const char *command;
7046 const char *type;
7047{
7048 return (popen (command, type));
7049}
7050
7051int
7052pclose(stream)
7053FILE *stream;
7054{
7055 return 0;
7056}
7057
7058int
7059_pclose(stream)
7060FILE *stream;
7061{
7062 return 0;
7063}
7064
7065main()
7066{
7067 char lbuf[32];
7068 popen_called = 0;
7069 getcwd(lbuf, 32);
7070 exit (popen_called);
7071}
7072
7073EOF
28ef6c31 7074if { (eval echo configure:7075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
7075then
7076 bash_cv_getcwd_calls_popen=no
7077else
7078 echo "configure: failed program was:" >&5
7079 cat conftest.$ac_ext >&5
7080 rm -fr conftest*
7081 bash_cv_getcwd_calls_popen=yes
7082fi
7083rm -fr conftest*
7084fi
7085
7086fi
7087
7088echo "$ac_t""$bash_cv_getcwd_calls_popen" 1>&6
7089if test $bash_cv_getcwd_calls_popen = yes; then
7090cat >> confdefs.h <<\EOF
7091#define GETCWD_BROKEN 1
7092EOF
7093
7094fi
7095
7096echo $ac_n "checking for declaration of sbrk in <unistd.h>""... $ac_c" 1>&6
28ef6c31 7097echo "configure:7098: checking for declaration of sbrk in <unistd.h>" >&5
ccc6cda3
JA
7098if eval "test \"`echo '$''{'bash_cv_sbrk_declared'+set}'`\" = set"; then
7099 echo $ac_n "(cached) $ac_c" 1>&6
7100else
7101 cat > conftest.$ac_ext <<EOF
28ef6c31 7102#line 7103 "configure"
ccc6cda3
JA
7103#include "confdefs.h"
7104#include <unistd.h>
7105EOF
7106if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7107 egrep "sbrk" >/dev/null 2>&1; then
7108 rm -rf conftest*
7109 bash_cv_sbrk_declared=yes
7110else
7111 rm -rf conftest*
7112 bash_cv_sbrk_declared=no
7113fi
7114rm -f conftest*
7115
7116fi
7117
7118echo "$ac_t""$bash_cv_sbrk_declared" 1>&6
7119if test $bash_cv_sbrk_declared = yes; then
7120cat >> confdefs.h <<\EOF
7121#define SBRK_DECLARED 1
7122EOF
7123
7124fi
7125
7126
7127echo $ac_n "checking for presence of POSIX-style sigsetjmp/siglongjmp""... $ac_c" 1>&6
28ef6c31 7128echo "configure:7129: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5
ccc6cda3
JA
7129if eval "test \"`echo '$''{'bash_cv_func_sigsetjmp'+set}'`\" = set"; then
7130 echo $ac_n "(cached) $ac_c" 1>&6
7131else
7132 if test "$cross_compiling" = yes; then
b72432fd 7133 echo "configure: warning: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" 1>&2
cce855bc
JA
7134 bash_cv_func_sigsetjmp=missing
7135
ccc6cda3
JA
7136else
7137 cat > conftest.$ac_ext <<EOF
28ef6c31 7138#line 7139 "configure"
ccc6cda3
JA
7139#include "confdefs.h"
7140
7141#ifdef HAVE_UNISTD_H
7142#include <unistd.h>
7143#endif
7144#include <sys/types.h>
7145#include <signal.h>
7146#include <setjmp.h>
7147
7148main()
7149{
7150#if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS)
7151exit (1);
7152#else
7153
7154int code;
7155sigset_t set, oset;
7156sigjmp_buf xx;
7157
7158/* get the mask */
7159sigemptyset(&set);
7160sigemptyset(&oset);
7161sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &set);
7162sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset);
7163
7164/* save it */
7165code = sigsetjmp(xx, 1);
7166if (code)
7167 exit(0); /* could get sigmask and compare to oset here. */
7168
7169/* change it */
7170sigaddset(&set, SIGINT);
7171sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL);
7172
7173/* and siglongjmp */
7174siglongjmp(xx, 10);
7175exit(1);
7176#endif
7177}
7178EOF
28ef6c31 7179if { (eval echo configure:7180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
7180then
7181 bash_cv_func_sigsetjmp=present
7182else
7183 echo "configure: failed program was:" >&5
7184 cat conftest.$ac_ext >&5
7185 rm -fr conftest*
7186 bash_cv_func_sigsetjmp=missing
7187fi
7188rm -fr conftest*
7189fi
7190
ccc6cda3
JA
7191fi
7192
7193echo "$ac_t""$bash_cv_func_sigsetjmp" 1>&6
7194if test $bash_cv_func_sigsetjmp = present; then
7195cat >> confdefs.h <<\EOF
7196#define HAVE_POSIX_SIGSETJMP 1
7197EOF
7198
7199fi
7200
7201
d166f048 7202echo $ac_n "checking whether or not strcoll and strcmp differ""... $ac_c" 1>&6
28ef6c31 7203echo "configure:7204: checking whether or not strcoll and strcmp differ" >&5
d166f048
JA
7204if eval "test \"`echo '$''{'bash_cv_func_strcoll_broken'+set}'`\" = set"; then
7205 echo $ac_n "(cached) $ac_c" 1>&6
7206else
7207 if test "$cross_compiling" = yes; then
b72432fd 7208 echo "configure: warning: cannot check strcoll if cross compiling -- defaulting to no" 1>&2
cce855bc
JA
7209 bash_cv_func_strcoll_broken=no
7210
d166f048
JA
7211else
7212 cat > conftest.$ac_ext <<EOF
28ef6c31 7213#line 7214 "configure"
d166f048
JA
7214#include "confdefs.h"
7215
7216#include <stdio.h>
7217#if defined (HAVE_LOCALE_H)
7218#include <locale.h>
7219#endif
7220
7221main(c, v)
7222int c;
7223char *v[];
7224{
7225 int r1, r2;
7226 char *deflocale, *defcoll;
7227
7228#ifdef HAVE_SETLOCALE
7229 deflocale = setlocale(LC_ALL, "");
7230 defcoll = setlocale(LC_COLLATE, "");
7231#endif
7232
7233#ifdef HAVE_STRCOLL
7234 /* These two values are taken from tests/glob-test. */
7235 r1 = strcoll("abd", "aXd");
7236#else
7237 r1 = 0;
7238#endif
7239 r2 = strcmp("abd", "aXd");
7240
7241 /* These two should both be greater than 0. It is permissible for
7242 a system to return different values, as long as the sign is the
7243 same. */
7244
7245 /* Exit with 1 (failure) if these two values are both > 0, since
7246 this tests whether strcoll(3) is broken with respect to strcmp(3)
7247 in the default locale. */
7248 exit (r1 > 0 && r2 > 0);
7249}
7250
7251EOF
28ef6c31 7252if { (eval echo configure:7253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
d166f048
JA
7253then
7254 bash_cv_func_strcoll_broken=yes
7255else
7256 echo "configure: failed program was:" >&5
7257 cat conftest.$ac_ext >&5
7258 rm -fr conftest*
7259 bash_cv_func_strcoll_broken=no
7260fi
7261rm -fr conftest*
7262fi
7263
d166f048
JA
7264fi
7265
7266echo "$ac_t""$bash_cv_func_strcoll_broken" 1>&6
7267if test $bash_cv_func_strcoll_broken = yes; then
7268cat >> confdefs.h <<\EOF
7269#define STRCOLL_BROKEN 1
7270EOF
7271
7272fi
7273
7274
7275
ccc6cda3
JA
7276
7277echo $ac_n "checking if signal handlers must be reinstalled when invoked""... $ac_c" 1>&6
28ef6c31 7278echo "configure:7279: checking if signal handlers must be reinstalled when invoked" >&5
ccc6cda3
JA
7279if eval "test \"`echo '$''{'bash_cv_must_reinstall_sighandlers'+set}'`\" = set"; then
7280 echo $ac_n "(cached) $ac_c" 1>&6
7281else
7282 if test "$cross_compiling" = yes; then
b72432fd 7283 echo "configure: warning: cannot check signal handling if cross compiling -- defaulting to no" 1>&2
cce855bc
JA
7284 bash_cv_must_reinstall_sighandlers=no
7285
ccc6cda3
JA
7286else
7287 cat > conftest.$ac_ext <<EOF
28ef6c31 7288#line 7289 "configure"
ccc6cda3
JA
7289#include "confdefs.h"
7290
7291#include <signal.h>
7292#ifdef HAVE_UNISTD_H
7293#include <unistd.h>
7294#endif
7295
7296typedef RETSIGTYPE sigfunc();
7297
7298int nsigint;
7299
7300#ifdef HAVE_POSIX_SIGNALS
7301sigfunc *
7302set_signal_handler(sig, handler)
7303 int sig;
7304 sigfunc *handler;
7305{
7306 struct sigaction act, oact;
7307 act.sa_handler = handler;
7308 act.sa_flags = 0;
7309 sigemptyset (&act.sa_mask);
7310 sigemptyset (&oact.sa_mask);
7311 sigaction (sig, &act, &oact);
7312 return (oact.sa_handler);
7313}
7314#else
7315#define set_signal_handler(s, h) signal(s, h)
7316#endif
7317
7318RETSIGTYPE
7319sigint(s)
7320int s;
7321{
7322 nsigint++;
7323}
7324
7325main()
7326{
7327 nsigint = 0;
7328 set_signal_handler(SIGINT, sigint);
7329 kill((int)getpid(), SIGINT);
7330 kill((int)getpid(), SIGINT);
7331 exit(nsigint != 2);
7332}
7333
7334EOF
28ef6c31 7335if { (eval echo configure:7336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
7336then
7337 bash_cv_must_reinstall_sighandlers=no
7338else
7339 echo "configure: failed program was:" >&5
7340 cat conftest.$ac_ext >&5
7341 rm -fr conftest*
7342 bash_cv_must_reinstall_sighandlers=yes
7343fi
7344rm -fr conftest*
7345fi
7346
7347fi
7348
7349echo "$ac_t""$bash_cv_must_reinstall_sighandlers" 1>&6
7350if test $bash_cv_must_reinstall_sighandlers = yes; then
7351cat >> confdefs.h <<\EOF
7352#define MUST_REINSTALL_SIGHANDLERS 1
7353EOF
7354
7355fi
7356
7357
7358echo $ac_n "checking for presence of necessary job control definitions""... $ac_c" 1>&6
28ef6c31 7359echo "configure:7360: checking for presence of necessary job control definitions" >&5
ccc6cda3
JA
7360if eval "test \"`echo '$''{'bash_cv_job_control_missing'+set}'`\" = set"; then
7361 echo $ac_n "(cached) $ac_c" 1>&6
7362else
7363 if test "$cross_compiling" = yes; then
b72432fd 7364 echo "configure: warning: cannot check job control if cross-compiling -- defaulting to missing" 1>&2
cce855bc
JA
7365 bash_cv_job_control_missing=missing
7366
ccc6cda3
JA
7367else
7368 cat > conftest.$ac_ext <<EOF
28ef6c31 7369#line 7370 "configure"
ccc6cda3
JA
7370#include "confdefs.h"
7371
7372#include <sys/types.h>
7373#ifdef HAVE_SYS_WAIT_H
7374#include <sys/wait.h>
7375#endif
7376#ifdef HAVE_UNISTD_H
7377#include <unistd.h>
7378#endif
7379#include <signal.h>
7380
7381/* Add more tests in here as appropriate. */
7382main()
7383{
7384/* signal type */
7385#if !defined (HAVE_POSIX_SIGNALS) && !defined (HAVE_BSD_SIGNALS)
7386exit(1);
7387#endif
7388
7389/* signals and tty control. */
7390#if !defined (SIGTSTP) || !defined (SIGSTOP) || !defined (SIGCONT)
7391exit (1);
7392#endif
7393
7394/* process control */
7395#if !defined (WNOHANG) || !defined (WUNTRACED)
7396exit(1);
7397#endif
7398
7399/* Posix systems have tcgetpgrp and waitpid. */
7400#if defined (_POSIX_VERSION) && !defined (HAVE_TCGETPGRP)
7401exit(1);
7402#endif
7403
7404#if defined (_POSIX_VERSION) && !defined (HAVE_WAITPID)
7405exit(1);
7406#endif
7407
7408/* Other systems have TIOCSPGRP/TIOCGPRGP and wait3. */
7409#if !defined (_POSIX_VERSION) && !defined (HAVE_WAIT3)
7410exit(1);
7411#endif
7412
7413exit(0);
7414}
7415EOF
28ef6c31 7416if { (eval echo configure:7417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
7417then
7418 bash_cv_job_control_missing=present
7419else
7420 echo "configure: failed program was:" >&5
7421 cat conftest.$ac_ext >&5
7422 rm -fr conftest*
7423 bash_cv_job_control_missing=missing
7424fi
7425rm -fr conftest*
7426fi
7427
ccc6cda3
JA
7428fi
7429
7430echo "$ac_t""$bash_cv_job_control_missing" 1>&6
7431if test $bash_cv_job_control_missing = missing; then
7432cat >> confdefs.h <<\EOF
7433#define JOB_CONTROL_MISSING 1
7434EOF
7435
7436fi
7437
7438echo $ac_n "checking for presence of named pipes""... $ac_c" 1>&6
28ef6c31 7439echo "configure:7440: checking for presence of named pipes" >&5
ccc6cda3
JA
7440if eval "test \"`echo '$''{'bash_cv_sys_named_pipes'+set}'`\" = set"; then
7441 echo $ac_n "(cached) $ac_c" 1>&6
7442else
7443 if test "$cross_compiling" = yes; then
b72432fd 7444 echo "configure: warning: cannot check for named pipes if cross-compiling -- defaulting to missing" 1>&2
cce855bc
JA
7445 bash_cv_sys_named_pipes=missing
7446
ccc6cda3
JA
7447else
7448 cat > conftest.$ac_ext <<EOF
28ef6c31 7449#line 7450 "configure"
ccc6cda3
JA
7450#include "confdefs.h"
7451
7452#include <sys/types.h>
7453#include <sys/stat.h>
7454#ifdef HAVE_UNISTD_H
7455#include <unistd.h>
7456#endif
7457
7458/* Add more tests in here as appropriate. */
7459main()
7460{
bb70624e 7461int fd, err;
ccc6cda3
JA
7462
7463#if defined (HAVE_MKFIFO)
7464exit (0);
7465#endif
7466
7467#if !defined (S_IFIFO) && (defined (_POSIX_VERSION) && !defined (S_ISFIFO))
7468exit (1);
7469#endif
7470
7471#if defined (NeXT)
7472exit (1);
7473#endif
bb70624e
JA
7474err = mkdir("/tmp/bash-aclocal", 0700);
7475if (err < 0) {
7476 perror ("mkdir");
7477 exit(1);
7478}
7479fd = mknod ("/tmp/bash-aclocal/sh-np-autoconf", 0666 | S_IFIFO, 0);
7480if (fd == -1) {
7481 rmdir ("/tmp/bash-aclocal");
ccc6cda3 7482 exit (1);
bb70624e 7483}
ccc6cda3 7484close(fd);
bb70624e
JA
7485unlink ("/tmp/bash-aclocal/sh-np-autoconf");
7486rmdir ("/tmp/bash-aclocal");
ccc6cda3
JA
7487exit(0);
7488}
7489EOF
28ef6c31 7490if { (eval echo configure:7491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
ccc6cda3
JA
7491then
7492 bash_cv_sys_named_pipes=present
7493else
7494 echo "configure: failed program was:" >&5
7495 cat conftest.$ac_ext >&5
7496 rm -fr conftest*
7497 bash_cv_sys_named_pipes=missing
7498fi
7499rm -fr conftest*
7500fi
7501
ccc6cda3
JA
7502fi
7503
7504echo "$ac_t""$bash_cv_sys_named_pipes" 1>&6
7505if test $bash_cv_sys_named_pipes = missing; then
7506cat >> confdefs.h <<\EOF
7507#define NAMED_PIPES_MISSING 1
7508EOF
7509
7510fi
7511
d166f048 7512
ccc6cda3 7513echo $ac_n "checking for TIOCGWINSZ in sys/ioctl.h""... $ac_c" 1>&6
28ef6c31 7514echo "configure:7515: checking for TIOCGWINSZ in sys/ioctl.h" >&5
ccc6cda3
JA
7515if eval "test \"`echo '$''{'bash_cv_tiocgwinsz_in_ioctl'+set}'`\" = set"; then
7516 echo $ac_n "(cached) $ac_c" 1>&6
7517else
7518 cat > conftest.$ac_ext <<EOF
28ef6c31 7519#line 7520 "configure"
ccc6cda3
JA
7520#include "confdefs.h"
7521#include <sys/types.h>
7522#include <sys/ioctl.h>
7523int main() {
7524int x = TIOCGWINSZ;
7525; return 0; }
7526EOF
28ef6c31 7527if { (eval echo configure:7528: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ccc6cda3
JA
7528 rm -rf conftest*
7529 bash_cv_tiocgwinsz_in_ioctl=yes
7530else
7531 echo "configure: failed program was:" >&5
7532 cat conftest.$ac_ext >&5
7533 rm -rf conftest*
7534 bash_cv_tiocgwinsz_in_ioctl=no
7535fi
7536rm -f conftest*
7537fi
7538
7539echo "$ac_t""$bash_cv_tiocgwinsz_in_ioctl" 1>&6
7540if test $bash_cv_tiocgwinsz_in_ioctl = yes; then
7541cat >> confdefs.h <<\EOF
7542#define GWINSZ_IN_SYS_IOCTL 1
7543EOF
7544
7545fi
7546
7547echo $ac_n "checking for TIOCSTAT in sys/ioctl.h""... $ac_c" 1>&6
28ef6c31 7548echo "configure:7549: checking for TIOCSTAT in sys/ioctl.h" >&5
ccc6cda3
JA
7549if eval "test \"`echo '$''{'bash_cv_tiocstat_in_ioctl'+set}'`\" = set"; then
7550 echo $ac_n "(cached) $ac_c" 1>&6
7551else
7552 cat > conftest.$ac_ext <<EOF
28ef6c31 7553#line 7554 "configure"
ccc6cda3
JA
7554#include "confdefs.h"
7555#include <sys/types.h>
7556#include <sys/ioctl.h>
7557int main() {
7558int x = TIOCSTAT;
7559; return 0; }
7560EOF
28ef6c31 7561if { (eval echo configure:7562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ccc6cda3
JA
7562 rm -rf conftest*
7563 bash_cv_tiocstat_in_ioctl=yes
7564else
7565 echo "configure: failed program was:" >&5
7566 cat conftest.$ac_ext >&5
7567 rm -rf conftest*
7568 bash_cv_tiocstat_in_ioctl=no
7569fi
7570rm -f conftest*
7571fi
7572
7573echo "$ac_t""$bash_cv_tiocstat_in_ioctl" 1>&6
7574if test $bash_cv_tiocstat_in_ioctl = yes; then
7575cat >> confdefs.h <<\EOF
7576#define TIOCSTAT_IN_SYS_IOCTL 1
7577EOF
7578
7579fi
7580
7581echo $ac_n "checking for FIONREAD in sys/ioctl.h""... $ac_c" 1>&6
28ef6c31 7582echo "configure:7583: checking for FIONREAD in sys/ioctl.h" >&5
ccc6cda3
JA
7583if eval "test \"`echo '$''{'bash_cv_fionread_in_ioctl'+set}'`\" = set"; then
7584 echo $ac_n "(cached) $ac_c" 1>&6
7585else
7586 cat > conftest.$ac_ext <<EOF
28ef6c31 7587#line 7588 "configure"
ccc6cda3
JA
7588#include "confdefs.h"
7589#include <sys/types.h>
7590#include <sys/ioctl.h>
7591int main() {
7592int x = FIONREAD;
7593; return 0; }
7594EOF
28ef6c31 7595if { (eval echo configure:7596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ccc6cda3
JA
7596 rm -rf conftest*
7597 bash_cv_fionread_in_ioctl=yes
7598else
7599 echo "configure: failed program was:" >&5
7600 cat conftest.$ac_ext >&5
7601 rm -rf conftest*
7602 bash_cv_fionread_in_ioctl=no
7603fi
7604rm -f conftest*
7605fi
7606
7607echo "$ac_t""$bash_cv_fionread_in_ioctl" 1>&6
7608if test $bash_cv_fionread_in_ioctl = yes; then
7609cat >> confdefs.h <<\EOF
7610#define FIONREAD_IN_SYS_IOCTL 1
7611EOF
7612
7613fi
7614
d166f048
JA
7615
7616echo $ac_n "checking for speed_t in sys/types.h""... $ac_c" 1>&6
28ef6c31 7617echo "configure:7618: checking for speed_t in sys/types.h" >&5
d166f048
JA
7618if eval "test \"`echo '$''{'bash_cv_speed_t_in_sys_types'+set}'`\" = set"; then
7619 echo $ac_n "(cached) $ac_c" 1>&6
7620else
7621 cat > conftest.$ac_ext <<EOF
28ef6c31 7622#line 7623 "configure"
d166f048
JA
7623#include "confdefs.h"
7624#include <sys/types.h>
7625int main() {
7626speed_t x;
7627; return 0; }
7628EOF
28ef6c31 7629if { (eval echo configure:7630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d166f048
JA
7630 rm -rf conftest*
7631 bash_cv_speed_t_in_sys_types=yes
7632else
7633 echo "configure: failed program was:" >&5
7634 cat conftest.$ac_ext >&5
7635 rm -rf conftest*
7636 bash_cv_speed_t_in_sys_types=no
7637fi
7638rm -f conftest*
7639fi
7640
7641echo "$ac_t""$bash_cv_speed_t_in_sys_types" 1>&6
7642if test $bash_cv_speed_t_in_sys_types = yes; then
7643cat >> confdefs.h <<\EOF
7644#define SPEED_T_IN_SYS_TYPES 1
7645EOF
7646
7647fi
7648
28ef6c31
JA
7649echo $ac_n "checking whether getpw functions are declared in pwd.h""... $ac_c" 1>&6
7650echo "configure:7651: checking whether getpw functions are declared in pwd.h" >&5
7651if eval "test \"`echo '$''{'bash_cv_getpw_declared'+set}'`\" = set"; then
ccc6cda3
JA
7652 echo $ac_n "(cached) $ac_c" 1>&6
7653else
7654 cat > conftest.$ac_ext <<EOF
28ef6c31 7655#line 7656 "configure"
ccc6cda3 7656#include "confdefs.h"
28ef6c31 7657
ccc6cda3 7658#include <sys/types.h>
28ef6c31
JA
7659#ifdef HAVE_UNISTD_H
7660# include <unistd.h>
7661#endif
ccc6cda3 7662#include <pwd.h>
28ef6c31 7663
ccc6cda3 7664EOF
28ef6c31
JA
7665if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7666 egrep "getpwuid" >/dev/null 2>&1; then
ccc6cda3 7667 rm -rf conftest*
28ef6c31 7668 bash_cv_getpw_declared=yes
ccc6cda3 7669else
ccc6cda3 7670 rm -rf conftest*
28ef6c31 7671 bash_cv_getpw_declared=no
ccc6cda3
JA
7672fi
7673rm -f conftest*
28ef6c31 7674
ccc6cda3
JA
7675fi
7676
28ef6c31
JA
7677echo "$ac_t""$bash_cv_getpw_declared" 1>&6
7678if test $bash_cv_getpw_declared = yes; then
ccc6cda3
JA
7679cat >> confdefs.h <<\EOF
7680#define HAVE_GETPW_DECLS 1
7681EOF
7682
7683fi
7684
28ef6c31
JA
7685echo $ac_n "checking for unusable real-time signals due to large values""... $ac_c" 1>&6
7686echo "configure:7687: checking for unusable real-time signals due to large values" >&5
7687if eval "test \"`echo '$''{'bash_cv_unusable_rtsigs'+set}'`\" = set"; then
7688 echo $ac_n "(cached) $ac_c" 1>&6
7689else
7690 if test "$cross_compiling" = yes; then
7691 echo "configure: warning: cannot check real-time signals if cross compiling -- defaulting to yes" 1>&2
7692 bash_cv_unusable_rtsigs=yes
7693
7694else
7695 cat > conftest.$ac_ext <<EOF
7696#line 7697 "configure"
7697#include "confdefs.h"
7698
7699#include <sys/types.h>
7700#include <signal.h>
7701
7702#ifndef NSIG
7703# define NSIG 64
7704#endif
7705
7706main ()
7707{
7708 int n_sigs = 2 * NSIG;
7709#ifdef SIGRTMIN
7710 int rtmin = SIGRTMIN;
7711#else
7712 int rtmin = 0;
7713#endif
7714
7715 exit(rtmin < n_sigs);
7716}
7717EOF
7718if { (eval echo configure:7719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7719then
7720 bash_cv_unusable_rtsigs=yes
7721else
7722 echo "configure: failed program was:" >&5
7723 cat conftest.$ac_ext >&5
7724 rm -fr conftest*
7725 bash_cv_unusable_rtsigs=no
7726fi
7727rm -fr conftest*
7728fi
7729
7730fi
7731
7732echo "$ac_t""$bash_cv_unusable_rtsigs" 1>&6
7733if test $bash_cv_unusable_rtsigs = yes; then
7734cat >> confdefs.h <<\EOF
7735#define UNUSABLE_RT_SIGNALS 1
7736EOF
7737
7738fi
7739
ccc6cda3
JA
7740
7741case "$host_os" in
7742hpux*) echo $ac_n "checking whether $host_os needs _KERNEL for RLIMIT defines""... $ac_c" 1>&6
28ef6c31 7743echo "configure:7744: checking whether $host_os needs _KERNEL for RLIMIT defines" >&5
ccc6cda3
JA
7744if eval "test \"`echo '$''{'bash_cv_kernel_rlimit'+set}'`\" = set"; then
7745 echo $ac_n "(cached) $ac_c" 1>&6
7746else
7747 cat > conftest.$ac_ext <<EOF
28ef6c31 7748#line 7749 "configure"
ccc6cda3
JA
7749#include "confdefs.h"
7750
7751#include <sys/types.h>
7752#include <sys/resource.h>
7753
7754int main() {
7755
7756 int f;
7757 f = RLIMIT_DATA;
7758
7759; return 0; }
7760EOF
28ef6c31 7761if { (eval echo configure:7762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ccc6cda3
JA
7762 rm -rf conftest*
7763 bash_cv_kernel_rlimit=no
7764else
7765 echo "configure: failed program was:" >&5
7766 cat conftest.$ac_ext >&5
7767 rm -rf conftest*
7768 cat > conftest.$ac_ext <<EOF
28ef6c31 7769#line 7770 "configure"
ccc6cda3
JA
7770#include "confdefs.h"
7771
cce855bc
JA
7772#include <sys/types.h>
7773#define _KERNEL
7774#include <sys/resource.h>
7775#undef _KERNEL
7776
ccc6cda3
JA
7777int main() {
7778
7779 int f;
7780 f = RLIMIT_DATA;
cce855bc 7781
ccc6cda3
JA
7782; return 0; }
7783EOF
28ef6c31 7784if { (eval echo configure:7785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ccc6cda3
JA
7785 rm -rf conftest*
7786 bash_cv_kernel_rlimit=yes
7787else
7788 echo "configure: failed program was:" >&5
7789 cat conftest.$ac_ext >&5
7790 rm -rf conftest*
7791 bash_cv_kernel_rlimit=no
7792fi
7793rm -f conftest*
7794
7795fi
7796rm -f conftest*
7797fi
7798
7799echo "$ac_t""$bash_cv_kernel_rlimit" 1>&6
7800if test $bash_cv_kernel_rlimit = yes; then
7801cat >> confdefs.h <<\EOF
7802#define RLIMIT_NEEDS_KERNEL 1
7803EOF
7804
7805fi
7806 ;;
7807esac
7808
7809if test "$opt_readline" = yes; then
d166f048
JA
7810case "$host_os" in
7811aix*) prefer_curses=yes ;;
7812esac
ccc6cda3
JA
7813
7814if test "X$bash_cv_termcap_lib" = "X"; then
7815_bash_needmsg=yes
7816else
7817echo $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6
28ef6c31 7818echo "configure:7819: checking which library has the termcap functions" >&5
ccc6cda3
JA
7819_bash_needmsg=
7820fi
7821if eval "test \"`echo '$''{'bash_cv_termcap_lib'+set}'`\" = set"; then
7822 echo $ac_n "(cached) $ac_c" 1>&6
7823else
7824 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
28ef6c31 7825echo "configure:7826: checking for tgetent in -ltermcap" >&5
ccc6cda3
JA
7826ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
7827if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7828 echo $ac_n "(cached) $ac_c" 1>&6
7829else
7830 ac_save_LIBS="$LIBS"
7831LIBS="-ltermcap $LIBS"
7832cat > conftest.$ac_ext <<EOF
28ef6c31 7833#line 7834 "configure"
ccc6cda3
JA
7834#include "confdefs.h"
7835/* Override any gcc2 internal prototype to avoid an error. */
7836/* We use char because int might match the return type of a gcc2
7837 builtin and then its argument prototype would still apply. */
7838char tgetent();
7839
7840int main() {
7841tgetent()
7842; return 0; }
7843EOF
28ef6c31 7844if { (eval echo configure:7845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ccc6cda3
JA
7845 rm -rf conftest*
7846 eval "ac_cv_lib_$ac_lib_var=yes"
7847else
7848 echo "configure: failed program was:" >&5
7849 cat conftest.$ac_ext >&5
7850 rm -rf conftest*
7851 eval "ac_cv_lib_$ac_lib_var=no"
7852fi
7853rm -f conftest*
7854LIBS="$ac_save_LIBS"
7855
7856fi
7857if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7858 echo "$ac_t""yes" 1>&6
7859 bash_cv_termcap_lib=libtermcap
7860else
7861 echo "$ac_t""no" 1>&6
7862echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
28ef6c31 7863echo "configure:7864: checking for tgetent in -lcurses" >&5
ccc6cda3
JA
7864ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
7865if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7866 echo $ac_n "(cached) $ac_c" 1>&6
7867else
7868 ac_save_LIBS="$LIBS"
7869LIBS="-lcurses $LIBS"
7870cat > conftest.$ac_ext <<EOF
28ef6c31 7871#line 7872 "configure"
ccc6cda3
JA
7872#include "confdefs.h"
7873/* Override any gcc2 internal prototype to avoid an error. */
7874/* We use char because int might match the return type of a gcc2
7875 builtin and then its argument prototype would still apply. */
7876char tgetent();
7877
7878int main() {
7879tgetent()
7880; return 0; }
7881EOF
28ef6c31 7882if { (eval echo configure:7883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ccc6cda3
JA
7883 rm -rf conftest*
7884 eval "ac_cv_lib_$ac_lib_var=yes"
7885else
7886 echo "configure: failed program was:" >&5
7887 cat conftest.$ac_ext >&5
7888 rm -rf conftest*
7889 eval "ac_cv_lib_$ac_lib_var=no"
7890fi
7891rm -f conftest*
7892LIBS="$ac_save_LIBS"
7893
7894fi
7895if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7896 echo "$ac_t""yes" 1>&6
7897 bash_cv_termcap_lib=libcurses
7898else
7899 echo "$ac_t""no" 1>&6
7900echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
28ef6c31 7901echo "configure:7902: checking for tgetent in -lncurses" >&5
ccc6cda3
JA
7902ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
7903if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7904 echo $ac_n "(cached) $ac_c" 1>&6
7905else
7906 ac_save_LIBS="$LIBS"
7907LIBS="-lncurses $LIBS"
7908cat > conftest.$ac_ext <<EOF
28ef6c31 7909#line 7910 "configure"
ccc6cda3
JA
7910#include "confdefs.h"
7911/* Override any gcc2 internal prototype to avoid an error. */
7912/* We use char because int might match the return type of a gcc2
7913 builtin and then its argument prototype would still apply. */
7914char tgetent();
7915
7916int main() {
7917tgetent()
7918; return 0; }
7919EOF
28ef6c31 7920if { (eval echo configure:7921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ccc6cda3
JA
7921 rm -rf conftest*
7922 eval "ac_cv_lib_$ac_lib_var=yes"
7923else
7924 echo "configure: failed program was:" >&5
7925 cat conftest.$ac_ext >&5
7926 rm -rf conftest*
7927 eval "ac_cv_lib_$ac_lib_var=no"
7928fi
7929rm -f conftest*
7930LIBS="$ac_save_LIBS"
7931
7932fi
7933if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7934 echo "$ac_t""yes" 1>&6
7935 bash_cv_termcap_lib=libncurses
7936else
7937 echo "$ac_t""no" 1>&6
7938bash_cv_termcap_lib=gnutermcap
7939fi
7940
7941fi
7942
7943fi
7944
7945fi
7946
7947if test "X$_bash_needmsg" = "Xyes"; then
7948echo $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6
28ef6c31 7949echo "configure:7950: checking which library has the termcap functions" >&5
ccc6cda3
JA
7950fi
7951echo "$ac_t""using $bash_cv_termcap_lib" 1>&6
cce855bc 7952if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
ccc6cda3
JA
7953LDFLAGS="$LDFLAGS -L./lib/termcap"
7954TERMCAP_LIB="./lib/termcap/libtermcap.a"
7955TERMCAP_DEP="./lib/termcap/libtermcap.a"
d166f048 7956elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
ccc6cda3
JA
7957TERMCAP_LIB=-ltermcap
7958TERMCAP_DEP=
7959elif test $bash_cv_termcap_lib = libncurses; then
7960TERMCAP_LIB=-lncurses
7961TERMCAP_DEP=
7962else
7963TERMCAP_LIB=-lcurses
7964TERMCAP_DEP=
7965fi
7966
7967fi
7968
7969
7970
d166f048 7971echo $ac_n "checking whether /dev/fd is available""... $ac_c" 1>&6
28ef6c31 7972echo "configure:7973: checking whether /dev/fd is available" >&5
d166f048
JA
7973if eval "test \"`echo '$''{'bash_cv_dev_fd'+set}'`\" = set"; then
7974 echo $ac_n "(cached) $ac_c" 1>&6
7975else
7976 if test -d /dev/fd && test -r /dev/fd/0; then
7977 bash_cv_dev_fd=standard
7978 elif test -d /proc/self/fd && test -r /proc/self/fd/0; then
7979 bash_cv_dev_fd=whacky
7980 else
7981 bash_cv_dev_fd=absent
7982 fi
7983
7984fi
7985
7986echo "$ac_t""$bash_cv_dev_fd" 1>&6
7987if test $bash_cv_dev_fd = "standard"; then
7988 cat >> confdefs.h <<\EOF
7989#define HAVE_DEV_FD 1
7990EOF
7991
7992 cat >> confdefs.h <<\EOF
7993#define DEV_FD_PREFIX "/dev/fd/"
7994EOF
7995
7996elif test $bash_cv_dev_fd = "whacky"; then
7997 cat >> confdefs.h <<\EOF
7998#define HAVE_DEV_FD 1
7999EOF
8000
8001 cat >> confdefs.h <<\EOF
8002#define DEV_FD_PREFIX "/proc/self/fd/"
8003EOF
8004
8005fi
8006
bb70624e 8007echo $ac_n "checking whether /dev/stdin stdout stderr are available""... $ac_c" 1>&6
28ef6c31 8008echo "configure:8009: checking whether /dev/stdin stdout stderr are available" >&5
bb70624e
JA
8009if eval "test \"`echo '$''{'bash_cv_dev_stdin'+set}'`\" = set"; then
8010 echo $ac_n "(cached) $ac_c" 1>&6
8011else
8012 if test -d /dev/fd && test -r /dev/stdin; then
8013 bash_cv_dev_stdin=present
8014 elif test -d /proc/self/fd && test -r /dev/stdin; then
8015 bash_cv_dev_stdin=present
8016 else
8017 bash_cv_dev_stdin=absent
8018 fi
8019
8020fi
8021
8022echo "$ac_t""$bash_cv_dev_stdin" 1>&6
8023if test $bash_cv_dev_stdin = "present"; then
8024 cat >> confdefs.h <<\EOF
8025#define HAVE_DEV_STDIN 1
8026EOF
8027
8028fi
8029
ccc6cda3 8030echo $ac_n "checking for default mail directory""... $ac_c" 1>&6
28ef6c31 8031echo "configure:8032: checking for default mail directory" >&5
ccc6cda3
JA
8032if eval "test \"`echo '$''{'bash_cv_mail_dir'+set}'`\" = set"; then
8033 echo $ac_n "(cached) $ac_c" 1>&6
8034else
8035 if test -d /var/mail; then
8036 bash_cv_mail_dir=/var/mail
8037 elif test -d /usr/mail; then
8038 bash_cv_mail_dir=/usr/mail
ccc6cda3
JA
8039 elif test -d /var/spool/mail; then
8040 bash_cv_mail_dir=/var/spool/mail
e8ce775d
JA
8041 elif test -d /usr/spool/mail; then
8042 bash_cv_mail_dir=/usr/spool/mail
ccc6cda3
JA
8043 else
8044 bash_cv_mail_dir=unknown
8045 fi
8046
8047fi
8048
8049echo "$ac_t""$bash_cv_mail_dir" 1>&6
8050if test $bash_cv_mail_dir = "/var/mail"; then
8051 cat >> confdefs.h <<\EOF
8052#define DEFAULT_MAIL_DIRECTORY "/var/mail"
8053EOF
8054
8055elif test $bash_cv_mail_dir = "/usr/mail"; then
8056 cat >> confdefs.h <<\EOF
8057#define DEFAULT_MAIL_DIRECTORY "/usr/mail"
8058EOF
8059
8060elif test $bash_cv_mail_dir = "/var/spool/mail"; then
8061 cat >> confdefs.h <<\EOF
8062#define DEFAULT_MAIL_DIRECTORY "/var/spool/mail"
8063EOF
8064
8065elif test $bash_cv_mail_dir = "/usr/spool/mail"; then
8066 cat >> confdefs.h <<\EOF
8067#define DEFAULT_MAIL_DIRECTORY "/usr/spool/mail"
8068EOF
8069
8070else
8071 cat >> confdefs.h <<\EOF
8072#define DEFAULT_MAIL_DIRECTORY "unknown"
8073EOF
8074
8075fi
8076
8077
8078if test "$bash_cv_job_control_missing" = missing; then
8079 opt_job_control=no
8080fi
8081
8082if test "$opt_job_control" = yes; then
8083cat >> confdefs.h <<\EOF
8084#define JOB_CONTROL 1
8085EOF
8086
8087JOBS_O=jobs.o
8088else
8089JOBS_O=nojobs.o
8090fi
8091
8092
8093
8094
d166f048
JA
8095LOCAL_DEFS=-DSHELL
8096
8097
b72432fd 8098case "${host_os}" in
e8ce775d 8099sysv4.2*) cat >> confdefs.h <<\EOF
ccc6cda3
JA
8100#define SVR4_2 1
8101EOF
8102
8103 cat >> confdefs.h <<\EOF
8104#define SVR4 1
8105EOF
8106 ;;
8107sysv4*) cat >> confdefs.h <<\EOF
8108#define SVR4 1
8109EOF
8110 ;;
b72432fd
JA
8111sysv5*) cat >> confdefs.h <<\EOF
8112#define SVR5 1
8113EOF
8114 ;;
8115hpux9*) LOCAL_CFLAGS="-DHPUX9 -DHPUX" ;;
ccc6cda3
JA
8116hpux*) LOCAL_CFLAGS=-DHPUX ;;
8117dgux*) LOCAL_CFLAGS=-D_DGUX_SOURCE; LOCAL_LIBS=-ldgc ;;
bb70624e
JA
8118isc*) LOCAL_CFLAGS=-Disc386 ;;
8119rhapsody*) LOCAL_CFLAGS=-DRHAPSODY ;;
b72432fd 8120sco3.2v5*) LOCAL_CFLAGS="-b elf -DWAITPID_BROKEN -DNO_MEMSCRAMBLE -DPATH_MAX=1024" ;;
ccc6cda3
JA
8121sco3.2v4*) LOCAL_CFLAGS="-DMUST_UNBLOCK_CHLD -DNO_MEMSCRAMBLE -DPATH_MAX=1024" ;;
8122sco3.2*) LOCAL_CFLAGS=-DMUST_UNBLOCK_CHLD ;;
d166f048
JA
8123sunos4*) LOCAL_CFLAGS=-DSunOS4 ;;
8124solaris2.5*) LOCAL_CFLAGS=-DSunOS5 ;;
b72432fd 8125lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
d166f048 8126linux*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading
d166f048 8127*qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s -lunix -lncurses" ;;
b72432fd 8128powerux*) LOCAL_LIBS="-lgen" ;;
28ef6c31 8129cygwin*) LOCAL_LIBS="-luser32" ;;
b72432fd
JA
8130opennt*|interix*) LOCAL_CFLAGS="-DNO_MAIN_ENV_ARG" ;;
8131esac
8132
8133case "${host_os}-${CC}" in
8134aix4.2*-*gcc*) LOCAL_LDFLAGS="-Xlinker -bexpall -Xlinker -brtl" ;;
8135aix4.2*) LOCAL_LDFLAGS="-bexpall -brtl" ;;
8136bsdi4*-*gcc*) LOCAL_LDFLAGS="-rdynamic" ;; # allow dynamic loading, like Linux
ccc6cda3
JA
8137esac
8138
bb70624e 8139case "${host_os}" in
28ef6c31
JA
8140freebsd[3-9]*)
8141 if test -x /usr/bin/objformat && test "`/usr/bin/objformat`" = "elf" ; then
bb70624e
JA
8142 LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
8143 fi ;;
28ef6c31 8144freebsdelf*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading
bb70624e
JA
8145esac
8146
ccc6cda3
JA
8147case "$host_cpu" in
8148*cray*) LOCAL_CFLAGS="-DCRAY" ;; # shell var so config.h can use it
8149esac
8150
8151case "$host_cpu-$host_os" in
8152ibmrt-*bsd4*) LOCAL_CFLAGS="-ma -U__STDC__" ;;
8153esac
8154
8155case "$host_cpu-$host_vendor-$host_os" in
8156m88k-motorola-sysv3) LOCAL_CFLAGS=-DWAITPID_BROKEN ;;
8157mips-pyramid-sysv4) LOCAL_CFLAGS=-Xa ;;
8158esac
8159
b72432fd
JA
8160#
8161# Shared object configuration section. These values are generated by
8162# ${srcdir}/support/shobj-conf
8163#
8164if test "$ac_cv_func_dlopen" = "yes" && test -f ${srcdir}/support/shobj-conf
8165then
8166 echo $ac_n "checking shared object configuration for loadable builtins""... $ac_c" 1>&6
28ef6c31
JA
8167echo "configure:8168: checking shared object configuration for loadable builtins" >&5
8168 eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c "${host_cpu}" -o "${host_os}" -v "${host_vendor}"`
b72432fd
JA
8169
8170
8171
8172
8173
8174
8175
8176 echo "$ac_t""$SHOBJ_STATUS" 1>&6
8177fi
8178
ccc6cda3
JA
8179# try to create a directory tree if the source is elsewhere
8180# this should be packaged into a script accessible via ${srcdir}/support
8181case "$srcdir" in
8182.) ;;
cce855bc 8183*) for d in doc tests support lib examples; do # dirs
ccc6cda3
JA
8184 test -d $d || mkdir $d
8185 done
cce855bc 8186 for ld in readline glob tilde malloc sh termcap; do # libdirs
ccc6cda3
JA
8187 test -d lib/$ld || mkdir lib/$ld
8188 done
cce855bc 8189 test -d examples/loadables || mkdir examples/loadables # loadable builtins
bb70624e 8190 test -d examples/loadables/perl || mkdir examples/loadables/perl
ccc6cda3
JA
8191 ;;
8192esac
8193
8194BUILD_DIR=`pwd`
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
d166f048 8212
b72432fd
JA
8213
8214
cce855bc
JA
8215
8216
d166f048
JA
8217#AC_SUBST(ALLOCA_SOURCE)
8218#AC_SUBST(ALLOCA_OBJECT)
8219
ccc6cda3
JA
8220trap '' 1 2 15
8221cat > confcache <<\EOF
8222# This file is a shell script that caches the results of configure
8223# tests run on this system so they can be shared between configure
8224# scripts and configure runs. It is not useful on other systems.
8225# If it contains results you don't want to keep, you may remove or edit it.
726f6388 8226#
ccc6cda3
JA
8227# By default, configure uses ./config.cache as the cache file,
8228# creating it if it does not exist already. You can give configure
8229# the --cache-file=FILE option to use a different cache file; that is
8230# what configure does when it calls configure scripts in
8231# subdirectories, so they share the cache.
8232# Giving --cache-file=/dev/null disables caching, for debugging configure.
8233# config.status only pays attention to the cache file if you give it the
8234# --recheck option to rerun configure.
8235#
8236EOF
8237# The following way of writing the cache mishandles newlines in values,
8238# but we know of no workaround that is simple, portable, and efficient.
8239# So, don't put newlines in cache variables' values.
8240# Ultrix sh set writes to stderr and can't be redirected directly,
8241# and sets the high bit in the cache file unless we assign to the vars.
8242(set) 2>&1 |
bb70624e 8243 case `(ac_space=' '; set | grep ac_space) 2>&1` in
ccc6cda3
JA
8244 *ac_space=\ *)
8245 # `set' does not quote correctly, so add quotes (double-quote substitution
8246 # turns \\\\ into \\, and sed turns \\ into \).
8247 sed -n \
8248 -e "s/'/'\\\\''/g" \
8249 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8250 ;;
8251 *)
8252 # `set' quotes correctly as required by POSIX, so do not add quotes.
8253 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8254 ;;
8255 esac >> confcache
8256if cmp -s $cache_file confcache; then
8257 :
8258else
8259 if test -w $cache_file; then
8260 echo "updating cache $cache_file"
8261 cat confcache > $cache_file
8262 else
8263 echo "not updating unwritable cache $cache_file"
8264 fi
8265fi
8266rm -f confcache
8267
8268trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8269
8270test "x$prefix" = xNONE && prefix=$ac_default_prefix
8271# Let make expand exec_prefix.
8272test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8273
8274# Any assignment to VPATH causes Sun make to only execute
8275# the first set of double-colon rules, so remove it if not needed.
8276# If there is a colon in the path, we need to keep it.
8277if test "x$srcdir" = x.; then
8278 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
8279fi
8280
8281trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8282
8283DEFS=-DHAVE_CONFIG_H
8284
8285# Without the "./", some shells look in PATH for config.status.
8286: ${CONFIG_STATUS=./config.status}
8287
8288echo creating $CONFIG_STATUS
8289rm -f $CONFIG_STATUS
8290cat > $CONFIG_STATUS <<EOF
8291#! /bin/sh
8292# Generated automatically by configure.
8293# Run this file to recreate the current configuration.
8294# This directory was configured as follows,
8295# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8296#
8297# $0 $ac_configure_args
8298#
8299# Compiler output produced by configure, useful for debugging
8300# configure, is in ./config.log if it exists.
8301
8302ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8303for ac_option
8304do
8305 case "\$ac_option" in
8306 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8307 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8308 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8309 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
bb70624e 8310 echo "$CONFIG_STATUS generated by autoconf version 2.13"
ccc6cda3
JA
8311 exit 0 ;;
8312 -help | --help | --hel | --he | --h)
8313 echo "\$ac_cs_usage"; exit 0 ;;
8314 *) echo "\$ac_cs_usage"; exit 1 ;;
8315 esac
8316done
8317
8318ac_given_srcdir=$srcdir
8319ac_given_INSTALL="$INSTALL"
8320
8321trap 'rm -fr `echo "Makefile builtins/Makefile lib/readline/Makefile lib/glob/Makefile \
cce855bc
JA
8322 lib/malloc/Makefile lib/sh/Makefile lib/termcap/Makefile \
8323 lib/tilde/Makefile doc/Makefile support/Makefile \
bb70624e 8324 examples/loadables/Makefile examples/loadables/perl/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
ccc6cda3
JA
8325EOF
8326cat >> $CONFIG_STATUS <<EOF
8327
8328# Protect against being on the right side of a sed subst in config.status.
8329sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8330 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8331$ac_vpsub
8332$extrasub
bb70624e 8333s%@SHELL@%$SHELL%g
ccc6cda3
JA
8334s%@CFLAGS@%$CFLAGS%g
8335s%@CPPFLAGS@%$CPPFLAGS%g
8336s%@CXXFLAGS@%$CXXFLAGS%g
bb70624e 8337s%@FFLAGS@%$FFLAGS%g
ccc6cda3
JA
8338s%@DEFS@%$DEFS%g
8339s%@LDFLAGS@%$LDFLAGS%g
8340s%@LIBS@%$LIBS%g
8341s%@exec_prefix@%$exec_prefix%g
8342s%@prefix@%$prefix%g
8343s%@program_transform_name@%$program_transform_name%g
8344s%@bindir@%$bindir%g
8345s%@sbindir@%$sbindir%g
8346s%@libexecdir@%$libexecdir%g
8347s%@datadir@%$datadir%g
8348s%@sysconfdir@%$sysconfdir%g
8349s%@sharedstatedir@%$sharedstatedir%g
8350s%@localstatedir@%$localstatedir%g
8351s%@libdir@%$libdir%g
8352s%@includedir@%$includedir%g
8353s%@oldincludedir@%$oldincludedir%g
8354s%@infodir@%$infodir%g
8355s%@mandir@%$mandir%g
8356s%@host@%$host%g
8357s%@host_alias@%$host_alias%g
8358s%@host_cpu@%$host_cpu%g
8359s%@host_vendor@%$host_vendor%g
8360s%@host_os@%$host_os%g
d166f048 8361s%@TESTSCRIPT@%$TESTSCRIPT%g
ccc6cda3 8362s%@PURIFY@%$PURIFY%g
d166f048 8363s%@MALLOC_TARGET@%$MALLOC_TARGET%g
ccc6cda3 8364s%@MALLOC_SRC@%$MALLOC_SRC%g
bb70624e 8365s%@htmldir@%$htmldir%g
b72432fd
JA
8366s%@CC@%$CC%g
8367s%@CPP@%$CPP%g
bb70624e 8368s%@EXEEXT@%$EXEEXT%g
b72432fd
JA
8369s%@SIGNAMES_H@%$SIGNAMES_H%g
8370s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
8371s%@STATIC_LD@%$STATIC_LD%g
ccc6cda3
JA
8372s%@READLINE_LIB@%$READLINE_LIB%g
8373s%@READLINE_DEP@%$READLINE_DEP%g
b72432fd
JA
8374s%@RL_LIBDIR@%$RL_LIBDIR%g
8375s%@RL_INCLUDE@%$RL_INCLUDE%g
ccc6cda3
JA
8376s%@HISTORY_LIB@%$HISTORY_LIB%g
8377s%@HISTORY_DEP@%$HISTORY_DEP%g
b72432fd 8378s%@HIST_LIBDIR@%$HIST_LIBDIR%g
ccc6cda3 8379s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
bb70624e 8380s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
ccc6cda3
JA
8381s%@INSTALL_DATA@%$INSTALL_DATA%g
8382s%@AR@%$AR%g
8383s%@RANLIB@%$RANLIB%g
8384s%@YACC@%$YACC%g
8385s%@SET_MAKE@%$SET_MAKE%g
b72432fd 8386s%@MAKE_SHELL@%$MAKE_SHELL%g
ccc6cda3
JA
8387s%@ALLOCA@%$ALLOCA%g
8388s%@TERMCAP_LIB@%$TERMCAP_LIB%g
8389s%@TERMCAP_DEP@%$TERMCAP_DEP%g
8390s%@JOBS_O@%$JOBS_O%g
b72432fd
JA
8391s%@SHOBJ_CC@%$SHOBJ_CC%g
8392s%@SHOBJ_CFLAGS@%$SHOBJ_CFLAGS%g
8393s%@SHOBJ_LD@%$SHOBJ_LD%g
8394s%@SHOBJ_LDFLAGS@%$SHOBJ_LDFLAGS%g
8395s%@SHOBJ_XLDFLAGS@%$SHOBJ_XLDFLAGS%g
8396s%@SHOBJ_LIBS@%$SHOBJ_LIBS%g
8397s%@SHOBJ_STATUS@%$SHOBJ_STATUS%g
cce855bc 8398s%@PROFILE_FLAGS@%$PROFILE_FLAGS%g
ccc6cda3
JA
8399s%@incdir@%$incdir%g
8400s%@BUILD_DIR@%$BUILD_DIR%g
b72432fd 8401s%@ARFLAGS@%$ARFLAGS%g
d166f048
JA
8402s%@BASHVERS@%$BASHVERS%g
8403s%@BASHPATCH@%$BASHPATCH%g
ccc6cda3
JA
8404s%@LOCAL_LIBS@%$LOCAL_LIBS%g
8405s%@LOCAL_CFLAGS@%$LOCAL_CFLAGS%g
8406s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
d166f048 8407s%@LOCAL_DEFS@%$LOCAL_DEFS%g
ccc6cda3
JA
8408
8409CEOF
8410EOF
8411
8412cat >> $CONFIG_STATUS <<\EOF
8413
8414# Split the substitutions into bite-sized pieces for seds with
8415# small command number limits, like on Digital OSF/1 and HP-UX.
8416ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
8417ac_file=1 # Number of current file.
8418ac_beg=1 # First line for current file.
8419ac_end=$ac_max_sed_cmds # Line after last line for current file.
8420ac_more_lines=:
8421ac_sed_cmds=""
8422while $ac_more_lines; do
8423 if test $ac_beg -gt 1; then
8424 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
8425 else
8426 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
8427 fi
8428 if test ! -s conftest.s$ac_file; then
8429 ac_more_lines=false
8430 rm -f conftest.s$ac_file
8431 else
8432 if test -z "$ac_sed_cmds"; then
8433 ac_sed_cmds="sed -f conftest.s$ac_file"
8434 else
8435 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
8436 fi
8437 ac_file=`expr $ac_file + 1`
8438 ac_beg=$ac_end
8439 ac_end=`expr $ac_end + $ac_max_sed_cmds`
8440 fi
8441done
8442if test -z "$ac_sed_cmds"; then
8443 ac_sed_cmds=cat
8444fi
8445EOF
8446
8447cat >> $CONFIG_STATUS <<EOF
8448
8449CONFIG_FILES=\${CONFIG_FILES-"Makefile builtins/Makefile lib/readline/Makefile lib/glob/Makefile \
cce855bc
JA
8450 lib/malloc/Makefile lib/sh/Makefile lib/termcap/Makefile \
8451 lib/tilde/Makefile doc/Makefile support/Makefile \
bb70624e 8452 examples/loadables/Makefile examples/loadables/perl/Makefile"}
ccc6cda3
JA
8453EOF
8454cat >> $CONFIG_STATUS <<\EOF
8455for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
8456 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8457 case "$ac_file" in
8458 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8459 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8460 *) ac_file_in="${ac_file}.in" ;;
8461 esac
8462
8463 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
8464
8465 # Remove last slash and all that follows it. Not all systems have dirname.
8466 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8467 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8468 # The file is in a subdirectory.
8469 test ! -d "$ac_dir" && mkdir "$ac_dir"
8470 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
8471 # A "../" for each directory in $ac_dir_suffix.
8472 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
8473 else
8474 ac_dir_suffix= ac_dots=
8475 fi
8476
8477 case "$ac_given_srcdir" in
8478 .) srcdir=.
8479 if test -z "$ac_dots"; then top_srcdir=.
8480 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
8481 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
8482 *) # Relative path.
8483 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
8484 top_srcdir="$ac_dots$ac_given_srcdir" ;;
8485 esac
8486
8487 case "$ac_given_INSTALL" in
8488 [/$]*) INSTALL="$ac_given_INSTALL" ;;
8489 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
8490 esac
8491
8492 echo creating "$ac_file"
8493 rm -f "$ac_file"
8494 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
8495 case "$ac_file" in
8496 *Makefile*) ac_comsub="1i\\
8497# $configure_input" ;;
8498 *) ac_comsub= ;;
8499 esac
8500
8501 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8502 sed -e "$ac_comsub
8503s%@configure_input@%$configure_input%g
8504s%@srcdir@%$srcdir%g
8505s%@top_srcdir@%$top_srcdir%g
8506s%@INSTALL@%$INSTALL%g
8507" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
8508fi; done
8509rm -f conftest.s*
8510
8511# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8512# NAME is the cpp macro being defined and VALUE is the value it is being given.
8513#
8514# ac_d sets the value in "#define NAME VALUE" lines.
8515ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
8516ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
8517ac_dC='\3'
8518ac_dD='%g'
8519# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
8520ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8521ac_uB='\([ ]\)%\1#\2define\3'
8522ac_uC=' '
8523ac_uD='\4%g'
8524# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8525ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8526ac_eB='$%\1#\2define\3'
8527ac_eC=' '
8528ac_eD='%g'
8529
8530if test "${CONFIG_HEADERS+set}" != set; then
8531EOF
8532cat >> $CONFIG_STATUS <<EOF
8533 CONFIG_HEADERS="config.h"
8534EOF
8535cat >> $CONFIG_STATUS <<\EOF
8536fi
8537for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
8538 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8539 case "$ac_file" in
8540 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8541 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8542 *) ac_file_in="${ac_file}.in" ;;
8543 esac
8544
8545 echo creating $ac_file
8546
8547 rm -f conftest.frag conftest.in conftest.out
8548 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8549 cat $ac_file_inputs > conftest.in
8550
8551EOF
8552
8553# Transform confdefs.h into a sed script conftest.vals that substitutes
8554# the proper values into config.h.in to produce config.h. And first:
8555# Protect against being on the right side of a sed subst in config.status.
8556# Protect against being in an unquoted here document in config.status.
8557rm -f conftest.vals
8558cat > conftest.hdr <<\EOF
8559s/[\\&%]/\\&/g
8560s%[\\$`]%\\&%g
8561s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
8562s%ac_d%ac_u%gp
8563s%ac_u%ac_e%gp
8564EOF
8565sed -n -f conftest.hdr confdefs.h > conftest.vals
8566rm -f conftest.hdr
8567
8568# This sed command replaces #undef with comments. This is necessary, for
8569# example, in the case of _POSIX_SOURCE, which is predefined and required
8570# on some systems where configure will not decide to define it.
8571cat >> conftest.vals <<\EOF
8572s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
8573EOF
8574
8575# Break up conftest.vals because some shells have a limit on
8576# the size of here documents, and old seds have small limits too.
8577
8578rm -f conftest.tail
8579while :
8580do
8581 ac_lines=`grep -c . conftest.vals`
8582 # grep -c gives empty output for an empty file on some AIX systems.
8583 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
8584 # Write a limited-size here document to conftest.frag.
8585 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
8586 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
8587 echo 'CEOF
8588 sed -f conftest.frag conftest.in > conftest.out
8589 rm -f conftest.in
8590 mv conftest.out conftest.in
8591' >> $CONFIG_STATUS
8592 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
8593 rm -f conftest.vals
8594 mv conftest.tail conftest.vals
8595done
8596rm -f conftest.vals
8597
8598cat >> $CONFIG_STATUS <<\EOF
8599 rm -f conftest.frag conftest.h
8600 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
8601 cat conftest.in >> conftest.h
8602 rm -f conftest.in
8603 if cmp -s $ac_file conftest.h 2>/dev/null; then
8604 echo "$ac_file is unchanged"
8605 rm -f conftest.h
8606 else
8607 # Remove last slash and all that follows it. Not all systems have dirname.
8608 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8609 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8610 # The file is in a subdirectory.
8611 test ! -d "$ac_dir" && mkdir "$ac_dir"
8612 fi
8613 rm -f $ac_file
8614 mv conftest.h $ac_file
8615 fi
8616fi; done
8617
8618EOF
8619cat >> $CONFIG_STATUS <<EOF
8620
8621EOF
8622cat >> $CONFIG_STATUS <<\EOF
8623
8624# Makefile uses this timestamp file to record whether config.h is up to date.
8625echo timestamp > stamp-h
8626
726f6388 8627exit 0
ccc6cda3
JA
8628EOF
8629chmod +x $CONFIG_STATUS
8630rm -fr confdefs* $ac_clean_files
8631test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
8632