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