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