]>
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 | ||
862517b6 | 10 | AM_INIT_AUTOMAKE(bfd, 2.11.92) |
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 | ||
111 | ALL_LINGUAS= | |
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='' ;; |
252b5132 RH |
168 | arm-*-riscix) COREFILE=trad-core.lo ;; |
169 | hppa*-*-hpux*) COREFILE=hpux-core.lo ;; | |
170 | hppa*-*-hiux*) COREFILE=hpux-core.lo ;; | |
171 | hppa*-*-mpeix*) COREFILE=hpux-core.lo ;; | |
172 | hppa*-*-bsd*) COREFILE="hpux-core.lo hppabsd-core.lo" | |
173 | COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;; | |
dc810e39 | 174 | i370-*-*) |
5b93d8bb AM |
175 | COREFILE=trad-core.lo |
176 | TRAD_HEADER='"hosts/i370linux.h"' | |
177 | ;; | |
178 | ||
252b5132 RH |
179 | changequote(,)dnl |
180 | i[3456]86-sequent-bsd*) | |
181 | changequote([,])dnl | |
5b93d8bb | 182 | COREFILE=trad-core.lo |
252b5132 RH |
183 | TRAD_HEADER='"hosts/symmetry.h"' |
184 | ;; | |
185 | changequote(,)dnl | |
186 | i[3456]86-sequent-sysv4*) ;; | |
187 | i[3456]86-sequent-sysv*) | |
188 | changequote([,])dnl | |
189 | COREFILE=trad-core.lo | |
190 | TRAD_HEADER='"hosts/symmetry.h"' | |
191 | ;; | |
7e3b3466 NC |
192 | changequote(,)dnl |
193 | i[3456]86-*-bsdi) | |
194 | changequote([,])dnl | |
195 | COREFILE= | |
196 | ;; | |
252b5132 | 197 | changequote(,)dnl |
d4af9775 | 198 | i[3456]86-*-bsd* | i[34567]86-*-freebsd[1234] | i[34567]86-*-freebsd[1234]\.* | i[34567]86-*-freebsd*aout*) |
252b5132 RH |
199 | changequote([,])dnl |
200 | COREFILE=trad-core.lo | |
201 | TRAD_HEADER='"hosts/i386bsd.h"' | |
202 | ;; | |
d4af9775 DB |
203 | changequote(,)dnl |
204 | i[3456]86-*-freebsd*) | |
205 | changequote([,])dnl | |
206 | COREFILE='' | |
207 | TRAD_HEADER='"hosts/i386bsd.h"' | |
208 | ;; | |
252b5132 RH |
209 | changequote(,)dnl |
210 | i[3456]86-*-netbsd* | i[3456]86-*-openbsd*) | |
211 | changequote([,])dnl | |
212 | COREFILE=netbsd-core.lo | |
213 | ;; | |
214 | changequote(,)dnl | |
215 | i[3456]86-esix-sysv3*) | |
216 | changequote([,])dnl | |
217 | COREFILE=trad-core.lo | |
218 | TRAD_HEADER='"hosts/esix.h"' | |
219 | ;; | |
220 | changequote(,)dnl | |
221 | i[3456]86-*-sco3.2v5*) | |
222 | changequote([,])dnl | |
223 | COREFILE=sco5-core.lo | |
224 | ;; | |
225 | changequote(,)dnl | |
226 | i[3456]86-*-sco* | i[3456]86-*-isc*) | |
227 | changequote([,])dnl | |
228 | COREFILE=trad-core.lo | |
229 | TRAD_HEADER='"hosts/i386sco.h"' | |
230 | ;; | |
231 | changequote(,)dnl | |
232 | i[3456]86-*-mach3*) | |
233 | changequote([,])dnl | |
234 | COREFILE=trad-core.lo | |
235 | TRAD_HEADER='"hosts/i386mach3.h"' | |
236 | ;; | |
237 | changequote(,)dnl | |
238 | i[3456]86-*-linux-gnu*) | |
239 | changequote([,])dnl | |
240 | COREFILE=trad-core.lo | |
241 | TRAD_HEADER='"hosts/i386linux.h"' | |
242 | ;; | |
243 | changequote(,)dnl | |
244 | i[3456]86-*-isc*) COREFILE=trad-core.lo ;; | |
245 | i[3456]86-*-aix*) COREFILE=aix386-core.lo ;; | |
246 | changequote([,])dnl | |
247 | i860-*-mach3* | i860-*-osf1*) | |
248 | COREFILE=trad-core.lo | |
249 | TRAD_HEADER='"hosts/i860mach3.h"' | |
250 | ;; | |
251 | mips-dec-bsd*) | |
252 | COREFILE=trad-core.lo | |
253 | TRAD_HEADER='"hosts/mipsbsd.h"' | |
254 | ;; | |
255 | mips-dec-mach3*) | |
256 | COREFILE=trad-core.lo | |
257 | TRAD_HEADER='"hosts/mipsmach3.h"' | |
258 | ;; | |
259 | mips-*-netbsd* | mips*-*-openbsd*) | |
260 | COREFILE=netbsd-core.lo | |
261 | ;; | |
262 | mips-dec-*) | |
263 | COREFILE=trad-core.lo | |
264 | TRAD_HEADER='"hosts/decstation.h"' | |
265 | ;; | |
266 | mips-sgi-irix4*) COREFILE=irix-core.lo ;; | |
267 | mips-sgi-irix5*) COREFILE=irix-core.lo ;; | |
268 | mips-sgi-irix6*) COREFILE=irix-core.lo ;; | |
269 | mips-*-mach3*) | |
270 | COREFILE=trad-core.lo | |
271 | TRAD_HEADER='"hosts/mipsmach3.h"' | |
272 | ;; | |
273 | mips-*-sysv4*) ;; | |
274 | mips-*-sysv* | mips-*-riscos*) | |
275 | COREFILE=trad-core.lo | |
276 | TRAD_HEADER='"hosts/riscos.h"' | |
277 | ;; | |
278 | mips-sony-bsd*) | |
279 | COREFILE=trad-core.lo | |
280 | TRAD_HEADER='"hosts/news-mips.h"' | |
281 | ;; | |
282 | m68*-bull*-sysv*) | |
283 | COREFILE=trad-core.lo | |
284 | TRAD_HEADER='"hosts/dpx2.h"' | |
285 | ;; | |
286 | m68*-hp-hpux*) COREFILE=hpux-core.lo ;; | |
287 | m68*-hp-bsd*) | |
288 | COREFILE=trad-core.lo | |
289 | TRAD_HEADER='"hosts/hp300bsd.h"' | |
290 | ;; | |
291 | m68*-*-linux-gnu*) | |
292 | COREFILE=trad-core.lo | |
293 | TRAD_HEADER='"hosts/m68klinux.h"' | |
294 | ;; | |
295 | m68*-motorola-sysv*) | |
296 | COREFILE=trad-core.lo | |
297 | TRAD_HEADER='"hosts/delta68.h"' | |
298 | ;; | |
299 | m68*-sony-*) | |
300 | COREFILE=trad-core.lo | |
301 | TRAD_HEADER='"hosts/news.h"' | |
302 | ;; | |
303 | m68*-*-netbsd* | m68*-*-openbsd*) | |
304 | COREFILE=netbsd-core.lo | |
305 | ;; | |
306 | m68*-apple-aux*) | |
307 | COREFILE=trad-core.lo | |
308 | TRAD_HEADER='"hosts/m68kaux.h"' | |
309 | ;; | |
310 | m88*-*-sysv4*) ;; | |
311 | m88*-motorola-sysv*) COREFILE=ptrace-core.lo ;; | |
312 | m88*-*-mach3*) | |
313 | COREFILE=trad-core.lo | |
314 | TRAD_HEADER='"hosts/m88kmach3.h"' | |
315 | ;; | |
316 | ns32k-pc532-mach) | |
317 | COREFILE=trad-core.lo | |
318 | TRAD_HEADER='"hosts/pc532mach.h"' | |
319 | ;; | |
320 | ns32k-*-netbsd* | ns32k-*-openbsd*) | |
321 | COREFILE=netbsd-core.lo | |
322 | ;; | |
323 | rs6000-*-lynx*) COREFILE=lynx-core.lo ;; | |
653f71ca KB |
324 | changequote(,)dnl |
325 | rs6000-*-aix4.[3-9]* | powerpc-*-aix4.[3-9]*) | |
326 | changequote([,])dnl | |
327 | COREFILE=rs6000-core.lo | |
328 | COREFLAG="$COREFLAG -DAIX_CORE_DUMPX_CORE" | |
329 | ;; | |
252b5132 RH |
330 | rs6000-*-aix4*) COREFILE=rs6000-core.lo ;; |
331 | rs6000-*-*) COREFILE=rs6000-core.lo ;; | |
252b5132 RH |
332 | powerpc-*-aix4*) COREFILE=rs6000-core.lo ;; |
333 | powerpc-*-aix*) COREFILE=rs6000-core.lo ;; | |
334 | powerpc-*-beos*) ;; | |
d4af9775 | 335 | powerpc-*-freebsd*) COREFILE='' ;; |
252b5132 | 336 | powerpc-*-netbsd*) COREFILE=netbsd-core.lo ;; |
d4af9775 | 337 | powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;; |
dc810e39 | 338 | s390*-*-*) COREFILE=trad-core.lo ;; |
252b5132 RH |
339 | sparc-*-netbsd* | sparc-*-openbsd*) |
340 | COREFILE=netbsd-core.lo | |
341 | ;; | |
342 | tahoe-*-*) | |
343 | COREFILE=trad-core.lo | |
344 | TRAD_HEADER='"hosts/tahoe.h"' | |
345 | ;; | |
346 | vax-*-ultrix2*) | |
347 | COREFILE=trad-core.lo | |
348 | TRAD_HEADER='"hosts/vaxult2.h"' | |
349 | ;; | |
350 | vax-*-ultrix*) | |
351 | COREFILE=trad-core.lo | |
352 | TRAD_HEADER='"hosts/vaxult2.h"' | |
353 | ;; | |
354 | vax-*-*) | |
355 | COREFILE=trad-core.lo | |
356 | TRAD_HEADER='"hosts/vaxbsd.h"' | |
357 | ;; | |
358 | esac | |
359 | ||
360 | case "$COREFILE" in | |
361 | aix386-core.lo) COREFLAG=-DAIX386_CORE ;; | |
362 | hppabsd-core.lo) COREFLAG=-DHPPABSD_CORE ;; | |
363 | hpux-core.lo) COREFLAG=-DHPUX_CORE ;; | |
364 | irix-core.lo) COREFLAG=-DIRIX_CORE ;; | |
365 | lynx-core.lo) COREFLAG=-DLYNX_CORE ;; | |
366 | netbsd-core.lo) COREFLAG=-DNETBSD_CORE ;; | |
367 | osf-core.lo) COREFLAG=-DOSF_CORE ;; | |
368 | ptrace-core.lo) COREFLAG=-DPTRACE_CORE ;; | |
369 | rs6000-core.lo) COREFLAG="$COREFLAG -DAIX_CORE" ;; | |
370 | sco5-core.lo) COREFLAG="$COREFLAG -DSCO5_CORE" ;; | |
371 | trad-core.lo) COREFLAG="$COREFLAG -DTRAD_CORE" ;; | |
372 | esac | |
373 | ||
374 | # ELF corefile support has several flavors, but all of | |
375 | # them use something called <sys/procfs.h> | |
376 | AC_CHECK_HEADERS(sys/procfs.h) | |
377 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
378 | BFD_HAVE_SYS_PROCFS_TYPE(prstatus_t) | |
7ee38065 | 379 | BFD_HAVE_SYS_PROCFS_TYPE(prstatus32_t) |
252b5132 | 380 | BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prstatus_t, pr_who) |
7ee38065 | 381 | BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prstatus32_t, pr_who) |
252b5132 | 382 | BFD_HAVE_SYS_PROCFS_TYPE(pstatus_t) |
f572a39d | 383 | BFD_HAVE_SYS_PROCFS_TYPE(pxstatus_t) |
7ee38065 | 384 | BFD_HAVE_SYS_PROCFS_TYPE(pstatus32_t) |
252b5132 | 385 | BFD_HAVE_SYS_PROCFS_TYPE(prpsinfo_t) |
7ee38065 | 386 | BFD_HAVE_SYS_PROCFS_TYPE(prpsinfo32_t) |
252b5132 | 387 | BFD_HAVE_SYS_PROCFS_TYPE(psinfo_t) |
7ee38065 | 388 | BFD_HAVE_SYS_PROCFS_TYPE(psinfo32_t) |
252b5132 | 389 | BFD_HAVE_SYS_PROCFS_TYPE(lwpstatus_t) |
f572a39d | 390 | BFD_HAVE_SYS_PROCFS_TYPE(lwpxstatus_t) |
252b5132 RH |
391 | BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_context) |
392 | BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_reg) | |
16e9c715 | 393 | BFD_HAVE_SYS_PROCFS_TYPE(win32_pstatus_t) |
252b5132 RH |
394 | fi |
395 | fi | |
396 | AC_SUBST(COREFILE) | |
397 | AC_SUBST(COREFLAG) | |
3f9b03b5 AM |
398 | if test -n "$TRAD_HEADER"; then |
399 | AC_DEFINE_UNQUOTED(TRAD_HEADER, $TRAD_HEADER, | |
400 | [Name of host specific header file to include in trad-core.c.]) | |
401 | fi | |
252b5132 RH |
402 | |
403 | # Horrible hacks to build DLLs on Windows. | |
404 | WIN32LDFLAGS= | |
405 | WIN32LIBADD= | |
406 | case "${host}" in | |
407 | *-*-cygwin*) | |
408 | if test "$enable_shared" = "yes"; then | |
409 | WIN32LDFLAGS="-no-undefined" | |
410 | WIN32LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32" | |
411 | fi | |
412 | ;; | |
78be1d6e | 413 | *-*-linux*) |
39691762 L |
414 | # We borrow WIN32LIBADD so that the shared libbfd won't depend on |
415 | # libiberty.a. | |
ca51bfff L |
416 | case "${host}" in |
417 | mips*-*-linux*) | |
418 | # Linux/MIPS uses PIC by default. | |
419 | if test "$enable_shared" = "yes"; then | |
420 | WIN32LIBADD="-L../libiberty -liberty" | |
421 | fi | |
422 | ;; | |
423 | *) | |
424 | PICFLAG= | |
425 | changequote(,)dnl | |
426 | eval `grep "^[ ]*PICFLAG[ ]*=" ../libiberty/Makefile | sed -e "s/[ ]*//g"` | |
427 | changequote([,])dnl | |
428 | if test -n "$PICFLAG"; then | |
429 | WIN32LIBADD="-L../libiberty/pic -liberty" | |
430 | fi | |
431 | ;; | |
432 | esac | |
39691762 | 433 | ;; |
252b5132 RH |
434 | esac |
435 | AC_SUBST(WIN32LDFLAGS) | |
436 | AC_SUBST(WIN32LIBADD) | |
437 | ||
438 | # target stuff: | |
439 | ||
440 | # Canonicalize the secondary target names. | |
441 | if test -n "$enable_targets" ; then | |
442 | for targ in `echo $enable_targets | sed 's/,/ /g'` | |
443 | do | |
6d83c84b | 444 | result=`$ac_config_sub $targ 2>/dev/null` |
252b5132 RH |
445 | if test -n "$result" ; then |
446 | canon_targets="$canon_targets $result" | |
447 | else | |
448 | # Allow targets that config.sub doesn't recognize, like "all". | |
449 | canon_targets="$canon_targets $targ" | |
450 | fi | |
451 | done | |
452 | fi | |
453 | ||
454 | all_targets=false | |
455 | defvec= | |
456 | selvecs= | |
457 | selarchs= | |
458 | TDEFINES= | |
459 | for targ in $target $canon_targets | |
460 | do | |
461 | if test "x$targ" = "xall"; then | |
462 | all_targets=true | |
463 | else | |
464 | . $srcdir/config.bfd | |
465 | if test "x$targ" = "x$target"; then | |
466 | defvec=$targ_defvec | |
467 | fi | |
468 | selvecs="$selvecs $targ_defvec $targ_selvecs" | |
469 | selarchs="$selarchs $targ_archs" | |
470 | TDEFINES="$TDEFINES $targ_cflags" | |
471 | fi | |
472 | done | |
473 | AC_SUBST(TDEFINES) | |
474 | ||
475 | # This processing still needs to be done if we're to decide properly whether | |
476 | # 64-bit support needs to be compiled in. Currently, it will be included if | |
477 | # the default or any other explicitly requested target requires it; it | |
478 | # will not be included on a 32-bit host if no 64-bit target is requested, and | |
9eb7245e | 479 | # no "--with-64-bit-bfd" option is given, even if "--enable-targets=all" is |
252b5132 RH |
480 | # used. |
481 | ||
482 | # uniq the default and selected vectors in all the configured targets. | |
483 | f="" | |
484 | for i in $selvecs ; do | |
485 | case " $f " in | |
486 | *" $i "*) ;; | |
487 | *) f="$f $i" ;; | |
488 | esac | |
489 | done | |
490 | selvecs="$f" | |
491 | ||
492 | ||
493 | # uniq the architectures in all the configured targets. | |
494 | f="" | |
495 | for i in $selarchs ; do | |
496 | case " $f " in | |
497 | *" $i "*) ;; | |
498 | *) f="$f $i" ;; | |
499 | esac | |
500 | done | |
501 | selarchs="$f" | |
502 | ||
503 | # Target backend .o files. | |
504 | tb= | |
505 | ||
51db3708 | 506 | elf="elf.lo elflink.lo dwarf1.lo" |
252b5132 RH |
507 | |
508 | for vec in $selvecs | |
509 | do | |
69263e90 | 510 | target_size=32 |
252b5132 RH |
511 | case "$vec" in |
512 | # This list is alphabetized to make it easy to compare | |
dc810e39 AM |
513 | # with the two vector lists in targets.c. For the same reason, |
514 | # use one entry per line, even though this leads to long lines. | |
252b5132 RH |
515 | a29kcoff_big_vec) tb="$tb coff-a29k.lo cofflink.lo" ;; |
516 | a_out_adobe_vec) tb="$tb aout-adobe.lo aout32.lo" ;; | |
252b5132 RH |
517 | aout0_big_vec) tb="$tb aout0.lo aout32.lo" ;; |
518 | aout_arm_big_vec) tb="$tb aout-arm.lo aout32.lo" ;; | |
519 | aout_arm_little_vec) tb="$tb aout-arm.lo aout32.lo" ;; | |
520 | aout_mips_big_vec) tb="$tb mipsbsd.lo aout32.lo" ;; | |
521 | aout_mips_little_vec) tb="$tb mipsbsd.lo aout32.lo" ;; | |
522 | apollocoff_vec) tb="$tb coff-apollo.lo" ;; | |
dc810e39 AM |
523 | arm_epoc_pe_big_vec) tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;; |
524 | arm_epoc_pe_little_vec) tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;; | |
525 | arm_epoc_pei_big_vec) tb="$tb epoc-pei-arm.lo peigen.lo cofflink.lo " ;; | |
526 | arm_epoc_pei_little_vec) tb="$tb epoc-pei-arm.lo peigen.lo cofflink.lo " ;; | |
527 | armcoff_big_vec) tb="$tb coff-arm.lo cofflink.lo " ;; | |
528 | armcoff_little_vec) tb="$tb coff-arm.lo cofflink.lo " ;; | |
529 | armnetbsd_vec) tb="$tb armnetbsd.lo aout32.lo" ;; | |
530 | armpe_big_vec) tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;; | |
531 | armpe_little_vec) tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;; | |
532 | armpei_big_vec) tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;; | |
533 | armpei_little_vec) tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;; | |
252b5132 RH |
534 | b_out_vec_big_host) tb="$tb bout.lo aout32.lo" ;; |
535 | b_out_vec_little_host) tb="$tb bout.lo aout32.lo" ;; | |
fac41780 | 536 | bfd_efi_app_ia32_vec) tb="$tb efi-app-ia32.lo peigen.lo cofflink.lo" ;; |
dc810e39 | 537 | bfd_efi_app_ia64_vec) tb="$tb efi-app-ia64.lo pepigen.lo cofflink.lo"; target_size=64 ;; |
adde6300 | 538 | bfd_elf32_avr_vec) tb="$tb elf32-avr.lo elf32.lo $elf" ;; |
dc810e39 | 539 | bfd_elf32_big_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;; |
252b5132 | 540 | bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;; |
252b5132 | 541 | bfd_elf32_bigarm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;; |
dc810e39 | 542 | bfd_elf32_bigarm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;; |
252b5132 | 543 | bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;; |
06c15ad7 | 544 | bfd_elf32_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;; |
252b5132 RH |
545 | bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;; |
546 | bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;; | |
547 | bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;; | |
e01b0e69 | 548 | bfd_elf32_h8300_vec) tb="$tb elf32-h8300.lo elf32.lo $elf" ;; |
dc810e39 AM |
549 | bfd_elf32_hppa_linux_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; |
550 | bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; | |
5b93d8bb | 551 | bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;; |
252b5132 | 552 | bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;; |
9d751335 | 553 | bfd_elf32_i860_little_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;; |
dc810e39 | 554 | bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;; |
b2ef150d | 555 | bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;; |
dc810e39 | 556 | bfd_elf32_ia64_big_vec) tb="$tb elf32-ia64.lo elf32.lo $elf" ;; |
252b5132 | 557 | bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;; |
dc810e39 AM |
558 | bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;; |
559 | bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;; | |
560 | bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;; | |
252b5132 | 561 | bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;; |
252b5132 | 562 | bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;; |
60bcf0fa NC |
563 | bfd_elf32_m68hc11_vec) tb="$tb elf32-m68hc11.lo elf32.lo $elf" ;; |
564 | bfd_elf32_m68hc12_vec) tb="$tb elf32-m68hc12.lo elf32.lo $elf" ;; | |
252b5132 RH |
565 | bfd_elf32_m68k_vec) tb="$tb elf32-m68k.lo elf32.lo $elf" ;; |
566 | bfd_elf32_m88k_vec) tb="$tb elf32-m88k.lo elf32.lo $elf" ;; | |
567 | bfd_elf32_mcore_big_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;; | |
568 | bfd_elf32_mcore_little_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;; | |
569 | bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;; | |
570 | bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;; | |
b3baf5d0 | 571 | bfd_elf32_openrisc_vec) tb="$tb elf32-openrisc.lo elf32.lo $elf" ;; |
0bcb993b ILT |
572 | bfd_elf32_pj_vec) tb="$tb elf32-pj.lo elf32.lo $elf";; |
573 | bfd_elf32_pjl_vec) tb="$tb elf32-pj.lo elf32.lo $elf";; | |
252b5132 RH |
574 | bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;; |
575 | bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;; | |
a85d7ed0 | 576 | bfd_elf32_s390_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;; |
252b5132 | 577 | bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;; |
dc810e39 | 578 | bfd_elf32_shblin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; |
252b5132 | 579 | bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;; |
b129bfef | 580 | bfd_elf32_shlin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; |
252b5132 | 581 | bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;; |
dd745cfa UC |
582 | bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;; |
583 | bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;; | |
dc810e39 | 584 | bfd_elf32_us_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;; |
252b5132 | 585 | bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;; |
dc810e39 AM |
586 | bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;; |
587 | bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;; | |
588 | bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; | |
589 | bfd_elf64_hppa_linux_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;; | |
590 | bfd_elf64_hppa_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;; | |
591 | bfd_elf64_ia64_aix_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;; | |
592 | bfd_elf64_ia64_aix_little_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;; | |
593 | bfd_elf64_ia64_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;; | |
594 | bfd_elf64_ia64_little_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;; | |
595 | bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;; | |
596 | bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; | |
3c3bdf30 | 597 | bfd_elf64_mmix_vec) tb="$tb elf64-mmix.lo elf64.lo $elf" target_size=64 ;; |
dc810e39 AM |
598 | bfd_elf64_powerpc_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;; |
599 | bfd_elf64_powerpcle_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;; | |
600 | bfd_elf64_s390_vec) tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;; | |
601 | bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf"; target_size=64 ;; | |
602 | bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo"; target_size=64 ;; | |
603 | bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo"; target_size=64 ;; | |
604 | bfd_elf64_x86_64_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;; | |
3c3bdf30 | 605 | bfd_mmo_vec) tb="$tb mmo.lo" target_size=64 ;; |
dc810e39 AM |
606 | bfd_powerpc_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;; |
607 | bfd_powerpc_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;; | |
608 | bfd_powerpcle_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;; | |
609 | bfd_powerpcle_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;; | |
f4bda984 RH |
610 | cisco_core_big_vec) tb="$tb cisco-core.lo" ;; |
611 | cisco_core_little_vec) tb="$tb cisco-core.lo" ;; | |
06c15ad7 | 612 | cris_aout_vec) tb="$tb aout-cris.lo" ;; |
dc810e39 | 613 | demo_64_vec) tb="$tb demo64.lo aout64.lo"; target_size=64 ;; |
252b5132 | 614 | ecoff_big_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;; |
252b5132 | 615 | ecoff_biglittle_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;; |
dc810e39 AM |
616 | ecoff_little_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;; |
617 | ecoffalpha_little_vec) tb="$tb coff-alpha.lo ecoff.lo ecofflink.lo"; target_size=64 ;; | |
252b5132 RH |
618 | go32coff_vec) tb="$tb coff-go32.lo cofflink.lo" ;; |
619 | go32stubbedcoff_vec) tb="$tb coff-stgo32.lo cofflink.lo" ;; | |
620 | h8300coff_vec) tb="$tb coff-h8300.lo reloc16.lo" ;; | |
621 | h8500coff_vec) tb="$tb coff-h8500.lo reloc16.lo" ;; | |
622 | host_aout_vec) tb="$tb host-aout.lo aout32.lo" ;; | |
623 | hp300bsd_vec) tb="$tb hp300bsd.lo aout32.lo" ;; | |
624 | hp300hpux_vec) tb="$tb hp300hpux.lo aout32.lo" ;; | |
625 | i386aout_vec) tb="$tb i386aout.lo aout32.lo" ;; | |
626 | i386bsd_vec) tb="$tb i386bsd.lo aout32.lo" ;; | |
627 | i386coff_vec) tb="$tb coff-i386.lo cofflink.lo" ;; | |
628 | i386dynix_vec) tb="$tb i386dynix.lo aout32.lo" ;; | |
629 | i386freebsd_vec) tb="$tb i386freebsd.lo aout32.lo" ;; | |
252b5132 RH |
630 | i386linux_vec) tb="$tb i386linux.lo aout32.lo" ;; |
631 | i386lynx_aout_vec) tb="$tb i386lynx.lo lynx-core.lo aout32.lo" ;; | |
632 | i386lynx_coff_vec) tb="$tb cf-i386lynx.lo cofflink.lo lynx-core.lo" ;; | |
633 | i386mach3_vec) tb="$tb i386mach3.lo aout32.lo" ;; | |
dc810e39 | 634 | i386msdos_vec) tb="$tb i386msdos.lo" ;; |
252b5132 RH |
635 | i386netbsd_vec) tb="$tb i386netbsd.lo aout32.lo" ;; |
636 | i386os9k_vec) tb="$tb i386os9k.lo aout32.lo" ;; | |
dc810e39 AM |
637 | i386pe_vec) tb="$tb pe-i386.lo peigen.lo cofflink.lo" ;; |
638 | i386pei_vec) tb="$tb pei-i386.lo peigen.lo cofflink.lo" ;; | |
252b5132 RH |
639 | i860coff_vec) tb="$tb coff-i860.lo cofflink.lo" ;; |
640 | icoff_big_vec) tb="$tb coff-i960.lo cofflink.lo" ;; | |
641 | icoff_little_vec) tb="$tb coff-i960.lo cofflink.lo" ;; | |
642 | ieee_vec) tb="$tb ieee.lo" ;; | |
dc810e39 AM |
643 | m68k4knetbsd_vec) tb="$tb m68k4knetbsd.lo aout32.lo" ;; |
644 | m68kaux_coff_vec) tb="$tb coff-aux.lo coff-m68k.lo cofflink.lo" ;; | |
252b5132 RH |
645 | m68kcoff_vec) tb="$tb coff-m68k.lo cofflink.lo" ;; |
646 | m68kcoffun_vec) tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;; | |
647 | m68klinux_vec) tb="$tb m68klinux.lo aout32.lo" ;; | |
648 | m68klynx_aout_vec) tb="$tb m68klynx.lo lynx-core.lo aout32.lo" ;; | |
649 | m68klynx_coff_vec) tb="$tb cf-m68klynx.lo coff-m68k.lo cofflink.lo lynx-core.lo" ;; | |
650 | m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;; | |
252b5132 RH |
651 | m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;; |
652 | m88kbcs_vec) tb="$tb coff-m88k.lo" ;; | |
277d1b5e ILT |
653 | mcore_pe_big_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;; |
654 | mcore_pe_little_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;; | |
655 | mcore_pei_big_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;; | |
656 | mcore_pei_little_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;; | |
dc810e39 AM |
657 | mipslpe_vec) tb="$tb pe-mips.lo peigen.lo cofflink.lo" ;; |
658 | mipslpei_vec) tb="$tb pei-mips.lo peigen.lo cofflink.lo" ;; | |
252b5132 | 659 | newsos3_vec) tb="$tb newsos3.lo aout32.lo" ;; |
dc810e39 | 660 | nlm32_alpha_vec) tb="$tb nlm32-alpha.lo nlm32.lo nlm.lo"; target_size=64 ;; |
252b5132 | 661 | nlm32_i386_vec) tb="$tb nlm32-i386.lo nlm32.lo nlm.lo" ;; |
252b5132 | 662 | nlm32_powerpc_vec) tb="$tb nlm32-ppc.lo nlm32.lo nlm.lo" ;; |
dc810e39 | 663 | nlm32_sparc_vec) tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;; |
252b5132 | 664 | pc532machaout_vec) tb="$tb pc532-mach.lo aout-ns32k.lo" ;; |
dc810e39 | 665 | pc532netbsd_vec) tb="$tb ns32knetbsd.lo aout-ns32k.lo" ;; |
e135f41b | 666 | pdp11_aout_vec) tb="$tb pdp11.lo" ;; |
6768c14a | 667 | pmac_xcoff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;; |
252b5132 | 668 | ppcboot_vec) tb="$tb ppcboot.lo" ;; |
dc810e39 AM |
669 | riscix_vec) tb="$tb aout32.lo riscix.lo" ;; |
670 | rs6000coff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo"; target_size=64 ;; | |
671 | rs6000coff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;; | |
252b5132 | 672 | shcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;; |
dc810e39 | 673 | shcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;; |
252b5132 | 674 | shlcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;; |
dc810e39 | 675 | shlcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;; |
60bcf0fa NC |
676 | shlpe_vec) tb="$tb pe-sh.lo coff-sh.lo peigen.lo cofflink.lo" ;; |
677 | shlpei_vec) tb="$tb pei-sh.lo coff-sh.lo peigen.lo cofflink.lo" ;; | |
252b5132 | 678 | som_vec) tb="$tb som.lo" ;; |
dc810e39 | 679 | sparccoff_vec) tb="$tb coff-sparc.lo" ;; |
252b5132 RH |
680 | sparcle_aout_vec) tb="$tb aout-sparcle.lo aout32.lo" ;; |
681 | sparclinux_vec) tb="$tb sparclinux.lo aout32.lo" ;; | |
682 | sparclynx_aout_vec) tb="$tb sparclynx.lo lynx-core.lo aout32.lo" ;; | |
683 | sparclynx_coff_vec) tb="$tb cf-sparclynx.lo lynx-core.lo" ;; | |
684 | sparcnetbsd_vec) tb="$tb sparcnetbsd.lo aout32.lo" ;; | |
252b5132 RH |
685 | srec_vec) tb="$tb srec.lo" ;; |
686 | sunos_big_vec) tb="$tb sunos.lo aout32.lo" ;; | |
687 | symbolsrec_vec) tb="$tb srec.lo" ;; | |
688 | tekhex_vec) tb="$tb tekhex.lo" ;; | |
689 | tic30_aout_vec) tb="$tb aout-tic30.lo" ;; | |
690 | tic30_coff_vec) tb="$tb coff-tic30.lo" ;; | |
81635ce4 | 691 | tic54x_coff0_beh_vec) tb="$tb coff-tic54x.lo" ;; |
dc810e39 | 692 | tic54x_coff0_vec) tb="$tb coff-tic54x.lo" ;; |
81635ce4 | 693 | tic54x_coff1_beh_vec) tb="$tb coff-tic54x.lo" ;; |
dc810e39 | 694 | tic54x_coff1_vec) tb="$tb coff-tic54x.lo" ;; |
81635ce4 | 695 | tic54x_coff2_beh_vec) tb="$tb coff-tic54x.lo" ;; |
dc810e39 | 696 | tic54x_coff2_vec) tb="$tb coff-tic54x.lo" ;; |
252b5132 RH |
697 | tic80coff_vec) tb="$tb coff-tic80.lo cofflink.lo" ;; |
698 | versados_vec) tb="$tb versados.lo" ;; | |
dc810e39 | 699 | vms_alpha_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo"; target_size=64 ;; |
252b5132 RH |
700 | vms_vax_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo" ;; |
701 | w65_vec) tb="$tb coff-w65.lo reloc16.lo" ;; | |
702 | we32kcoff_vec) tb="$tb coff-we32k.lo" ;; | |
703 | z8kcoff_vec) tb="$tb coff-z8k.lo reloc16.lo" ;; | |
704 | ||
705 | "") ;; | |
706 | *) AC_MSG_ERROR(*** unknown target vector $vec) ;; | |
707 | esac | |
69263e90 AM |
708 | |
709 | if test ${target_size} = 64; then | |
710 | target64=true | |
711 | fi | |
712 | if test x"${vec}" = x"${defvec}"; then | |
713 | bfd_default_target_size=${target_size} | |
714 | fi | |
252b5132 RH |
715 | done |
716 | ||
717 | # Target architecture .o files. | |
718 | # A couple of CPUs use shorter file names to avoid problems on DOS | |
719 | # filesystems. | |
720 | ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.lo/g -e s/mn10200/m10200/ -e s/mn10300/m10300/` | |
721 | ||
722 | # Weed out duplicate .o files. | |
723 | f="" | |
724 | for i in $tb ; do | |
725 | case " $f " in | |
726 | *" $i "*) ;; | |
727 | *) f="$f $i" ;; | |
728 | esac | |
729 | done | |
730 | tb="$f" | |
731 | ||
732 | f="" | |
733 | for i in $ta ; do | |
734 | case " $f " in | |
735 | *" $i "*) ;; | |
736 | *) f="$f $i" ;; | |
737 | esac | |
738 | done | |
739 | ta="$f" | |
740 | ||
741 | bfd_backends="$tb" | |
742 | bfd_machines="$ta" | |
743 | ||
744 | if test x${all_targets} = xtrue ; then | |
745 | bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)' | |
746 | bfd_machines="${bfd_machines}"' $(ALL_MACHINES)' | |
747 | selvecs= | |
748 | havevecs= | |
749 | selarchs= | |
750 | else # all_targets is true | |
751 | # Only set these if they will be nonempty, for the clever echo. | |
752 | havevecs= | |
753 | test -n "$selvecs" && | |
754 | havevecs=`echo $selvecs | sed -e 's/^/-DHAVE_/' -e 's/ \(.\)/ -DHAVE_\1/g'` | |
755 | test -n "$selvecs" && | |
756 | selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'` | |
757 | test -n "$selarchs" && | |
758 | selarchs=`echo $selarchs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'` | |
759 | fi # all_targets is true | |
760 | ||
761 | case ${host64}-${target64}-${want64} in | |
762 | *true*) | |
763 | wordsize=64 | |
764 | all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)' | |
765 | if test -z "$GCC" && test "$BFD_HOST_64BIT_LONG" = "0" && test "$BFD_HOST_64_BIT_DEFINED" = "0"; then | |
766 | AC_MSG_WARN([You have requested a 64 bit BFD configuration, but]) | |
767 | AC_MSG_WARN([your compiler may not have a 64 bit integral type]) | |
768 | fi | |
769 | ;; | |
770 | false-false-false) | |
771 | wordsize=32 | |
772 | all_backends='$(BFD32_BACKENDS)' | |
773 | ;; | |
774 | esac | |
775 | ||
776 | AC_SUBST(wordsize) | |
777 | AC_SUBST(all_backends) | |
778 | AC_SUBST(bfd_backends) | |
779 | AC_SUBST(bfd_machines) | |
69263e90 | 780 | AC_SUBST(bfd_default_target_size) |
252b5132 RH |
781 | |
782 | tdefaults="" | |
783 | test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}" | |
784 | test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'" | |
785 | test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'" | |
786 | test -n "${havevecs}" && tdefaults="${tdefaults} ${havevecs}" | |
787 | AC_SUBST(tdefaults) | |
788 | ||
789 | dnl AC_CHECK_HEADERS(sys/mman.h) | |
790 | AC_FUNC_MMAP | |
791 | AC_CHECK_FUNCS(madvise mprotect) | |
792 | case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in | |
793 | true+yes ) AC_DEFINE(USE_MMAP, 1, [Use mmap if it's available?]) ;; | |
794 | esac | |
795 | ||
796 | rm -f doc/config.status | |
87b632fc | 797 | AC_OUTPUT(Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in, |
55c80943 NC |
798 | [sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' -e '/BLD-POTFILES =/r po/BLD-POTFILES' po/Makefile.in > po/Makefile]) |
799 |