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