]>
Commit | Line | Data |
---|---|---|
ef346f1a | 1 | #! /bin/sh |
eb02fd64 | 2 | |
ef346f1a | 3 | # Guess values for system-dependent variables and create Makefiles. |
b5db0960 | 4 | # Generated automatically using autoconf version 2.12.1 |
b9a5c27f | 5 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. |
ef346f1a ILT |
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: | |
14 | ac_help="$ac_help | |
b5db0960 ILT |
15 | --with-gnu-ld assume the C compiler uses GNU ld [default=no]" |
16 | ac_help="$ac_help | |
17 | --enable-shared build shared libraries [default=yes]" | |
2e598345 | 18 | ac_help="$ac_help |
b5db0960 ILT |
19 | --enable-static build static libraries [default=yes]" |
20 | ac_help="$ac_help | |
21 | --enable-targets alternative target configurations" | |
b9a5c27f RS |
22 | ac_help="$ac_help |
23 | --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)" | |
b5db0960 ILT |
24 | ac_help="$ac_help |
25 | --enable-maintainer-mode enable make rules and dependencies not useful | |
26 | (and sometimes confusing) to the casual installer" | |
ef346f1a ILT |
27 | |
28 | # Initialize some variables set by options. | |
29 | # The variables have the same names as the options, with | |
30 | # dashes changed to underlines. | |
31 | build=NONE | |
32 | cache_file=./config.cache | |
33 | exec_prefix=NONE | |
34 | host=NONE | |
35 | no_create= | |
36 | nonopt=NONE | |
37 | no_recursion= | |
38 | prefix=NONE | |
39 | program_prefix=NONE | |
40 | program_suffix=NONE | |
41 | program_transform_name=s,x,x, | |
42 | silent= | |
43 | site= | |
44 | srcdir= | |
45 | target=NONE | |
46 | verbose= | |
47 | x_includes=NONE | |
48 | x_libraries=NONE | |
caf2a913 ILT |
49 | bindir='${exec_prefix}/bin' |
50 | sbindir='${exec_prefix}/sbin' | |
51 | libexecdir='${exec_prefix}/libexec' | |
52 | datadir='${prefix}/share' | |
53 | sysconfdir='${prefix}/etc' | |
54 | sharedstatedir='${prefix}/com' | |
55 | localstatedir='${prefix}/var' | |
56 | libdir='${exec_prefix}/lib' | |
57 | includedir='${prefix}/include' | |
58 | oldincludedir='/usr/include' | |
59 | infodir='${prefix}/info' | |
60 | mandir='${prefix}/man' | |
eb02fd64 | 61 | |
ef346f1a ILT |
62 | # Initialize some other variables. |
63 | subdirs= | |
caf2a913 | 64 | MFLAGS= MAKEFLAGS= |
12e0afe5 | 65 | SHELL=${CONFIG_SHELL-/bin/sh} |
b9a5c27f RS |
66 | # Maximum number of lines to put in a shell here document. |
67 | ac_max_here_lines=12 | |
eb02fd64 | 68 | |
ef346f1a ILT |
69 | ac_prev= |
70 | for ac_option | |
71 | do | |
eb02fd64 | 72 | |
ef346f1a ILT |
73 | # If the previous option needs an argument, assign it. |
74 | if test -n "$ac_prev"; then | |
75 | eval "$ac_prev=\$ac_option" | |
76 | ac_prev= | |
77 | continue | |
78 | fi | |
79 | ||
80 | case "$ac_option" in | |
81 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
82 | *) ac_optarg= ;; | |
83 | esac | |
84 | ||
85 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
86 | ||
87 | case "$ac_option" in | |
88 | ||
caf2a913 ILT |
89 | -bindir | --bindir | --bindi | --bind | --bin | --bi) |
90 | ac_prev=bindir ;; | |
91 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
92 | bindir="$ac_optarg" ;; | |
93 | ||
94 | -build | --build | --buil | --bui | --bu) | |
ef346f1a | 95 | ac_prev=build ;; |
caf2a913 | 96 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
ef346f1a ILT |
97 | build="$ac_optarg" ;; |
98 | ||
99 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
100 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
101 | ac_prev=cache_file ;; | |
102 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
103 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
104 | cache_file="$ac_optarg" ;; | |
105 | ||
caf2a913 ILT |
106 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) |
107 | ac_prev=datadir ;; | |
108 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
109 | | --da=*) | |
110 | datadir="$ac_optarg" ;; | |
111 | ||
ef346f1a ILT |
112 | -disable-* | --disable-*) |
113 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
114 | # Reject names that are not valid shell variable names. | |
115 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
116 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
117 | fi | |
118 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
119 | eval "enable_${ac_feature}=no" ;; | |
120 | ||
121 | -enable-* | --enable-*) | |
122 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
123 | # Reject names that are not valid shell variable names. | |
124 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
125 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
126 | fi | |
127 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
128 | case "$ac_option" in | |
129 | *=*) ;; | |
130 | *) ac_optarg=yes ;; | |
131 | esac | |
132 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
133 | ||
134 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
135 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
136 | | --exec | --exe | --ex) | |
137 | ac_prev=exec_prefix ;; | |
138 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
139 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
140 | | --exec=* | --exe=* | --ex=*) | |
141 | exec_prefix="$ac_optarg" ;; | |
142 | ||
143 | -gas | --gas | --ga | --g) | |
144 | # Obsolete; use --with-gas. | |
145 | with_gas=yes ;; | |
146 | ||
147 | -help | --help | --hel | --he) | |
148 | # Omit some internal or obsolete options to make the list less imposing. | |
149 | # This message is too long to be a string in the A/UX 3.1 sh. | |
150 | cat << EOF | |
151 | Usage: configure [options] [host] | |
152 | Options: [defaults in brackets after descriptions] | |
153 | Configuration: | |
154 | --cache-file=FILE cache test results in FILE | |
155 | --help print this message | |
156 | --no-create do not create output files | |
157 | --quiet, --silent do not print \`checking...' messages | |
158 | --version print the version of autoconf that created configure | |
159 | Directory and file names: | |
160 | --prefix=PREFIX install architecture-independent files in PREFIX | |
161 | [$ac_default_prefix] | |
caf2a913 | 162 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
ef346f1a | 163 | [same as prefix] |
caf2a913 ILT |
164 | --bindir=DIR user executables in DIR [EPREFIX/bin] |
165 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
166 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
167 | --datadir=DIR read-only architecture-independent data in DIR | |
168 | [PREFIX/share] | |
169 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
170 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
171 | [PREFIX/com] | |
172 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
173 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
174 | --includedir=DIR C header files in DIR [PREFIX/include] | |
175 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
176 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
177 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
ef346f1a ILT |
178 | --srcdir=DIR find the sources in DIR [configure dir or ..] |
179 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
180 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
caf2a913 ILT |
181 | --program-transform-name=PROGRAM |
182 | run sed PROGRAM on installed program names | |
183 | EOF | |
184 | cat << EOF | |
ef346f1a ILT |
185 | Host type: |
186 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
187 | --host=HOST configure for HOST [guessed] | |
188 | --target=TARGET configure for TARGET [TARGET=HOST] | |
189 | Features and packages: | |
190 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
191 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
192 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
193 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
194 | --x-includes=DIR X include files are in DIR | |
195 | --x-libraries=DIR X library files are in DIR | |
ef346f1a | 196 | EOF |
caf2a913 ILT |
197 | if test -n "$ac_help"; then |
198 | echo "--enable and --with options recognized:$ac_help" | |
199 | fi | |
ef346f1a ILT |
200 | exit 0 ;; |
201 | ||
202 | -host | --host | --hos | --ho) | |
203 | ac_prev=host ;; | |
204 | -host=* | --host=* | --hos=* | --ho=*) | |
205 | host="$ac_optarg" ;; | |
206 | ||
caf2a913 ILT |
207 | -includedir | --includedir | --includedi | --included | --include \ |
208 | | --includ | --inclu | --incl | --inc) | |
209 | ac_prev=includedir ;; | |
210 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
211 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
212 | includedir="$ac_optarg" ;; | |
213 | ||
214 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
215 | ac_prev=infodir ;; | |
216 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
217 | infodir="$ac_optarg" ;; | |
218 | ||
219 | -libdir | --libdir | --libdi | --libd) | |
220 | ac_prev=libdir ;; | |
221 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
222 | libdir="$ac_optarg" ;; | |
223 | ||
224 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
225 | | --libexe | --libex | --libe) | |
226 | ac_prev=libexecdir ;; | |
227 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
228 | | --libexe=* | --libex=* | --libe=*) | |
229 | libexecdir="$ac_optarg" ;; | |
230 | ||
231 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
232 | | --localstate | --localstat | --localsta | --localst \ | |
233 | | --locals | --local | --loca | --loc | --lo) | |
234 | ac_prev=localstatedir ;; | |
235 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
236 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
237 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
238 | localstatedir="$ac_optarg" ;; | |
239 | ||
240 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
241 | ac_prev=mandir ;; | |
242 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
243 | mandir="$ac_optarg" ;; | |
244 | ||
ef346f1a ILT |
245 | -nfp | --nfp | --nf) |
246 | # Obsolete; use --without-fp. | |
247 | with_fp=no ;; | |
248 | ||
249 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
250 | | --no-cr | --no-c) | |
251 | no_create=yes ;; | |
252 | ||
253 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
254 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
255 | no_recursion=yes ;; | |
256 | ||
caf2a913 ILT |
257 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ |
258 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
259 | | --oldin | --oldi | --old | --ol | --o) | |
260 | ac_prev=oldincludedir ;; | |
261 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
262 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
263 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
264 | oldincludedir="$ac_optarg" ;; | |
265 | ||
ef346f1a ILT |
266 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
267 | ac_prev=prefix ;; | |
268 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
269 | prefix="$ac_optarg" ;; | |
270 | ||
271 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
272 | | --program-pre | --program-pr | --program-p) | |
273 | ac_prev=program_prefix ;; | |
274 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
275 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
276 | program_prefix="$ac_optarg" ;; | |
277 | ||
278 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
279 | | --program-suf | --program-su | --program-s) | |
280 | ac_prev=program_suffix ;; | |
281 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
282 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
283 | program_suffix="$ac_optarg" ;; | |
284 | ||
285 | -program-transform-name | --program-transform-name \ | |
286 | | --program-transform-nam | --program-transform-na \ | |
287 | | --program-transform-n | --program-transform- \ | |
288 | | --program-transform | --program-transfor \ | |
289 | | --program-transfo | --program-transf \ | |
290 | | --program-trans | --program-tran \ | |
291 | | --progr-tra | --program-tr | --program-t) | |
292 | ac_prev=program_transform_name ;; | |
293 | -program-transform-name=* | --program-transform-name=* \ | |
294 | | --program-transform-nam=* | --program-transform-na=* \ | |
295 | | --program-transform-n=* | --program-transform-=* \ | |
296 | | --program-transform=* | --program-transfor=* \ | |
297 | | --program-transfo=* | --program-transf=* \ | |
298 | | --program-trans=* | --program-tran=* \ | |
299 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
300 | program_transform_name="$ac_optarg" ;; | |
301 | ||
302 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
303 | | -silent | --silent | --silen | --sile | --sil) | |
304 | silent=yes ;; | |
305 | ||
caf2a913 ILT |
306 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) |
307 | ac_prev=sbindir ;; | |
308 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
309 | | --sbi=* | --sb=*) | |
310 | sbindir="$ac_optarg" ;; | |
311 | ||
312 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
313 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
314 | | --sharedst | --shareds | --shared | --share | --shar \ | |
315 | | --sha | --sh) | |
316 | ac_prev=sharedstatedir ;; | |
317 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
318 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
319 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
320 | | --sha=* | --sh=*) | |
321 | sharedstatedir="$ac_optarg" ;; | |
322 | ||
ef346f1a ILT |
323 | -site | --site | --sit) |
324 | ac_prev=site ;; | |
325 | -site=* | --site=* | --sit=*) | |
326 | site="$ac_optarg" ;; | |
327 | ||
328 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
329 | ac_prev=srcdir ;; | |
330 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
331 | srcdir="$ac_optarg" ;; | |
332 | ||
caf2a913 ILT |
333 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ |
334 | | --syscon | --sysco | --sysc | --sys | --sy) | |
335 | ac_prev=sysconfdir ;; | |
336 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
337 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
338 | sysconfdir="$ac_optarg" ;; | |
339 | ||
ef346f1a ILT |
340 | -target | --target | --targe | --targ | --tar | --ta | --t) |
341 | ac_prev=target ;; | |
342 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
343 | target="$ac_optarg" ;; | |
344 | ||
345 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
346 | verbose=yes ;; | |
347 | ||
348 | -version | --version | --versio | --versi | --vers) | |
b5db0960 | 349 | echo "configure generated by autoconf version 2.12.1" |
ef346f1a ILT |
350 | exit 0 ;; |
351 | ||
352 | -with-* | --with-*) | |
353 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
354 | # Reject names that are not valid shell variable names. | |
355 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
356 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
357 | fi | |
358 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
359 | case "$ac_option" in | |
360 | *=*) ;; | |
361 | *) ac_optarg=yes ;; | |
362 | esac | |
363 | eval "with_${ac_package}='$ac_optarg'" ;; | |
364 | ||
365 | -without-* | --without-*) | |
366 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
367 | # Reject names that are not valid shell variable names. | |
368 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
369 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
370 | fi | |
371 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
372 | eval "with_${ac_package}=no" ;; | |
373 | ||
374 | --x) | |
375 | # Obsolete; use --with-x. | |
376 | with_x=yes ;; | |
377 | ||
378 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
379 | | --x-incl | --x-inc | --x-in | --x-i) | |
380 | ac_prev=x_includes ;; | |
381 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
382 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
383 | x_includes="$ac_optarg" ;; | |
384 | ||
385 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
386 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
387 | ac_prev=x_libraries ;; | |
388 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
389 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
390 | x_libraries="$ac_optarg" ;; | |
391 | ||
392 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
393 | ;; | |
394 | ||
caf2a913 | 395 | *) |
ef346f1a ILT |
396 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then |
397 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
398 | fi | |
399 | if test "x$nonopt" != xNONE; then | |
400 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
401 | fi | |
402 | nonopt="$ac_option" | |
403 | ;; | |
404 | ||
405 | esac | |
406 | done | |
2ee11735 | 407 | |
ef346f1a ILT |
408 | if test -n "$ac_prev"; then |
409 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
410 | fi | |
eb02fd64 | 411 | |
ef346f1a ILT |
412 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
413 | ||
414 | # File descriptor usage: | |
415 | # 0 standard input | |
416 | # 1 file creation | |
417 | # 2 errors and warnings | |
418 | # 3 some systems may open it to /dev/tty | |
419 | # 4 used on the Kubota Titan | |
420 | # 6 checking for... messages and results | |
421 | # 5 compiler messages saved in config.log | |
422 | if test "$silent" = yes; then | |
423 | exec 6>/dev/null | |
424 | else | |
425 | exec 6>&1 | |
426 | fi | |
427 | exec 5>./config.log | |
428 | ||
429 | echo "\ | |
430 | This file contains any messages produced by compilers while | |
431 | running configure, to aid debugging if configure makes a mistake. | |
432 | " 1>&5 | |
eb02fd64 | 433 | |
ef346f1a ILT |
434 | # Strip out --no-create and --no-recursion so they do not pile up. |
435 | # Also quote any args containing shell metacharacters. | |
436 | ac_configure_args= | |
437 | for ac_arg | |
eb02fd64 | 438 | do |
ef346f1a ILT |
439 | case "$ac_arg" in |
440 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
441 | | --no-cr | --no-c) ;; | |
442 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
443 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
444 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
445 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
446 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
447 | esac | |
eb02fd64 RP |
448 | done |
449 | ||
ef346f1a | 450 | # NLS nuisances. |
b9a5c27f RS |
451 | # Only set these to C if already set. These must not be set unconditionally |
452 | # because not all systems understand e.g. LANG=C (notably SCO). | |
453 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
454 | # Non-C LC_CTYPE values break the ctype check. | |
ef346f1a | 455 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi |
b9a5c27f RS |
456 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi |
457 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
458 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
ef346f1a ILT |
459 | |
460 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
461 | rm -rf conftest* confdefs.h | |
462 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
463 | echo > confdefs.h | |
464 | ||
465 | # A filename unique to this package, relative to the directory that | |
466 | # configure is in, which we can look for to find out if srcdir is correct. | |
467 | ac_unique_file=ldmain.c | |
468 | ||
469 | # Find the source files, if location was not specified. | |
470 | if test -z "$srcdir"; then | |
471 | ac_srcdir_defaulted=yes | |
472 | # Try the directory containing this script, then its parent. | |
473 | ac_prog=$0 | |
474 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
475 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
476 | srcdir=$ac_confdir | |
477 | if test ! -r $srcdir/$ac_unique_file; then | |
478 | srcdir=.. | |
479 | fi | |
480 | else | |
481 | ac_srcdir_defaulted=no | |
482 | fi | |
483 | if test ! -r $srcdir/$ac_unique_file; then | |
484 | if test "$ac_srcdir_defaulted" = yes; then | |
485 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
486 | else | |
487 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
488 | fi | |
8c32cf6e | 489 | fi |
ef346f1a ILT |
490 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` |
491 | ||
492 | # Prefer explicitly selected file to automatically selected ones. | |
493 | if test -z "$CONFIG_SITE"; then | |
494 | if test "x$prefix" != xNONE; then | |
495 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
496 | else | |
497 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
498 | fi | |
499 | fi | |
500 | for ac_site_file in $CONFIG_SITE; do | |
501 | if test -r "$ac_site_file"; then | |
502 | echo "loading site script $ac_site_file" | |
503 | . "$ac_site_file" | |
504 | fi | |
505 | done | |
8c32cf6e | 506 | |
ef346f1a ILT |
507 | if test -r "$cache_file"; then |
508 | echo "loading cache $cache_file" | |
509 | . $cache_file | |
510 | else | |
511 | echo "creating cache $cache_file" | |
512 | > $cache_file | |
f2e91404 | 513 | fi |
eb02fd64 | 514 | |
ef346f1a ILT |
515 | ac_ext=c |
516 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
b9a5c27f RS |
517 | ac_cpp='$CPP $CPPFLAGS' |
518 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
519 | ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
520 | cross_compiling=$ac_cv_prog_cc_cross | |
ef346f1a ILT |
521 | |
522 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
523 | # Stardent Vistra SVR4 grep lacks -e, says [email protected]. | |
524 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
525 | ac_n= ac_c=' | |
526 | ' ac_t=' ' | |
527 | else | |
528 | ac_n=-n ac_c= ac_t= | |
529 | fi | |
530 | else | |
531 | ac_n= ac_c='\c' ac_t= | |
532 | fi | |
533 | ||
534 | ||
8c32cf6e | 535 | |
ef346f1a | 536 | ac_aux_dir= |
b5db0960 | 537 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do |
ef346f1a ILT |
538 | if test -f $ac_dir/install-sh; then |
539 | ac_aux_dir=$ac_dir | |
540 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
541 | break | |
542 | elif test -f $ac_dir/install.sh; then | |
543 | ac_aux_dir=$ac_dir | |
544 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
545 | break | |
546 | fi | |
547 | done | |
548 | if test -z "$ac_aux_dir"; then | |
b5db0960 | 549 | { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } |
ef346f1a ILT |
550 | fi |
551 | ac_config_guess=$ac_aux_dir/config.guess | |
552 | ac_config_sub=$ac_aux_dir/config.sub | |
553 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
eb02fd64 | 554 | |
eb02fd64 | 555 | |
ef346f1a ILT |
556 | # Do some error checking and defaulting for the host and target type. |
557 | # The inputs are: | |
558 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
559 | # | |
560 | # The rules are: | |
561 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
caf2a913 | 562 | # same time. |
ef346f1a ILT |
563 | # 2. Host defaults to nonopt. |
564 | # 3. If nonopt is not specified, then host defaults to the current host, | |
565 | # as determined by config.guess. | |
566 | # 4. Target and build default to nonopt. | |
567 | # 5. If nonopt is not specified, then target and build default to host. | |
568 | ||
569 | # The aliases save the names the user supplied, while $host etc. | |
570 | # will get canonicalized. | |
571 | case $host---$target---$nonopt in | |
572 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
573 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
574 | esac | |
eb02fd64 | 575 | |
c0b47bae | 576 | |
ef346f1a | 577 | # Make sure we can run config.sub. |
b5db0960 | 578 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : |
ef346f1a ILT |
579 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } |
580 | fi | |
c0b47bae | 581 | |
ef346f1a | 582 | echo $ac_n "checking host system type""... $ac_c" 1>&6 |
12e0afe5 | 583 | echo "configure:584: checking host system type" >&5 |
ef346f1a ILT |
584 | |
585 | host_alias=$host | |
586 | case "$host_alias" in | |
587 | NONE) | |
588 | case $nonopt in | |
589 | NONE) | |
b5db0960 | 590 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : |
ef346f1a ILT |
591 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } |
592 | fi ;; | |
593 | *) host_alias=$nonopt ;; | |
594 | esac ;; | |
595 | esac | |
c0b47bae | 596 | |
b5db0960 | 597 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` |
b9a5c27f RS |
598 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
599 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
600 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
ef346f1a ILT |
601 | echo "$ac_t""$host" 1>&6 |
602 | ||
603 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
12e0afe5 | 604 | echo "configure:605: checking target system type" >&5 |
b5db0960 ILT |
605 | |
606 | target_alias=$target | |
607 | case "$target_alias" in | |
608 | NONE) | |
609 | case $nonopt in | |
610 | NONE) target_alias=$host_alias ;; | |
611 | *) target_alias=$nonopt ;; | |
612 | esac ;; | |
613 | esac | |
614 | ||
615 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` | |
616 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
617 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
618 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
619 | echo "$ac_t""$target" 1>&6 | |
620 | ||
621 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
12e0afe5 | 622 | echo "configure:623: checking build system type" >&5 |
b5db0960 ILT |
623 | |
624 | build_alias=$build | |
625 | case "$build_alias" in | |
626 | NONE) | |
627 | case $nonopt in | |
628 | NONE) build_alias=$host_alias ;; | |
629 | *) build_alias=$nonopt ;; | |
630 | esac ;; | |
631 | esac | |
632 | ||
633 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` | |
634 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
635 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
636 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
637 | echo "$ac_t""$build" 1>&6 | |
638 | ||
639 | test "$host_alias" != "$target_alias" && | |
640 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
641 | NONENONEs,x,x, && | |
642 | program_prefix=${target_alias}- | |
643 | ||
644 | ||
645 | # Find a good install program. We prefer a C program (faster), | |
646 | # so one script is as good as another. But avoid the broken or | |
647 | # incompatible versions: | |
648 | # SysV /etc/install, /usr/sbin/install | |
649 | # SunOS /usr/etc/install | |
650 | # IRIX /sbin/install | |
651 | # AIX /bin/install | |
12e0afe5 | 652 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag |
b5db0960 ILT |
653 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args |
654 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
655 | # ./install, which can be erroneously created by make from ./install.sh. | |
656 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
12e0afe5 | 657 | echo "configure:658: checking for a BSD compatible install" >&5 |
b5db0960 ILT |
658 | if test -z "$INSTALL"; then |
659 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
660 | echo $ac_n "(cached) $ac_c" 1>&6 | |
661 | else | |
662 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" | |
663 | for ac_dir in $PATH; do | |
664 | # Account for people who put trailing slashes in PATH elements. | |
665 | case "$ac_dir/" in | |
666 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
667 | *) | |
668 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
12e0afe5 ILT |
669 | # Don't use installbsd from OSF since it installs stuff as root |
670 | # by default. | |
671 | for ac_prog in ginstall scoinst install; do | |
b5db0960 ILT |
672 | if test -f $ac_dir/$ac_prog; then |
673 | if test $ac_prog = install && | |
674 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
675 | # AIX install. It has an incompatible calling convention. | |
b5db0960 ILT |
676 | : |
677 | else | |
678 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
679 | break 2 | |
680 | fi | |
681 | fi | |
682 | done | |
683 | ;; | |
684 | esac | |
685 | done | |
686 | IFS="$ac_save_IFS" | |
687 | ||
688 | fi | |
689 | if test "${ac_cv_path_install+set}" = set; then | |
690 | INSTALL="$ac_cv_path_install" | |
691 | else | |
692 | # As a last resort, use the slow shell script. We don't cache a | |
693 | # path for INSTALL within a source directory, because that will | |
694 | # break other packages using the cache if that directory is | |
695 | # removed, or if the path is relative. | |
696 | INSTALL="$ac_install_sh" | |
697 | fi | |
698 | fi | |
699 | echo "$ac_t""$INSTALL" 1>&6 | |
700 | ||
701 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
702 | # It thinks the first close brace ends the variable substitution. | |
703 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
704 | ||
705 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
706 | ||
707 | ||
708 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' | |
709 | ||
710 | ||
711 | PACKAGE=ld | |
712 | ||
713 | VERSION=2.8.2 | |
714 | ||
715 | if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then | |
716 | { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } | |
717 | fi | |
718 | cat >> confdefs.h <<EOF | |
719 | #define PACKAGE "$PACKAGE" | |
720 | EOF | |
721 | ||
722 | cat >> confdefs.h <<EOF | |
723 | #define VERSION "$VERSION" | |
724 | EOF | |
725 | ||
726 | echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 | |
12e0afe5 | 727 | echo "configure:728: checking whether build environment is sane" >&5 |
b5db0960 ILT |
728 | # Just in case |
729 | sleep 1 | |
730 | echo timestamp > conftestfile | |
731 | # Do `set' in a subshell so we don't clobber the current shell's | |
732 | # arguments. Must try -L first in case configure is actually a | |
733 | # symlink; some systems play weird games with the mod time of symlinks | |
734 | # (eg FreeBSD returns the mod time of the symlink's containing | |
735 | # directory). | |
736 | if ( | |
737 | set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` | |
738 | if test "" = "X"; then | |
739 | # -L didn't work. | |
740 | set X `ls -t $srcdir/configure conftestfile` | |
741 | fi | |
742 | test "$2" = conftestfile | |
743 | ) | |
744 | then | |
745 | # Ok. | |
746 | : | |
747 | else | |
748 | { echo "configure: error: newly created file is older than distributed files! | |
749 | Check your system clock" 1>&2; exit 1; } | |
750 | fi | |
751 | rm -f conftest* | |
752 | echo "$ac_t""yes" 1>&6 | |
753 | if test "$program_transform_name" = s,x,x,; then | |
754 | program_transform_name= | |
755 | else | |
756 | # Double any \ or $. echo might interpret backslashes. | |
757 | cat <<\EOF_SED > conftestsed | |
758 | s,\\,\\\\,g; s,\$,$$,g | |
759 | EOF_SED | |
760 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
761 | rm -f conftestsed | |
762 | fi | |
763 | test "$program_prefix" != NONE && | |
764 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
765 | # Use a double $ so make ignores it. | |
766 | test "$program_suffix" != NONE && | |
767 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
768 | ||
769 | # sed with no file args requires a program. | |
770 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
771 | ||
772 | missing_dir=`cd $ac_aux_dir && pwd` | |
773 | echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 | |
12e0afe5 | 774 | echo "configure:775: checking for working aclocal" >&5 |
b5db0960 ILT |
775 | # Run test in a subshell; some versions of sh will print an error if |
776 | # an executable is not found, even if stderr is redirected. | |
777 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
778 | if (aclocal --version) < /dev/null > /dev/null 2>&1; then | |
779 | ACLOCAL=aclocal | |
780 | echo "$ac_t""found" 1>&6 | |
781 | else | |
782 | ACLOCAL="$missing_dir/missing aclocal" | |
783 | echo "$ac_t""missing" 1>&6 | |
784 | fi | |
785 | ||
786 | echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 | |
12e0afe5 | 787 | echo "configure:788: checking for working autoconf" >&5 |
b5db0960 ILT |
788 | # Run test in a subshell; some versions of sh will print an error if |
789 | # an executable is not found, even if stderr is redirected. | |
790 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
791 | if (autoconf --version) < /dev/null > /dev/null 2>&1; then | |
792 | AUTOCONF=autoconf | |
793 | echo "$ac_t""found" 1>&6 | |
794 | else | |
795 | AUTOCONF="$missing_dir/missing autoconf" | |
796 | echo "$ac_t""missing" 1>&6 | |
797 | fi | |
798 | ||
799 | echo $ac_n "checking for working automake""... $ac_c" 1>&6 | |
12e0afe5 | 800 | echo "configure:801: checking for working automake" >&5 |
b5db0960 ILT |
801 | # Run test in a subshell; some versions of sh will print an error if |
802 | # an executable is not found, even if stderr is redirected. | |
803 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
804 | if (automake --version) < /dev/null > /dev/null 2>&1; then | |
805 | AUTOMAKE=automake | |
806 | echo "$ac_t""found" 1>&6 | |
807 | else | |
808 | AUTOMAKE="$missing_dir/missing automake" | |
809 | echo "$ac_t""missing" 1>&6 | |
810 | fi | |
811 | ||
812 | echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 | |
12e0afe5 | 813 | echo "configure:814: checking for working autoheader" >&5 |
b5db0960 ILT |
814 | # Run test in a subshell; some versions of sh will print an error if |
815 | # an executable is not found, even if stderr is redirected. | |
816 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
817 | if (autoheader --version) < /dev/null > /dev/null 2>&1; then | |
818 | AUTOHEADER=autoheader | |
819 | echo "$ac_t""found" 1>&6 | |
820 | else | |
821 | AUTOHEADER="$missing_dir/missing autoheader" | |
822 | echo "$ac_t""missing" 1>&6 | |
823 | fi | |
824 | ||
825 | echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 | |
12e0afe5 | 826 | echo "configure:827: checking for working makeinfo" >&5 |
b5db0960 ILT |
827 | # Run test in a subshell; some versions of sh will print an error if |
828 | # an executable is not found, even if stderr is redirected. | |
829 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
830 | if (makeinfo --version) < /dev/null > /dev/null 2>&1; then | |
831 | MAKEINFO=makeinfo | |
832 | echo "$ac_t""found" 1>&6 | |
833 | else | |
834 | MAKEINFO="$missing_dir/missing makeinfo" | |
835 | echo "$ac_t""missing" 1>&6 | |
836 | fi | |
837 | ||
838 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 | |
12e0afe5 | 839 | echo "configure:840: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
b5db0960 ILT |
840 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
841 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
842 | echo $ac_n "(cached) $ac_c" 1>&6 | |
843 | else | |
844 | cat > conftestmake <<\EOF | |
845 | all: | |
846 | @echo 'ac_maketemp="${MAKE}"' | |
847 | EOF | |
848 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
849 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
850 | if test -n "$ac_maketemp"; then | |
851 | eval ac_cv_prog_make_${ac_make}_set=yes | |
852 | else | |
853 | eval ac_cv_prog_make_${ac_make}_set=no | |
854 | fi | |
855 | rm -f conftestmake | |
856 | fi | |
857 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
858 | echo "$ac_t""yes" 1>&6 | |
859 | SET_MAKE= | |
860 | else | |
861 | echo "$ac_t""no" 1>&6 | |
862 | SET_MAKE="MAKE=${MAKE-make}" | |
863 | fi | |
864 | ||
865 | ||
12e0afe5 ILT |
866 | # Extract the first word of "ranlib", so it can be a program name with args. |
867 | set dummy ranlib; ac_word=$2 | |
868 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
869 | echo "configure:870: checking for $ac_word" >&5 | |
870 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then | |
871 | echo $ac_n "(cached) $ac_c" 1>&6 | |
872 | else | |
873 | if test -n "$RANLIB"; then | |
874 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
875 | else | |
876 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
877 | for ac_dir in $PATH; do | |
878 | test -z "$ac_dir" && ac_dir=. | |
879 | if test -f $ac_dir/$ac_word; then | |
880 | ac_cv_prog_RANLIB="ranlib" | |
881 | break | |
882 | fi | |
883 | done | |
884 | IFS="$ac_save_ifs" | |
885 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
886 | fi | |
887 | fi | |
888 | RANLIB="$ac_cv_prog_RANLIB" | |
889 | if test -n "$RANLIB"; then | |
890 | echo "$ac_t""$RANLIB" 1>&6 | |
891 | else | |
892 | echo "$ac_t""no" 1>&6 | |
893 | fi | |
894 | ||
b5db0960 ILT |
895 | # Extract the first word of "gcc", so it can be a program name with args. |
896 | set dummy gcc; ac_word=$2 | |
897 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
12e0afe5 | 898 | echo "configure:899: checking for $ac_word" >&5 |
b5db0960 ILT |
899 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
900 | echo $ac_n "(cached) $ac_c" 1>&6 | |
901 | else | |
902 | if test -n "$CC"; then | |
903 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
904 | else | |
905 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
906 | for ac_dir in $PATH; do | |
907 | test -z "$ac_dir" && ac_dir=. | |
908 | if test -f $ac_dir/$ac_word; then | |
909 | ac_cv_prog_CC="gcc" | |
910 | break | |
911 | fi | |
912 | done | |
913 | IFS="$ac_save_ifs" | |
914 | fi | |
915 | fi | |
916 | CC="$ac_cv_prog_CC" | |
917 | if test -n "$CC"; then | |
918 | echo "$ac_t""$CC" 1>&6 | |
919 | else | |
920 | echo "$ac_t""no" 1>&6 | |
921 | fi | |
922 | ||
923 | if test -z "$CC"; then | |
924 | # Extract the first word of "cc", so it can be a program name with args. | |
925 | set dummy cc; ac_word=$2 | |
926 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
12e0afe5 | 927 | echo "configure:928: checking for $ac_word" >&5 |
b5db0960 ILT |
928 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
929 | echo $ac_n "(cached) $ac_c" 1>&6 | |
930 | else | |
931 | if test -n "$CC"; then | |
932 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
933 | else | |
934 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
935 | ac_prog_rejected=no | |
936 | for ac_dir in $PATH; do | |
937 | test -z "$ac_dir" && ac_dir=. | |
938 | if test -f $ac_dir/$ac_word; then | |
939 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
940 | ac_prog_rejected=yes | |
941 | continue | |
942 | fi | |
943 | ac_cv_prog_CC="cc" | |
944 | break | |
945 | fi | |
946 | done | |
947 | IFS="$ac_save_ifs" | |
948 | if test $ac_prog_rejected = yes; then | |
949 | # We found a bogon in the path, so make sure we never use it. | |
950 | set dummy $ac_cv_prog_CC | |
951 | shift | |
952 | if test $# -gt 0; then | |
953 | # We chose a different compiler from the bogus one. | |
954 | # However, it has the same basename, so the bogon will be chosen | |
955 | # first if we set CC to just the basename; use the full file name. | |
956 | shift | |
957 | set dummy "$ac_dir/$ac_word" "$@" | |
958 | shift | |
959 | ac_cv_prog_CC="$@" | |
960 | fi | |
961 | fi | |
962 | fi | |
963 | fi | |
964 | CC="$ac_cv_prog_CC" | |
965 | if test -n "$CC"; then | |
966 | echo "$ac_t""$CC" 1>&6 | |
967 | else | |
968 | echo "$ac_t""no" 1>&6 | |
969 | fi | |
970 | ||
971 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
972 | fi | |
973 | ||
974 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | |
12e0afe5 | 975 | echo "configure:976: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
b5db0960 ILT |
976 | |
977 | ac_ext=c | |
978 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
979 | ac_cpp='$CPP $CPPFLAGS' | |
980 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
981 | ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
982 | cross_compiling=$ac_cv_prog_cc_cross | |
983 | ||
984 | cat > conftest.$ac_ext <<EOF | |
12e0afe5 | 985 | #line 986 "configure" |
b5db0960 ILT |
986 | #include "confdefs.h" |
987 | main(){return(0);} | |
988 | EOF | |
12e0afe5 | 989 | if { (eval echo configure:990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
b5db0960 ILT |
990 | ac_cv_prog_cc_works=yes |
991 | # If we can't run a trivial program, we are probably using a cross compiler. | |
992 | if (./conftest; exit) 2>/dev/null; then | |
993 | ac_cv_prog_cc_cross=no | |
994 | else | |
995 | ac_cv_prog_cc_cross=yes | |
996 | fi | |
997 | else | |
998 | echo "configure: failed program was:" >&5 | |
999 | cat conftest.$ac_ext >&5 | |
1000 | ac_cv_prog_cc_works=no | |
1001 | fi | |
1002 | rm -fr conftest* | |
1003 | ||
1004 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
1005 | if test $ac_cv_prog_cc_works = no; then | |
1006 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
1007 | fi | |
1008 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
12e0afe5 | 1009 | echo "configure:1010: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
b5db0960 ILT |
1010 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
1011 | cross_compiling=$ac_cv_prog_cc_cross | |
1012 | ||
1013 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
12e0afe5 | 1014 | echo "configure:1015: checking whether we are using GNU C" >&5 |
b5db0960 ILT |
1015 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
1016 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1017 | else | |
1018 | cat > conftest.c <<EOF | |
1019 | #ifdef __GNUC__ | |
1020 | yes; | |
1021 | #endif | |
1022 | EOF | |
12e0afe5 | 1023 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1024: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
b5db0960 ILT |
1024 | ac_cv_prog_gcc=yes |
1025 | else | |
1026 | ac_cv_prog_gcc=no | |
1027 | fi | |
1028 | fi | |
1029 | ||
1030 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
1031 | ||
1032 | if test $ac_cv_prog_gcc = yes; then | |
1033 | GCC=yes | |
1034 | ac_test_CFLAGS="${CFLAGS+set}" | |
1035 | ac_save_CFLAGS="$CFLAGS" | |
1036 | CFLAGS= | |
1037 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
12e0afe5 | 1038 | echo "configure:1039: checking whether ${CC-cc} accepts -g" >&5 |
b5db0960 ILT |
1039 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
1040 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1041 | else | |
1042 | echo 'void f(){}' > conftest.c | |
1043 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
1044 | ac_cv_prog_cc_g=yes | |
1045 | else | |
1046 | ac_cv_prog_cc_g=no | |
1047 | fi | |
1048 | rm -f conftest* | |
1049 | ||
1050 | fi | |
1051 | ||
1052 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
1053 | if test "$ac_test_CFLAGS" = set; then | |
1054 | CFLAGS="$ac_save_CFLAGS" | |
1055 | elif test $ac_cv_prog_cc_g = yes; then | |
1056 | CFLAGS="-g -O2" | |
1057 | else | |
1058 | CFLAGS="-O2" | |
1059 | fi | |
1060 | else | |
1061 | GCC= | |
1062 | test "${CFLAGS+set}" = set || CFLAGS="-g" | |
1063 | fi | |
1064 | ||
b5db0960 ILT |
1065 | # Check whether --with-gnu-ld or --without-gnu-ld was given. |
1066 | if test "${with_gnu_ld+set}" = set; then | |
1067 | withval="$with_gnu_ld" | |
1068 | test "$withval" = no || with_gnu_ld=yes | |
1069 | else | |
1070 | with_gnu_ld=no | |
1071 | fi | |
1072 | ||
12e0afe5 ILT |
1073 | |
1074 | ac_prog=ld | |
1075 | if test "$ac_cv_prog_gcc" = yes; then | |
1076 | # Check if gcc -print-prog-name=ld gives a path. | |
1077 | echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 | |
1078 | echo "configure:1079: checking for ld used by GCC" >&5 | |
1079 | ac_prog=`($CC -print-prog-name=ld) 2>&5` | |
1080 | case "$ac_prog" in | |
1081 | # Accept absolute paths. | |
1082 | /*) | |
1083 | test -z "$LD" && LD="$ac_prog" | |
1084 | ;; | |
1085 | "") | |
1086 | # If it fails, then pretend we aren't using GCC. | |
1087 | ac_prog=ld | |
1088 | ;; | |
1089 | *) | |
1090 | # If it is relative, then search for the first ld in PATH. | |
1091 | with_gnu_ld=unknown | |
1092 | ;; | |
1093 | esac | |
1094 | elif test "$with_gnu_ld" = yes; then | |
b5db0960 | 1095 | echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 |
12e0afe5 | 1096 | echo "configure:1097: checking for GNU ld" >&5 |
b5db0960 ILT |
1097 | else |
1098 | echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 | |
12e0afe5 | 1099 | echo "configure:1100: checking for non-GNU ld" >&5 |
b5db0960 ILT |
1100 | fi |
1101 | if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then | |
1102 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1103 | else | |
12e0afe5 | 1104 | if test -z "$LD"; then |
b5db0960 ILT |
1105 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" |
1106 | for ac_dir in $PATH; do | |
1107 | test -z "$ac_dir" && ac_dir=. | |
12e0afe5 ILT |
1108 | if test -f "$ac_dir/$ac_prog"; then |
1109 | ac_cv_path_LD="$ac_dir/$ac_prog" | |
b5db0960 ILT |
1110 | # Check to see if the program is GNU ld. I'd rather use --version, |
1111 | # but apparently some GNU ld's only accept -v. | |
1112 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
12e0afe5 ILT |
1113 | if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then |
1114 | test "$with_gnu_ld" != no && break | |
b5db0960 ILT |
1115 | else |
1116 | test "$with_gnu_ld" != yes && break | |
1117 | fi | |
1118 | fi | |
1119 | done | |
1120 | IFS="$ac_save_ifs" | |
12e0afe5 | 1121 | else |
b5db0960 | 1122 | ac_cv_path_LD="$LD" # Let the user override the test with a path. |
12e0afe5 | 1123 | fi |
b5db0960 ILT |
1124 | fi |
1125 | ||
1126 | LD="$ac_cv_path_LD" | |
1127 | if test -n "$LD"; then | |
1128 | echo "$ac_t""$LD" 1>&6 | |
1129 | else | |
1130 | echo "$ac_t""no" 1>&6 | |
1131 | fi | |
1132 | test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } | |
1133 | ||
12e0afe5 ILT |
1134 | echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 |
1135 | echo "configure:1136: checking if the linker ($LD) is GNU ld" >&5 | |
b5db0960 ILT |
1136 | if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then |
1137 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1138 | else | |
1139 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
12e0afe5 | 1140 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then |
b5db0960 ILT |
1141 | ac_cv_prog_gnu_ld=yes |
1142 | else | |
1143 | ac_cv_prog_gnu_ld=no | |
1144 | fi | |
1145 | fi | |
1146 | ||
1147 | echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 | |
1148 | ||
1149 | ||
12e0afe5 ILT |
1150 | echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 |
1151 | echo "configure:1152: checking for BSD-compatible nm" >&5 | |
1152 | if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then | |
1153 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1154 | else | |
1155 | case "$NM" in | |
1156 | /*) | |
1157 | ac_cv_path_NM="$NM" # Let the user override the test with a path. | |
1158 | ;; | |
1159 | *) | |
1160 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1161 | for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do | |
1162 | test -z "$ac_dir" && dir=. | |
1163 | if test -f $ac_dir/nm; then | |
1164 | # Check to see if the nm accepts a BSD-compat flag. | |
1165 | # Adding the `sed 1!d' prevents false positives on HP-UX, which says: | |
1166 | # nm: unknown option "B" ignored | |
1167 | if ($ac_dir/nm -B /dev/null 2>&1 | sed '1!d'; exit 0) | egrep /dev/null >/dev/null; then | |
1168 | ac_cv_path_NM="$ac_dir/nm -B" | |
1169 | elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1!d'; exit 0) | egrep /dev/null >/dev/null; then | |
1170 | ac_cv_path_NM="$ac_dir/nm -p" | |
1171 | else | |
1172 | ac_cv_path_NM="$ac_dir/nm" | |
1173 | fi | |
1174 | break | |
1175 | fi | |
1176 | done | |
1177 | IFS="$ac_save_ifs" | |
1178 | test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm | |
1179 | ;; | |
1180 | esac | |
1181 | fi | |
1182 | ||
1183 | NM="$ac_cv_path_NM" | |
1184 | echo "$ac_t""$NM" 1>&6 | |
1185 | ||
1186 | ||
b5db0960 | 1187 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
12e0afe5 | 1188 | echo "configure:1189: checking whether ln -s works" >&5 |
b5db0960 ILT |
1189 | if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then |
1190 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1191 | else | |
1192 | rm -f conftestdata | |
1193 | if ln -s X conftestdata 2>/dev/null | |
1194 | then | |
1195 | rm -f conftestdata | |
1196 | ac_cv_prog_LN_S="ln -s" | |
1197 | else | |
1198 | ac_cv_prog_LN_S=ln | |
1199 | fi | |
1200 | fi | |
1201 | LN_S="$ac_cv_prog_LN_S" | |
1202 | if test "$ac_cv_prog_LN_S" = "ln -s"; then | |
1203 | echo "$ac_t""yes" 1>&6 | |
1204 | else | |
1205 | echo "$ac_t""no" 1>&6 | |
1206 | fi | |
1207 | ||
1208 | ||
1209 | ||
1210 | ||
1211 | ||
1212 | ||
1213 | ||
12e0afe5 | 1214 | |
b5db0960 | 1215 | # Always use our own libtool. |
12e0afe5 | 1216 | LIBTOOL='$(SHELL) $(top_builddir)/libtool' |
b5db0960 ILT |
1217 | |
1218 | ||
1219 | # Check whether --enable-shared or --disable-shared was given. | |
1220 | if test "${enable_shared+set}" = set; then | |
1221 | enableval="$enable_shared" | |
12e0afe5 ILT |
1222 | p=${PACKAGE-bogus-package-name} |
1223 | case "$enableval" in | |
1224 | yes) libtool_enable_shared=yes ;; | |
1225 | no) libtool_enable_shared=no ;; | |
1226 | # The value of $p (aka $PACKAGE) is assumed to come from AM_INIT_AUTOMAKE. | |
1227 | # If it didn't, it'll be `bogus-package-name', thus making this condition | |
1228 | # not be used. | |
1229 | *$p*) libtool_enable_shared=yes ;; | |
1230 | *) libtool_enable_shared=no ;; | |
1231 | esac | |
b5db0960 ILT |
1232 | fi |
1233 | ||
12e0afe5 | 1234 | test -n "$libtool_enable_shared" && enable_shared="$libtool_enable_shared" |
b5db0960 ILT |
1235 | libtool_shared= |
1236 | test "$enable_shared" = no && libtool_shared=" --disable-shared" | |
1237 | ||
1238 | # Check whether --enable-static or --disable-static was given. | |
1239 | if test "${enable_static+set}" = set; then | |
1240 | enableval="$enable_static" | |
1241 | if test "$enableval" = no; then | |
12e0afe5 | 1242 | libtool_enable_static=no |
b5db0960 | 1243 | else |
12e0afe5 | 1244 | libtool_enable_static=yes |
b5db0960 ILT |
1245 | fi |
1246 | fi | |
1247 | ||
12e0afe5 | 1248 | test -n "$libtool_enable_static" && enable_static="$libtool_enable_static" |
b5db0960 ILT |
1249 | libtool_static= |
1250 | test "$enable_static" = no && libtool_static=" --disable-static" | |
1251 | ||
1252 | libtool_flags="$libtool_shared$libtool_static" | |
1253 | test "$silent" = yes && libtool_flags="$libtool_flags --silent" | |
1254 | test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" | |
1255 | test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" | |
1256 | ||
1257 | # Some flags need to be propagated to the compiler or linker for good | |
1258 | # libtool support. | |
1259 | case "$host" in | |
1260 | *-*-irix6*) | |
1261 | ac_save_CFLAGS="$CFLAGS" | |
12e0afe5 ILT |
1262 | flag_passed=no |
1263 | for f in -32 -64 -n32 ABI -cckr -mips1 -mips2 -mips3 -mips4; do | |
1264 | case "$f" in | |
1265 | ABI) | |
1266 | test -n "$SGI_ABI" && flag_passed=yes | |
1267 | if test "$flag_passed" = no && test "$ac_cv_prog_gcc" = yes; then | |
1268 | # Choose the ABI flag according to GCC's specs. | |
1269 | if $CC -dumpspecs 2>&1 | sed '/^\*link:$/,/^$/!d' | egrep -e '[ ]-32' >/dev/null; then | |
1270 | LD="${LD-ld} -32" | |
1271 | else | |
1272 | LD="${LD-ld} -n32" | |
1273 | fi | |
1274 | fi | |
1275 | ;; | |
1276 | ||
1277 | *) | |
1278 | if echo " $CC $CFLAGS " | egrep -e "[ ]$f[ ]" > /dev/null; then | |
1279 | flag_passed=yes | |
1280 | LD="${LD-ld} $f" | |
1281 | fi | |
1282 | ;; | |
1283 | esac | |
b5db0960 ILT |
1284 | done |
1285 | CFLAGS="$ac_save_CFLAGS" | |
1286 | ;; | |
ef346f1a | 1287 | |
b5db0960 ILT |
1288 | *-*-sco3.2v5*) |
1289 | # On SCO OpenServer 5, we need -belf to get full-featured binaries. | |
1290 | CFLAGS="$CFLAGS -belf" | |
1291 | ;; | |
ef346f1a | 1292 | esac |
eb02fd64 | 1293 | |
b5db0960 ILT |
1294 | # Actually configure libtool. ac_aux_dir is where install-sh is found. |
1295 | CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ | |
12e0afe5 | 1296 | LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \ |
b5db0960 ILT |
1297 | ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \ |
1298 | $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \ | |
1299 | || { echo "configure: error: libtool configure failed" 1>&2; exit 1; } | |
ef346f1a | 1300 | |
ef346f1a | 1301 | |
b5db0960 ILT |
1302 | # Check whether --enable-targets or --disable-targets was given. |
1303 | if test "${enable_targets+set}" = set; then | |
1304 | enableval="$enable_targets" | |
1305 | case "${enableval}" in | |
1306 | yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; } | |
1307 | ;; | |
1308 | no) enable_targets= ;; | |
1309 | *) enable_targets=$enableval ;; | |
1310 | esac | |
1311 | fi | |
1312 | # Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given. | |
1313 | if test "${enable_64_bit_bfd+set}" = set; then | |
1314 | enableval="$enable_64_bit_bfd" | |
1315 | case "${enableval}" in | |
1316 | yes) want64=true ;; | |
1317 | no) want64=false ;; | |
1318 | *) { echo "configure: error: bad value ${enableval} for 64-bit-bfd option" 1>&2; exit 1; } ;; | |
ef346f1a | 1319 | esac |
b5db0960 ILT |
1320 | else |
1321 | want64=false | |
1322 | fi | |
1323 | ||
1324 | ||
eb02fd64 | 1325 | |
ef346f1a | 1326 | |
eb02fd64 | 1327 | |
ef346f1a ILT |
1328 | if test -z "$target" ; then |
1329 | { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; } | |
ec342d7d | 1330 | fi |
ef346f1a ILT |
1331 | if test -z "$host" ; then |
1332 | { echo "configure: error: Unrecognized host system type; please check config.sub." 1>&2; exit 1; } | |
1333 | fi | |
ef346f1a ILT |
1334 | |
1335 | # host-specific stuff: | |
1336 | ||
caf2a913 ILT |
1337 | # Extract the first word of "gcc", so it can be a program name with args. |
1338 | set dummy gcc; ac_word=$2 | |
1339 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
12e0afe5 | 1340 | echo "configure:1341: checking for $ac_word" >&5 |
caf2a913 ILT |
1341 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1342 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1343 | else | |
1344 | if test -n "$CC"; then | |
1345 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1346 | else | |
1347 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1348 | for ac_dir in $PATH; do | |
1349 | test -z "$ac_dir" && ac_dir=. | |
1350 | if test -f $ac_dir/$ac_word; then | |
1351 | ac_cv_prog_CC="gcc" | |
1352 | break | |
1353 | fi | |
1354 | done | |
1355 | IFS="$ac_save_ifs" | |
caf2a913 ILT |
1356 | fi |
1357 | fi | |
1358 | CC="$ac_cv_prog_CC" | |
1359 | if test -n "$CC"; then | |
1360 | echo "$ac_t""$CC" 1>&6 | |
1361 | else | |
1362 | echo "$ac_t""no" 1>&6 | |
1363 | fi | |
1364 | ||
b9a5c27f RS |
1365 | if test -z "$CC"; then |
1366 | # Extract the first word of "cc", so it can be a program name with args. | |
1367 | set dummy cc; ac_word=$2 | |
1368 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
12e0afe5 | 1369 | echo "configure:1370: checking for $ac_word" >&5 |
b9a5c27f RS |
1370 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1371 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1372 | else | |
1373 | if test -n "$CC"; then | |
1374 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1375 | else | |
1376 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1377 | ac_prog_rejected=no | |
1378 | for ac_dir in $PATH; do | |
1379 | test -z "$ac_dir" && ac_dir=. | |
1380 | if test -f $ac_dir/$ac_word; then | |
1381 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
1382 | ac_prog_rejected=yes | |
1383 | continue | |
1384 | fi | |
1385 | ac_cv_prog_CC="cc" | |
1386 | break | |
1387 | fi | |
1388 | done | |
1389 | IFS="$ac_save_ifs" | |
1390 | if test $ac_prog_rejected = yes; then | |
1391 | # We found a bogon in the path, so make sure we never use it. | |
1392 | set dummy $ac_cv_prog_CC | |
1393 | shift | |
1394 | if test $# -gt 0; then | |
1395 | # We chose a different compiler from the bogus one. | |
1396 | # However, it has the same basename, so the bogon will be chosen | |
1397 | # first if we set CC to just the basename; use the full file name. | |
1398 | shift | |
1399 | set dummy "$ac_dir/$ac_word" "$@" | |
1400 | shift | |
1401 | ac_cv_prog_CC="$@" | |
1402 | fi | |
1403 | fi | |
1404 | fi | |
1405 | fi | |
1406 | CC="$ac_cv_prog_CC" | |
1407 | if test -n "$CC"; then | |
1408 | echo "$ac_t""$CC" 1>&6 | |
1409 | else | |
1410 | echo "$ac_t""no" 1>&6 | |
1411 | fi | |
1412 | ||
1413 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
1414 | fi | |
1415 | ||
1416 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | |
12e0afe5 | 1417 | echo "configure:1418: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
b9a5c27f RS |
1418 | |
1419 | ac_ext=c | |
1420 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1421 | ac_cpp='$CPP $CPPFLAGS' | |
1422 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
1423 | ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
1424 | cross_compiling=$ac_cv_prog_cc_cross | |
1425 | ||
1426 | cat > conftest.$ac_ext <<EOF | |
12e0afe5 | 1427 | #line 1428 "configure" |
b9a5c27f RS |
1428 | #include "confdefs.h" |
1429 | main(){return(0);} | |
1430 | EOF | |
12e0afe5 | 1431 | if { (eval echo configure:1432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
b9a5c27f RS |
1432 | ac_cv_prog_cc_works=yes |
1433 | # If we can't run a trivial program, we are probably using a cross compiler. | |
1434 | if (./conftest; exit) 2>/dev/null; then | |
1435 | ac_cv_prog_cc_cross=no | |
1436 | else | |
1437 | ac_cv_prog_cc_cross=yes | |
1438 | fi | |
1439 | else | |
1440 | echo "configure: failed program was:" >&5 | |
1441 | cat conftest.$ac_ext >&5 | |
1442 | ac_cv_prog_cc_works=no | |
1443 | fi | |
1444 | rm -fr conftest* | |
1445 | ||
1446 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
1447 | if test $ac_cv_prog_cc_works = no; then | |
1448 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
1449 | fi | |
1450 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
12e0afe5 | 1451 | echo "configure:1452: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
b9a5c27f RS |
1452 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
1453 | cross_compiling=$ac_cv_prog_cc_cross | |
ef346f1a | 1454 | |
caf2a913 | 1455 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
12e0afe5 | 1456 | echo "configure:1457: checking whether we are using GNU C" >&5 |
caf2a913 ILT |
1457 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
1458 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1459 | else | |
1460 | cat > conftest.c <<EOF | |
ef346f1a ILT |
1461 | #ifdef __GNUC__ |
1462 | yes; | |
1463 | #endif | |
1464 | EOF | |
12e0afe5 | 1465 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1466: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
caf2a913 ILT |
1466 | ac_cv_prog_gcc=yes |
1467 | else | |
1468 | ac_cv_prog_gcc=no | |
1469 | fi | |
1470 | fi | |
1471 | ||
1472 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
b9a5c27f | 1473 | |
caf2a913 | 1474 | if test $ac_cv_prog_gcc = yes; then |
ef346f1a | 1475 | GCC=yes |
b9a5c27f RS |
1476 | ac_test_CFLAGS="${CFLAGS+set}" |
1477 | ac_save_CFLAGS="$CFLAGS" | |
1478 | CFLAGS= | |
1479 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
12e0afe5 | 1480 | echo "configure:1481: checking whether ${CC-cc} accepts -g" >&5 |
b9a5c27f | 1481 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
caf2a913 ILT |
1482 | echo $ac_n "(cached) $ac_c" 1>&6 |
1483 | else | |
1484 | echo 'void f(){}' > conftest.c | |
1485 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
b9a5c27f | 1486 | ac_cv_prog_cc_g=yes |
caf2a913 | 1487 | else |
b9a5c27f | 1488 | ac_cv_prog_cc_g=no |
caf2a913 ILT |
1489 | fi |
1490 | rm -f conftest* | |
1491 | ||
1492 | fi | |
1493 | ||
b9a5c27f RS |
1494 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 |
1495 | if test "$ac_test_CFLAGS" = set; then | |
1496 | CFLAGS="$ac_save_CFLAGS" | |
1497 | elif test $ac_cv_prog_cc_g = yes; then | |
1498 | CFLAGS="-g -O2" | |
1499 | else | |
1500 | CFLAGS="-O2" | |
ef346f1a ILT |
1501 | fi |
1502 | else | |
1503 | GCC= | |
1504 | test "${CFLAGS+set}" = set || CFLAGS="-g" | |
1505 | fi | |
ef346f1a | 1506 | |
b9a5c27f | 1507 | |
b5db0960 | 1508 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' |
b9a5c27f RS |
1509 | |
1510 | echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6 | |
12e0afe5 | 1511 | echo "configure:1512: checking for Cygwin32 environment" >&5 |
b9a5c27f RS |
1512 | if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then |
1513 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1514 | else | |
1515 | cat > conftest.$ac_ext <<EOF | |
12e0afe5 | 1516 | #line 1517 "configure" |
b9a5c27f RS |
1517 | #include "confdefs.h" |
1518 | ||
1519 | int main() { | |
12e0afe5 | 1520 | return __CYGWIN32__; |
b9a5c27f RS |
1521 | ; return 0; } |
1522 | EOF | |
12e0afe5 | 1523 | if { (eval echo configure:1524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b9a5c27f RS |
1524 | rm -rf conftest* |
1525 | am_cv_cygwin32=yes | |
1526 | else | |
1527 | echo "configure: failed program was:" >&5 | |
1528 | cat conftest.$ac_ext >&5 | |
1529 | rm -rf conftest* | |
1530 | am_cv_cygwin32=no | |
1531 | fi | |
1532 | rm -f conftest* | |
1533 | rm -f conftest* | |
1534 | fi | |
1535 | ||
1536 | echo "$ac_t""$am_cv_cygwin32" 1>&6 | |
1537 | CYGWIN32= | |
1538 | test "$am_cv_cygwin32" = yes && CYGWIN32=yes | |
12e0afe5 ILT |
1539 | echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6 |
1540 | echo "configure:1541: checking for Mingw32 environment" >&5 | |
1541 | if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then | |
1542 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1543 | else | |
1544 | cat > conftest.$ac_ext <<EOF | |
1545 | #line 1546 "configure" | |
1546 | #include "confdefs.h" | |
1547 | ||
1548 | int main() { | |
1549 | return __MINGW32__; | |
1550 | ; return 0; } | |
1551 | EOF | |
1552 | if { (eval echo configure:1553: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then | |
1553 | rm -rf conftest* | |
1554 | am_cv_mingw32=yes | |
1555 | else | |
1556 | echo "configure: failed program was:" >&5 | |
1557 | cat conftest.$ac_ext >&5 | |
1558 | rm -rf conftest* | |
1559 | am_cv_mingw32=no | |
1560 | fi | |
1561 | rm -f conftest* | |
1562 | rm -f conftest* | |
1563 | fi | |
1564 | ||
1565 | echo "$ac_t""$am_cv_mingw32" 1>&6 | |
1566 | MINGW32= | |
1567 | test "$am_cv_mingw32" = yes && MINGW32=yes | |
1568 | ||
b5db0960 | 1569 | |
b9a5c27f | 1570 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 |
12e0afe5 | 1571 | echo "configure:1572: checking for executable suffix" >&5 |
b9a5c27f RS |
1572 | if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then |
1573 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1574 | else | |
12e0afe5 ILT |
1575 | |
1576 | if test "$CYGWIN32" = yes -o "$MINGW32" = yes; then | |
b9a5c27f RS |
1577 | am_cv_exeext=.exe |
1578 | else | |
1579 | cat > am_c_test.c << 'EOF' | |
1580 | int main() { | |
1581 | /* Nothing needed here */ | |
1582 | } | |
1583 | EOF | |
1584 | ${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5 | |
b5db0960 | 1585 | am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//` |
b9a5c27f RS |
1586 | rm -f am_c_test* |
1587 | fi | |
1588 | ||
1589 | test x"${am_cv_exeext}" = x && am_cv_exeext=no | |
1590 | fi | |
1591 | EXEEXT="" | |
1592 | test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext} | |
1593 | echo "$ac_t""${am_cv_exeext}" 1>&6 | |
1594 | ||
ec342d7d | 1595 | |
b5db0960 ILT |
1596 | for ac_prog in 'bison -y' byacc |
1597 | do | |
1598 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
1599 | set dummy $ac_prog; ac_word=$2 | |
1600 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
12e0afe5 | 1601 | echo "configure:1602: checking for $ac_word" >&5 |
b5db0960 ILT |
1602 | if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then |
1603 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1604 | else | |
1605 | if test -n "$YACC"; then | |
1606 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
1607 | else | |
1608 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1609 | for ac_dir in $PATH; do | |
1610 | test -z "$ac_dir" && ac_dir=. | |
1611 | if test -f $ac_dir/$ac_word; then | |
1612 | ac_cv_prog_YACC="$ac_prog" | |
1613 | break | |
1614 | fi | |
1615 | done | |
1616 | IFS="$ac_save_ifs" | |
1617 | fi | |
1618 | fi | |
1619 | YACC="$ac_cv_prog_YACC" | |
1620 | if test -n "$YACC"; then | |
1621 | echo "$ac_t""$YACC" 1>&6 | |
1622 | else | |
1623 | echo "$ac_t""no" 1>&6 | |
1624 | fi | |
6c18e393 | 1625 | |
b5db0960 ILT |
1626 | test -n "$YACC" && break |
1627 | done | |
1628 | test -n "$YACC" || YACC="yacc" | |
3d6f0983 | 1629 | |
b5db0960 ILT |
1630 | # Extract the first word of "flex", so it can be a program name with args. |
1631 | set dummy flex; ac_word=$2 | |
1632 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
12e0afe5 | 1633 | echo "configure:1634: checking for $ac_word" >&5 |
b5db0960 ILT |
1634 | if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then |
1635 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1636 | else | |
1637 | if test -n "$LEX"; then | |
1638 | ac_cv_prog_LEX="$LEX" # Let the user override the test. | |
1639 | else | |
1640 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1641 | for ac_dir in $PATH; do | |
1642 | test -z "$ac_dir" && ac_dir=. | |
1643 | if test -f $ac_dir/$ac_word; then | |
1644 | ac_cv_prog_LEX="flex" | |
1645 | break | |
1646 | fi | |
1647 | done | |
1648 | IFS="$ac_save_ifs" | |
1649 | test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex" | |
1650 | fi | |
1651 | fi | |
1652 | LEX="$ac_cv_prog_LEX" | |
1653 | if test -n "$LEX"; then | |
1654 | echo "$ac_t""$LEX" 1>&6 | |
1655 | else | |
1656 | echo "$ac_t""no" 1>&6 | |
1657 | fi | |
ef346f1a | 1658 | |
b5db0960 ILT |
1659 | if test -z "$LEXLIB" |
1660 | then | |
1661 | case "$LEX" in | |
1662 | flex*) ac_lib=fl ;; | |
1663 | *) ac_lib=l ;; | |
1664 | esac | |
1665 | echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 | |
12e0afe5 | 1666 | echo "configure:1667: checking for yywrap in -l$ac_lib" >&5 |
b5db0960 ILT |
1667 | ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` |
1668 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
1669 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1670 | else | |
1671 | ac_save_LIBS="$LIBS" | |
1672 | LIBS="-l$ac_lib $LIBS" | |
1673 | cat > conftest.$ac_ext <<EOF | |
12e0afe5 | 1674 | #line 1675 "configure" |
b5db0960 ILT |
1675 | #include "confdefs.h" |
1676 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1677 | /* We use char because int might match the return type of a gcc2 | |
1678 | builtin and then its argument prototype would still apply. */ | |
1679 | char yywrap(); | |
2e598345 | 1680 | |
b5db0960 ILT |
1681 | int main() { |
1682 | yywrap() | |
1683 | ; return 0; } | |
1684 | EOF | |
12e0afe5 | 1685 | if { (eval echo configure:1686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
b5db0960 ILT |
1686 | rm -rf conftest* |
1687 | eval "ac_cv_lib_$ac_lib_var=yes" | |
1688 | else | |
1689 | echo "configure: failed program was:" >&5 | |
1690 | cat conftest.$ac_ext >&5 | |
1691 | rm -rf conftest* | |
1692 | eval "ac_cv_lib_$ac_lib_var=no" | |
1693 | fi | |
1694 | rm -f conftest* | |
1695 | LIBS="$ac_save_LIBS" | |
ad43e45b | 1696 | |
b5db0960 ILT |
1697 | fi |
1698 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
1699 | echo "$ac_t""yes" 1>&6 | |
1700 | LEXLIB="-l$ac_lib" | |
1701 | else | |
1702 | echo "$ac_t""no" 1>&6 | |
1703 | fi | |
2e598345 | 1704 | |
b5db0960 | 1705 | fi |
2e598345 | 1706 | |
ef346f1a | 1707 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
12e0afe5 | 1708 | echo "configure:1709: checking how to run the C preprocessor" >&5 |
ef346f1a ILT |
1709 | # On Suns, sometimes $CPP names a directory. |
1710 | if test -n "$CPP" && test -d "$CPP"; then | |
1711 | CPP= | |
1712 | fi | |
1713 | if test -z "$CPP"; then | |
1714 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
1715 | echo $ac_n "(cached) $ac_c" 1>&6 | |
c0b47bae | 1716 | else |
ef346f1a ILT |
1717 | # This must be in double quotes, not single quotes, because CPP may get |
1718 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
1719 | CPP="${CC-cc} -E" | |
1720 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
1721 | # not just through cpp. | |
1722 | cat > conftest.$ac_ext <<EOF | |
12e0afe5 | 1723 | #line 1724 "configure" |
ef346f1a ILT |
1724 | #include "confdefs.h" |
1725 | #include <assert.h> | |
1726 | Syntax Error | |
1727 | EOF | |
b9a5c27f | 1728 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
12e0afe5 | 1729 | { (eval echo configure:1730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
ef346f1a ILT |
1730 | ac_err=`grep -v '^ *+' conftest.out` |
1731 | if test -z "$ac_err"; then | |
1732 | : | |
1733 | else | |
1734 | echo "$ac_err" >&5 | |
b9a5c27f RS |
1735 | echo "configure: failed program was:" >&5 |
1736 | cat conftest.$ac_ext >&5 | |
ef346f1a ILT |
1737 | rm -rf conftest* |
1738 | CPP="${CC-cc} -E -traditional-cpp" | |
1739 | cat > conftest.$ac_ext <<EOF | |
12e0afe5 | 1740 | #line 1741 "configure" |
ef346f1a ILT |
1741 | #include "confdefs.h" |
1742 | #include <assert.h> | |
1743 | Syntax Error | |
1744 | EOF | |
b9a5c27f | 1745 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
12e0afe5 | 1746 | { (eval echo configure:1747: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
ef346f1a ILT |
1747 | ac_err=`grep -v '^ *+' conftest.out` |
1748 | if test -z "$ac_err"; then | |
1749 | : | |
1750 | else | |
1751 | echo "$ac_err" >&5 | |
b9a5c27f RS |
1752 | echo "configure: failed program was:" >&5 |
1753 | cat conftest.$ac_ext >&5 | |
ef346f1a ILT |
1754 | rm -rf conftest* |
1755 | CPP=/lib/cpp | |
1756 | fi | |
1757 | rm -f conftest* | |
1758 | fi | |
1759 | rm -f conftest* | |
1760 | ac_cv_prog_CPP="$CPP" | |
c0b47bae | 1761 | fi |
ef346f1a ILT |
1762 | CPP="$ac_cv_prog_CPP" |
1763 | else | |
1764 | ac_cv_prog_CPP="$CPP" | |
1765 | fi | |
1766 | echo "$ac_t""$CPP" 1>&6 | |
c0b47bae | 1767 | |
b5db0960 | 1768 | echo $ac_n "checking lex output file root""... $ac_c" 1>&6 |
12e0afe5 | 1769 | echo "configure:1770: checking lex output file root" >&5 |
b5db0960 ILT |
1770 | if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then |
1771 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1772 | else | |
1773 | # The minimal lex program is just a single line: %%. But some broken lexes | |
1774 | # (Solaris, I think it was) want two %% lines, so accommodate them. | |
1775 | echo '%% | |
1776 | %%' | $LEX | |
1777 | if test -f lex.yy.c; then | |
1778 | ac_cv_prog_lex_root=lex.yy | |
1779 | elif test -f lexyy.c; then | |
1780 | ac_cv_prog_lex_root=lexyy | |
1781 | else | |
1782 | { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; } | |
1783 | fi | |
1784 | fi | |
1785 | ||
1786 | echo "$ac_t""$ac_cv_prog_lex_root" 1>&6 | |
1787 | LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root | |
1788 | ||
1789 | echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6 | |
12e0afe5 | 1790 | echo "configure:1791: checking whether yytext is a pointer" >&5 |
b5db0960 ILT |
1791 | if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then |
1792 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1793 | else | |
1794 | # POSIX says lex can declare yytext either as a pointer or an array; the | |
1795 | # default is implementation-dependent. Figure out which it is, since | |
1796 | # not all implementations provide the %pointer and %array declarations. | |
1797 | ac_cv_prog_lex_yytext_pointer=no | |
1798 | echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c | |
1799 | ac_save_LIBS="$LIBS" | |
1800 | LIBS="$LIBS $LEXLIB" | |
1801 | cat > conftest.$ac_ext <<EOF | |
12e0afe5 | 1802 | #line 1803 "configure" |
b5db0960 ILT |
1803 | #include "confdefs.h" |
1804 | `cat $LEX_OUTPUT_ROOT.c` | |
1805 | int main() { | |
1806 | ||
1807 | ; return 0; } | |
1808 | EOF | |
12e0afe5 | 1809 | if { (eval echo configure:1810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
b5db0960 ILT |
1810 | rm -rf conftest* |
1811 | ac_cv_prog_lex_yytext_pointer=yes | |
1812 | else | |
1813 | echo "configure: failed program was:" >&5 | |
1814 | cat conftest.$ac_ext >&5 | |
1815 | fi | |
1816 | rm -f conftest* | |
1817 | LIBS="$ac_save_LIBS" | |
1818 | rm -f "${LEX_OUTPUT_ROOT}.c" | |
1819 | ||
1820 | fi | |
1821 | ||
1822 | echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6 | |
1823 | if test $ac_cv_prog_lex_yytext_pointer = yes; then | |
1824 | cat >> confdefs.h <<\EOF | |
1825 | #define YYTEXT_POINTER 1 | |
1826 | EOF | |
1827 | ||
1828 | fi | |
1829 | ||
1830 | ||
1831 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 | |
12e0afe5 | 1832 | echo "configure:1833: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
b5db0960 ILT |
1833 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
1834 | if test "${enable_maintainer_mode+set}" = set; then | |
1835 | enableval="$enable_maintainer_mode" | |
1836 | USE_MAINTAINER_MODE=$enableval | |
1837 | else | |
1838 | USE_MAINTAINER_MODE=no | |
1839 | fi | |
1840 | ||
1841 | echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 | |
1842 | if test $USE_MAINTAINER_MODE = yes; then | |
1843 | MAINT= | |
1844 | else | |
1845 | MAINT='#M#' | |
1846 | fi | |
1847 | ||
1848 | ||
1849 | ||
1850 | . ${srcdir}/configure.host | |
1851 | ||
1852 | ||
1853 | ||
1854 | ||
1855 | ||
1856 | ||
ef346f1a ILT |
1857 | for ac_hdr in string.h strings.h stdlib.h unistd.h |
1858 | do | |
b9a5c27f | 1859 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
ef346f1a | 1860 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
12e0afe5 | 1861 | echo "configure:1862: checking for $ac_hdr" >&5 |
ef346f1a ILT |
1862 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1863 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1864 | else | |
1865 | cat > conftest.$ac_ext <<EOF | |
12e0afe5 | 1866 | #line 1867 "configure" |
ef346f1a ILT |
1867 | #include "confdefs.h" |
1868 | #include <$ac_hdr> | |
1869 | EOF | |
b9a5c27f | 1870 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
12e0afe5 | 1871 | { (eval echo configure:1872: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
ef346f1a ILT |
1872 | ac_err=`grep -v '^ *+' conftest.out` |
1873 | if test -z "$ac_err"; then | |
1874 | rm -rf conftest* | |
1875 | eval "ac_cv_header_$ac_safe=yes" | |
1876 | else | |
1877 | echo "$ac_err" >&5 | |
b9a5c27f RS |
1878 | echo "configure: failed program was:" >&5 |
1879 | cat conftest.$ac_ext >&5 | |
ef346f1a ILT |
1880 | rm -rf conftest* |
1881 | eval "ac_cv_header_$ac_safe=no" | |
1882 | fi | |
1883 | rm -f conftest* | |
1884 | fi | |
1885 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1886 | echo "$ac_t""yes" 1>&6 | |
b9a5c27f | 1887 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
ef346f1a ILT |
1888 | cat >> confdefs.h <<EOF |
1889 | #define $ac_tr_hdr 1 | |
1890 | EOF | |
1891 | ||
1892 | else | |
1893 | echo "$ac_t""no" 1>&6 | |
c0b47bae | 1894 | fi |
ef346f1a | 1895 | done |
8c32cf6e | 1896 | |
ef346f1a ILT |
1897 | for ac_func in sbrk |
1898 | do | |
1899 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
12e0afe5 | 1900 | echo "configure:1901: checking for $ac_func" >&5 |
ef346f1a ILT |
1901 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1902 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1903 | else | |
1904 | cat > conftest.$ac_ext <<EOF | |
12e0afe5 | 1905 | #line 1906 "configure" |
ef346f1a ILT |
1906 | #include "confdefs.h" |
1907 | /* System header to define __stub macros and hopefully few prototypes, | |
1908 | which can conflict with char $ac_func(); below. */ | |
1909 | #include <assert.h> | |
1910 | /* Override any gcc2 internal prototype to avoid an error. */ | |
b9a5c27f RS |
1911 | /* We use char because int might match the return type of a gcc2 |
1912 | builtin and then its argument prototype would still apply. */ | |
caf2a913 | 1913 | char $ac_func(); |
ef346f1a | 1914 | |
b9a5c27f | 1915 | int main() { |
ef346f1a ILT |
1916 | |
1917 | /* The GNU C library defines this for functions which it implements | |
1918 | to always fail with ENOSYS. Some functions are actually named | |
1919 | something starting with __ and the normal name is an alias. */ | |
1920 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
1921 | choke me | |
1922 | #else | |
1923 | $ac_func(); | |
1924 | #endif | |
1925 | ||
1926 | ; return 0; } | |
1927 | EOF | |
12e0afe5 | 1928 | if { (eval echo configure:1929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
ef346f1a ILT |
1929 | rm -rf conftest* |
1930 | eval "ac_cv_func_$ac_func=yes" | |
1931 | else | |
b9a5c27f RS |
1932 | echo "configure: failed program was:" >&5 |
1933 | cat conftest.$ac_ext >&5 | |
ef346f1a ILT |
1934 | rm -rf conftest* |
1935 | eval "ac_cv_func_$ac_func=no" | |
1936 | fi | |
1937 | rm -f conftest* | |
ef346f1a | 1938 | fi |
b9a5c27f | 1939 | |
ef346f1a ILT |
1940 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
1941 | echo "$ac_t""yes" 1>&6 | |
caf2a913 | 1942 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
ef346f1a ILT |
1943 | cat >> confdefs.h <<EOF |
1944 | #define $ac_tr_func 1 | |
1945 | EOF | |
1946 | ||
1947 | else | |
1948 | echo "$ac_t""no" 1>&6 | |
1949 | fi | |
1950 | done | |
c0b47bae | 1951 | |
caf2a913 ILT |
1952 | ac_header_dirent=no |
1953 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h | |
1954 | do | |
b9a5c27f | 1955 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
caf2a913 | 1956 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 |
12e0afe5 | 1957 | echo "configure:1958: checking for $ac_hdr that defines DIR" >&5 |
caf2a913 ILT |
1958 | if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then |
1959 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1960 | else | |
1961 | cat > conftest.$ac_ext <<EOF | |
12e0afe5 | 1962 | #line 1963 "configure" |
caf2a913 ILT |
1963 | #include "confdefs.h" |
1964 | #include <sys/types.h> | |
1965 | #include <$ac_hdr> | |
b9a5c27f | 1966 | int main() { |
caf2a913 ILT |
1967 | DIR *dirp = 0; |
1968 | ; return 0; } | |
1969 | EOF | |
12e0afe5 | 1970 | if { (eval echo configure:1971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
caf2a913 ILT |
1971 | rm -rf conftest* |
1972 | eval "ac_cv_header_dirent_$ac_safe=yes" | |
1973 | else | |
b9a5c27f RS |
1974 | echo "configure: failed program was:" >&5 |
1975 | cat conftest.$ac_ext >&5 | |
caf2a913 ILT |
1976 | rm -rf conftest* |
1977 | eval "ac_cv_header_dirent_$ac_safe=no" | |
1978 | fi | |
1979 | rm -f conftest* | |
caf2a913 ILT |
1980 | fi |
1981 | if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then | |
1982 | echo "$ac_t""yes" 1>&6 | |
b9a5c27f | 1983 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
caf2a913 ILT |
1984 | cat >> confdefs.h <<EOF |
1985 | #define $ac_tr_hdr 1 | |
1986 | EOF | |
1987 | ac_header_dirent=$ac_hdr; break | |
1988 | else | |
1989 | echo "$ac_t""no" 1>&6 | |
1990 | fi | |
1991 | done | |
1992 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. | |
1993 | if test $ac_header_dirent = dirent.h; then | |
b9a5c27f | 1994 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 |
12e0afe5 | 1995 | echo "configure:1996: checking for opendir in -ldir" >&5 |
b9a5c27f | 1996 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` |
caf2a913 ILT |
1997 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
1998 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1999 | else | |
2000 | ac_save_LIBS="$LIBS" | |
2001 | LIBS="-ldir $LIBS" | |
2002 | cat > conftest.$ac_ext <<EOF | |
12e0afe5 | 2003 | #line 2004 "configure" |
caf2a913 | 2004 | #include "confdefs.h" |
b9a5c27f RS |
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 opendir(); | |
caf2a913 | 2009 | |
b9a5c27f | 2010 | int main() { |
caf2a913 ILT |
2011 | opendir() |
2012 | ; return 0; } | |
2013 | EOF | |
12e0afe5 | 2014 | if { (eval echo configure:2015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
caf2a913 ILT |
2015 | rm -rf conftest* |
2016 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2017 | else | |
b9a5c27f RS |
2018 | echo "configure: failed program was:" >&5 |
2019 | cat conftest.$ac_ext >&5 | |
caf2a913 ILT |
2020 | rm -rf conftest* |
2021 | eval "ac_cv_lib_$ac_lib_var=no" | |
2022 | fi | |
2023 | rm -f conftest* | |
2024 | LIBS="$ac_save_LIBS" | |
2025 | ||
2026 | fi | |
2027 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2028 | echo "$ac_t""yes" 1>&6 | |
2029 | LIBS="$LIBS -ldir" | |
2030 | else | |
2031 | echo "$ac_t""no" 1>&6 | |
2032 | fi | |
2033 | ||
2034 | else | |
b9a5c27f | 2035 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 |
12e0afe5 | 2036 | echo "configure:2037: checking for opendir in -lx" >&5 |
b9a5c27f | 2037 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` |
caf2a913 ILT |
2038 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
2039 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2040 | else | |
2041 | ac_save_LIBS="$LIBS" | |
2042 | LIBS="-lx $LIBS" | |
2043 | cat > conftest.$ac_ext <<EOF | |
12e0afe5 | 2044 | #line 2045 "configure" |
caf2a913 | 2045 | #include "confdefs.h" |
b9a5c27f RS |
2046 | /* Override any gcc2 internal prototype to avoid an error. */ |
2047 | /* We use char because int might match the return type of a gcc2 | |
2048 | builtin and then its argument prototype would still apply. */ | |
2049 | char opendir(); | |
caf2a913 | 2050 | |
b9a5c27f | 2051 | int main() { |
caf2a913 ILT |
2052 | opendir() |
2053 | ; return 0; } | |
2054 | EOF | |
12e0afe5 | 2055 | if { (eval echo configure:2056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
caf2a913 ILT |
2056 | rm -rf conftest* |
2057 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2058 | else | |
b9a5c27f RS |
2059 | echo "configure: failed program was:" >&5 |
2060 | cat conftest.$ac_ext >&5 | |
caf2a913 ILT |
2061 | rm -rf conftest* |
2062 | eval "ac_cv_lib_$ac_lib_var=no" | |
2063 | fi | |
2064 | rm -f conftest* | |
2065 | LIBS="$ac_save_LIBS" | |
2066 | ||
2067 | fi | |
2068 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2069 | echo "$ac_t""yes" 1>&6 | |
2070 | LIBS="$LIBS -lx" | |
2071 | else | |
2072 | echo "$ac_t""no" 1>&6 | |
2073 | fi | |
2074 | ||
2075 | fi | |
2076 | ||
2077 | ||
c0b47bae | 2078 | |
ef346f1a | 2079 | case "${host}" in |
12e0afe5 | 2080 | i[345]86-*-msdos* | i[345]86-*-go32* | i[345]86-*-mingw32* | *-*-cygwin32* | *-*-windows) |
ef346f1a ILT |
2081 | cat >> confdefs.h <<\EOF |
2082 | #define USE_BINARY_FOPEN 1 | |
2083 | EOF | |
2084 | ;; | |
2085 | esac | |
6c18e393 | 2086 | |
b9a5c27f | 2087 | echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 |
12e0afe5 | 2088 | echo "configure:2089: checking whether strstr must be declared" >&5 |
b9a5c27f RS |
2089 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then |
2090 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2091 | else | |
2092 | cat > conftest.$ac_ext <<EOF | |
12e0afe5 | 2093 | #line 2094 "configure" |
b9a5c27f RS |
2094 | #include "confdefs.h" |
2095 | ||
2096 | #include <stdio.h> | |
2097 | #ifdef HAVE_STRING_H | |
2098 | #include <string.h> | |
2099 | #else | |
2100 | #ifdef HAVE_STRINGS_H | |
2101 | #include <strings.h> | |
2102 | #endif | |
2103 | #endif | |
2104 | #ifdef HAVE_STDLIB_H | |
2105 | #include <stdlib.h> | |
2106 | #endif | |
2107 | #ifdef HAVE_UNISTD_H | |
2108 | #include <unistd.h> | |
2109 | #endif | |
2110 | int main() { | |
2111 | char *(*pfn) = (char *(*)) strstr | |
2112 | ; return 0; } | |
2113 | EOF | |
12e0afe5 | 2114 | if { (eval echo configure:2115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b9a5c27f RS |
2115 | rm -rf conftest* |
2116 | bfd_cv_decl_needed_strstr=no | |
2117 | else | |
2118 | echo "configure: failed program was:" >&5 | |
2119 | cat conftest.$ac_ext >&5 | |
2120 | rm -rf conftest* | |
2121 | bfd_cv_decl_needed_strstr=yes | |
2122 | fi | |
2123 | rm -f conftest* | |
2124 | fi | |
2125 | ||
2126 | echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6 | |
2127 | if test $bfd_cv_decl_needed_strstr = yes; then | |
2128 | bfd_tr_decl=NEED_DECLARATION_`echo strstr | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2129 | cat >> confdefs.h <<EOF | |
2130 | #define $bfd_tr_decl 1 | |
2131 | EOF | |
2132 | ||
2133 | fi | |
2134 | ||
caf2a913 | 2135 | echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 |
12e0afe5 | 2136 | echo "configure:2137: checking whether free must be declared" >&5 |
caf2a913 ILT |
2137 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then |
2138 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2139 | else | |
2140 | cat > conftest.$ac_ext <<EOF | |
12e0afe5 | 2141 | #line 2142 "configure" |
caf2a913 ILT |
2142 | #include "confdefs.h" |
2143 | ||
2144 | #include <stdio.h> | |
b9a5c27f RS |
2145 | #ifdef HAVE_STRING_H |
2146 | #include <string.h> | |
2147 | #else | |
2148 | #ifdef HAVE_STRINGS_H | |
2149 | #include <strings.h> | |
2150 | #endif | |
2151 | #endif | |
caf2a913 ILT |
2152 | #ifdef HAVE_STDLIB_H |
2153 | #include <stdlib.h> | |
2154 | #endif | |
2155 | #ifdef HAVE_UNISTD_H | |
2156 | #include <unistd.h> | |
2157 | #endif | |
b9a5c27f | 2158 | int main() { |
caf2a913 ILT |
2159 | char *(*pfn) = (char *(*)) free |
2160 | ; return 0; } | |
2161 | EOF | |
12e0afe5 | 2162 | if { (eval echo configure:2163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
caf2a913 ILT |
2163 | rm -rf conftest* |
2164 | bfd_cv_decl_needed_free=no | |
2165 | else | |
b9a5c27f RS |
2166 | echo "configure: failed program was:" >&5 |
2167 | cat conftest.$ac_ext >&5 | |
caf2a913 ILT |
2168 | rm -rf conftest* |
2169 | bfd_cv_decl_needed_free=yes | |
2170 | fi | |
2171 | rm -f conftest* | |
caf2a913 ILT |
2172 | fi |
2173 | ||
2174 | echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 | |
2175 | if test $bfd_cv_decl_needed_free = yes; then | |
2176 | bfd_tr_decl=NEED_DECLARATION_`echo free | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2177 | cat >> confdefs.h <<EOF | |
2178 | #define $bfd_tr_decl 1 | |
2179 | EOF | |
2180 | ||
2181 | fi | |
2182 | ||
b9a5c27f | 2183 | echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6 |
12e0afe5 | 2184 | echo "configure:2185: checking whether sbrk must be declared" >&5 |
b9a5c27f RS |
2185 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_sbrk'+set}'`\" = set"; then |
2186 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2187 | else | |
2188 | cat > conftest.$ac_ext <<EOF | |
12e0afe5 | 2189 | #line 2190 "configure" |
b9a5c27f RS |
2190 | #include "confdefs.h" |
2191 | ||
2192 | #include <stdio.h> | |
2193 | #ifdef HAVE_STRING_H | |
2194 | #include <string.h> | |
2195 | #else | |
2196 | #ifdef HAVE_STRINGS_H | |
2197 | #include <strings.h> | |
2198 | #endif | |
2199 | #endif | |
2200 | #ifdef HAVE_STDLIB_H | |
2201 | #include <stdlib.h> | |
2202 | #endif | |
2203 | #ifdef HAVE_UNISTD_H | |
2204 | #include <unistd.h> | |
2205 | #endif | |
2206 | int main() { | |
2207 | char *(*pfn) = (char *(*)) sbrk | |
2208 | ; return 0; } | |
2209 | EOF | |
12e0afe5 | 2210 | if { (eval echo configure:2211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b9a5c27f RS |
2211 | rm -rf conftest* |
2212 | bfd_cv_decl_needed_sbrk=no | |
2213 | else | |
2214 | echo "configure: failed program was:" >&5 | |
2215 | cat conftest.$ac_ext >&5 | |
2216 | rm -rf conftest* | |
2217 | bfd_cv_decl_needed_sbrk=yes | |
2218 | fi | |
2219 | rm -f conftest* | |
2220 | fi | |
2221 | ||
2222 | echo "$ac_t""$bfd_cv_decl_needed_sbrk" 1>&6 | |
2223 | if test $bfd_cv_decl_needed_sbrk = yes; then | |
2224 | bfd_tr_decl=NEED_DECLARATION_`echo sbrk | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2225 | cat >> confdefs.h <<EOF | |
2226 | #define $bfd_tr_decl 1 | |
2227 | EOF | |
2228 | ||
2229 | fi | |
2230 | ||
2231 | echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6 | |
12e0afe5 | 2232 | echo "configure:2233: checking whether getenv must be declared" >&5 |
b9a5c27f RS |
2233 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then |
2234 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2235 | else | |
2236 | cat > conftest.$ac_ext <<EOF | |
12e0afe5 | 2237 | #line 2238 "configure" |
b9a5c27f RS |
2238 | #include "confdefs.h" |
2239 | ||
2240 | #include <stdio.h> | |
2241 | #ifdef HAVE_STRING_H | |
2242 | #include <string.h> | |
2243 | #else | |
2244 | #ifdef HAVE_STRINGS_H | |
2245 | #include <strings.h> | |
2246 | #endif | |
2247 | #endif | |
2248 | #ifdef HAVE_STDLIB_H | |
2249 | #include <stdlib.h> | |
2250 | #endif | |
2251 | #ifdef HAVE_UNISTD_H | |
2252 | #include <unistd.h> | |
2253 | #endif | |
2254 | int main() { | |
2255 | char *(*pfn) = (char *(*)) getenv | |
2256 | ; return 0; } | |
2257 | EOF | |
12e0afe5 | 2258 | if { (eval echo configure:2259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b9a5c27f RS |
2259 | rm -rf conftest* |
2260 | bfd_cv_decl_needed_getenv=no | |
2261 | else | |
2262 | echo "configure: failed program was:" >&5 | |
2263 | cat conftest.$ac_ext >&5 | |
2264 | rm -rf conftest* | |
2265 | bfd_cv_decl_needed_getenv=yes | |
2266 | fi | |
2267 | rm -f conftest* | |
2268 | fi | |
2269 | ||
2270 | echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6 | |
2271 | if test $bfd_cv_decl_needed_getenv = yes; then | |
2272 | bfd_tr_decl=NEED_DECLARATION_`echo getenv | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2273 | cat >> confdefs.h <<EOF | |
2274 | #define $bfd_tr_decl 1 | |
2275 | EOF | |
2276 | ||
2277 | fi | |
2278 | ||
caf2a913 | 2279 | |
ef346f1a | 2280 | # target-specific stuff: |
3d6f0983 | 2281 | |
95d31c3c | 2282 | all_targets= |
ef346f1a ILT |
2283 | EMUL= |
2284 | all_emuls= | |
95d31c3c | 2285 | TDIRS= |
ef346f1a | 2286 | |
95d31c3c | 2287 | for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` |
ef346f1a | 2288 | do |
95d31c3c ILT |
2289 | if test "$targ_alias" = "all"; then |
2290 | all_targets=true | |
2291 | else | |
2292 | # Canonicalize the secondary target names. | |
b9a5c27f | 2293 | result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ_alias 2>/dev/null` |
95d31c3c ILT |
2294 | if test -n "$result"; then |
2295 | targ=$result | |
ef346f1a | 2296 | else |
95d31c3c | 2297 | targ=$targ_alias |
ef346f1a | 2298 | fi |
2ee11735 | 2299 | |
95d31c3c | 2300 | . ${srcdir}/configure.tgt |
ef346f1a | 2301 | |
95d31c3c ILT |
2302 | if test "$targ" = "$target"; then |
2303 | EMUL=$targ_emul | |
2304 | fi | |
ef346f1a | 2305 | |
95d31c3c ILT |
2306 | for i in $targ_emul $targ_extra_emuls; do |
2307 | case " $all_emuls " in | |
2308 | *" e${i}.o "*) ;; | |
2309 | *) | |
2310 | all_emuls="$all_emuls e${i}.o" | |
2311 | eval result=\$tdir_$i | |
2312 | test -z "$result" && result=$targ_alias | |
2313 | TDIRS="$TDIRS\\ | |
2314 | tdir_$i=$result" | |
2315 | ;; | |
ef346f1a ILT |
2316 | esac |
2317 | done | |
95d31c3c ILT |
2318 | fi |
2319 | done | |
ef346f1a | 2320 | |
ef346f1a | 2321 | |
ef346f1a ILT |
2322 | |
2323 | ||
95d31c3c | 2324 | if test x${all_targets} = xtrue; then |
b9a5c27f RS |
2325 | if test x${want64} = xtrue; then |
2326 | EMULATION_OFILES='$(ALL_EMULATIONS) $(ALL_64_EMULATIONS)' | |
2327 | else | |
2328 | EMULATION_OFILES='$(ALL_EMULATIONS)' | |
2329 | fi | |
95d31c3c ILT |
2330 | else |
2331 | EMULATION_OFILES=$all_emuls | |
2332 | fi | |
2333 | ||
ef346f1a ILT |
2334 | |
2335 | trap '' 1 2 15 | |
2336 | cat > confcache <<\EOF | |
2337 | # This file is a shell script that caches the results of configure | |
2338 | # tests run on this system so they can be shared between configure | |
2339 | # scripts and configure runs. It is not useful on other systems. | |
2340 | # If it contains results you don't want to keep, you may remove or edit it. | |
2341 | # | |
2342 | # By default, configure uses ./config.cache as the cache file, | |
2343 | # creating it if it does not exist already. You can give configure | |
2344 | # the --cache-file=FILE option to use a different cache file; that is | |
2345 | # what configure does when it calls configure scripts in | |
2346 | # subdirectories, so they share the cache. | |
2347 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
2348 | # config.status only pays attention to the cache file if you give it the | |
2349 | # --recheck option to rerun configure. | |
2350 | # | |
2351 | EOF | |
b9a5c27f RS |
2352 | # The following way of writing the cache mishandles newlines in values, |
2353 | # but we know of no workaround that is simple, portable, and efficient. | |
2354 | # So, don't put newlines in cache variables' values. | |
ef346f1a ILT |
2355 | # Ultrix sh set writes to stderr and can't be redirected directly, |
2356 | # and sets the high bit in the cache file unless we assign to the vars. | |
2357 | (set) 2>&1 | | |
12e0afe5 | 2358 | case `(ac_space=' '; set) 2>&1 | grep ac_space` in |
b9a5c27f RS |
2359 | *ac_space=\ *) |
2360 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
2361 | # turns \\\\ into \\, and sed turns \\ into \). | |
2362 | sed -n \ | |
2363 | -e "s/'/'\\\\''/g" \ | |
2364 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
2365 | ;; | |
2366 | *) | |
2367 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
2368 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
2369 | ;; | |
2370 | esac >> confcache | |
ef346f1a ILT |
2371 | if cmp -s $cache_file confcache; then |
2372 | : | |
2373 | else | |
2374 | if test -w $cache_file; then | |
2375 | echo "updating cache $cache_file" | |
2376 | cat confcache > $cache_file | |
2377 | else | |
2378 | echo "not updating unwritable cache $cache_file" | |
2379 | fi | |
2380 | fi | |
2381 | rm -f confcache | |
2382 | ||
2383 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
2384 | ||
2385 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
2386 | # Let make expand exec_prefix. | |
2387 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
2388 | ||
2389 | # Any assignment to VPATH causes Sun make to only execute | |
2390 | # the first set of double-colon rules, so remove it if not needed. | |
2391 | # If there is a colon in the path, we need to keep it. | |
2392 | if test "x$srcdir" = x.; then | |
2393 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
2394 | fi | |
2395 | ||
2396 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
2397 | ||
2398 | DEFS=-DHAVE_CONFIG_H | |
2399 | ||
2400 | # Without the "./", some shells look in PATH for config.status. | |
2401 | : ${CONFIG_STATUS=./config.status} | |
2402 | ||
2403 | echo creating $CONFIG_STATUS | |
2404 | rm -f $CONFIG_STATUS | |
2405 | cat > $CONFIG_STATUS <<EOF | |
2406 | #! /bin/sh | |
2407 | # Generated automatically by configure. | |
2408 | # Run this file to recreate the current configuration. | |
2409 | # This directory was configured as follows, | |
2410 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
2411 | # | |
2412 | # $0 $ac_configure_args | |
8c32cf6e | 2413 | # |
ef346f1a ILT |
2414 | # Compiler output produced by configure, useful for debugging |
2415 | # configure, is in ./config.log if it exists. | |
2416 | ||
2417 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
2418 | for ac_option | |
2419 | do | |
2420 | case "\$ac_option" in | |
2421 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
2422 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
2423 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
2424 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
b5db0960 | 2425 | echo "$CONFIG_STATUS generated by autoconf version 2.12.1" |
ef346f1a ILT |
2426 | exit 0 ;; |
2427 | -help | --help | --hel | --he | --h) | |
2428 | echo "\$ac_cs_usage"; exit 0 ;; | |
2429 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
2430 | esac | |
2431 | done | |
2432 | ||
2433 | ac_given_srcdir=$srcdir | |
b9a5c27f | 2434 | ac_given_INSTALL="$INSTALL" |
ef346f1a ILT |
2435 | |
2436 | trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 | |
2e598345 ILT |
2437 | EOF |
2438 | cat >> $CONFIG_STATUS <<EOF | |
ef346f1a | 2439 | |
caf2a913 | 2440 | # Protect against being on the right side of a sed subst in config.status. |
2e598345 ILT |
2441 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; |
2442 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
ef346f1a ILT |
2443 | $ac_vpsub |
2444 | $extrasub | |
12e0afe5 | 2445 | s%@SHELL@%$SHELL%g |
ef346f1a ILT |
2446 | s%@CFLAGS@%$CFLAGS%g |
2447 | s%@CPPFLAGS@%$CPPFLAGS%g | |
2448 | s%@CXXFLAGS@%$CXXFLAGS%g | |
2449 | s%@DEFS@%$DEFS%g | |
2450 | s%@LDFLAGS@%$LDFLAGS%g | |
2451 | s%@LIBS@%$LIBS%g | |
2452 | s%@exec_prefix@%$exec_prefix%g | |
2453 | s%@prefix@%$prefix%g | |
2454 | s%@program_transform_name@%$program_transform_name%g | |
caf2a913 ILT |
2455 | s%@bindir@%$bindir%g |
2456 | s%@sbindir@%$sbindir%g | |
2457 | s%@libexecdir@%$libexecdir%g | |
2458 | s%@datadir@%$datadir%g | |
2459 | s%@sysconfdir@%$sysconfdir%g | |
2460 | s%@sharedstatedir@%$sharedstatedir%g | |
2461 | s%@localstatedir@%$localstatedir%g | |
2462 | s%@libdir@%$libdir%g | |
2463 | s%@includedir@%$includedir%g | |
2464 | s%@oldincludedir@%$oldincludedir%g | |
2465 | s%@infodir@%$infodir%g | |
2466 | s%@mandir@%$mandir%g | |
ef346f1a ILT |
2467 | s%@host@%$host%g |
2468 | s%@host_alias@%$host_alias%g | |
2469 | s%@host_cpu@%$host_cpu%g | |
2470 | s%@host_vendor@%$host_vendor%g | |
2471 | s%@host_os@%$host_os%g | |
2472 | s%@target@%$target%g | |
2473 | s%@target_alias@%$target_alias%g | |
2474 | s%@target_cpu@%$target_cpu%g | |
2475 | s%@target_vendor@%$target_vendor%g | |
2476 | s%@target_os@%$target_os%g | |
2477 | s%@build@%$build%g | |
2478 | s%@build_alias@%$build_alias%g | |
2479 | s%@build_cpu@%$build_cpu%g | |
2480 | s%@build_vendor@%$build_vendor%g | |
2481 | s%@build_os@%$build_os%g | |
b9a5c27f RS |
2482 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
2483 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
b5db0960 ILT |
2484 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g |
2485 | s%@PACKAGE@%$PACKAGE%g | |
2486 | s%@VERSION@%$VERSION%g | |
2487 | s%@ACLOCAL@%$ACLOCAL%g | |
2488 | s%@AUTOCONF@%$AUTOCONF%g | |
2489 | s%@AUTOMAKE@%$AUTOMAKE%g | |
2490 | s%@AUTOHEADER@%$AUTOHEADER%g | |
2491 | s%@MAKEINFO@%$MAKEINFO%g | |
2492 | s%@SET_MAKE@%$SET_MAKE%g | |
b5db0960 | 2493 | s%@RANLIB@%$RANLIB%g |
12e0afe5 | 2494 | s%@CC@%$CC%g |
b5db0960 | 2495 | s%@LD@%$LD%g |
12e0afe5 | 2496 | s%@NM@%$NM%g |
b5db0960 ILT |
2497 | s%@LN_S@%$LN_S%g |
2498 | s%@LIBTOOL@%$LIBTOOL%g | |
b9a5c27f | 2499 | s%@EXEEXT@%$EXEEXT%g |
b5db0960 ILT |
2500 | s%@YACC@%$YACC%g |
2501 | s%@LEX@%$LEX%g | |
2502 | s%@LEXLIB@%$LEXLIB%g | |
2503 | s%@CPP@%$CPP%g | |
2504 | s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g | |
2505 | s%@MAINT@%$MAINT%g | |
ef346f1a ILT |
2506 | s%@HDEFINES@%$HDEFINES%g |
2507 | s%@HOSTING_CRT0@%$HOSTING_CRT0%g | |
2508 | s%@HOSTING_LIBS@%$HOSTING_LIBS%g | |
2509 | s%@NATIVE_LIB_DIRS@%$NATIVE_LIB_DIRS%g | |
ef346f1a | 2510 | s%@EMUL@%$EMUL%g |
95d31c3c | 2511 | s%@TDIRS@%$TDIRS%g |
ef346f1a ILT |
2512 | s%@EMULATION_OFILES@%$EMULATION_OFILES%g |
2513 | ||
2514 | CEOF | |
2515 | EOF | |
b9a5c27f RS |
2516 | |
2517 | cat >> $CONFIG_STATUS <<\EOF | |
2518 | ||
2519 | # Split the substitutions into bite-sized pieces for seds with | |
2520 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
2521 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
2522 | ac_file=1 # Number of current file. | |
2523 | ac_beg=1 # First line for current file. | |
2524 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
2525 | ac_more_lines=: | |
2526 | ac_sed_cmds="" | |
2527 | while $ac_more_lines; do | |
2528 | if test $ac_beg -gt 1; then | |
2529 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
2530 | else | |
2531 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
2532 | fi | |
2533 | if test ! -s conftest.s$ac_file; then | |
2534 | ac_more_lines=false | |
2535 | rm -f conftest.s$ac_file | |
2536 | else | |
2537 | if test -z "$ac_sed_cmds"; then | |
2538 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
2539 | else | |
2540 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
2541 | fi | |
2542 | ac_file=`expr $ac_file + 1` | |
2543 | ac_beg=$ac_end | |
2544 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
2545 | fi | |
2546 | done | |
2547 | if test -z "$ac_sed_cmds"; then | |
2548 | ac_sed_cmds=cat | |
2549 | fi | |
2550 | EOF | |
2551 | ||
ef346f1a ILT |
2552 | cat >> $CONFIG_STATUS <<EOF |
2553 | ||
2554 | CONFIG_FILES=\${CONFIG_FILES-"Makefile"} | |
2555 | EOF | |
2556 | cat >> $CONFIG_STATUS <<\EOF | |
2557 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
b9a5c27f | 2558 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
ef346f1a | 2559 | case "$ac_file" in |
b9a5c27f | 2560 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
ef346f1a ILT |
2561 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
2562 | *) ac_file_in="${ac_file}.in" ;; | |
2563 | esac | |
2564 | ||
b9a5c27f | 2565 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
ef346f1a ILT |
2566 | |
2567 | # Remove last slash and all that follows it. Not all systems have dirname. | |
2568 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
2569 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
2570 | # The file is in a subdirectory. | |
2571 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
2572 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
2573 | # A "../" for each directory in $ac_dir_suffix. | |
2574 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
2575 | else | |
2576 | ac_dir_suffix= ac_dots= | |
2577 | fi | |
2578 | ||
2579 | case "$ac_given_srcdir" in | |
2580 | .) srcdir=. | |
2581 | if test -z "$ac_dots"; then top_srcdir=. | |
2582 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
2583 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
2584 | *) # Relative path. | |
2585 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
2586 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
2587 | esac | |
2588 | ||
b9a5c27f RS |
2589 | case "$ac_given_INSTALL" in |
2590 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
2591 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
2592 | esac | |
2593 | ||
ef346f1a ILT |
2594 | echo creating "$ac_file" |
2595 | rm -f "$ac_file" | |
2596 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
2597 | case "$ac_file" in | |
2598 | *Makefile*) ac_comsub="1i\\ | |
2599 | # $configure_input" ;; | |
2600 | *) ac_comsub= ;; | |
2601 | esac | |
b9a5c27f | 2602 | |
b5db0960 | 2603 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
ef346f1a ILT |
2604 | sed -e "$ac_comsub |
2605 | s%@configure_input@%$configure_input%g | |
2606 | s%@srcdir@%$srcdir%g | |
2607 | s%@top_srcdir@%$top_srcdir%g | |
b9a5c27f RS |
2608 | s%@INSTALL@%$INSTALL%g |
2609 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
ef346f1a | 2610 | fi; done |
b9a5c27f | 2611 | rm -f conftest.s* |
ef346f1a ILT |
2612 | |
2613 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
2614 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
8c32cf6e | 2615 | # |
ef346f1a ILT |
2616 | # ac_d sets the value in "#define NAME VALUE" lines. |
2617 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
2618 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
2619 | ac_dC='\3' | |
2620 | ac_dD='%g' | |
2621 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
2622 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
2623 | ac_uB='\([ ]\)%\1#\2define\3' | |
2624 | ac_uC=' ' | |
2625 | ac_uD='\4%g' | |
2626 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
2627 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
2628 | ac_eB='$%\1#\2define\3' | |
2629 | ac_eC=' ' | |
2630 | ac_eD='%g' | |
2631 | ||
b9a5c27f RS |
2632 | if test "${CONFIG_HEADERS+set}" != set; then |
2633 | EOF | |
2634 | cat >> $CONFIG_STATUS <<EOF | |
2635 | CONFIG_HEADERS="config.h:config.in" | |
2636 | EOF | |
2637 | cat >> $CONFIG_STATUS <<\EOF | |
2638 | fi | |
ef346f1a | 2639 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then |
b9a5c27f | 2640 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
ef346f1a | 2641 | case "$ac_file" in |
b9a5c27f | 2642 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
ef346f1a ILT |
2643 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
2644 | *) ac_file_in="${ac_file}.in" ;; | |
2645 | esac | |
2646 | ||
2647 | echo creating $ac_file | |
2648 | ||
2649 | rm -f conftest.frag conftest.in conftest.out | |
b5db0960 | 2650 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
b9a5c27f | 2651 | cat $ac_file_inputs > conftest.in |
ef346f1a ILT |
2652 | |
2653 | EOF | |
2654 | ||
2655 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
2656 | # the proper values into config.h.in to produce config.h. And first: | |
caf2a913 | 2657 | # Protect against being on the right side of a sed subst in config.status. |
ef346f1a ILT |
2658 | # Protect against being in an unquoted here document in config.status. |
2659 | rm -f conftest.vals | |
2660 | cat > conftest.hdr <<\EOF | |
2661 | s/[\\&%]/\\&/g | |
2662 | s%[\\$`]%\\&%g | |
b9a5c27f | 2663 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp |
ef346f1a ILT |
2664 | s%ac_d%ac_u%gp |
2665 | s%ac_u%ac_e%gp | |
2666 | EOF | |
2667 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
2668 | rm -f conftest.hdr | |
2669 | ||
2670 | # This sed command replaces #undef with comments. This is necessary, for | |
2671 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
2672 | # on some systems where configure will not decide to define it. | |
2673 | cat >> conftest.vals <<\EOF | |
2674 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
2675 | EOF | |
2676 | ||
2677 | # Break up conftest.vals because some shells have a limit on | |
2678 | # the size of here documents, and old seds have small limits too. | |
ef346f1a ILT |
2679 | |
2680 | rm -f conftest.tail | |
2681 | while : | |
2682 | do | |
2683 | ac_lines=`grep -c . conftest.vals` | |
2684 | # grep -c gives empty output for an empty file on some AIX systems. | |
2685 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
2686 | # Write a limited-size here document to conftest.frag. | |
2687 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
2688 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
2689 | echo 'CEOF | |
2690 | sed -f conftest.frag conftest.in > conftest.out | |
2691 | rm -f conftest.in | |
2692 | mv conftest.out conftest.in | |
2693 | ' >> $CONFIG_STATUS | |
2694 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
2695 | rm -f conftest.vals | |
2696 | mv conftest.tail conftest.vals | |
2697 | done | |
2698 | rm -f conftest.vals | |
2699 | ||
2700 | cat >> $CONFIG_STATUS <<\EOF | |
2701 | rm -f conftest.frag conftest.h | |
2702 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
2703 | cat conftest.in >> conftest.h | |
2704 | rm -f conftest.in | |
2705 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
2706 | echo "$ac_file is unchanged" | |
2707 | rm -f conftest.h | |
2708 | else | |
b9a5c27f RS |
2709 | # Remove last slash and all that follows it. Not all systems have dirname. |
2710 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
2711 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
2712 | # The file is in a subdirectory. | |
2713 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
2714 | fi | |
ef346f1a ILT |
2715 | rm -f $ac_file |
2716 | mv conftest.h $ac_file | |
2717 | fi | |
2718 | fi; done | |
2719 | ||
b9a5c27f RS |
2720 | EOF |
2721 | cat >> $CONFIG_STATUS <<EOF | |
ef346f1a | 2722 | |
b5db0960 | 2723 | |
b9a5c27f RS |
2724 | EOF |
2725 | cat >> $CONFIG_STATUS <<\EOF | |
b5db0960 ILT |
2726 | test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h |
2727 | ||
ef346f1a ILT |
2728 | exit 0 |
2729 | EOF | |
2730 | chmod +x $CONFIG_STATUS | |
2731 | rm -fr confdefs* $ac_clean_files | |
2732 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
2ee11735 | 2733 |