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