Automatic date update in version.in
[binutils-gdb.git] / bfd / configure.ac
blob0e4c669b7d2f2fdf6eadec1ff03dcd915324b120
1 dnl Process this file with autoconf to produce a configure script.
2 dnl
3 dnl   Copyright (C) 2012-2017 Free Software Foundation, Inc.
4 dnl
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.
9 dnl
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.
14 dnl
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/>.
18 dnl
20 AC_PREREQ(2.59)
21 m4_include([version.m4])
22 AC_INIT([bfd], BFD_VERSION)
23 AC_CONFIG_SRCDIR([libbfd.c])
25 AC_CANONICAL_TARGET
26 AC_ISC_POSIX
28 AM_INIT_AUTOMAKE
30 dnl These must be called before LT_INIT, because it may want
31 dnl to call AC_CHECK_PROG.
32 AC_CHECK_TOOL(AR, ar)
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.
37 AC_DISABLE_SHARED
39 AC_PROG_CC
40 AC_GNU_SOURCE
41 AC_USE_SYSTEM_EXTENSIONS
43 LT_INIT([dlopen])
45 # AC_PLUGINS setting $plugins is called by ACX_LARGEFILE.
46 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
57   yes)  want64=true  ;;
58   no)   want64=false ;;
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'])
66             ;;
67   no)       enable_targets= ;;
68   *)        enable_targets=$enableval ;;
69 esac])dnl
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
80 AC_ARG_WITH(mmap,
81 [  --with-mmap             try using mmap for BFD input files if available],
82 [case "${withval}" in
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 AC_ARG_ENABLE(leading-mingw64-underscores,
101   AS_HELP_STRING([--enable-leading-mingw64-underscores],
102                  [Enable leading underscores on 64 bit mingw targets]),
103   [],[])
104 AS_IF([ test x"$enable_leading_mingw64_underscores" = xyes ],
105   [AC_DEFINE(USE_MINGW64_LEADING_UNDERSCORES, 1,
106     [Define if we should use leading underscore on 64 bit mingw targets])])
108 DEBUGDIR=${libdir}/debug
109 AC_ARG_WITH(separate-debug-dir,
110   AS_HELP_STRING([--with-separate-debug-dir=DIR],
111                  [Look for global separate debug info in DIR [[default=LIBDIR/debug]]]),
112 [DEBUGDIR="${withval}"])
113 AC_SUBST(DEBUGDIR)
115 ACX_PKGVERSION([GNU Binutils])
116 ACX_BUGURL([http://www.sourceware.org/bugzilla/])
118 AM_BINUTILS_WARNINGS
120 AC_CONFIG_HEADERS(config.h:config.in)
122 # PR 14072
123 AH_VERBATIM([00_CONFIG_H_CHECK],
124 [/* Check that config.h is #included before system headers
125     (this works only for glibc, but that should be enough).  */
126 #if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__)
127 #  error config.h must be #included before system headers
128 #endif
129 #define __CONFIG_H__ 1])
131 if test -z "$target" ; then
132     AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
135 AM_MAINTAINER_MODE
136 AM_CONDITIONAL(GENINSRC_NEVER, false)
137 AM_INSTALL_LIBBFD
138 AC_EXEEXT
140 host64=false
141 target64=false
142 bfd_default_target_size=32
144 # host stuff:
146 ALL_LINGUAS="da es fi fr hr id ja ro ru rw sr sv tr uk vi zh_CN"
147 ZW_GNU_GETTEXT_SISTER_DIR
148 AM_PO_SUBDIRS
150 # Permit host specific settings.
151 . ${srcdir}/configure.host
153 AC_SUBST(HDEFINES)
154 AC_PROG_INSTALL
156 BFD_HOST_64BIT_LONG=0
157 BFD_HOST_64BIT_LONG_LONG=0
158 BFD_HOST_64_BIT_DEFINED=0
159 BFD_HOST_64_BIT=
160 BFD_HOST_U_64_BIT=
161 BFD_HOSTPTR_T="unsigned long"
163 AC_TYPE_LONG_DOUBLE
164 AC_CHECK_TYPES([long long], [AC_CHECK_SIZEOF(long long)])
165 AC_CHECK_SIZEOF(void *)
166 AC_CHECK_SIZEOF(long)
168 if test "x${ac_cv_sizeof_void_p}" = "x8"; then
169   host64=true
172 if test "x${ac_cv_sizeof_long}" = "x8"; then
173   BFD_HOST_64BIT_LONG=1
174   test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long"
175   test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long"
176 elif test "x${ac_cv_sizeof_long_long}" = "x8"; then
177   BFD_HOST_64BIT_LONG_LONG=1
178   test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long"
179   test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long"
180   if test "x${ac_cv_sizeof_void_p}" = "x8"; then
181     BFD_HOSTPTR_T="unsigned long long"
182   fi
185 if test -n "${HOST_64BIT_TYPE}" -a -n "${HOST_U_64BIT_TYPE}"; then
186   BFD_HOST_64_BIT_DEFINED=1
187   BFD_HOST_64_BIT="${HOST_64BIT_TYPE}"
188   BFD_HOST_U_64_BIT="${HOST_U_64BIT_TYPE}"
191 AC_SUBST(BFD_HOST_64BIT_LONG)
192 AC_SUBST(BFD_HOST_64BIT_LONG_LONG)
193 AC_SUBST(BFD_HOST_64_BIT_DEFINED)
194 AC_SUBST(BFD_HOST_64_BIT)
195 AC_SUBST(BFD_HOST_U_64_BIT)
196 AC_SUBST(BFD_HOSTPTR_T)
198 BFD_CC_FOR_BUILD
200 AC_CHECK_HEADERS(alloca.h stddef.h string.h strings.h stdlib.h time.h unistd.h wchar.h wctype.h)
201 AC_CHECK_HEADERS(fcntl.h sys/file.h sys/time.h sys/stat.h sys/resource.h)
202 GCC_HEADER_STDINT(bfd_stdint.h)
203 AC_HEADER_TIME
204 AC_HEADER_DIRENT
206 ACX_HEADER_STRING
207 AC_CHECK_FUNCS(fcntl getpagesize setitimer sysconf fdopen getuid getgid fileno)
208 AC_CHECK_FUNCS(strtoull getrlimit)
210 AC_CHECK_DECLS(basename)
211 AC_CHECK_DECLS(ftello)
212 AC_CHECK_DECLS(ftello64)
213 AC_CHECK_DECLS(fseeko)
214 AC_CHECK_DECLS(fseeko64)
216 BFD_BINARY_FOPEN
218 AC_CHECK_DECLS(ffs)
219 AC_CHECK_DECLS(free)
220 AC_CHECK_DECLS(getenv)
221 AC_CHECK_DECLS(malloc)
222 AC_CHECK_DECLS(realloc)
223 AC_CHECK_DECLS(stpcpy)
224 AC_CHECK_DECLS(strstr)
225 AC_CHECK_DECLS(asprintf)
226 AC_CHECK_DECLS(vasprintf)
227 AC_CHECK_DECLS(snprintf)
228 AC_CHECK_DECLS(vsnprintf)
229 AC_CHECK_DECLS(strnlen)
231 # Link in zlib if we can.  This allows us to read compressed debug sections.
232 # This is used only by compress.c.
233 AM_ZLIB
235 # Check if linker supports --as-needed and --no-as-needed options
236 AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed,
237         [bfd_cv_ld_as_needed=no
238         if $LD --help 2>/dev/null | grep as-needed > /dev/null; then
239                 bfd_cv_ld_as_needed=yes
240         fi
241         ])
243 LT_LIB_M
245 # When building a shared libbfd, link against the pic version of libiberty
246 # so that apps that use libbfd won't need libiberty just to satisfy any
247 # libbfd references.
248 # We can't do that if a pic libiberty is unavailable since including non-pic
249 # code would insert text relocations into libbfd.
250 SHARED_LIBADD=
251 SHARED_LDFLAGS=
252 if test "$enable_shared" = "yes"; then
253 changequote(,)dnl
254   x=`sed -n -e 's/^[    ]*PICFLAG[      ]*=[    ]*//p' < ../libiberty/Makefile | sed -n '$p'`
255 changequote([,])dnl
256   if test -n "$x"; then
257     SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty"
258   fi
260 # More hacks to build DLLs on Windows.
261   case "${host}" in
262   *-*-cygwin*)
263     SHARED_LDFLAGS="-no-undefined"
264     SHARED_LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32"
265   ;;
267   # Hack to build or1k-src on OSX
268   or1k*-*-darwin*)
269     SHARED_LIBADD="-L`pwd`/../libiberty/pic -L`pwd`/../intl -liberty -lintl"
270   ;;
271   esac
273   if test -n "$SHARED_LIBADD"; then
274     if test -n "$LIBM"; then
275       if test x"$bfd_cv_ld_as_needed" = xyes; then
276         # Link against libm only when needed.  Put -lc, -lm inside -Wl
277         # to stop libtool reordering these options.
278         SHARED_LIBADD="$SHARED_LIBADD -Wl,-lc,--as-needed,`echo $LIBM | sed 's/ /,/g'`,--no-as-needed"
279       else
280         SHARED_LIBADD="$SHARED_LIBADD $LIBM"
281       fi
282     fi
283   fi
285 AC_SUBST(SHARED_LDFLAGS)
286 AC_SUBST(SHARED_LIBADD)
288 # target stuff:
290 # Canonicalize the secondary target names.
291 if test -n "$enable_targets" ; then
292     for targ in `echo $enable_targets | sed 's/,/ /g'`
293     do
294         result=`$ac_config_sub $targ 2>/dev/null`
295         if test -n "$result" ; then
296             canon_targets="$canon_targets $result"
297         else
298             # Allow targets that config.sub doesn't recognize, like "all".
299             canon_targets="$canon_targets $targ"
300         fi
301     done
304 all_targets=false
305 defvec=
306 selvecs=
307 assocvecs=
308 selarchs=
309 TDEFINES=
310 for targ in $target $canon_targets
312     if test "x$targ" = "xall"; then
313         all_targets=true
314         assocvecs="$assocvecs $targ_defvec $targ_selvecs"
315     else
316         . $srcdir/config.bfd
317         if test "x$targ" = "x$target"; then
318             defvec=$targ_defvec
319         fi
320         selvecs="$selvecs $targ_defvec $targ_selvecs"
321         selarchs="$selarchs $targ_archs"
322         TDEFINES="$TDEFINES $targ_cflags"
323     fi
324 done
325 AC_SUBST(TDEFINES)
327 # This processing still needs to be done if we're to decide properly whether
328 # 64-bit support needs to be compiled in.  Currently, it will be included if
329 # the default or any other explicitly requested target requires it; it
330 # will not be included on a 32-bit host if no 64-bit target is requested, and
331 # no "--with-64-bit-bfd" option is given, even if "--enable-targets=all" is
332 # used.
334 # uniq the default and selected vectors in all the configured targets.
335 f=""
336 for i in $selvecs ; do
337     case " $f " in
338     *" $i "*) ;;
339     *) f="$f $i" ;;
340     esac
341 done
342 selvecs="$f"
345 # uniq the associated vectors in all the configured targets.
346 f=""
347 for i in $assocvecs ; do
348     case " $f " in
349     *" $i "*) ;;
350     *) f="$f $i" ;;
351     esac
352 done
353 assocvecs="$f"
356 # uniq the architectures in all the configured targets.
357 f=""
358 for i in $selarchs ; do
359     case " $f " in
360     *" $i "*) ;;
361     *) f="$f $i" ;;
362     esac
363 done
364 selarchs="$f"
366 # Target backend .o files.
369 elf="elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-properties.lo
370      elf-eh-frame.lo dwarf1.lo dwarf2.lo"
371 coffgen="coffgen.lo dwarf2.lo"
372 coff="cofflink.lo $coffgen"
373 ecoff="ecofflink.lo $coffgen"
374 xcoff="xcofflink.lo $coffgen"
376 for vec in $selvecs
378     target_size=32
379     case "$vec" in
380     # This list is alphabetized to make it easy to compare
381     # with the two vector lists in targets.c.  For the same reason,
382     # use one entry per line, even though this leads to long lines.
383     aarch64_elf32_be_vec)        tb="$tb elf32-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf32.lo $elf"; target_size=64 ;;
384     aarch64_elf32_le_vec)        tb="$tb elf32-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf32.lo $elf"; target_size=64 ;;
385     aarch64_elf64_be_vec)          tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
386     aarch64_elf64_be_cloudabi_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
387     aarch64_elf64_le_vec)          tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
388     aarch64_elf64_le_cloudabi_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
389     aarch64_mach_o_vec)          tb="$tb mach-o-aarch64.lo"; target_size=64 ;;
390     alpha_ecoff_le_vec)          tb="$tb coff-alpha.lo ecoff.lo $ecoff"; target_size=64 ;;
391     alpha_elf64_vec)             tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
392     alpha_elf64_fbsd_vec)        tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
393     alpha_nlm32_vec)             tb="$tb nlm32-alpha.lo nlm32.lo nlm.lo"; target_size=64 ;;
394     alpha_vms_vec)               tb="$tb vms-alpha.lo vms-misc.lo vms-lib.lo"; target_size=64 ;;
395     alpha_vms_lib_txt_vec)       tb="$tb vms-lib.lo vms-misc.lo" ;;
396     am33_elf32_linux_vec)        tb="$tb elf32-am33lin.lo elf32.lo $elf" ;;
397     aout0_be_vec)                tb="$tb aout0.lo aout32.lo" ;;
398     aout64_vec)                  tb="$tb demo64.lo aout64.lo"; target_size=64 ;;
399     aout_vec)                    tb="$tb host-aout.lo aout32.lo" ;;
400     aout_adobe_vec)              tb="$tb aout-adobe.lo aout32.lo" ;;
401     arc_elf32_be_vec)            tb="$tb elf32-arc.lo elf32.lo $elf" ;;
402     arc_elf32_le_vec)            tb="$tb elf32-arc.lo elf32.lo $elf" ;;
403     arm_aout_be_vec)             tb="$tb aout-arm.lo aout32.lo" ;;
404     arm_aout_le_vec)             tb="$tb aout-arm.lo aout32.lo" ;;
405     arm_aout_nbsd_vec)           tb="$tb armnetbsd.lo aout32.lo" ;;
406     arm_aout_riscix_vec)         tb="$tb aout32.lo riscix.lo" ;;
407     arm_coff_be_vec)             tb="$tb coff-arm.lo $coff" ;;
408     arm_coff_le_vec)             tb="$tb coff-arm.lo $coff" ;;
409     arm_elf32_be_vec)            tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
410     arm_elf32_le_vec)            tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
411     arm_elf32_nacl_be_vec)       tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
412     arm_elf32_nacl_le_vec)       tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
413     arm_elf32_symbian_be_vec)    tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
414     arm_elf32_symbian_le_vec)    tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
415     arm_elf32_vxworks_be_vec)    tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
416     arm_elf32_vxworks_le_vec)    tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;;
417     arm_pe_be_vec)               tb="$tb pe-arm.lo peigen.lo $coff" ;;
418     arm_pe_le_vec)               tb="$tb pe-arm.lo peigen.lo $coff" ;;
419     arm_pe_epoc_be_vec)          tb="$tb epoc-pe-arm.lo peigen.lo $coff" ;;
420     arm_pe_epoc_le_vec)          tb="$tb epoc-pe-arm.lo peigen.lo $coff" ;;
421     arm_pe_wince_be_vec)         tb="$tb pe-arm-wince.lo pe-arm.lo peigen.lo $coff" ;;
422     arm_pe_wince_le_vec)         tb="$tb pe-arm-wince.lo pe-arm.lo peigen.lo $coff" ;;
423     arm_pei_be_vec)              tb="$tb pei-arm.lo peigen.lo $coff" ;;
424     arm_pei_le_vec)              tb="$tb pei-arm.lo peigen.lo $coff" ;;
425     arm_pei_epoc_be_vec)         tb="$tb epoc-pei-arm.lo peigen.lo $coff" ;;
426     arm_pei_epoc_le_vec)         tb="$tb epoc-pei-arm.lo peigen.lo $coff" ;;
427     arm_pei_wince_be_vec)        tb="$tb pei-arm-wince.lo pei-arm.lo peigen.lo $coff" ;;
428     arm_pei_wince_le_vec)        tb="$tb pei-arm-wince.lo pei-arm.lo peigen.lo $coff" ;;
429     arm_mach_o_vec)              tb="$tb mach-o-arm.lo" ;;
430     avr_elf32_vec)               tb="$tb elf32-avr.lo elf32.lo $elf" ;;
431     bfin_elf32_vec)              tb="$tb elf32-bfin.lo elf32.lo $elf" ;;
432     bfin_elf32_fdpic_vec)        tb="$tb elf32-bfin.lo elf32.lo $elf" ;;
433     bout_be_vec)                 tb="$tb bout.lo aout32.lo" ;;
434     bout_le_vec)                 tb="$tb bout.lo aout32.lo" ;;
435     cr16_elf32_vec)              tb="$tb elf32-cr16.lo elf32.lo $elf" ;;
436     cr16c_elf32_vec)             tb="$tb elf32-cr16c.lo elf32.lo $elf" ;;
437     cris_aout_vec)               tb="$tb aout-cris.lo" ;;
438     cris_elf32_vec)              tb="$tb elf32-cris.lo elf32.lo $elf" ;;
439     cris_elf32_us_vec)           tb="$tb elf32-cris.lo elf32.lo $elf" ;;
440     crx_elf32_vec)               tb="$tb elf32-crx.lo elf32.lo $elf" ;;
441     d10v_elf32_vec)              tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
442     d30v_elf32_vec)              tb="$tb elf32-d30v.lo elf32.lo $elf" ;;
443     dlx_elf32_be_vec)            tb="$tb elf32-dlx.lo elf32.lo $elf" ;;
444     elf32_be_vec)                tb="$tb elf32-gen.lo elf32.lo $elf" ;;
445     elf32_le_vec)                tb="$tb elf32-gen.lo elf32.lo $elf" ;;
446     elf64_be_vec)                tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
447     elf64_le_vec)                tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
448     epiphany_elf32_vec)          tb="$tb elf32-epiphany.lo elf32.lo $elf" ;;
449     fr30_elf32_vec)              tb="$tb elf32-fr30.lo elf32.lo $elf" ;;
450     frv_elf32_vec)               tb="$tb elf32-frv.lo elf32.lo $elf" ;;
451     frv_elf32_fdpic_vec)         tb="$tb elf32-frv.lo elf32.lo $elf" ;;
452     h8300_coff_vec)              tb="$tb coff-h8300.lo reloc16.lo $coffgen" ;;
453     h8300_elf32_vec)             tb="$tb elf32-h8300.lo elf32.lo $elf" ;;
454     h8300_elf32_linux_vec)       tb="$tb elf32-h8300.lo elf32.lo $elf" ;;
455     h8500_coff_vec)              tb="$tb coff-h8500.lo reloc16.lo $coffgen" ;;
456     hppa_elf32_vec)              tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
457     hppa_elf32_linux_vec)        tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
458     hppa_elf32_nbsd_vec)         tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
459     hppa_elf64_vec)              tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;;
460     hppa_elf64_linux_vec)        tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;;
461     hppa_som_vec)                tb="$tb som.lo" ;;
462     i370_elf32_vec)              tb="$tb elf32-i370.lo elf32.lo $elf" ;;
463     i386_aout_vec)               tb="$tb i386aout.lo aout32.lo" ;;
464     i386_aout_bsd_vec)           tb="$tb i386bsd.lo aout32.lo" ;;
465     i386_aout_dynix_vec)         tb="$tb i386dynix.lo aout32.lo" ;;
466     i386_aout_fbsd_vec)          tb="$tb i386freebsd.lo aout32.lo" ;;
467     i386_aout_linux_vec)         tb="$tb i386linux.lo aout32.lo" ;;
468     i386_aout_lynx_vec)          tb="$tb i386lynx.lo lynx-core.lo aout32.lo" ;;
469     i386_aout_mach3_vec)         tb="$tb i386mach3.lo aout32.lo" ;;
470     i386_aout_nbsd_vec)          tb="$tb i386netbsd.lo aout32.lo" ;;
471     i386_aout_os9k_vec)          tb="$tb i386os9k.lo aout32.lo" ;;
472     i386_coff_vec)               tb="$tb coff-i386.lo $coff" ;;
473     i386_coff_go32_vec)          tb="$tb coff-go32.lo $coff" ;;
474     i386_coff_go32stubbed_vec)   tb="$tb coff-stgo32.lo $coff" ;;
475     i386_coff_lynx_vec)          tb="$tb cf-i386lynx.lo lynx-core.lo $coff" ;;
476     i386_elf32_vec)              tb="$tb elf32-i386.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
477     i386_elf32_fbsd_vec)         tb="$tb elf32-i386.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
478     i386_elf32_nacl_vec)         tb="$tb elf32-i386.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
479     i386_elf32_sol2_vec)         tb="$tb elf32-i386.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
480     i386_elf32_vxworks_vec)      tb="$tb elf32-i386.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
481     i386_mach_o_vec)             tb="$tb mach-o-i386.lo" ;;
482     i386_msdos_vec)              tb="$tb i386msdos.lo" ;;
483     i386_nlm32_vec)              tb="$tb nlm32-i386.lo nlm32.lo nlm.lo" ;;
484     i386_pe_vec)                 tb="$tb pe-i386.lo peigen.lo $coff" ;;
485     i386_pei_vec)                tb="$tb pei-i386.lo peigen.lo $coff" ;;
486     iamcu_elf32_vec)             tb="$tb elf32-i386.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
487     i860_coff_vec)               tb="$tb coff-i860.lo $coff" ;;
488     i860_elf32_vec)              tb="$tb elf32-i860.lo elf32.lo $elf" ;;
489     i860_elf32_le_vec)           tb="$tb elf32-i860.lo elf32.lo $elf" ;;
490     i960_elf32_vec)              tb="$tb elf32-i960.lo elf32.lo $elf" ;;
491     ia64_elf32_be_vec)           tb="$tb elf32-ia64.lo elfxx-ia64.lo elf32.lo $elf" ;;
492     ia64_elf32_hpux_be_vec)      tb="$tb elf32-ia64.lo elfxx-ia64.lo elf32.lo $elf" ;;
493     ia64_elf64_be_vec)           tb="$tb elf64-ia64.lo elfxx-ia64.lo elf64.lo $elf"; target_size=64 ;;
494     ia64_elf64_le_vec)           tb="$tb elf64-ia64.lo elfxx-ia64.lo elf64.lo $elf"; target_size=64 ;;
495     ia64_elf64_hpux_be_vec)      tb="$tb elf64-ia64.lo elfxx-ia64.lo elf64.lo $elf"; target_size=64 ;;
496     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 ;;
497     ia64_pei_vec)                tb="$tb pei-ia64.lo pepigen.lo $coff"; target_size=64 ;;
498     icoff_be_vec)                tb="$tb coff-i960.lo $coff" ;;
499     icoff_le_vec)                tb="$tb coff-i960.lo $coff" ;;
500     ieee_vec)                    tb="$tb ieee.lo" ;;
501     ip2k_elf32_vec)              tb="$tb elf32-ip2k.lo elf32.lo $elf" ;;
502     iq2000_elf32_vec)            tb="$tb elf32-iq2000.lo elf32.lo $elf" ;;
503     k1om_elf64_vec)              tb="$tb elf64-x86-64.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
504     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 ;;
505     l1om_elf64_vec)              tb="$tb elf64-x86-64.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
506     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 ;;
507     lm32_elf32_vec)              tb="$tb elf32-lm32.lo elf32.lo $elf" ;;
508     lm32_elf32_fdpic_vec)        tb="$tb elf32-lm32.lo elf32.lo $elf" ;;
509     m32c_elf32_vec)              tb="$tb elf32-m32c.lo elf32.lo $elf" ;;
510     m32r_elf32_vec)              tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
511     m32r_elf32_le_vec)           tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
512     m32r_elf32_linux_vec)        tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
513     m32r_elf32_linux_le_vec)     tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
514     m68hc11_elf32_vec)           tb="$tb elf32-m68hc11.lo elf32-m68hc1x.lo elf32.lo $elf" ;;
515     m68hc12_elf32_vec)           tb="$tb elf32-m68hc12.lo elf32-m68hc1x.lo elf32.lo $elf" ;;
516     m68k_aout_4knbsd_vec)        tb="$tb m68k4knetbsd.lo aout32.lo" ;;
517     m68k_aout_hp300bsd_vec)      tb="$tb hp300bsd.lo aout32.lo" ;;
518     m68k_aout_hp300hpux_vec)     tb="$tb hp300hpux.lo aout32.lo" ;;
519     m68k_aout_linux_vec)         tb="$tb m68klinux.lo aout32.lo" ;;
520     m68k_aout_nbsd_vec)          tb="$tb m68knetbsd.lo aout32.lo" ;;
521     m68k_aout_newsos3_vec)       tb="$tb newsos3.lo aout32.lo" ;;
522     m68k_coff_vec)               tb="$tb coff-m68k.lo $coff" ;;
523     m68k_coff_apollo_vec)        tb="$tb coff-apollo.lo $coffgen" ;;
524     m68k_coff_aux_vec)           tb="$tb coff-aux.lo coff-m68k.lo $coff" ;;
525     m68k_coff_sysv_vec)          tb="$tb coff-svm68k.lo $coff" ;;
526     m68k_coff_un_vec)            tb="$tb coff-u68k.lo coff-m68k.lo $coff" ;;
527     m68k_elf32_vec)              tb="$tb elf32-m68k.lo elf32.lo $elf" ;;
528     m68k_versados_vec)           tb="$tb versados.lo" ;;
529     m88k_aout_mach3_vec)         tb="$tb m88kmach3.lo aout32.lo" ;;
530     m88k_aout_obsd_vec)          tb="$tb m88kopenbsd.lo aout32.lo" ;;
531     m88k_coff_bcs_vec)           tb="$tb coff-m88k.lo $coffgen" ;;
532     m88k_elf32_vec)              tb="$tb elf32-m88k.lo elf32.lo $elf" ;;
533     mach_o_be_vec)               tb="$tb mach-o.lo dwarf2.lo" ;;
534     mach_o_le_vec)               tb="$tb mach-o.lo dwarf2.lo" ;;
535     mach_o_fat_vec)              tb="$tb mach-o.lo dwarf2.lo" ;;
536     mcore_elf32_be_vec)          tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
537     mcore_elf32_le_vec)          tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
538     mcore_pe_be_vec)             tb="$tb pe-mcore.lo peigen.lo $coff" ;;
539     mcore_pe_le_vec)             tb="$tb pe-mcore.lo peigen.lo $coff" ;;
540     mcore_pei_be_vec)            tb="$tb pei-mcore.lo peigen.lo $coff" ;;
541     mcore_pei_le_vec)            tb="$tb pei-mcore.lo peigen.lo $coff" ;;
542     mep_elf32_vec)               tb="$tb elf32-mep.lo elf32.lo $elf" ;;
543     mep_elf32_le_vec)            tb="$tb elf32-mep.lo elf32.lo $elf" ;;
544     metag_elf32_vec)             tb="$tb elf32-metag.lo elf32.lo $elf" ;;
545     microblaze_elf32_vec)        tb="$tb elf32-microblaze.lo elf32.lo $elf" ;;
546     microblaze_elf32_le_vec)     tb="$tb elf32-microblaze.lo elf32.lo $elf" ;;
547     mips_ecoff_be_vec)           tb="$tb coff-mips.lo ecoff.lo $ecoff" ;;
548     mips_ecoff_le_vec)           tb="$tb coff-mips.lo ecoff.lo $ecoff" ;;
549     mips_ecoff_bele_vec)         tb="$tb coff-mips.lo ecoff.lo $ecoff" ;;
550     mips_elf32_be_vec)           tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
551     mips_elf32_le_vec)           tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
552     mips_elf32_n_be_vec)         tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
553     mips_elf32_n_le_vec)         tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
554     mips_elf32_ntrad_be_vec)     tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
555     mips_elf32_ntrad_le_vec)     tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
556     mips_elf32_ntradfbsd_be_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
557     mips_elf32_ntradfbsd_le_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
558     mips_elf32_trad_be_vec)      tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
559     mips_elf32_trad_le_vec)      tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
560     mips_elf32_tradfbsd_be_vec)  tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
561     mips_elf32_tradfbsd_le_vec)  tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
562     mips_elf32_vxworks_be_vec)   tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
563     mips_elf32_vxworks_le_vec)   tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
564     mips_elf64_be_vec)           tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
565     mips_elf64_le_vec)           tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
566     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 ;;
567     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 ;;
568     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 ;;
569     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 ;;
570     mips_pe_le_vec)              tb="$tb pe-mips.lo peigen.lo $coff" ;;
571     mips_pei_le_vec)             tb="$tb pei-mips.lo peigen.lo $coff" ;;
572     mmix_elf64_vec)              tb="$tb elf64-mmix.lo elf64.lo $elf" target_size=64 ;;
573     mmix_mmo_vec)                        tb="$tb mmo.lo" target_size=64 ;;
574     mn10200_elf32_vec)           tb="$tb elf-m10200.lo elf32.lo $elf" ;;
575     mn10300_elf32_vec)           tb="$tb elf-m10300.lo elf32.lo $elf" ;;
576     moxie_elf32_be_vec)          tb="$tb elf32-moxie.lo elf32.lo $elf" ;;
577     moxie_elf32_le_vec)          tb="$tb elf32-moxie.lo elf32.lo $elf" ;;
578     msp430_elf32_vec)            tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
579     msp430_elf32_ti_vec)         tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
580     mt_elf32_vec)                tb="$tb elf32-mt.lo elf32.lo $elf" ;;
581     nds32_elf32_be_vec)          tb="$tb elf32-nds32.lo elf32.lo $elf" ;;
582     nds32_elf32_le_vec)          tb="$tb elf32-nds32.lo elf32.lo $elf" ;;
583     nds32_elf32_linux_be_vec)    tb="$tb elf32-nds32.lo elf32.lo $elf" ;;
584     nds32_elf32_linux_le_vec)    tb="$tb elf32-nds32.lo elf32.lo $elf" ;;
585     nios2_elf32_be_vec)          tb="$tb elf32-nios2.lo elf32.lo $elf" ;;
586     nios2_elf32_le_vec)          tb="$tb elf32-nios2.lo elf32.lo $elf" ;;
587     ns32k_aout_pc532mach_vec)    tb="$tb pc532-mach.lo aout-ns32k.lo" ;;
588     ns32k_aout_pc532nbsd_vec)    tb="$tb ns32knetbsd.lo aout-ns32k.lo" ;;
589     or1k_elf32_vec)              tb="$tb elf32-or1k.lo elf32.lo $elf" ;;
590     pdp11_aout_vec)              tb="$tb pdp11.lo" ;;
591     pef_vec)                     tb="$tb pef.lo" ;;
592     pef_xlib_vec)                tb="$tb pef.lo" ;;
593     pj_elf32_vec)                tb="$tb elf32-pj.lo elf32.lo $elf" ;;
594     pj_elf32_le_vec)             tb="$tb elf32-pj.lo elf32.lo $elf" ;;
595     plugin_vec)                  tb="$tb plugin.lo" ;;
596     powerpc_boot_vec)            tb="$tb ppcboot.lo" ;;
597     powerpc_elf32_vec)           tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
598     powerpc_elf32_le_vec)        tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
599     powerpc_elf32_fbsd_vec)      tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
600     powerpc_elf32_vxworks_vec)   tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
601     powerpc_elf64_vec)           tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
602     powerpc_elf64_le_vec)        tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
603     powerpc_elf64_fbsd_vec)      tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
604     powerpc_nlm32_vec)           tb="$tb nlm32-ppc.lo nlm32.lo nlm.lo" ;;
605     powerpc_pe_vec)              tb="$tb pe-ppc.lo peigen.lo $coff" ;;
606     powerpc_pe_le_vec)           tb="$tb pe-ppc.lo peigen.lo $coff" ;;
607     powerpc_pei_vec)             tb="$tb pei-ppc.lo peigen.lo $coff" ;;
608     powerpc_pei_le_vec)          tb="$tb pei-ppc.lo peigen.lo $coff" ;;
609     powerpc_xcoff_vec)           tb="$tb coff-rs6000.lo $xcoff" ;;
610     pru_elf32_vec)               tb="$tb elf32-pru.lo elf32.lo $elf" ;;
611     riscv_elf32_vec)             tb="$tb elf32-riscv.lo elfxx-riscv.lo elf32.lo $elf" ;;
612     riscv_elf64_vec)             tb="$tb elf64-riscv.lo elf64.lo elfxx-riscv.lo elf32.lo $elf"; target_size=64 ;;
613     rl78_elf32_vec)              tb="$tb elf32-rl78.lo elf32.lo $elf" ;;
614     rs6000_xcoff64_vec)          tb="$tb coff64-rs6000.lo aix5ppc-core.lo $xcoff"; target_size=64 ;;
615     rs6000_xcoff64_aix_vec)      tb="$tb coff64-rs6000.lo aix5ppc-core.lo $xcoff"; target_size=64 ;;
616     rs6000_xcoff_vec)            tb="$tb coff-rs6000.lo $xcoff" ;;
617     rx_elf32_be_vec)             tb="$tb elf32-rx.lo elf32.lo $elf" ;;
618     rx_elf32_be_ns_vec)          tb="$tb elf32-rx.lo elf32.lo $elf" ;;
619     rx_elf32_le_vec)             tb="$tb elf32-rx.lo elf32.lo $elf" ;;
620     s390_elf32_vec)              tb="$tb elf32-s390.lo elf32.lo $elf" ;;
621     s390_elf64_vec)              tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;;
622     score_elf32_be_vec)          tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true; target_size=64 ;;
623     score_elf32_le_vec)          tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true; target_size=64 ;;
624     sh64_elf32_vec)              tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf" target_size=64 ;;
625     sh64_elf32_le_vec)           tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf" target_size=64 ;;
626     sh64_elf32_linux_vec)        tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf" target_size=64 ;;
627     sh64_elf32_linux_be_vec)     tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf" target_size=64 ;;
628     sh64_elf32_nbsd_vec)         tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf" ;;
629     sh64_elf32_nbsd_le_vec)      tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf" ;;
630     sh64_elf64_vec)              tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
631     sh64_elf64_le_vec)           tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
632     sh64_elf64_linux_vec)        tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
633     sh64_elf64_linux_be_vec)     tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
634     sh64_elf64_nbsd_vec)         tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
635     sh64_elf64_nbsd_le_vec)      tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
636     sh_coff_vec)                 tb="$tb coff-sh.lo $coff" ;;
637     sh_coff_le_vec)              tb="$tb coff-sh.lo $coff" ;;
638     sh_coff_small_vec)           tb="$tb coff-sh.lo $coff" ;;
639     sh_coff_small_le_vec)        tb="$tb coff-sh.lo $coff" ;;
640     sh_elf32_vec)                tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
641     sh_elf32_le_vec)             tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
642     sh_elf32_fdpic_be_vec)       tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
643     sh_elf32_fdpic_le_vec)       tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
644     sh_elf32_linux_vec)          tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
645     sh_elf32_linux_be_vec)       tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
646     sh_elf32_nbsd_vec)           tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
647     sh_elf32_nbsd_le_vec)        tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
648     sh_elf32_symbian_le_vec)     tb="$tb elf32-sh-symbian.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
649     sh_elf32_vxworks_vec)        tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
650     sh_elf32_vxworks_le_vec)     tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
651     sh_pe_le_vec)                tb="$tb pe-sh.lo coff-sh.lo peigen.lo $coff" ;;
652     sh_pei_le_vec)               tb="$tb pei-sh.lo coff-sh.lo peigen.lo $coff" ;;
653     sparc_aout_le_vec)           tb="$tb aout-sparcle.lo aout32.lo" ;;
654     sparc_aout_linux_vec)        tb="$tb sparclinux.lo aout32.lo" ;;
655     sparc_aout_lynx_vec)         tb="$tb sparclynx.lo lynx-core.lo aout32.lo" ;;
656     sparc_aout_nbsd_vec)         tb="$tb sparcnetbsd.lo aout32.lo" ;;
657     sparc_aout_sunos_be_vec)     tb="$tb sunos.lo aout32.lo" ;;
658     sparc_coff_vec)              tb="$tb coff-sparc.lo $coffgen" ;;
659     sparc_coff_lynx_vec)         tb="$tb cf-sparclynx.lo lynx-core.lo $coffgen" ;;
660     sparc_elf32_vec)             tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;;
661     sparc_elf32_sol2_vec)        tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;;
662     sparc_elf32_vxworks_vec)     tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;;
663     sparc_elf64_vec)             tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
664     sparc_elf64_fbsd_vec)        tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
665     sparc_elf64_sol2_vec)        tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
666     sparc_nlm32_vec)             tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;;
667     spu_elf32_vec)               tb="$tb elf32-spu.lo elf32.lo $elf" ;;
668     sym_vec)                     tb="$tb xsym.lo" ;;
669     tic30_aout_vec)              tb="$tb aout-tic30.lo" ;;
670     tic30_coff_vec)              tb="$tb coff-tic30.lo $coffgen" ;;
671     tic4x_coff0_vec)             tb="$tb coff-tic4x.lo $coffgen" ;;
672     tic4x_coff0_beh_vec)         tb="$tb coff-tic4x.lo $coffgen" ;;
673     tic4x_coff1_vec)             tb="$tb coff-tic4x.lo $coffgen" ;;
674     tic4x_coff1_beh_vec)         tb="$tb coff-tic4x.lo $coffgen" ;;
675     tic4x_coff2_vec)             tb="$tb coff-tic4x.lo $coffgen" ;;
676     tic4x_coff2_beh_vec)         tb="$tb coff-tic4x.lo $coffgen" ;;
677     tic54x_coff0_vec)            tb="$tb coff-tic54x.lo $coffgen" ;;
678     tic54x_coff0_beh_vec)        tb="$tb coff-tic54x.lo $coffgen" ;;
679     tic54x_coff1_vec)            tb="$tb coff-tic54x.lo $coffgen" ;;
680     tic54x_coff1_beh_vec)        tb="$tb coff-tic54x.lo $coffgen" ;;
681     tic54x_coff2_vec)            tb="$tb coff-tic54x.lo $coffgen" ;;
682     tic54x_coff2_beh_vec)        tb="$tb coff-tic54x.lo $coffgen" ;;
683     tic6x_elf32_be_vec)          tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
684     tic6x_elf32_le_vec)          tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
685     tic6x_elf32_c6000_be_vec)    tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
686     tic6x_elf32_c6000_le_vec)    tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
687     tic6x_elf32_linux_be_vec)    tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
688     tic6x_elf32_linux_le_vec)    tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
689     tic80_coff_vec)              tb="$tb coff-tic80.lo $coff" ;;
690     tilegx_elf32_be_vec)         tb="$tb elf32-tilegx.lo elfxx-tilegx.lo elf32.lo $elf" ; target_size=32 ;;
691     tilegx_elf32_le_vec)         tb="$tb elf32-tilegx.lo elfxx-tilegx.lo elf32.lo $elf" ; target_size=32 ;;
692     tilegx_elf64_be_vec)         tb="$tb elf64-tilegx.lo elfxx-tilegx.lo elf64.lo $elf" ; target_size=64 ;;
693     tilegx_elf64_le_vec)         tb="$tb elf64-tilegx.lo elfxx-tilegx.lo elf64.lo $elf" ; target_size=64 ;;
694     tilepro_elf32_vec)           tb="$tb elf32-tilepro.lo elf32.lo $elf" ;;
695     v800_elf32_vec)              tb="$tb elf32-v850.lo elf32.lo $elf" ;;
696     v850_elf32_vec)              tb="$tb elf32-v850.lo elf32.lo $elf" ;;
697     vax_aout_1knbsd_vec)         tb="$tb vax1knetbsd.lo aout32.lo" ;;
698     vax_aout_bsd_vec)            tb="$tb vaxbsd.lo aout32.lo" ;;
699     vax_aout_nbsd_vec)           tb="$tb vaxnetbsd.lo aout32.lo" ;;
700     vax_elf32_vec)               tb="$tb elf32-vax.lo elf32.lo $elf" ;;
701     ft32_elf32_vec)              tb="$tb elf32-ft32.lo elf32.lo $elf" ;;
702     visium_elf32_vec)            tb="$tb elf32-visium.lo elf32.lo $elf" ;;
703     w65_coff_vec)                tb="$tb coff-w65.lo reloc16.lo $coffgen" ;;
704     wasm_vec)                    tb="$tb wasm-module.lo" ;;
705     wasm32_elf32_vec)            tb="$tb elf32-wasm32.lo elf32.lo $elf" ;;
706     we32k_coff_vec)              tb="$tb coff-we32k.lo $coffgen" ;;
707     x86_64_coff_vec)             tb="$tb coff-x86_64.lo $coff"; target_size=64 ;;
708     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 ;;
709     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 ;;
710     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 ;;
711     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 ;;
712     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 ;;
713     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 ;;
714     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 ;;
715     x86_64_mach_o_vec)           tb="$tb mach-o-x86-64.lo" ;;
716     x86_64_pe_vec)               tb="$tb pe-x86_64.lo pex64igen.lo $coff"; target_size=64 ;;
717     x86_64_pe_be_vec)            tb="$tb pe-x86_64.lo pex64igen.lo $coff"; target_size=64 ;;
718     x86_64_pei_vec)              tb="$tb pei-x86_64.lo pex64igen.lo $coff"; target_size=64 ;;
719     xc16x_elf32_vec)             tb="$tb elf32-xc16x.lo elf32.lo $elf" ;;
720     xgate_elf32_vec)             tb="$tb elf32-xgate.lo elf32.lo $elf" ;;
721     xstormy16_elf32_vec)         tb="$tb elf32-xstormy16.lo elf32.lo $elf" ;;
722     xtensa_elf32_be_vec)         tb="$tb xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;;
723     xtensa_elf32_le_vec)         tb="$tb xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;;
724     z80_coff_vec)                tb="$tb coff-z80.lo reloc16.lo $coffgen" ;;
725     z8k_coff_vec)                tb="$tb coff-z8k.lo reloc16.lo $coff" ;;
727     # These appear out of order in targets.c
728     srec_vec)                    tb="$tb srec.lo" ;;
729     symbolsrec_vec)              tb="$tb srec.lo" ;;
730     tekhex_vec)                  tb="$tb tekhex.lo" ;;
731     core_cisco_be_vec)           tb="$tb cisco-core.lo" ;;
732     core_cisco_le_vec)           tb="$tb cisco-core.lo" ;;
734     "")                          ;;
735     *) AC_MSG_ERROR(*** unknown target vector $vec) ;;
736     esac
738     if test ${target_size} = 64; then
739         target64=true
740     fi
741     if test x"${vec}" = x"${defvec}"; then
742         bfd_default_target_size=${target_size}
743     fi
744 done
746 # Target architecture .o files.
747 # A couple of CPUs use shorter file names to avoid problems on DOS
748 # filesystems.
749 ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.lo/g -e s/mn10200/m10200/ -e s/mn10300/m10300/`
751 # Weed out duplicate .o files.
752 f=""
753 for i in $tb ; do
754     case " $f " in
755     *" $i "*) ;;
756     *) f="$f $i" ;;
757     esac
758 done
759 tb="$f"
761 f=""
762 for i in $ta ; do
763     case " $f " in
764     *" $i "*) ;;
765     *) f="$f $i" ;;
766     esac
767 done
768 ta="$f"
770 bfd_backends="$tb"
771 bfd_machines="$ta"
773 if test x${all_targets} = xtrue ; then
774   bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)'
775   bfd_machines="${bfd_machines}"' $(ALL_MACHINES)'
776   selvecs=
777   havevecs=-DHAVE_all_vecs
778   selarchs=
779   test -n "$assocvecs" &&
780     assocvecs=`echo $assocvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
781 else    # all_targets is true
782   # Only set these if they will be nonempty, for the clever echo.
783   havevecs=
784   assocvecs=
785   test -n "$selvecs" &&
786     havevecs=`echo $selvecs | sed -e 's/^/-DHAVE_/' -e 's/ \(.\)/ -DHAVE_\1/g'`
787   test -n "$selvecs" &&
788     selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
789   test -n "$selarchs" &&
790     selarchs=`echo $selarchs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
791 fi      # all_targets is true
793 # 64-bit archives need a 64-bit bfd_vma.
794 if test "x$want_64_bit_archive" = xtrue; then
795   want64=true
796   AC_DEFINE(USE_64_BIT_ARCHIVE, 1,
797     [Define if 64-bit archives should always be used.])
800 case ${host64}-${target64}-${want64} in
801   *true*)
802     wordsize=64
803     bfd64_libs='$(BFD64_LIBS)'
804     all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)'
805     if test $BFD_HOST_64_BIT_DEFINED = 0; then
806       AC_MSG_WARN([You have requested a 64 bit BFD configuration, but])
807       AC_MSG_WARN([your compiler may not have a 64 bit integral type])
808     fi
809     if test -n "$GCC" ; then
810        bad_64bit_gcc=no;
811        AC_MSG_CHECKING([for gcc version with buggy 64-bit support])
812        # Add more tests for gcc versions with non-working 64-bit support here.
813        AC_EGREP_CPP([: 2 : 91 : 1 :],[:__GNUC__:__GNUC_MINOR__:__i386__:],
814                     bad_64bit_gcc=yes;
815                     AC_MSG_RESULT([yes: egcs-1.1.2 on ix86 spotted]),
816                     AC_MSG_RESULT(no))
817        if test $bad_64bit_gcc = yes ; then
818          AC_MSG_ERROR([A newer version of gcc is needed for the requested 64-bit BFD configuration])
819        fi
820     fi
821     ;;
822   false-false-false)
823     wordsize=32
824     all_backends='$(BFD32_BACKENDS)'
825     ;;
826 esac
828 tdefaults=""
829 test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
830 test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'"
831 test -n "${assocvecs}" && tdefaults="${tdefaults} -DASSOCIATED_VECS='${assocvecs}'"
832 test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'"
834 AC_SUBST(wordsize)
835 AC_SUBST(bfd64_libs)
836 AC_SUBST(all_backends)
837 AC_SUBST(bfd_backends)
838 AC_SUBST(bfd_machines)
839 AC_SUBST(bfd_default_target_size)
840 AC_SUBST(tdefaults)
841 AC_SUBST(havevecs)
843 # If we are configured native, pick a core file support file.
844 COREFILE=
845 COREFLAG=
846 CORE_HEADER=
847 TRAD_HEADER=
848 if test "${target}" = "${host}"; then
849   case "${host}" in
850   alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu | alpha*-*-*vms*)
851         COREFILE=''
852         ;;
853   alpha*-*-linux-*)
854         COREFILE=trad-core.lo
855         TRAD_HEADER='"hosts/alphalinux.h"'
856         ;;
857   alpha*-*-netbsd* | alpha*-*-openbsd*)
858         COREFILE=netbsd-core.lo
859         ;;
860   alpha*-*-*)
861         COREFILE=osf-core.lo
862         ;;
863   arm-*-freebsd* | arm-*-kfreebsd*-gnu)
864         COREFILE='' ;;
865   arm-*-netbsd* | arm-*-openbsd*)
866         COREFILE=netbsd-core.lo
867         ;;
868   arm-*-riscix)         COREFILE=trad-core.lo ;;
869   hppa*-*-hpux*)        COREFILE=hpux-core.lo ;;
870   hppa*-*-hiux*)        COREFILE=hpux-core.lo ;;
871   hppa*-*-mpeix*)       COREFILE=hpux-core.lo ;;
872   hppa*-*-bsd*)         COREFILE="hpux-core.lo hppabsd-core.lo"
873                         COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
874   hppa*-*-netbsd* | hppa*-*-openbsd*)
875         COREFILE=netbsd-core.lo
876         ;;
878   i370-*-*)
879         COREFILE=trad-core.lo
880         TRAD_HEADER='"hosts/i370linux.h"'
881         ;;
883 changequote(,)dnl
884   i[3-7]86-sequent-bsd*)
885 changequote([,])dnl
886         COREFILE=trad-core.lo
887         TRAD_HEADER='"hosts/symmetry.h"'
888         ;;
889 changequote(,)dnl
890   i[3-7]86-sequent-sysv4*) ;;
891   i[3-7]86-sequent-sysv*)
892 changequote([,])dnl
893         COREFILE=trad-core.lo
894         TRAD_HEADER='"hosts/symmetry.h"'
895         ;;
896 changequote(,)dnl
897   i[3-7]86-*-bsdi)
898 changequote([,])dnl
899         COREFILE=
900         ;;
901 changequote(,)dnl
902   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*)
903 changequote([,])dnl
904         COREFILE=trad-core.lo
905         TRAD_HEADER='"hosts/i386bsd.h"'
906         ;;
907 changequote(,)dnl
908   i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu | i[3-7]86-*-dragonfly*)
909 changequote([,])dnl
910         COREFILE=''
911         TRAD_HEADER='"hosts/i386bsd.h"'
912         ;;
913 changequote(,)dnl
914   i[3-7]86-*-netbsd* | i[3-7]86-*-knetbsd*-gnu | i[3-7]86-*-openbsd*)
915 changequote([,])dnl
916         COREFILE=netbsd-core.lo
917         ;;
918 changequote(,)dnl
919   i[3-7]86-esix-sysv3*)
920 changequote([,])dnl
921         COREFILE=trad-core.lo
922         TRAD_HEADER='"hosts/esix.h"'
923         ;;
924 changequote(,)dnl
925   i[3-7]86-*-sco3.2v5*)
926 changequote([,])dnl
927         COREFILE=sco5-core.lo
928         ;;
929 changequote(,)dnl
930   i[3-7]86-*-sco* | i[3-7]86-*-isc*)
931 changequote([,])dnl
932         COREFILE=trad-core.lo
933         TRAD_HEADER='"hosts/i386sco.h"'
934         ;;
935 changequote(,)dnl
936   i[3-7]86-*-mach3*)
937 changequote([,])dnl
938         COREFILE=trad-core.lo
939         TRAD_HEADER='"hosts/i386mach3.h"'
940         ;;
941 changequote(,)dnl
942   i[3-7]86-*-linux-*)
943 changequote([,])dnl
944         COREFILE=trad-core.lo
945         TRAD_HEADER='"hosts/i386linux.h"'
946         case "$enable_targets"-"$want64" in
947         *x86_64-*linux*|*-true)
948           CORE_HEADER='"hosts/x86-64linux.h"'
949         esac
950         ;;
951 changequote(,)dnl
952   i[3-7]86-*-isc*)      COREFILE=trad-core.lo ;;
953   i[3-7]86-*-aix*)      COREFILE=aix386-core.lo ;;
954 changequote([,])dnl
955   i860-*-mach3* | i860-*-osf1*)
956         COREFILE=trad-core.lo
957         TRAD_HEADER='"hosts/i860mach3.h"'
958         ;;
959   mips-*-netbsd* | mips*-*-openbsd*)
960         COREFILE=netbsd-core.lo
961         ;;
962   mips-dec-*)
963         COREFILE=trad-core.lo
964         TRAD_HEADER='"hosts/decstation.h"'
965         ;;
966   mips-sgi-irix4*)      COREFILE=irix-core.lo ;;
967   mips-sgi-irix5*)      COREFILE=irix-core.lo ;;
968   mips-sgi-irix6*)      COREFILE=irix-core.lo ;;
969   mips-*-sysv4*)        ;;
970   mips-*-sysv* | mips-*-riscos*)
971         COREFILE=trad-core.lo
972         TRAD_HEADER='"hosts/riscos.h"'
973         ;;
974   mips-sony-bsd*)
975         COREFILE=trad-core.lo
976         TRAD_HEADER='"hosts/news-mips.h"'
977         ;;
978   m68*-bull*-sysv*)
979         COREFILE=trad-core.lo
980         TRAD_HEADER='"hosts/dpx2.h"'
981         ;;
982   m68*-hp-hpux*)        COREFILE=hpux-core.lo ;;
983   m68*-hp-bsd*)
984         COREFILE=trad-core.lo
985         TRAD_HEADER='"hosts/hp300bsd.h"'
986         ;;
987   m68*-*-linux-*)
988         COREFILE=trad-core.lo
989         TRAD_HEADER='"hosts/m68klinux.h"'
990         ;;
991   m68*-motorola-sysv*)
992         COREFILE=trad-core.lo
993         TRAD_HEADER='"hosts/delta68.h"'
994         ;;
995   m68*-sony-*)
996         COREFILE=trad-core.lo
997         TRAD_HEADER='"hosts/news.h"'
998         ;;
999   m68*-*-netbsd* | m68*-*-openbsd*)
1000         COREFILE=netbsd-core.lo
1001         ;;
1002   m68*-apple-aux*)
1003         COREFILE=trad-core.lo
1004         TRAD_HEADER='"hosts/m68kaux.h"'
1005         ;;
1006   m88*-*-sysv4*)
1007         ;;
1008   m88*-motorola-sysv*)
1009         COREFILE=ptrace-core.lo
1010         ;;
1011   m88*-*-mach3*)
1012         COREFILE=trad-core.lo
1013         TRAD_HEADER='"hosts/m88kmach3.h"'
1014         ;;
1015   m88*-*-openbsd*)
1016         COREFILE=netbsd-core.lo
1017         ;;
1018   ns32k-pc532-mach)
1019         COREFILE=trad-core.lo
1020         TRAD_HEADER='"hosts/pc532mach.h"'
1021         ;;
1022   ns32k-*-netbsd* | ns32k-*-openbsd*)
1023         COREFILE=netbsd-core.lo
1024         ;;
1025   rs6000-*-lynx*)
1026         COREFILE=lynx-core.lo
1027         ;;
1028 changequote(,)dnl
1029   rs6000-*-aix[5-9].* | powerpc-*-aix[5-9].* | powerpc64-*-aix[5-9].*)
1030 changequote([,])dnl
1031         COREFILE=rs6000-core.lo
1032         COREFLAG="$COREFLAG -DAIX_5_CORE -DAIX_CORE_DUMPX_CORE"
1033         ;;
1034 changequote(,)dnl
1035   rs6000-*-aix4.[3-9]* | powerpc-*-aix4.[3-9]*)
1036 changequote([,])dnl
1037         COREFILE=rs6000-core.lo
1038         COREFLAG="$COREFLAG -DAIX_CORE_DUMPX_CORE"
1039         # Not all versions of AIX with -DAIX_CORE_DUMPX_CORE
1040         # have c_impl as a member of struct core_dumpx
1041         AC_MSG_CHECKING([for c_impl in struct core_dumpx])
1042         AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <core.h>]], [[struct core_dumpx c; c.c_impl = 0;]])],[AC_DEFINE(HAVE_ST_C_IMPL, 1,
1043             [Define if struct core_dumpx has member c_impl])
1044           AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
1045         ;;
1046   rs6000-*-aix4*)       COREFILE=rs6000-core.lo ;;
1047   rs6000-*-*)           COREFILE=rs6000-core.lo ;;
1048   powerpc64-*-aix*)     COREFILE=rs6000-core.lo ;;
1049   powerpc-*-aix4*)      COREFILE=rs6000-core.lo ;;
1050   powerpc-*-aix*)       COREFILE=rs6000-core.lo ;;
1051   powerpc-*-beos*)      ;;
1052   powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu)
1053                         COREFILE='' ;;
1054   powerpc-*-netbsd*)    COREFILE=netbsd-core.lo ;;
1055   powerpc-*-*bsd*)      COREFILE=netbsd-core.lo ;;
1056   s390*-*-*)            COREFILE=trad-core.lo ;;
1057   sh*-*-netbsd* | sh*-*-openbsd*)
1058         COREFILE=netbsd-core.lo
1059         ;;
1060   sparc-*-netbsd* | sparc*-*-openbsd*)
1061         COREFILE=netbsd-core.lo
1062         ;;
1063   tahoe-*-*)
1064         COREFILE=trad-core.lo
1065         TRAD_HEADER='"hosts/tahoe.h"'
1066         ;;
1067   vax-*-netbsd* | vax-*-openbsd*)
1068         COREFILE=netbsd-core.lo
1069         ;;
1070   vax-*-ultrix2*)
1071         COREFILE=trad-core.lo
1072         TRAD_HEADER='"hosts/vaxult2.h"'
1073         ;;
1074   vax-*-ultrix*)
1075         COREFILE=trad-core.lo
1076         TRAD_HEADER='"hosts/vaxult2.h"'
1077         ;;
1078   vax-*-linux-*)
1079         COREFILE=trad-core.lo
1080         TRAD_HEADER='"hosts/vaxlinux.h"'
1081         ;;
1082   vax-*-*)
1083         COREFILE=trad-core.lo
1084         TRAD_HEADER='"hosts/vaxbsd.h"'
1085         ;;
1086   x86_64-*-linux*)
1087         CORE_HEADER='"hosts/x86-64linux.h"'
1088         ;;
1089   x86_64-*-netbsd* | x86_64-*-openbsd*)
1090         COREFILE=netbsd-core.lo
1091         ;;
1092   esac
1094   case "$COREFILE" in
1095   aix386-core.lo)       COREFLAG=-DAIX386_CORE ;;
1096   hppabsd-core.lo)      COREFLAG=-DHPPABSD_CORE ;;
1097   hpux-core.lo)         COREFLAG=-DHPUX_CORE ;;
1098   irix-core.lo)         COREFLAG=-DIRIX_CORE ;;
1099   lynx-core.lo)         COREFLAG=-DLYNX_CORE ;;
1100   netbsd-core.lo)       COREFLAG=-DNETBSD_CORE ;;
1101   osf-core.lo)          COREFLAG=-DOSF_CORE ;;
1102   ptrace-core.lo)       COREFLAG=-DPTRACE_CORE ;;
1103   rs6000-core.lo)       COREFLAG="$COREFLAG -DAIX_CORE" ;;
1104   sco5-core.lo)         COREFLAG="$COREFLAG -DSCO5_CORE" ;;
1105   trad-core.lo)         COREFLAG="$COREFLAG -DTRAD_CORE" ;;
1106   esac
1108   # ELF corefile support has several flavors, but all of
1109   # them use something called <sys/procfs.h>
1110   AC_CHECK_HEADERS(sys/procfs.h)
1111   if test "$ac_cv_header_sys_procfs_h" = yes; then
1112     BFD_HAVE_SYS_PROCFS_TYPE(prstatus_t)
1113     BFD_HAVE_SYS_PROCFS_TYPE(prstatus32_t)
1114     BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prstatus_t, pr_who)
1115     BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prstatus32_t, pr_who)
1116     BFD_HAVE_SYS_PROCFS_TYPE(pstatus_t)
1117     BFD_HAVE_SYS_PROCFS_TYPE(pxstatus_t)
1118     BFD_HAVE_SYS_PROCFS_TYPE(pstatus32_t)
1119     BFD_HAVE_SYS_PROCFS_TYPE(prpsinfo_t)
1120     BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prpsinfo_t, pr_pid)
1121     BFD_HAVE_SYS_PROCFS_TYPE(prpsinfo32_t)
1122     BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prpsinfo32_t, pr_pid)
1123     BFD_HAVE_SYS_PROCFS_TYPE(psinfo_t)
1124     BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(psinfo_t, pr_pid)
1125     BFD_HAVE_SYS_PROCFS_TYPE(psinfo32_t)
1126     BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(psinfo32_t, pr_pid)
1127     BFD_HAVE_SYS_PROCFS_TYPE(lwpstatus_t)
1128     BFD_HAVE_SYS_PROCFS_TYPE(lwpxstatus_t)
1129     BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_context)
1130     BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_reg)
1131     BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_fpreg)
1132     BFD_HAVE_SYS_PROCFS_TYPE(win32_pstatus_t)
1133   fi
1135 AC_SUBST(COREFILE)
1136 AC_SUBST(COREFLAG)
1137 if test -n "$CORE_HEADER"; then
1138   AC_DEFINE_UNQUOTED(CORE_HEADER, $CORE_HEADER,
1139     [Name of host specific core header file to include in elf.c.])
1141 if test -n "$TRAD_HEADER"; then
1142   AC_DEFINE_UNQUOTED(TRAD_HEADER, $TRAD_HEADER,
1143     [Name of host specific header file to include in trad-core.c.])
1146 if test "$plugins" = "yes"; then
1147   supports_plugins=1
1148 else
1149   supports_plugins=0
1151 AC_SUBST(supports_plugins)
1152 AC_SUBST(lt_cv_dlopen_libs)
1154 # Determine the host dependent file_ptr a.k.a. off_t type.  In order
1155 # prefer: off64_t - if ftello64 and fseeko64, off_t - if ftello and
1156 # fseeko, long.  This assumes that sizeof off_t is .ge. sizeof long.
1157 # Hopefully a reasonable assumption since fseeko et.al. should be
1158 # upward compatible.
1159 AC_CHECK_FUNCS(ftello ftello64 fseeko fseeko64 fopen64)
1160 if test x"$ac_cv_func_ftello" = xyes -a x"$ac_cv_func_fseeko" = xyes; then
1161     AC_CHECK_SIZEOF(off_t)
1163 AC_MSG_CHECKING([file_ptr type])
1164 bfd_file_ptr="long"
1165 bfd_ufile_ptr="unsigned long"
1166 if test x"$ac_cv_func_ftello64" = xyes -a x"$ac_cv_func_fseeko64" = xyes \
1167         -o x"${ac_cv_sizeof_off_t}" = x8; then
1168     bfd_file_ptr=BFD_HOST_64_BIT
1169     bfd_ufile_ptr=BFD_HOST_U_64_BIT
1171 AC_MSG_RESULT($bfd_file_ptr)
1172 AC_SUBST(bfd_file_ptr)
1173 AC_SUBST(bfd_ufile_ptr)
1175 dnl AC_CHECK_HEADERS(sys/mman.h)
1176 AC_FUNC_MMAP
1177 AC_CHECK_FUNCS(madvise mprotect)
1178 case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in
1179   true+yes )  AC_DEFINE(USE_MMAP, 1, [Use mmap if it's available?]) ;;
1180 esac
1182 rm -f doc/config.status
1183 AC_CONFIG_FILES([Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in])
1185 dnl We need this duplication, even though we use AM_PO_SUBDIRS, because of
1186 dnl our two separate POTFILES.  Yuck.
1187 AC_CONFIG_COMMANDS([default],
1189 case "$srcdir" in
1190   .) srcdirpre= ;;
1191   *) srcdirpre='$(srcdir)/' ;;
1192 esac
1193 POFILES=
1194 GMOFILES=
1195 for lang in dummy $OBSOLETE_ALL_LINGUAS; do
1196   if test $lang != dummy; then
1197     POFILES="$POFILES $srcdirpre$lang.po"
1198     GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
1199   fi
1200 done
1201 sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' \
1202     -e '/BLD-POTFILES =/r po/BLD-POTFILES' \
1203     -e "s,@POFILES@,$POFILES," \
1204     -e "s,@GMOFILES@,$GMOFILES," \
1205     po/Makefile.in > po/Makefile]],[[]])
1207 dnl Required by html, pdf, install-pdf and install-html
1208 AC_SUBST(datarootdir)
1209 AC_SUBST(docdir)
1210 AC_SUBST(htmldir)
1211 AC_SUBST(pdfdir)
1213 AC_OUTPUT