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