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