1 dnl Process this file with autoconf to produce a configure script.
3 dnl Copyright (C) 2012-2018 Free Software Foundation, Inc.
5 dnl This file is free software; you can redistribute it and/or modify
6 dnl it under the terms of the GNU General Public License as published by
7 dnl the Free Software Foundation; either version 3 of the License, or
8 dnl (at your option) any later version.
10 dnl This program is distributed in the hope that it will be useful,
11 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
12 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 dnl GNU General Public License for more details.
15 dnl You should have received a copy of the GNU General Public License
16 dnl along with this program; see the file COPYING3. If not see
17 dnl <http://www.gnu.org/licenses/>.
21 m4_include([version.m4])
22 AC_INIT([bfd], BFD_VERSION)
23 AC_CONFIG_SRCDIR([libbfd.c])
30 dnl These must be called before LT_INIT, because it may want
31 dnl to call AC_CHECK_PROG.
33 AC_CHECK_TOOL(RANLIB, ranlib, :)
35 dnl Default to a non shared library. This may be overridden by the
36 dnl configure option --enable-shared.
41 AC_USE_SYSTEM_EXTENSIONS
45 # AC_PLUGINS setting $plugins is called by ACX_LARGEFILE.
48 AM_CONDITIONAL(PLUGINS, test "$plugins" = "yes")
50 if test "$plugins" = "yes"; then
51 enable_targets="$enable_targets plugin"
54 AC_ARG_ENABLE(64-bit-bfd,
55 [ --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)],
56 [case "${enableval}" in
59 *) AC_MSG_ERROR(bad value ${enableval} for 64-bit-bfd option) ;;
60 esac],[want64=false])dnl
62 AC_ARG_ENABLE(targets,
63 [ --enable-targets alternative target configurations],
64 [case "${enableval}" in
65 yes | "") AC_MSG_ERROR([enable-targets option must specify target names or 'all'])
67 no) enable_targets= ;;
68 *) enable_targets=$enableval ;;
71 AC_ARG_ENABLE(64_bit_archive,
72 AS_HELP_STRING([--enable-64-bit-archive],
73 [force 64-bit archives]),
74 [case "${enableval}" in
75 yes) want_64_bit_archive=true ;;
76 no) want_64_bit_archive=false ;;
77 *) AC_MSG_ERROR(bad value ${enableval} for 64-bit-archive option) ;;
78 esac],[want_64_bit_archive=unset])dnl
81 [ --with-mmap try using mmap for BFD input files if available],
83 yes) want_mmap=true ;;
84 no) want_mmap=false ;;
85 *) AC_MSG_ERROR(bad value ${withval} for BFD with-mmap option) ;;
86 esac],[want_mmap=false])dnl
88 AC_ARG_ENABLE(secureplt,
89 [ --enable-secureplt Default to creating read-only plt entries],
90 [case "${enableval}" in
91 yes) use_secureplt=true ;;
92 no) use_secureplt=false ;;
93 *) AC_MSG_ERROR(bad value ${enableval} for secureplt option) ;;
94 esac],[use_secureplt=true])dnl
95 if test $use_secureplt = true; then
96 AC_DEFINE(USE_SECUREPLT, 1,
97 [Define if we should default to creating read-only plt entries])
100 # Decide if -z separate-code should be enabled in ELF linker by default.
101 ac_default_ld_z_separate_code=unset
102 AC_ARG_ENABLE(separate-code,
103 AS_HELP_STRING([--enable-separate-code],
104 [enable -z separate-code in ELF linker by default]),
105 [case "${enableval}" in
106 yes) ac_default_ld_z_separate_code=1 ;;
107 no) ac_default_ld_z_separate_code=0 ;;
109 # Enable -z separate-code by default for Linux/x86.
111 i[3-7]86-*-linux-* | x86_64-*-linux-*)
112 if test ${ac_default_ld_z_separate_code} = unset; then
113 ac_default_ld_z_separate_code=1
117 if test "${ac_default_ld_z_separate_code}" = unset; then
118 ac_default_ld_z_separate_code=0
120 AC_DEFINE_UNQUOTED(DEFAULT_LD_Z_SEPARATE_CODE,
121 $ac_default_ld_z_separate_code,
122 [Define to 1 if you want to enable -z separate-code in ELF linker by default.])
124 AC_ARG_ENABLE(leading-mingw64-underscores,
125 AS_HELP_STRING([--enable-leading-mingw64-underscores],
126 [Enable leading underscores on 64 bit mingw targets]),
128 AS_IF([ test x"$enable_leading_mingw64_underscores" = xyes ],
129 [AC_DEFINE(USE_MINGW64_LEADING_UNDERSCORES, 1,
130 [Define if we should use leading underscore on 64 bit mingw targets])])
132 DEBUGDIR=${libdir}/debug
133 AC_ARG_WITH(separate-debug-dir,
134 AS_HELP_STRING([--with-separate-debug-dir=DIR],
135 [Look for global separate debug info in DIR [[default=LIBDIR/debug]]]),
136 [DEBUGDIR="${withval}"])
139 ACX_PKGVERSION([GNU Binutils])
140 ACX_BUGURL([http://www.sourceware.org/bugzilla/])
144 AC_CONFIG_HEADERS(config.h:config.in)
147 AH_VERBATIM([00_CONFIG_H_CHECK],
148 [/* Check that config.h is #included before system headers
149 (this works only for glibc, but that should be enough). */
150 #if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__)
151 # error config.h must be #included before system headers
153 #define __CONFIG_H__ 1])
155 if test -z "$target" ; then
156 AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
160 AM_CONDITIONAL(GENINSRC_NEVER, false)
166 bfd_default_target_size=32
170 ALL_LINGUAS="da es fi fr hr id ja ro ru rw sr sv tr uk vi zh_CN"
171 ZW_GNU_GETTEXT_SISTER_DIR
174 # Permit host specific settings.
175 . ${srcdir}/configure.host
180 BFD_HOST_64BIT_LONG=0
181 BFD_HOST_64BIT_LONG_LONG=0
182 BFD_HOST_64_BIT_DEFINED=0
185 BFD_HOSTPTR_T="unsigned long"
188 AC_CHECK_TYPES([long long], [AC_CHECK_SIZEOF(long long)])
189 AC_CHECK_SIZEOF(void *)
190 AC_CHECK_SIZEOF(long)
192 if test "x${ac_cv_sizeof_void_p}" = "x8"; then
196 if test "x${ac_cv_sizeof_long}" = "x8"; then
197 BFD_HOST_64BIT_LONG=1
198 test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long"
199 test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long"
200 elif test "x${ac_cv_sizeof_long_long}" = "x8"; then
201 BFD_HOST_64BIT_LONG_LONG=1
202 test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long"
203 test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long"
204 if test "x${ac_cv_sizeof_void_p}" = "x8"; then
205 BFD_HOSTPTR_T="unsigned long long"
209 if test -n "${HOST_64BIT_TYPE}" -a -n "${HOST_U_64BIT_TYPE}"; then
210 BFD_HOST_64_BIT_DEFINED=1
211 BFD_HOST_64_BIT="${HOST_64BIT_TYPE}"
212 BFD_HOST_U_64_BIT="${HOST_U_64BIT_TYPE}"
215 AC_SUBST(BFD_HOST_64BIT_LONG)
216 AC_SUBST(BFD_HOST_64BIT_LONG_LONG)
217 AC_SUBST(BFD_HOST_64_BIT_DEFINED)
218 AC_SUBST(BFD_HOST_64_BIT)
219 AC_SUBST(BFD_HOST_U_64_BIT)
220 AC_SUBST(BFD_HOSTPTR_T)
224 AC_CHECK_HEADERS(alloca.h stddef.h string.h strings.h stdlib.h time.h unistd.h wchar.h wctype.h)
225 AC_CHECK_HEADERS(fcntl.h sys/file.h sys/time.h sys/stat.h sys/resource.h)
226 GCC_HEADER_STDINT(bfd_stdint.h)
231 AC_CHECK_FUNCS(fcntl getpagesize setitimer sysconf fdopen getuid getgid fileno)
232 AC_CHECK_FUNCS(strtoull getrlimit)
234 AC_CHECK_DECLS(basename)
235 AC_CHECK_DECLS(ftello)
236 AC_CHECK_DECLS(ftello64)
237 AC_CHECK_DECLS(fseeko)
238 AC_CHECK_DECLS(fseeko64)
244 AC_CHECK_DECLS(getenv)
245 AC_CHECK_DECLS(malloc)
246 AC_CHECK_DECLS(realloc)
247 AC_CHECK_DECLS(stpcpy)
248 AC_CHECK_DECLS(strstr)
249 AC_CHECK_DECLS(asprintf)
250 AC_CHECK_DECLS(vasprintf)
251 AC_CHECK_DECLS(snprintf)
252 AC_CHECK_DECLS(vsnprintf)
253 AC_CHECK_DECLS(strnlen)
255 # Link in zlib if we can. This allows us to read compressed debug sections.
256 # This is used only by compress.c.
259 # Check if linker supports --as-needed and --no-as-needed options
260 AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed,
261 [bfd_cv_ld_as_needed=no
262 if $LD --help 2>/dev/null | grep as-needed > /dev/null; then
263 bfd_cv_ld_as_needed=yes
269 # When building a shared libbfd, link against the pic version of libiberty
270 # so that apps that use libbfd won't need libiberty just to satisfy any
272 # We can't do that if a pic libiberty is unavailable since including non-pic
273 # code would insert text relocations into libbfd.
276 if test "$enable_shared" = "yes"; then
278 x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'`
280 if test -n "$x"; then
281 SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty"
284 # More hacks to build DLLs on Windows.
287 SHARED_LDFLAGS="-no-undefined"
288 SHARED_LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32"
291 # Hack to build or1k-src on OSX
293 SHARED_LIBADD="-L`pwd`/../libiberty/pic -L`pwd`/../intl -liberty -lintl"
297 if test -n "$SHARED_LIBADD"; then
298 if test -n "$LIBM"; then
299 if test x"$bfd_cv_ld_as_needed" = xyes; then
300 # Link against libm only when needed. Put -lc, -lm inside -Wl
301 # to stop libtool reordering these options.
302 SHARED_LIBADD="$SHARED_LIBADD -Wl,-lc,--as-needed,`echo $LIBM | sed 's/ /,/g'`,--no-as-needed"
304 SHARED_LIBADD="$SHARED_LIBADD $LIBM"
309 AC_SUBST(SHARED_LDFLAGS)
310 AC_SUBST(SHARED_LIBADD)
314 # Canonicalize the secondary target names.
315 if test -n "$enable_targets" ; then
316 for targ in `echo $enable_targets | sed 's/,/ /g'`
318 result=`$ac_config_sub $targ 2>/dev/null`
319 if test -n "$result" ; then
320 canon_targets="$canon_targets $result"
322 # Allow targets that config.sub doesn't recognize, like "all".
323 canon_targets="$canon_targets $targ"
334 for targ in $target $canon_targets
336 if test "x$targ" = "xall"; then
338 assocvecs="$assocvecs $targ_defvec $targ_selvecs"
341 if test "x$targ" = "x$target"; then
344 selvecs="$selvecs $targ_defvec $targ_selvecs"
345 selarchs="$selarchs $targ_archs"
346 TDEFINES="$TDEFINES $targ_cflags"
351 # This processing still needs to be done if we're to decide properly whether
352 # 64-bit support needs to be compiled in. Currently, it will be included if
353 # the default or any other explicitly requested target requires it; it
354 # will not be included on a 32-bit host if no 64-bit target is requested, and
355 # no "--with-64-bit-bfd" option is given, even if "--enable-targets=all" is
358 # uniq the default and selected vectors in all the configured targets.
360 for i in $selvecs ; do
369 # uniq the associated vectors in all the configured targets.
371 for i in $assocvecs ; do
380 # uniq the architectures in all the configured targets.
382 for i in $selarchs ; do
390 # Target backend .o files.
393 elf="elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-properties.lo
394 elf-eh-frame.lo dwarf1.lo dwarf2.lo"
395 coffgen="coffgen.lo dwarf2.lo"
396 coff="cofflink.lo $coffgen"
397 ecoff="ecofflink.lo $coffgen"
398 xcoff="xcofflink.lo $coffgen"
404 # This list is alphabetized to make it easy to compare
405 # with the two vector lists in targets.c. For the same reason,
406 # use one entry per line, even though this leads to long lines.
407 aarch64_elf32_be_vec) tb="$tb elf32-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf32.lo $elf"; target_size=64 ;;
408 aarch64_elf32_le_vec) tb="$tb elf32-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf32.lo $elf"; target_size=64 ;;
409 aarch64_elf64_be_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
410 aarch64_elf64_be_cloudabi_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
411 aarch64_elf64_le_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
412 aarch64_elf64_le_cloudabi_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
413 aarch64_mach_o_vec) tb="$tb mach-o-aarch64.lo"; target_size=64 ;;
414 alpha_ecoff_le_vec) tb="$tb coff-alpha.lo ecoff.lo $ecoff"; target_size=64 ;;
415 alpha_elf64_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
416 alpha_elf64_fbsd_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
417 alpha_vms_vec) tb="$tb vms-alpha.lo vms-misc.lo vms-lib.lo"; target_size=64 ;;
418 alpha_vms_lib_txt_vec) tb="$tb vms-lib.lo vms-misc.lo" ;;
419 am33_elf32_linux_vec) tb="$tb elf32-am33lin.lo elf32.lo $elf" ;;
420 aout0_be_vec) tb="$tb aout0.lo aout32.lo" ;;
421 aout64_vec) tb="$tb demo64.lo aout64.lo"; target_size=64 ;;
422 aout_vec) tb="$tb host-aout.lo aout32.lo" ;;
423 arc_elf32_be_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
424 arc_elf32_le_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
425 arm_aout_be_vec) tb="$tb aout-arm.lo aout32.lo" ;;
426 arm_aout_le_vec) tb="$tb aout-arm.lo aout32.lo" ;;
427 arm_aout_nbsd_vec) tb="$tb armnetbsd.lo aout32.lo" ;;
428 arm_aout_riscix_vec) tb="$tb aout32.lo riscix.lo" ;;
429 arm_coff_be_vec) tb="$tb coff-arm.lo $coff" ;;
430 arm_coff_le_vec) tb="$tb coff-arm.lo $coff" ;;
431 arm_elf32_be_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
432 arm_elf32_le_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
433 arm_elf32_nacl_be_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
434 arm_elf32_nacl_le_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
435 arm_elf32_symbian_be_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
436 arm_elf32_symbian_le_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
437 arm_elf32_vxworks_be_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
438 arm_elf32_vxworks_le_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
439 arm_pe_be_vec) tb="$tb pe-arm.lo peigen.lo $coff" ;;
440 arm_pe_le_vec) tb="$tb pe-arm.lo peigen.lo $coff" ;;
441 arm_pe_wince_be_vec) tb="$tb pe-arm-wince.lo pe-arm.lo peigen.lo $coff" ;;
442 arm_pe_wince_le_vec) tb="$tb pe-arm-wince.lo pe-arm.lo peigen.lo $coff" ;;
443 arm_pei_be_vec) tb="$tb pei-arm.lo peigen.lo $coff" ;;
444 arm_pei_le_vec) tb="$tb pei-arm.lo peigen.lo $coff" ;;
445 arm_pei_wince_be_vec) tb="$tb pei-arm-wince.lo pei-arm.lo peigen.lo $coff" ;;
446 arm_pei_wince_le_vec) tb="$tb pei-arm-wince.lo pei-arm.lo peigen.lo $coff" ;;
447 arm_mach_o_vec) tb="$tb mach-o-arm.lo" ;;
448 avr_elf32_vec) tb="$tb elf32-avr.lo elf32.lo $elf" ;;
449 bfin_elf32_vec) tb="$tb elf32-bfin.lo elf32.lo $elf" ;;
450 bfin_elf32_fdpic_vec) tb="$tb elf32-bfin.lo elf32.lo $elf" ;;
451 cr16_elf32_vec) tb="$tb elf32-cr16.lo elf32.lo $elf" ;;
452 cr16c_elf32_vec) tb="$tb elf32-cr16c.lo elf32.lo $elf" ;;
453 cris_aout_vec) tb="$tb aout-cris.lo" ;;
454 cris_elf32_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
455 cris_elf32_us_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
456 crx_elf32_vec) tb="$tb elf32-crx.lo elf32.lo $elf" ;;
457 d10v_elf32_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
458 d30v_elf32_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;;
459 dlx_elf32_be_vec) tb="$tb elf32-dlx.lo elf32.lo $elf" ;;
460 elf32_be_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
461 elf32_le_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
462 elf64_be_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
463 elf64_le_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
464 epiphany_elf32_vec) tb="$tb elf32-epiphany.lo elf32.lo $elf" ;;
465 fr30_elf32_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;;
466 frv_elf32_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;;
467 frv_elf32_fdpic_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;;
468 h8300_elf32_vec) tb="$tb elf32-h8300.lo elf32.lo $elf" ;;
469 h8300_elf32_linux_vec) tb="$tb elf32-h8300.lo elf32.lo $elf" ;;
470 hppa_elf32_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
471 hppa_elf32_linux_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
472 hppa_elf32_nbsd_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
473 hppa_elf64_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;;
474 hppa_elf64_linux_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;;
475 hppa_som_vec) tb="$tb som.lo" ;;
476 i386_aout_vec) tb="$tb i386aout.lo aout32.lo" ;;
477 i386_aout_bsd_vec) tb="$tb i386bsd.lo aout32.lo" ;;
478 i386_aout_lynx_vec) tb="$tb i386lynx.lo lynx-core.lo aout32.lo" ;;
479 i386_coff_vec) tb="$tb coff-i386.lo $coff" ;;
480 i386_coff_go32_vec) tb="$tb coff-go32.lo $coff" ;;
481 i386_coff_go32stubbed_vec) tb="$tb coff-stgo32.lo $coff" ;;
482 i386_coff_lynx_vec) tb="$tb cf-i386lynx.lo lynx-core.lo $coff" ;;
483 i386_elf32_vec) tb="$tb elf32-i386.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
484 i386_elf32_fbsd_vec) tb="$tb elf32-i386.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
485 i386_elf32_nacl_vec) tb="$tb elf32-i386.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
486 i386_elf32_sol2_vec) tb="$tb elf32-i386.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
487 i386_elf32_vxworks_vec) tb="$tb elf32-i386.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
488 i386_mach_o_vec) tb="$tb mach-o-i386.lo" ;;
489 i386_msdos_vec) tb="$tb i386msdos.lo" ;;
490 i386_pe_vec) tb="$tb pe-i386.lo peigen.lo $coff" ;;
491 i386_pei_vec) tb="$tb pei-i386.lo peigen.lo $coff" ;;
492 iamcu_elf32_vec) tb="$tb elf32-i386.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
493 ia64_elf32_be_vec) tb="$tb elf32-ia64.lo elfxx-ia64.lo elf32.lo $elf" ;;
494 ia64_elf32_hpux_be_vec) tb="$tb elf32-ia64.lo elfxx-ia64.lo elf32.lo $elf" ;;
495 ia64_elf64_be_vec) tb="$tb elf64-ia64.lo elfxx-ia64.lo elf64.lo $elf"; target_size=64 ;;
496 ia64_elf64_le_vec) tb="$tb elf64-ia64.lo elfxx-ia64.lo elf64.lo $elf"; target_size=64 ;;
497 ia64_elf64_hpux_be_vec) tb="$tb elf64-ia64.lo elfxx-ia64.lo elf64.lo $elf"; target_size=64 ;;
498 ia64_elf64_vms_vec) tb="$tb elf64-ia64-vms.lo elf64-ia64.lo elfxx-ia64.lo elf64.lo vms-lib.lo vms-misc.lo $elf"; target_size=64 ;;
499 ia64_pei_vec) tb="$tb pei-ia64.lo pepigen.lo $coff"; target_size=64 ;;
500 ip2k_elf32_vec) tb="$tb elf32-ip2k.lo elf32.lo $elf" ;;
501 iq2000_elf32_vec) tb="$tb elf32-iq2000.lo elf32.lo $elf" ;;
502 k1om_elf64_vec) tb="$tb elf64-x86-64.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
503 k1om_elf64_fbsd_vec) tb="$tb elf64-x86-64.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
504 l1om_elf64_vec) tb="$tb elf64-x86-64.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
505 l1om_elf64_fbsd_vec) tb="$tb elf64-x86-64.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
506 lm32_elf32_vec) tb="$tb elf32-lm32.lo elf32.lo $elf" ;;
507 lm32_elf32_fdpic_vec) tb="$tb elf32-lm32.lo elf32.lo $elf" ;;
508 m32c_elf32_vec) tb="$tb elf32-m32c.lo elf32.lo $elf" ;;
509 m32r_elf32_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
510 m32r_elf32_le_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
511 m32r_elf32_linux_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
512 m32r_elf32_linux_le_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
513 m68hc11_elf32_vec) tb="$tb elf32-m68hc11.lo elf32-m68hc1x.lo elf32.lo $elf" ;;
514 m68hc12_elf32_vec) tb="$tb elf32-m68hc12.lo elf32-m68hc1x.lo elf32.lo $elf" ;;
515 m68k_elf32_vec) tb="$tb elf32-m68k.lo elf32.lo $elf" ;;
516 mach_o_be_vec) tb="$tb mach-o.lo dwarf2.lo" ;;
517 mach_o_le_vec) tb="$tb mach-o.lo dwarf2.lo" ;;
518 mach_o_fat_vec) tb="$tb mach-o.lo dwarf2.lo" ;;
519 mcore_elf32_be_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
520 mcore_elf32_le_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
521 mcore_pe_be_vec) tb="$tb pe-mcore.lo peigen.lo $coff" ;;
522 mcore_pe_le_vec) tb="$tb pe-mcore.lo peigen.lo $coff" ;;
523 mcore_pei_be_vec) tb="$tb pei-mcore.lo peigen.lo $coff" ;;
524 mcore_pei_le_vec) tb="$tb pei-mcore.lo peigen.lo $coff" ;;
525 mep_elf32_vec) tb="$tb elf32-mep.lo elf32.lo $elf" ;;
526 mep_elf32_le_vec) tb="$tb elf32-mep.lo elf32.lo $elf" ;;
527 metag_elf32_vec) tb="$tb elf32-metag.lo elf32.lo $elf" ;;
528 microblaze_elf32_vec) tb="$tb elf32-microblaze.lo elf32.lo $elf" ;;
529 microblaze_elf32_le_vec) tb="$tb elf32-microblaze.lo elf32.lo $elf" ;;
530 mips_elf32_be_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
531 mips_elf32_le_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
532 mips_elf32_n_be_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
533 mips_elf32_n_le_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
534 mips_elf32_ntrad_be_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
535 mips_elf32_ntrad_le_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
536 mips_elf32_ntradfbsd_be_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
537 mips_elf32_ntradfbsd_le_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
538 mips_elf32_trad_be_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
539 mips_elf32_trad_le_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
540 mips_elf32_tradfbsd_be_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
541 mips_elf32_tradfbsd_le_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
542 mips_elf32_vxworks_be_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
543 mips_elf32_vxworks_le_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
544 mips_elf64_be_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
545 mips_elf64_le_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
546 mips_elf64_trad_be_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
547 mips_elf64_trad_le_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
548 mips_elf64_tradfbsd_be_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
549 mips_elf64_tradfbsd_le_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
550 mmix_elf64_vec) tb="$tb elf64-mmix.lo elf64.lo $elf" target_size=64 ;;
551 mmix_mmo_vec) tb="$tb mmo.lo" target_size=64 ;;
552 mn10200_elf32_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;;
553 mn10300_elf32_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
554 moxie_elf32_be_vec) tb="$tb elf32-moxie.lo elf32.lo $elf" ;;
555 moxie_elf32_le_vec) tb="$tb elf32-moxie.lo elf32.lo $elf" ;;
556 msp430_elf32_vec) tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
557 msp430_elf32_ti_vec) tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
558 mt_elf32_vec) tb="$tb elf32-mt.lo elf32.lo $elf" ;;
559 nds32_elf32_be_vec) tb="$tb elf32-nds32.lo elf32.lo $elf" ;;
560 nds32_elf32_le_vec) tb="$tb elf32-nds32.lo elf32.lo $elf" ;;
561 nds32_elf32_linux_be_vec) tb="$tb elf32-nds32.lo elf32.lo $elf" ;;
562 nds32_elf32_linux_le_vec) tb="$tb elf32-nds32.lo elf32.lo $elf" ;;
563 nios2_elf32_be_vec) tb="$tb elf32-nios2.lo elf32.lo $elf" ;;
564 nios2_elf32_le_vec) tb="$tb elf32-nios2.lo elf32.lo $elf" ;;
565 ns32k_aout_pc532mach_vec) tb="$tb pc532-mach.lo aout-ns32k.lo" ;;
566 ns32k_aout_pc532nbsd_vec) tb="$tb ns32knetbsd.lo aout-ns32k.lo" ;;
567 or1k_elf32_vec) tb="$tb elf32-or1k.lo elf32.lo $elf" ;;
568 pdp11_aout_vec) tb="$tb pdp11.lo" ;;
569 pef_vec) tb="$tb pef.lo" ;;
570 pef_xlib_vec) tb="$tb pef.lo" ;;
571 pj_elf32_vec) tb="$tb elf32-pj.lo elf32.lo $elf" ;;
572 pj_elf32_le_vec) tb="$tb elf32-pj.lo elf32.lo $elf" ;;
573 plugin_vec) tb="$tb plugin.lo" ;;
574 powerpc_boot_vec) tb="$tb ppcboot.lo" ;;
575 powerpc_elf32_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
576 powerpc_elf32_le_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
577 powerpc_elf32_fbsd_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
578 powerpc_elf32_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
579 powerpc_elf64_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
580 powerpc_elf64_le_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
581 powerpc_elf64_fbsd_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
582 powerpc_pe_vec) tb="$tb pe-ppc.lo peigen.lo $coff" ;;
583 powerpc_pe_le_vec) tb="$tb pe-ppc.lo peigen.lo $coff" ;;
584 powerpc_pei_vec) tb="$tb pei-ppc.lo peigen.lo $coff" ;;
585 powerpc_pei_le_vec) tb="$tb pei-ppc.lo peigen.lo $coff" ;;
586 powerpc_xcoff_vec) tb="$tb coff-rs6000.lo $xcoff" ;;
587 pru_elf32_vec) tb="$tb elf32-pru.lo elf32.lo $elf" ;;
588 riscv_elf32_vec) tb="$tb elf32-riscv.lo elfxx-riscv.lo elf32.lo $elf" ;;
589 riscv_elf64_vec) tb="$tb elf64-riscv.lo elf64.lo elfxx-riscv.lo elf32.lo $elf"; target_size=64 ;;
590 rl78_elf32_vec) tb="$tb elf32-rl78.lo elf32.lo $elf" ;;
591 rs6000_xcoff64_vec) tb="$tb coff64-rs6000.lo aix5ppc-core.lo $xcoff"; target_size=64 ;;
592 rs6000_xcoff64_aix_vec) tb="$tb coff64-rs6000.lo aix5ppc-core.lo $xcoff"; target_size=64 ;;
593 rs6000_xcoff_vec) tb="$tb coff-rs6000.lo $xcoff" ;;
594 rx_elf32_be_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;;
595 rx_elf32_be_ns_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;;
596 rx_elf32_le_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;;
597 s390_elf32_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;;
598 s390_elf64_vec) tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;;
599 score_elf32_be_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true; target_size=64 ;;
600 score_elf32_le_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true; target_size=64 ;;
601 sh_coff_vec) tb="$tb coff-sh.lo $coff" ;;
602 sh_coff_le_vec) tb="$tb coff-sh.lo $coff" ;;
603 sh_coff_small_vec) tb="$tb coff-sh.lo $coff" ;;
604 sh_coff_small_le_vec) tb="$tb coff-sh.lo $coff" ;;
605 sh_elf32_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
606 sh_elf32_le_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
607 sh_elf32_fdpic_be_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
608 sh_elf32_fdpic_le_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
609 sh_elf32_linux_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
610 sh_elf32_linux_be_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
611 sh_elf32_nbsd_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
612 sh_elf32_nbsd_le_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
613 sh_elf32_vxworks_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
614 sh_elf32_vxworks_le_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
615 sh_pe_le_vec) tb="$tb pe-sh.lo coff-sh.lo peigen.lo $coff" ;;
616 sh_pei_le_vec) tb="$tb pei-sh.lo coff-sh.lo peigen.lo $coff" ;;
617 sparc_elf32_vec) tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;;
618 sparc_elf32_sol2_vec) tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;;
619 sparc_elf32_vxworks_vec) tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;;
620 sparc_elf64_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
621 sparc_elf64_fbsd_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
622 sparc_elf64_sol2_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
623 spu_elf32_vec) tb="$tb elf32-spu.lo elf32.lo $elf" ;;
624 sym_vec) tb="$tb xsym.lo" ;;
625 tic30_aout_vec) tb="$tb aout-tic30.lo" ;;
626 tic30_coff_vec) tb="$tb coff-tic30.lo $coffgen" ;;
627 tic4x_coff0_vec) tb="$tb coff-tic4x.lo $coffgen" ;;
628 tic4x_coff0_beh_vec) tb="$tb coff-tic4x.lo $coffgen" ;;
629 tic4x_coff1_vec) tb="$tb coff-tic4x.lo $coffgen" ;;
630 tic4x_coff1_beh_vec) tb="$tb coff-tic4x.lo $coffgen" ;;
631 tic4x_coff2_vec) tb="$tb coff-tic4x.lo $coffgen" ;;
632 tic4x_coff2_beh_vec) tb="$tb coff-tic4x.lo $coffgen" ;;
633 tic54x_coff0_vec) tb="$tb coff-tic54x.lo $coffgen" ;;
634 tic54x_coff0_beh_vec) tb="$tb coff-tic54x.lo $coffgen" ;;
635 tic54x_coff1_vec) tb="$tb coff-tic54x.lo $coffgen" ;;
636 tic54x_coff1_beh_vec) tb="$tb coff-tic54x.lo $coffgen" ;;
637 tic54x_coff2_vec) tb="$tb coff-tic54x.lo $coffgen" ;;
638 tic54x_coff2_beh_vec) tb="$tb coff-tic54x.lo $coffgen" ;;
639 tic6x_elf32_be_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
640 tic6x_elf32_le_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
641 tic6x_elf32_c6000_be_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
642 tic6x_elf32_c6000_le_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
643 tic6x_elf32_linux_be_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
644 tic6x_elf32_linux_le_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
645 tic80_coff_vec) tb="$tb coff-tic80.lo $coff" ;;
646 tilegx_elf32_be_vec) tb="$tb elf32-tilegx.lo elfxx-tilegx.lo elf32.lo $elf" ; target_size=32 ;;
647 tilegx_elf32_le_vec) tb="$tb elf32-tilegx.lo elfxx-tilegx.lo elf32.lo $elf" ; target_size=32 ;;
648 tilegx_elf64_be_vec) tb="$tb elf64-tilegx.lo elfxx-tilegx.lo elf64.lo $elf" ; target_size=64 ;;
649 tilegx_elf64_le_vec) tb="$tb elf64-tilegx.lo elfxx-tilegx.lo elf64.lo $elf" ; target_size=64 ;;
650 tilepro_elf32_vec) tb="$tb elf32-tilepro.lo elf32.lo $elf" ;;
651 v800_elf32_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;;
652 v850_elf32_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;;
653 vax_aout_1knbsd_vec) tb="$tb vax1knetbsd.lo aout32.lo" ;;
654 vax_aout_nbsd_vec) tb="$tb vaxnetbsd.lo aout32.lo" ;;
655 vax_elf32_vec) tb="$tb elf32-vax.lo elf32.lo $elf" ;;
656 ft32_elf32_vec) tb="$tb elf32-ft32.lo elf32.lo $elf" ;;
657 visium_elf32_vec) tb="$tb elf32-visium.lo elf32.lo $elf" ;;
658 wasm_vec) tb="$tb wasm-module.lo" ;;
659 wasm32_elf32_vec) tb="$tb elf32-wasm32.lo elf32.lo $elf" ;;
660 x86_64_coff_vec) tb="$tb coff-x86_64.lo $coff"; target_size=64 ;;
661 x86_64_elf32_vec) tb="$tb elf64-x86-64.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf64.lo elf32.lo $elf"; target_size=64 ;;
662 x86_64_elf32_nacl_vec) tb="$tb elf64-x86-64.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf64.lo elf32.lo $elf"; target_size=64 ;;
663 x86_64_elf64_vec) tb="$tb elf64-x86-64.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
664 x86_64_elf64_cloudabi_vec) tb="$tb elf64-x86-64.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
665 x86_64_elf64_fbsd_vec) tb="$tb elf64-x86-64.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
666 x86_64_elf64_nacl_vec) tb="$tb elf64-x86-64.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
667 x86_64_elf64_sol2_vec) tb="$tb elf64-x86-64.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
668 x86_64_mach_o_vec) tb="$tb mach-o-x86-64.lo" ;;
669 x86_64_pe_vec) tb="$tb pe-x86_64.lo pex64igen.lo $coff"; target_size=64 ;;
670 x86_64_pe_be_vec) tb="$tb pe-x86_64.lo pex64igen.lo $coff"; target_size=64 ;;
671 x86_64_pei_vec) tb="$tb pei-x86_64.lo pex64igen.lo $coff"; target_size=64 ;;
672 xc16x_elf32_vec) tb="$tb elf32-xc16x.lo elf32.lo $elf" ;;
673 xgate_elf32_vec) tb="$tb elf32-xgate.lo elf32.lo $elf" ;;
674 xstormy16_elf32_vec) tb="$tb elf32-xstormy16.lo elf32.lo $elf" ;;
675 xtensa_elf32_be_vec) tb="$tb xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;;
676 xtensa_elf32_le_vec) tb="$tb xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;;
677 z80_coff_vec) tb="$tb coff-z80.lo reloc16.lo $coffgen" ;;
678 z8k_coff_vec) tb="$tb coff-z8k.lo reloc16.lo $coff" ;;
680 # These appear out of order in targets.c
681 srec_vec) tb="$tb srec.lo" ;;
682 symbolsrec_vec) tb="$tb srec.lo" ;;
683 tekhex_vec) tb="$tb tekhex.lo" ;;
684 core_cisco_be_vec) tb="$tb cisco-core.lo" ;;
685 core_cisco_le_vec) tb="$tb cisco-core.lo" ;;
688 *) AC_MSG_ERROR(*** unknown target vector $vec) ;;
691 if test ${target_size} = 64; then
694 if test x"${vec}" = x"${defvec}"; then
695 bfd_default_target_size=${target_size}
699 # Target architecture .o files.
700 # A couple of CPUs use shorter file names to avoid problems on DOS
702 ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.lo/g -e s/mn10200/m10200/ -e s/mn10300/m10300/`
704 # Weed out duplicate .o files.
726 if test x${all_targets} = xtrue ; then
727 bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)'
728 bfd_machines="${bfd_machines}"' $(ALL_MACHINES)'
730 havevecs=-DHAVE_all_vecs
732 test -n "$assocvecs" &&
733 assocvecs=`echo $assocvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
734 else # all_targets is true
735 # Only set these if they will be nonempty, for the clever echo.
738 test -n "$selvecs" &&
739 havevecs=`echo $selvecs | sed -e 's/^/-DHAVE_/' -e 's/ \(.\)/ -DHAVE_\1/g'`
740 test -n "$selvecs" &&
741 selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
742 test -n "$selarchs" &&
743 selarchs=`echo $selarchs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
744 fi # all_targets is true
746 # 64-bit archives need a 64-bit bfd_vma.
747 if test "x$want_64_bit_archive" = xtrue; then
749 AC_DEFINE(USE_64_BIT_ARCHIVE, 1,
750 [Define if 64-bit archives should always be used.])
753 case ${host64}-${target64}-${want64} in
756 bfd64_libs='$(BFD64_LIBS)'
757 all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)'
758 if test $BFD_HOST_64_BIT_DEFINED = 0; then
759 AC_MSG_WARN([You have requested a 64 bit BFD configuration, but])
760 AC_MSG_WARN([your compiler may not have a 64 bit integral type])
762 if test -n "$GCC" ; then
764 AC_MSG_CHECKING([for gcc version with buggy 64-bit support])
765 # Add more tests for gcc versions with non-working 64-bit support here.
766 AC_EGREP_CPP([: 2 : 91 : 1 :],[:__GNUC__:__GNUC_MINOR__:__i386__:],
768 AC_MSG_RESULT([yes: egcs-1.1.2 on ix86 spotted]),
770 if test $bad_64bit_gcc = yes ; then
771 AC_MSG_ERROR([A newer version of gcc is needed for the requested 64-bit BFD configuration])
777 all_backends='$(BFD32_BACKENDS)'
782 test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
783 test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'"
784 test -n "${assocvecs}" && tdefaults="${tdefaults} -DASSOCIATED_VECS='${assocvecs}'"
785 test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'"
789 AC_SUBST(all_backends)
790 AC_SUBST(bfd_backends)
791 AC_SUBST(bfd_machines)
792 AC_SUBST(bfd_default_target_size)
796 # If we are configured native, pick a core file support file.
801 if test "${target}" = "${host}"; then
803 alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu | alpha*-*-*vms*)
807 COREFILE=trad-core.lo
808 TRAD_HEADER='"hosts/alphalinux.h"'
810 alpha*-*-netbsd* | alpha*-*-openbsd*)
811 COREFILE=netbsd-core.lo
816 arm-*-freebsd* | arm-*-kfreebsd*-gnu)
818 arm-*-netbsd* | arm-*-openbsd*)
819 COREFILE=netbsd-core.lo
821 arm-*-riscix) COREFILE=trad-core.lo ;;
822 hppa*-*-hpux*) COREFILE=hpux-core.lo ;;
823 hppa*-*-hiux*) COREFILE=hpux-core.lo ;;
824 hppa*-*-mpeix*) COREFILE=hpux-core.lo ;;
825 hppa*-*-bsd*) COREFILE="hpux-core.lo hppabsd-core.lo"
826 COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
827 hppa*-*-netbsd* | hppa*-*-openbsd*)
828 COREFILE=netbsd-core.lo
832 i[3-7]86-sequent-bsd*)
834 COREFILE=trad-core.lo
835 TRAD_HEADER='"hosts/symmetry.h"'
838 i[3-7]86-sequent-sysv4*) ;;
839 i[3-7]86-sequent-sysv*)
841 COREFILE=trad-core.lo
842 TRAD_HEADER='"hosts/symmetry.h"'
850 i[3-7]86-*-bsd* | i[3-7]86-*-freebsd[123] | i[3-7]86-*-freebsd[123]\.* | i[3-7]86-*-freebsd4\.[01234] | i[3-7]86-*-freebsd4\.[01234]\.* | i[3-7]86-*-freebsd*aout*)
852 COREFILE=trad-core.lo
853 TRAD_HEADER='"hosts/i386bsd.h"'
856 i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu | i[3-7]86-*-dragonfly*)
859 TRAD_HEADER='"hosts/i386bsd.h"'
862 i[3-7]86-*-netbsd* | i[3-7]86-*-knetbsd*-gnu | i[3-7]86-*-openbsd*)
864 COREFILE=netbsd-core.lo
867 i[3-7]86-esix-sysv3*)
869 COREFILE=trad-core.lo
870 TRAD_HEADER='"hosts/esix.h"'
873 i[3-7]86-*-sco3.2v5*)
875 COREFILE=sco5-core.lo
878 i[3-7]86-*-sco* | i[3-7]86-*-isc*)
880 COREFILE=trad-core.lo
881 TRAD_HEADER='"hosts/i386sco.h"'
886 COREFILE=trad-core.lo
887 TRAD_HEADER='"hosts/i386mach3.h"'
892 COREFILE=trad-core.lo
893 TRAD_HEADER='"hosts/i386linux.h"'
894 case "$enable_targets"-"$want64" in
895 *x86_64-*linux*|*-true)
896 CORE_HEADER='"hosts/x86-64linux.h"'
900 i[3-7]86-*-isc*) COREFILE=trad-core.lo ;;
901 i[3-7]86-*-aix*) COREFILE=aix386-core.lo ;;
903 mips-*-netbsd* | mips*-*-openbsd*)
904 COREFILE=netbsd-core.lo
906 mips-sgi-irix4*) COREFILE=irix-core.lo ;;
907 mips-sgi-irix5*) COREFILE=irix-core.lo ;;
908 mips-sgi-irix6*) COREFILE=irix-core.lo ;;
910 COREFILE=trad-core.lo
911 TRAD_HEADER='"hosts/m68klinux.h"'
914 COREFILE=netbsd-core.lo
917 COREFILE=trad-core.lo
918 TRAD_HEADER='"hosts/pc532mach.h"'
920 ns32k-*-netbsd* | ns32k-*-openbsd*)
921 COREFILE=netbsd-core.lo
924 COREFILE=lynx-core.lo
927 rs6000-*-aix[5-9].* | powerpc-*-aix[5-9].* | powerpc64-*-aix[5-9].*)
929 COREFILE=rs6000-core.lo
930 COREFLAG="$COREFLAG -DAIX_5_CORE -DAIX_CORE_DUMPX_CORE"
933 rs6000-*-aix4.[3-9]* | powerpc-*-aix4.[3-9]*)
935 COREFILE=rs6000-core.lo
936 COREFLAG="$COREFLAG -DAIX_CORE_DUMPX_CORE"
937 # Not all versions of AIX with -DAIX_CORE_DUMPX_CORE
938 # have c_impl as a member of struct core_dumpx
939 AC_MSG_CHECKING([for c_impl in struct core_dumpx])
940 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <core.h>]], [[struct core_dumpx c; c.c_impl = 0;]])],[AC_DEFINE(HAVE_ST_C_IMPL, 1,
941 [Define if struct core_dumpx has member c_impl])
942 AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
944 rs6000-*-aix4*) COREFILE=rs6000-core.lo ;;
945 rs6000-*-*) COREFILE=rs6000-core.lo ;;
946 powerpc64-*-aix*) COREFILE=rs6000-core.lo ;;
947 powerpc-*-aix4*) COREFILE=rs6000-core.lo ;;
948 powerpc-*-aix*) COREFILE=rs6000-core.lo ;;
950 powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu)
952 powerpc-*-netbsd*) COREFILE=netbsd-core.lo ;;
953 powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;;
954 s390*-*-*) COREFILE=trad-core.lo ;;
955 sh*-*-netbsd* | sh*-*-openbsd*)
956 COREFILE=netbsd-core.lo
958 sparc-*-netbsd* | sparc*-*-openbsd*)
959 COREFILE=netbsd-core.lo
961 vax-*-netbsd* | vax-*-openbsd*)
962 COREFILE=netbsd-core.lo
965 COREFILE=trad-core.lo
966 TRAD_HEADER='"hosts/vaxult2.h"'
969 COREFILE=trad-core.lo
970 TRAD_HEADER='"hosts/vaxult2.h"'
973 COREFILE=trad-core.lo
974 TRAD_HEADER='"hosts/vaxlinux.h"'
977 COREFILE=trad-core.lo
978 TRAD_HEADER='"hosts/vaxbsd.h"'
981 CORE_HEADER='"hosts/x86-64linux.h"'
983 x86_64-*-netbsd* | x86_64-*-openbsd*)
984 COREFILE=netbsd-core.lo
989 aix386-core.lo) COREFLAG=-DAIX386_CORE ;;
990 hppabsd-core.lo) COREFLAG=-DHPPABSD_CORE ;;
991 hpux-core.lo) COREFLAG=-DHPUX_CORE ;;
992 irix-core.lo) COREFLAG=-DIRIX_CORE ;;
993 lynx-core.lo) COREFLAG=-DLYNX_CORE ;;
994 netbsd-core.lo) COREFLAG=-DNETBSD_CORE ;;
995 osf-core.lo) COREFLAG=-DOSF_CORE ;;
996 ptrace-core.lo) COREFLAG=-DPTRACE_CORE ;;
997 rs6000-core.lo) COREFLAG="$COREFLAG -DAIX_CORE" ;;
998 sco5-core.lo) COREFLAG="$COREFLAG -DSCO5_CORE" ;;
999 trad-core.lo) COREFLAG="$COREFLAG -DTRAD_CORE" ;;
1002 # ELF corefile support has several flavors, but all of
1003 # them use something called <sys/procfs.h>
1004 AC_CHECK_HEADERS(sys/procfs.h)
1005 if test "$ac_cv_header_sys_procfs_h" = yes; then
1006 BFD_HAVE_SYS_PROCFS_TYPE(prstatus_t)
1007 BFD_HAVE_SYS_PROCFS_TYPE(prstatus32_t)
1008 BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prstatus_t, pr_who)
1009 BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prstatus32_t, pr_who)
1010 BFD_HAVE_SYS_PROCFS_TYPE(pstatus_t)
1011 BFD_HAVE_SYS_PROCFS_TYPE(pxstatus_t)
1012 BFD_HAVE_SYS_PROCFS_TYPE(pstatus32_t)
1013 BFD_HAVE_SYS_PROCFS_TYPE(prpsinfo_t)
1014 BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prpsinfo_t, pr_pid)
1015 BFD_HAVE_SYS_PROCFS_TYPE(prpsinfo32_t)
1016 BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prpsinfo32_t, pr_pid)
1017 BFD_HAVE_SYS_PROCFS_TYPE(psinfo_t)
1018 BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(psinfo_t, pr_pid)
1019 BFD_HAVE_SYS_PROCFS_TYPE(psinfo32_t)
1020 BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(psinfo32_t, pr_pid)
1021 BFD_HAVE_SYS_PROCFS_TYPE(lwpstatus_t)
1022 BFD_HAVE_SYS_PROCFS_TYPE(lwpxstatus_t)
1023 BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_context)
1024 BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_reg)
1025 BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_fpreg)
1026 BFD_HAVE_SYS_PROCFS_TYPE(win32_pstatus_t)
1031 if test -n "$CORE_HEADER"; then
1032 AC_DEFINE_UNQUOTED(CORE_HEADER, $CORE_HEADER,
1033 [Name of host specific core header file to include in elf.c.])
1035 if test -n "$TRAD_HEADER"; then
1036 AC_DEFINE_UNQUOTED(TRAD_HEADER, $TRAD_HEADER,
1037 [Name of host specific header file to include in trad-core.c.])
1040 if test "$plugins" = "yes"; then
1045 AC_SUBST(supports_plugins)
1046 AC_SUBST(lt_cv_dlopen_libs)
1048 # Determine the host dependent file_ptr a.k.a. off_t type. In order
1049 # prefer: off64_t - if ftello64 and fseeko64, off_t - if ftello and
1050 # fseeko, long. This assumes that sizeof off_t is .ge. sizeof long.
1051 # Hopefully a reasonable assumption since fseeko et.al. should be
1052 # upward compatible.
1053 AC_CHECK_FUNCS(ftello ftello64 fseeko fseeko64 fopen64)
1054 if test x"$ac_cv_func_ftello" = xyes -a x"$ac_cv_func_fseeko" = xyes; then
1055 AC_CHECK_SIZEOF(off_t)
1057 AC_MSG_CHECKING([file_ptr type])
1059 bfd_ufile_ptr="unsigned long"
1060 if test x"$ac_cv_func_ftello64" = xyes -a x"$ac_cv_func_fseeko64" = xyes \
1061 -o x"${ac_cv_sizeof_off_t}" = x8; then
1062 bfd_file_ptr=BFD_HOST_64_BIT
1063 bfd_ufile_ptr=BFD_HOST_U_64_BIT
1065 AC_MSG_RESULT($bfd_file_ptr)
1066 AC_SUBST(bfd_file_ptr)
1067 AC_SUBST(bfd_ufile_ptr)
1069 dnl AC_CHECK_HEADERS(sys/mman.h)
1071 AC_CHECK_FUNCS(madvise mprotect)
1072 case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in
1073 true+yes ) AC_DEFINE(USE_MMAP, 1, [Use mmap if it's available?]) ;;
1076 rm -f doc/config.status
1077 AC_CONFIG_FILES([Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in])
1079 dnl We need this duplication, even though we use AM_PO_SUBDIRS, because of
1080 dnl our two separate POTFILES. Yuck.
1081 AC_CONFIG_COMMANDS([default],
1085 *) srcdirpre='$(srcdir)/' ;;
1089 for lang in dummy $OBSOLETE_ALL_LINGUAS; do
1090 if test $lang != dummy; then
1091 POFILES="$POFILES $srcdirpre$lang.po"
1092 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
1095 sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' \
1096 -e '/BLD-POTFILES =/r po/BLD-POTFILES' \
1097 -e "s,@POFILES@,$POFILES," \
1098 -e "s,@GMOFILES@,$GMOFILES," \
1099 po/Makefile.in > po/Makefile]],[[]])
1101 dnl Required by html, pdf, install-pdf and install-html
1102 AC_SUBST(datarootdir)