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