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