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