Commit | Line | Data |
---|---|---|
0f2d19dd JB |
1 | #! /bin/sh |
2 | ||
3 | # Guess values for system-dependent variables and create Makefiles. | |
2e18892a | 4 | # Generated automatically using autoconf version 2.10 |
0f2d19dd JB |
5 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. |
6 | # | |
7 | # This configure script is free software; the Free Software Foundation | |
8 | # gives unlimited permission to copy, distribute and modify it. | |
9 | ||
10 | # Defaults: | |
11 | ac_help= | |
12 | ac_default_prefix=/usr/local | |
13 | # Any additions from configure.in: | |
074657b0 MD |
14 | ac_help="$ac_help |
15 | --disable-debug Don't include debugging support" | |
0f2d19dd JB |
16 | |
17 | # Initialize some variables set by options. | |
18 | # The variables have the same names as the options, with | |
19 | # dashes changed to underlines. | |
20 | build=NONE | |
21 | cache_file=./config.cache | |
22 | exec_prefix=NONE | |
23 | host=NONE | |
24 | no_create= | |
25 | nonopt=NONE | |
26 | no_recursion= | |
27 | prefix=NONE | |
28 | program_prefix=NONE | |
29 | program_suffix=NONE | |
30 | program_transform_name=s,x,x, | |
31 | silent= | |
32 | site= | |
33 | srcdir= | |
34 | target=NONE | |
35 | verbose= | |
36 | x_includes=NONE | |
37 | x_libraries=NONE | |
38 | bindir='${exec_prefix}/bin' | |
39 | sbindir='${exec_prefix}/sbin' | |
40 | libexecdir='${exec_prefix}/libexec' | |
41 | datadir='${prefix}/share' | |
42 | sysconfdir='${prefix}/etc' | |
43 | sharedstatedir='${prefix}/com' | |
44 | localstatedir='${prefix}/var' | |
45 | libdir='${exec_prefix}/lib' | |
46 | includedir='${prefix}/include' | |
47 | oldincludedir='/usr/include' | |
48 | infodir='${prefix}/info' | |
49 | mandir='${prefix}/man' | |
50 | ||
51 | # Initialize some other variables. | |
52 | subdirs= | |
53 | MFLAGS= MAKEFLAGS= | |
54 | ||
55 | ac_prev= | |
56 | for ac_option | |
57 | do | |
58 | ||
59 | # If the previous option needs an argument, assign it. | |
60 | if test -n "$ac_prev"; then | |
61 | eval "$ac_prev=\$ac_option" | |
62 | ac_prev= | |
63 | continue | |
64 | fi | |
65 | ||
66 | case "$ac_option" in | |
67 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
68 | *) ac_optarg= ;; | |
69 | esac | |
70 | ||
71 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
72 | ||
73 | case "$ac_option" in | |
74 | ||
75 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
76 | ac_prev=bindir ;; | |
77 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
78 | bindir="$ac_optarg" ;; | |
79 | ||
80 | -build | --build | --buil | --bui | --bu) | |
81 | ac_prev=build ;; | |
82 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
83 | build="$ac_optarg" ;; | |
84 | ||
85 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
86 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
87 | ac_prev=cache_file ;; | |
88 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
89 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
90 | cache_file="$ac_optarg" ;; | |
91 | ||
92 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
93 | ac_prev=datadir ;; | |
94 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
95 | | --da=*) | |
96 | datadir="$ac_optarg" ;; | |
97 | ||
98 | -disable-* | --disable-*) | |
99 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
100 | # Reject names that are not valid shell variable names. | |
101 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
102 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
103 | fi | |
104 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
105 | eval "enable_${ac_feature}=no" ;; | |
106 | ||
107 | -enable-* | --enable-*) | |
108 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
109 | # Reject names that are not valid shell variable names. | |
110 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
111 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
112 | fi | |
113 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
114 | case "$ac_option" in | |
115 | *=*) ;; | |
116 | *) ac_optarg=yes ;; | |
117 | esac | |
118 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
119 | ||
120 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
121 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
122 | | --exec | --exe | --ex) | |
123 | ac_prev=exec_prefix ;; | |
124 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
125 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
126 | | --exec=* | --exe=* | --ex=*) | |
127 | exec_prefix="$ac_optarg" ;; | |
128 | ||
129 | -gas | --gas | --ga | --g) | |
130 | # Obsolete; use --with-gas. | |
131 | with_gas=yes ;; | |
132 | ||
133 | -help | --help | --hel | --he) | |
134 | # Omit some internal or obsolete options to make the list less imposing. | |
135 | # This message is too long to be a string in the A/UX 3.1 sh. | |
136 | cat << EOF | |
137 | Usage: configure [options] [host] | |
138 | Options: [defaults in brackets after descriptions] | |
139 | Configuration: | |
140 | --cache-file=FILE cache test results in FILE | |
141 | --help print this message | |
142 | --no-create do not create output files | |
143 | --quiet, --silent do not print \`checking...' messages | |
144 | --version print the version of autoconf that created configure | |
145 | Directory and file names: | |
146 | --prefix=PREFIX install architecture-independent files in PREFIX | |
147 | [$ac_default_prefix] | |
148 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
149 | [same as prefix] | |
150 | --bindir=DIR user executables in DIR [EPREFIX/bin] | |
151 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
152 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
153 | --datadir=DIR read-only architecture-independent data in DIR | |
154 | [PREFIX/share] | |
155 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
156 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
157 | [PREFIX/com] | |
158 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
159 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
160 | --includedir=DIR C header files in DIR [PREFIX/include] | |
161 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
162 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
163 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
164 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
165 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
166 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
167 | --program-transform-name=PROGRAM | |
168 | run sed PROGRAM on installed program names | |
169 | EOF | |
170 | cat << EOF | |
171 | Host type: | |
172 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
173 | --host=HOST configure for HOST [guessed] | |
174 | --target=TARGET configure for TARGET [TARGET=HOST] | |
175 | Features and packages: | |
176 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
177 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
178 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
179 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
180 | --x-includes=DIR X include files are in DIR | |
181 | --x-libraries=DIR X library files are in DIR | |
182 | EOF | |
183 | if test -n "$ac_help"; then | |
184 | echo "--enable and --with options recognized:$ac_help" | |
185 | fi | |
186 | exit 0 ;; | |
187 | ||
188 | -host | --host | --hos | --ho) | |
189 | ac_prev=host ;; | |
190 | -host=* | --host=* | --hos=* | --ho=*) | |
191 | host="$ac_optarg" ;; | |
192 | ||
193 | -includedir | --includedir | --includedi | --included | --include \ | |
194 | | --includ | --inclu | --incl | --inc) | |
195 | ac_prev=includedir ;; | |
196 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
197 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
198 | includedir="$ac_optarg" ;; | |
199 | ||
200 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
201 | ac_prev=infodir ;; | |
202 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
203 | infodir="$ac_optarg" ;; | |
204 | ||
205 | -libdir | --libdir | --libdi | --libd) | |
206 | ac_prev=libdir ;; | |
207 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
208 | libdir="$ac_optarg" ;; | |
209 | ||
210 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
211 | | --libexe | --libex | --libe) | |
212 | ac_prev=libexecdir ;; | |
213 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
214 | | --libexe=* | --libex=* | --libe=*) | |
215 | libexecdir="$ac_optarg" ;; | |
216 | ||
217 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
218 | | --localstate | --localstat | --localsta | --localst \ | |
219 | | --locals | --local | --loca | --loc | --lo) | |
220 | ac_prev=localstatedir ;; | |
221 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
222 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
223 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
224 | localstatedir="$ac_optarg" ;; | |
225 | ||
226 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
227 | ac_prev=mandir ;; | |
228 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
229 | mandir="$ac_optarg" ;; | |
230 | ||
231 | -nfp | --nfp | --nf) | |
232 | # Obsolete; use --without-fp. | |
233 | with_fp=no ;; | |
234 | ||
235 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
236 | | --no-cr | --no-c) | |
237 | no_create=yes ;; | |
238 | ||
239 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
240 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
241 | no_recursion=yes ;; | |
242 | ||
243 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
244 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
245 | | --oldin | --oldi | --old | --ol | --o) | |
246 | ac_prev=oldincludedir ;; | |
247 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
248 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
249 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
250 | oldincludedir="$ac_optarg" ;; | |
251 | ||
252 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
253 | ac_prev=prefix ;; | |
254 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
255 | prefix="$ac_optarg" ;; | |
256 | ||
257 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
258 | | --program-pre | --program-pr | --program-p) | |
259 | ac_prev=program_prefix ;; | |
260 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
261 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
262 | program_prefix="$ac_optarg" ;; | |
263 | ||
264 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
265 | | --program-suf | --program-su | --program-s) | |
266 | ac_prev=program_suffix ;; | |
267 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
268 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
269 | program_suffix="$ac_optarg" ;; | |
270 | ||
271 | -program-transform-name | --program-transform-name \ | |
272 | | --program-transform-nam | --program-transform-na \ | |
273 | | --program-transform-n | --program-transform- \ | |
274 | | --program-transform | --program-transfor \ | |
275 | | --program-transfo | --program-transf \ | |
276 | | --program-trans | --program-tran \ | |
277 | | --progr-tra | --program-tr | --program-t) | |
278 | ac_prev=program_transform_name ;; | |
279 | -program-transform-name=* | --program-transform-name=* \ | |
280 | | --program-transform-nam=* | --program-transform-na=* \ | |
281 | | --program-transform-n=* | --program-transform-=* \ | |
282 | | --program-transform=* | --program-transfor=* \ | |
283 | | --program-transfo=* | --program-transf=* \ | |
284 | | --program-trans=* | --program-tran=* \ | |
285 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
286 | program_transform_name="$ac_optarg" ;; | |
287 | ||
288 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
289 | | -silent | --silent | --silen | --sile | --sil) | |
290 | silent=yes ;; | |
291 | ||
292 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
293 | ac_prev=sbindir ;; | |
294 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
295 | | --sbi=* | --sb=*) | |
296 | sbindir="$ac_optarg" ;; | |
297 | ||
298 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
299 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
300 | | --sharedst | --shareds | --shared | --share | --shar \ | |
301 | | --sha | --sh) | |
302 | ac_prev=sharedstatedir ;; | |
303 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
304 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
305 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
306 | | --sha=* | --sh=*) | |
307 | sharedstatedir="$ac_optarg" ;; | |
308 | ||
309 | -site | --site | --sit) | |
310 | ac_prev=site ;; | |
311 | -site=* | --site=* | --sit=*) | |
312 | site="$ac_optarg" ;; | |
313 | ||
314 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
315 | ac_prev=srcdir ;; | |
316 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
317 | srcdir="$ac_optarg" ;; | |
318 | ||
319 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
320 | | --syscon | --sysco | --sysc | --sys | --sy) | |
321 | ac_prev=sysconfdir ;; | |
322 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
323 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
324 | sysconfdir="$ac_optarg" ;; | |
325 | ||
326 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
327 | ac_prev=target ;; | |
328 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
329 | target="$ac_optarg" ;; | |
330 | ||
331 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
332 | verbose=yes ;; | |
333 | ||
334 | -version | --version | --versio | --versi | --vers) | |
2e18892a | 335 | echo "configure generated by autoconf version 2.10" |
0f2d19dd JB |
336 | exit 0 ;; |
337 | ||
338 | -with-* | --with-*) | |
339 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
340 | # Reject names that are not valid shell variable names. | |
341 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
342 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
343 | fi | |
344 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
345 | case "$ac_option" in | |
346 | *=*) ;; | |
347 | *) ac_optarg=yes ;; | |
348 | esac | |
349 | eval "with_${ac_package}='$ac_optarg'" ;; | |
350 | ||
351 | -without-* | --without-*) | |
352 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
353 | # Reject names that are not valid shell variable names. | |
354 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
355 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
356 | fi | |
357 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
358 | eval "with_${ac_package}=no" ;; | |
359 | ||
360 | --x) | |
361 | # Obsolete; use --with-x. | |
362 | with_x=yes ;; | |
363 | ||
364 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
365 | | --x-incl | --x-inc | --x-in | --x-i) | |
366 | ac_prev=x_includes ;; | |
367 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
368 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
369 | x_includes="$ac_optarg" ;; | |
370 | ||
371 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
372 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
373 | ac_prev=x_libraries ;; | |
374 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
375 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
376 | x_libraries="$ac_optarg" ;; | |
377 | ||
378 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
379 | ;; | |
380 | ||
381 | *) | |
382 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then | |
383 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
384 | fi | |
385 | if test "x$nonopt" != xNONE; then | |
386 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
387 | fi | |
388 | nonopt="$ac_option" | |
389 | ;; | |
390 | ||
391 | esac | |
392 | done | |
393 | ||
394 | if test -n "$ac_prev"; then | |
395 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
396 | fi | |
397 | ||
398 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
399 | ||
400 | # File descriptor usage: | |
401 | # 0 standard input | |
402 | # 1 file creation | |
403 | # 2 errors and warnings | |
404 | # 3 some systems may open it to /dev/tty | |
405 | # 4 used on the Kubota Titan | |
406 | # 6 checking for... messages and results | |
407 | # 5 compiler messages saved in config.log | |
408 | if test "$silent" = yes; then | |
409 | exec 6>/dev/null | |
410 | else | |
411 | exec 6>&1 | |
412 | fi | |
413 | exec 5>./config.log | |
414 | ||
415 | echo "\ | |
416 | This file contains any messages produced by compilers while | |
417 | running configure, to aid debugging if configure makes a mistake. | |
418 | " 1>&5 | |
419 | ||
420 | # Strip out --no-create and --no-recursion so they do not pile up. | |
421 | # Also quote any args containing shell metacharacters. | |
422 | ac_configure_args= | |
423 | for ac_arg | |
424 | do | |
425 | case "$ac_arg" in | |
426 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
427 | | --no-cr | --no-c) ;; | |
428 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
429 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
430 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
431 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
432 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
433 | esac | |
434 | done | |
435 | ||
436 | # NLS nuisances. | |
437 | # Only set LANG and LC_ALL to C if already set. | |
438 | # These must not be set unconditionally because not all systems understand | |
439 | # e.g. LANG=C (notably SCO). | |
440 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
441 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
442 | ||
443 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
444 | rm -rf conftest* confdefs.h | |
445 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
446 | echo > confdefs.h | |
447 | ||
448 | # A filename unique to this package, relative to the directory that | |
449 | # configure is in, which we can look for to find out if srcdir is correct. | |
450 | ac_unique_file=eval.c | |
451 | ||
452 | # Find the source files, if location was not specified. | |
453 | if test -z "$srcdir"; then | |
454 | ac_srcdir_defaulted=yes | |
455 | # Try the directory containing this script, then its parent. | |
456 | ac_prog=$0 | |
457 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
458 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
459 | srcdir=$ac_confdir | |
460 | if test ! -r $srcdir/$ac_unique_file; then | |
461 | srcdir=.. | |
462 | fi | |
463 | else | |
464 | ac_srcdir_defaulted=no | |
465 | fi | |
466 | if test ! -r $srcdir/$ac_unique_file; then | |
467 | if test "$ac_srcdir_defaulted" = yes; then | |
468 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
469 | else | |
470 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
471 | fi | |
472 | fi | |
473 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
474 | ||
475 | # Prefer explicitly selected file to automatically selected ones. | |
476 | if test -z "$CONFIG_SITE"; then | |
477 | if test "x$prefix" != xNONE; then | |
478 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
479 | else | |
480 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
481 | fi | |
482 | fi | |
483 | for ac_site_file in $CONFIG_SITE; do | |
484 | if test -r "$ac_site_file"; then | |
485 | echo "loading site script $ac_site_file" | |
486 | . "$ac_site_file" | |
487 | fi | |
488 | done | |
489 | ||
490 | if test -r "$cache_file"; then | |
491 | echo "loading cache $cache_file" | |
492 | . $cache_file | |
493 | else | |
494 | echo "creating cache $cache_file" | |
495 | > $cache_file | |
496 | fi | |
497 | ||
498 | ac_ext=c | |
499 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
500 | ac_cpp='$CPP $CPPFLAGS' | |
501 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
502 | ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
503 | ||
504 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
505 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
506 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
507 | ac_n= ac_c=' | |
508 | ' ac_t=' ' | |
509 | else | |
510 | ac_n=-n ac_c= ac_t= | |
511 | fi | |
512 | else | |
513 | ac_n= ac_c='\c' ac_t= | |
514 | fi | |
515 | ||
516 | ||
517 | ||
518 | ||
519 | . $srcdir/../GUILE-VERSION | |
520 | ||
074657b0 MD |
521 | #-------------------------------------------------------------------- |
522 | # | |
523 | # User options | |
524 | # | |
525 | #-------------------------------------------------------------------- | |
526 | ||
527 | # Check whether --enable-debug or --disable-debug was given. | |
528 | if test "${enable_debug+set}" = set; then | |
529 | enableval="$enable_debug" | |
530 | : | |
531 | fi | |
532 | ||
533 | if test "$enableval" != n && test "$enableval" != no; then | |
534 | cat >> confdefs.h <<\EOF | |
535 | #define DEBUG_EXTENSIONS 1 | |
536 | EOF | |
537 | ||
538 | cat >> confdefs.h <<\EOF | |
539 | #define READER_EXTENSIONS 1 | |
540 | EOF | |
541 | ||
542 | LIBOBJS="debug.o srcprop.o $LIBOBJS" | |
543 | fi | |
544 | ||
545 | #-------------------------------------------------------------------- | |
546 | ||
0f2d19dd JB |
547 | test -z "$CFLAGS" && CFLAGS=-g |
548 | test -z "$LDFLAGS" && LDFLAGS=-g | |
549 | ||
550 | # Extract the first word of "gcc", so it can be a program name with args. | |
551 | set dummy gcc; ac_word=$2 | |
552 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
553 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then | |
554 | echo $ac_n "(cached) $ac_c" 1>&6 | |
555 | else | |
556 | if test -n "$CC"; then | |
557 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
558 | else | |
559 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
560 | for ac_dir in $PATH; do | |
561 | test -z "$ac_dir" && ac_dir=. | |
562 | if test -f $ac_dir/$ac_word; then | |
563 | ac_cv_prog_CC="gcc" | |
564 | break | |
565 | fi | |
566 | done | |
567 | IFS="$ac_save_ifs" | |
568 | fi | |
569 | fi | |
570 | CC="$ac_cv_prog_CC" | |
571 | if test -n "$CC"; then | |
572 | echo "$ac_t""$CC" 1>&6 | |
573 | else | |
574 | echo "$ac_t""no" 1>&6 | |
575 | fi | |
576 | ||
577 | if test -z "$CC"; then | |
578 | # Extract the first word of "cc", so it can be a program name with args. | |
579 | set dummy cc; ac_word=$2 | |
580 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
581 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then | |
582 | echo $ac_n "(cached) $ac_c" 1>&6 | |
583 | else | |
584 | if test -n "$CC"; then | |
585 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
586 | else | |
587 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
588 | ac_prog_rejected=no | |
589 | for ac_dir in $PATH; do | |
590 | test -z "$ac_dir" && ac_dir=. | |
591 | if test -f $ac_dir/$ac_word; then | |
592 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
593 | ac_prog_rejected=yes | |
594 | continue | |
595 | fi | |
596 | ac_cv_prog_CC="cc" | |
597 | break | |
598 | fi | |
599 | done | |
600 | IFS="$ac_save_ifs" | |
601 | if test $ac_prog_rejected = yes; then | |
602 | # We found a bogon in the path, so make sure we never use it. | |
603 | set dummy $ac_cv_prog_CC | |
604 | shift | |
605 | if test $# -gt 0; then | |
606 | # We chose a different compiler from the bogus one. | |
607 | # However, it has the same basename, so the bogon will be chosen | |
608 | # first if we set CC to just the basename; use the full file name. | |
609 | shift | |
610 | set dummy "$ac_dir/$ac_word" "$@" | |
611 | shift | |
612 | ac_cv_prog_CC="$@" | |
613 | fi | |
614 | fi | |
615 | fi | |
616 | fi | |
617 | CC="$ac_cv_prog_CC" | |
618 | if test -n "$CC"; then | |
619 | echo "$ac_t""$CC" 1>&6 | |
620 | else | |
621 | echo "$ac_t""no" 1>&6 | |
622 | fi | |
623 | ||
624 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
625 | fi | |
626 | ||
627 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
628 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then | |
629 | echo $ac_n "(cached) $ac_c" 1>&6 | |
630 | else | |
631 | cat > conftest.c <<EOF | |
632 | #ifdef __GNUC__ | |
633 | yes; | |
634 | #endif | |
635 | EOF | |
074657b0 | 636 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
0f2d19dd JB |
637 | ac_cv_prog_gcc=yes |
638 | else | |
639 | ac_cv_prog_gcc=no | |
640 | fi | |
641 | fi | |
642 | ||
643 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
644 | if test $ac_cv_prog_gcc = yes; then | |
645 | GCC=yes | |
646 | if test "${CFLAGS+set}" != set; then | |
647 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
648 | if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then | |
649 | echo $ac_n "(cached) $ac_c" 1>&6 | |
650 | else | |
651 | echo 'void f(){}' > conftest.c | |
652 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
653 | ac_cv_prog_gcc_g=yes | |
654 | else | |
655 | ac_cv_prog_gcc_g=no | |
656 | fi | |
657 | rm -f conftest* | |
658 | ||
659 | fi | |
660 | ||
661 | echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6 | |
662 | if test $ac_cv_prog_gcc_g = yes; then | |
663 | CFLAGS="-g -O" | |
664 | else | |
665 | CFLAGS="-O" | |
666 | fi | |
667 | fi | |
668 | else | |
669 | GCC= | |
670 | test "${CFLAGS+set}" = set || CFLAGS="-g" | |
671 | fi | |
672 | ||
673 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 | |
674 | # On Suns, sometimes $CPP names a directory. | |
675 | if test -n "$CPP" && test -d "$CPP"; then | |
676 | CPP= | |
677 | fi | |
678 | if test -z "$CPP"; then | |
679 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
680 | echo $ac_n "(cached) $ac_c" 1>&6 | |
681 | else | |
682 | # This must be in double quotes, not single quotes, because CPP may get | |
683 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
684 | CPP="${CC-cc} -E" | |
685 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
686 | # not just through cpp. | |
687 | cat > conftest.$ac_ext <<EOF | |
074657b0 | 688 | #line 689 "configure" |
0f2d19dd JB |
689 | #include "confdefs.h" |
690 | #include <assert.h> | |
691 | Syntax Error | |
692 | EOF | |
693 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
074657b0 | 694 | { (eval echo configure:695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
0f2d19dd JB |
695 | ac_err=`grep -v '^ *+' conftest.out` |
696 | if test -z "$ac_err"; then | |
697 | : | |
698 | else | |
699 | echo "$ac_err" >&5 | |
700 | rm -rf conftest* | |
701 | CPP="${CC-cc} -E -traditional-cpp" | |
702 | cat > conftest.$ac_ext <<EOF | |
074657b0 | 703 | #line 704 "configure" |
0f2d19dd JB |
704 | #include "confdefs.h" |
705 | #include <assert.h> | |
706 | Syntax Error | |
707 | EOF | |
708 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
074657b0 | 709 | { (eval echo configure:710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
0f2d19dd JB |
710 | ac_err=`grep -v '^ *+' conftest.out` |
711 | if test -z "$ac_err"; then | |
712 | : | |
713 | else | |
714 | echo "$ac_err" >&5 | |
715 | rm -rf conftest* | |
716 | CPP=/lib/cpp | |
717 | fi | |
718 | rm -f conftest* | |
719 | fi | |
720 | rm -f conftest* | |
721 | ac_cv_prog_CPP="$CPP" | |
722 | fi | |
723 | CPP="$ac_cv_prog_CPP" | |
724 | else | |
725 | ac_cv_prog_CPP="$CPP" | |
726 | fi | |
727 | echo "$ac_t""$CPP" 1>&6 | |
728 | ||
729 | # Extract the first word of "ranlib", so it can be a program name with args. | |
730 | set dummy ranlib; ac_word=$2 | |
731 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
732 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then | |
733 | echo $ac_n "(cached) $ac_c" 1>&6 | |
734 | else | |
735 | if test -n "$RANLIB"; then | |
736 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
737 | else | |
738 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
739 | for ac_dir in $PATH; do | |
740 | test -z "$ac_dir" && ac_dir=. | |
741 | if test -f $ac_dir/$ac_word; then | |
742 | ac_cv_prog_RANLIB="ranlib" | |
743 | break | |
744 | fi | |
745 | done | |
746 | IFS="$ac_save_ifs" | |
747 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
748 | fi | |
749 | fi | |
750 | RANLIB="$ac_cv_prog_RANLIB" | |
751 | if test -n "$RANLIB"; then | |
752 | echo "$ac_t""$RANLIB" 1>&6 | |
753 | else | |
754 | echo "$ac_t""no" 1>&6 | |
755 | fi | |
756 | ||
757 | ||
758 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 | |
759 | cat > conftest.$ac_ext <<EOF | |
074657b0 | 760 | #line 761 "configure" |
0f2d19dd JB |
761 | #include "confdefs.h" |
762 | #ifdef _AIX | |
763 | yes | |
764 | #endif | |
765 | ||
766 | EOF | |
767 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
768 | egrep "yes" >/dev/null 2>&1; then | |
769 | rm -rf conftest* | |
770 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF | |
771 | #define _ALL_SOURCE 1 | |
772 | EOF | |
773 | ||
774 | else | |
775 | rm -rf conftest* | |
776 | echo "$ac_t""no" 1>&6 | |
777 | fi | |
778 | rm -f conftest* | |
779 | ||
780 | ||
781 | echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 | |
782 | if test -d /etc/conf/kconfig.d && | |
783 | grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 | |
784 | then | |
785 | echo "$ac_t""yes" 1>&6 | |
786 | ISC=yes # If later tests want to check for ISC. | |
787 | cat >> confdefs.h <<\EOF | |
788 | #define _POSIX_SOURCE 1 | |
789 | EOF | |
790 | ||
791 | if test "$GCC" = yes; then | |
792 | CC="$CC -posix" | |
793 | else | |
794 | CC="$CC -Xp" | |
795 | fi | |
796 | else | |
797 | echo "$ac_t""no" 1>&6 | |
798 | ISC= | |
799 | fi | |
800 | ||
801 | ac_safe=`echo "minix/config.h" | tr './\055' '___'` | |
802 | echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 | |
803 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
804 | echo $ac_n "(cached) $ac_c" 1>&6 | |
805 | else | |
806 | cat > conftest.$ac_ext <<EOF | |
074657b0 | 807 | #line 808 "configure" |
0f2d19dd JB |
808 | #include "confdefs.h" |
809 | #include <minix/config.h> | |
810 | EOF | |
811 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
074657b0 | 812 | { (eval echo configure:813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
0f2d19dd JB |
813 | ac_err=`grep -v '^ *+' conftest.out` |
814 | if test -z "$ac_err"; then | |
815 | rm -rf conftest* | |
816 | eval "ac_cv_header_$ac_safe=yes" | |
817 | else | |
818 | echo "$ac_err" >&5 | |
819 | rm -rf conftest* | |
820 | eval "ac_cv_header_$ac_safe=no" | |
821 | fi | |
822 | rm -f conftest* | |
823 | fi | |
824 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
825 | echo "$ac_t""yes" 1>&6 | |
826 | MINIX=yes | |
827 | else | |
828 | echo "$ac_t""no" 1>&6 | |
829 | MINIX= | |
830 | fi | |
831 | ||
832 | if test "$MINIX" = yes; then | |
833 | cat >> confdefs.h <<\EOF | |
834 | #define _POSIX_SOURCE 1 | |
835 | EOF | |
836 | ||
837 | cat >> confdefs.h <<\EOF | |
838 | #define _POSIX_1_SOURCE 2 | |
839 | EOF | |
840 | ||
841 | cat >> confdefs.h <<\EOF | |
842 | #define _MINIX 1 | |
843 | EOF | |
844 | ||
845 | fi | |
846 | ||
847 | ||
848 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
849 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then | |
850 | echo $ac_n "(cached) $ac_c" 1>&6 | |
851 | else | |
852 | cat > conftest.$ac_ext <<EOF | |
074657b0 | 853 | #line 854 "configure" |
0f2d19dd JB |
854 | #include "confdefs.h" |
855 | ||
856 | int main() { return 0; } | |
857 | int t() { | |
858 | ||
859 | /* Ultrix mips cc rejects this. */ | |
860 | typedef int charset[2]; const charset x; | |
861 | /* SunOS 4.1.1 cc rejects this. */ | |
862 | char const *const *ccp; | |
863 | char **p; | |
864 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
865 | struct point {int x, y;}; | |
866 | static struct point const zero = {0,0}; | |
867 | /* AIX XL C 1.02.0.0 rejects this. | |
868 | It does not let you subtract one const X* pointer from another in an arm | |
869 | of an if-expression whose if-part is not a constant expression */ | |
870 | const char *g = "string"; | |
871 | ccp = &g + (g ? g-g : 0); | |
872 | /* HPUX 7.0 cc rejects these. */ | |
873 | ++ccp; | |
874 | p = (char**) ccp; | |
875 | ccp = (char const *const *) p; | |
876 | { /* SCO 3.2v4 cc rejects this. */ | |
877 | char *t; | |
878 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
879 | ||
880 | *t++ = 0; | |
881 | } | |
882 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
883 | int x[] = {25, 17}; | |
884 | const int *foo = &x[0]; | |
885 | ++foo; | |
886 | } | |
887 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
888 | typedef const int *iptr; | |
889 | iptr p = 0; | |
890 | ++p; | |
891 | } | |
892 | { /* AIX XL C 1.02.0.0 rejects this saying | |
893 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
894 | struct s { int j; const int *ap[3]; }; | |
895 | struct s *b; b->j = 5; | |
896 | } | |
897 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
898 | const int foo = 10; | |
899 | } | |
900 | ||
901 | ; return 0; } | |
902 | EOF | |
074657b0 | 903 | if { (eval echo configure:904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
0f2d19dd JB |
904 | rm -rf conftest* |
905 | ac_cv_c_const=yes | |
906 | else | |
907 | rm -rf conftest* | |
908 | ac_cv_c_const=no | |
909 | fi | |
910 | rm -f conftest* | |
911 | ||
912 | fi | |
913 | ||
914 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
915 | if test $ac_cv_c_const = no; then | |
916 | cat >> confdefs.h <<\EOF | |
917 | #define const | |
918 | EOF | |
919 | ||
920 | fi | |
921 | ||
922 | ||
923 | # If we cannot run a trivial program, we must be cross compiling. | |
924 | echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6 | |
925 | if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then | |
926 | echo $ac_n "(cached) $ac_c" 1>&6 | |
927 | else | |
928 | if test "$cross_compiling" = yes; then | |
929 | ac_cv_c_cross=yes | |
930 | else | |
931 | cat > conftest.$ac_ext <<EOF | |
074657b0 | 932 | #line 933 "configure" |
0f2d19dd JB |
933 | #include "confdefs.h" |
934 | main(){return(0);} | |
935 | EOF | |
074657b0 | 936 | { (eval echo configure:937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } |
0f2d19dd JB |
937 | if test -s conftest && (./conftest; exit) 2>/dev/null; then |
938 | ac_cv_c_cross=no | |
939 | else | |
940 | ac_cv_c_cross=yes | |
941 | fi | |
942 | fi | |
943 | rm -fr conftest* | |
944 | fi | |
945 | ||
946 | echo "$ac_t""$ac_cv_c_cross" 1>&6 | |
947 | cross_compiling=$ac_cv_c_cross | |
948 | ||
949 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
950 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then | |
951 | echo $ac_n "(cached) $ac_c" 1>&6 | |
952 | else | |
953 | cat > conftest.$ac_ext <<EOF | |
074657b0 | 954 | #line 955 "configure" |
0f2d19dd JB |
955 | #include "confdefs.h" |
956 | #include <stdlib.h> | |
957 | #include <stdarg.h> | |
958 | #include <string.h> | |
959 | #include <float.h> | |
960 | EOF | |
961 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
074657b0 | 962 | { (eval echo configure:963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
0f2d19dd JB |
963 | ac_err=`grep -v '^ *+' conftest.out` |
964 | if test -z "$ac_err"; then | |
965 | rm -rf conftest* | |
966 | ac_cv_header_stdc=yes | |
967 | else | |
968 | echo "$ac_err" >&5 | |
969 | rm -rf conftest* | |
970 | ac_cv_header_stdc=no | |
971 | fi | |
972 | rm -f conftest* | |
973 | ||
974 | if test $ac_cv_header_stdc = yes; then | |
975 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
976 | cat > conftest.$ac_ext <<EOF | |
074657b0 | 977 | #line 978 "configure" |
0f2d19dd JB |
978 | #include "confdefs.h" |
979 | #include <string.h> | |
980 | EOF | |
981 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
982 | egrep "memchr" >/dev/null 2>&1; then | |
983 | : | |
984 | else | |
985 | rm -rf conftest* | |
986 | ac_cv_header_stdc=no | |
987 | fi | |
988 | rm -f conftest* | |
989 | ||
990 | fi | |
991 | ||
992 | if test $ac_cv_header_stdc = yes; then | |
993 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
994 | cat > conftest.$ac_ext <<EOF | |
074657b0 | 995 | #line 996 "configure" |
0f2d19dd JB |
996 | #include "confdefs.h" |
997 | #include <stdlib.h> | |
998 | EOF | |
999 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1000 | egrep "free" >/dev/null 2>&1; then | |
1001 | : | |
1002 | else | |
1003 | rm -rf conftest* | |
1004 | ac_cv_header_stdc=no | |
1005 | fi | |
1006 | rm -f conftest* | |
1007 | ||
1008 | fi | |
1009 | ||
1010 | if test $ac_cv_header_stdc = yes; then | |
1011 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
1012 | if test "$cross_compiling" = yes; then | |
1013 | : | |
1014 | else | |
1015 | cat > conftest.$ac_ext <<EOF | |
074657b0 | 1016 | #line 1017 "configure" |
0f2d19dd JB |
1017 | #include "confdefs.h" |
1018 | #include <ctype.h> | |
1019 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
1020 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
1021 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
1022 | int main () { int i; for (i = 0; i < 256; i++) | |
1023 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
1024 | exit (0); } | |
1025 | ||
1026 | EOF | |
074657b0 | 1027 | { (eval echo configure:1028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } |
0f2d19dd JB |
1028 | if test -s conftest && (./conftest; exit) 2>/dev/null; then |
1029 | : | |
1030 | else | |
1031 | ac_cv_header_stdc=no | |
1032 | fi | |
1033 | fi | |
1034 | rm -fr conftest* | |
1035 | fi | |
1036 | fi | |
1037 | ||
1038 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
1039 | if test $ac_cv_header_stdc = yes; then | |
1040 | cat >> confdefs.h <<\EOF | |
1041 | #define STDC_HEADERS 1 | |
1042 | EOF | |
1043 | ||
1044 | fi | |
1045 | ||
1046 | ac_header_dirent=no | |
1047 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h | |
1048 | do | |
1049 | ac_safe=`echo "$ac_hdr" | tr './\055' '___'` | |
1050 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 | |
1051 | if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then | |
1052 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1053 | else | |
1054 | cat > conftest.$ac_ext <<EOF | |
074657b0 | 1055 | #line 1056 "configure" |
0f2d19dd JB |
1056 | #include "confdefs.h" |
1057 | #include <sys/types.h> | |
1058 | #include <$ac_hdr> | |
1059 | int main() { return 0; } | |
1060 | int t() { | |
1061 | DIR *dirp = 0; | |
1062 | ; return 0; } | |
1063 | EOF | |
074657b0 | 1064 | if { (eval echo configure:1065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
0f2d19dd JB |
1065 | rm -rf conftest* |
1066 | eval "ac_cv_header_dirent_$ac_safe=yes" | |
1067 | else | |
1068 | rm -rf conftest* | |
1069 | eval "ac_cv_header_dirent_$ac_safe=no" | |
1070 | fi | |
1071 | rm -f conftest* | |
1072 | ||
1073 | fi | |
1074 | if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then | |
1075 | echo "$ac_t""yes" 1>&6 | |
1076 | ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'` | |
1077 | cat >> confdefs.h <<EOF | |
1078 | #define $ac_tr_hdr 1 | |
1079 | EOF | |
1080 | ac_header_dirent=$ac_hdr; break | |
1081 | else | |
1082 | echo "$ac_t""no" 1>&6 | |
1083 | fi | |
1084 | done | |
1085 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. | |
1086 | if test $ac_header_dirent = dirent.h; then | |
1087 | echo $ac_n "checking for -ldir""... $ac_c" 1>&6 | |
2e18892a | 1088 | ac_lib_var=`echo dir'_'opendir | tr './+\055' '__p_'` |
0f2d19dd JB |
1089 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
1090 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1091 | else | |
1092 | ac_save_LIBS="$LIBS" | |
1093 | LIBS="-ldir $LIBS" | |
1094 | cat > conftest.$ac_ext <<EOF | |
074657b0 | 1095 | #line 1096 "configure" |
0f2d19dd JB |
1096 | #include "confdefs.h" |
1097 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2e18892a GH |
1098 | /* We use char because int might match the return type of a gcc2 |
1099 | builtin and then its argument prototype would still apply. */ | |
0f2d19dd JB |
1100 | char opendir(); |
1101 | ||
1102 | int main() { return 0; } | |
1103 | int t() { | |
1104 | opendir() | |
1105 | ; return 0; } | |
1106 | EOF | |
074657b0 | 1107 | if { (eval echo configure:1108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
0f2d19dd JB |
1108 | rm -rf conftest* |
1109 | eval "ac_cv_lib_$ac_lib_var=yes" | |
1110 | else | |
1111 | rm -rf conftest* | |
1112 | eval "ac_cv_lib_$ac_lib_var=no" | |
1113 | fi | |
1114 | rm -f conftest* | |
1115 | LIBS="$ac_save_LIBS" | |
1116 | ||
1117 | fi | |
1118 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
1119 | echo "$ac_t""yes" 1>&6 | |
1120 | LIBS="$LIBS -ldir" | |
1121 | else | |
1122 | echo "$ac_t""no" 1>&6 | |
1123 | fi | |
1124 | ||
1125 | else | |
1126 | echo $ac_n "checking for -lx""... $ac_c" 1>&6 | |
2e18892a | 1127 | ac_lib_var=`echo x'_'opendir | tr './+\055' '__p_'` |
0f2d19dd JB |
1128 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
1129 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1130 | else | |
1131 | ac_save_LIBS="$LIBS" | |
1132 | LIBS="-lx $LIBS" | |
1133 | cat > conftest.$ac_ext <<EOF | |
074657b0 | 1134 | #line 1135 "configure" |
0f2d19dd JB |
1135 | #include "confdefs.h" |
1136 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2e18892a GH |
1137 | /* We use char because int might match the return type of a gcc2 |
1138 | builtin and then its argument prototype would still apply. */ | |
0f2d19dd JB |
1139 | char opendir(); |
1140 | ||
1141 | int main() { return 0; } | |
1142 | int t() { | |
1143 | opendir() | |
1144 | ; return 0; } | |
1145 | EOF | |
074657b0 | 1146 | if { (eval echo configure:1147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
0f2d19dd JB |
1147 | rm -rf conftest* |
1148 | eval "ac_cv_lib_$ac_lib_var=yes" | |
1149 | else | |
1150 | rm -rf conftest* | |
1151 | eval "ac_cv_lib_$ac_lib_var=no" | |
1152 | fi | |
1153 | rm -f conftest* | |
1154 | LIBS="$ac_save_LIBS" | |
1155 | ||
1156 | fi | |
1157 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
1158 | echo "$ac_t""yes" 1>&6 | |
1159 | LIBS="$LIBS -lx" | |
1160 | else | |
1161 | echo "$ac_t""no" 1>&6 | |
1162 | fi | |
1163 | ||
1164 | fi | |
1165 | ||
1166 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 | |
1167 | if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then | |
1168 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1169 | else | |
1170 | cat > conftest.$ac_ext <<EOF | |
074657b0 | 1171 | #line 1172 "configure" |
0f2d19dd JB |
1172 | #include "confdefs.h" |
1173 | #include <sys/types.h> | |
1174 | #include <sys/time.h> | |
1175 | #include <time.h> | |
1176 | int main() { return 0; } | |
1177 | int t() { | |
1178 | struct tm *tp; | |
1179 | ; return 0; } | |
1180 | EOF | |
074657b0 | 1181 | if { (eval echo configure:1182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
0f2d19dd JB |
1182 | rm -rf conftest* |
1183 | ac_cv_header_time=yes | |
1184 | else | |
1185 | rm -rf conftest* | |
1186 | ac_cv_header_time=no | |
1187 | fi | |
1188 | rm -f conftest* | |
1189 | ||
1190 | fi | |
1191 | ||
1192 | echo "$ac_t""$ac_cv_header_time" 1>&6 | |
1193 | if test $ac_cv_header_time = yes; then | |
1194 | cat >> confdefs.h <<\EOF | |
1195 | #define TIME_WITH_SYS_TIME 1 | |
1196 | EOF | |
1197 | ||
1198 | fi | |
1199 | ||
1200 | echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 | |
1201 | if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then | |
1202 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1203 | else | |
1204 | cat > conftest.$ac_ext <<EOF | |
074657b0 | 1205 | #line 1206 "configure" |
0f2d19dd JB |
1206 | #include "confdefs.h" |
1207 | #include <sys/types.h> | |
1208 | #include <sys/wait.h> | |
1209 | #ifndef WEXITSTATUS | |
1210 | #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) | |
1211 | #endif | |
1212 | #ifndef WIFEXITED | |
1213 | #define WIFEXITED(stat_val) (((stat_val) & 255) == 0) | |
1214 | #endif | |
1215 | int main() { return 0; } | |
1216 | int t() { | |
1217 | int s; | |
1218 | wait (&s); | |
1219 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
1220 | ; return 0; } | |
1221 | EOF | |
074657b0 | 1222 | if { (eval echo configure:1223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
0f2d19dd JB |
1223 | rm -rf conftest* |
1224 | ac_cv_header_sys_wait_h=yes | |
1225 | else | |
1226 | rm -rf conftest* | |
1227 | ac_cv_header_sys_wait_h=no | |
1228 | fi | |
1229 | rm -f conftest* | |
1230 | ||
1231 | fi | |
1232 | ||
1233 | echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 | |
1234 | if test $ac_cv_header_sys_wait_h = yes; then | |
1235 | cat >> confdefs.h <<\EOF | |
1236 | #define HAVE_SYS_WAIT_H 1 | |
1237 | EOF | |
1238 | ||
1239 | fi | |
1240 | ||
95b88819 | 1241 | for ac_hdr in libc.h limits.h malloc.h memory.h string.h sys/ioctl.h sys/select.h sys/time.h sys/timeb.h sys/times.h sys/types.h time.h unistd.h |
0f2d19dd JB |
1242 | do |
1243 | ac_safe=`echo "$ac_hdr" | tr './\055' '___'` | |
1244 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
1245 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
1246 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1247 | else | |
1248 | cat > conftest.$ac_ext <<EOF | |
074657b0 | 1249 | #line 1250 "configure" |
0f2d19dd JB |
1250 | #include "confdefs.h" |
1251 | #include <$ac_hdr> | |
1252 | EOF | |
1253 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
074657b0 | 1254 | { (eval echo configure:1255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
0f2d19dd JB |
1255 | ac_err=`grep -v '^ *+' conftest.out` |
1256 | if test -z "$ac_err"; then | |
1257 | rm -rf conftest* | |
1258 | eval "ac_cv_header_$ac_safe=yes" | |
1259 | else | |
1260 | echo "$ac_err" >&5 | |
1261 | rm -rf conftest* | |
1262 | eval "ac_cv_header_$ac_safe=no" | |
1263 | fi | |
1264 | rm -f conftest* | |
1265 | fi | |
1266 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1267 | echo "$ac_t""yes" 1>&6 | |
1268 | ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` | |
1269 | cat >> confdefs.h <<EOF | |
1270 | #define $ac_tr_hdr 1 | |
1271 | EOF | |
1272 | ||
1273 | else | |
1274 | echo "$ac_t""no" 1>&6 | |
1275 | fi | |
1276 | done | |
1277 | ||
1278 | ||
1279 | echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 | |
1280 | if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then | |
1281 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1282 | else | |
1283 | cat > conftest.$ac_ext <<EOF | |
074657b0 | 1284 | #line 1285 "configure" |
0f2d19dd JB |
1285 | #include "confdefs.h" |
1286 | #include <sys/types.h> | |
1287 | EOF | |
1288 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1289 | egrep "uid_t" >/dev/null 2>&1; then | |
1290 | rm -rf conftest* | |
1291 | ac_cv_type_uid_t=yes | |
1292 | else | |
1293 | rm -rf conftest* | |
1294 | ac_cv_type_uid_t=no | |
1295 | fi | |
1296 | rm -f conftest* | |
1297 | ||
1298 | fi | |
1299 | ||
1300 | echo "$ac_t""$ac_cv_type_uid_t" 1>&6 | |
1301 | if test $ac_cv_type_uid_t = no; then | |
1302 | cat >> confdefs.h <<\EOF | |
1303 | #define uid_t int | |
1304 | EOF | |
1305 | ||
1306 | cat >> confdefs.h <<\EOF | |
1307 | #define gid_t int | |
1308 | EOF | |
1309 | ||
1310 | fi | |
1311 | ||
1312 | echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 | |
1313 | if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then | |
1314 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1315 | else | |
1316 | if test "$cross_compiling" = yes; then | |
1317 | ac_cv_type_getgroups=cross | |
1318 | else | |
1319 | cat > conftest.$ac_ext <<EOF | |
074657b0 | 1320 | #line 1321 "configure" |
0f2d19dd JB |
1321 | #include "confdefs.h" |
1322 | ||
1323 | /* Thanks to Mike Rendell for this test. */ | |
1324 | #include <sys/types.h> | |
1325 | #define NGID 256 | |
1326 | #undef MAX | |
1327 | #define MAX(x, y) ((x) > (y) ? (x) : (y)) | |
1328 | main() | |
1329 | { | |
1330 | gid_t gidset[NGID]; | |
1331 | int i, n; | |
1332 | union { gid_t gval; long lval; } val; | |
1333 | ||
1334 | val.lval = -1; | |
1335 | for (i = 0; i < NGID; i++) | |
1336 | gidset[i] = val.gval; | |
1337 | n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, | |
1338 | gidset); | |
1339 | /* Exit non-zero if getgroups seems to require an array of ints. This | |
1340 | happens when gid_t is short but getgroups modifies an array of ints. */ | |
1341 | exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); | |
1342 | } | |
1343 | ||
1344 | EOF | |
074657b0 | 1345 | { (eval echo configure:1346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } |
0f2d19dd JB |
1346 | if test -s conftest && (./conftest; exit) 2>/dev/null; then |
1347 | ac_cv_type_getgroups=gid_t | |
1348 | else | |
1349 | ac_cv_type_getgroups=int | |
1350 | fi | |
1351 | fi | |
1352 | rm -fr conftest* | |
1353 | if test $ac_cv_type_getgroups = cross; then | |
1354 | cat > conftest.$ac_ext <<EOF | |
074657b0 | 1355 | #line 1356 "configure" |
0f2d19dd JB |
1356 | #include "confdefs.h" |
1357 | #include <unistd.h> | |
1358 | EOF | |
1359 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1360 | egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then | |
1361 | rm -rf conftest* | |
1362 | ac_cv_type_getgroups=gid_t | |
1363 | else | |
1364 | rm -rf conftest* | |
1365 | ac_cv_type_getgroups=int | |
1366 | fi | |
1367 | rm -f conftest* | |
1368 | ||
1369 | fi | |
1370 | fi | |
1371 | ||
1372 | echo "$ac_t""$ac_cv_type_getgroups" 1>&6 | |
1373 | cat >> confdefs.h <<EOF | |
1374 | #define GETGROUPS_T $ac_cv_type_getgroups | |
1375 | EOF | |
1376 | ||
1377 | ||
1378 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 | |
1379 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then | |
1380 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1381 | else | |
1382 | cat > conftest.$ac_ext <<EOF | |
074657b0 | 1383 | #line 1384 "configure" |
0f2d19dd JB |
1384 | #include "confdefs.h" |
1385 | #include <sys/types.h> | |
1386 | #include <signal.h> | |
1387 | #ifdef signal | |
1388 | #undef signal | |
1389 | #endif | |
1390 | #ifdef __cplusplus | |
1391 | extern "C" void (*signal (int, void (*)(int)))(int); | |
1392 | #else | |
1393 | void (*signal ()) (); | |
1394 | #endif | |
1395 | ||
1396 | int main() { return 0; } | |
1397 | int t() { | |
1398 | int i; | |
1399 | ; return 0; } | |
1400 | EOF | |
074657b0 | 1401 | if { (eval echo configure:1402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
0f2d19dd JB |
1402 | rm -rf conftest* |
1403 | ac_cv_type_signal=void | |
1404 | else | |
1405 | rm -rf conftest* | |
1406 | ac_cv_type_signal=int | |
1407 | fi | |
1408 | rm -f conftest* | |
1409 | ||
1410 | fi | |
1411 | ||
1412 | echo "$ac_t""$ac_cv_type_signal" 1>&6 | |
1413 | cat >> confdefs.h <<EOF | |
1414 | #define RETSIGTYPE $ac_cv_type_signal | |
1415 | EOF | |
1416 | ||
1417 | ||
b09ca643 JB |
1418 | echo $ac_n "checking for mode_t""... $ac_c" 1>&6 |
1419 | if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then | |
1420 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1421 | else | |
1422 | cat > conftest.$ac_ext <<EOF | |
074657b0 | 1423 | #line 1424 "configure" |
b09ca643 JB |
1424 | #include "confdefs.h" |
1425 | #include <sys/types.h> | |
1426 | #if STDC_HEADERS | |
1427 | #include <stdlib.h> | |
1428 | #endif | |
1429 | EOF | |
1430 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1431 | egrep "mode_t" >/dev/null 2>&1; then | |
1432 | rm -rf conftest* | |
1433 | ac_cv_type_mode_t=yes | |
1434 | else | |
1435 | rm -rf conftest* | |
1436 | ac_cv_type_mode_t=no | |
1437 | fi | |
1438 | rm -f conftest* | |
1439 | ||
1440 | fi | |
1441 | echo "$ac_t""$ac_cv_type_mode_t" 1>&6 | |
1442 | if test $ac_cv_type_mode_t = no; then | |
1443 | cat >> confdefs.h <<\EOF | |
1444 | #define mode_t int | |
1445 | EOF | |
1446 | ||
1447 | fi | |
1448 | ||
0f2d19dd | 1449 | |
1fd838af | 1450 | for ac_func in ctermid ftime getcwd geteuid lstat mkdir mknod nice putenv readlink rename rmdir select setegid seteuid setlocale setpgid setsid strftime strptime symlink sync tcgetpgrp tcsetpgrp times uname waitpid |
0f2d19dd JB |
1451 | do |
1452 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
1453 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then | |
1454 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1455 | else | |
1456 | cat > conftest.$ac_ext <<EOF | |
074657b0 | 1457 | #line 1458 "configure" |
0f2d19dd JB |
1458 | #include "confdefs.h" |
1459 | /* System header to define __stub macros and hopefully few prototypes, | |
1460 | which can conflict with char $ac_func(); below. */ | |
1461 | #include <assert.h> | |
1462 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2e18892a GH |
1463 | /* We use char because int might match the return type of a gcc2 |
1464 | builtin and then its argument prototype would still apply. */ | |
0f2d19dd JB |
1465 | char $ac_func(); |
1466 | ||
1467 | int main() { return 0; } | |
1468 | int t() { | |
1469 | ||
1470 | /* The GNU C library defines this for functions which it implements | |
1471 | to always fail with ENOSYS. Some functions are actually named | |
1472 | something starting with __ and the normal name is an alias. */ | |
1473 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1474 | choke me | |
1475 | #else | |
1476 | $ac_func(); | |
1477 | #endif | |
1478 | ||
1479 | ; return 0; } | |
1480 | EOF | |
074657b0 | 1481 | if { (eval echo configure:1482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
0f2d19dd JB |
1482 | rm -rf conftest* |
1483 | eval "ac_cv_func_$ac_func=yes" | |
1484 | else | |
1485 | rm -rf conftest* | |
1486 | eval "ac_cv_func_$ac_func=no" | |
1487 | fi | |
1488 | rm -f conftest* | |
1489 | ||
1490 | fi | |
1491 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1492 | echo "$ac_t""yes" 1>&6 | |
1493 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
1494 | cat >> confdefs.h <<EOF | |
1495 | #define $ac_tr_func 1 | |
1496 | EOF | |
1497 | ||
1498 | else | |
1499 | echo "$ac_t""no" 1>&6 | |
1500 | fi | |
1501 | done | |
1502 | ||
1503 | ||
14a7e04c | 1504 | for ac_func in inet_aton strerror |
0f2d19dd JB |
1505 | do |
1506 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
1507 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then | |
1508 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1509 | else | |
1510 | cat > conftest.$ac_ext <<EOF | |
074657b0 | 1511 | #line 1512 "configure" |
0f2d19dd JB |
1512 | #include "confdefs.h" |
1513 | /* System header to define __stub macros and hopefully few prototypes, | |
1514 | which can conflict with char $ac_func(); below. */ | |
1515 | #include <assert.h> | |
1516 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2e18892a GH |
1517 | /* We use char because int might match the return type of a gcc2 |
1518 | builtin and then its argument prototype would still apply. */ | |
0f2d19dd JB |
1519 | char $ac_func(); |
1520 | ||
1521 | int main() { return 0; } | |
1522 | int t() { | |
1523 | ||
1524 | /* The GNU C library defines this for functions which it implements | |
1525 | to always fail with ENOSYS. Some functions are actually named | |
1526 | something starting with __ and the normal name is an alias. */ | |
1527 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1528 | choke me | |
1529 | #else | |
1530 | $ac_func(); | |
1531 | #endif | |
1532 | ||
1533 | ; return 0; } | |
1534 | EOF | |
074657b0 | 1535 | if { (eval echo configure:1536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
0f2d19dd JB |
1536 | rm -rf conftest* |
1537 | eval "ac_cv_func_$ac_func=yes" | |
1538 | else | |
1539 | rm -rf conftest* | |
1540 | eval "ac_cv_func_$ac_func=no" | |
1541 | fi | |
1542 | rm -f conftest* | |
1543 | ||
1544 | fi | |
1545 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
1546 | echo "$ac_t""yes" 1>&6 | |
1547 | : | |
1548 | else | |
1549 | echo "$ac_t""no" 1>&6 | |
1550 | LIBOBJS="$LIBOBJS ${ac_func}.o" | |
1551 | fi | |
1552 | ||
1553 | done | |
1554 | ||
1555 | ||
1556 | echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 | |
1557 | if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then | |
1558 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1559 | else | |
1560 | cat > conftest.$ac_ext <<EOF | |
074657b0 | 1561 | #line 1562 "configure" |
0f2d19dd JB |
1562 | #include "confdefs.h" |
1563 | #include <sys/types.h> | |
1564 | #include <sys/stat.h> | |
1565 | int main() { return 0; } | |
1566 | int t() { | |
1567 | struct stat s; s.st_rdev; | |
1568 | ; return 0; } | |
1569 | EOF | |
074657b0 | 1570 | if { (eval echo configure:1571: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
0f2d19dd JB |
1571 | rm -rf conftest* |
1572 | ac_cv_struct_st_rdev=yes | |
1573 | else | |
1574 | rm -rf conftest* | |
1575 | ac_cv_struct_st_rdev=no | |
1576 | fi | |
1577 | rm -f conftest* | |
1578 | ||
1579 | fi | |
1580 | ||
1581 | echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6 | |
1582 | if test $ac_cv_struct_st_rdev = yes; then | |
1583 | cat >> confdefs.h <<\EOF | |
1584 | #define HAVE_ST_RDEV 1 | |
1585 | EOF | |
1586 | ||
1587 | fi | |
1588 | ||
1589 | echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 | |
1590 | if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then | |
1591 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1592 | else | |
1593 | cat > conftest.$ac_ext <<EOF | |
074657b0 | 1594 | #line 1595 "configure" |
0f2d19dd JB |
1595 | #include "confdefs.h" |
1596 | #include <sys/types.h> | |
1597 | #include <sys/stat.h> | |
1598 | int main() { return 0; } | |
1599 | int t() { | |
1600 | struct stat s; s.st_blksize; | |
1601 | ; return 0; } | |
1602 | EOF | |
074657b0 | 1603 | if { (eval echo configure:1604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
0f2d19dd JB |
1604 | rm -rf conftest* |
1605 | ac_cv_struct_st_blksize=yes | |
1606 | else | |
1607 | rm -rf conftest* | |
1608 | ac_cv_struct_st_blksize=no | |
1609 | fi | |
1610 | rm -f conftest* | |
1611 | ||
1612 | fi | |
1613 | ||
1614 | echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6 | |
1615 | if test $ac_cv_struct_st_blksize = yes; then | |
1616 | cat >> confdefs.h <<\EOF | |
1617 | #define HAVE_ST_BLKSIZE 1 | |
1618 | EOF | |
1619 | ||
1620 | fi | |
1621 | ||
1622 | echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 | |
1623 | if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then | |
1624 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1625 | else | |
1626 | cat > conftest.$ac_ext <<EOF | |
074657b0 | 1627 | #line 1628 "configure" |
0f2d19dd JB |
1628 | #include "confdefs.h" |
1629 | #include <sys/types.h> | |
1630 | #include <sys/stat.h> | |
1631 | int main() { return 0; } | |
1632 | int t() { | |
1633 | struct stat s; s.st_blocks; | |
1634 | ; return 0; } | |
1635 | EOF | |
074657b0 | 1636 | if { (eval echo configure:1637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
0f2d19dd JB |
1637 | rm -rf conftest* |
1638 | ac_cv_struct_st_blocks=yes | |
1639 | else | |
1640 | rm -rf conftest* | |
1641 | ac_cv_struct_st_blocks=no | |
1642 | fi | |
1643 | rm -f conftest* | |
1644 | ||
1645 | fi | |
1646 | ||
1647 | echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6 | |
1648 | if test $ac_cv_struct_st_blocks = yes; then | |
1649 | cat >> confdefs.h <<\EOF | |
1650 | #define HAVE_ST_BLOCKS 1 | |
1651 | EOF | |
1652 | ||
1653 | else | |
1654 | LIBOBJS="$LIBOBJS fileblocks.o" | |
1655 | fi | |
1656 | ||
1657 | ||
1658 | #-------------------------------------------------------------------- | |
1659 | # | |
1660 | # Which way does the stack grow? | |
1661 | # | |
1662 | #-------------------------------------------------------------------- | |
1663 | ||
1664 | if test "$cross_compiling" = yes; then | |
1665 | echo "configure: warning: Guessing that stack grows down -- see scmconfig.h.in" 1>&2 | |
1666 | else | |
1667 | cat > conftest.$ac_ext <<EOF | |
074657b0 | 1668 | #line 1669 "configure" |
0f2d19dd JB |
1669 | #include "confdefs.h" |
1670 | aux (l) unsigned long l; | |
1671 | { int x; exit (l >= ((unsigned long)&x)); } | |
1672 | main () { int q; aux((unsigned long)&q); } | |
1673 | EOF | |
074657b0 | 1674 | { (eval echo configure:1675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } |
0f2d19dd JB |
1675 | if test -s conftest && (./conftest; exit) 2>/dev/null; then |
1676 | cat >> confdefs.h <<\EOF | |
1677 | #define SCM_STACK_GROWS_UP 1 | |
1678 | EOF | |
1679 | ||
1680 | fi | |
1681 | fi | |
1682 | rm -fr conftest* | |
1683 | ||
1684 | ||
1685 | if test "$cross_compiling" = yes; then | |
1686 | cat >> confdefs.h <<\EOF | |
1687 | #define SCM_SINGLES 1 | |
1688 | EOF | |
1689 | ||
1690 | echo "configure: warning: Guessing that sizeof(long) == sizeof(float) -- see scmconfig.h.in" 1>&2 | |
1691 | else | |
1692 | cat > conftest.$ac_ext <<EOF | |
074657b0 | 1693 | #line 1694 "configure" |
0f2d19dd JB |
1694 | #include "confdefs.h" |
1695 | main () { exit (sizeof(float) != sizeof(long)); } | |
1696 | EOF | |
074657b0 | 1697 | { (eval echo configure:1698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } |
0f2d19dd JB |
1698 | if test -s conftest && (./conftest; exit) 2>/dev/null; then |
1699 | cat >> confdefs.h <<\EOF | |
1700 | #define SCM_SINGLES 1 | |
1701 | EOF | |
1702 | ||
1703 | fi | |
1704 | fi | |
1705 | rm -fr conftest* | |
1706 | ||
2e18892a GH |
1707 | echo $ac_n "checking for struct linger""... $ac_c" 1>&6 |
1708 | if eval "test \"`echo '$''{'scm_cv_struct_linger'+set}'`\" = set"; then | |
1709 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1710 | else | |
1711 | cat > conftest.$ac_ext <<EOF | |
074657b0 | 1712 | #line 1713 "configure" |
2e18892a GH |
1713 | #include "confdefs.h" |
1714 | #include <sys/socket.h> | |
1715 | int main() { return 0; } | |
1716 | int t() { | |
1717 | struct linger lgr; lgr.l_linger = 100 | |
1718 | ; return 0; } | |
1719 | EOF | |
074657b0 | 1720 | if { (eval echo configure:1721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
2e18892a GH |
1721 | rm -rf conftest* |
1722 | scm_cv_struct_linger="yes" | |
1723 | else | |
1724 | rm -rf conftest* | |
1725 | scm_cv_struct_linger="no" | |
1726 | fi | |
1727 | rm -f conftest* | |
0f2d19dd | 1728 | |
2e18892a | 1729 | fi |
0f2d19dd | 1730 | |
2e18892a GH |
1731 | echo "$ac_t""$scm_cv_struct_linger" 1>&6 |
1732 | if test $scm_cv_struct_linger = yes; then | |
1733 | cat >> confdefs.h <<\EOF | |
1734 | #define HAVE_STRUCT_LINGER 1 | |
1735 | EOF | |
0f2d19dd | 1736 | |
2e18892a GH |
1737 | fi |
1738 | ||
0f2d19dd JB |
1739 | #-------------------------------------------------------------------- |
1740 | # | |
1741 | # How can you violate a stdio abstraction by setting a stream's fd? | |
1742 | # | |
1743 | #-------------------------------------------------------------------- | |
1744 | ||
1745 | FD_SETTER="" | |
1746 | ||
1747 | if test "x$FD_SETTER" = x; then | |
1748 | cat > conftest.$ac_ext <<EOF | |
074657b0 | 1749 | #line 1750 "configure" |
0f2d19dd JB |
1750 | #include "confdefs.h" |
1751 | #include <stdio.h> | |
1752 | ||
1753 | int main() { return 0; } | |
1754 | int t() { | |
1755 | stdout->_file = 1 | |
1756 | ; return 0; } | |
1757 | EOF | |
074657b0 | 1758 | if { (eval echo configure:1759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
0f2d19dd JB |
1759 | rm -rf conftest* |
1760 | FD_SETTER="((F)->_file = (D))" | |
1761 | fi | |
1762 | rm -f conftest* | |
1763 | ||
1764 | fi | |
1765 | ||
1766 | if test "x$FD_SETTER" = x; then | |
1767 | cat > conftest.$ac_ext <<EOF | |
074657b0 | 1768 | #line 1769 "configure" |
0f2d19dd JB |
1769 | #include "confdefs.h" |
1770 | #include <stdio.h> | |
1771 | ||
1772 | int main() { return 0; } | |
1773 | int t() { | |
1774 | stdout->_fileno | |
1775 | ; return 0; } | |
1776 | EOF | |
074657b0 | 1777 | if { (eval echo configure:1778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
0f2d19dd JB |
1778 | rm -rf conftest* |
1779 | FD_SETTER="((F)->_fileno = (D))" | |
1780 | fi | |
1781 | rm -f conftest* | |
1782 | ||
1783 | fi | |
1784 | ||
1785 | ||
1786 | test "x$FD_SETTER" != x && cat >> confdefs.h <<\EOF | |
1787 | #define HAVE_FD_SETTER 1 | |
1788 | EOF | |
1789 | ||
1790 | ||
1791 | ||
1792 | ||
1793 | ||
1794 | ||
1795 | ||
1796 | ||
1797 | ||
1798 | ||
1799 | ||
1800 | ||
1801 | ||
1802 | ||
1803 | trap '' 1 2 15 | |
1804 | cat > confcache <<\EOF | |
1805 | # This file is a shell script that caches the results of configure | |
1806 | # tests run on this system so they can be shared between configure | |
1807 | # scripts and configure runs. It is not useful on other systems. | |
1808 | # If it contains results you don't want to keep, you may remove or edit it. | |
1809 | # | |
1810 | # By default, configure uses ./config.cache as the cache file, | |
1811 | # creating it if it does not exist already. You can give configure | |
1812 | # the --cache-file=FILE option to use a different cache file; that is | |
1813 | # what configure does when it calls configure scripts in | |
1814 | # subdirectories, so they share the cache. | |
1815 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
1816 | # config.status only pays attention to the cache file if you give it the | |
1817 | # --recheck option to rerun configure. | |
1818 | # | |
1819 | EOF | |
1820 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
1821 | # and sets the high bit in the cache file unless we assign to the vars. | |
1822 | (set) 2>&1 | | |
1823 | sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \ | |
1824 | >> confcache | |
1825 | if cmp -s $cache_file confcache; then | |
1826 | : | |
1827 | else | |
1828 | if test -w $cache_file; then | |
1829 | echo "updating cache $cache_file" | |
1830 | cat confcache > $cache_file | |
1831 | else | |
1832 | echo "not updating unwritable cache $cache_file" | |
1833 | fi | |
1834 | fi | |
1835 | rm -f confcache | |
1836 | ||
1837 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
1838 | ||
1839 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
1840 | # Let make expand exec_prefix. | |
1841 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
1842 | ||
1843 | # Any assignment to VPATH causes Sun make to only execute | |
1844 | # the first set of double-colon rules, so remove it if not needed. | |
1845 | # If there is a colon in the path, we need to keep it. | |
1846 | if test "x$srcdir" = x.; then | |
1847 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
1848 | fi | |
1849 | ||
1850 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
1851 | ||
1852 | DEFS=-DHAVE_CONFIG_H | |
1853 | ||
1854 | # Without the "./", some shells look in PATH for config.status. | |
1855 | : ${CONFIG_STATUS=./config.status} | |
1856 | ||
1857 | echo creating $CONFIG_STATUS | |
1858 | rm -f $CONFIG_STATUS | |
1859 | cat > $CONFIG_STATUS <<EOF | |
1860 | #! /bin/sh | |
1861 | # Generated automatically by configure. | |
1862 | # Run this file to recreate the current configuration. | |
1863 | # This directory was configured as follows, | |
1864 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
1865 | # | |
1866 | # $0 $ac_configure_args | |
1867 | # | |
1868 | # Compiler output produced by configure, useful for debugging | |
1869 | # configure, is in ./config.log if it exists. | |
1870 | ||
1871 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
1872 | for ac_option | |
1873 | do | |
1874 | case "\$ac_option" in | |
1875 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
1876 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
1877 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
1878 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
2e18892a | 1879 | echo "$CONFIG_STATUS generated by autoconf version 2.10" |
0f2d19dd JB |
1880 | exit 0 ;; |
1881 | -help | --help | --hel | --he | --h) | |
1882 | echo "\$ac_cs_usage"; exit 0 ;; | |
1883 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
1884 | esac | |
1885 | done | |
1886 | ||
1887 | ac_given_srcdir=$srcdir | |
1888 | ||
1889 | trap 'rm -fr `echo "Makefile fd.h scmconfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 | |
1890 | EOF | |
1891 | cat >> $CONFIG_STATUS <<EOF | |
1892 | ||
1893 | # Protect against being on the right side of a sed subst in config.status. | |
1894 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
1895 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
1896 | $ac_vpsub | |
1897 | $extrasub | |
1898 | s%@CFLAGS@%$CFLAGS%g | |
1899 | s%@CPPFLAGS@%$CPPFLAGS%g | |
1900 | s%@CXXFLAGS@%$CXXFLAGS%g | |
1901 | s%@DEFS@%$DEFS%g | |
1902 | s%@LDFLAGS@%$LDFLAGS%g | |
1903 | s%@LIBS@%$LIBS%g | |
1904 | s%@exec_prefix@%$exec_prefix%g | |
1905 | s%@prefix@%$prefix%g | |
1906 | s%@program_transform_name@%$program_transform_name%g | |
1907 | s%@bindir@%$bindir%g | |
1908 | s%@sbindir@%$sbindir%g | |
1909 | s%@libexecdir@%$libexecdir%g | |
1910 | s%@datadir@%$datadir%g | |
1911 | s%@sysconfdir@%$sysconfdir%g | |
1912 | s%@sharedstatedir@%$sharedstatedir%g | |
1913 | s%@localstatedir@%$localstatedir%g | |
1914 | s%@libdir@%$libdir%g | |
1915 | s%@includedir@%$includedir%g | |
1916 | s%@oldincludedir@%$oldincludedir%g | |
1917 | s%@infodir@%$infodir%g | |
1918 | s%@mandir@%$mandir%g | |
1919 | s%@CC@%$CC%g | |
1920 | s%@CPP@%$CPP%g | |
1921 | s%@RANLIB@%$RANLIB%g | |
1922 | s%@LIBOBJS@%$LIBOBJS%g | |
1923 | s%@FD_SETTER@%$FD_SETTER%g | |
1924 | s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g | |
1925 | s%@TK_SRC_DIR@%$TK_SRC_DIR%g | |
1926 | s%@XINCLUDES@%$XINCLUDES%g | |
1927 | s%@GUILE_MAJOR_VERSION@%$GUILE_MAJOR_VERSION%g | |
1928 | s%@GUILE_MINOR_VERSION@%$GUILE_MINOR_VERSION%g | |
1929 | s%@GUILE_VERSION@%$GUILE_VERSION%g | |
1930 | ||
1931 | CEOF | |
1932 | EOF | |
1933 | cat >> $CONFIG_STATUS <<EOF | |
1934 | ||
1935 | CONFIG_FILES=\${CONFIG_FILES-"Makefile fd.h"} | |
1936 | EOF | |
1937 | cat >> $CONFIG_STATUS <<\EOF | |
1938 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
1939 | # Support "outfile[:infile]", defaulting infile="outfile.in". | |
1940 | case "$ac_file" in | |
1941 | *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` | |
1942 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
1943 | *) ac_file_in="${ac_file}.in" ;; | |
1944 | esac | |
1945 | ||
1946 | # Adjust relative srcdir, etc. for subdirectories. | |
1947 | ||
1948 | # Remove last slash and all that follows it. Not all systems have dirname. | |
1949 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
1950 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
1951 | # The file is in a subdirectory. | |
1952 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
1953 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
1954 | # A "../" for each directory in $ac_dir_suffix. | |
1955 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
1956 | else | |
1957 | ac_dir_suffix= ac_dots= | |
1958 | fi | |
1959 | ||
1960 | case "$ac_given_srcdir" in | |
1961 | .) srcdir=. | |
1962 | if test -z "$ac_dots"; then top_srcdir=. | |
1963 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
1964 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
1965 | *) # Relative path. | |
1966 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
1967 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
1968 | esac | |
1969 | ||
1970 | echo creating "$ac_file" | |
1971 | rm -f "$ac_file" | |
1972 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
1973 | case "$ac_file" in | |
1974 | *Makefile*) ac_comsub="1i\\ | |
1975 | # $configure_input" ;; | |
1976 | *) ac_comsub= ;; | |
1977 | esac | |
1978 | sed -e "$ac_comsub | |
1979 | s%@configure_input@%$configure_input%g | |
1980 | s%@srcdir@%$srcdir%g | |
1981 | s%@top_srcdir@%$top_srcdir%g | |
1982 | " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file | |
1983 | fi; done | |
1984 | rm -f conftest.subs | |
1985 | ||
1986 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
1987 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
1988 | # | |
1989 | # ac_d sets the value in "#define NAME VALUE" lines. | |
1990 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
1991 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
1992 | ac_dC='\3' | |
1993 | ac_dD='%g' | |
1994 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
1995 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
1996 | ac_uB='\([ ]\)%\1#\2define\3' | |
1997 | ac_uC=' ' | |
1998 | ac_uD='\4%g' | |
1999 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
2000 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
2001 | ac_eB='$%\1#\2define\3' | |
2002 | ac_eC=' ' | |
2003 | ac_eD='%g' | |
2004 | ||
2005 | CONFIG_HEADERS=${CONFIG_HEADERS-"scmconfig.h"} | |
2006 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
2007 | # Support "outfile[:infile]", defaulting infile="outfile.in". | |
2008 | case "$ac_file" in | |
2009 | *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` | |
2010 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
2011 | *) ac_file_in="${ac_file}.in" ;; | |
2012 | esac | |
2013 | ||
2014 | echo creating $ac_file | |
2015 | ||
2016 | rm -f conftest.frag conftest.in conftest.out | |
2017 | cp $ac_given_srcdir/$ac_file_in conftest.in | |
2018 | ||
2019 | EOF | |
2020 | ||
2021 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
2022 | # the proper values into config.h.in to produce config.h. And first: | |
2023 | # Protect against being on the right side of a sed subst in config.status. | |
2024 | # Protect against being in an unquoted here document in config.status. | |
2025 | rm -f conftest.vals | |
2026 | cat > conftest.hdr <<\EOF | |
2027 | s/[\\&%]/\\&/g | |
2028 | s%[\\$`]%\\&%g | |
2029 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
2030 | s%ac_d%ac_u%gp | |
2031 | s%ac_u%ac_e%gp | |
2032 | EOF | |
2033 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
2034 | rm -f conftest.hdr | |
2035 | ||
2036 | # This sed command replaces #undef with comments. This is necessary, for | |
2037 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
2038 | # on some systems where configure will not decide to define it. | |
2039 | cat >> conftest.vals <<\EOF | |
2040 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
2041 | EOF | |
2042 | ||
2043 | # Break up conftest.vals because some shells have a limit on | |
2044 | # the size of here documents, and old seds have small limits too. | |
2045 | # Maximum number of lines to put in a single here document. | |
2046 | ac_max_here_lines=12 | |
2047 | ||
2048 | rm -f conftest.tail | |
2049 | while : | |
2050 | do | |
2051 | ac_lines=`grep -c . conftest.vals` | |
2052 | # grep -c gives empty output for an empty file on some AIX systems. | |
2053 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
2054 | # Write a limited-size here document to conftest.frag. | |
2055 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
2056 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
2057 | echo 'CEOF | |
2058 | sed -f conftest.frag conftest.in > conftest.out | |
2059 | rm -f conftest.in | |
2060 | mv conftest.out conftest.in | |
2061 | ' >> $CONFIG_STATUS | |
2062 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
2063 | rm -f conftest.vals | |
2064 | mv conftest.tail conftest.vals | |
2065 | done | |
2066 | rm -f conftest.vals | |
2067 | ||
2068 | cat >> $CONFIG_STATUS <<\EOF | |
2069 | rm -f conftest.frag conftest.h | |
2070 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
2071 | cat conftest.in >> conftest.h | |
2072 | rm -f conftest.in | |
2073 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
2074 | echo "$ac_file is unchanged" | |
2075 | rm -f conftest.h | |
2076 | else | |
2e18892a GH |
2077 | # Remove last slash and all that follows it. Not all systems have dirname. |
2078 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
2079 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
2080 | # The file is in a subdirectory. | |
2081 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
2082 | fi | |
0f2d19dd JB |
2083 | rm -f $ac_file |
2084 | mv conftest.h $ac_file | |
2085 | fi | |
2086 | fi; done | |
2087 | ||
2088 | ||
2089 | ||
2090 | exit 0 | |
2091 | EOF | |
2092 | chmod +x $CONFIG_STATUS | |
2093 | rm -fr confdefs* $ac_clean_files | |
2094 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
2095 | ||
2096 |