Commit | Line | Data |
---|---|---|
252b5132 RH |
1 | dnl Process this file with autoconf to produce a configure script. |
2 | dnl | |
3 | ||
5464f5a1 NN |
4 | AC_PREREQ(2.59) |
5 | AC_INIT | |
6 | AC_CONFIG_SRCDIR([libbfd.c]) | |
252b5132 | 7 | |
5464f5a1 | 8 | AC_CANONICAL_TARGET |
252b5132 RH |
9 | AC_ISC_POSIX |
10 | ||
e1fffbe6 | 11 | AM_INIT_AUTOMAKE(bfd, 2.16.91) |
252b5132 RH |
12 | |
13 | dnl These must be called before AM_PROG_LIBTOOL, because it may want | |
14 | dnl to call AC_CHECK_PROG. | |
15 | AC_CHECK_TOOL(AR, ar) | |
16 | AC_CHECK_TOOL(RANLIB, ranlib, :) | |
17 | ||
18 | dnl Default to a non shared library. This may be overridden by the | |
19 | dnl configure option --enable-shared. | |
20 | AM_DISABLE_SHARED | |
21 | ||
22 | AM_PROG_LIBTOOL | |
23 | ||
24 | AC_ARG_ENABLE(64-bit-bfd, | |
25 | [ --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)], | |
26 | [case "${enableval}" in | |
27 | yes) want64=true ;; | |
28 | no) want64=false ;; | |
29 | *) AC_MSG_ERROR(bad value ${enableval} for 64-bit-bfd option) ;; | |
30 | esac],[want64=false])dnl | |
31 | AC_ARG_ENABLE(targets, | |
32 | [ --enable-targets alternative target configurations], | |
33 | [case "${enableval}" in | |
5464f5a1 | 34 | yes | "") AC_MSG_ERROR([enable-targets option must specify target names or 'all']) |
252b5132 RH |
35 | ;; |
36 | no) enable_targets= ;; | |
37 | *) enable_targets=$enableval ;; | |
38 | esac])dnl | |
39 | AC_ARG_ENABLE(commonbfdlib, | |
40 | [ --enable-commonbfdlib build shared BFD/opcodes/libiberty library], | |
41 | [case "${enableval}" in | |
42 | yes) commonbfdlib=true ;; | |
43 | no) commonbfdlib=false ;; | |
44 | *) AC_MSG_ERROR([bad value ${enableval} for BFD commonbfdlib option]) ;; | |
45 | esac])dnl | |
46 | AC_ARG_WITH(mmap, | |
47 | [ --with-mmap try using mmap for BFD input files if available], | |
48 | [case "${withval}" in | |
49 | yes) want_mmap=true ;; | |
50 | no) want_mmap=false ;; | |
51 | *) AC_MSG_ERROR(bad value ${withval} for BFD with-mmap option) ;; | |
52 | esac],[want_mmap=false])dnl | |
53 | ||
6ec7057a RH |
54 | AC_ARG_ENABLE(secureplt, |
55 | [ --enable-secureplt Default to creating read-only plt entries], | |
56 | [case "${enableval}" in | |
57 | yes) use_secureplt=true ;; | |
58 | no) use_secureplt=false ;; | |
59 | *) AC_MSG_ERROR(bad value ${enableval} for secureplt option) ;; | |
60 | esac],[use_secureplt=false])dnl | |
61 | if test $use_secureplt = true; then | |
62 | AC_DEFINE(USE_SECUREPLT, 1, | |
63 | [Define if we should default to creating read-only plt entries]) | |
64 | fi | |
65 | ||
9e9b66a9 | 66 | AM_BINUTILS_WARNINGS |
a2d91340 | 67 | |
252b5132 RH |
68 | AM_CONFIG_HEADER(config.h:config.in) |
69 | ||
70 | if test -z "$target" ; then | |
71 | AC_MSG_ERROR(Unrecognized target system type; please check config.sub.) | |
72 | fi | |
252b5132 RH |
73 | |
74 | AM_MAINTAINER_MODE | |
a703a6ea | 75 | AM_INSTALL_LIBBFD |
252b5132 RH |
76 | AC_EXEEXT |
77 | ||
78 | host64=false | |
79 | target64=false | |
69263e90 | 80 | bfd_default_target_size=32 |
252b5132 RH |
81 | |
82 | # host stuff: | |
83 | ||
84 | AC_PROG_CC | |
4a2a2686 | 85 | AC_GNU_SOURCE |
252b5132 | 86 | |
dcd4b381 | 87 | ALL_LINGUAS="fr tr ja es sv da zh_CN ro rw vi" |
252b5132 RH |
88 | CY_GNU_GETTEXT |
89 | ||
90 | # Permit host specific settings. | |
91 | . ${srcdir}/configure.host | |
92 | ||
93 | AC_SUBST(HDEFINES) | |
94 | AC_PROG_INSTALL | |
95 | ||
96 | BFD_HOST_64BIT_LONG=0 | |
ec317fb1 | 97 | BFD_HOST_LONG_LONG=0 |
252b5132 RH |
98 | BFD_HOST_64_BIT_DEFINED=0 |
99 | BFD_HOST_64_BIT= | |
100 | BFD_HOST_U_64_BIT= | |
ec317fb1 ILT |
101 | |
102 | AC_MSG_CHECKING([for long long]) | |
103 | AC_CACHE_VAL(bfd_cv_has_long_long, | |
5464f5a1 | 104 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[unsigned long long ll = 18446744073709551615ULL;]])],[bfd_cv_has_long_long=yes],[bfd_cv_has_long_long=no])]) |
ec317fb1 ILT |
105 | AC_MSG_RESULT($bfd_cv_has_long_long) |
106 | if test $bfd_cv_has_long_long = yes; then | |
107 | BFD_HOST_LONG_LONG=1 | |
2ba49b59 | 108 | AC_CHECK_SIZEOF(long long) |
6726e1ea L |
109 | fi |
110 | ||
2ba49b59 | 111 | AC_CHECK_SIZEOF(long) |
6726e1ea L |
112 | if test "x${ac_cv_sizeof_long}" = "x8"; then |
113 | host64=true | |
ccba357f AM |
114 | BFD_HOST_64BIT_LONG=1 |
115 | test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long" | |
116 | test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long" | |
6726e1ea | 117 | elif test "x${ac_cv_sizeof_long_long}" = "x8"; then |
ccba357f AM |
118 | test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long" |
119 | test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long" | |
6726e1ea L |
120 | fi |
121 | ||
ccba357f | 122 | if test -n "${HOST_64BIT_TYPE}" -a -n "${HOST_U_64BIT_TYPE}"; then |
6726e1ea | 123 | BFD_HOST_64_BIT_DEFINED=1 |
ccba357f AM |
124 | BFD_HOST_64_BIT="${HOST_64BIT_TYPE}" |
125 | BFD_HOST_U_64_BIT="${HOST_U_64BIT_TYPE}" | |
ec317fb1 ILT |
126 | fi |
127 | ||
252b5132 | 128 | AC_SUBST(BFD_HOST_64BIT_LONG) |
ec317fb1 | 129 | AC_SUBST(BFD_HOST_LONG_LONG) |
252b5132 RH |
130 | AC_SUBST(BFD_HOST_64_BIT_DEFINED) |
131 | AC_SUBST(BFD_HOST_64_BIT) | |
132 | AC_SUBST(BFD_HOST_U_64_BIT) | |
133 | ||
134 | BFD_CC_FOR_BUILD | |
135 | ||
136 | AC_CHECK_HEADERS(stddef.h string.h strings.h stdlib.h time.h unistd.h) | |
137 | AC_CHECK_HEADERS(fcntl.h sys/file.h sys/time.h) | |
138 | AC_HEADER_TIME | |
139 | AC_HEADER_DIRENT | |
2e0fbf77 | 140 | ACX_HEADER_STRING |
633fd09f | 141 | AC_CHECK_FUNCS(fcntl getpagesize setitimer sysconf fdopen getuid getgid) |
49c97a80 | 142 | AC_CHECK_FUNCS(strtoull) |
252b5132 | 143 | |
ec7b76fe JG |
144 | AC_CHECK_DECLS(basename) |
145 | AC_CHECK_DECLS(ftello) | |
146 | AC_CHECK_DECLS(ftello64) | |
147 | AC_CHECK_DECLS(fseeko) | |
148 | AC_CHECK_DECLS(fseeko64) | |
2e9ebff5 | 149 | |
252b5132 RH |
150 | BFD_BINARY_FOPEN |
151 | ||
d34a2b1d JG |
152 | AC_CHECK_DECLS(ffs) |
153 | AC_CHECK_DECLS(free) | |
154 | AC_CHECK_DECLS(getenv) | |
155 | AC_CHECK_DECLS(malloc) | |
156 | AC_CHECK_DECLS(realloc) | |
be5cacdb | 157 | AC_CHECK_DECLS(stpcpy) |
d34a2b1d | 158 | AC_CHECK_DECLS(strstr) |
36527912 AJ |
159 | AC_CHECK_DECLS(snprintf) |
160 | AC_CHECK_DECLS(vsnprintf) | |
252b5132 RH |
161 | |
162 | # If we are configured native, pick a core file support file. | |
163 | COREFILE= | |
164 | COREFLAG= | |
165 | TRAD_HEADER= | |
166 | if test "${target}" = "${host}"; then | |
167 | case "${host}" in | |
13dfd2d0 | 168 | alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu) |
46d59bfa DB |
169 | COREFILE='' |
170 | ;; | |
ed84e695 | 171 | alpha*-*-linux-*) |
252b5132 RH |
172 | COREFILE=trad-core.lo |
173 | TRAD_HEADER='"hosts/alphalinux.h"' | |
174 | ;; | |
690cc98b NC |
175 | alpha*-*-netbsd* | alpha*-*-openbsd*) |
176 | COREFILE=netbsd-core.lo | |
177 | ;; | |
252b5132 | 178 | alpha*-*-*) COREFILE=osf-core.lo ;; |
13dfd2d0 NC |
179 | arm-*-freebsd* | arm-*-kfreebsd*-gnu) |
180 | COREFILE='' ;; | |
61d0bc33 | 181 | arm-*-netbsd*) COREFILE=netbsd-core.lo ;; |
252b5132 RH |
182 | arm-*-riscix) COREFILE=trad-core.lo ;; |
183 | hppa*-*-hpux*) COREFILE=hpux-core.lo ;; | |
184 | hppa*-*-hiux*) COREFILE=hpux-core.lo ;; | |
185 | hppa*-*-mpeix*) COREFILE=hpux-core.lo ;; | |
186 | hppa*-*-bsd*) COREFILE="hpux-core.lo hppabsd-core.lo" | |
187 | COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;; | |
eef0f186 MK |
188 | hppa*-*-netbsd* | hppa*-*-openbsd*) |
189 | COREFILE=netbsd-core.lo | |
190 | ;; | |
191 | ||
dc810e39 | 192 | i370-*-*) |
5b93d8bb AM |
193 | COREFILE=trad-core.lo |
194 | TRAD_HEADER='"hosts/i370linux.h"' | |
195 | ;; | |
196 | ||
252b5132 | 197 | changequote(,)dnl |
80c7c40a | 198 | i[3-7]86-sequent-bsd*) |
252b5132 | 199 | changequote([,])dnl |
5b93d8bb | 200 | COREFILE=trad-core.lo |
252b5132 RH |
201 | TRAD_HEADER='"hosts/symmetry.h"' |
202 | ;; | |
203 | changequote(,)dnl | |
80c7c40a NC |
204 | i[3-7]86-sequent-sysv4*) ;; |
205 | i[3-7]86-sequent-sysv*) | |
252b5132 RH |
206 | changequote([,])dnl |
207 | COREFILE=trad-core.lo | |
208 | TRAD_HEADER='"hosts/symmetry.h"' | |
209 | ;; | |
7e3b3466 | 210 | changequote(,)dnl |
80c7c40a | 211 | i[3-7]86-*-bsdi) |
7e3b3466 NC |
212 | changequote([,])dnl |
213 | COREFILE= | |
214 | ;; | |
252b5132 | 215 | changequote(,)dnl |
d2bef492 | 216 | i[3-7]86-*-bsd* | i[3-7]86-*-freebsd[123] | i[3-7]86-*-freebsd[123]\.* | i[3-7]86-*-freebsd4\.[01234] | i[3-7]86-*-freebsd4\.[01234]\.* | i[3-7]86-*-freebsd*aout*) |
252b5132 RH |
217 | changequote([,])dnl |
218 | COREFILE=trad-core.lo | |
219 | TRAD_HEADER='"hosts/i386bsd.h"' | |
220 | ;; | |
d4af9775 | 221 | changequote(,)dnl |
13dfd2d0 | 222 | i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu) |
d4af9775 DB |
223 | changequote([,])dnl |
224 | COREFILE='' | |
225 | TRAD_HEADER='"hosts/i386bsd.h"' | |
226 | ;; | |
252b5132 | 227 | changequote(,)dnl |
4615568e | 228 | i[3-7]86-*-netbsd* | i[3-7]86-*-knetbsd*-gnu | i[3-7]86-*-openbsd*) |
252b5132 RH |
229 | changequote([,])dnl |
230 | COREFILE=netbsd-core.lo | |
231 | ;; | |
232 | changequote(,)dnl | |
80c7c40a | 233 | i[3-7]86-esix-sysv3*) |
252b5132 RH |
234 | changequote([,])dnl |
235 | COREFILE=trad-core.lo | |
236 | TRAD_HEADER='"hosts/esix.h"' | |
237 | ;; | |
238 | changequote(,)dnl | |
80c7c40a | 239 | i[3-7]86-*-sco3.2v5*) |
252b5132 RH |
240 | changequote([,])dnl |
241 | COREFILE=sco5-core.lo | |
242 | ;; | |
243 | changequote(,)dnl | |
80c7c40a | 244 | i[3-7]86-*-sco* | i[3-7]86-*-isc*) |
252b5132 RH |
245 | changequote([,])dnl |
246 | COREFILE=trad-core.lo | |
247 | TRAD_HEADER='"hosts/i386sco.h"' | |
248 | ;; | |
249 | changequote(,)dnl | |
80c7c40a | 250 | i[3-7]86-*-mach3*) |
252b5132 RH |
251 | changequote([,])dnl |
252 | COREFILE=trad-core.lo | |
253 | TRAD_HEADER='"hosts/i386mach3.h"' | |
254 | ;; | |
255 | changequote(,)dnl | |
ed84e695 | 256 | i[3-7]86-*-linux-*) |
252b5132 RH |
257 | changequote([,])dnl |
258 | COREFILE=trad-core.lo | |
259 | TRAD_HEADER='"hosts/i386linux.h"' | |
260 | ;; | |
261 | changequote(,)dnl | |
80c7c40a NC |
262 | i[3-7]86-*-isc*) COREFILE=trad-core.lo ;; |
263 | i[3-7]86-*-aix*) COREFILE=aix386-core.lo ;; | |
252b5132 RH |
264 | changequote([,])dnl |
265 | i860-*-mach3* | i860-*-osf1*) | |
266 | COREFILE=trad-core.lo | |
267 | TRAD_HEADER='"hosts/i860mach3.h"' | |
268 | ;; | |
252b5132 RH |
269 | mips-*-netbsd* | mips*-*-openbsd*) |
270 | COREFILE=netbsd-core.lo | |
271 | ;; | |
272 | mips-dec-*) | |
273 | COREFILE=trad-core.lo | |
274 | TRAD_HEADER='"hosts/decstation.h"' | |
275 | ;; | |
276 | mips-sgi-irix4*) COREFILE=irix-core.lo ;; | |
277 | mips-sgi-irix5*) COREFILE=irix-core.lo ;; | |
278 | mips-sgi-irix6*) COREFILE=irix-core.lo ;; | |
252b5132 RH |
279 | mips-*-sysv4*) ;; |
280 | mips-*-sysv* | mips-*-riscos*) | |
281 | COREFILE=trad-core.lo | |
282 | TRAD_HEADER='"hosts/riscos.h"' | |
283 | ;; | |
284 | mips-sony-bsd*) | |
285 | COREFILE=trad-core.lo | |
286 | TRAD_HEADER='"hosts/news-mips.h"' | |
287 | ;; | |
288 | m68*-bull*-sysv*) | |
289 | COREFILE=trad-core.lo | |
290 | TRAD_HEADER='"hosts/dpx2.h"' | |
291 | ;; | |
292 | m68*-hp-hpux*) COREFILE=hpux-core.lo ;; | |
293 | m68*-hp-bsd*) | |
294 | COREFILE=trad-core.lo | |
295 | TRAD_HEADER='"hosts/hp300bsd.h"' | |
296 | ;; | |
ed84e695 | 297 | m68*-*-linux-*) |
252b5132 RH |
298 | COREFILE=trad-core.lo |
299 | TRAD_HEADER='"hosts/m68klinux.h"' | |
300 | ;; | |
301 | m68*-motorola-sysv*) | |
302 | COREFILE=trad-core.lo | |
303 | TRAD_HEADER='"hosts/delta68.h"' | |
304 | ;; | |
305 | m68*-sony-*) | |
306 | COREFILE=trad-core.lo | |
307 | TRAD_HEADER='"hosts/news.h"' | |
308 | ;; | |
309 | m68*-*-netbsd* | m68*-*-openbsd*) | |
310 | COREFILE=netbsd-core.lo | |
311 | ;; | |
312 | m68*-apple-aux*) | |
313 | COREFILE=trad-core.lo | |
314 | TRAD_HEADER='"hosts/m68kaux.h"' | |
315 | ;; | |
eb1e0e80 NC |
316 | m88*-*-sysv4*) |
317 | ;; | |
318 | m88*-motorola-sysv*) | |
319 | COREFILE=ptrace-core.lo | |
320 | ;; | |
252b5132 RH |
321 | m88*-*-mach3*) |
322 | COREFILE=trad-core.lo | |
323 | TRAD_HEADER='"hosts/m88kmach3.h"' | |
324 | ;; | |
c6f8758f NC |
325 | m88*-*-openbsd*) |
326 | COREFILE=netbsd-core.lo | |
327 | ;; | |
252b5132 RH |
328 | ns32k-pc532-mach) |
329 | COREFILE=trad-core.lo | |
330 | TRAD_HEADER='"hosts/pc532mach.h"' | |
331 | ;; | |
332 | ns32k-*-netbsd* | ns32k-*-openbsd*) | |
333 | COREFILE=netbsd-core.lo | |
334 | ;; | |
eb1e0e80 NC |
335 | rs6000-*-lynx*) |
336 | COREFILE=lynx-core.lo | |
337 | ;; | |
338 | rs6000-*-aix5.* | powerpc-*-aix5.*) | |
339 | COREFILE=rs6000-core.lo | |
340 | COREFLAG="$COREFLAG -DAIX_5_CORE -DAIX_CORE_DUMPX_CORE" | |
341 | ;; | |
653f71ca | 342 | changequote(,)dnl |
83954261 | 343 | rs6000-*-aix4.[3-9]* | powerpc-*-aix4.[3-9]*) |
653f71ca KB |
344 | changequote([,])dnl |
345 | COREFILE=rs6000-core.lo | |
346 | COREFLAG="$COREFLAG -DAIX_CORE_DUMPX_CORE" | |
83954261 AM |
347 | # Not all versions of AIX with -DAIX_CORE_DUMPX_CORE |
348 | # have c_impl as a member of struct core_dumpx | |
349 | AC_MSG_CHECKING([for c_impl in struct core_dumpx]) | |
5464f5a1 | 350 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <core.h>]], [[struct core_dumpx c; c.c_impl = 0;]])],[AC_DEFINE(HAVE_ST_C_IMPL, 1, |
83954261 AM |
351 | [Define if struct core_dumpx has member c_impl]) |
352 | AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)]) | |
653f71ca | 353 | ;; |
252b5132 RH |
354 | rs6000-*-aix4*) COREFILE=rs6000-core.lo ;; |
355 | rs6000-*-*) COREFILE=rs6000-core.lo ;; | |
252b5132 RH |
356 | powerpc-*-aix4*) COREFILE=rs6000-core.lo ;; |
357 | powerpc-*-aix*) COREFILE=rs6000-core.lo ;; | |
358 | powerpc-*-beos*) ;; | |
13dfd2d0 NC |
359 | powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu) |
360 | COREFILE='' ;; | |
252b5132 | 361 | powerpc-*-netbsd*) COREFILE=netbsd-core.lo ;; |
d4af9775 | 362 | powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;; |
dc810e39 | 363 | s390*-*-*) COREFILE=trad-core.lo ;; |
8d05742f | 364 | sh*-*-netbsd*) COREFILE=netbsd-core.lo ;; |
a9bf1154 | 365 | sparc-*-netbsd* | sparc*-*-openbsd*) |
252b5132 RH |
366 | COREFILE=netbsd-core.lo |
367 | ;; | |
368 | tahoe-*-*) | |
369 | COREFILE=trad-core.lo | |
370 | TRAD_HEADER='"hosts/tahoe.h"' | |
371 | ;; | |
de6e5e1a NC |
372 | vax-*-netbsd* | vax-*-openbsd*) |
373 | COREFILE=netbsd-core.lo | |
374 | ;; | |
252b5132 RH |
375 | vax-*-ultrix2*) |
376 | COREFILE=trad-core.lo | |
377 | TRAD_HEADER='"hosts/vaxult2.h"' | |
378 | ;; | |
379 | vax-*-ultrix*) | |
380 | COREFILE=trad-core.lo | |
381 | TRAD_HEADER='"hosts/vaxult2.h"' | |
382 | ;; | |
ed84e695 | 383 | vax-*-linux-*) |
f8fc3443 NC |
384 | COREFILE=trad-core.lo |
385 | TRAD_HEADER='"hosts/vaxlinux.h"' | |
386 | ;; | |
252b5132 RH |
387 | vax-*-*) |
388 | COREFILE=trad-core.lo | |
389 | TRAD_HEADER='"hosts/vaxbsd.h"' | |
390 | ;; | |
85cfd8d3 MK |
391 | x86_64-*-netbsd* | x86_64-*-openbsd*) |
392 | COREFILE=netbsd-core.lo | |
393 | ;; | |
252b5132 RH |
394 | esac |
395 | ||
396 | case "$COREFILE" in | |
397 | aix386-core.lo) COREFLAG=-DAIX386_CORE ;; | |
398 | hppabsd-core.lo) COREFLAG=-DHPPABSD_CORE ;; | |
399 | hpux-core.lo) COREFLAG=-DHPUX_CORE ;; | |
400 | irix-core.lo) COREFLAG=-DIRIX_CORE ;; | |
401 | lynx-core.lo) COREFLAG=-DLYNX_CORE ;; | |
402 | netbsd-core.lo) COREFLAG=-DNETBSD_CORE ;; | |
403 | osf-core.lo) COREFLAG=-DOSF_CORE ;; | |
404 | ptrace-core.lo) COREFLAG=-DPTRACE_CORE ;; | |
405 | rs6000-core.lo) COREFLAG="$COREFLAG -DAIX_CORE" ;; | |
406 | sco5-core.lo) COREFLAG="$COREFLAG -DSCO5_CORE" ;; | |
407 | trad-core.lo) COREFLAG="$COREFLAG -DTRAD_CORE" ;; | |
408 | esac | |
409 | ||
410 | # ELF corefile support has several flavors, but all of | |
411 | # them use something called <sys/procfs.h> | |
412 | AC_CHECK_HEADERS(sys/procfs.h) | |
413 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
414 | BFD_HAVE_SYS_PROCFS_TYPE(prstatus_t) | |
7ee38065 | 415 | BFD_HAVE_SYS_PROCFS_TYPE(prstatus32_t) |
252b5132 | 416 | BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prstatus_t, pr_who) |
7ee38065 | 417 | BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prstatus32_t, pr_who) |
252b5132 | 418 | BFD_HAVE_SYS_PROCFS_TYPE(pstatus_t) |
f572a39d | 419 | BFD_HAVE_SYS_PROCFS_TYPE(pxstatus_t) |
7ee38065 | 420 | BFD_HAVE_SYS_PROCFS_TYPE(pstatus32_t) |
252b5132 | 421 | BFD_HAVE_SYS_PROCFS_TYPE(prpsinfo_t) |
7ee38065 | 422 | BFD_HAVE_SYS_PROCFS_TYPE(prpsinfo32_t) |
252b5132 | 423 | BFD_HAVE_SYS_PROCFS_TYPE(psinfo_t) |
7ee38065 | 424 | BFD_HAVE_SYS_PROCFS_TYPE(psinfo32_t) |
252b5132 | 425 | BFD_HAVE_SYS_PROCFS_TYPE(lwpstatus_t) |
f572a39d | 426 | BFD_HAVE_SYS_PROCFS_TYPE(lwpxstatus_t) |
252b5132 RH |
427 | BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_context) |
428 | BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_reg) | |
16e9c715 | 429 | BFD_HAVE_SYS_PROCFS_TYPE(win32_pstatus_t) |
252b5132 RH |
430 | fi |
431 | fi | |
432 | AC_SUBST(COREFILE) | |
433 | AC_SUBST(COREFLAG) | |
3f9b03b5 AM |
434 | if test -n "$TRAD_HEADER"; then |
435 | AC_DEFINE_UNQUOTED(TRAD_HEADER, $TRAD_HEADER, | |
436 | [Name of host specific header file to include in trad-core.c.]) | |
437 | fi | |
252b5132 RH |
438 | |
439 | # Horrible hacks to build DLLs on Windows. | |
440 | WIN32LDFLAGS= | |
441 | WIN32LIBADD= | |
442 | case "${host}" in | |
443 | *-*-cygwin*) | |
444 | if test "$enable_shared" = "yes"; then | |
445 | WIN32LDFLAGS="-no-undefined" | |
446 | WIN32LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32" | |
447 | fi | |
448 | ;; | |
78be1d6e | 449 | *-*-linux*) |
39691762 L |
450 | # We borrow WIN32LIBADD so that the shared libbfd won't depend on |
451 | # libiberty.a. | |
ca51bfff L |
452 | case "${host}" in |
453 | mips*-*-linux*) | |
454 | # Linux/MIPS uses PIC by default. | |
455 | if test "$enable_shared" = "yes"; then | |
456 | WIN32LIBADD="-L../libiberty -liberty" | |
457 | fi | |
458 | ;; | |
459 | *) | |
bb2a49f2 | 460 | changequote(,)dnl |
66e25bab | 461 | x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` |
bb2a49f2 AM |
462 | changequote([,])dnl |
463 | if test -n "$x"; then | |
ca51bfff L |
464 | WIN32LIBADD="-L../libiberty/pic -liberty" |
465 | fi | |
466 | ;; | |
467 | esac | |
39691762 | 468 | ;; |
252b5132 RH |
469 | esac |
470 | AC_SUBST(WIN32LDFLAGS) | |
471 | AC_SUBST(WIN32LIBADD) | |
472 | ||
473 | # target stuff: | |
474 | ||
475 | # Canonicalize the secondary target names. | |
476 | if test -n "$enable_targets" ; then | |
477 | for targ in `echo $enable_targets | sed 's/,/ /g'` | |
478 | do | |
6d83c84b | 479 | result=`$ac_config_sub $targ 2>/dev/null` |
252b5132 RH |
480 | if test -n "$result" ; then |
481 | canon_targets="$canon_targets $result" | |
482 | else | |
483 | # Allow targets that config.sub doesn't recognize, like "all". | |
484 | canon_targets="$canon_targets $targ" | |
485 | fi | |
486 | done | |
487 | fi | |
488 | ||
489 | all_targets=false | |
490 | defvec= | |
491 | selvecs= | |
08f74004 | 492 | assocvecs= |
252b5132 RH |
493 | selarchs= |
494 | TDEFINES= | |
495 | for targ in $target $canon_targets | |
496 | do | |
497 | if test "x$targ" = "xall"; then | |
498 | all_targets=true | |
08f74004 | 499 | assocvecs="$assocvecs $targ_defvec $targ_selvecs" |
252b5132 RH |
500 | else |
501 | . $srcdir/config.bfd | |
502 | if test "x$targ" = "x$target"; then | |
503 | defvec=$targ_defvec | |
504 | fi | |
505 | selvecs="$selvecs $targ_defvec $targ_selvecs" | |
506 | selarchs="$selarchs $targ_archs" | |
507 | TDEFINES="$TDEFINES $targ_cflags" | |
508 | fi | |
509 | done | |
510 | AC_SUBST(TDEFINES) | |
511 | ||
512 | # This processing still needs to be done if we're to decide properly whether | |
513 | # 64-bit support needs to be compiled in. Currently, it will be included if | |
514 | # the default or any other explicitly requested target requires it; it | |
515 | # will not be included on a 32-bit host if no 64-bit target is requested, and | |
9eb7245e | 516 | # no "--with-64-bit-bfd" option is given, even if "--enable-targets=all" is |
252b5132 RH |
517 | # used. |
518 | ||
519 | # uniq the default and selected vectors in all the configured targets. | |
520 | f="" | |
521 | for i in $selvecs ; do | |
522 | case " $f " in | |
523 | *" $i "*) ;; | |
524 | *) f="$f $i" ;; | |
525 | esac | |
526 | done | |
527 | selvecs="$f" | |
528 | ||
529 | ||
08f74004 AM |
530 | # uniq the associated vectors in all the configured targets. |
531 | f="" | |
532 | for i in $assocvecs ; do | |
533 | case " $f " in | |
534 | *" $i "*) ;; | |
535 | *) f="$f $i" ;; | |
536 | esac | |
537 | done | |
538 | assocvecs="$f" | |
539 | ||
540 | ||
252b5132 RH |
541 | # uniq the architectures in all the configured targets. |
542 | f="" | |
543 | for i in $selarchs ; do | |
544 | case " $f " in | |
545 | *" $i "*) ;; | |
546 | *) f="$f $i" ;; | |
547 | esac | |
548 | done | |
549 | selarchs="$f" | |
550 | ||
551 | # Target backend .o files. | |
552 | tb= | |
553 | ||
65765700 | 554 | elf="elf.lo elflink.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo" |
252b5132 RH |
555 | |
556 | for vec in $selvecs | |
557 | do | |
69263e90 | 558 | target_size=32 |
252b5132 RH |
559 | case "$vec" in |
560 | # This list is alphabetized to make it easy to compare | |
dc810e39 AM |
561 | # with the two vector lists in targets.c. For the same reason, |
562 | # use one entry per line, even though this leads to long lines. | |
252b5132 | 563 | a_out_adobe_vec) tb="$tb aout-adobe.lo aout32.lo" ;; |
341ca622 | 564 | aix5coff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo aix5ppc-core.lo"; target_size=64 ;; |
252b5132 RH |
565 | aout0_big_vec) tb="$tb aout0.lo aout32.lo" ;; |
566 | aout_arm_big_vec) tb="$tb aout-arm.lo aout32.lo" ;; | |
567 | aout_arm_little_vec) tb="$tb aout-arm.lo aout32.lo" ;; | |
252b5132 | 568 | apollocoff_vec) tb="$tb coff-apollo.lo" ;; |
dc810e39 AM |
569 | arm_epoc_pe_big_vec) tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;; |
570 | arm_epoc_pe_little_vec) tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;; | |
571 | arm_epoc_pei_big_vec) tb="$tb epoc-pei-arm.lo peigen.lo cofflink.lo " ;; | |
572 | arm_epoc_pei_little_vec) tb="$tb epoc-pei-arm.lo peigen.lo cofflink.lo " ;; | |
573 | armcoff_big_vec) tb="$tb coff-arm.lo cofflink.lo " ;; | |
574 | armcoff_little_vec) tb="$tb coff-arm.lo cofflink.lo " ;; | |
575 | armnetbsd_vec) tb="$tb armnetbsd.lo aout32.lo" ;; | |
576 | armpe_big_vec) tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;; | |
577 | armpe_little_vec) tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;; | |
578 | armpei_big_vec) tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;; | |
579 | armpei_little_vec) tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;; | |
252b5132 RH |
580 | b_out_vec_big_host) tb="$tb bout.lo aout32.lo" ;; |
581 | b_out_vec_little_host) tb="$tb bout.lo aout32.lo" ;; | |
fac41780 | 582 | bfd_efi_app_ia32_vec) tb="$tb efi-app-ia32.lo peigen.lo cofflink.lo" ;; |
dc810e39 | 583 | bfd_efi_app_ia64_vec) tb="$tb efi-app-ia64.lo pepigen.lo cofflink.lo"; target_size=64 ;; |
73c3cd1c | 584 | bfd_elf32_am33lin_vec) tb="$tb elf32-am33lin.lo elf32.lo $elf" ;; |
adde6300 | 585 | bfd_elf32_avr_vec) tb="$tb elf32-avr.lo elf32.lo $elf" ;; |
0f64bb02 | 586 | bfd_elf32_bfin_vec) tb="$tb elf32-bfin.lo elf32.lo $elf" ;; |
dc810e39 | 587 | bfd_elf32_big_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;; |
252b5132 | 588 | bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;; |
7f266840 | 589 | bfd_elf32_bigarm_vec) tb="$tb elf32-arm.lo elf32.lo $elf" ;; |
e5a52504 | 590 | bfd_elf32_bigarm_symbian_vec) |
7f266840 | 591 | tb="$tb elf32-arm.lo elf32.lo $elf" ;; |
4e7fd91e PB |
592 | bfd_elf32_bigarm_vxworks_vec) |
593 | tb="$tb elf32-arm.lo elf32.lo $elf" ;; | |
c6e90b02 | 594 | bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;; |
0949843d | 595 | bfd_elf32_cr16c_vec) tb="$tb elf32-cr16c.lo elf32.lo $elf" ;; |
06c15ad7 | 596 | bfd_elf32_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;; |
1fe1f39c | 597 | bfd_elf32_crx_vec) tb="$tb elf32-crx.lo elf32.lo $elf" ;; |
252b5132 RH |
598 | bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;; |
599 | bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;; | |
d172d4ba | 600 | bfd_elf32_dlx_big_vec) tb="$tb elf32-dlx.lo elf32.lo $elf" ;; |
252b5132 | 601 | bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;; |
4e5ba5b7 | 602 | bfd_elf32_frv_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;; |
43850d5b | 603 | bfd_elf32_frvfdpic_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;; |
e01b0e69 | 604 | bfd_elf32_h8300_vec) tb="$tb elf32-h8300.lo elf32.lo $elf" ;; |
dc810e39 | 605 | bfd_elf32_hppa_linux_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; |
225247f0 | 606 | bfd_elf32_hppa_nbsd_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; |
dc810e39 | 607 | bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; |
5b93d8bb | 608 | bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;; |
eac338cf PB |
609 | bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386.lo elf-vxworks.lo elf32.lo $elf" ;; |
610 | bfd_elf32_i386_vxworks_vec) tb="$tb elf32-i386.lo elf-vxworks.lo elf32.lo $elf" ;; | |
611 | bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf-vxworks.lo elf32.lo $elf" ;; | |
9d751335 | 612 | bfd_elf32_i860_little_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;; |
dc810e39 | 613 | bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;; |
b2ef150d | 614 | bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;; |
dc810e39 | 615 | bfd_elf32_ia64_big_vec) tb="$tb elf32-ia64.lo elf32.lo $elf" ;; |
fcf12726 | 616 | bfd_elf32_ia64_hpux_big_vec) tb="$tb elf32-ia64.lo elf32.lo $elf";; |
cf88bb9f | 617 | bfd_elf32_ip2k_vec) tb="$tb elf32-ip2k.lo elf32.lo $elf" ;; |
a75473eb | 618 | bfd_elf32_iq2000_vec) tb="$tb elf32-iq2000.lo elf32.lo $elf" ;; |
252b5132 | 619 | bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;; |
dc810e39 | 620 | bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;; |
e5a52504 | 621 | bfd_elf32_littlearm_symbian_vec) |
7f266840 | 622 | tb="$tb elf32-arm.lo elf32.lo $elf" ;; |
4e7fd91e PB |
623 | bfd_elf32_littlearm_vxworks_vec) |
624 | tb="$tb elf32-arm.lo elf32.lo $elf" ;; | |
7f266840 | 625 | bfd_elf32_littlearm_vec) tb="$tb elf32-arm.lo elf32.lo $elf" ;; |
c6e90b02 | 626 | bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;; |
e729279b | 627 | bfd_elf32_m32c_vec) tb="$tb elf32-m32c.lo elf32.lo $elf" ;; |
252b5132 | 628 | bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;; |
6edf0760 NC |
629 | bfd_elf32_m32rle_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;; |
630 | bfd_elf32_m32rlin_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;; | |
631 | bfd_elf32_m32rlelin_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;; | |
f5a6f915 SC |
632 | bfd_elf32_m68hc11_vec) tb="$tb elf32-m68hc11.lo elf32-m68hc1x.lo elf32.lo $elf" ;; |
633 | bfd_elf32_m68hc12_vec) tb="$tb elf32-m68hc12.lo elf32-m68hc1x.lo elf32.lo $elf" ;; | |
252b5132 RH |
634 | bfd_elf32_m68k_vec) tb="$tb elf32-m68k.lo elf32.lo $elf" ;; |
635 | bfd_elf32_m88k_vec) tb="$tb elf32-m88k.lo elf32.lo $elf" ;; | |
636 | bfd_elf32_mcore_big_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;; | |
637 | bfd_elf32_mcore_little_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;; | |
638 | bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;; | |
639 | bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;; | |
d031aafb | 640 | bfd_elf32_mt_vec) tb="$tb elf32-mt.lo elf32.lo $elf" ;; |
2469cfa2 | 641 | bfd_elf32_msp430_vec) tb="$tb elf32-msp430.lo elf32.lo $elf" ;; |
8a397dad TS |
642 | bfd_elf32_nbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; |
643 | bfd_elf32_nlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; | |
644 | bfd_elf32_ntradbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; | |
645 | bfd_elf32_ntradlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; | |
b3baf5d0 | 646 | bfd_elf32_openrisc_vec) tb="$tb elf32-openrisc.lo elf32.lo $elf" ;; |
3b16e843 | 647 | bfd_elf32_or32_big_vec) tb="$tb elf32-or32.lo elf32.lo $elf" ;; |
0bcb993b ILT |
648 | bfd_elf32_pj_vec) tb="$tb elf32-pj.lo elf32.lo $elf";; |
649 | bfd_elf32_pjl_vec) tb="$tb elf32-pj.lo elf32.lo $elf";; | |
9d8504b1 PB |
650 | bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; |
651 | bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; | |
652 | bfd_elf32_powerpc_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; | |
a85d7ed0 | 653 | bfd_elf32_s390_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;; |
eb1e0e80 NC |
654 | # FIXME: We include cofflink.lo not because it's needed for |
655 | # bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec | |
656 | # which needs it but does not list it. Should be fixed in right place. | |
9cba27b2 JT |
657 | bfd_elf32_sh64_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;; |
658 | bfd_elf32_sh64l_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;; | |
2bc3c89a AM |
659 | bfd_elf32_sh64lin_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;; |
660 | bfd_elf32_sh64blin_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;; | |
661 | bfd_elf32_sh64lnbsd_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;; | |
662 | bfd_elf32_sh64nbsd_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;; | |
b6821651 AM |
663 | bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;; |
664 | bfd_elf32_shblin_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; | |
665 | bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;; | |
85fbca6a | 666 | bfd_elf32_shl_symbian_vec) tb="$tb elf32-sh-symbian.lo elf32-sh64-com.lo elf32.lo $elf coff-sh.lo" ;; |
b6821651 AM |
667 | bfd_elf32_shlin_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; |
668 | bfd_elf32_shlnbsd_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; | |
669 | bfd_elf32_shnbsd_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; | |
22b75d0a | 670 | bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elfxx-sparc.lo elf32.lo $elf" ;; |
c6e90b02 TS |
671 | bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;; |
672 | bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;; | |
dc810e39 | 673 | bfd_elf32_us_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;; |
252b5132 | 674 | bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;; |
90ace9e9 | 675 | bfd_elf32_vax_vec) tb="$tb elf32-vax.lo elf32.lo $elf" ;; |
93fbbb04 | 676 | bfd_elf32_xstormy16_vec) tb="$tb elf32-xstormy16.lo elf32.lo $elf" ;; |
e0001a05 NC |
677 | bfd_elf32_xtensa_le_vec) tb="$tb xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;; |
678 | bfd_elf32_xtensa_be_vec) tb="$tb xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;; | |
2238051f | 679 | bfd_elf64_alpha_freebsd_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;; |
dc810e39 AM |
680 | bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;; |
681 | bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;; | |
c6e90b02 | 682 | bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; |
dc810e39 AM |
683 | bfd_elf64_hppa_linux_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;; |
684 | bfd_elf64_hppa_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;; | |
dc810e39 | 685 | bfd_elf64_ia64_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;; |
fcf12726 | 686 | bfd_elf64_ia64_hpux_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;; |
dc810e39 AM |
687 | bfd_elf64_ia64_little_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;; |
688 | bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;; | |
c6e90b02 | 689 | bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; |
3c3bdf30 | 690 | bfd_elf64_mmix_vec) tb="$tb elf64-mmix.lo elf64.lo $elf" target_size=64 ;; |
dc810e39 AM |
691 | bfd_elf64_powerpc_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;; |
692 | bfd_elf64_powerpcle_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;; | |
693 | bfd_elf64_s390_vec) tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;; | |
341ca622 AM |
694 | bfd_elf64_sh64_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; |
695 | bfd_elf64_sh64l_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; | |
2bc3c89a AM |
696 | bfd_elf64_sh64lin_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; |
697 | bfd_elf64_sh64blin_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; | |
698 | bfd_elf64_sh64lnbsd_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; | |
699 | bfd_elf64_sh64nbsd_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; | |
22b75d0a | 700 | bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf64.lo $elf"; target_size=64 ;; |
c6e90b02 TS |
701 | bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; |
702 | bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; | |
dc810e39 | 703 | bfd_elf64_x86_64_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;; |
3c3bdf30 | 704 | bfd_mmo_vec) tb="$tb mmo.lo" target_size=64 ;; |
dc810e39 AM |
705 | bfd_powerpc_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;; |
706 | bfd_powerpc_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;; | |
707 | bfd_powerpcle_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;; | |
708 | bfd_powerpcle_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;; | |
06c15ad7 | 709 | cris_aout_vec) tb="$tb aout-cris.lo" ;; |
dc810e39 | 710 | demo_64_vec) tb="$tb demo64.lo aout64.lo"; target_size=64 ;; |
252b5132 | 711 | ecoff_big_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;; |
252b5132 | 712 | ecoff_biglittle_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;; |
dc810e39 AM |
713 | ecoff_little_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;; |
714 | ecoffalpha_little_vec) tb="$tb coff-alpha.lo ecoff.lo ecofflink.lo"; target_size=64 ;; | |
252b5132 RH |
715 | go32coff_vec) tb="$tb coff-go32.lo cofflink.lo" ;; |
716 | go32stubbedcoff_vec) tb="$tb coff-stgo32.lo cofflink.lo" ;; | |
717 | h8300coff_vec) tb="$tb coff-h8300.lo reloc16.lo" ;; | |
718 | h8500coff_vec) tb="$tb coff-h8500.lo reloc16.lo" ;; | |
719 | host_aout_vec) tb="$tb host-aout.lo aout32.lo" ;; | |
720 | hp300bsd_vec) tb="$tb hp300bsd.lo aout32.lo" ;; | |
721 | hp300hpux_vec) tb="$tb hp300hpux.lo aout32.lo" ;; | |
722 | i386aout_vec) tb="$tb i386aout.lo aout32.lo" ;; | |
723 | i386bsd_vec) tb="$tb i386bsd.lo aout32.lo" ;; | |
724 | i386coff_vec) tb="$tb coff-i386.lo cofflink.lo" ;; | |
725 | i386dynix_vec) tb="$tb i386dynix.lo aout32.lo" ;; | |
726 | i386freebsd_vec) tb="$tb i386freebsd.lo aout32.lo" ;; | |
252b5132 RH |
727 | i386linux_vec) tb="$tb i386linux.lo aout32.lo" ;; |
728 | i386lynx_aout_vec) tb="$tb i386lynx.lo lynx-core.lo aout32.lo" ;; | |
729 | i386lynx_coff_vec) tb="$tb cf-i386lynx.lo cofflink.lo lynx-core.lo" ;; | |
730 | i386mach3_vec) tb="$tb i386mach3.lo aout32.lo" ;; | |
dc810e39 | 731 | i386msdos_vec) tb="$tb i386msdos.lo" ;; |
252b5132 RH |
732 | i386netbsd_vec) tb="$tb i386netbsd.lo aout32.lo" ;; |
733 | i386os9k_vec) tb="$tb i386os9k.lo aout32.lo" ;; | |
dc810e39 AM |
734 | i386pe_vec) tb="$tb pe-i386.lo peigen.lo cofflink.lo" ;; |
735 | i386pei_vec) tb="$tb pei-i386.lo peigen.lo cofflink.lo" ;; | |
252b5132 RH |
736 | i860coff_vec) tb="$tb coff-i860.lo cofflink.lo" ;; |
737 | icoff_big_vec) tb="$tb coff-i960.lo cofflink.lo" ;; | |
738 | icoff_little_vec) tb="$tb coff-i960.lo cofflink.lo" ;; | |
739 | ieee_vec) tb="$tb ieee.lo" ;; | |
dc810e39 AM |
740 | m68k4knetbsd_vec) tb="$tb m68k4knetbsd.lo aout32.lo" ;; |
741 | m68kaux_coff_vec) tb="$tb coff-aux.lo coff-m68k.lo cofflink.lo" ;; | |
252b5132 RH |
742 | m68kcoff_vec) tb="$tb coff-m68k.lo cofflink.lo" ;; |
743 | m68kcoffun_vec) tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;; | |
744 | m68klinux_vec) tb="$tb m68klinux.lo aout32.lo" ;; | |
252b5132 | 745 | m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;; |
252b5132 RH |
746 | m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;; |
747 | m88kbcs_vec) tb="$tb coff-m88k.lo" ;; | |
341ca622 | 748 | m88kmach3_vec) tb="$tb m88kmach3.lo aout32.lo" ;; |
c6f8758f | 749 | m88kopenbsd_vec) tb="$tb m88kopenbsd.lo aout32.lo" ;; |
7499d566 | 750 | maxqcoff_vec) tb="$tb coff-maxq.lo" ;; |
93509525 KD |
751 | mach_o_be_vec) tb="$tb mach-o.lo" ;; |
752 | mach_o_le_vec) tb="$tb mach-o.lo" ;; | |
753 | mach_o_fat_vec) tb="$tb mach-o.lo" ;; | |
277d1b5e ILT |
754 | mcore_pe_big_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;; |
755 | mcore_pe_little_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;; | |
756 | mcore_pei_big_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;; | |
757 | mcore_pei_little_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;; | |
dc810e39 AM |
758 | mipslpe_vec) tb="$tb pe-mips.lo peigen.lo cofflink.lo" ;; |
759 | mipslpei_vec) tb="$tb pei-mips.lo peigen.lo cofflink.lo" ;; | |
252b5132 | 760 | newsos3_vec) tb="$tb newsos3.lo aout32.lo" ;; |
dc810e39 | 761 | nlm32_alpha_vec) tb="$tb nlm32-alpha.lo nlm32.lo nlm.lo"; target_size=64 ;; |
252b5132 | 762 | nlm32_i386_vec) tb="$tb nlm32-i386.lo nlm32.lo nlm.lo" ;; |
252b5132 | 763 | nlm32_powerpc_vec) tb="$tb nlm32-ppc.lo nlm32.lo nlm.lo" ;; |
dc810e39 | 764 | nlm32_sparc_vec) tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;; |
3b16e843 | 765 | or32coff_big_vec) tb="$tb coff-or32.lo cofflink.lo" ;; |
252b5132 | 766 | pc532machaout_vec) tb="$tb pc532-mach.lo aout-ns32k.lo" ;; |
dc810e39 | 767 | pc532netbsd_vec) tb="$tb ns32knetbsd.lo aout-ns32k.lo" ;; |
93509525 KD |
768 | pef_vec) tb="$tb pef.lo" ;; |
769 | pef_xlib_vec) tb="$tb pef.lo" ;; | |
e135f41b | 770 | pdp11_aout_vec) tb="$tb pdp11.lo" ;; |
6768c14a | 771 | pmac_xcoff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;; |
252b5132 | 772 | ppcboot_vec) tb="$tb ppcboot.lo" ;; |
dc810e39 | 773 | riscix_vec) tb="$tb aout32.lo riscix.lo" ;; |
eb1e0e80 | 774 | rs6000coff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo aix5ppc-core.lo"; target_size=64 ;; |
dc810e39 | 775 | rs6000coff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;; |
252b5132 | 776 | shcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;; |
dc810e39 | 777 | shcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;; |
252b5132 | 778 | shlcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;; |
dc810e39 | 779 | shlcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;; |
60bcf0fa NC |
780 | shlpe_vec) tb="$tb pe-sh.lo coff-sh.lo peigen.lo cofflink.lo" ;; |
781 | shlpei_vec) tb="$tb pei-sh.lo coff-sh.lo peigen.lo cofflink.lo" ;; | |
252b5132 | 782 | som_vec) tb="$tb som.lo" ;; |
dc810e39 | 783 | sparccoff_vec) tb="$tb coff-sparc.lo" ;; |
252b5132 RH |
784 | sparcle_aout_vec) tb="$tb aout-sparcle.lo aout32.lo" ;; |
785 | sparclinux_vec) tb="$tb sparclinux.lo aout32.lo" ;; | |
786 | sparclynx_aout_vec) tb="$tb sparclynx.lo lynx-core.lo aout32.lo" ;; | |
787 | sparclynx_coff_vec) tb="$tb cf-sparclynx.lo lynx-core.lo" ;; | |
788 | sparcnetbsd_vec) tb="$tb sparcnetbsd.lo aout32.lo" ;; | |
252b5132 | 789 | sunos_big_vec) tb="$tb sunos.lo aout32.lo" ;; |
93509525 | 790 | sym_vec) tb="$tb xsym.lo" ;; |
252b5132 RH |
791 | tic30_aout_vec) tb="$tb aout-tic30.lo" ;; |
792 | tic30_coff_vec) tb="$tb coff-tic30.lo" ;; | |
026df7c5 NC |
793 | tic4x_coff0_vec) tb="$tb coff-tic4x.lo" ;; |
794 | tic4x_coff0_beh_vec) tb="$tb coff-tic4x.lo" ;; | |
795 | tic4x_coff1_vec) tb="$tb coff-tic4x.lo" ;; | |
796 | tic4x_coff1_beh_vec) tb="$tb coff-tic4x.lo" ;; | |
797 | tic4x_coff2_vec) tb="$tb coff-tic4x.lo" ;; | |
798 | tic4x_coff2_beh_vec) tb="$tb coff-tic4x.lo" ;; | |
81635ce4 | 799 | tic54x_coff0_beh_vec) tb="$tb coff-tic54x.lo" ;; |
dc810e39 | 800 | tic54x_coff0_vec) tb="$tb coff-tic54x.lo" ;; |
81635ce4 | 801 | tic54x_coff1_beh_vec) tb="$tb coff-tic54x.lo" ;; |
dc810e39 | 802 | tic54x_coff1_vec) tb="$tb coff-tic54x.lo" ;; |
81635ce4 | 803 | tic54x_coff2_beh_vec) tb="$tb coff-tic54x.lo" ;; |
dc810e39 | 804 | tic54x_coff2_vec) tb="$tb coff-tic54x.lo" ;; |
252b5132 | 805 | tic80coff_vec) tb="$tb coff-tic80.lo cofflink.lo" ;; |
90ace9e9 | 806 | vaxnetbsd_vec) tb="$tb vaxnetbsd.lo aout32.lo" ;; |
3c2bfad6 | 807 | vax1knetbsd_vec) tb="$tb vax1knetbsd.lo aout32.lo" ;; |
ba26fd96 | 808 | vaxbsd_vec) tb="$tb vaxbsd.lo aout32.lo" ;; |
252b5132 | 809 | versados_vec) tb="$tb versados.lo" ;; |
dc810e39 | 810 | vms_alpha_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo"; target_size=64 ;; |
252b5132 RH |
811 | vms_vax_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo" ;; |
812 | w65_vec) tb="$tb coff-w65.lo reloc16.lo" ;; | |
813 | we32kcoff_vec) tb="$tb coff-we32k.lo" ;; | |
3c9b82ba | 814 | z80coff_vec) tb="$tb coff-z80.lo reloc16.lo" ;; |
c0524131 | 815 | z8kcoff_vec) tb="$tb coff-z8k.lo reloc16.lo cofflink.lo" ;; |
252b5132 | 816 | |
341ca622 AM |
817 | # These appear out of order in targets.c |
818 | srec_vec) tb="$tb srec.lo" ;; | |
819 | symbolsrec_vec) tb="$tb srec.lo" ;; | |
820 | tekhex_vec) tb="$tb tekhex.lo" ;; | |
821 | cisco_core_big_vec) tb="$tb cisco-core.lo" ;; | |
822 | cisco_core_little_vec) tb="$tb cisco-core.lo" ;; | |
823 | ||
252b5132 RH |
824 | "") ;; |
825 | *) AC_MSG_ERROR(*** unknown target vector $vec) ;; | |
826 | esac | |
69263e90 AM |
827 | |
828 | if test ${target_size} = 64; then | |
829 | target64=true | |
830 | fi | |
831 | if test x"${vec}" = x"${defvec}"; then | |
832 | bfd_default_target_size=${target_size} | |
833 | fi | |
252b5132 RH |
834 | done |
835 | ||
836 | # Target architecture .o files. | |
837 | # A couple of CPUs use shorter file names to avoid problems on DOS | |
838 | # filesystems. | |
d031aafb | 839 | ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.lo/g -e s/mn10200/m10200/ -e s/mn10300/m10300/` |
252b5132 RH |
840 | |
841 | # Weed out duplicate .o files. | |
842 | f="" | |
843 | for i in $tb ; do | |
844 | case " $f " in | |
845 | *" $i "*) ;; | |
846 | *) f="$f $i" ;; | |
847 | esac | |
848 | done | |
849 | tb="$f" | |
850 | ||
851 | f="" | |
852 | for i in $ta ; do | |
853 | case " $f " in | |
854 | *" $i "*) ;; | |
855 | *) f="$f $i" ;; | |
856 | esac | |
857 | done | |
858 | ta="$f" | |
859 | ||
860 | bfd_backends="$tb" | |
861 | bfd_machines="$ta" | |
862 | ||
863 | if test x${all_targets} = xtrue ; then | |
864 | bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)' | |
865 | bfd_machines="${bfd_machines}"' $(ALL_MACHINES)' | |
866 | selvecs= | |
867 | havevecs= | |
868 | selarchs= | |
08f74004 AM |
869 | test -n "$assocvecs" && |
870 | assocvecs=`echo $assocvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'` | |
252b5132 RH |
871 | else # all_targets is true |
872 | # Only set these if they will be nonempty, for the clever echo. | |
873 | havevecs= | |
08f74004 | 874 | assocvecs= |
252b5132 RH |
875 | test -n "$selvecs" && |
876 | havevecs=`echo $selvecs | sed -e 's/^/-DHAVE_/' -e 's/ \(.\)/ -DHAVE_\1/g'` | |
877 | test -n "$selvecs" && | |
878 | selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'` | |
879 | test -n "$selarchs" && | |
880 | selarchs=`echo $selarchs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'` | |
881 | fi # all_targets is true | |
882 | ||
883 | case ${host64}-${target64}-${want64} in | |
884 | *true*) | |
885 | wordsize=64 | |
36b45482 | 886 | bfd_libs='$(BFD64_LIBS) $(BFD32_LIBS)' |
252b5132 | 887 | all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)' |
ccba357f | 888 | if test $BFD_HOST_64_BIT_DEFINED = 0; then |
252b5132 RH |
889 | AC_MSG_WARN([You have requested a 64 bit BFD configuration, but]) |
890 | AC_MSG_WARN([your compiler may not have a 64 bit integral type]) | |
891 | fi | |
966abd70 HPN |
892 | if test -n "$GCC" ; then |
893 | bad_64bit_gcc=no; | |
894 | AC_MSG_CHECKING([for gcc version with buggy 64-bit support]) | |
895 | # Add more tests for gcc versions with non-working 64-bit support here. | |
896 | AC_EGREP_CPP([: 2 : 91 : 1 :],[:__GNUC__:__GNUC_MINOR__:__i386__:], | |
897 | bad_64bit_gcc=yes; | |
898 | AC_MSG_RESULT([yes: egcs-1.1.2 on ix86 spotted]), | |
899 | AC_MSG_RESULT(no)) | |
900 | if test $bad_64bit_gcc = yes ; then | |
5464f5a1 | 901 | AC_MSG_ERROR([A newer version of gcc is needed for the requested 64-bit BFD configuration]) |
966abd70 HPN |
902 | fi |
903 | fi | |
252b5132 RH |
904 | ;; |
905 | false-false-false) | |
906 | wordsize=32 | |
36b45482 | 907 | bfd_libs='$(BFD32_LIBS)' |
252b5132 RH |
908 | all_backends='$(BFD32_BACKENDS)' |
909 | ;; | |
910 | esac | |
911 | ||
912 | AC_SUBST(wordsize) | |
36b45482 | 913 | AC_SUBST(bfd_libs) |
252b5132 RH |
914 | AC_SUBST(all_backends) |
915 | AC_SUBST(bfd_backends) | |
916 | AC_SUBST(bfd_machines) | |
69263e90 | 917 | AC_SUBST(bfd_default_target_size) |
252b5132 | 918 | |
1012372a AC |
919 | # Determine the host dependant file_ptr a.k.a. off_t type. In order |
920 | # prefer: off64_t - if ftello64 and fseeko64, off_t - if ftello and | |
921 | # fseeko, long. This assumes that sizeof off_t is .ge. sizeof long. | |
922 | # Hopefully a reasonable assumption since fseeko et.al. should be | |
923 | # upward compatible. | |
2e6f4fae | 924 | AC_CHECK_FUNCS(ftello ftello64 fseeko fseeko64 fopen64) |
1012372a | 925 | if test x"$ac_cv_func_ftello" = xyes -a x"$ac_cv_func_fseeko" = xyes; then |
2ba49b59 | 926 | AC_CHECK_SIZEOF(off_t) |
1012372a | 927 | fi |
ccba357f AM |
928 | AC_MSG_CHECKING([file_ptr type]) |
929 | bfd_file_ptr="long" | |
930 | bfd_ufile_ptr="unsigned long" | |
931 | if test x"$ac_cv_func_ftello64" = xyes -a x"$ac_cv_func_fseeko64" = xyes \ | |
932 | -o x"${ac_cv_sizeof_off_t}" = x8; then | |
1012372a AC |
933 | bfd_file_ptr=BFD_HOST_64_BIT |
934 | bfd_ufile_ptr=BFD_HOST_U_64_BIT | |
935 | fi | |
936 | AC_MSG_RESULT($bfd_file_ptr) | |
937 | AC_SUBST(bfd_file_ptr) | |
938 | AC_SUBST(bfd_ufile_ptr) | |
939 | ||
940 | ||
252b5132 RH |
941 | tdefaults="" |
942 | test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}" | |
943 | test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'" | |
08f74004 | 944 | test -n "${assocvecs}" && tdefaults="${tdefaults} -DASSOCIATED_VECS='${assocvecs}'" |
252b5132 RH |
945 | test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'" |
946 | test -n "${havevecs}" && tdefaults="${tdefaults} ${havevecs}" | |
947 | AC_SUBST(tdefaults) | |
948 | ||
949 | dnl AC_CHECK_HEADERS(sys/mman.h) | |
950 | AC_FUNC_MMAP | |
951 | AC_CHECK_FUNCS(madvise mprotect) | |
952 | case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in | |
953 | true+yes ) AC_DEFINE(USE_MMAP, 1, [Use mmap if it's available?]) ;; | |
954 | esac | |
955 | ||
956 | rm -f doc/config.status | |
5464f5a1 NN |
957 | AC_CONFIG_FILES([Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in]) |
958 | AC_CONFIG_COMMANDS([default],[[sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' -e '/BLD-POTFILES =/r po/BLD-POTFILES' po/Makefile.in > po/Makefile]],[[]]) | |
959 | AC_OUTPUT | |
55c80943 | 960 |