Commit | Line | Data |
---|---|---|
8c693660 KR |
1 | #! /bin/sh |
2 | ||
3 | # Guess values for system-dependent variables and create Makefiles. | |
372b296c | 4 | # Generated automatically using autoconf version 2.12.1 |
a4322a77 | 5 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. |
8c693660 KR |
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: | |
c0734708 | 14 | ac_help="$ac_help |
b9bf4aff ILT |
15 | --enable-shared build shared libraries [default=no] |
16 | --enable-shared=PKGS only build shared libraries if the current package | |
17 | appears as an element in the PKGS list" | |
c0734708 | 18 | ac_help="$ac_help |
b9bf4aff ILT |
19 | --enable-static build static libraries [default=yes] |
20 | --enable-static=PKGS only build shared libraries if the current package | |
21 | appears as an element in the PKGS list" | |
c0734708 | 22 | ac_help="$ac_help |
b9bf4aff | 23 | --with-gnu-ld assume the C compiler uses GNU ld [default=no]" |
8c693660 | 24 | ac_help="$ac_help |
e818c22e | 25 | --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)" |
8c693660 | 26 | ac_help="$ac_help |
e818c22e | 27 | --enable-targets alternative target configurations" |
44f795f7 ILT |
28 | ac_help="$ac_help |
29 | --enable-commonbfdlib build shared BFD/opcodes/libiberty library" | |
85e493f0 ILT |
30 | ac_help="$ac_help |
31 | --with-mmap try using mmap for BFD input files if available" | |
c0734708 ILT |
32 | ac_help="$ac_help |
33 | --enable-maintainer-mode enable make rules and dependencies not useful | |
34 | (and sometimes confusing) to the casual installer" | |
8c693660 KR |
35 | |
36 | # Initialize some variables set by options. | |
37 | # The variables have the same names as the options, with | |
38 | # dashes changed to underlines. | |
39 | build=NONE | |
40 | cache_file=./config.cache | |
41 | exec_prefix=NONE | |
42 | host=NONE | |
43 | no_create= | |
44 | nonopt=NONE | |
45 | no_recursion= | |
46 | prefix=NONE | |
47 | program_prefix=NONE | |
48 | program_suffix=NONE | |
49 | program_transform_name=s,x,x, | |
50 | silent= | |
51 | site= | |
52 | srcdir= | |
53 | target=NONE | |
54 | verbose= | |
55 | x_includes=NONE | |
56 | x_libraries=NONE | |
85e493f0 ILT |
57 | bindir='${exec_prefix}/bin' |
58 | sbindir='${exec_prefix}/sbin' | |
59 | libexecdir='${exec_prefix}/libexec' | |
60 | datadir='${prefix}/share' | |
61 | sysconfdir='${prefix}/etc' | |
62 | sharedstatedir='${prefix}/com' | |
63 | localstatedir='${prefix}/var' | |
64 | libdir='${exec_prefix}/lib' | |
65 | includedir='${prefix}/include' | |
66 | oldincludedir='/usr/include' | |
67 | infodir='${prefix}/info' | |
68 | mandir='${prefix}/man' | |
8c693660 KR |
69 | |
70 | # Initialize some other variables. | |
71 | subdirs= | |
85e493f0 | 72 | MFLAGS= MAKEFLAGS= |
372b296c | 73 | SHELL=${CONFIG_SHELL-/bin/sh} |
ac388f2a ILT |
74 | # Maximum number of lines to put in a shell here document. |
75 | ac_max_here_lines=12 | |
8c693660 KR |
76 | |
77 | ac_prev= | |
78 | for ac_option | |
79 | do | |
80 | ||
81 | # If the previous option needs an argument, assign it. | |
82 | if test -n "$ac_prev"; then | |
83 | eval "$ac_prev=\$ac_option" | |
84 | ac_prev= | |
85 | continue | |
86 | fi | |
87 | ||
88 | case "$ac_option" in | |
89 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
90 | *) ac_optarg= ;; | |
91 | esac | |
92 | ||
93 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
94 | ||
95 | case "$ac_option" in | |
96 | ||
85e493f0 ILT |
97 | -bindir | --bindir | --bindi | --bind | --bin | --bi) |
98 | ac_prev=bindir ;; | |
99 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
100 | bindir="$ac_optarg" ;; | |
101 | ||
102 | -build | --build | --buil | --bui | --bu) | |
8c693660 | 103 | ac_prev=build ;; |
85e493f0 | 104 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
8c693660 KR |
105 | build="$ac_optarg" ;; |
106 | ||
107 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
108 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
109 | ac_prev=cache_file ;; | |
110 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
111 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
112 | cache_file="$ac_optarg" ;; | |
113 | ||
85e493f0 ILT |
114 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) |
115 | ac_prev=datadir ;; | |
116 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
117 | | --da=*) | |
118 | datadir="$ac_optarg" ;; | |
119 | ||
8c693660 KR |
120 | -disable-* | --disable-*) |
121 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
122 | # Reject names that are not valid shell variable names. | |
123 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
124 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
125 | fi | |
126 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
127 | eval "enable_${ac_feature}=no" ;; | |
128 | ||
129 | -enable-* | --enable-*) | |
130 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
131 | # Reject names that are not valid shell variable names. | |
132 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
133 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
134 | fi | |
135 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
136 | case "$ac_option" in | |
137 | *=*) ;; | |
138 | *) ac_optarg=yes ;; | |
139 | esac | |
140 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
141 | ||
142 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
143 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
144 | | --exec | --exe | --ex) | |
145 | ac_prev=exec_prefix ;; | |
146 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
147 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
148 | | --exec=* | --exe=* | --ex=*) | |
149 | exec_prefix="$ac_optarg" ;; | |
150 | ||
151 | -gas | --gas | --ga | --g) | |
152 | # Obsolete; use --with-gas. | |
153 | with_gas=yes ;; | |
154 | ||
155 | -help | --help | --hel | --he) | |
156 | # Omit some internal or obsolete options to make the list less imposing. | |
157 | # This message is too long to be a string in the A/UX 3.1 sh. | |
158 | cat << EOF | |
159 | Usage: configure [options] [host] | |
160 | Options: [defaults in brackets after descriptions] | |
161 | Configuration: | |
162 | --cache-file=FILE cache test results in FILE | |
163 | --help print this message | |
164 | --no-create do not create output files | |
165 | --quiet, --silent do not print \`checking...' messages | |
166 | --version print the version of autoconf that created configure | |
167 | Directory and file names: | |
168 | --prefix=PREFIX install architecture-independent files in PREFIX | |
169 | [$ac_default_prefix] | |
85e493f0 | 170 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
8c693660 | 171 | [same as prefix] |
85e493f0 ILT |
172 | --bindir=DIR user executables in DIR [EPREFIX/bin] |
173 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
174 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
175 | --datadir=DIR read-only architecture-independent data in DIR | |
176 | [PREFIX/share] | |
177 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
178 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
179 | [PREFIX/com] | |
180 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
181 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
182 | --includedir=DIR C header files in DIR [PREFIX/include] | |
183 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
184 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
185 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
8c693660 KR |
186 | --srcdir=DIR find the sources in DIR [configure dir or ..] |
187 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
188 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
85e493f0 ILT |
189 | --program-transform-name=PROGRAM |
190 | run sed PROGRAM on installed program names | |
191 | EOF | |
192 | cat << EOF | |
8c693660 KR |
193 | Host type: |
194 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
195 | --host=HOST configure for HOST [guessed] | |
196 | --target=TARGET configure for TARGET [TARGET=HOST] | |
197 | Features and packages: | |
198 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
199 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
200 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
201 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
202 | --x-includes=DIR X include files are in DIR | |
203 | --x-libraries=DIR X library files are in DIR | |
8c693660 | 204 | EOF |
85e493f0 ILT |
205 | if test -n "$ac_help"; then |
206 | echo "--enable and --with options recognized:$ac_help" | |
207 | fi | |
8c693660 KR |
208 | exit 0 ;; |
209 | ||
210 | -host | --host | --hos | --ho) | |
211 | ac_prev=host ;; | |
212 | -host=* | --host=* | --hos=* | --ho=*) | |
213 | host="$ac_optarg" ;; | |
214 | ||
85e493f0 ILT |
215 | -includedir | --includedir | --includedi | --included | --include \ |
216 | | --includ | --inclu | --incl | --inc) | |
217 | ac_prev=includedir ;; | |
218 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
219 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
220 | includedir="$ac_optarg" ;; | |
221 | ||
222 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
223 | ac_prev=infodir ;; | |
224 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
225 | infodir="$ac_optarg" ;; | |
226 | ||
227 | -libdir | --libdir | --libdi | --libd) | |
228 | ac_prev=libdir ;; | |
229 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
230 | libdir="$ac_optarg" ;; | |
231 | ||
232 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
233 | | --libexe | --libex | --libe) | |
234 | ac_prev=libexecdir ;; | |
235 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
236 | | --libexe=* | --libex=* | --libe=*) | |
237 | libexecdir="$ac_optarg" ;; | |
238 | ||
239 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
240 | | --localstate | --localstat | --localsta | --localst \ | |
241 | | --locals | --local | --loca | --loc | --lo) | |
242 | ac_prev=localstatedir ;; | |
243 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
244 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
245 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
246 | localstatedir="$ac_optarg" ;; | |
247 | ||
248 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
249 | ac_prev=mandir ;; | |
250 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
251 | mandir="$ac_optarg" ;; | |
252 | ||
8c693660 KR |
253 | -nfp | --nfp | --nf) |
254 | # Obsolete; use --without-fp. | |
255 | with_fp=no ;; | |
256 | ||
257 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
258 | | --no-cr | --no-c) | |
259 | no_create=yes ;; | |
260 | ||
261 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
262 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
263 | no_recursion=yes ;; | |
264 | ||
85e493f0 ILT |
265 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ |
266 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
267 | | --oldin | --oldi | --old | --ol | --o) | |
268 | ac_prev=oldincludedir ;; | |
269 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
270 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
271 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
272 | oldincludedir="$ac_optarg" ;; | |
273 | ||
8c693660 KR |
274 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
275 | ac_prev=prefix ;; | |
276 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
277 | prefix="$ac_optarg" ;; | |
278 | ||
279 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
280 | | --program-pre | --program-pr | --program-p) | |
281 | ac_prev=program_prefix ;; | |
282 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
283 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
284 | program_prefix="$ac_optarg" ;; | |
285 | ||
286 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
287 | | --program-suf | --program-su | --program-s) | |
288 | ac_prev=program_suffix ;; | |
289 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
290 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
291 | program_suffix="$ac_optarg" ;; | |
292 | ||
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 | ac_prev=program_transform_name ;; | |
301 | -program-transform-name=* | --program-transform-name=* \ | |
302 | | --program-transform-nam=* | --program-transform-na=* \ | |
303 | | --program-transform-n=* | --program-transform-=* \ | |
304 | | --program-transform=* | --program-transfor=* \ | |
305 | | --program-transfo=* | --program-transf=* \ | |
306 | | --program-trans=* | --program-tran=* \ | |
307 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
308 | program_transform_name="$ac_optarg" ;; | |
309 | ||
310 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
311 | | -silent | --silent | --silen | --sile | --sil) | |
312 | silent=yes ;; | |
313 | ||
85e493f0 ILT |
314 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) |
315 | ac_prev=sbindir ;; | |
316 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
317 | | --sbi=* | --sb=*) | |
318 | sbindir="$ac_optarg" ;; | |
319 | ||
320 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
321 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
322 | | --sharedst | --shareds | --shared | --share | --shar \ | |
323 | | --sha | --sh) | |
324 | ac_prev=sharedstatedir ;; | |
325 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
326 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
327 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
328 | | --sha=* | --sh=*) | |
329 | sharedstatedir="$ac_optarg" ;; | |
330 | ||
8c693660 KR |
331 | -site | --site | --sit) |
332 | ac_prev=site ;; | |
333 | -site=* | --site=* | --sit=*) | |
334 | site="$ac_optarg" ;; | |
335 | ||
336 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
337 | ac_prev=srcdir ;; | |
338 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
339 | srcdir="$ac_optarg" ;; | |
340 | ||
85e493f0 ILT |
341 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ |
342 | | --syscon | --sysco | --sysc | --sys | --sy) | |
343 | ac_prev=sysconfdir ;; | |
344 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
345 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
346 | sysconfdir="$ac_optarg" ;; | |
347 | ||
8c693660 KR |
348 | -target | --target | --targe | --targ | --tar | --ta | --t) |
349 | ac_prev=target ;; | |
350 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
351 | target="$ac_optarg" ;; | |
352 | ||
353 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
354 | verbose=yes ;; | |
355 | ||
356 | -version | --version | --versio | --versi | --vers) | |
372b296c | 357 | echo "configure generated by autoconf version 2.12.1" |
8c693660 KR |
358 | exit 0 ;; |
359 | ||
360 | -with-* | --with-*) | |
361 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
362 | # Reject names that are not valid shell variable names. | |
363 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
364 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
365 | fi | |
366 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
367 | case "$ac_option" in | |
368 | *=*) ;; | |
369 | *) ac_optarg=yes ;; | |
370 | esac | |
371 | eval "with_${ac_package}='$ac_optarg'" ;; | |
372 | ||
373 | -without-* | --without-*) | |
374 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
375 | # Reject names that are not valid shell variable names. | |
376 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
377 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
378 | fi | |
379 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
380 | eval "with_${ac_package}=no" ;; | |
381 | ||
382 | --x) | |
383 | # Obsolete; use --with-x. | |
384 | with_x=yes ;; | |
385 | ||
386 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
387 | | --x-incl | --x-inc | --x-in | --x-i) | |
388 | ac_prev=x_includes ;; | |
389 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
390 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
391 | x_includes="$ac_optarg" ;; | |
392 | ||
393 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
394 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
395 | ac_prev=x_libraries ;; | |
396 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
397 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
398 | x_libraries="$ac_optarg" ;; | |
399 | ||
400 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
401 | ;; | |
402 | ||
85e493f0 | 403 | *) |
8c693660 KR |
404 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then |
405 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
406 | fi | |
407 | if test "x$nonopt" != xNONE; then | |
408 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
409 | fi | |
410 | nonopt="$ac_option" | |
411 | ;; | |
412 | ||
413 | esac | |
414 | done | |
415 | ||
416 | if test -n "$ac_prev"; then | |
417 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
418 | fi | |
419 | ||
420 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
421 | ||
422 | # File descriptor usage: | |
423 | # 0 standard input | |
424 | # 1 file creation | |
425 | # 2 errors and warnings | |
426 | # 3 some systems may open it to /dev/tty | |
427 | # 4 used on the Kubota Titan | |
428 | # 6 checking for... messages and results | |
429 | # 5 compiler messages saved in config.log | |
430 | if test "$silent" = yes; then | |
431 | exec 6>/dev/null | |
432 | else | |
433 | exec 6>&1 | |
434 | fi | |
435 | exec 5>./config.log | |
436 | ||
437 | echo "\ | |
438 | This file contains any messages produced by compilers while | |
439 | running configure, to aid debugging if configure makes a mistake. | |
440 | " 1>&5 | |
441 | ||
442 | # Strip out --no-create and --no-recursion so they do not pile up. | |
443 | # Also quote any args containing shell metacharacters. | |
444 | ac_configure_args= | |
445 | for ac_arg | |
446 | do | |
447 | case "$ac_arg" in | |
448 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
449 | | --no-cr | --no-c) ;; | |
450 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
451 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
452 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
453 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
454 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
455 | esac | |
456 | done | |
457 | ||
458 | # NLS nuisances. | |
ac388f2a ILT |
459 | # Only set these to C if already set. These must not be set unconditionally |
460 | # because not all systems understand e.g. LANG=C (notably SCO). | |
461 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
462 | # Non-C LC_CTYPE values break the ctype check. | |
fd8d7c31 | 463 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi |
ac388f2a ILT |
464 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi |
465 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
466 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
8c693660 KR |
467 | |
468 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
469 | rm -rf conftest* confdefs.h | |
470 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
471 | echo > confdefs.h | |
472 | ||
473 | # A filename unique to this package, relative to the directory that | |
474 | # configure is in, which we can look for to find out if srcdir is correct. | |
475 | ac_unique_file=libbfd.c | |
476 | ||
477 | # Find the source files, if location was not specified. | |
478 | if test -z "$srcdir"; then | |
479 | ac_srcdir_defaulted=yes | |
480 | # Try the directory containing this script, then its parent. | |
481 | ac_prog=$0 | |
482 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
483 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
484 | srcdir=$ac_confdir | |
485 | if test ! -r $srcdir/$ac_unique_file; then | |
486 | srcdir=.. | |
487 | fi | |
488 | else | |
489 | ac_srcdir_defaulted=no | |
490 | fi | |
491 | if test ! -r $srcdir/$ac_unique_file; then | |
492 | if test "$ac_srcdir_defaulted" = yes; then | |
493 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
494 | else | |
495 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
496 | fi | |
497 | fi | |
498 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
499 | ||
500 | # Prefer explicitly selected file to automatically selected ones. | |
501 | if test -z "$CONFIG_SITE"; then | |
502 | if test "x$prefix" != xNONE; then | |
503 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
504 | else | |
505 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
506 | fi | |
507 | fi | |
508 | for ac_site_file in $CONFIG_SITE; do | |
509 | if test -r "$ac_site_file"; then | |
510 | echo "loading site script $ac_site_file" | |
511 | . "$ac_site_file" | |
512 | fi | |
513 | done | |
514 | ||
515 | if test -r "$cache_file"; then | |
516 | echo "loading cache $cache_file" | |
517 | . $cache_file | |
518 | else | |
519 | echo "creating cache $cache_file" | |
520 | > $cache_file | |
521 | fi | |
522 | ||
523 | ac_ext=c | |
524 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
986cf3b8 ILT |
525 | ac_cpp='$CPP $CPPFLAGS' |
526 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
527 | ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
ac388f2a | 528 | cross_compiling=$ac_cv_prog_cc_cross |
8c693660 KR |
529 | |
530 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
531 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
532 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
533 | ac_n= ac_c=' | |
534 | ' ac_t=' ' | |
535 | else | |
536 | ac_n=-n ac_c= ac_t= | |
537 | fi | |
538 | else | |
539 | ac_n= ac_c='\c' ac_t= | |
540 | fi | |
541 | ||
542 | ||
543 | ||
8c693660 | 544 | ac_aux_dir= |
c0734708 | 545 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do |
8c693660 KR |
546 | if test -f $ac_dir/install-sh; then |
547 | ac_aux_dir=$ac_dir | |
548 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
549 | break | |
550 | elif test -f $ac_dir/install.sh; then | |
551 | ac_aux_dir=$ac_dir | |
552 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
553 | break | |
554 | fi | |
555 | done | |
556 | if test -z "$ac_aux_dir"; then | |
c0734708 | 557 | { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } |
8c693660 KR |
558 | fi |
559 | ac_config_guess=$ac_aux_dir/config.guess | |
560 | ac_config_sub=$ac_aux_dir/config.sub | |
561 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
562 | ||
563 | ||
564 | # Do some error checking and defaulting for the host and target type. | |
565 | # The inputs are: | |
566 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
567 | # | |
568 | # The rules are: | |
569 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
85e493f0 | 570 | # same time. |
8c693660 KR |
571 | # 2. Host defaults to nonopt. |
572 | # 3. If nonopt is not specified, then host defaults to the current host, | |
573 | # as determined by config.guess. | |
574 | # 4. Target and build default to nonopt. | |
575 | # 5. If nonopt is not specified, then target and build default to host. | |
576 | ||
577 | # The aliases save the names the user supplied, while $host etc. | |
578 | # will get canonicalized. | |
579 | case $host---$target---$nonopt in | |
580 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
581 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
582 | esac | |
583 | ||
584 | ||
c0734708 | 585 | # Make sure we can run config.sub. |
372b296c | 586 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : |
c0734708 ILT |
587 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } |
588 | fi | |
589 | ||
590 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
b9bf4aff | 591 | echo "configure:592: checking host system type" >&5 |
c0734708 ILT |
592 | |
593 | host_alias=$host | |
594 | case "$host_alias" in | |
595 | NONE) | |
596 | case $nonopt in | |
597 | NONE) | |
372b296c | 598 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : |
c0734708 ILT |
599 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } |
600 | fi ;; | |
601 | *) host_alias=$nonopt ;; | |
602 | esac ;; | |
603 | esac | |
604 | ||
372b296c | 605 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` |
c0734708 ILT |
606 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
607 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
608 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
609 | echo "$ac_t""$host" 1>&6 | |
610 | ||
611 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
b9bf4aff | 612 | echo "configure:613: checking target system type" >&5 |
c0734708 ILT |
613 | |
614 | target_alias=$target | |
615 | case "$target_alias" in | |
616 | NONE) | |
617 | case $nonopt in | |
618 | NONE) target_alias=$host_alias ;; | |
619 | *) target_alias=$nonopt ;; | |
620 | esac ;; | |
621 | esac | |
622 | ||
372b296c | 623 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` |
c0734708 ILT |
624 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
625 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
626 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
627 | echo "$ac_t""$target" 1>&6 | |
628 | ||
629 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
b9bf4aff | 630 | echo "configure:631: checking build system type" >&5 |
c0734708 ILT |
631 | |
632 | build_alias=$build | |
633 | case "$build_alias" in | |
634 | NONE) | |
635 | case $nonopt in | |
636 | NONE) build_alias=$host_alias ;; | |
637 | *) build_alias=$nonopt ;; | |
638 | esac ;; | |
639 | esac | |
640 | ||
372b296c | 641 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` |
c0734708 ILT |
642 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
643 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
644 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
645 | echo "$ac_t""$build" 1>&6 | |
646 | ||
647 | test "$host_alias" != "$target_alias" && | |
648 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
649 | NONENONEs,x,x, && | |
650 | program_prefix=${target_alias}- | |
651 | ||
652 | # Extract the first word of "gcc", so it can be a program name with args. | |
653 | set dummy gcc; ac_word=$2 | |
654 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b9bf4aff | 655 | echo "configure:656: checking for $ac_word" >&5 |
c0734708 ILT |
656 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
657 | echo $ac_n "(cached) $ac_c" 1>&6 | |
658 | else | |
659 | if test -n "$CC"; then | |
660 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
661 | else | |
662 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
663 | for ac_dir in $PATH; do | |
664 | test -z "$ac_dir" && ac_dir=. | |
665 | if test -f $ac_dir/$ac_word; then | |
666 | ac_cv_prog_CC="gcc" | |
667 | break | |
668 | fi | |
669 | done | |
670 | IFS="$ac_save_ifs" | |
671 | fi | |
672 | fi | |
673 | CC="$ac_cv_prog_CC" | |
674 | if test -n "$CC"; then | |
675 | echo "$ac_t""$CC" 1>&6 | |
676 | else | |
677 | echo "$ac_t""no" 1>&6 | |
678 | fi | |
679 | ||
680 | if test -z "$CC"; then | |
681 | # Extract the first word of "cc", so it can be a program name with args. | |
682 | set dummy cc; ac_word=$2 | |
683 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b9bf4aff | 684 | echo "configure:685: checking for $ac_word" >&5 |
c0734708 ILT |
685 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
686 | echo $ac_n "(cached) $ac_c" 1>&6 | |
687 | else | |
688 | if test -n "$CC"; then | |
689 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
690 | else | |
691 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
692 | ac_prog_rejected=no | |
693 | for ac_dir in $PATH; do | |
694 | test -z "$ac_dir" && ac_dir=. | |
695 | if test -f $ac_dir/$ac_word; then | |
696 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
697 | ac_prog_rejected=yes | |
698 | continue | |
699 | fi | |
700 | ac_cv_prog_CC="cc" | |
701 | break | |
702 | fi | |
703 | done | |
704 | IFS="$ac_save_ifs" | |
705 | if test $ac_prog_rejected = yes; then | |
706 | # We found a bogon in the path, so make sure we never use it. | |
707 | set dummy $ac_cv_prog_CC | |
708 | shift | |
709 | if test $# -gt 0; then | |
710 | # We chose a different compiler from the bogus one. | |
711 | # However, it has the same basename, so the bogon will be chosen | |
712 | # first if we set CC to just the basename; use the full file name. | |
713 | shift | |
714 | set dummy "$ac_dir/$ac_word" "$@" | |
715 | shift | |
716 | ac_cv_prog_CC="$@" | |
717 | fi | |
718 | fi | |
719 | fi | |
720 | fi | |
721 | CC="$ac_cv_prog_CC" | |
722 | if test -n "$CC"; then | |
723 | echo "$ac_t""$CC" 1>&6 | |
724 | else | |
725 | echo "$ac_t""no" 1>&6 | |
726 | fi | |
727 | ||
728 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
729 | fi | |
730 | ||
731 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | |
b9bf4aff | 732 | echo "configure:733: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
c0734708 ILT |
733 | |
734 | ac_ext=c | |
735 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
736 | ac_cpp='$CPP $CPPFLAGS' | |
737 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
738 | ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
739 | cross_compiling=$ac_cv_prog_cc_cross | |
740 | ||
741 | cat > conftest.$ac_ext <<EOF | |
b9bf4aff | 742 | #line 743 "configure" |
c0734708 ILT |
743 | #include "confdefs.h" |
744 | main(){return(0);} | |
745 | EOF | |
b9bf4aff | 746 | if { (eval echo configure:747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
c0734708 ILT |
747 | ac_cv_prog_cc_works=yes |
748 | # If we can't run a trivial program, we are probably using a cross compiler. | |
749 | if (./conftest; exit) 2>/dev/null; then | |
750 | ac_cv_prog_cc_cross=no | |
751 | else | |
752 | ac_cv_prog_cc_cross=yes | |
753 | fi | |
754 | else | |
755 | echo "configure: failed program was:" >&5 | |
756 | cat conftest.$ac_ext >&5 | |
757 | ac_cv_prog_cc_works=no | |
758 | fi | |
759 | rm -fr conftest* | |
760 | ||
761 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
762 | if test $ac_cv_prog_cc_works = no; then | |
763 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
764 | fi | |
765 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
b9bf4aff | 766 | echo "configure:767: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
c0734708 ILT |
767 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
768 | cross_compiling=$ac_cv_prog_cc_cross | |
769 | ||
770 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
b9bf4aff | 771 | echo "configure:772: checking whether we are using GNU C" >&5 |
c0734708 ILT |
772 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
773 | echo $ac_n "(cached) $ac_c" 1>&6 | |
774 | else | |
775 | cat > conftest.c <<EOF | |
776 | #ifdef __GNUC__ | |
777 | yes; | |
778 | #endif | |
779 | EOF | |
b9bf4aff | 780 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
c0734708 ILT |
781 | ac_cv_prog_gcc=yes |
782 | else | |
783 | ac_cv_prog_gcc=no | |
784 | fi | |
785 | fi | |
786 | ||
787 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
788 | ||
789 | if test $ac_cv_prog_gcc = yes; then | |
790 | GCC=yes | |
791 | ac_test_CFLAGS="${CFLAGS+set}" | |
792 | ac_save_CFLAGS="$CFLAGS" | |
793 | CFLAGS= | |
794 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
b9bf4aff | 795 | echo "configure:796: checking whether ${CC-cc} accepts -g" >&5 |
c0734708 ILT |
796 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
797 | echo $ac_n "(cached) $ac_c" 1>&6 | |
798 | else | |
799 | echo 'void f(){}' > conftest.c | |
800 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
801 | ac_cv_prog_cc_g=yes | |
802 | else | |
803 | ac_cv_prog_cc_g=no | |
804 | fi | |
805 | rm -f conftest* | |
806 | ||
807 | fi | |
808 | ||
809 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
810 | if test "$ac_test_CFLAGS" = set; then | |
811 | CFLAGS="$ac_save_CFLAGS" | |
812 | elif test $ac_cv_prog_cc_g = yes; then | |
813 | CFLAGS="-g -O2" | |
814 | else | |
815 | CFLAGS="-O2" | |
816 | fi | |
817 | else | |
818 | GCC= | |
819 | test "${CFLAGS+set}" = set || CFLAGS="-g" | |
820 | fi | |
821 | ||
822 | echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 | |
b9bf4aff | 823 | echo "configure:824: checking for POSIXized ISC" >&5 |
c0734708 ILT |
824 | if test -d /etc/conf/kconfig.d && |
825 | grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 | |
826 | then | |
827 | echo "$ac_t""yes" 1>&6 | |
828 | ISC=yes # If later tests want to check for ISC. | |
829 | cat >> confdefs.h <<\EOF | |
830 | #define _POSIX_SOURCE 1 | |
831 | EOF | |
832 | ||
833 | if test "$GCC" = yes; then | |
834 | CC="$CC -posix" | |
835 | else | |
836 | CC="$CC -Xp" | |
837 | fi | |
838 | else | |
839 | echo "$ac_t""no" 1>&6 | |
840 | ISC= | |
841 | fi | |
842 | ||
843 | ||
844 | # Find a good install program. We prefer a C program (faster), | |
845 | # so one script is as good as another. But avoid the broken or | |
846 | # incompatible versions: | |
847 | # SysV /etc/install, /usr/sbin/install | |
848 | # SunOS /usr/etc/install | |
849 | # IRIX /sbin/install | |
850 | # AIX /bin/install | |
372b296c | 851 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag |
c0734708 ILT |
852 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args |
853 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
854 | # ./install, which can be erroneously created by make from ./install.sh. | |
855 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
b9bf4aff | 856 | echo "configure:857: checking for a BSD compatible install" >&5 |
c0734708 ILT |
857 | if test -z "$INSTALL"; then |
858 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
859 | echo $ac_n "(cached) $ac_c" 1>&6 | |
860 | else | |
861 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" | |
862 | for ac_dir in $PATH; do | |
863 | # Account for people who put trailing slashes in PATH elements. | |
864 | case "$ac_dir/" in | |
865 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
866 | *) | |
867 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
372b296c ILT |
868 | # Don't use installbsd from OSF since it installs stuff as root |
869 | # by default. | |
870 | for ac_prog in ginstall scoinst install; do | |
c0734708 ILT |
871 | if test -f $ac_dir/$ac_prog; then |
872 | if test $ac_prog = install && | |
873 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
874 | # AIX install. It has an incompatible calling convention. | |
c0734708 ILT |
875 | : |
876 | else | |
877 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
878 | break 2 | |
879 | fi | |
880 | fi | |
881 | done | |
882 | ;; | |
883 | esac | |
884 | done | |
885 | IFS="$ac_save_IFS" | |
886 | ||
887 | fi | |
888 | if test "${ac_cv_path_install+set}" = set; then | |
889 | INSTALL="$ac_cv_path_install" | |
890 | else | |
891 | # As a last resort, use the slow shell script. We don't cache a | |
892 | # path for INSTALL within a source directory, because that will | |
893 | # break other packages using the cache if that directory is | |
894 | # removed, or if the path is relative. | |
895 | INSTALL="$ac_install_sh" | |
896 | fi | |
897 | fi | |
898 | echo "$ac_t""$INSTALL" 1>&6 | |
899 | ||
900 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
901 | # It thinks the first close brace ends the variable substitution. | |
902 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
903 | ||
904 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
905 | ||
906 | ||
907 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' | |
908 | ||
c0734708 | 909 | echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 |
b9bf4aff | 910 | echo "configure:911: checking whether build environment is sane" >&5 |
c0734708 ILT |
911 | # Just in case |
912 | sleep 1 | |
913 | echo timestamp > conftestfile | |
914 | # Do `set' in a subshell so we don't clobber the current shell's | |
915 | # arguments. Must try -L first in case configure is actually a | |
916 | # symlink; some systems play weird games with the mod time of symlinks | |
917 | # (eg FreeBSD returns the mod time of the symlink's containing | |
918 | # directory). | |
919 | if ( | |
920 | set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` | |
b9bf4aff | 921 | if test "$*" = "X"; then |
c0734708 ILT |
922 | # -L didn't work. |
923 | set X `ls -t $srcdir/configure conftestfile` | |
924 | fi | |
b9bf4aff ILT |
925 | if test "$*" != "X $srcdir/configure conftestfile" \ |
926 | && test "$*" != "X conftestfile $srcdir/configure"; then | |
927 | ||
928 | # If neither matched, then we have a broken ls. This can happen | |
929 | # if, for instance, CONFIG_SHELL is bash and it inherits a | |
930 | # broken ls alias from the environment. This has actually | |
931 | # happened. Such a system could not be considered "sane". | |
932 | { echo "configure: error: ls -t appears to fail. Make sure there is not a broken | |
933 | alias in your environment" 1>&2; exit 1; } | |
934 | fi | |
935 | ||
c0734708 ILT |
936 | test "$2" = conftestfile |
937 | ) | |
938 | then | |
939 | # Ok. | |
940 | : | |
941 | else | |
942 | { echo "configure: error: newly created file is older than distributed files! | |
943 | Check your system clock" 1>&2; exit 1; } | |
944 | fi | |
945 | rm -f conftest* | |
946 | echo "$ac_t""yes" 1>&6 | |
947 | if test "$program_transform_name" = s,x,x,; then | |
948 | program_transform_name= | |
949 | else | |
950 | # Double any \ or $. echo might interpret backslashes. | |
951 | cat <<\EOF_SED > conftestsed | |
952 | s,\\,\\\\,g; s,\$,$$,g | |
953 | EOF_SED | |
954 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
955 | rm -f conftestsed | |
956 | fi | |
957 | test "$program_prefix" != NONE && | |
958 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
959 | # Use a double $ so make ignores it. | |
960 | test "$program_suffix" != NONE && | |
961 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
962 | ||
963 | # sed with no file args requires a program. | |
964 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
965 | ||
b9bf4aff ILT |
966 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 |
967 | echo "configure:968: checking whether ${MAKE-make} sets \${MAKE}" >&5 | |
968 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` | |
969 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
970 | echo $ac_n "(cached) $ac_c" 1>&6 | |
971 | else | |
972 | cat > conftestmake <<\EOF | |
973 | all: | |
974 | @echo 'ac_maketemp="${MAKE}"' | |
975 | EOF | |
976 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
977 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
978 | if test -n "$ac_maketemp"; then | |
979 | eval ac_cv_prog_make_${ac_make}_set=yes | |
980 | else | |
981 | eval ac_cv_prog_make_${ac_make}_set=no | |
982 | fi | |
983 | rm -f conftestmake | |
984 | fi | |
985 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
986 | echo "$ac_t""yes" 1>&6 | |
987 | SET_MAKE= | |
988 | else | |
989 | echo "$ac_t""no" 1>&6 | |
990 | SET_MAKE="MAKE=${MAKE-make}" | |
991 | fi | |
992 | ||
993 | ||
994 | PACKAGE=bfd | |
995 | ||
5a83fcdd | 996 | VERSION=2.9.1 |
b9bf4aff ILT |
997 | |
998 | if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then | |
999 | { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } | |
1000 | fi | |
1001 | cat >> confdefs.h <<EOF | |
1002 | #define PACKAGE "$PACKAGE" | |
1003 | EOF | |
1004 | ||
1005 | cat >> confdefs.h <<EOF | |
1006 | #define VERSION "$VERSION" | |
1007 | EOF | |
1008 | ||
1009 | ||
1010 | ||
c0734708 ILT |
1011 | missing_dir=`cd $ac_aux_dir && pwd` |
1012 | echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 | |
b9bf4aff | 1013 | echo "configure:1014: checking for working aclocal" >&5 |
c0734708 ILT |
1014 | # Run test in a subshell; some versions of sh will print an error if |
1015 | # an executable is not found, even if stderr is redirected. | |
1016 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
1017 | if (aclocal --version) < /dev/null > /dev/null 2>&1; then | |
1018 | ACLOCAL=aclocal | |
1019 | echo "$ac_t""found" 1>&6 | |
1020 | else | |
1021 | ACLOCAL="$missing_dir/missing aclocal" | |
1022 | echo "$ac_t""missing" 1>&6 | |
1023 | fi | |
1024 | ||
1025 | echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 | |
b9bf4aff | 1026 | echo "configure:1027: checking for working autoconf" >&5 |
c0734708 ILT |
1027 | # Run test in a subshell; some versions of sh will print an error if |
1028 | # an executable is not found, even if stderr is redirected. | |
1029 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
1030 | if (autoconf --version) < /dev/null > /dev/null 2>&1; then | |
1031 | AUTOCONF=autoconf | |
1032 | echo "$ac_t""found" 1>&6 | |
1033 | else | |
1034 | AUTOCONF="$missing_dir/missing autoconf" | |
1035 | echo "$ac_t""missing" 1>&6 | |
1036 | fi | |
1037 | ||
1038 | echo $ac_n "checking for working automake""... $ac_c" 1>&6 | |
b9bf4aff | 1039 | echo "configure:1040: checking for working automake" >&5 |
c0734708 ILT |
1040 | # Run test in a subshell; some versions of sh will print an error if |
1041 | # an executable is not found, even if stderr is redirected. | |
1042 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
1043 | if (automake --version) < /dev/null > /dev/null 2>&1; then | |
1044 | AUTOMAKE=automake | |
1045 | echo "$ac_t""found" 1>&6 | |
1046 | else | |
1047 | AUTOMAKE="$missing_dir/missing automake" | |
1048 | echo "$ac_t""missing" 1>&6 | |
1049 | fi | |
1050 | ||
1051 | echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 | |
b9bf4aff | 1052 | echo "configure:1053: checking for working autoheader" >&5 |
c0734708 ILT |
1053 | # Run test in a subshell; some versions of sh will print an error if |
1054 | # an executable is not found, even if stderr is redirected. | |
1055 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
1056 | if (autoheader --version) < /dev/null > /dev/null 2>&1; then | |
1057 | AUTOHEADER=autoheader | |
1058 | echo "$ac_t""found" 1>&6 | |
1059 | else | |
1060 | AUTOHEADER="$missing_dir/missing autoheader" | |
1061 | echo "$ac_t""missing" 1>&6 | |
1062 | fi | |
1063 | ||
1064 | echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 | |
b9bf4aff | 1065 | echo "configure:1066: checking for working makeinfo" >&5 |
c0734708 ILT |
1066 | # Run test in a subshell; some versions of sh will print an error if |
1067 | # an executable is not found, even if stderr is redirected. | |
1068 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
1069 | if (makeinfo --version) < /dev/null > /dev/null 2>&1; then | |
1070 | MAKEINFO=makeinfo | |
1071 | echo "$ac_t""found" 1>&6 | |
1072 | else | |
1073 | MAKEINFO="$missing_dir/missing makeinfo" | |
1074 | echo "$ac_t""missing" 1>&6 | |
1075 | fi | |
1076 | ||
c0734708 ILT |
1077 | |
1078 | ||
7810074c ILT |
1079 | if test $host != $build; then |
1080 | ac_tool_prefix=${host_alias}- | |
1081 | else | |
1082 | ac_tool_prefix= | |
1083 | fi | |
1084 | ||
1085 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
1086 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
1087 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b9bf4aff | 1088 | echo "configure:1089: checking for $ac_word" >&5 |
7810074c ILT |
1089 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
1090 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1091 | else | |
1092 | if test -n "$AR"; then | |
1093 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
1094 | else | |
1095 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1096 | for ac_dir in $PATH; do | |
1097 | test -z "$ac_dir" && ac_dir=. | |
1098 | if test -f $ac_dir/$ac_word; then | |
1099 | ac_cv_prog_AR="${ac_tool_prefix}ar" | |
1100 | break | |
1101 | fi | |
1102 | done | |
1103 | IFS="$ac_save_ifs" | |
1104 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" | |
1105 | fi | |
1106 | fi | |
1107 | AR="$ac_cv_prog_AR" | |
1108 | if test -n "$AR"; then | |
1109 | echo "$ac_t""$AR" 1>&6 | |
1110 | else | |
1111 | echo "$ac_t""no" 1>&6 | |
1112 | fi | |
1113 | ||
1114 | ||
1115 | ||
1116 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
1117 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
1118 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b9bf4aff | 1119 | echo "configure:1120: checking for $ac_word" >&5 |
7810074c ILT |
1120 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1121 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1122 | else | |
1123 | if test -n "$RANLIB"; then | |
1124 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1125 | else | |
1126 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1127 | for ac_dir in $PATH; do | |
1128 | test -z "$ac_dir" && ac_dir=. | |
1129 | if test -f $ac_dir/$ac_word; then | |
1130 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
1131 | break | |
1132 | fi | |
1133 | done | |
1134 | IFS="$ac_save_ifs" | |
1135 | fi | |
1136 | fi | |
1137 | RANLIB="$ac_cv_prog_RANLIB" | |
1138 | if test -n "$RANLIB"; then | |
1139 | echo "$ac_t""$RANLIB" 1>&6 | |
1140 | else | |
1141 | echo "$ac_t""no" 1>&6 | |
1142 | fi | |
1143 | ||
1144 | ||
1145 | if test -z "$ac_cv_prog_RANLIB"; then | |
1146 | if test -n "$ac_tool_prefix"; then | |
1147 | # Extract the first word of "ranlib", so it can be a program name with args. | |
1148 | set dummy ranlib; ac_word=$2 | |
1149 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b9bf4aff | 1150 | echo "configure:1151: checking for $ac_word" >&5 |
7810074c ILT |
1151 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1152 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1153 | else | |
1154 | if test -n "$RANLIB"; then | |
1155 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1156 | else | |
1157 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1158 | for ac_dir in $PATH; do | |
1159 | test -z "$ac_dir" && ac_dir=. | |
1160 | if test -f $ac_dir/$ac_word; then | |
1161 | ac_cv_prog_RANLIB="ranlib" | |
1162 | break | |
1163 | fi | |
1164 | done | |
1165 | IFS="$ac_save_ifs" | |
1166 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1167 | fi | |
1168 | fi | |
1169 | RANLIB="$ac_cv_prog_RANLIB" | |
1170 | if test -n "$RANLIB"; then | |
1171 | echo "$ac_t""$RANLIB" 1>&6 | |
1172 | else | |
1173 | echo "$ac_t""no" 1>&6 | |
1174 | fi | |
1175 | ||
1176 | else | |
1177 | RANLIB=":" | |
1178 | fi | |
1179 | fi | |
1180 | ||
1181 | ||
b9bf4aff ILT |
1182 | # Check whether --enable-shared or --disable-shared was given. |
1183 | if test "${enable_shared+set}" = set; then | |
1184 | enableval="$enable_shared" | |
1185 | p=${PACKAGE-default} | |
1186 | case "$enableval" in | |
1187 | yes) enable_shared=yes ;; | |
1188 | no) enable_shared=no ;; | |
1189 | *) | |
1190 | enable_shared=no | |
1191 | # Look at the argument we got. We use all the common list separators. | |
1192 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
1193 | for pkg in $enableval; do | |
1194 | if test "X$pkg" = "X$p"; then | |
1195 | enable_shared=yes | |
1196 | fi | |
1197 | done | |
1198 | IFS="$ac_save_ifs" | |
1199 | ;; | |
1200 | esac | |
1201 | else | |
1202 | enable_shared=no | |
1203 | fi | |
1204 | ||
1205 | ||
1206 | # Check whether --enable-static or --disable-static was given. | |
1207 | if test "${enable_static+set}" = set; then | |
1208 | enableval="$enable_static" | |
1209 | p=${PACKAGE-default} | |
1210 | case "$enableval" in | |
1211 | yes) enable_static=yes ;; | |
1212 | no) enable_static=no ;; | |
1213 | *) | |
1214 | enable_static=no | |
1215 | # Look at the argument we got. We use all the common list separators. | |
1216 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
1217 | for pkg in $enableval; do | |
1218 | if test "X$pkg" = "X$p"; then | |
1219 | enable_static=yes | |
1220 | fi | |
1221 | done | |
1222 | IFS="$ac_save_ifs" | |
1223 | ;; | |
1224 | esac | |
1225 | else | |
1226 | enable_static=yes | |
1227 | fi | |
9a837903 | 1228 | |
c0734708 ILT |
1229 | # Extract the first word of "ranlib", so it can be a program name with args. |
1230 | set dummy ranlib; ac_word=$2 | |
1231 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
b9bf4aff | 1232 | echo "configure:1233: checking for $ac_word" >&5 |
c0734708 ILT |
1233 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
1234 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1235 | else | |
1236 | if test -n "$RANLIB"; then | |
1237 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
1238 | else | |
1239 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1240 | for ac_dir in $PATH; do | |
1241 | test -z "$ac_dir" && ac_dir=. | |
1242 | if test -f $ac_dir/$ac_word; then | |
1243 | ac_cv_prog_RANLIB="ranlib" | |
1244 | break | |
1245 | fi | |
1246 | done | |
1247 | IFS="$ac_save_ifs" | |
1248 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
1249 | fi | |
1250 | fi | |
1251 | RANLIB="$ac_cv_prog_RANLIB" | |
1252 | if test -n "$RANLIB"; then | |
1253 | echo "$ac_t""$RANLIB" 1>&6 | |
1254 | else | |
1255 | echo "$ac_t""no" 1>&6 | |
1256 | fi | |
1257 | ||
1258 | # Check whether --with-gnu-ld or --without-gnu-ld was given. | |
1259 | if test "${with_gnu_ld+set}" = set; then | |
1260 | withval="$with_gnu_ld" | |
1261 | test "$withval" = no || with_gnu_ld=yes | |
1262 | else | |
1263 | with_gnu_ld=no | |
1264 | fi | |
1265 | ||
9a837903 ILT |
1266 | |
1267 | ac_prog=ld | |
1268 | if test "$ac_cv_prog_gcc" = yes; then | |
1269 | # Check if gcc -print-prog-name=ld gives a path. | |
1270 | echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 | |
b9bf4aff | 1271 | echo "configure:1272: checking for ld used by GCC" >&5 |
9a837903 ILT |
1272 | ac_prog=`($CC -print-prog-name=ld) 2>&5` |
1273 | case "$ac_prog" in | |
1274 | # Accept absolute paths. | |
5a83fcdd | 1275 | /* | [A-Za-z]:\\*) |
9a837903 ILT |
1276 | test -z "$LD" && LD="$ac_prog" |
1277 | ;; | |
1278 | "") | |
1279 | # If it fails, then pretend we aren't using GCC. | |
1280 | ac_prog=ld | |
1281 | ;; | |
1282 | *) | |
1283 | # If it is relative, then search for the first ld in PATH. | |
1284 | with_gnu_ld=unknown | |
1285 | ;; | |
1286 | esac | |
1287 | elif test "$with_gnu_ld" = yes; then | |
c0734708 | 1288 | echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 |
b9bf4aff | 1289 | echo "configure:1290: checking for GNU ld" >&5 |
c0734708 ILT |
1290 | else |
1291 | echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 | |
b9bf4aff | 1292 | echo "configure:1293: checking for non-GNU ld" >&5 |
c0734708 ILT |
1293 | fi |
1294 | if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then | |
1295 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1296 | else | |
9a837903 | 1297 | if test -z "$LD"; then |
c0734708 ILT |
1298 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" |
1299 | for ac_dir in $PATH; do | |
1300 | test -z "$ac_dir" && ac_dir=. | |
9a837903 ILT |
1301 | if test -f "$ac_dir/$ac_prog"; then |
1302 | ac_cv_path_LD="$ac_dir/$ac_prog" | |
c0734708 ILT |
1303 | # Check to see if the program is GNU ld. I'd rather use --version, |
1304 | # but apparently some GNU ld's only accept -v. | |
1305 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
9a837903 ILT |
1306 | if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then |
1307 | test "$with_gnu_ld" != no && break | |
c0734708 ILT |
1308 | else |
1309 | test "$with_gnu_ld" != yes && break | |
1310 | fi | |
1311 | fi | |
1312 | done | |
1313 | IFS="$ac_save_ifs" | |
9a837903 | 1314 | else |
7810074c | 1315 | ac_cv_path_LD="$LD" # Let the user override the test with a path. |
9a837903 | 1316 | fi |
c0734708 ILT |
1317 | fi |
1318 | ||
1319 | LD="$ac_cv_path_LD" | |
1320 | if test -n "$LD"; then | |
1321 | echo "$ac_t""$LD" 1>&6 | |
1322 | else | |
1323 | echo "$ac_t""no" 1>&6 | |
1324 | fi | |
1325 | test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } | |
1326 | ||
9a837903 | 1327 | echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 |
b9bf4aff | 1328 | echo "configure:1329: checking if the linker ($LD) is GNU ld" >&5 |
c0734708 ILT |
1329 | if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then |
1330 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1331 | else | |
1332 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
9a837903 | 1333 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then |
c0734708 ILT |
1334 | ac_cv_prog_gnu_ld=yes |
1335 | else | |
1336 | ac_cv_prog_gnu_ld=no | |
1337 | fi | |
1338 | fi | |
1339 | ||
1340 | echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 | |
1341 | ||
1342 | ||
9a837903 | 1343 | echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 |
b9bf4aff | 1344 | echo "configure:1345: checking for BSD-compatible nm" >&5 |
9a837903 ILT |
1345 | if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then |
1346 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1347 | else | |
5a83fcdd | 1348 | if test -z "$NM"; then |
9a837903 ILT |
1349 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" |
1350 | for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do | |
b9bf4aff | 1351 | test -z "$ac_dir" && ac_dir=. |
9a837903 ILT |
1352 | if test -f $ac_dir/nm; then |
1353 | # Check to see if the nm accepts a BSD-compat flag. | |
b9bf4aff | 1354 | # Adding the `sed 1q' prevents false positives on HP-UX, which says: |
9a837903 | 1355 | # nm: unknown option "B" ignored |
b9bf4aff | 1356 | if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then |
9a837903 | 1357 | ac_cv_path_NM="$ac_dir/nm -B" |
b9bf4aff | 1358 | elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then |
9a837903 ILT |
1359 | ac_cv_path_NM="$ac_dir/nm -p" |
1360 | else | |
1361 | ac_cv_path_NM="$ac_dir/nm" | |
1362 | fi | |
1363 | break | |
1364 | fi | |
1365 | done | |
1366 | IFS="$ac_save_ifs" | |
1367 | test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm | |
5a83fcdd ILT |
1368 | else |
1369 | ac_cv_path_NM="$NM" # Let the user override the test with a path. | |
1370 | fi | |
9a837903 ILT |
1371 | fi |
1372 | ||
1373 | NM="$ac_cv_path_NM" | |
1374 | echo "$ac_t""$NM" 1>&6 | |
1375 | ||
1376 | ||
c0734708 | 1377 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
5a83fcdd | 1378 | echo "configure:1379: checking whether ln -s works" >&5 |
c0734708 ILT |
1379 | if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then |
1380 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1381 | else | |
1382 | rm -f conftestdata | |
1383 | if ln -s X conftestdata 2>/dev/null | |
1384 | then | |
1385 | rm -f conftestdata | |
1386 | ac_cv_prog_LN_S="ln -s" | |
1387 | else | |
1388 | ac_cv_prog_LN_S=ln | |
1389 | fi | |
1390 | fi | |
1391 | LN_S="$ac_cv_prog_LN_S" | |
1392 | if test "$ac_cv_prog_LN_S" = "ln -s"; then | |
1393 | echo "$ac_t""yes" 1>&6 | |
1394 | else | |
1395 | echo "$ac_t""no" 1>&6 | |
1396 | fi | |
1397 | ||
c0734708 | 1398 | # Always use our own libtool. |
36df40e0 | 1399 | LIBTOOL='$(SHELL) $(top_builddir)/libtool' |
c0734708 | 1400 | |
b9bf4aff ILT |
1401 | # Check for any special flags to pass to ltconfig. |
1402 | libtool_flags= | |
1403 | test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" | |
1404 | test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" | |
c0734708 ILT |
1405 | test "$silent" = yes && libtool_flags="$libtool_flags --silent" |
1406 | test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" | |
1407 | test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" | |
8c693660 | 1408 | |
c0734708 ILT |
1409 | # Some flags need to be propagated to the compiler or linker for good |
1410 | # libtool support. | |
1411 | case "$host" in | |
b9bf4aff | 1412 | *-*-irix6*) |
7ee4e307 | 1413 | # Find out which ABI we are using. |
5a83fcdd ILT |
1414 | echo '#line 1415 "configure"' > conftest.$ac_ext |
1415 | if { (eval echo configure:1416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then | |
7ee4e307 ILT |
1416 | case "`/usr/bin/file conftest.o`" in |
1417 | *32-bit*) | |
1418 | LD="${LD-ld} -32" | |
9a837903 | 1419 | ;; |
7ee4e307 ILT |
1420 | *N32*) |
1421 | LD="${LD-ld} -n32" | |
1422 | ;; | |
1423 | *64-bit*) | |
1424 | LD="${LD-ld} -64" | |
9a837903 ILT |
1425 | ;; |
1426 | esac | |
7ee4e307 ILT |
1427 | fi |
1428 | rm -rf conftest* | |
c0734708 | 1429 | ;; |
8c693660 | 1430 | |
c0734708 ILT |
1431 | *-*-sco3.2v5*) |
1432 | # On SCO OpenServer 5, we need -belf to get full-featured binaries. | |
1433 | CFLAGS="$CFLAGS -belf" | |
1434 | ;; | |
5a83fcdd ILT |
1435 | |
1436 | *-*-cygwin32*) | |
1437 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | |
1438 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
1439 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
1440 | echo "configure:1441: checking for $ac_word" >&5 | |
1441 | if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then | |
1442 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1443 | else | |
1444 | if test -n "$DLLTOOL"; then | |
1445 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
1446 | else | |
1447 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1448 | for ac_dir in $PATH; do | |
1449 | test -z "$ac_dir" && ac_dir=. | |
1450 | if test -f $ac_dir/$ac_word; then | |
1451 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" | |
1452 | break | |
1453 | fi | |
1454 | done | |
1455 | IFS="$ac_save_ifs" | |
1456 | fi | |
1457 | fi | |
1458 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
1459 | if test -n "$DLLTOOL"; then | |
1460 | echo "$ac_t""$DLLTOOL" 1>&6 | |
1461 | else | |
1462 | echo "$ac_t""no" 1>&6 | |
1463 | fi | |
1464 | ||
1465 | ||
1466 | if test -z "$ac_cv_prog_DLLTOOL"; then | |
1467 | if test -n "$ac_tool_prefix"; then | |
1468 | # Extract the first word of "dlltool", so it can be a program name with args. | |
1469 | set dummy dlltool; ac_word=$2 | |
1470 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
1471 | echo "configure:1472: checking for $ac_word" >&5 | |
1472 | if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then | |
1473 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1474 | else | |
1475 | if test -n "$DLLTOOL"; then | |
1476 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
1477 | else | |
1478 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1479 | for ac_dir in $PATH; do | |
1480 | test -z "$ac_dir" && ac_dir=. | |
1481 | if test -f $ac_dir/$ac_word; then | |
1482 | ac_cv_prog_DLLTOOL="dlltool" | |
1483 | break | |
1484 | fi | |
1485 | done | |
1486 | IFS="$ac_save_ifs" | |
1487 | test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false" | |
1488 | fi | |
1489 | fi | |
1490 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
1491 | if test -n "$DLLTOOL"; then | |
1492 | echo "$ac_t""$DLLTOOL" 1>&6 | |
1493 | else | |
1494 | echo "$ac_t""no" 1>&6 | |
1495 | fi | |
1496 | ||
1497 | else | |
1498 | DLLTOOL="false" | |
1499 | fi | |
1500 | fi | |
1501 | ||
1502 | # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. | |
1503 | set dummy ${ac_tool_prefix}as; ac_word=$2 | |
1504 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
1505 | echo "configure:1506: checking for $ac_word" >&5 | |
1506 | if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then | |
1507 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1508 | else | |
1509 | if test -n "$AS"; then | |
1510 | ac_cv_prog_AS="$AS" # Let the user override the test. | |
1511 | else | |
1512 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1513 | for ac_dir in $PATH; do | |
1514 | test -z "$ac_dir" && ac_dir=. | |
1515 | if test -f $ac_dir/$ac_word; then | |
1516 | ac_cv_prog_AS="${ac_tool_prefix}as" | |
1517 | break | |
1518 | fi | |
1519 | done | |
1520 | IFS="$ac_save_ifs" | |
1521 | fi | |
1522 | fi | |
1523 | AS="$ac_cv_prog_AS" | |
1524 | if test -n "$AS"; then | |
1525 | echo "$ac_t""$AS" 1>&6 | |
1526 | else | |
1527 | echo "$ac_t""no" 1>&6 | |
1528 | fi | |
1529 | ||
1530 | ||
1531 | if test -z "$ac_cv_prog_AS"; then | |
1532 | if test -n "$ac_tool_prefix"; then | |
1533 | # Extract the first word of "as", so it can be a program name with args. | |
1534 | set dummy as; ac_word=$2 | |
1535 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
1536 | echo "configure:1537: checking for $ac_word" >&5 | |
1537 | if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then | |
1538 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1539 | else | |
1540 | if test -n "$AS"; then | |
1541 | ac_cv_prog_AS="$AS" # Let the user override the test. | |
1542 | else | |
1543 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1544 | for ac_dir in $PATH; do | |
1545 | test -z "$ac_dir" && ac_dir=. | |
1546 | if test -f $ac_dir/$ac_word; then | |
1547 | ac_cv_prog_AS="as" | |
1548 | break | |
1549 | fi | |
1550 | done | |
1551 | IFS="$ac_save_ifs" | |
1552 | test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false" | |
1553 | fi | |
1554 | fi | |
1555 | AS="$ac_cv_prog_AS" | |
1556 | if test -n "$AS"; then | |
1557 | echo "$ac_t""$AS" 1>&6 | |
1558 | else | |
1559 | echo "$ac_t""no" 1>&6 | |
1560 | fi | |
1561 | ||
1562 | else | |
1563 | AS="false" | |
1564 | fi | |
1565 | fi | |
1566 | ||
1567 | ||
1568 | ;; | |
1569 | ||
8c693660 KR |
1570 | esac |
1571 | ||
c0734708 ILT |
1572 | # Actually configure libtool. ac_aux_dir is where install-sh is found. |
1573 | CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ | |
9a837903 | 1574 | LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \ |
5a83fcdd | 1575 | DLLTOOL="$DLLTOOL" AS="$AS" \ |
c0734708 ILT |
1576 | ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \ |
1577 | $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \ | |
1578 | || { echo "configure: error: libtool configure failed" 1>&2; exit 1; } | |
8c693660 | 1579 | |
8c693660 | 1580 | |
c0734708 ILT |
1581 | # Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given. |
1582 | if test "${enable_64_bit_bfd+set}" = set; then | |
1583 | enableval="$enable_64_bit_bfd" | |
1584 | case "${enableval}" in | |
1585 | yes) want64=true ;; | |
1586 | no) want64=false ;; | |
1587 | *) { echo "configure: error: bad value ${enableval} for 64-bit-bfd option" 1>&2; exit 1; } ;; | |
1588 | esac | |
1589 | else | |
1590 | want64=false | |
1591 | fi | |
1592 | # Check whether --enable-targets or --disable-targets was given. | |
1593 | if test "${enable_targets+set}" = set; then | |
1594 | enableval="$enable_targets" | |
1595 | case "${enableval}" in | |
1596 | yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; } | |
1597 | ;; | |
1598 | no) enable_targets= ;; | |
1599 | *) enable_targets=$enableval ;; | |
1600 | esac | |
1601 | fi | |
1602 | # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given. | |
1603 | if test "${enable_commonbfdlib+set}" = set; then | |
1604 | enableval="$enable_commonbfdlib" | |
1605 | case "${enableval}" in | |
1606 | yes) commonbfdlib=true ;; | |
1607 | no) commonbfdlib=false ;; | |
1608 | *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;; | |
1609 | esac | |
1610 | fi | |
1611 | # Check whether --with-mmap or --without-mmap was given. | |
1612 | if test "${with_mmap+set}" = set; then | |
1613 | withval="$with_mmap" | |
1614 | case "${withval}" in | |
1615 | yes) want_mmap=true ;; | |
1616 | no) want_mmap=false ;; | |
1617 | *) { echo "configure: error: bad value ${withval} for BFD with-mmap option" 1>&2; exit 1; } ;; | |
8c693660 | 1618 | esac |
c0734708 ILT |
1619 | else |
1620 | want_mmap=false | |
1621 | fi | |
1622 | ||
1623 | ||
8c693660 | 1624 | |
8c693660 | 1625 | |
8c693660 KR |
1626 | |
1627 | if test -z "$target" ; then | |
1628 | { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; } | |
1629 | fi | |
1630 | if test "$program_transform_name" = s,x,x,; then | |
1631 | program_transform_name= | |
1632 | else | |
d19df9b5 ILT |
1633 | # Double any \ or $. echo might interpret backslashes. |
1634 | cat <<\EOF_SED > conftestsed | |
1635 | s,\\,\\\\,g; s,\$,$$,g | |
1636 | EOF_SED | |
8c693660 KR |
1637 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" |
1638 | rm -f conftestsed | |
1639 | fi | |
1640 | test "$program_prefix" != NONE && | |
1641 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
1642 | # Use a double $ so make ignores it. | |
1643 | test "$program_suffix" != NONE && | |
1644 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
1645 | ||
1646 | # sed with no file args requires a program. | |
1647 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
1648 | ||
1649 | ||
c0734708 | 1650 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 |
5a83fcdd | 1651 | echo "configure:1652: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
c0734708 ILT |
1652 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
1653 | if test "${enable_maintainer_mode+set}" = set; then | |
1654 | enableval="$enable_maintainer_mode" | |
1655 | USE_MAINTAINER_MODE=$enableval | |
1656 | else | |
1657 | USE_MAINTAINER_MODE=no | |
1658 | fi | |
8c693660 | 1659 | |
c0734708 ILT |
1660 | echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 |
1661 | if test $USE_MAINTAINER_MODE = yes; then | |
1662 | MAINT= | |
44f795f7 | 1663 | else |
c0734708 | 1664 | MAINT='#M#' |
44f795f7 | 1665 | fi |
c0734708 ILT |
1666 | |
1667 | ||
1668 | echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6 | |
5a83fcdd | 1669 | echo "configure:1670: checking for Cygwin32 environment" >&5 |
c0734708 ILT |
1670 | if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then |
1671 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1672 | else | |
1673 | cat > conftest.$ac_ext <<EOF | |
5a83fcdd | 1674 | #line 1675 "configure" |
c0734708 ILT |
1675 | #include "confdefs.h" |
1676 | ||
1677 | int main() { | |
3607f666 | 1678 | return __CYGWIN32__; |
c0734708 ILT |
1679 | ; return 0; } |
1680 | EOF | |
5a83fcdd | 1681 | if { (eval echo configure:1682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
c0734708 ILT |
1682 | rm -rf conftest* |
1683 | am_cv_cygwin32=yes | |
1684 | else | |
1685 | echo "configure: failed program was:" >&5 | |
1686 | cat conftest.$ac_ext >&5 | |
1687 | rm -rf conftest* | |
1688 | am_cv_cygwin32=no | |
1689 | fi | |
1690 | rm -f conftest* | |
1691 | rm -f conftest* | |
1692 | fi | |
1693 | ||
1694 | echo "$ac_t""$am_cv_cygwin32" 1>&6 | |
1695 | CYGWIN32= | |
1696 | test "$am_cv_cygwin32" = yes && CYGWIN32=yes | |
3607f666 | 1697 | echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6 |
5a83fcdd | 1698 | echo "configure:1699: checking for Mingw32 environment" >&5 |
3607f666 BK |
1699 | if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then |
1700 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1701 | else | |
1702 | cat > conftest.$ac_ext <<EOF | |
5a83fcdd | 1703 | #line 1704 "configure" |
3607f666 BK |
1704 | #include "confdefs.h" |
1705 | ||
1706 | int main() { | |
1707 | return __MINGW32__; | |
1708 | ; return 0; } | |
1709 | EOF | |
5a83fcdd | 1710 | if { (eval echo configure:1711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
3607f666 BK |
1711 | rm -rf conftest* |
1712 | am_cv_mingw32=yes | |
1713 | else | |
1714 | echo "configure: failed program was:" >&5 | |
1715 | cat conftest.$ac_ext >&5 | |
1716 | rm -rf conftest* | |
1717 | am_cv_mingw32=no | |
1718 | fi | |
1719 | rm -f conftest* | |
1720 | rm -f conftest* | |
1721 | fi | |
1722 | ||
1723 | echo "$ac_t""$am_cv_mingw32" 1>&6 | |
1724 | MINGW32= | |
1725 | test "$am_cv_mingw32" = yes && MINGW32=yes | |
1726 | ||
70e8e585 | 1727 | |
c0734708 | 1728 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 |
5a83fcdd | 1729 | echo "configure:1730: checking for executable suffix" >&5 |
c0734708 ILT |
1730 | if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then |
1731 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1732 | else | |
b9bf4aff | 1733 | if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then |
c0734708 ILT |
1734 | am_cv_exeext=.exe |
1735 | else | |
1736 | cat > am_c_test.c << 'EOF' | |
1737 | int main() { | |
1738 | /* Nothing needed here */ | |
1739 | } | |
1740 | EOF | |
1741 | ${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5 | |
70e8e585 | 1742 | am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//` |
c0734708 ILT |
1743 | rm -f am_c_test* |
1744 | fi | |
1745 | ||
1746 | test x"${am_cv_exeext}" = x && am_cv_exeext=no | |
44f795f7 | 1747 | fi |
c0734708 ILT |
1748 | EXEEXT="" |
1749 | test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext} | |
1750 | echo "$ac_t""${am_cv_exeext}" 1>&6 | |
1751 | ||
1752 | ||
1753 | host64=false | |
1754 | target64=false | |
1755 | ||
1756 | # host stuff: | |
44f795f7 | 1757 | |
85e493f0 ILT |
1758 | # Extract the first word of "gcc", so it can be a program name with args. |
1759 | set dummy gcc; ac_word=$2 | |
1760 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
5a83fcdd | 1761 | echo "configure:1762: checking for $ac_word" >&5 |
85e493f0 ILT |
1762 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1763 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1764 | else | |
1765 | if test -n "$CC"; then | |
1766 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1767 | else | |
1768 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1769 | for ac_dir in $PATH; do | |
1770 | test -z "$ac_dir" && ac_dir=. | |
1771 | if test -f $ac_dir/$ac_word; then | |
1772 | ac_cv_prog_CC="gcc" | |
1773 | break | |
1774 | fi | |
1775 | done | |
1776 | IFS="$ac_save_ifs" | |
85e493f0 ILT |
1777 | fi |
1778 | fi | |
1779 | CC="$ac_cv_prog_CC" | |
1780 | if test -n "$CC"; then | |
1781 | echo "$ac_t""$CC" 1>&6 | |
1782 | else | |
1783 | echo "$ac_t""no" 1>&6 | |
1784 | fi | |
1785 | ||
986cf3b8 ILT |
1786 | if test -z "$CC"; then |
1787 | # Extract the first word of "cc", so it can be a program name with args. | |
1788 | set dummy cc; ac_word=$2 | |
1789 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
5a83fcdd | 1790 | echo "configure:1791: checking for $ac_word" >&5 |
986cf3b8 ILT |
1791 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1792 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1793 | else | |
1794 | if test -n "$CC"; then | |
1795 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1796 | else | |
1797 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1798 | ac_prog_rejected=no | |
1799 | for ac_dir in $PATH; do | |
1800 | test -z "$ac_dir" && ac_dir=. | |
1801 | if test -f $ac_dir/$ac_word; then | |
1802 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
1803 | ac_prog_rejected=yes | |
1804 | continue | |
1805 | fi | |
1806 | ac_cv_prog_CC="cc" | |
1807 | break | |
1808 | fi | |
1809 | done | |
1810 | IFS="$ac_save_ifs" | |
1811 | if test $ac_prog_rejected = yes; then | |
1812 | # We found a bogon in the path, so make sure we never use it. | |
1813 | set dummy $ac_cv_prog_CC | |
1814 | shift | |
1815 | if test $# -gt 0; then | |
1816 | # We chose a different compiler from the bogus one. | |
1817 | # However, it has the same basename, so the bogon will be chosen | |
1818 | # first if we set CC to just the basename; use the full file name. | |
1819 | shift | |
1820 | set dummy "$ac_dir/$ac_word" "$@" | |
1821 | shift | |
1822 | ac_cv_prog_CC="$@" | |
1823 | fi | |
1824 | fi | |
1825 | fi | |
1826 | fi | |
1827 | CC="$ac_cv_prog_CC" | |
1828 | if test -n "$CC"; then | |
1829 | echo "$ac_t""$CC" 1>&6 | |
1830 | else | |
1831 | echo "$ac_t""no" 1>&6 | |
1832 | fi | |
1833 | ||
1834 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
1835 | fi | |
f515fb2f | 1836 | |
ac388f2a | 1837 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
5a83fcdd | 1838 | echo "configure:1839: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
ac388f2a ILT |
1839 | |
1840 | ac_ext=c | |
1841 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1842 | ac_cpp='$CPP $CPPFLAGS' | |
1843 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
1844 | ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
1845 | cross_compiling=$ac_cv_prog_cc_cross | |
1846 | ||
1847 | cat > conftest.$ac_ext <<EOF | |
5a83fcdd | 1848 | #line 1849 "configure" |
ac388f2a ILT |
1849 | #include "confdefs.h" |
1850 | main(){return(0);} | |
1851 | EOF | |
5a83fcdd | 1852 | if { (eval echo configure:1853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
ac388f2a ILT |
1853 | ac_cv_prog_cc_works=yes |
1854 | # If we can't run a trivial program, we are probably using a cross compiler. | |
1855 | if (./conftest; exit) 2>/dev/null; then | |
1856 | ac_cv_prog_cc_cross=no | |
1857 | else | |
1858 | ac_cv_prog_cc_cross=yes | |
1859 | fi | |
1860 | else | |
1861 | echo "configure: failed program was:" >&5 | |
1862 | cat conftest.$ac_ext >&5 | |
1863 | ac_cv_prog_cc_works=no | |
1864 | fi | |
1865 | rm -fr conftest* | |
1866 | ||
1867 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
1868 | if test $ac_cv_prog_cc_works = no; then | |
1869 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
1870 | fi | |
1871 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
5a83fcdd | 1872 | echo "configure:1873: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
ac388f2a ILT |
1873 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
1874 | cross_compiling=$ac_cv_prog_cc_cross | |
1875 | ||
85e493f0 | 1876 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
5a83fcdd | 1877 | echo "configure:1878: checking whether we are using GNU C" >&5 |
85e493f0 ILT |
1878 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
1879 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1880 | else | |
1881 | cat > conftest.c <<EOF | |
f515fb2f ILT |
1882 | #ifdef __GNUC__ |
1883 | yes; | |
1884 | #endif | |
1885 | EOF | |
5a83fcdd | 1886 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
85e493f0 ILT |
1887 | ac_cv_prog_gcc=yes |
1888 | else | |
1889 | ac_cv_prog_gcc=no | |
1890 | fi | |
1891 | fi | |
1892 | ||
1893 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
ac388f2a | 1894 | |
85e493f0 | 1895 | if test $ac_cv_prog_gcc = yes; then |
f515fb2f | 1896 | GCC=yes |
ac388f2a ILT |
1897 | ac_test_CFLAGS="${CFLAGS+set}" |
1898 | ac_save_CFLAGS="$CFLAGS" | |
1899 | CFLAGS= | |
1900 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
5a83fcdd | 1901 | echo "configure:1902: checking whether ${CC-cc} accepts -g" >&5 |
ac388f2a | 1902 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
85e493f0 ILT |
1903 | echo $ac_n "(cached) $ac_c" 1>&6 |
1904 | else | |
1905 | echo 'void f(){}' > conftest.c | |
1906 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
ac388f2a | 1907 | ac_cv_prog_cc_g=yes |
85e493f0 | 1908 | else |
ac388f2a | 1909 | ac_cv_prog_cc_g=no |
85e493f0 ILT |
1910 | fi |
1911 | rm -f conftest* | |
1912 | ||
1913 | fi | |
1914 | ||
ac388f2a ILT |
1915 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 |
1916 | if test "$ac_test_CFLAGS" = set; then | |
1917 | CFLAGS="$ac_save_CFLAGS" | |
1918 | elif test $ac_cv_prog_cc_g = yes; then | |
1919 | CFLAGS="-g -O2" | |
1920 | else | |
1921 | CFLAGS="-O2" | |
f515fb2f ILT |
1922 | fi |
1923 | else | |
1924 | GCC= | |
1925 | test "${CFLAGS+set}" = set || CFLAGS="-g" | |
1926 | fi | |
f515fb2f ILT |
1927 | |
1928 | ||
55626bf0 ILT |
1929 | # Permit host specific settings. |
1930 | . ${srcdir}/configure.host | |
1931 | ||
f515fb2f | 1932 | |
8c693660 | 1933 | |
5e377ed2 | 1934 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' |
8c693660 KR |
1935 | |
1936 | ||
f4e14cb9 ILT |
1937 | BFD_HOST_64BIT_LONG=0 |
1938 | BFD_HOST_64_BIT_DEFINED=0 | |
1939 | BFD_HOST_64_BIT= | |
1940 | BFD_HOST_U_64_BIT= | |
b7577823 | 1941 | if test "x${HOST_64BIT_TYPE}" = "xlong"; then |
f4e14cb9 ILT |
1942 | BFD_HOST_64BIT_LONG=1 |
1943 | elif test "x${HOST_64BIT_TYPE}" != "x"; then | |
1944 | BFD_HOST_64_BIT_DEFINED=1 | |
1945 | BFD_HOST_64_BIT=${HOST_64BIT_TYPE} | |
1946 | BFD_HOST_U_64_BIT=${HOST_U_64BIT_TYPE} | |
b7577823 ILT |
1947 | fi |
1948 | ||
1949 | ||
f4e14cb9 ILT |
1950 | |
1951 | ||
1952 | ||
b7577823 | 1953 | # Put a plausible default for CC_FOR_BUILD in Makefile. |
6a468850 ILT |
1954 | if test -z "$CC_FOR_BUILD"; then |
1955 | if test "x$cross_compiling" = "xno"; then | |
1956 | CC_FOR_BUILD='$(CC)' | |
1957 | else | |
1958 | CC_FOR_BUILD=gcc | |
1959 | fi | |
8c693660 KR |
1960 | fi |
1961 | ||
2c66160c ILT |
1962 | # Also set EXEEXT_FOR_BUILD. |
1963 | if test "x$cross_compiling" = "xno"; then | |
1964 | EXEEXT_FOR_BUILD='$(EXEEXT)' | |
1965 | else | |
1966 | echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6 | |
5a83fcdd | 1967 | echo "configure:1968: checking for build system executable suffix" >&5 |
2c66160c ILT |
1968 | if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then |
1969 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1970 | else | |
1971 | cat > ac_c_test.c << 'EOF' | |
1972 | int main() { | |
1973 | /* Nothing needed here */ | |
1974 | } | |
1975 | EOF | |
1976 | ${CC_FOR_BUILD} -o ac_c_test am_c_test.c 1>&5 2>&5 | |
1977 | bfd_cv_build_exeext=`echo ac_c_test.* | grep -v ac_c_test.c | sed -e s/ac_c_test//` | |
1978 | rm -f ac_c_test* | |
1979 | test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no | |
1980 | fi | |
1981 | ||
1982 | echo "$ac_t""$bfd_cv_build_exeext" 1>&6 | |
1983 | EXEEXT_FOR_BUILD="" | |
1984 | test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext} | |
1985 | fi | |
1986 | ||
f515fb2f | 1987 | |
b7577823 | 1988 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
5a83fcdd | 1989 | echo "configure:1990: checking how to run the C preprocessor" >&5 |
b7577823 ILT |
1990 | # On Suns, sometimes $CPP names a directory. |
1991 | if test -n "$CPP" && test -d "$CPP"; then | |
1992 | CPP= | |
1993 | fi | |
1994 | if test -z "$CPP"; then | |
1995 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
1996 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1997 | else | |
1998 | # This must be in double quotes, not single quotes, because CPP may get | |
1999 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
2000 | CPP="${CC-cc} -E" | |
2001 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
2002 | # not just through cpp. | |
2003 | cat > conftest.$ac_ext <<EOF | |
5a83fcdd | 2004 | #line 2005 "configure" |
b7577823 ILT |
2005 | #include "confdefs.h" |
2006 | #include <assert.h> | |
2007 | Syntax Error | |
2008 | EOF | |
986cf3b8 | 2009 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
5a83fcdd | 2010 | { (eval echo configure:2011: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
b7577823 ILT |
2011 | ac_err=`grep -v '^ *+' conftest.out` |
2012 | if test -z "$ac_err"; then | |
2013 | : | |
2014 | else | |
2015 | echo "$ac_err" >&5 | |
ac388f2a ILT |
2016 | echo "configure: failed program was:" >&5 |
2017 | cat conftest.$ac_ext >&5 | |
b7577823 ILT |
2018 | rm -rf conftest* |
2019 | CPP="${CC-cc} -E -traditional-cpp" | |
2020 | cat > conftest.$ac_ext <<EOF | |
5a83fcdd | 2021 | #line 2022 "configure" |
b7577823 ILT |
2022 | #include "confdefs.h" |
2023 | #include <assert.h> | |
2024 | Syntax Error | |
2025 | EOF | |
986cf3b8 | 2026 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
5a83fcdd | 2027 | { (eval echo configure:2028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
b7577823 ILT |
2028 | ac_err=`grep -v '^ *+' conftest.out` |
2029 | if test -z "$ac_err"; then | |
2030 | : | |
2031 | else | |
2032 | echo "$ac_err" >&5 | |
ac388f2a ILT |
2033 | echo "configure: failed program was:" >&5 |
2034 | cat conftest.$ac_ext >&5 | |
b7577823 ILT |
2035 | rm -rf conftest* |
2036 | CPP=/lib/cpp | |
2037 | fi | |
2038 | rm -f conftest* | |
2039 | fi | |
2040 | rm -f conftest* | |
2041 | ac_cv_prog_CPP="$CPP" | |
2042 | fi | |
2043 | CPP="$ac_cv_prog_CPP" | |
2044 | else | |
2045 | ac_cv_prog_CPP="$CPP" | |
2046 | fi | |
2047 | echo "$ac_t""$CPP" 1>&6 | |
2048 | ||
2049 | for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h | |
2050 | do | |
ac388f2a | 2051 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
b7577823 | 2052 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
5a83fcdd | 2053 | echo "configure:2054: checking for $ac_hdr" >&5 |
b7577823 ILT |
2054 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2055 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2056 | else | |
2057 | cat > conftest.$ac_ext <<EOF | |
5a83fcdd | 2058 | #line 2059 "configure" |
b7577823 ILT |
2059 | #include "confdefs.h" |
2060 | #include <$ac_hdr> | |
2061 | EOF | |
986cf3b8 | 2062 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
5a83fcdd | 2063 | { (eval echo configure:2064: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
b7577823 ILT |
2064 | ac_err=`grep -v '^ *+' conftest.out` |
2065 | if test -z "$ac_err"; then | |
2066 | rm -rf conftest* | |
2067 | eval "ac_cv_header_$ac_safe=yes" | |
2068 | else | |
2069 | echo "$ac_err" >&5 | |
ac388f2a ILT |
2070 | echo "configure: failed program was:" >&5 |
2071 | cat conftest.$ac_ext >&5 | |
b7577823 ILT |
2072 | rm -rf conftest* |
2073 | eval "ac_cv_header_$ac_safe=no" | |
2074 | fi | |
2075 | rm -f conftest* | |
2076 | fi | |
2077 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2078 | echo "$ac_t""yes" 1>&6 | |
ac388f2a | 2079 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
b7577823 ILT |
2080 | cat >> confdefs.h <<EOF |
2081 | #define $ac_tr_hdr 1 | |
2082 | EOF | |
2083 | ||
2084 | else | |
2085 | echo "$ac_t""no" 1>&6 | |
2086 | fi | |
2087 | done | |
2088 | ||
ab1aa5cd | 2089 | for ac_hdr in fcntl.h sys/file.h sys/time.h |
b7577823 | 2090 | do |
ac388f2a | 2091 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
b7577823 | 2092 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
5a83fcdd | 2093 | echo "configure:2094: checking for $ac_hdr" >&5 |
b7577823 ILT |
2094 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2095 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2096 | else | |
2097 | cat > conftest.$ac_ext <<EOF | |
5a83fcdd | 2098 | #line 2099 "configure" |
b7577823 ILT |
2099 | #include "confdefs.h" |
2100 | #include <$ac_hdr> | |
2101 | EOF | |
986cf3b8 | 2102 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
5a83fcdd | 2103 | { (eval echo configure:2104: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
b7577823 ILT |
2104 | ac_err=`grep -v '^ *+' conftest.out` |
2105 | if test -z "$ac_err"; then | |
2106 | rm -rf conftest* | |
2107 | eval "ac_cv_header_$ac_safe=yes" | |
2108 | else | |
2109 | echo "$ac_err" >&5 | |
ac388f2a ILT |
2110 | echo "configure: failed program was:" >&5 |
2111 | cat conftest.$ac_ext >&5 | |
b7577823 ILT |
2112 | rm -rf conftest* |
2113 | eval "ac_cv_header_$ac_safe=no" | |
2114 | fi | |
2115 | rm -f conftest* | |
2116 | fi | |
2117 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
2118 | echo "$ac_t""yes" 1>&6 | |
ac388f2a | 2119 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
b7577823 ILT |
2120 | cat >> confdefs.h <<EOF |
2121 | #define $ac_tr_hdr 1 | |
2122 | EOF | |
2123 | ||
2124 | else | |
2125 | echo "$ac_t""no" 1>&6 | |
2126 | fi | |
2127 | done | |
2128 | ||
ab1aa5cd | 2129 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 |
5a83fcdd | 2130 | echo "configure:2131: checking whether time.h and sys/time.h may both be included" >&5 |
ab1aa5cd FF |
2131 | if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then |
2132 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2133 | else | |
2134 | cat > conftest.$ac_ext <<EOF | |
5a83fcdd | 2135 | #line 2136 "configure" |
ab1aa5cd FF |
2136 | #include "confdefs.h" |
2137 | #include <sys/types.h> | |
2138 | #include <sys/time.h> | |
2139 | #include <time.h> | |
ac388f2a | 2140 | int main() { |
ab1aa5cd FF |
2141 | struct tm *tp; |
2142 | ; return 0; } | |
2143 | EOF | |
5a83fcdd | 2144 | if { (eval echo configure:2145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
ab1aa5cd FF |
2145 | rm -rf conftest* |
2146 | ac_cv_header_time=yes | |
2147 | else | |
ac388f2a ILT |
2148 | echo "configure: failed program was:" >&5 |
2149 | cat conftest.$ac_ext >&5 | |
ab1aa5cd FF |
2150 | rm -rf conftest* |
2151 | ac_cv_header_time=no | |
2152 | fi | |
2153 | rm -f conftest* | |
ab1aa5cd FF |
2154 | fi |
2155 | ||
2156 | echo "$ac_t""$ac_cv_header_time" 1>&6 | |
2157 | if test $ac_cv_header_time = yes; then | |
2158 | cat >> confdefs.h <<\EOF | |
2159 | #define TIME_WITH_SYS_TIME 1 | |
2160 | EOF | |
2161 | ||
2162 | fi | |
2163 | ||
60f1ad85 | 2164 | for ac_func in fcntl getpagesize setitimer sysconf fdopen |
b7577823 ILT |
2165 | do |
2166 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
5a83fcdd | 2167 | echo "configure:2168: checking for $ac_func" >&5 |
b7577823 ILT |
2168 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2169 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2170 | else | |
2171 | cat > conftest.$ac_ext <<EOF | |
5a83fcdd | 2172 | #line 2173 "configure" |
b7577823 ILT |
2173 | #include "confdefs.h" |
2174 | /* System header to define __stub macros and hopefully few prototypes, | |
2175 | which can conflict with char $ac_func(); below. */ | |
2176 | #include <assert.h> | |
2177 | /* Override any gcc2 internal prototype to avoid an error. */ | |
a4322a77 ILT |
2178 | /* We use char because int might match the return type of a gcc2 |
2179 | builtin and then its argument prototype would still apply. */ | |
85e493f0 | 2180 | char $ac_func(); |
b7577823 | 2181 | |
ac388f2a | 2182 | int main() { |
b7577823 ILT |
2183 | |
2184 | /* The GNU C library defines this for functions which it implements | |
2185 | to always fail with ENOSYS. Some functions are actually named | |
2186 | something starting with __ and the normal name is an alias. */ | |
2187 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
2188 | choke me | |
2189 | #else | |
2190 | $ac_func(); | |
2191 | #endif | |
2192 | ||
2193 | ; return 0; } | |
2194 | EOF | |
5a83fcdd | 2195 | if { (eval echo configure:2196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
b7577823 ILT |
2196 | rm -rf conftest* |
2197 | eval "ac_cv_func_$ac_func=yes" | |
2198 | else | |
ac388f2a ILT |
2199 | echo "configure: failed program was:" >&5 |
2200 | cat conftest.$ac_ext >&5 | |
b7577823 ILT |
2201 | rm -rf conftest* |
2202 | eval "ac_cv_func_$ac_func=no" | |
2203 | fi | |
2204 | rm -f conftest* | |
fd8d7c31 | 2205 | fi |
ac388f2a | 2206 | |
b7577823 ILT |
2207 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
2208 | echo "$ac_t""yes" 1>&6 | |
85e493f0 | 2209 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
b7577823 ILT |
2210 | cat >> confdefs.h <<EOF |
2211 | #define $ac_tr_func 1 | |
2212 | EOF | |
2213 | ||
2214 | else | |
2215 | echo "$ac_t""no" 1>&6 | |
2216 | fi | |
2217 | done | |
2218 | ||
2219 | ||
85e493f0 | 2220 | |
b7577823 | 2221 | case "${host}" in |
847b9629 | 2222 | i[345]86-*-msdos* | i[345]86-*-go32* | i[345]86-*-mingw32* | *-*-cygwin32* | *-*-windows) |
b7577823 ILT |
2223 | cat >> confdefs.h <<\EOF |
2224 | #define USE_BINARY_FOPEN 1 | |
2225 | EOF | |
2226 | ;; | |
2227 | esac | |
2228 | ||
f7954d86 | 2229 | echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 |
5a83fcdd | 2230 | echo "configure:2231: checking whether strstr must be declared" >&5 |
f7954d86 MM |
2231 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then |
2232 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2233 | else | |
2234 | cat > conftest.$ac_ext <<EOF | |
5a83fcdd | 2235 | #line 2236 "configure" |
f7954d86 MM |
2236 | #include "confdefs.h" |
2237 | ||
2238 | #include <stdio.h> | |
2239 | #ifdef HAVE_STRING_H | |
2240 | #include <string.h> | |
2241 | #else | |
2242 | #ifdef HAVE_STRINGS_H | |
2243 | #include <strings.h> | |
2244 | #endif | |
2245 | #endif | |
2246 | #ifdef HAVE_STDLIB_H | |
2247 | #include <stdlib.h> | |
2248 | #endif | |
2249 | #ifdef HAVE_UNISTD_H | |
2250 | #include <unistd.h> | |
2251 | #endif | |
ac388f2a | 2252 | int main() { |
f7954d86 MM |
2253 | char *(*pfn) = (char *(*)) strstr |
2254 | ; return 0; } | |
2255 | EOF | |
5a83fcdd | 2256 | if { (eval echo configure:2257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
f7954d86 MM |
2257 | rm -rf conftest* |
2258 | bfd_cv_decl_needed_strstr=no | |
2259 | else | |
ac388f2a ILT |
2260 | echo "configure: failed program was:" >&5 |
2261 | cat conftest.$ac_ext >&5 | |
f7954d86 MM |
2262 | rm -rf conftest* |
2263 | bfd_cv_decl_needed_strstr=yes | |
2264 | fi | |
2265 | rm -f conftest* | |
f7954d86 MM |
2266 | fi |
2267 | ||
2268 | echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6 | |
2269 | if test $bfd_cv_decl_needed_strstr = yes; then | |
2270 | bfd_tr_decl=NEED_DECLARATION_`echo strstr | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2271 | cat >> confdefs.h <<EOF | |
2272 | #define $bfd_tr_decl 1 | |
2273 | EOF | |
2274 | ||
2275 | fi | |
2276 | ||
b7577823 | 2277 | echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 |
5a83fcdd | 2278 | echo "configure:2279: checking whether malloc must be declared" >&5 |
b7577823 ILT |
2279 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then |
2280 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2281 | else | |
2282 | cat > conftest.$ac_ext <<EOF | |
5a83fcdd | 2283 | #line 2284 "configure" |
b7577823 ILT |
2284 | #include "confdefs.h" |
2285 | ||
2286 | #include <stdio.h> | |
f7954d86 MM |
2287 | #ifdef HAVE_STRING_H |
2288 | #include <string.h> | |
2289 | #else | |
2290 | #ifdef HAVE_STRINGS_H | |
2291 | #include <strings.h> | |
2292 | #endif | |
2293 | #endif | |
b7577823 ILT |
2294 | #ifdef HAVE_STDLIB_H |
2295 | #include <stdlib.h> | |
2296 | #endif | |
2297 | #ifdef HAVE_UNISTD_H | |
2298 | #include <unistd.h> | |
2299 | #endif | |
ac388f2a | 2300 | int main() { |
b7577823 ILT |
2301 | char *(*pfn) = (char *(*)) malloc |
2302 | ; return 0; } | |
2303 | EOF | |
5a83fcdd | 2304 | if { (eval echo configure:2305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b7577823 ILT |
2305 | rm -rf conftest* |
2306 | bfd_cv_decl_needed_malloc=no | |
2307 | else | |
ac388f2a ILT |
2308 | echo "configure: failed program was:" >&5 |
2309 | cat conftest.$ac_ext >&5 | |
b7577823 ILT |
2310 | rm -rf conftest* |
2311 | bfd_cv_decl_needed_malloc=yes | |
2312 | fi | |
2313 | rm -f conftest* | |
b7577823 ILT |
2314 | fi |
2315 | ||
2316 | echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 | |
2317 | if test $bfd_cv_decl_needed_malloc = yes; then | |
85e493f0 ILT |
2318 | bfd_tr_decl=NEED_DECLARATION_`echo malloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
2319 | cat >> confdefs.h <<EOF | |
2320 | #define $bfd_tr_decl 1 | |
b7577823 | 2321 | EOF |
f515fb2f | 2322 | |
2b79a104 ILT |
2323 | fi |
2324 | ||
f7954d86 | 2325 | echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 |
5a83fcdd | 2326 | echo "configure:2327: checking whether realloc must be declared" >&5 |
f7954d86 MM |
2327 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then |
2328 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2329 | else | |
2330 | cat > conftest.$ac_ext <<EOF | |
5a83fcdd | 2331 | #line 2332 "configure" |
f7954d86 MM |
2332 | #include "confdefs.h" |
2333 | ||
2334 | #include <stdio.h> | |
2335 | #ifdef HAVE_STRING_H | |
2336 | #include <string.h> | |
2337 | #else | |
2338 | #ifdef HAVE_STRINGS_H | |
2339 | #include <strings.h> | |
2340 | #endif | |
2341 | #endif | |
2342 | #ifdef HAVE_STDLIB_H | |
2343 | #include <stdlib.h> | |
2344 | #endif | |
2345 | #ifdef HAVE_UNISTD_H | |
2346 | #include <unistd.h> | |
2347 | #endif | |
ac388f2a | 2348 | int main() { |
f7954d86 MM |
2349 | char *(*pfn) = (char *(*)) realloc |
2350 | ; return 0; } | |
2351 | EOF | |
5a83fcdd | 2352 | if { (eval echo configure:2353: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
f7954d86 MM |
2353 | rm -rf conftest* |
2354 | bfd_cv_decl_needed_realloc=no | |
2355 | else | |
ac388f2a ILT |
2356 | echo "configure: failed program was:" >&5 |
2357 | cat conftest.$ac_ext >&5 | |
f7954d86 MM |
2358 | rm -rf conftest* |
2359 | bfd_cv_decl_needed_realloc=yes | |
2360 | fi | |
2361 | rm -f conftest* | |
f7954d86 MM |
2362 | fi |
2363 | ||
2364 | echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6 | |
2365 | if test $bfd_cv_decl_needed_realloc = yes; then | |
2366 | bfd_tr_decl=NEED_DECLARATION_`echo realloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2367 | cat >> confdefs.h <<EOF | |
2368 | #define $bfd_tr_decl 1 | |
2369 | EOF | |
2370 | ||
2371 | fi | |
2372 | ||
b7577823 | 2373 | echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 |
5a83fcdd | 2374 | echo "configure:2375: checking whether free must be declared" >&5 |
b7577823 ILT |
2375 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then |
2376 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2377 | else | |
2378 | cat > conftest.$ac_ext <<EOF | |
5a83fcdd | 2379 | #line 2380 "configure" |
b7577823 | 2380 | #include "confdefs.h" |
8c693660 | 2381 | |
b7577823 | 2382 | #include <stdio.h> |
f7954d86 MM |
2383 | #ifdef HAVE_STRING_H |
2384 | #include <string.h> | |
2385 | #else | |
2386 | #ifdef HAVE_STRINGS_H | |
2387 | #include <strings.h> | |
2388 | #endif | |
2389 | #endif | |
b7577823 ILT |
2390 | #ifdef HAVE_STDLIB_H |
2391 | #include <stdlib.h> | |
2392 | #endif | |
2393 | #ifdef HAVE_UNISTD_H | |
2394 | #include <unistd.h> | |
2395 | #endif | |
ac388f2a | 2396 | int main() { |
85e493f0 | 2397 | char *(*pfn) = (char *(*)) free |
b7577823 ILT |
2398 | ; return 0; } |
2399 | EOF | |
5a83fcdd | 2400 | if { (eval echo configure:2401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b7577823 ILT |
2401 | rm -rf conftest* |
2402 | bfd_cv_decl_needed_free=no | |
2403 | else | |
ac388f2a ILT |
2404 | echo "configure: failed program was:" >&5 |
2405 | cat conftest.$ac_ext >&5 | |
b7577823 ILT |
2406 | rm -rf conftest* |
2407 | bfd_cv_decl_needed_free=yes | |
2408 | fi | |
2409 | rm -f conftest* | |
b7577823 ILT |
2410 | fi |
2411 | ||
2412 | echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 | |
2413 | if test $bfd_cv_decl_needed_free = yes; then | |
85e493f0 ILT |
2414 | bfd_tr_decl=NEED_DECLARATION_`echo free | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
2415 | cat >> confdefs.h <<EOF | |
2416 | #define $bfd_tr_decl 1 | |
b7577823 ILT |
2417 | EOF |
2418 | ||
2419 | fi | |
f515fb2f | 2420 | |
dee99794 | 2421 | echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6 |
5a83fcdd | 2422 | echo "configure:2423: checking whether getenv must be declared" >&5 |
dee99794 ILT |
2423 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then |
2424 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2425 | else | |
2426 | cat > conftest.$ac_ext <<EOF | |
5a83fcdd | 2427 | #line 2428 "configure" |
dee99794 ILT |
2428 | #include "confdefs.h" |
2429 | ||
2430 | #include <stdio.h> | |
2431 | #ifdef HAVE_STRING_H | |
2432 | #include <string.h> | |
2433 | #else | |
2434 | #ifdef HAVE_STRINGS_H | |
2435 | #include <strings.h> | |
2436 | #endif | |
2437 | #endif | |
2438 | #ifdef HAVE_STDLIB_H | |
2439 | #include <stdlib.h> | |
2440 | #endif | |
2441 | #ifdef HAVE_UNISTD_H | |
2442 | #include <unistd.h> | |
2443 | #endif | |
ac388f2a | 2444 | int main() { |
dee99794 ILT |
2445 | char *(*pfn) = (char *(*)) getenv |
2446 | ; return 0; } | |
2447 | EOF | |
5a83fcdd | 2448 | if { (eval echo configure:2449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
dee99794 ILT |
2449 | rm -rf conftest* |
2450 | bfd_cv_decl_needed_getenv=no | |
2451 | else | |
ac388f2a ILT |
2452 | echo "configure: failed program was:" >&5 |
2453 | cat conftest.$ac_ext >&5 | |
dee99794 ILT |
2454 | rm -rf conftest* |
2455 | bfd_cv_decl_needed_getenv=yes | |
2456 | fi | |
2457 | rm -f conftest* | |
dee99794 ILT |
2458 | fi |
2459 | ||
2460 | echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6 | |
2461 | if test $bfd_cv_decl_needed_getenv = yes; then | |
2462 | bfd_tr_decl=NEED_DECLARATION_`echo getenv | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
2463 | cat >> confdefs.h <<EOF | |
2464 | #define $bfd_tr_decl 1 | |
2465 | EOF | |
2466 | ||
2467 | fi | |
2468 | ||
85e493f0 | 2469 | |
a52a3ce8 ILT |
2470 | # If we are configured native, pick a core file support file. |
2471 | COREFILE= | |
2472 | COREFLAG= | |
2473 | if test "${target}" = "${host}"; then | |
2474 | case "${host}" in | |
5303c574 | 2475 | alpha*-*-linux-gnu*) |
c0734708 | 2476 | COREFILE=trad-core.lo |
999cc186 ILT |
2477 | cat >> confdefs.h <<\EOF |
2478 | #define TRAD_HEADER "hosts/alphalinux.h" | |
2479 | EOF | |
2480 | ||
2481 | ;; | |
eee4e8ca | 2482 | alpha*-*-netbsd*) COREFILE=netbsd-core.lo ;; |
c0734708 ILT |
2483 | alpha*-*-*) COREFILE=osf-core.lo ;; |
2484 | arm-*-riscix) COREFILE=trad-core.lo ;; | |
2485 | hppa*-*-hpux*) COREFILE=hpux-core.lo ;; | |
2486 | hppa*-*-hiux*) COREFILE=hpux-core.lo ;; | |
2487 | hppa*-*-bsd*) COREFILE="hpux-core.lo hppabsd-core.lo" | |
a52a3ce8 | 2488 | COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;; |
f7954d86 | 2489 | i[3456]86-sequent-bsd*) |
c0734708 | 2490 | COREFILE=trad-core.lo; |
b7577823 ILT |
2491 | cat >> confdefs.h <<\EOF |
2492 | #define TRAD_HEADER "hosts/symmetry.h" | |
2493 | EOF | |
2494 | ||
2495 | ;; | |
f7954d86 MM |
2496 | i[3456]86-sequent-sysv4*) ;; |
2497 | i[3456]86-sequent-sysv*) | |
c0734708 | 2498 | COREFILE=trad-core.lo |
b7577823 ILT |
2499 | cat >> confdefs.h <<\EOF |
2500 | #define TRAD_HEADER "hosts/symmetry.h" | |
2501 | EOF | |
2502 | ||
2503 | ;; | |
f7954d86 | 2504 | i[3456]86-*-bsd* | i[3456]86-*-freebsd*) |
c0734708 | 2505 | COREFILE=trad-core.lo |
b7577823 ILT |
2506 | cat >> confdefs.h <<\EOF |
2507 | #define TRAD_HEADER "hosts/i386bsd.h" | |
69a374c0 NH |
2508 | EOF |
2509 | ||
2510 | ;; | |
3b1b0308 | 2511 | i[3456]86-*-netbsd* | i[3456]86-*-openbsd*) |
c0734708 | 2512 | COREFILE=netbsd-core.lo |
b7577823 | 2513 | ;; |
f7954d86 | 2514 | i[3456]86-esix-sysv3*) |
c0734708 | 2515 | COREFILE=trad-core.lo |
b7577823 ILT |
2516 | cat >> confdefs.h <<\EOF |
2517 | #define TRAD_HEADER "hosts/esix.h" | |
2518 | EOF | |
2519 | ||
2520 | ;; | |
f7954d86 | 2521 | i[3456]86-*-sco* | i[3456]86-*-isc*) |
c0734708 | 2522 | COREFILE=trad-core.lo |
b7577823 ILT |
2523 | cat >> confdefs.h <<\EOF |
2524 | #define TRAD_HEADER "hosts/i386sco.h" | |
2525 | EOF | |
2526 | ||
2527 | ;; | |
f7954d86 | 2528 | i[3456]86-*-mach3*) |
c0734708 | 2529 | COREFILE=trad-core.lo |
b7577823 ILT |
2530 | cat >> confdefs.h <<\EOF |
2531 | #define TRAD_HEADER "hosts/i386mach3.h" | |
2532 | EOF | |
2533 | ||
2534 | ;; | |
5303c574 | 2535 | i[3456]86-*-linux-gnu*) |
c0734708 | 2536 | COREFILE=trad-core.lo |
b7577823 ILT |
2537 | cat >> confdefs.h <<\EOF |
2538 | #define TRAD_HEADER "hosts/i386linux.h" | |
2539 | EOF | |
2540 | ||
2541 | ;; | |
c0734708 ILT |
2542 | i[3456]86-*-isc*) COREFILE=trad-core.lo ;; |
2543 | i[3456]86-*-aix*) COREFILE=aix386-core.lo ;; | |
cf587de8 | 2544 | i860-*-mach3* | i860-*-osf1*) |
c0734708 | 2545 | COREFILE=trad-core.lo |
cf587de8 ILT |
2546 | cat >> confdefs.h <<\EOF |
2547 | #define TRAD_HEADER "hosts/i860mach3.h" | |
2548 | EOF | |
2549 | ||
2550 | ;; | |
b7577823 | 2551 | mips-dec-bsd*) |
c0734708 | 2552 | COREFILE=trad-core.lo |
b7577823 ILT |
2553 | cat >> confdefs.h <<\EOF |
2554 | #define TRAD_HEADER "hosts/mipsbsd.h" | |
2555 | EOF | |
2556 | ||
2557 | ;; | |
2558 | mips-dec-mach3*) | |
c0734708 | 2559 | COREFILE=trad-core.lo |
b7577823 ILT |
2560 | cat >> confdefs.h <<\EOF |
2561 | #define TRAD_HEADER "hosts/mipsmach3.h" | |
2562 | EOF | |
2563 | ||
2564 | ;; | |
3b1b0308 | 2565 | mips-*-netbsd* | mips*-*-openbsd*) |
c0734708 | 2566 | COREFILE=netbsd-core.lo |
69a374c0 | 2567 | ;; |
b7577823 | 2568 | mips-dec-*) |
c0734708 | 2569 | COREFILE=trad-core.lo |
b7577823 ILT |
2570 | cat >> confdefs.h <<\EOF |
2571 | #define TRAD_HEADER "hosts/decstation.h" | |
2572 | EOF | |
2573 | ||
2574 | ;; | |
c0734708 ILT |
2575 | mips-sgi-irix4*) COREFILE=irix-core.lo ;; |
2576 | mips-sgi-irix5*) COREFILE=irix-core.lo ;; | |
2577 | mips-sgi-irix6*) COREFILE=irix-core.lo ;; | |
b7577823 | 2578 | mips-*-mach3*) |
c0734708 | 2579 | COREFILE=trad-core.lo |
b7577823 ILT |
2580 | cat >> confdefs.h <<\EOF |
2581 | #define TRAD_HEADER "hosts/mipsmach3.h" | |
2582 | EOF | |
2583 | ||
2584 | ;; | |
a52a3ce8 | 2585 | mips-*-sysv4*) ;; |
b7577823 | 2586 | mips-*-sysv* | mips-*-riscos*) |
c0734708 | 2587 | COREFILE=trad-core.lo |
b7577823 ILT |
2588 | cat >> confdefs.h <<\EOF |
2589 | #define TRAD_HEADER "hosts/riscos.h" | |
2590 | EOF | |
2591 | ||
2592 | ;; | |
2593 | mips-sony-bsd*) | |
c0734708 | 2594 | COREFILE=trad-core.lo |
b7577823 | 2595 | cat >> confdefs.h <<\EOF |
ab1aa5cd | 2596 | #define TRAD_HEADER "hosts/news-mips.h" |
b7577823 ILT |
2597 | EOF |
2598 | ||
2599 | ;; | |
2600 | m68*-bull*-sysv*) | |
c0734708 | 2601 | COREFILE=trad-core.lo |
b7577823 ILT |
2602 | cat >> confdefs.h <<\EOF |
2603 | #define TRAD_HEADER "hosts/dpx2.h" | |
2604 | EOF | |
2605 | ||
2606 | ;; | |
c0734708 | 2607 | m68*-hp-hpux*) COREFILE=hpux-core.lo ;; |
b7577823 | 2608 | m68*-hp-bsd*) |
c0734708 | 2609 | COREFILE=trad-core.lo |
b7577823 ILT |
2610 | cat >> confdefs.h <<\EOF |
2611 | #define TRAD_HEADER "hosts/hp300bsd.h" | |
55626bf0 ILT |
2612 | EOF |
2613 | ||
2614 | ;; | |
5303c574 | 2615 | m68*-*-linux-gnu*) |
c0734708 | 2616 | COREFILE=trad-core.lo |
55626bf0 ILT |
2617 | cat >> confdefs.h <<\EOF |
2618 | #define TRAD_HEADER "hosts/m68klinux.h" | |
7f82c7e1 ILT |
2619 | EOF |
2620 | ||
2621 | ;; | |
4c8b9746 | 2622 | m68*-motorola-sysv*) |
c0734708 | 2623 | COREFILE=trad-core.lo |
7f82c7e1 ILT |
2624 | cat >> confdefs.h <<\EOF |
2625 | #define TRAD_HEADER "hosts/delta68.h" | |
b7577823 ILT |
2626 | EOF |
2627 | ||
2628 | ;; | |
b7577823 | 2629 | m68*-sony-*) |
c0734708 | 2630 | COREFILE=trad-core.lo |
b7577823 ILT |
2631 | cat >> confdefs.h <<\EOF |
2632 | #define TRAD_HEADER "hosts/news.h" | |
69a374c0 NH |
2633 | EOF |
2634 | ||
2635 | ;; | |
3b1b0308 | 2636 | m68*-*-netbsd* | m68*-*-openbsd*) |
c0734708 | 2637 | COREFILE=netbsd-core.lo |
d19df9b5 ILT |
2638 | ;; |
2639 | m68*-apple-aux*) | |
c0734708 | 2640 | COREFILE=trad-core.lo |
d19df9b5 ILT |
2641 | cat >> confdefs.h <<\EOF |
2642 | #define TRAD_HEADER "hosts/m68kaux.h" | |
b7577823 ILT |
2643 | EOF |
2644 | ||
2645 | ;; | |
a52a3ce8 | 2646 | m88*-*-sysv4*) ;; |
c0734708 | 2647 | m88*-motorola-sysv*) COREFILE=ptrace-core.lo ;; |
b7577823 | 2648 | m88*-*-mach3*) |
c0734708 | 2649 | COREFILE=trad-core.lo |
b7577823 ILT |
2650 | cat >> confdefs.h <<\EOF |
2651 | #define TRAD_HEADER "hosts/m88kmach3.h" | |
2652 | EOF | |
2653 | ||
2654 | ;; | |
2655 | ns32k-pc532-mach) | |
c0734708 | 2656 | COREFILE=trad-core.lo |
b7577823 ILT |
2657 | cat >> confdefs.h <<\EOF |
2658 | #define TRAD_HEADER "hosts/pc532mach.h" | |
69a374c0 NH |
2659 | EOF |
2660 | ||
2661 | ;; | |
3b1b0308 | 2662 | ns32k-*-netbsd* | ns32k-*-openbsd*) |
c0734708 | 2663 | COREFILE=netbsd-core.lo |
b7577823 | 2664 | ;; |
c0734708 ILT |
2665 | rs6000-*-lynx*) COREFILE=lynx-core.lo ;; |
2666 | rs6000-*-aix4*) COREFILE=rs6000-core.lo ;; | |
2667 | rs6000-*-*) COREFILE=rs6000-core.lo ;; | |
2668 | powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;; | |
2669 | powerpc-*-aix4*) COREFILE=rs6000-core.lo ;; | |
2670 | powerpc-*-aix*) COREFILE=rs6000-core.lo ;; | |
ac388f2a | 2671 | powerpc-*-beos*) ;; |
eee4e8ca | 2672 | powerpc-*-netbsd*) COREFILE=netbsd-core.lo ;; |
3b1b0308 | 2673 | sparc-*-netbsd* | sparc-*-openbsd*) |
c0734708 | 2674 | COREFILE=netbsd-core.lo |
69a374c0 | 2675 | ;; |
b7577823 | 2676 | tahoe-*-*) |
c0734708 | 2677 | COREFILE=trad-core.lo |
b7577823 ILT |
2678 | cat >> confdefs.h <<\EOF |
2679 | #define TRAD_HEADER "hosts/tahoe.h" | |
2680 | EOF | |
2681 | ||
2682 | ;; | |
2683 | vax-*-ultrix2*) | |
c0734708 | 2684 | COREFILE=trad-core.lo |
b7577823 ILT |
2685 | cat >> confdefs.h <<\EOF |
2686 | #define TRAD_HEADER "hosts/vaxult2.h" | |
2687 | EOF | |
2688 | ||
2689 | ;; | |
2690 | vax-*-ultrix*) | |
c0734708 | 2691 | COREFILE=trad-core.lo |
b7577823 ILT |
2692 | cat >> confdefs.h <<\EOF |
2693 | #define TRAD_HEADER "hosts/vaxult2.h" | |
2694 | EOF | |
2695 | ||
2696 | ;; | |
2697 | vax-*-*) | |
c0734708 | 2698 | COREFILE=trad-core.lo |
b7577823 ILT |
2699 | cat >> confdefs.h <<\EOF |
2700 | #define TRAD_HEADER "hosts/vaxbsd.h" | |
2701 | EOF | |
2702 | ||
2703 | ;; | |
a52a3ce8 ILT |
2704 | esac |
2705 | ||
2706 | case "$COREFILE" in | |
c0734708 ILT |
2707 | aix386-core.lo) COREFLAG=-DAIX386_CORE ;; |
2708 | hppabsd-core.lo) COREFLAG=-DHPPABSD_CORE ;; | |
2709 | hpux-core.lo) COREFLAG=-DHPUX_CORE ;; | |
2710 | irix-core.lo) COREFLAG=-DIRIX_CORE ;; | |
2711 | lynx-core.lo) COREFLAG=-DLYNX_CORE ;; | |
eee4e8ca | 2712 | netbsd-core.lo) COREFLAG=-DNETBSD_CORE ;; |
c0734708 ILT |
2713 | osf-core.lo) COREFLAG=-DOSF_CORE ;; |
2714 | ptrace-core.lo) COREFLAG=-DPTRACE_CORE ;; | |
2715 | rs6000-core.lo) COREFLAG="$COREFLAG -DAIX_CORE" ;; | |
2716 | trad-core.lo) COREFLAG="$COREFLAG -DTRAD_CORE" ;; | |
a52a3ce8 | 2717 | esac |
1dff7902 ILT |
2718 | |
2719 | # The ELF code uses the native <sys/procfs.h> to handle core files. | |
2720 | # Define HAVE_SYS_PROCFS_H if the file exists and defines | |
2721 | # prstatus_t. | |
2722 | echo $ac_n "checking for sys/procfs.h""... $ac_c" 1>&6 | |
5a83fcdd | 2723 | echo "configure:2724: checking for sys/procfs.h" >&5 |
1dff7902 ILT |
2724 | if eval "test \"`echo '$''{'bfd_cv_header_sys_procfs_h'+set}'`\" = set"; then |
2725 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2726 | else | |
2727 | cat > conftest.$ac_ext <<EOF | |
5a83fcdd | 2728 | #line 2729 "configure" |
1dff7902 ILT |
2729 | #include "confdefs.h" |
2730 | #include <sys/procfs.h> | |
ac388f2a | 2731 | int main() { |
1dff7902 ILT |
2732 | prstatus_t t; |
2733 | ; return 0; } | |
2734 | EOF | |
5a83fcdd | 2735 | if { (eval echo configure:2736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
1dff7902 ILT |
2736 | rm -rf conftest* |
2737 | bfd_cv_header_sys_procfs_h=yes | |
2738 | else | |
ac388f2a ILT |
2739 | echo "configure: failed program was:" >&5 |
2740 | cat conftest.$ac_ext >&5 | |
1dff7902 ILT |
2741 | rm -rf conftest* |
2742 | bfd_cv_header_sys_procfs_h=no | |
2743 | fi | |
2744 | rm -f conftest* | |
1dff7902 ILT |
2745 | fi |
2746 | ||
2747 | echo "$ac_t""$bfd_cv_header_sys_procfs_h" 1>&6 | |
2748 | if test $bfd_cv_header_sys_procfs_h = yes; then | |
2749 | cat >> confdefs.h <<\EOF | |
2750 | #define HAVE_SYS_PROCFS_H 1 | |
2751 | EOF | |
2752 | ||
2753 | fi | |
2754 | ||
a52a3ce8 ILT |
2755 | fi |
2756 | ||
2757 | ||
2758 | ||
5a83fcdd ILT |
2759 | # Horrible hacks to build DLLs on Windows. |
2760 | WIN32LDFLAGS= | |
2761 | WIN32LIBADD= | |
2762 | case "${host}" in | |
2763 | *-*-cygwin32*) | |
2764 | if test "$enable_shared" = "yes"; then | |
2765 | WIN32LDFLAGS="-no-undefined" | |
2766 | WIN32LIBADD="-L`pwd`/../libiberty -liberty -lcygwin" | |
2767 | fi | |
2768 | ;; | |
2769 | esac | |
2770 | ||
2771 | ||
2772 | ||
8c693660 KR |
2773 | # target stuff: |
2774 | ||
2775 | # Canonicalize the secondary target names. | |
2776 | if test -n "$enable_targets" ; then | |
2777 | for targ in `echo $enable_targets | sed 's/,/ /g'` | |
2778 | do | |
60f1ad85 | 2779 | result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ 2>/dev/null` |
8c693660 KR |
2780 | if test -n "$result" ; then |
2781 | canon_targets="$canon_targets $result" | |
2782 | else | |
2783 | # Allow targets that config.sub doesn't recognize, like "all". | |
2784 | canon_targets="$canon_targets $targ" | |
2785 | fi | |
2786 | done | |
2787 | fi | |
2788 | ||
2789 | all_targets=false | |
2b79a104 ILT |
2790 | defvec= |
2791 | selvecs= | |
2792 | selarchs= | |
2793 | TDEFINES= | |
8c693660 KR |
2794 | for targ in $target $canon_targets |
2795 | do | |
2b79a104 | 2796 | if test "x$targ" = "xall"; then |
8c693660 KR |
2797 | all_targets=true |
2798 | else | |
2b79a104 ILT |
2799 | . $srcdir/config.bfd |
2800 | if test "x$targ" = "x$target"; then | |
2801 | defvec=$targ_defvec | |
8c693660 | 2802 | fi |
2b79a104 ILT |
2803 | selvecs="$selvecs $targ_defvec $targ_selvecs" |
2804 | selarchs="$selarchs $targ_archs" | |
2805 | TDEFINES="$TDEFINES $targ_cflags" | |
8c693660 KR |
2806 | fi |
2807 | done | |
2808 | ||
8c693660 KR |
2809 | |
2810 | # This processing still needs to be done if we're to decide properly whether | |
2811 | # 64-bit support needs to be compiled in. Currently, it will be included if | |
2812 | # the default or any other explicitly requested target requires it; it | |
2813 | # will not be included on a 32-bit host if no 64-bit target is requested, and | |
2814 | # no "--with-64-bit-bfd" option is given, even if "--with-targets=all" is | |
2815 | # used. | |
2816 | ||
2b79a104 | 2817 | # uniq the default and selected vectors in all the configured targets. |
8c693660 | 2818 | f="" |
2b79a104 | 2819 | for i in $selvecs ; do |
8c693660 KR |
2820 | case " $f " in |
2821 | *" $i "*) ;; | |
2822 | *) f="$f $i" ;; | |
2823 | esac | |
2824 | done | |
2b79a104 | 2825 | selvecs="$f" |
8c693660 | 2826 | |
36df40e0 DE |
2827 | # start-sanitize-sky |
2828 | # dvp is really mips, but we need to distinguish it from mips for opcodes | |
2829 | selarchs=`echo $selarchs | sed -e s/dvp/mips/g` | |
2830 | # end-sanitize-sky | |
2831 | ||
2b79a104 | 2832 | # uniq the architectures in all the configured targets. |
8c693660 | 2833 | f="" |
2b79a104 | 2834 | for i in $selarchs ; do |
8c693660 KR |
2835 | case " $f " in |
2836 | *" $i "*) ;; | |
2837 | *) f="$f $i" ;; | |
2838 | esac | |
2839 | done | |
2b79a104 | 2840 | selarchs="$f" |
8c693660 KR |
2841 | |
2842 | # Target backend .o files. | |
2843 | tb= | |
2844 | ||
b9bf4aff | 2845 | elf="elf.lo elflink.lo dwarf2.lo" |
a52a3ce8 | 2846 | |
2b79a104 | 2847 | for vec in $selvecs |
8c693660 KR |
2848 | do |
2849 | case "$vec" in | |
2850 | # This list is alphabetized to make it easy to compare | |
2851 | # with the two vector lists in targets.c. | |
c0734708 ILT |
2852 | a29kcoff_big_vec) tb="$tb coff-a29k.lo cofflink.lo" ;; |
2853 | a_out_adobe_vec) tb="$tb aout-adobe.lo aout32.lo" ;; | |
2854 | armcoff_little_vec) tb="$tb coff-arm.lo cofflink.lo " ;; | |
2855 | armcoff_big_vec) tb="$tb coff-arm.lo cofflink.lo " ;; | |
5a83fcdd ILT |
2856 | armpe_little_vec) tb="$tb pe-arm.lo coff-arm.lo cofflink.lo " ;; |
2857 | armpe_big_vec) tb="$tb pe-arm.lo coff-arm.lo cofflink.lo " ;; | |
c0734708 ILT |
2858 | armpei_little_vec) tb="$tb pei-arm.lo cofflink.lo " ;; |
2859 | armpei_big_vec) tb="$tb pei-arm.lo cofflink.lo " ;; | |
2860 | aout0_big_vec) tb="$tb aout0.lo aout32.lo" ;; | |
2861 | aout_arm_big_vec) tb="$tb aout-arm.lo aout32.lo" ;; | |
2862 | aout_arm_little_vec) tb="$tb aout-arm.lo aout32.lo" ;; | |
2863 | aout_mips_big_vec) tb="$tb mipsbsd.lo aout32.lo" ;; | |
2864 | aout_mips_little_vec) tb="$tb mipsbsd.lo aout32.lo" ;; | |
2865 | apollocoff_vec) tb="$tb coff-apollo.lo" ;; | |
2866 | b_out_vec_big_host) tb="$tb bout.lo aout32.lo" ;; | |
2867 | b_out_vec_little_host) tb="$tb bout.lo aout32.lo" ;; | |
2868 | bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf" | |
50bd50d4 | 2869 | target64=true ;; |
c0734708 ILT |
2870 | bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;; |
2871 | bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;; | |
c0734708 ILT |
2872 | bfd_elf32_big_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;; |
2873 | bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;; | |
2874 | bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo" | |
d1bf45aa | 2875 | target64=true ;; |
c0734708 | 2876 | bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;; |
fd8d7c31 | 2877 | # start-sanitize-d30v |
c0734708 | 2878 | bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;; |
fd8d7c31 | 2879 | # end-sanitize-d30v |
c0734708 ILT |
2880 | bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; |
2881 | bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;; | |
2882 | bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;; | |
2883 | bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;; | |
2884 | bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;; | |
2885 | bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo" | |
d1bf45aa | 2886 | target64=true ;; |
c0734708 ILT |
2887 | bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;; |
2888 | bfd_elf32_m68k_vec) tb="$tb elf32-m68k.lo elf32.lo $elf" ;; | |
2889 | bfd_elf32_m88k_vec) tb="$tb elf32-m88k.lo elf32.lo $elf" ;; | |
2890 | bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;; | |
2891 | bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;; | |
2892 | bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;; | |
2893 | bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;; | |
2894 | bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;; | |
2895 | bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;; | |
2896 | bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;; | |
c0734708 | 2897 | bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;; |
c0734708 | 2898 | bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf" |
8c693660 | 2899 | target64=true ;; |
c0734708 | 2900 | bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf" |
8c693660 | 2901 | target64=true ;; |
c0734708 | 2902 | bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf" |
8c693660 | 2903 | target64=true ;; |
c0734708 ILT |
2904 | cisco_core_vec) tb="$tb cisco-core.lo" ;; |
2905 | demo_64_vec) tb="$tb demo64.lo aout64.lo" | |
8c693660 | 2906 | target64=true ;; |
c0734708 ILT |
2907 | ecoff_big_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;; |
2908 | ecoff_little_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;; | |
2909 | ecoff_biglittle_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;; | |
2910 | ecoffalpha_little_vec) tb="$tb coff-alpha.lo ecoff.lo ecofflink.lo" | |
8c693660 | 2911 | target64=true ;; |
c0734708 | 2912 | go32coff_vec) tb="$tb coff-go32.lo cofflink.lo" ;; |
70e8e585 | 2913 | go32stubbedcoff_vec) tb="$tb coff-stgo32.lo cofflink.lo" ;; |
c0734708 | 2914 | evax_alpha_vec) tb="$tb evax-alpha.lo evax-emh.lo evax-egsd.lo evax-etir.lo evax-misc.lo" |
50bd50d4 | 2915 | target64=true ;; |
c0734708 ILT |
2916 | h8300coff_vec) tb="$tb coff-h8300.lo reloc16.lo" ;; |
2917 | h8500coff_vec) tb="$tb coff-h8500.lo reloc16.lo" ;; | |
2918 | host_aout_vec) tb="$tb host-aout.lo aout32.lo" ;; | |
2919 | hp300bsd_vec) tb="$tb hp300bsd.lo aout32.lo" ;; | |
2920 | hp300hpux_vec) tb="$tb hp300hpux.lo aout32.lo" ;; | |
2921 | i386aout_vec) tb="$tb i386aout.lo aout32.lo" ;; | |
2922 | i386bsd_vec) tb="$tb i386bsd.lo aout32.lo" ;; | |
2923 | i386coff_vec) tb="$tb coff-i386.lo cofflink.lo" ;; | |
2924 | i386dynix_vec) tb="$tb i386dynix.lo aout32.lo" ;; | |
2925 | i386freebsd_vec) tb="$tb i386freebsd.lo aout32.lo" ;; | |
2926 | i386msdos_vec) tb="$tb i386msdos.lo" ;; | |
2927 | i386pe_vec) tb="$tb pe-i386.lo cofflink.lo " ;; | |
2928 | i386pei_vec) tb="$tb pei-i386.lo cofflink.lo" ;; | |
2929 | i386linux_vec) tb="$tb i386linux.lo aout32.lo" ;; | |
2930 | i386lynx_aout_vec) tb="$tb i386lynx.lo lynx-core.lo aout32.lo" ;; | |
2931 | i386lynx_coff_vec) tb="$tb cf-i386lynx.lo cofflink.lo lynx-core.lo" ;; | |
2932 | i386mach3_vec) tb="$tb i386mach3.lo aout32.lo" ;; | |
2933 | i386netbsd_vec) tb="$tb i386netbsd.lo aout32.lo" ;; | |
2934 | i386os9k_vec) tb="$tb i386os9k.lo aout32.lo" ;; | |
2935 | i860coff_vec) tb="$tb coff-i860.lo cofflink.lo" ;; | |
2936 | icoff_big_vec) tb="$tb coff-i960.lo cofflink.lo" ;; | |
2937 | icoff_little_vec) tb="$tb coff-i960.lo cofflink.lo" ;; | |
2938 | ieee_vec) tb="$tb ieee.lo" ;; | |
2939 | m68kcoff_vec) tb="$tb coff-m68k.lo cofflink.lo" ;; | |
2940 | m68kcoffun_vec) tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;; | |
2941 | m68klinux_vec) tb="$tb m68klinux.lo aout32.lo" ;; | |
2942 | m68klynx_aout_vec) tb="$tb m68klynx.lo lynx-core.lo aout32.lo" ;; | |
2943 | m68klynx_coff_vec) tb="$tb cf-m68klynx.lo coff-m68k.lo cofflink.lo lynx-core.lo" ;; | |
2944 | m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;; | |
2945 | m68k4knetbsd_vec) tb="$tb m68k4knetbsd.lo aout32.lo" ;; | |
2946 | m68kaux_coff_vec) tb="$tb coff-aux.lo coff-m68k.lo cofflink.lo" ;; | |
2947 | m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;; | |
2948 | m88kbcs_vec) tb="$tb coff-m88k.lo" ;; | |
2949 | newsos3_vec) tb="$tb newsos3.lo aout32.lo" ;; | |
2950 | nlm32_i386_vec) tb="$tb nlm32-i386.lo nlm32.lo nlm.lo" ;; | |
2951 | nlm32_sparc_vec) tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;; | |
2952 | nlm32_alpha_vec) tb="$tb nlm32-alpha.lo nlm32.lo nlm.lo" | |
8c693660 | 2953 | target64=true ;; |
c0734708 ILT |
2954 | riscix_vec) tb="$tb aout32.lo riscix.lo" ;; |
2955 | nlm32_powerpc_vec) tb="$tb nlm32-ppc.lo nlm32.lo nlm.lo" ;; | |
2956 | pc532netbsd_vec) tb="$tb ns32knetbsd.lo aout-ns32k.lo" ;; | |
2957 | pc532machaout_vec) tb="$tb pc532-mach.lo aout-ns32k.lo" ;; | |
2958 | pmac_xcoff_vec) tb="$tb coff-pmac.lo xcofflink.lo" ;; | |
2959 | rs6000coff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;; | |
2960 | bfd_powerpc_pe_vec) tb="$tb pe-ppc.lo cofflink.lo" ;; | |
2961 | bfd_powerpcle_pe_vec) tb="$tb pe-ppc.lo cofflink.lo" ;; | |
2962 | bfd_powerpc_pei_vec) tb="$tb pei-ppc.lo cofflink.lo" ;; | |
2963 | bfd_powerpcle_pei_vec) tb="$tb pei-ppc.lo cofflink.lo" ;; | |
2964 | ppcboot_vec) tb="$tb ppcboot.lo" ;; | |
2965 | shcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;; | |
2966 | shlcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;; | |
18ed85fd ILT |
2967 | shcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;; |
2968 | shlcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;; | |
c0734708 ILT |
2969 | som_vec) tb="$tb som.lo" ;; |
2970 | sparcle_aout_vec) tb="$tb aout-sparcle.lo aout32.lo" ;; | |
eee4e8ca | 2971 | sparclinux_vec) tb="$tb sparclinux.lo aout32.lo" ;; |
c0734708 ILT |
2972 | sparclynx_aout_vec) tb="$tb sparclynx.lo lynx-core.lo aout32.lo" ;; |
2973 | sparclynx_coff_vec) tb="$tb cf-sparclynx.lo lynx-core.lo" ;; | |
2974 | sparcnetbsd_vec) tb="$tb sparcnetbsd.lo aout32.lo" ;; | |
2975 | sparccoff_vec) tb="$tb coff-sparc.lo" ;; | |
2976 | srec_vec) tb="$tb srec.lo" ;; | |
2977 | sunos_big_vec) tb="$tb sunos.lo aout32.lo" ;; | |
2978 | symbolsrec_vec) tb="$tb srec.lo" ;; | |
2979 | tekhex_vec) tb="$tb tekhex.lo" ;; | |
229811d1 JM |
2980 | tic30_aout_vec) tb="$tb aout-tic30.lo" ;; |
2981 | tic30_coff_vec) tb="$tb coff-tic30.lo" ;; | |
cd6213ff | 2982 | # start-sanitize-tic80 |
c0734708 | 2983 | tic80coff_vec) tb="$tb coff-tic80.lo cofflink.lo" ;; |
cd6213ff | 2984 | # end-sanitize-tic80 |
c0734708 ILT |
2985 | we32kcoff_vec) tb="$tb coff-we32k.lo" ;; |
2986 | z8kcoff_vec) tb="$tb coff-z8k.lo reloc16.lo" ;; | |
2987 | w65_vec) tb="$tb coff-w65.lo reloc16.lo" ;; | |
2988 | versados_vec) tb="$tb versados.lo" ;; | |
8c693660 KR |
2989 | |
2990 | "") ;; | |
2991 | *) { echo "configure: error: *** unknown target vector $vec" 1>&2; exit 1; } ;; | |
2992 | esac | |
2993 | done | |
2994 | ||
2995 | # Target architecture .o files. | |
b872076e ILT |
2996 | # A couple of CPUs use shorter file names to avoid problems on DOS |
2997 | # filesystems. | |
c0734708 | 2998 | ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.lo/g -e s/mn10200/m10200/ -e s/mn10300/m10300/` |
8c693660 KR |
2999 | |
3000 | # Weed out duplicate .o files. | |
3001 | f="" | |
3002 | for i in $tb ; do | |
3003 | case " $f " in | |
3004 | *" $i "*) ;; | |
3005 | *) f="$f $i" ;; | |
3006 | esac | |
3007 | done | |
3008 | tb="$f" | |
3009 | ||
3010 | f="" | |
3011 | for i in $ta ; do | |
3012 | case " $f " in | |
3013 | *" $i "*) ;; | |
3014 | *) f="$f $i" ;; | |
3015 | esac | |
3016 | done | |
3017 | ta="$f" | |
3018 | ||
3019 | bfd_backends="$tb" | |
3020 | bfd_machines="$ta" | |
3021 | ||
3022 | if test x${all_targets} = xtrue ; then | |
3023 | bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)' | |
3024 | bfd_machines="${bfd_machines}"' $(ALL_MACHINES)' | |
2b79a104 | 3025 | selvecs= |
dee99794 | 3026 | havevecs= |
2b79a104 | 3027 | selarchs= |
8c693660 KR |
3028 | else # all_targets is true |
3029 | # Only set these if they will be nonempty, for the clever echo. | |
dee99794 ILT |
3030 | havevecs= |
3031 | test -n "$selvecs" && | |
3032 | havevecs=`echo $selvecs | sed -e 's/^/-DHAVE_/' -e 's/ \(.\)/ -DHAVE_\1/g'` | |
2b79a104 ILT |
3033 | test -n "$selvecs" && |
3034 | selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'` | |
3035 | test -n "$selarchs" && | |
2ffbb79a | 3036 | selarchs=`echo $selarchs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'` |
8c693660 KR |
3037 | fi # all_targets is true |
3038 | ||
3039 | case ${host64}-${target64}-${want64} in | |
3040 | *true*) | |
3041 | wordsize=64 | |
3042 | all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)' | |
194141a9 | 3043 | if test -z "$GCC" && test "$BFD_HOST_64BIT_LONG" = "0" && test "$BFD_HOST_64_BIT_DEFINED" = "0"; then |
50bd50d4 MH |
3044 | echo "configure: warning: You have requested a 64 bit BFD configuration, but" 1>&2 |
3045 | echo "configure: warning: your compiler may not have a 64 bit integral type" 1>&2 | |
3046 | fi | |
8c693660 KR |
3047 | ;; |
3048 | false-false-false) | |
3049 | wordsize=32 | |
3050 | all_backends='$(BFD32_BACKENDS)' | |
3051 | ;; | |
3052 | esac | |
3053 | ||
3054 | ||
3055 | ||
3056 | ||
3057 | ||
3058 | ||
8c693660 KR |
3059 | tdefaults="" |
3060 | test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}" | |
3061 | test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'" | |
3062 | test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'" | |
dee99794 | 3063 | test -n "${havevecs}" && tdefaults="${tdefaults} ${havevecs}" |
8c693660 KR |
3064 | |
3065 | ||
ac388f2a ILT |
3066 | for ac_hdr in unistd.h |
3067 | do | |
3068 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3069 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
5a83fcdd | 3070 | echo "configure:3071: checking for $ac_hdr" >&5 |
ac388f2a | 3071 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
dfc7020d ILT |
3072 | echo $ac_n "(cached) $ac_c" 1>&6 |
3073 | else | |
ac388f2a | 3074 | cat > conftest.$ac_ext <<EOF |
5a83fcdd | 3075 | #line 3076 "configure" |
dfc7020d | 3076 | #include "confdefs.h" |
ac388f2a | 3077 | #include <$ac_hdr> |
dfc7020d | 3078 | EOF |
ac388f2a | 3079 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
5a83fcdd | 3080 | { (eval echo configure:3081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
ac388f2a ILT |
3081 | ac_err=`grep -v '^ *+' conftest.out` |
3082 | if test -z "$ac_err"; then | |
3083 | rm -rf conftest* | |
3084 | eval "ac_cv_header_$ac_safe=yes" | |
dfc7020d | 3085 | else |
ac388f2a ILT |
3086 | echo "$ac_err" >&5 |
3087 | echo "configure: failed program was:" >&5 | |
3088 | cat conftest.$ac_ext >&5 | |
3089 | rm -rf conftest* | |
3090 | eval "ac_cv_header_$ac_safe=no" | |
dfc7020d | 3091 | fi |
ac388f2a | 3092 | rm -f conftest* |
dfc7020d | 3093 | fi |
ac388f2a ILT |
3094 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
3095 | echo "$ac_t""yes" 1>&6 | |
3096 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3097 | cat >> confdefs.h <<EOF | |
3098 | #define $ac_tr_hdr 1 | |
3099 | EOF | |
3100 | ||
3101 | else | |
3102 | echo "$ac_t""no" 1>&6 | |
dfc7020d | 3103 | fi |
ac388f2a | 3104 | done |
dfc7020d | 3105 | |
ac388f2a | 3106 | for ac_func in getpagesize |
d19df9b5 ILT |
3107 | do |
3108 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
5a83fcdd | 3109 | echo "configure:3110: checking for $ac_func" >&5 |
d19df9b5 ILT |
3110 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3111 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3112 | else | |
3113 | cat > conftest.$ac_ext <<EOF | |
5a83fcdd | 3114 | #line 3115 "configure" |
d19df9b5 ILT |
3115 | #include "confdefs.h" |
3116 | /* System header to define __stub macros and hopefully few prototypes, | |
3117 | which can conflict with char $ac_func(); below. */ | |
3118 | #include <assert.h> | |
3119 | /* Override any gcc2 internal prototype to avoid an error. */ | |
a4322a77 ILT |
3120 | /* We use char because int might match the return type of a gcc2 |
3121 | builtin and then its argument prototype would still apply. */ | |
d19df9b5 ILT |
3122 | char $ac_func(); |
3123 | ||
ac388f2a | 3124 | int main() { |
d19df9b5 ILT |
3125 | |
3126 | /* The GNU C library defines this for functions which it implements | |
3127 | to always fail with ENOSYS. Some functions are actually named | |
3128 | something starting with __ and the normal name is an alias. */ | |
3129 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3130 | choke me | |
3131 | #else | |
3132 | $ac_func(); | |
3133 | #endif | |
3134 | ||
3135 | ; return 0; } | |
3136 | EOF | |
5a83fcdd | 3137 | if { (eval echo configure:3138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
d19df9b5 ILT |
3138 | rm -rf conftest* |
3139 | eval "ac_cv_func_$ac_func=yes" | |
3140 | else | |
ac388f2a ILT |
3141 | echo "configure: failed program was:" >&5 |
3142 | cat conftest.$ac_ext >&5 | |
d19df9b5 ILT |
3143 | rm -rf conftest* |
3144 | eval "ac_cv_func_$ac_func=no" | |
3145 | fi | |
3146 | rm -f conftest* | |
fd8d7c31 | 3147 | fi |
ac388f2a | 3148 | |
d19df9b5 ILT |
3149 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
3150 | echo "$ac_t""yes" 1>&6 | |
3151 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3152 | cat >> confdefs.h <<EOF | |
3153 | #define $ac_tr_func 1 | |
3154 | EOF | |
3155 | ||
3156 | else | |
3157 | echo "$ac_t""no" 1>&6 | |
3158 | fi | |
3159 | done | |
3160 | ||
4fe6d901 | 3161 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 |
5a83fcdd | 3162 | echo "configure:3163: checking for working mmap" >&5 |
ac388f2a | 3163 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
4fe6d901 KR |
3164 | echo $ac_n "(cached) $ac_c" 1>&6 |
3165 | else | |
3166 | if test "$cross_compiling" = yes; then | |
ac388f2a | 3167 | ac_cv_func_mmap_fixed_mapped=no |
4fe6d901 | 3168 | else |
ac388f2a | 3169 | cat > conftest.$ac_ext <<EOF |
5a83fcdd | 3170 | #line 3171 "configure" |
4fe6d901 KR |
3171 | #include "confdefs.h" |
3172 | ||
ac388f2a ILT |
3173 | /* Thanks to Mike Haertel and Jim Avera for this test. |
3174 | Here is a matrix of mmap possibilities: | |
3175 | mmap private not fixed | |
3176 | mmap private fixed at somewhere currently unmapped | |
3177 | mmap private fixed at somewhere already mapped | |
3178 | mmap shared not fixed | |
3179 | mmap shared fixed at somewhere currently unmapped | |
3180 | mmap shared fixed at somewhere already mapped | |
3181 | For private mappings, we should verify that changes cannot be read() | |
3182 | back from the file, nor mmap's back from the file at a different | |
3183 | address. (There have been systems where private was not correctly | |
3184 | implemented like the infamous i386 svr4.0, and systems where the | |
3185 | VM page cache was not coherent with the filesystem buffer cache | |
3186 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
3187 | For shared mappings, we should conversely verify that changes get | |
3188 | propogated back to all the places they're supposed to be. | |
3189 | ||
3190 | Grep wants private fixed already mapped. | |
3191 | The main things grep needs to know about mmap are: | |
3192 | * does it exist and is it safe to write into the mmap'd area | |
3193 | * how to use it (BSD variants) */ | |
4fe6d901 KR |
3194 | #include <sys/types.h> |
3195 | #include <fcntl.h> | |
3196 | #include <sys/mman.h> | |
3197 | ||
ac388f2a | 3198 | /* This mess was copied from the GNU getpagesize.h. */ |
4fe6d901 | 3199 | #ifndef HAVE_GETPAGESIZE |
ac388f2a ILT |
3200 | # ifdef HAVE_UNISTD_H |
3201 | # include <unistd.h> | |
dfc7020d ILT |
3202 | # endif |
3203 | ||
ac388f2a ILT |
3204 | /* Assume that all systems that can run configure have sys/param.h. */ |
3205 | # ifndef HAVE_SYS_PARAM_H | |
3206 | # define HAVE_SYS_PARAM_H 1 | |
3207 | # endif | |
3208 | ||
3209 | # ifdef _SC_PAGESIZE | |
3210 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
3211 | # else /* no _SC_PAGESIZE */ | |
3212 | # ifdef HAVE_SYS_PARAM_H | |
3213 | # include <sys/param.h> | |
3214 | # ifdef EXEC_PAGESIZE | |
3215 | # define getpagesize() EXEC_PAGESIZE | |
3216 | # else /* no EXEC_PAGESIZE */ | |
3217 | # ifdef NBPG | |
3218 | # define getpagesize() NBPG * CLSIZE | |
3219 | # ifndef CLSIZE | |
3220 | # define CLSIZE 1 | |
3221 | # endif /* no CLSIZE */ | |
3222 | # else /* no NBPG */ | |
3223 | # ifdef NBPC | |
3224 | # define getpagesize() NBPC | |
3225 | # else /* no NBPC */ | |
3226 | # ifdef PAGESIZE | |
3227 | # define getpagesize() PAGESIZE | |
3228 | # endif /* PAGESIZE */ | |
3229 | # endif /* no NBPC */ | |
3230 | # endif /* no NBPG */ | |
3231 | # endif /* no EXEC_PAGESIZE */ | |
3232 | # else /* no HAVE_SYS_PARAM_H */ | |
3233 | # define getpagesize() 8192 /* punt totally */ | |
3234 | # endif /* no HAVE_SYS_PARAM_H */ | |
3235 | # endif /* no _SC_PAGESIZE */ | |
3236 | ||
3237 | #endif /* no HAVE_GETPAGESIZE */ | |
4fe6d901 KR |
3238 | |
3239 | #ifdef __cplusplus | |
ac388f2a | 3240 | extern "C" { void *malloc(unsigned); } |
4fe6d901 | 3241 | #else |
ac388f2a | 3242 | char *malloc(); |
4fe6d901 KR |
3243 | #endif |
3244 | ||
3245 | int | |
3246 | main() | |
3247 | { | |
ac388f2a ILT |
3248 | char *data, *data2, *data3; |
3249 | int i, pagesize; | |
3250 | int fd; | |
3251 | ||
3252 | pagesize = getpagesize(); | |
3253 | ||
3254 | /* | |
3255 | * First, make a file with some known garbage in it. | |
3256 | */ | |
3257 | data = malloc(pagesize); | |
3258 | if (!data) | |
3259 | exit(1); | |
3260 | for (i = 0; i < pagesize; ++i) | |
3261 | *(data + i) = rand(); | |
3262 | umask(0); | |
3263 | fd = creat("conftestmmap", 0600); | |
3264 | if (fd < 0) | |
3265 | exit(1); | |
3266 | if (write(fd, data, pagesize) != pagesize) | |
3267 | exit(1); | |
3268 | close(fd); | |
3269 | ||
3270 | /* | |
3271 | * Next, try to mmap the file at a fixed address which | |
3272 | * already has something else allocated at it. If we can, | |
3273 | * also make sure that we see the same garbage. | |
3274 | */ | |
3275 | fd = open("conftestmmap", O_RDWR); | |
3276 | if (fd < 0) | |
3277 | exit(1); | |
3278 | data2 = malloc(2 * pagesize); | |
3279 | if (!data2) | |
3280 | exit(1); | |
3281 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
3282 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
3283 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
3284 | exit(1); | |
3285 | for (i = 0; i < pagesize; ++i) | |
3286 | if (*(data + i) != *(data2 + i)) | |
3287 | exit(1); | |
3288 | ||
3289 | /* | |
3290 | * Finally, make sure that changes to the mapped area | |
3291 | * do not percolate back to the file as seen by read(). | |
3292 | * (This is a bug on some variants of i386 svr4.0.) | |
3293 | */ | |
3294 | for (i = 0; i < pagesize; ++i) | |
3295 | *(data2 + i) = *(data2 + i) + 1; | |
3296 | data3 = malloc(pagesize); | |
3297 | if (!data3) | |
3298 | exit(1); | |
3299 | if (read(fd, data3, pagesize) != pagesize) | |
3300 | exit(1); | |
3301 | for (i = 0; i < pagesize; ++i) | |
3302 | if (*(data + i) != *(data3 + i)) | |
3303 | exit(1); | |
3304 | close(fd); | |
3305 | unlink("conftestmmap"); | |
3306 | exit(0); | |
4fe6d901 KR |
3307 | } |
3308 | ||
3309 | EOF | |
5a83fcdd | 3310 | if { (eval echo configure:3311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null |
ac388f2a ILT |
3311 | then |
3312 | ac_cv_func_mmap_fixed_mapped=yes | |
4fe6d901 | 3313 | else |
ac388f2a ILT |
3314 | echo "configure: failed program was:" >&5 |
3315 | cat conftest.$ac_ext >&5 | |
3316 | rm -fr conftest* | |
3317 | ac_cv_func_mmap_fixed_mapped=no | |
4fe6d901 | 3318 | fi |
fd8d7c31 | 3319 | rm -fr conftest* |
dfc7020d ILT |
3320 | fi |
3321 | ||
ac388f2a ILT |
3322 | fi |
3323 | ||
3324 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
3325 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
4fe6d901 KR |
3326 | cat >> confdefs.h <<\EOF |
3327 | #define HAVE_MMAP 1 | |
3328 | EOF | |
3329 | ||
3330 | fi | |
3331 | ||
3332 | for ac_func in madvise mprotect | |
3333 | do | |
3334 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
5a83fcdd | 3335 | echo "configure:3336: checking for $ac_func" >&5 |
4fe6d901 KR |
3336 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3337 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3338 | else | |
3339 | cat > conftest.$ac_ext <<EOF | |
5a83fcdd | 3340 | #line 3341 "configure" |
4fe6d901 KR |
3341 | #include "confdefs.h" |
3342 | /* System header to define __stub macros and hopefully few prototypes, | |
3343 | which can conflict with char $ac_func(); below. */ | |
3344 | #include <assert.h> | |
3345 | /* Override any gcc2 internal prototype to avoid an error. */ | |
a4322a77 ILT |
3346 | /* We use char because int might match the return type of a gcc2 |
3347 | builtin and then its argument prototype would still apply. */ | |
85e493f0 | 3348 | char $ac_func(); |
4fe6d901 | 3349 | |
ac388f2a | 3350 | int main() { |
4fe6d901 KR |
3351 | |
3352 | /* The GNU C library defines this for functions which it implements | |
3353 | to always fail with ENOSYS. Some functions are actually named | |
3354 | something starting with __ and the normal name is an alias. */ | |
3355 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3356 | choke me | |
3357 | #else | |
3358 | $ac_func(); | |
3359 | #endif | |
3360 | ||
3361 | ; return 0; } | |
3362 | EOF | |
5a83fcdd | 3363 | if { (eval echo configure:3364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
4fe6d901 KR |
3364 | rm -rf conftest* |
3365 | eval "ac_cv_func_$ac_func=yes" | |
3366 | else | |
ac388f2a ILT |
3367 | echo "configure: failed program was:" >&5 |
3368 | cat conftest.$ac_ext >&5 | |
4fe6d901 KR |
3369 | rm -rf conftest* |
3370 | eval "ac_cv_func_$ac_func=no" | |
3371 | fi | |
3372 | rm -f conftest* | |
fd8d7c31 | 3373 | fi |
ac388f2a | 3374 | |
4fe6d901 KR |
3375 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
3376 | echo "$ac_t""yes" 1>&6 | |
85e493f0 | 3377 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
4fe6d901 KR |
3378 | cat >> confdefs.h <<EOF |
3379 | #define $ac_tr_func 1 | |
3380 | EOF | |
3381 | ||
3382 | else | |
3383 | echo "$ac_t""no" 1>&6 | |
3384 | fi | |
3385 | done | |
3386 | ||
fd8d7c31 | 3387 | case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in |
85e493f0 ILT |
3388 | true+yes ) cat >> confdefs.h <<\EOF |
3389 | #define USE_MMAP 1 | |
3390 | EOF | |
3391 | ;; | |
3392 | esac | |
4fe6d901 | 3393 | |
8c693660 KR |
3394 | rm -f doc/config.status |
3395 | trap '' 1 2 15 | |
3396 | cat > confcache <<\EOF | |
3397 | # This file is a shell script that caches the results of configure | |
3398 | # tests run on this system so they can be shared between configure | |
3399 | # scripts and configure runs. It is not useful on other systems. | |
3400 | # If it contains results you don't want to keep, you may remove or edit it. | |
3401 | # | |
3402 | # By default, configure uses ./config.cache as the cache file, | |
3403 | # creating it if it does not exist already. You can give configure | |
3404 | # the --cache-file=FILE option to use a different cache file; that is | |
3405 | # what configure does when it calls configure scripts in | |
3406 | # subdirectories, so they share the cache. | |
3407 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
3408 | # config.status only pays attention to the cache file if you give it the | |
3409 | # --recheck option to rerun configure. | |
3410 | # | |
3411 | EOF | |
ac388f2a ILT |
3412 | # The following way of writing the cache mishandles newlines in values, |
3413 | # but we know of no workaround that is simple, portable, and efficient. | |
3414 | # So, don't put newlines in cache variables' values. | |
8c693660 KR |
3415 | # Ultrix sh set writes to stderr and can't be redirected directly, |
3416 | # and sets the high bit in the cache file unless we assign to the vars. | |
3417 | (set) 2>&1 | | |
372b296c | 3418 | case `(ac_space=' '; set) 2>&1 | grep ac_space` in |
ac388f2a ILT |
3419 | *ac_space=\ *) |
3420 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
3421 | # turns \\\\ into \\, and sed turns \\ into \). | |
3422 | sed -n \ | |
3423 | -e "s/'/'\\\\''/g" \ | |
3424 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
3425 | ;; | |
3426 | *) | |
3427 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
3428 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
3429 | ;; | |
3430 | esac >> confcache | |
8c693660 KR |
3431 | if cmp -s $cache_file confcache; then |
3432 | : | |
3433 | else | |
3434 | if test -w $cache_file; then | |
3435 | echo "updating cache $cache_file" | |
3436 | cat confcache > $cache_file | |
3437 | else | |
3438 | echo "not updating unwritable cache $cache_file" | |
3439 | fi | |
3440 | fi | |
3441 | rm -f confcache | |
3442 | ||
3443 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
3444 | ||
3445 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
3446 | # Let make expand exec_prefix. | |
3447 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
3448 | ||
3449 | # Any assignment to VPATH causes Sun make to only execute | |
3450 | # the first set of double-colon rules, so remove it if not needed. | |
3451 | # If there is a colon in the path, we need to keep it. | |
3452 | if test "x$srcdir" = x.; then | |
3453 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
3454 | fi | |
3455 | ||
3456 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
3457 | ||
b7577823 | 3458 | DEFS=-DHAVE_CONFIG_H |
8c693660 KR |
3459 | |
3460 | # Without the "./", some shells look in PATH for config.status. | |
3461 | : ${CONFIG_STATUS=./config.status} | |
3462 | ||
3463 | echo creating $CONFIG_STATUS | |
3464 | rm -f $CONFIG_STATUS | |
3465 | cat > $CONFIG_STATUS <<EOF | |
3466 | #! /bin/sh | |
3467 | # Generated automatically by configure. | |
3468 | # Run this file to recreate the current configuration. | |
3469 | # This directory was configured as follows, | |
3470 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
3471 | # | |
3472 | # $0 $ac_configure_args | |
3473 | # | |
3474 | # Compiler output produced by configure, useful for debugging | |
3475 | # configure, is in ./config.log if it exists. | |
3476 | ||
3477 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
3478 | for ac_option | |
3479 | do | |
3480 | case "\$ac_option" in | |
3481 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
3482 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
3483 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
3484 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
372b296c | 3485 | echo "$CONFIG_STATUS generated by autoconf version 2.12.1" |
8c693660 KR |
3486 | exit 0 ;; |
3487 | -help | --help | --hel | --he | --h) | |
3488 | echo "\$ac_cs_usage"; exit 0 ;; | |
3489 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
3490 | esac | |
3491 | done | |
3492 | ||
3493 | ac_given_srcdir=$srcdir | |
f515fb2f | 3494 | ac_given_INSTALL="$INSTALL" |
8c693660 | 3495 | |
f4e14cb9 | 3496 | trap 'rm -fr `echo "Makefile doc/Makefile bfd-in3.h:bfd-in2.h config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
d19df9b5 ILT |
3497 | EOF |
3498 | cat >> $CONFIG_STATUS <<EOF | |
8c693660 | 3499 | |
85e493f0 | 3500 | # Protect against being on the right side of a sed subst in config.status. |
d19df9b5 ILT |
3501 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; |
3502 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
8c693660 KR |
3503 | $ac_vpsub |
3504 | $extrasub | |
372b296c | 3505 | s%@SHELL@%$SHELL%g |
8c693660 KR |
3506 | s%@CFLAGS@%$CFLAGS%g |
3507 | s%@CPPFLAGS@%$CPPFLAGS%g | |
3508 | s%@CXXFLAGS@%$CXXFLAGS%g | |
3509 | s%@DEFS@%$DEFS%g | |
3510 | s%@LDFLAGS@%$LDFLAGS%g | |
3511 | s%@LIBS@%$LIBS%g | |
3512 | s%@exec_prefix@%$exec_prefix%g | |
3513 | s%@prefix@%$prefix%g | |
3514 | s%@program_transform_name@%$program_transform_name%g | |
85e493f0 ILT |
3515 | s%@bindir@%$bindir%g |
3516 | s%@sbindir@%$sbindir%g | |
3517 | s%@libexecdir@%$libexecdir%g | |
3518 | s%@datadir@%$datadir%g | |
3519 | s%@sysconfdir@%$sysconfdir%g | |
3520 | s%@sharedstatedir@%$sharedstatedir%g | |
3521 | s%@localstatedir@%$localstatedir%g | |
3522 | s%@libdir@%$libdir%g | |
3523 | s%@includedir@%$includedir%g | |
3524 | s%@oldincludedir@%$oldincludedir%g | |
3525 | s%@infodir@%$infodir%g | |
3526 | s%@mandir@%$mandir%g | |
8c693660 KR |
3527 | s%@host@%$host%g |
3528 | s%@host_alias@%$host_alias%g | |
3529 | s%@host_cpu@%$host_cpu%g | |
3530 | s%@host_vendor@%$host_vendor%g | |
3531 | s%@host_os@%$host_os%g | |
3532 | s%@target@%$target%g | |
3533 | s%@target_alias@%$target_alias%g | |
3534 | s%@target_cpu@%$target_cpu%g | |
3535 | s%@target_vendor@%$target_vendor%g | |
3536 | s%@target_os@%$target_os%g | |
3537 | s%@build@%$build%g | |
3538 | s%@build_alias@%$build_alias%g | |
3539 | s%@build_cpu@%$build_cpu%g | |
3540 | s%@build_vendor@%$build_vendor%g | |
3541 | s%@build_os@%$build_os%g | |
f515fb2f | 3542 | s%@CC@%$CC%g |
f515fb2f ILT |
3543 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
3544 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
c0734708 ILT |
3545 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g |
3546 | s%@PACKAGE@%$PACKAGE%g | |
f4e14cb9 | 3547 | s%@VERSION@%$VERSION%g |
c0734708 ILT |
3548 | s%@ACLOCAL@%$ACLOCAL%g |
3549 | s%@AUTOCONF@%$AUTOCONF%g | |
3550 | s%@AUTOMAKE@%$AUTOMAKE%g | |
3551 | s%@AUTOHEADER@%$AUTOHEADER%g | |
3552 | s%@MAKEINFO@%$MAKEINFO%g | |
3553 | s%@SET_MAKE@%$SET_MAKE%g | |
7810074c | 3554 | s%@AR@%$AR%g |
c0734708 ILT |
3555 | s%@RANLIB@%$RANLIB%g |
3556 | s%@LD@%$LD%g | |
9a837903 | 3557 | s%@NM@%$NM%g |
c0734708 ILT |
3558 | s%@LN_S@%$LN_S%g |
3559 | s%@LIBTOOL@%$LIBTOOL%g | |
5a83fcdd ILT |
3560 | s%@DLLTOOL@%$DLLTOOL%g |
3561 | s%@AS@%$AS%g | |
c0734708 ILT |
3562 | s%@MAINT@%$MAINT%g |
3563 | s%@EXEEXT@%$EXEEXT%g | |
3564 | s%@HDEFINES@%$HDEFINES%g | |
f4e14cb9 ILT |
3565 | s%@BFD_HOST_64BIT_LONG@%$BFD_HOST_64BIT_LONG%g |
3566 | s%@BFD_HOST_64_BIT_DEFINED@%$BFD_HOST_64_BIT_DEFINED%g | |
3567 | s%@BFD_HOST_64_BIT@%$BFD_HOST_64_BIT%g | |
3568 | s%@BFD_HOST_U_64_BIT@%$BFD_HOST_U_64_BIT%g | |
f515fb2f | 3569 | s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g |
2c66160c | 3570 | s%@EXEEXT_FOR_BUILD@%$EXEEXT_FOR_BUILD%g |
b7577823 | 3571 | s%@CPP@%$CPP%g |
a52a3ce8 ILT |
3572 | s%@COREFILE@%$COREFILE%g |
3573 | s%@COREFLAG@%$COREFLAG%g | |
5a83fcdd ILT |
3574 | s%@WIN32LDFLAGS@%$WIN32LDFLAGS%g |
3575 | s%@WIN32LIBADD@%$WIN32LIBADD%g | |
2b79a104 | 3576 | s%@TDEFINES@%$TDEFINES%g |
8c693660 KR |
3577 | s%@wordsize@%$wordsize%g |
3578 | s%@all_backends@%$all_backends%g | |
3579 | s%@bfd_backends@%$bfd_backends%g | |
3580 | s%@bfd_machines@%$bfd_machines%g | |
3581 | s%@tdefaults@%$tdefaults%g | |
3582 | ||
3583 | CEOF | |
3584 | EOF | |
ac388f2a ILT |
3585 | |
3586 | cat >> $CONFIG_STATUS <<\EOF | |
3587 | ||
3588 | # Split the substitutions into bite-sized pieces for seds with | |
3589 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
3590 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
3591 | ac_file=1 # Number of current file. | |
3592 | ac_beg=1 # First line for current file. | |
3593 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
3594 | ac_more_lines=: | |
3595 | ac_sed_cmds="" | |
3596 | while $ac_more_lines; do | |
3597 | if test $ac_beg -gt 1; then | |
3598 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
3599 | else | |
3600 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
3601 | fi | |
3602 | if test ! -s conftest.s$ac_file; then | |
3603 | ac_more_lines=false | |
3604 | rm -f conftest.s$ac_file | |
3605 | else | |
3606 | if test -z "$ac_sed_cmds"; then | |
3607 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
3608 | else | |
3609 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
3610 | fi | |
3611 | ac_file=`expr $ac_file + 1` | |
3612 | ac_beg=$ac_end | |
3613 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
3614 | fi | |
3615 | done | |
3616 | if test -z "$ac_sed_cmds"; then | |
3617 | ac_sed_cmds=cat | |
3618 | fi | |
3619 | EOF | |
3620 | ||
8c693660 KR |
3621 | cat >> $CONFIG_STATUS <<EOF |
3622 | ||
f4e14cb9 | 3623 | CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile bfd-in3.h:bfd-in2.h"} |
8c693660 KR |
3624 | EOF |
3625 | cat >> $CONFIG_STATUS <<\EOF | |
3626 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
ac388f2a | 3627 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
8c693660 | 3628 | case "$ac_file" in |
ac388f2a | 3629 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
8c693660 KR |
3630 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
3631 | *) ac_file_in="${ac_file}.in" ;; | |
3632 | esac | |
3633 | ||
ac388f2a | 3634 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
8c693660 KR |
3635 | |
3636 | # Remove last slash and all that follows it. Not all systems have dirname. | |
3637 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
3638 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
3639 | # The file is in a subdirectory. | |
3640 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
3641 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
3642 | # A "../" for each directory in $ac_dir_suffix. | |
3643 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
3644 | else | |
3645 | ac_dir_suffix= ac_dots= | |
3646 | fi | |
3647 | ||
3648 | case "$ac_given_srcdir" in | |
3649 | .) srcdir=. | |
3650 | if test -z "$ac_dots"; then top_srcdir=. | |
3651 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
3652 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
3653 | *) # Relative path. | |
3654 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
3655 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
3656 | esac | |
3657 | ||
f515fb2f ILT |
3658 | case "$ac_given_INSTALL" in |
3659 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
3660 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
3661 | esac | |
ac388f2a | 3662 | |
8c693660 KR |
3663 | echo creating "$ac_file" |
3664 | rm -f "$ac_file" | |
3665 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
3666 | case "$ac_file" in | |
3667 | *Makefile*) ac_comsub="1i\\ | |
3668 | # $configure_input" ;; | |
3669 | *) ac_comsub= ;; | |
3670 | esac | |
ac388f2a | 3671 | |
c0734708 | 3672 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
8c693660 KR |
3673 | sed -e "$ac_comsub |
3674 | s%@configure_input@%$configure_input%g | |
3675 | s%@srcdir@%$srcdir%g | |
3676 | s%@top_srcdir@%$top_srcdir%g | |
f515fb2f | 3677 | s%@INSTALL@%$INSTALL%g |
ac388f2a | 3678 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
8c693660 | 3679 | fi; done |
ac388f2a | 3680 | rm -f conftest.s* |
8c693660 | 3681 | |
b7577823 ILT |
3682 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where |
3683 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
3684 | # | |
3685 | # ac_d sets the value in "#define NAME VALUE" lines. | |
3686 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
3687 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
3688 | ac_dC='\3' | |
3689 | ac_dD='%g' | |
3690 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
3691 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
3692 | ac_uB='\([ ]\)%\1#\2define\3' | |
3693 | ac_uC=' ' | |
3694 | ac_uD='\4%g' | |
3695 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
3696 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
3697 | ac_eB='$%\1#\2define\3' | |
3698 | ac_eC=' ' | |
3699 | ac_eD='%g' | |
3700 | ||
ac388f2a ILT |
3701 | if test "${CONFIG_HEADERS+set}" != set; then |
3702 | EOF | |
3703 | cat >> $CONFIG_STATUS <<EOF | |
3704 | CONFIG_HEADERS="config.h:config.in" | |
3705 | EOF | |
3706 | cat >> $CONFIG_STATUS <<\EOF | |
3707 | fi | |
b7577823 | 3708 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then |
ac388f2a | 3709 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
b7577823 | 3710 | case "$ac_file" in |
ac388f2a | 3711 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
b7577823 ILT |
3712 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
3713 | *) ac_file_in="${ac_file}.in" ;; | |
3714 | esac | |
8c693660 | 3715 | |
b7577823 | 3716 | echo creating $ac_file |
8c693660 | 3717 | |
b7577823 | 3718 | rm -f conftest.frag conftest.in conftest.out |
c0734708 | 3719 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
ac388f2a | 3720 | cat $ac_file_inputs > conftest.in |
8c693660 | 3721 | |
b7577823 | 3722 | EOF |
8c693660 | 3723 | |
b7577823 ILT |
3724 | # Transform confdefs.h into a sed script conftest.vals that substitutes |
3725 | # the proper values into config.h.in to produce config.h. And first: | |
85e493f0 | 3726 | # Protect against being on the right side of a sed subst in config.status. |
b7577823 ILT |
3727 | # Protect against being in an unquoted here document in config.status. |
3728 | rm -f conftest.vals | |
3729 | cat > conftest.hdr <<\EOF | |
3730 | s/[\\&%]/\\&/g | |
3731 | s%[\\$`]%\\&%g | |
a4322a77 | 3732 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp |
b7577823 ILT |
3733 | s%ac_d%ac_u%gp |
3734 | s%ac_u%ac_e%gp | |
3735 | EOF | |
3736 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
3737 | rm -f conftest.hdr | |
3738 | ||
3739 | # This sed command replaces #undef with comments. This is necessary, for | |
3740 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
3741 | # on some systems where configure will not decide to define it. | |
3742 | cat >> conftest.vals <<\EOF | |
3743 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
3744 | EOF | |
8c693660 | 3745 | |
b7577823 ILT |
3746 | # Break up conftest.vals because some shells have a limit on |
3747 | # the size of here documents, and old seds have small limits too. | |
8c693660 | 3748 | |
b7577823 ILT |
3749 | rm -f conftest.tail |
3750 | while : | |
3751 | do | |
3752 | ac_lines=`grep -c . conftest.vals` | |
3753 | # grep -c gives empty output for an empty file on some AIX systems. | |
3754 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
3755 | # Write a limited-size here document to conftest.frag. | |
3756 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
3757 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
3758 | echo 'CEOF | |
3759 | sed -f conftest.frag conftest.in > conftest.out | |
3760 | rm -f conftest.in | |
3761 | mv conftest.out conftest.in | |
3762 | ' >> $CONFIG_STATUS | |
3763 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
3764 | rm -f conftest.vals | |
3765 | mv conftest.tail conftest.vals | |
3766 | done | |
3767 | rm -f conftest.vals | |
8c693660 | 3768 | |
b7577823 ILT |
3769 | cat >> $CONFIG_STATUS <<\EOF |
3770 | rm -f conftest.frag conftest.h | |
3771 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
3772 | cat conftest.in >> conftest.h | |
3773 | rm -f conftest.in | |
3774 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
3775 | echo "$ac_file is unchanged" | |
3776 | rm -f conftest.h | |
8c693660 | 3777 | else |
a4322a77 ILT |
3778 | # Remove last slash and all that follows it. Not all systems have dirname. |
3779 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
3780 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
3781 | # The file is in a subdirectory. | |
3782 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
3783 | fi | |
b7577823 ILT |
3784 | rm -f $ac_file |
3785 | mv conftest.h $ac_file | |
8c693660 | 3786 | fi |
b7577823 ILT |
3787 | fi; done |
3788 | ||
ac388f2a ILT |
3789 | EOF |
3790 | cat >> $CONFIG_STATUS <<EOF | |
8c693660 | 3791 | |
c0734708 | 3792 | |
ac388f2a ILT |
3793 | EOF |
3794 | cat >> $CONFIG_STATUS <<\EOF | |
c0734708 ILT |
3795 | test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h |
3796 | ||
8c693660 KR |
3797 | exit 0 |
3798 | EOF | |
3799 | chmod +x $CONFIG_STATUS | |
3800 | rm -fr confdefs* $ac_clean_files | |
3801 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
3802 |