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