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