Remove m88k support
[external/binutils.git] / bfd / configure.ac
1 dnl Process this file with autoconf to produce a configure script.
2 dnl
3 dnl   Copyright (C) 2012-2018 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
19
20 AC_PREREQ(2.59)
21 m4_include([version.m4])
22 AC_INIT([bfd], BFD_VERSION)
23 AC_CONFIG_SRCDIR([libbfd.c])
24
25 AC_CANONICAL_TARGET
26 AC_ISC_POSIX
27
28 AM_INIT_AUTOMAKE
29
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, :)
34
35 dnl Default to a non shared library.  This may be overridden by the
36 dnl configure option --enable-shared.
37 AC_DISABLE_SHARED
38
39 AC_PROG_CC
40 AC_GNU_SOURCE
41 AC_USE_SYSTEM_EXTENSIONS
42
43 LT_INIT([dlopen])
44
45 # AC_PLUGINS setting $plugins is called by ACX_LARGEFILE.
46 ACX_LARGEFILE
47
48 AM_CONDITIONAL(PLUGINS, test "$plugins" = "yes")
49
50 if test "$plugins" = "yes"; then
51   enable_targets="$enable_targets plugin"
52 fi
53
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
61
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
70
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
79
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
87
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])
98 fi
99
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 ;;
108 esac])
109 # Enable -z separate-code by default for Linux/x86.
110 case "${target}" in
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
114   fi
115   ;;
116 esac
117 if test "${ac_default_ld_z_separate_code}" = unset; then
118   ac_default_ld_z_separate_code=0
119 fi
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.])
123
124 AC_ARG_ENABLE(leading-mingw64-underscores,
125   AS_HELP_STRING([--enable-leading-mingw64-underscores],
126                  [Enable leading underscores on 64 bit mingw targets]),
127   [],[])
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])])
131
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}"])
137 AC_SUBST(DEBUGDIR)
138
139 ACX_PKGVERSION([GNU Binutils])
140 ACX_BUGURL([http://www.sourceware.org/bugzilla/])
141
142 AM_BINUTILS_WARNINGS
143
144 AC_CONFIG_HEADERS(config.h:config.in)
145
146 # PR 14072
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
152 #endif
153 #define __CONFIG_H__ 1])
154
155 if test -z "$target" ; then
156     AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
157 fi
158
159 AM_MAINTAINER_MODE
160 AM_CONDITIONAL(GENINSRC_NEVER, false)
161 AM_INSTALL_LIBBFD
162 AC_EXEEXT
163
164 host64=false
165 target64=false
166 bfd_default_target_size=32
167
168 # host stuff:
169
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
172 AM_PO_SUBDIRS
173
174 # Permit host specific settings.
175 . ${srcdir}/configure.host
176
177 AC_SUBST(HDEFINES)
178 AC_PROG_INSTALL
179
180 BFD_HOST_64BIT_LONG=0
181 BFD_HOST_64BIT_LONG_LONG=0
182 BFD_HOST_64_BIT_DEFINED=0
183 BFD_HOST_64_BIT=
184 BFD_HOST_U_64_BIT=
185 BFD_HOSTPTR_T="unsigned long"
186
187 AC_TYPE_LONG_DOUBLE
188 AC_CHECK_TYPES([long long], [AC_CHECK_SIZEOF(long long)])
189 AC_CHECK_SIZEOF(void *)
190 AC_CHECK_SIZEOF(long)
191
192 if test "x${ac_cv_sizeof_void_p}" = "x8"; then
193   host64=true
194 fi
195
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"
206   fi
207 fi
208
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}"
213 fi
214
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)
221
222 BFD_CC_FOR_BUILD
223
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)
227 AC_HEADER_TIME
228 AC_HEADER_DIRENT
229
230 ACX_HEADER_STRING
231 AC_CHECK_FUNCS(fcntl getpagesize setitimer sysconf fdopen getuid getgid fileno)
232 AC_CHECK_FUNCS(strtoull getrlimit)
233
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)
239
240 BFD_BINARY_FOPEN
241
242 AC_CHECK_DECLS(ffs)
243 AC_CHECK_DECLS(free)
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)
254
255 # Link in zlib if we can.  This allows us to read compressed debug sections.
256 # This is used only by compress.c.
257 AM_ZLIB
258
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
264         fi
265         ])
266
267 LT_LIB_M
268
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
271 # libbfd references.
272 # We can't do that if a pic libiberty is unavailable since including non-pic
273 # code would insert text relocations into libbfd.
274 SHARED_LIBADD=
275 SHARED_LDFLAGS=
276 if test "$enable_shared" = "yes"; then
277 changequote(,)dnl
278   x=`sed -n -e 's/^[    ]*PICFLAG[      ]*=[    ]*//p' < ../libiberty/Makefile | sed -n '$p'`
279 changequote([,])dnl
280   if test -n "$x"; then
281     SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty"
282   fi
283
284 # More hacks to build DLLs on Windows.
285   case "${host}" in
286   *-*-cygwin*)
287     SHARED_LDFLAGS="-no-undefined"
288     SHARED_LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32"
289   ;;
290
291   # Hack to build or1k-src on OSX
292   or1k*-*-darwin*)
293     SHARED_LIBADD="-L`pwd`/../libiberty/pic -L`pwd`/../intl -liberty -lintl"
294   ;;
295   esac
296
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"
303       else
304         SHARED_LIBADD="$SHARED_LIBADD $LIBM"
305       fi
306     fi
307   fi
308 fi
309 AC_SUBST(SHARED_LDFLAGS)
310 AC_SUBST(SHARED_LIBADD)
311
312 # target stuff:
313
314 # Canonicalize the secondary target names.
315 if test -n "$enable_targets" ; then
316     for targ in `echo $enable_targets | sed 's/,/ /g'`
317     do
318         result=`$ac_config_sub $targ 2>/dev/null`
319         if test -n "$result" ; then
320             canon_targets="$canon_targets $result"
321         else
322             # Allow targets that config.sub doesn't recognize, like "all".
323             canon_targets="$canon_targets $targ"
324         fi
325     done
326 fi
327
328 all_targets=false
329 defvec=
330 selvecs=
331 assocvecs=
332 selarchs=
333 TDEFINES=
334 for targ in $target $canon_targets
335 do
336     if test "x$targ" = "xall"; then
337         all_targets=true
338         assocvecs="$assocvecs $targ_defvec $targ_selvecs"
339     else
340         . $srcdir/config.bfd
341         if test "x$targ" = "x$target"; then
342             defvec=$targ_defvec
343         fi
344         selvecs="$selvecs $targ_defvec $targ_selvecs"
345         selarchs="$selarchs $targ_archs"
346         TDEFINES="$TDEFINES $targ_cflags"
347     fi
348 done
349 AC_SUBST(TDEFINES)
350
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
356 # used.
357
358 # uniq the default and selected vectors in all the configured targets.
359 f=""
360 for i in $selvecs ; do
361     case " $f " in
362     *" $i "*) ;;
363     *) f="$f $i" ;;
364     esac
365 done
366 selvecs="$f"
367
368
369 # uniq the associated vectors in all the configured targets.
370 f=""
371 for i in $assocvecs ; do
372     case " $f " in
373     *" $i "*) ;;
374     *) f="$f $i" ;;
375     esac
376 done
377 assocvecs="$f"
378
379
380 # uniq the architectures in all the configured targets.
381 f=""
382 for i in $selarchs ; do
383     case " $f " in
384     *" $i "*) ;;
385     *) f="$f $i" ;;
386     esac
387 done
388 selarchs="$f"
389
390 # Target backend .o files.
391 tb=
392
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"
399
400 for vec in $selvecs
401 do
402     target_size=32
403     case "$vec" in
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_epoc_be_vec)          tb="$tb epoc-pe-arm.lo peigen.lo $coff" ;;
442     arm_pe_epoc_le_vec)          tb="$tb epoc-pe-arm.lo peigen.lo $coff" ;;
443     arm_pe_wince_be_vec)         tb="$tb pe-arm-wince.lo pe-arm.lo peigen.lo $coff" ;;
444     arm_pe_wince_le_vec)         tb="$tb pe-arm-wince.lo pe-arm.lo peigen.lo $coff" ;;
445     arm_pei_be_vec)              tb="$tb pei-arm.lo peigen.lo $coff" ;;
446     arm_pei_le_vec)              tb="$tb pei-arm.lo peigen.lo $coff" ;;
447     arm_pei_epoc_be_vec)         tb="$tb epoc-pei-arm.lo peigen.lo $coff" ;;
448     arm_pei_epoc_le_vec)         tb="$tb epoc-pei-arm.lo peigen.lo $coff" ;;
449     arm_pei_wince_be_vec)        tb="$tb pei-arm-wince.lo pei-arm.lo peigen.lo $coff" ;;
450     arm_pei_wince_le_vec)        tb="$tb pei-arm-wince.lo pei-arm.lo peigen.lo $coff" ;;
451     arm_mach_o_vec)              tb="$tb mach-o-arm.lo" ;;
452     avr_elf32_vec)               tb="$tb elf32-avr.lo elf32.lo $elf" ;;
453     bfin_elf32_vec)              tb="$tb elf32-bfin.lo elf32.lo $elf" ;;
454     bfin_elf32_fdpic_vec)        tb="$tb elf32-bfin.lo elf32.lo $elf" ;;
455     cr16_elf32_vec)              tb="$tb elf32-cr16.lo elf32.lo $elf" ;;
456     cr16c_elf32_vec)             tb="$tb elf32-cr16c.lo elf32.lo $elf" ;;
457     cris_aout_vec)               tb="$tb aout-cris.lo" ;;
458     cris_elf32_vec)              tb="$tb elf32-cris.lo elf32.lo $elf" ;;
459     cris_elf32_us_vec)           tb="$tb elf32-cris.lo elf32.lo $elf" ;;
460     crx_elf32_vec)               tb="$tb elf32-crx.lo elf32.lo $elf" ;;
461     d10v_elf32_vec)              tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
462     d30v_elf32_vec)              tb="$tb elf32-d30v.lo elf32.lo $elf" ;;
463     dlx_elf32_be_vec)            tb="$tb elf32-dlx.lo elf32.lo $elf" ;;
464     elf32_be_vec)                tb="$tb elf32-gen.lo elf32.lo $elf" ;;
465     elf32_le_vec)                tb="$tb elf32-gen.lo elf32.lo $elf" ;;
466     elf64_be_vec)                tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
467     elf64_le_vec)                tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
468     epiphany_elf32_vec)          tb="$tb elf32-epiphany.lo elf32.lo $elf" ;;
469     fr30_elf32_vec)              tb="$tb elf32-fr30.lo elf32.lo $elf" ;;
470     frv_elf32_vec)               tb="$tb elf32-frv.lo elf32.lo $elf" ;;
471     frv_elf32_fdpic_vec)         tb="$tb elf32-frv.lo elf32.lo $elf" ;;
472     h8300_elf32_vec)             tb="$tb elf32-h8300.lo elf32.lo $elf" ;;
473     h8300_elf32_linux_vec)       tb="$tb elf32-h8300.lo elf32.lo $elf" ;;
474     hppa_elf32_vec)              tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
475     hppa_elf32_linux_vec)        tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
476     hppa_elf32_nbsd_vec)         tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
477     hppa_elf64_vec)              tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;;
478     hppa_elf64_linux_vec)        tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;;
479     hppa_som_vec)                tb="$tb som.lo" ;;
480     i386_aout_vec)               tb="$tb i386aout.lo aout32.lo" ;;
481     i386_aout_bsd_vec)           tb="$tb i386bsd.lo aout32.lo" ;;
482     i386_aout_dynix_vec)         tb="$tb i386dynix.lo aout32.lo" ;;
483     i386_aout_fbsd_vec)          tb="$tb i386freebsd.lo aout32.lo" ;;
484     i386_aout_linux_vec)         tb="$tb i386linux.lo aout32.lo" ;;
485     i386_aout_lynx_vec)          tb="$tb i386lynx.lo lynx-core.lo aout32.lo" ;;
486     i386_aout_mach3_vec)         tb="$tb i386mach3.lo aout32.lo" ;;
487     i386_aout_nbsd_vec)          tb="$tb i386netbsd.lo aout32.lo" ;;
488     i386_aout_os9k_vec)          tb="$tb i386os9k.lo aout32.lo" ;;
489     i386_coff_vec)               tb="$tb coff-i386.lo $coff" ;;
490     i386_coff_go32_vec)          tb="$tb coff-go32.lo $coff" ;;
491     i386_coff_go32stubbed_vec)   tb="$tb coff-stgo32.lo $coff" ;;
492     i386_coff_lynx_vec)          tb="$tb cf-i386lynx.lo lynx-core.lo $coff" ;;
493     i386_elf32_vec)              tb="$tb elf32-i386.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
494     i386_elf32_fbsd_vec)         tb="$tb elf32-i386.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
495     i386_elf32_nacl_vec)         tb="$tb elf32-i386.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
496     i386_elf32_sol2_vec)         tb="$tb elf32-i386.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
497     i386_elf32_vxworks_vec)      tb="$tb elf32-i386.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
498     i386_mach_o_vec)             tb="$tb mach-o-i386.lo" ;;
499     i386_msdos_vec)              tb="$tb i386msdos.lo" ;;
500     i386_pe_vec)                 tb="$tb pe-i386.lo peigen.lo $coff" ;;
501     i386_pei_vec)                tb="$tb pei-i386.lo peigen.lo $coff" ;;
502     iamcu_elf32_vec)             tb="$tb elf32-i386.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
503     ia64_elf32_be_vec)           tb="$tb elf32-ia64.lo elfxx-ia64.lo elf32.lo $elf" ;;
504     ia64_elf32_hpux_be_vec)      tb="$tb elf32-ia64.lo elfxx-ia64.lo elf32.lo $elf" ;;
505     ia64_elf64_be_vec)           tb="$tb elf64-ia64.lo elfxx-ia64.lo elf64.lo $elf"; target_size=64 ;;
506     ia64_elf64_le_vec)           tb="$tb elf64-ia64.lo elfxx-ia64.lo elf64.lo $elf"; target_size=64 ;;
507     ia64_elf64_hpux_be_vec)      tb="$tb elf64-ia64.lo elfxx-ia64.lo elf64.lo $elf"; target_size=64 ;;
508     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 ;;
509     ia64_pei_vec)                tb="$tb pei-ia64.lo pepigen.lo $coff"; target_size=64 ;;
510     ip2k_elf32_vec)              tb="$tb elf32-ip2k.lo elf32.lo $elf" ;;
511     iq2000_elf32_vec)            tb="$tb elf32-iq2000.lo elf32.lo $elf" ;;
512     k1om_elf64_vec)              tb="$tb elf64-x86-64.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
513     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 ;;
514     l1om_elf64_vec)              tb="$tb elf64-x86-64.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
515     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 ;;
516     lm32_elf32_vec)              tb="$tb elf32-lm32.lo elf32.lo $elf" ;;
517     lm32_elf32_fdpic_vec)        tb="$tb elf32-lm32.lo elf32.lo $elf" ;;
518     m32c_elf32_vec)              tb="$tb elf32-m32c.lo elf32.lo $elf" ;;
519     m32r_elf32_vec)              tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
520     m32r_elf32_le_vec)           tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
521     m32r_elf32_linux_vec)        tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
522     m32r_elf32_linux_le_vec)     tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
523     m68hc11_elf32_vec)           tb="$tb elf32-m68hc11.lo elf32-m68hc1x.lo elf32.lo $elf" ;;
524     m68hc12_elf32_vec)           tb="$tb elf32-m68hc12.lo elf32-m68hc1x.lo elf32.lo $elf" ;;
525     m68k_aout_4knbsd_vec)        tb="$tb m68k4knetbsd.lo aout32.lo" ;;
526     m68k_aout_hp300bsd_vec)      tb="$tb hp300bsd.lo aout32.lo" ;;
527     m68k_aout_hp300hpux_vec)     tb="$tb hp300hpux.lo aout32.lo" ;;
528     m68k_aout_linux_vec)         tb="$tb m68klinux.lo aout32.lo" ;;
529     m68k_aout_nbsd_vec)          tb="$tb m68knetbsd.lo aout32.lo" ;;
530     m68k_coff_vec)               tb="$tb coff-m68k.lo $coff" ;;
531     m68k_coff_apollo_vec)        tb="$tb coff-apollo.lo $coffgen" ;;
532     m68k_coff_aux_vec)           tb="$tb coff-aux.lo coff-m68k.lo $coff" ;;
533     m68k_coff_sysv_vec)          tb="$tb coff-svm68k.lo $coff" ;;
534     m68k_coff_un_vec)            tb="$tb coff-u68k.lo coff-m68k.lo $coff" ;;
535     m68k_elf32_vec)              tb="$tb elf32-m68k.lo elf32.lo $elf" ;;
536     m68k_versados_vec)           tb="$tb versados.lo" ;;
537     mach_o_be_vec)               tb="$tb mach-o.lo dwarf2.lo" ;;
538     mach_o_le_vec)               tb="$tb mach-o.lo dwarf2.lo" ;;
539     mach_o_fat_vec)              tb="$tb mach-o.lo dwarf2.lo" ;;
540     mcore_elf32_be_vec)          tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
541     mcore_elf32_le_vec)          tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
542     mcore_pe_be_vec)             tb="$tb pe-mcore.lo peigen.lo $coff" ;;
543     mcore_pe_le_vec)             tb="$tb pe-mcore.lo peigen.lo $coff" ;;
544     mcore_pei_be_vec)            tb="$tb pei-mcore.lo peigen.lo $coff" ;;
545     mcore_pei_le_vec)            tb="$tb pei-mcore.lo peigen.lo $coff" ;;
546     mep_elf32_vec)               tb="$tb elf32-mep.lo elf32.lo $elf" ;;
547     mep_elf32_le_vec)            tb="$tb elf32-mep.lo elf32.lo $elf" ;;
548     metag_elf32_vec)             tb="$tb elf32-metag.lo elf32.lo $elf" ;;
549     microblaze_elf32_vec)        tb="$tb elf32-microblaze.lo elf32.lo $elf" ;;
550     microblaze_elf32_le_vec)     tb="$tb elf32-microblaze.lo elf32.lo $elf" ;;
551     mips_ecoff_be_vec)           tb="$tb coff-mips.lo ecoff.lo $ecoff" ;;
552     mips_ecoff_le_vec)           tb="$tb coff-mips.lo ecoff.lo $ecoff" ;;
553     mips_ecoff_bele_vec)         tb="$tb coff-mips.lo ecoff.lo $ecoff" ;;
554     mips_elf32_be_vec)           tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
555     mips_elf32_le_vec)           tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
556     mips_elf32_n_be_vec)         tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
557     mips_elf32_n_le_vec)         tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
558     mips_elf32_ntrad_be_vec)     tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
559     mips_elf32_ntrad_le_vec)     tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
560     mips_elf32_ntradfbsd_be_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
561     mips_elf32_ntradfbsd_le_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
562     mips_elf32_trad_be_vec)      tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
563     mips_elf32_trad_le_vec)      tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
564     mips_elf32_tradfbsd_be_vec)  tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
565     mips_elf32_tradfbsd_le_vec)  tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
566     mips_elf32_vxworks_be_vec)   tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
567     mips_elf32_vxworks_le_vec)   tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff" ;;
568     mips_elf64_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_le_vec)           tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf $ecoff"; target_size=64 ;;
570     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 ;;
571     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 ;;
572     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 ;;
573     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 ;;
574     mips_pe_le_vec)              tb="$tb pe-mips.lo peigen.lo $coff" ;;
575     mips_pei_le_vec)             tb="$tb pei-mips.lo peigen.lo $coff" ;;
576     mmix_elf64_vec)              tb="$tb elf64-mmix.lo elf64.lo $elf" target_size=64 ;;
577     mmix_mmo_vec)                        tb="$tb mmo.lo" target_size=64 ;;
578     mn10200_elf32_vec)           tb="$tb elf-m10200.lo elf32.lo $elf" ;;
579     mn10300_elf32_vec)           tb="$tb elf-m10300.lo elf32.lo $elf" ;;
580     moxie_elf32_be_vec)          tb="$tb elf32-moxie.lo elf32.lo $elf" ;;
581     moxie_elf32_le_vec)          tb="$tb elf32-moxie.lo elf32.lo $elf" ;;
582     msp430_elf32_vec)            tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
583     msp430_elf32_ti_vec)         tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
584     mt_elf32_vec)                tb="$tb elf32-mt.lo elf32.lo $elf" ;;
585     nds32_elf32_be_vec)          tb="$tb elf32-nds32.lo elf32.lo $elf" ;;
586     nds32_elf32_le_vec)          tb="$tb elf32-nds32.lo elf32.lo $elf" ;;
587     nds32_elf32_linux_be_vec)    tb="$tb elf32-nds32.lo elf32.lo $elf" ;;
588     nds32_elf32_linux_le_vec)    tb="$tb elf32-nds32.lo elf32.lo $elf" ;;
589     nios2_elf32_be_vec)          tb="$tb elf32-nios2.lo elf32.lo $elf" ;;
590     nios2_elf32_le_vec)          tb="$tb elf32-nios2.lo elf32.lo $elf" ;;
591     ns32k_aout_pc532mach_vec)    tb="$tb pc532-mach.lo aout-ns32k.lo" ;;
592     ns32k_aout_pc532nbsd_vec)    tb="$tb ns32knetbsd.lo aout-ns32k.lo" ;;
593     or1k_elf32_vec)              tb="$tb elf32-or1k.lo elf32.lo $elf" ;;
594     pdp11_aout_vec)              tb="$tb pdp11.lo" ;;
595     pef_vec)                     tb="$tb pef.lo" ;;
596     pef_xlib_vec)                tb="$tb pef.lo" ;;
597     pj_elf32_vec)                tb="$tb elf32-pj.lo elf32.lo $elf" ;;
598     pj_elf32_le_vec)             tb="$tb elf32-pj.lo elf32.lo $elf" ;;
599     plugin_vec)                  tb="$tb plugin.lo" ;;
600     powerpc_boot_vec)            tb="$tb ppcboot.lo" ;;
601     powerpc_elf32_vec)           tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
602     powerpc_elf32_le_vec)        tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
603     powerpc_elf32_fbsd_vec)      tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
604     powerpc_elf32_vxworks_vec)   tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
605     powerpc_elf64_vec)           tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
606     powerpc_elf64_le_vec)        tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
607     powerpc_elf64_fbsd_vec)      tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
608     powerpc_pe_vec)              tb="$tb pe-ppc.lo peigen.lo $coff" ;;
609     powerpc_pe_le_vec)           tb="$tb pe-ppc.lo peigen.lo $coff" ;;
610     powerpc_pei_vec)             tb="$tb pei-ppc.lo peigen.lo $coff" ;;
611     powerpc_pei_le_vec)          tb="$tb pei-ppc.lo peigen.lo $coff" ;;
612     powerpc_xcoff_vec)           tb="$tb coff-rs6000.lo $xcoff" ;;
613     pru_elf32_vec)               tb="$tb elf32-pru.lo elf32.lo $elf" ;;
614     riscv_elf32_vec)             tb="$tb elf32-riscv.lo elfxx-riscv.lo elf32.lo $elf" ;;
615     riscv_elf64_vec)             tb="$tb elf64-riscv.lo elf64.lo elfxx-riscv.lo elf32.lo $elf"; target_size=64 ;;
616     rl78_elf32_vec)              tb="$tb elf32-rl78.lo elf32.lo $elf" ;;
617     rs6000_xcoff64_vec)          tb="$tb coff64-rs6000.lo aix5ppc-core.lo $xcoff"; target_size=64 ;;
618     rs6000_xcoff64_aix_vec)      tb="$tb coff64-rs6000.lo aix5ppc-core.lo $xcoff"; target_size=64 ;;
619     rs6000_xcoff_vec)            tb="$tb coff-rs6000.lo $xcoff" ;;
620     rx_elf32_be_vec)             tb="$tb elf32-rx.lo elf32.lo $elf" ;;
621     rx_elf32_be_ns_vec)          tb="$tb elf32-rx.lo elf32.lo $elf" ;;
622     rx_elf32_le_vec)             tb="$tb elf32-rx.lo elf32.lo $elf" ;;
623     s390_elf32_vec)              tb="$tb elf32-s390.lo elf32.lo $elf" ;;
624     s390_elf64_vec)              tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;;
625     score_elf32_be_vec)          tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true; target_size=64 ;;
626     score_elf32_le_vec)          tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true; target_size=64 ;;
627     sh64_elf32_vec)              tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf" target_size=64 ;;
628     sh64_elf32_le_vec)           tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf" target_size=64 ;;
629     sh64_elf32_linux_vec)        tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf" target_size=64 ;;
630     sh64_elf32_linux_be_vec)     tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf" target_size=64 ;;
631     sh64_elf32_nbsd_vec)         tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf" ;;
632     sh64_elf32_nbsd_le_vec)      tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf" ;;
633     sh64_elf64_vec)              tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
634     sh64_elf64_le_vec)           tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
635     sh64_elf64_linux_vec)        tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
636     sh64_elf64_linux_be_vec)     tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
637     sh64_elf64_nbsd_vec)         tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
638     sh64_elf64_nbsd_le_vec)      tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
639     sh_coff_vec)                 tb="$tb coff-sh.lo $coff" ;;
640     sh_coff_le_vec)              tb="$tb coff-sh.lo $coff" ;;
641     sh_coff_small_vec)           tb="$tb coff-sh.lo $coff" ;;
642     sh_coff_small_le_vec)        tb="$tb coff-sh.lo $coff" ;;
643     sh_elf32_vec)                tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
644     sh_elf32_le_vec)             tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
645     sh_elf32_fdpic_be_vec)       tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
646     sh_elf32_fdpic_le_vec)       tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
647     sh_elf32_linux_vec)          tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
648     sh_elf32_linux_be_vec)       tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
649     sh_elf32_nbsd_vec)           tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
650     sh_elf32_nbsd_le_vec)        tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
651     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" ;;
652     sh_elf32_vxworks_vec)        tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
653     sh_elf32_vxworks_le_vec)     tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo $coff" ;;
654     sh_pe_le_vec)                tb="$tb pe-sh.lo coff-sh.lo peigen.lo $coff" ;;
655     sh_pei_le_vec)               tb="$tb pei-sh.lo coff-sh.lo peigen.lo $coff" ;;
656     sparc_aout_le_vec)           tb="$tb aout-sparcle.lo aout32.lo" ;;
657     sparc_aout_linux_vec)        tb="$tb sparclinux.lo aout32.lo" ;;
658     sparc_aout_lynx_vec)         tb="$tb sparclynx.lo lynx-core.lo aout32.lo" ;;
659     sparc_aout_nbsd_vec)         tb="$tb sparcnetbsd.lo aout32.lo" ;;
660     sparc_aout_sunos_be_vec)     tb="$tb sunos.lo aout32.lo" ;;
661     sparc_coff_vec)              tb="$tb coff-sparc.lo $coffgen" ;;
662     sparc_coff_lynx_vec)         tb="$tb cf-sparclynx.lo lynx-core.lo $coffgen" ;;
663     sparc_elf32_vec)             tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;;
664     sparc_elf32_sol2_vec)        tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;;
665     sparc_elf32_vxworks_vec)     tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;;
666     sparc_elf64_vec)             tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
667     sparc_elf64_fbsd_vec)        tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
668     sparc_elf64_sol2_vec)        tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
669     spu_elf32_vec)               tb="$tb elf32-spu.lo elf32.lo $elf" ;;
670     sym_vec)                     tb="$tb xsym.lo" ;;
671     tic30_aout_vec)              tb="$tb aout-tic30.lo" ;;
672     tic30_coff_vec)              tb="$tb coff-tic30.lo $coffgen" ;;
673     tic4x_coff0_vec)             tb="$tb coff-tic4x.lo $coffgen" ;;
674     tic4x_coff0_beh_vec)         tb="$tb coff-tic4x.lo $coffgen" ;;
675     tic4x_coff1_vec)             tb="$tb coff-tic4x.lo $coffgen" ;;
676     tic4x_coff1_beh_vec)         tb="$tb coff-tic4x.lo $coffgen" ;;
677     tic4x_coff2_vec)             tb="$tb coff-tic4x.lo $coffgen" ;;
678     tic4x_coff2_beh_vec)         tb="$tb coff-tic4x.lo $coffgen" ;;
679     tic54x_coff0_vec)            tb="$tb coff-tic54x.lo $coffgen" ;;
680     tic54x_coff0_beh_vec)        tb="$tb coff-tic54x.lo $coffgen" ;;
681     tic54x_coff1_vec)            tb="$tb coff-tic54x.lo $coffgen" ;;
682     tic54x_coff1_beh_vec)        tb="$tb coff-tic54x.lo $coffgen" ;;
683     tic54x_coff2_vec)            tb="$tb coff-tic54x.lo $coffgen" ;;
684     tic54x_coff2_beh_vec)        tb="$tb coff-tic54x.lo $coffgen" ;;
685     tic6x_elf32_be_vec)          tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
686     tic6x_elf32_le_vec)          tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
687     tic6x_elf32_c6000_be_vec)    tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
688     tic6x_elf32_c6000_le_vec)    tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
689     tic6x_elf32_linux_be_vec)    tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
690     tic6x_elf32_linux_le_vec)    tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
691     tic80_coff_vec)              tb="$tb coff-tic80.lo $coff" ;;
692     tilegx_elf32_be_vec)         tb="$tb elf32-tilegx.lo elfxx-tilegx.lo elf32.lo $elf" ; target_size=32 ;;
693     tilegx_elf32_le_vec)         tb="$tb elf32-tilegx.lo elfxx-tilegx.lo elf32.lo $elf" ; target_size=32 ;;
694     tilegx_elf64_be_vec)         tb="$tb elf64-tilegx.lo elfxx-tilegx.lo elf64.lo $elf" ; target_size=64 ;;
695     tilegx_elf64_le_vec)         tb="$tb elf64-tilegx.lo elfxx-tilegx.lo elf64.lo $elf" ; target_size=64 ;;
696     tilepro_elf32_vec)           tb="$tb elf32-tilepro.lo elf32.lo $elf" ;;
697     v800_elf32_vec)              tb="$tb elf32-v850.lo elf32.lo $elf" ;;
698     v850_elf32_vec)              tb="$tb elf32-v850.lo elf32.lo $elf" ;;
699     vax_aout_1knbsd_vec)         tb="$tb vax1knetbsd.lo aout32.lo" ;;
700     vax_aout_bsd_vec)            tb="$tb vaxbsd.lo aout32.lo" ;;
701     vax_aout_nbsd_vec)           tb="$tb vaxnetbsd.lo aout32.lo" ;;
702     vax_elf32_vec)               tb="$tb elf32-vax.lo elf32.lo $elf" ;;
703     ft32_elf32_vec)              tb="$tb elf32-ft32.lo elf32.lo $elf" ;;
704     visium_elf32_vec)            tb="$tb elf32-visium.lo elf32.lo $elf" ;;
705     w65_coff_vec)                tb="$tb coff-w65.lo reloc16.lo $coffgen" ;;
706     wasm_vec)                    tb="$tb wasm-module.lo" ;;
707     wasm32_elf32_vec)            tb="$tb elf32-wasm32.lo elf32.lo $elf" ;;
708     we32k_coff_vec)              tb="$tb coff-we32k.lo $coffgen" ;;
709     x86_64_coff_vec)             tb="$tb coff-x86_64.lo $coff"; target_size=64 ;;
710     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 ;;
711     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 ;;
712     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 ;;
713     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 ;;
714     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 ;;
715     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 ;;
716     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 ;;
717     x86_64_mach_o_vec)           tb="$tb mach-o-x86-64.lo" ;;
718     x86_64_pe_vec)               tb="$tb pe-x86_64.lo pex64igen.lo $coff"; target_size=64 ;;
719     x86_64_pe_be_vec)            tb="$tb pe-x86_64.lo pex64igen.lo $coff"; target_size=64 ;;
720     x86_64_pei_vec)              tb="$tb pei-x86_64.lo pex64igen.lo $coff"; target_size=64 ;;
721     xc16x_elf32_vec)             tb="$tb elf32-xc16x.lo elf32.lo $elf" ;;
722     xgate_elf32_vec)             tb="$tb elf32-xgate.lo elf32.lo $elf" ;;
723     xstormy16_elf32_vec)         tb="$tb elf32-xstormy16.lo elf32.lo $elf" ;;
724     xtensa_elf32_be_vec)         tb="$tb xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;;
725     xtensa_elf32_le_vec)         tb="$tb xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;;
726     z80_coff_vec)                tb="$tb coff-z80.lo reloc16.lo $coffgen" ;;
727     z8k_coff_vec)                tb="$tb coff-z8k.lo reloc16.lo $coff" ;;
728
729     # These appear out of order in targets.c
730     srec_vec)                    tb="$tb srec.lo" ;;
731     symbolsrec_vec)              tb="$tb srec.lo" ;;
732     tekhex_vec)                  tb="$tb tekhex.lo" ;;
733     core_cisco_be_vec)           tb="$tb cisco-core.lo" ;;
734     core_cisco_le_vec)           tb="$tb cisco-core.lo" ;;
735
736     "")                          ;;
737     *) AC_MSG_ERROR(*** unknown target vector $vec) ;;
738     esac
739
740     if test ${target_size} = 64; then
741         target64=true
742     fi
743     if test x"${vec}" = x"${defvec}"; then
744         bfd_default_target_size=${target_size}
745     fi
746 done
747
748 # Target architecture .o files.
749 # A couple of CPUs use shorter file names to avoid problems on DOS
750 # filesystems.
751 ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.lo/g -e s/mn10200/m10200/ -e s/mn10300/m10300/`
752
753 # Weed out duplicate .o files.
754 f=""
755 for i in $tb ; do
756     case " $f " in
757     *" $i "*) ;;
758     *) f="$f $i" ;;
759     esac
760 done
761 tb="$f"
762
763 f=""
764 for i in $ta ; do
765     case " $f " in
766     *" $i "*) ;;
767     *) f="$f $i" ;;
768     esac
769 done
770 ta="$f"
771
772 bfd_backends="$tb"
773 bfd_machines="$ta"
774
775 if test x${all_targets} = xtrue ; then
776   bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)'
777   bfd_machines="${bfd_machines}"' $(ALL_MACHINES)'
778   selvecs=
779   havevecs=-DHAVE_all_vecs
780   selarchs=
781   test -n "$assocvecs" &&
782     assocvecs=`echo $assocvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
783 else    # all_targets is true
784   # Only set these if they will be nonempty, for the clever echo.
785   havevecs=
786   assocvecs=
787   test -n "$selvecs" &&
788     havevecs=`echo $selvecs | sed -e 's/^/-DHAVE_/' -e 's/ \(.\)/ -DHAVE_\1/g'`
789   test -n "$selvecs" &&
790     selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
791   test -n "$selarchs" &&
792     selarchs=`echo $selarchs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
793 fi      # all_targets is true
794
795 # 64-bit archives need a 64-bit bfd_vma.
796 if test "x$want_64_bit_archive" = xtrue; then
797   want64=true
798   AC_DEFINE(USE_64_BIT_ARCHIVE, 1,
799     [Define if 64-bit archives should always be used.])
800 fi
801
802 case ${host64}-${target64}-${want64} in
803   *true*)
804     wordsize=64
805     bfd64_libs='$(BFD64_LIBS)'
806     all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)'
807     if test $BFD_HOST_64_BIT_DEFINED = 0; then
808       AC_MSG_WARN([You have requested a 64 bit BFD configuration, but])
809       AC_MSG_WARN([your compiler may not have a 64 bit integral type])
810     fi
811     if test -n "$GCC" ; then
812        bad_64bit_gcc=no;
813        AC_MSG_CHECKING([for gcc version with buggy 64-bit support])
814        # Add more tests for gcc versions with non-working 64-bit support here.
815        AC_EGREP_CPP([: 2 : 91 : 1 :],[:__GNUC__:__GNUC_MINOR__:__i386__:],
816                     bad_64bit_gcc=yes;
817                     AC_MSG_RESULT([yes: egcs-1.1.2 on ix86 spotted]),
818                     AC_MSG_RESULT(no))
819        if test $bad_64bit_gcc = yes ; then
820          AC_MSG_ERROR([A newer version of gcc is needed for the requested 64-bit BFD configuration])
821        fi
822     fi
823     ;;
824   false-false-false)
825     wordsize=32
826     all_backends='$(BFD32_BACKENDS)'
827     ;;
828 esac
829
830 tdefaults=""
831 test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
832 test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'"
833 test -n "${assocvecs}" && tdefaults="${tdefaults} -DASSOCIATED_VECS='${assocvecs}'"
834 test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'"
835
836 AC_SUBST(wordsize)
837 AC_SUBST(bfd64_libs)
838 AC_SUBST(all_backends)
839 AC_SUBST(bfd_backends)
840 AC_SUBST(bfd_machines)
841 AC_SUBST(bfd_default_target_size)
842 AC_SUBST(tdefaults)
843 AC_SUBST(havevecs)
844
845 # If we are configured native, pick a core file support file.
846 COREFILE=
847 COREFLAG=
848 CORE_HEADER=
849 TRAD_HEADER=
850 if test "${target}" = "${host}"; then
851   case "${host}" in
852   alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu | alpha*-*-*vms*)
853         COREFILE=''
854         ;;
855   alpha*-*-linux-*)
856         COREFILE=trad-core.lo
857         TRAD_HEADER='"hosts/alphalinux.h"'
858         ;;
859   alpha*-*-netbsd* | alpha*-*-openbsd*)
860         COREFILE=netbsd-core.lo
861         ;;
862   alpha*-*-*)
863         COREFILE=osf-core.lo
864         ;;
865   arm-*-freebsd* | arm-*-kfreebsd*-gnu)
866         COREFILE='' ;;
867   arm-*-netbsd* | arm-*-openbsd*)
868         COREFILE=netbsd-core.lo
869         ;;
870   arm-*-riscix)         COREFILE=trad-core.lo ;;
871   hppa*-*-hpux*)        COREFILE=hpux-core.lo ;;
872   hppa*-*-hiux*)        COREFILE=hpux-core.lo ;;
873   hppa*-*-mpeix*)       COREFILE=hpux-core.lo ;;
874   hppa*-*-bsd*)         COREFILE="hpux-core.lo hppabsd-core.lo"
875                         COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
876   hppa*-*-netbsd* | hppa*-*-openbsd*)
877         COREFILE=netbsd-core.lo
878         ;;
879
880 changequote(,)dnl
881   i[3-7]86-sequent-bsd*)
882 changequote([,])dnl
883         COREFILE=trad-core.lo
884         TRAD_HEADER='"hosts/symmetry.h"'
885         ;;
886 changequote(,)dnl
887   i[3-7]86-sequent-sysv4*) ;;
888   i[3-7]86-sequent-sysv*)
889 changequote([,])dnl
890         COREFILE=trad-core.lo
891         TRAD_HEADER='"hosts/symmetry.h"'
892         ;;
893 changequote(,)dnl
894   i[3-7]86-*-bsdi)
895 changequote([,])dnl
896         COREFILE=
897         ;;
898 changequote(,)dnl
899   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*)
900 changequote([,])dnl
901         COREFILE=trad-core.lo
902         TRAD_HEADER='"hosts/i386bsd.h"'
903         ;;
904 changequote(,)dnl
905   i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu | i[3-7]86-*-dragonfly*)
906 changequote([,])dnl
907         COREFILE=''
908         TRAD_HEADER='"hosts/i386bsd.h"'
909         ;;
910 changequote(,)dnl
911   i[3-7]86-*-netbsd* | i[3-7]86-*-knetbsd*-gnu | i[3-7]86-*-openbsd*)
912 changequote([,])dnl
913         COREFILE=netbsd-core.lo
914         ;;
915 changequote(,)dnl
916   i[3-7]86-esix-sysv3*)
917 changequote([,])dnl
918         COREFILE=trad-core.lo
919         TRAD_HEADER='"hosts/esix.h"'
920         ;;
921 changequote(,)dnl
922   i[3-7]86-*-sco3.2v5*)
923 changequote([,])dnl
924         COREFILE=sco5-core.lo
925         ;;
926 changequote(,)dnl
927   i[3-7]86-*-sco* | i[3-7]86-*-isc*)
928 changequote([,])dnl
929         COREFILE=trad-core.lo
930         TRAD_HEADER='"hosts/i386sco.h"'
931         ;;
932 changequote(,)dnl
933   i[3-7]86-*-mach3*)
934 changequote([,])dnl
935         COREFILE=trad-core.lo
936         TRAD_HEADER='"hosts/i386mach3.h"'
937         ;;
938 changequote(,)dnl
939   i[3-7]86-*-linux-*)
940 changequote([,])dnl
941         COREFILE=trad-core.lo
942         TRAD_HEADER='"hosts/i386linux.h"'
943         case "$enable_targets"-"$want64" in
944         *x86_64-*linux*|*-true)
945           CORE_HEADER='"hosts/x86-64linux.h"'
946         esac
947         ;;
948 changequote(,)dnl
949   i[3-7]86-*-isc*)      COREFILE=trad-core.lo ;;
950   i[3-7]86-*-aix*)      COREFILE=aix386-core.lo ;;
951 changequote([,])dnl
952   mips-*-netbsd* | mips*-*-openbsd*)
953         COREFILE=netbsd-core.lo
954         ;;
955   mips-dec-*)
956         COREFILE=trad-core.lo
957         TRAD_HEADER='"hosts/decstation.h"'
958         ;;
959   mips-sgi-irix4*)      COREFILE=irix-core.lo ;;
960   mips-sgi-irix5*)      COREFILE=irix-core.lo ;;
961   mips-sgi-irix6*)      COREFILE=irix-core.lo ;;
962   mips-*-sysv4*)        ;;
963   mips-*-sysv* | mips-*-riscos*)
964         COREFILE=trad-core.lo
965         TRAD_HEADER='"hosts/riscos.h"'
966         ;;
967   m68*-bull*-sysv*)
968         COREFILE=trad-core.lo
969         TRAD_HEADER='"hosts/dpx2.h"'
970         ;;
971   m68*-hp-hpux*)        COREFILE=hpux-core.lo ;;
972   m68*-hp-bsd*)
973         COREFILE=trad-core.lo
974         TRAD_HEADER='"hosts/hp300bsd.h"'
975         ;;
976   m68*-*-linux-*)
977         COREFILE=trad-core.lo
978         TRAD_HEADER='"hosts/m68klinux.h"'
979         ;;
980   m68*-motorola-sysv*)
981         COREFILE=trad-core.lo
982         TRAD_HEADER='"hosts/delta68.h"'
983         ;;
984   m68*-*-netbsd* | m68*-*-openbsd*)
985         COREFILE=netbsd-core.lo
986         ;;
987   m68*-apple-aux*)
988         COREFILE=trad-core.lo
989         TRAD_HEADER='"hosts/m68kaux.h"'
990         ;;
991   ns32k-pc532-mach)
992         COREFILE=trad-core.lo
993         TRAD_HEADER='"hosts/pc532mach.h"'
994         ;;
995   ns32k-*-netbsd* | ns32k-*-openbsd*)
996         COREFILE=netbsd-core.lo
997         ;;
998   rs6000-*-lynx*)
999         COREFILE=lynx-core.lo
1000         ;;
1001 changequote(,)dnl
1002   rs6000-*-aix[5-9].* | powerpc-*-aix[5-9].* | powerpc64-*-aix[5-9].*)
1003 changequote([,])dnl
1004         COREFILE=rs6000-core.lo
1005         COREFLAG="$COREFLAG -DAIX_5_CORE -DAIX_CORE_DUMPX_CORE"
1006         ;;
1007 changequote(,)dnl
1008   rs6000-*-aix4.[3-9]* | powerpc-*-aix4.[3-9]*)
1009 changequote([,])dnl
1010         COREFILE=rs6000-core.lo
1011         COREFLAG="$COREFLAG -DAIX_CORE_DUMPX_CORE"
1012         # Not all versions of AIX with -DAIX_CORE_DUMPX_CORE
1013         # have c_impl as a member of struct core_dumpx
1014         AC_MSG_CHECKING([for c_impl in struct core_dumpx])
1015         AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <core.h>]], [[struct core_dumpx c; c.c_impl = 0;]])],[AC_DEFINE(HAVE_ST_C_IMPL, 1,
1016             [Define if struct core_dumpx has member c_impl])
1017           AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
1018         ;;
1019   rs6000-*-aix4*)       COREFILE=rs6000-core.lo ;;
1020   rs6000-*-*)           COREFILE=rs6000-core.lo ;;
1021   powerpc64-*-aix*)     COREFILE=rs6000-core.lo ;;
1022   powerpc-*-aix4*)      COREFILE=rs6000-core.lo ;;
1023   powerpc-*-aix*)       COREFILE=rs6000-core.lo ;;
1024   powerpc-*-beos*)      ;;
1025   powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu)
1026                         COREFILE='' ;;
1027   powerpc-*-netbsd*)    COREFILE=netbsd-core.lo ;;
1028   powerpc-*-*bsd*)      COREFILE=netbsd-core.lo ;;
1029   s390*-*-*)            COREFILE=trad-core.lo ;;
1030   sh*-*-netbsd* | sh*-*-openbsd*)
1031         COREFILE=netbsd-core.lo
1032         ;;
1033   sparc-*-netbsd* | sparc*-*-openbsd*)
1034         COREFILE=netbsd-core.lo
1035         ;;
1036   vax-*-netbsd* | vax-*-openbsd*)
1037         COREFILE=netbsd-core.lo
1038         ;;
1039   vax-*-ultrix2*)
1040         COREFILE=trad-core.lo
1041         TRAD_HEADER='"hosts/vaxult2.h"'
1042         ;;
1043   vax-*-ultrix*)
1044         COREFILE=trad-core.lo
1045         TRAD_HEADER='"hosts/vaxult2.h"'
1046         ;;
1047   vax-*-linux-*)
1048         COREFILE=trad-core.lo
1049         TRAD_HEADER='"hosts/vaxlinux.h"'
1050         ;;
1051   vax-*-*)
1052         COREFILE=trad-core.lo
1053         TRAD_HEADER='"hosts/vaxbsd.h"'
1054         ;;
1055   x86_64-*-linux*)
1056         CORE_HEADER='"hosts/x86-64linux.h"'
1057         ;;
1058   x86_64-*-netbsd* | x86_64-*-openbsd*)
1059         COREFILE=netbsd-core.lo
1060         ;;
1061   esac
1062
1063   case "$COREFILE" in
1064   aix386-core.lo)       COREFLAG=-DAIX386_CORE ;;
1065   hppabsd-core.lo)      COREFLAG=-DHPPABSD_CORE ;;
1066   hpux-core.lo)         COREFLAG=-DHPUX_CORE ;;
1067   irix-core.lo)         COREFLAG=-DIRIX_CORE ;;
1068   lynx-core.lo)         COREFLAG=-DLYNX_CORE ;;
1069   netbsd-core.lo)       COREFLAG=-DNETBSD_CORE ;;
1070   osf-core.lo)          COREFLAG=-DOSF_CORE ;;
1071   ptrace-core.lo)       COREFLAG=-DPTRACE_CORE ;;
1072   rs6000-core.lo)       COREFLAG="$COREFLAG -DAIX_CORE" ;;
1073   sco5-core.lo)         COREFLAG="$COREFLAG -DSCO5_CORE" ;;
1074   trad-core.lo)         COREFLAG="$COREFLAG -DTRAD_CORE" ;;
1075   esac
1076
1077   # ELF corefile support has several flavors, but all of
1078   # them use something called <sys/procfs.h>
1079   AC_CHECK_HEADERS(sys/procfs.h)
1080   if test "$ac_cv_header_sys_procfs_h" = yes; then
1081     BFD_HAVE_SYS_PROCFS_TYPE(prstatus_t)
1082     BFD_HAVE_SYS_PROCFS_TYPE(prstatus32_t)
1083     BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prstatus_t, pr_who)
1084     BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prstatus32_t, pr_who)
1085     BFD_HAVE_SYS_PROCFS_TYPE(pstatus_t)
1086     BFD_HAVE_SYS_PROCFS_TYPE(pxstatus_t)
1087     BFD_HAVE_SYS_PROCFS_TYPE(pstatus32_t)
1088     BFD_HAVE_SYS_PROCFS_TYPE(prpsinfo_t)
1089     BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prpsinfo_t, pr_pid)
1090     BFD_HAVE_SYS_PROCFS_TYPE(prpsinfo32_t)
1091     BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prpsinfo32_t, pr_pid)
1092     BFD_HAVE_SYS_PROCFS_TYPE(psinfo_t)
1093     BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(psinfo_t, pr_pid)
1094     BFD_HAVE_SYS_PROCFS_TYPE(psinfo32_t)
1095     BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(psinfo32_t, pr_pid)
1096     BFD_HAVE_SYS_PROCFS_TYPE(lwpstatus_t)
1097     BFD_HAVE_SYS_PROCFS_TYPE(lwpxstatus_t)
1098     BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_context)
1099     BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_reg)
1100     BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_fpreg)
1101     BFD_HAVE_SYS_PROCFS_TYPE(win32_pstatus_t)
1102   fi
1103 fi
1104 AC_SUBST(COREFILE)
1105 AC_SUBST(COREFLAG)
1106 if test -n "$CORE_HEADER"; then
1107   AC_DEFINE_UNQUOTED(CORE_HEADER, $CORE_HEADER,
1108     [Name of host specific core header file to include in elf.c.])
1109 fi
1110 if test -n "$TRAD_HEADER"; then
1111   AC_DEFINE_UNQUOTED(TRAD_HEADER, $TRAD_HEADER,
1112     [Name of host specific header file to include in trad-core.c.])
1113 fi
1114
1115 if test "$plugins" = "yes"; then
1116   supports_plugins=1
1117 else
1118   supports_plugins=0
1119 fi
1120 AC_SUBST(supports_plugins)
1121 AC_SUBST(lt_cv_dlopen_libs)
1122
1123 # Determine the host dependent file_ptr a.k.a. off_t type.  In order
1124 # prefer: off64_t - if ftello64 and fseeko64, off_t - if ftello and
1125 # fseeko, long.  This assumes that sizeof off_t is .ge. sizeof long.
1126 # Hopefully a reasonable assumption since fseeko et.al. should be
1127 # upward compatible.
1128 AC_CHECK_FUNCS(ftello ftello64 fseeko fseeko64 fopen64)
1129 if test x"$ac_cv_func_ftello" = xyes -a x"$ac_cv_func_fseeko" = xyes; then
1130     AC_CHECK_SIZEOF(off_t)
1131 fi
1132 AC_MSG_CHECKING([file_ptr type])
1133 bfd_file_ptr="long"
1134 bfd_ufile_ptr="unsigned long"
1135 if test x"$ac_cv_func_ftello64" = xyes -a x"$ac_cv_func_fseeko64" = xyes \
1136         -o x"${ac_cv_sizeof_off_t}" = x8; then
1137     bfd_file_ptr=BFD_HOST_64_BIT
1138     bfd_ufile_ptr=BFD_HOST_U_64_BIT
1139 fi
1140 AC_MSG_RESULT($bfd_file_ptr)
1141 AC_SUBST(bfd_file_ptr)
1142 AC_SUBST(bfd_ufile_ptr)
1143
1144 dnl AC_CHECK_HEADERS(sys/mman.h)
1145 AC_FUNC_MMAP
1146 AC_CHECK_FUNCS(madvise mprotect)
1147 case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in
1148   true+yes )  AC_DEFINE(USE_MMAP, 1, [Use mmap if it's available?]) ;;
1149 esac
1150
1151 rm -f doc/config.status
1152 AC_CONFIG_FILES([Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in])
1153
1154 dnl We need this duplication, even though we use AM_PO_SUBDIRS, because of
1155 dnl our two separate POTFILES.  Yuck.
1156 AC_CONFIG_COMMANDS([default],
1157 [[
1158 case "$srcdir" in
1159   .) srcdirpre= ;;
1160   *) srcdirpre='$(srcdir)/' ;;
1161 esac
1162 POFILES=
1163 GMOFILES=
1164 for lang in dummy $OBSOLETE_ALL_LINGUAS; do
1165   if test $lang != dummy; then
1166     POFILES="$POFILES $srcdirpre$lang.po"
1167     GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
1168   fi
1169 done
1170 sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' \
1171     -e '/BLD-POTFILES =/r po/BLD-POTFILES' \
1172     -e "s,@POFILES@,$POFILES," \
1173     -e "s,@GMOFILES@,$GMOFILES," \
1174     po/Makefile.in > po/Makefile]],[[]])
1175
1176 dnl Required by html, pdf, install-pdf and install-html
1177 AC_SUBST(datarootdir)
1178 AC_SUBST(docdir)
1179 AC_SUBST(htmldir)
1180 AC_SUBST(pdfdir)
1181
1182 AC_OUTPUT