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