* ld-elf/header.d: Allow arbitrary lines between "Program Header"
[binutils.git] / bfd / configure.in
blob2ea861f3ad826a32ecc115e4e478534bb4b6a621
1 dnl Process this file with autoconf to produce a configure script.
2 dnl
4 AC_PREREQ(2.59)
5 AC_INIT
6 AC_CONFIG_SRCDIR([libbfd.c])
8 AC_CANONICAL_TARGET
9 AC_ISC_POSIX
11 AM_INIT_AUTOMAKE(bfd, 2.17.50)
13 dnl These must be called before AM_PROG_LIBTOOL, because it may want
14 dnl to call AC_CHECK_PROG.
15 AC_CHECK_TOOL(AR, ar)
16 AC_CHECK_TOOL(RANLIB, ranlib, :)
18 dnl Default to a non shared library.  This may be overridden by the
19 dnl configure option --enable-shared.
20 AM_DISABLE_SHARED
22 AM_PROG_LIBTOOL
24 AC_ARG_ENABLE(64-bit-bfd,
25 [  --enable-64-bit-bfd     64-bit support (on hosts with narrower word sizes)],
26 [case "${enableval}" in
27   yes)  want64=true  ;;
28   no)   want64=false ;;
29   *)    AC_MSG_ERROR(bad value ${enableval} for 64-bit-bfd option) ;;
30 esac],[want64=false])dnl
31 AC_ARG_ENABLE(targets,
32 [  --enable-targets        alternative target configurations],
33 [case "${enableval}" in
34   yes | "") AC_MSG_ERROR([enable-targets option must specify target names or 'all'])
35             ;;
36   no)       enable_targets= ;;
37   *)        enable_targets=$enableval ;;
38 esac])dnl
39 AC_ARG_ENABLE(commonbfdlib,
40 [  --enable-commonbfdlib   build shared BFD/opcodes/libiberty library],
41 [case "${enableval}" in
42   yes) commonbfdlib=true ;;
43   no)  commonbfdlib=false ;;
44   *)   AC_MSG_ERROR([bad value ${enableval} for BFD commonbfdlib option]) ;;
45 esac])dnl
46 AC_ARG_WITH(mmap,
47 [  --with-mmap             try using mmap for BFD input files if available],
48 [case "${withval}" in
49   yes)  want_mmap=true ;;
50   no)   want_mmap=false ;;
51   *)    AC_MSG_ERROR(bad value ${withval} for BFD with-mmap option) ;;
52 esac],[want_mmap=false])dnl
54 AC_ARG_ENABLE(secureplt,
55 [  --enable-secureplt      Default to creating read-only plt entries],
56 [case "${enableval}" in
57   yes)  use_secureplt=true  ;;
58   no)   use_secureplt=false ;;
59   *)    AC_MSG_ERROR(bad value ${enableval} for secureplt option) ;;
60 esac],[use_secureplt=false])dnl
61 if test $use_secureplt = true; then
62   AC_DEFINE(USE_SECUREPLT, 1,
63     [Define if we should default to creating read-only plt entries])
66 AM_BINUTILS_WARNINGS
68 AM_CONFIG_HEADER(config.h:config.in)
70 if test -z "$target" ; then
71     AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
74 AM_MAINTAINER_MODE
75 AM_CONDITIONAL(GENINSRC_NEVER, false)
76 AM_INSTALL_LIBBFD
77 AC_EXEEXT
79 host64=false
80 target64=false
81 bfd_default_target_size=32
83 # host stuff:
85 AC_PROG_CC
86 AC_GNU_SOURCE
88 ALL_LINGUAS="fr tr ja es sv da zh_CN ro rw vi"
89 ZW_GNU_GETTEXT_SISTER_DIR
90 AM_PO_SUBDIRS
92 # Permit host specific settings.
93 . ${srcdir}/configure.host
95 AC_SUBST(HDEFINES)
96 AC_PROG_INSTALL
98 BFD_HOST_64BIT_LONG=0
99 BFD_HOST_LONG_LONG=0
100 BFD_HOST_64_BIT_DEFINED=0
101 BFD_HOST_64_BIT=
102 BFD_HOST_U_64_BIT=
104 AC_MSG_CHECKING([for long long])
105 AC_CACHE_VAL(bfd_cv_has_long_long,
106 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[unsigned long long ll = 18446744073709551615ULL;]])],[bfd_cv_has_long_long=yes],[bfd_cv_has_long_long=no])])
107 AC_MSG_RESULT($bfd_cv_has_long_long)
108 if test $bfd_cv_has_long_long = yes; then
109   BFD_HOST_LONG_LONG=1
110   AC_CHECK_SIZEOF(long long)
113 AC_CHECK_SIZEOF(long)
114 if test "x${ac_cv_sizeof_long}" = "x8"; then
115   host64=true
116   BFD_HOST_64BIT_LONG=1
117   test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long"
118   test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long"
119 elif test "x${ac_cv_sizeof_long_long}" = "x8"; then
120   test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long"
121   test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long"
124 if test -n "${HOST_64BIT_TYPE}" -a -n "${HOST_U_64BIT_TYPE}"; then
125   BFD_HOST_64_BIT_DEFINED=1
126   BFD_HOST_64_BIT="${HOST_64BIT_TYPE}"
127   BFD_HOST_U_64_BIT="${HOST_U_64BIT_TYPE}"
130 AC_SUBST(BFD_HOST_64BIT_LONG)
131 AC_SUBST(BFD_HOST_LONG_LONG)
132 AC_SUBST(BFD_HOST_64_BIT_DEFINED)
133 AC_SUBST(BFD_HOST_64_BIT)
134 AC_SUBST(BFD_HOST_U_64_BIT)
136 BFD_CC_FOR_BUILD
138 AC_CHECK_HEADERS(stddef.h string.h strings.h stdlib.h time.h unistd.h)
139 AC_CHECK_HEADERS(fcntl.h sys/file.h sys/time.h)
140 AC_HEADER_TIME
141 AC_HEADER_DIRENT
142 ACX_HEADER_STRING
143 AC_CHECK_FUNCS(fcntl getpagesize setitimer sysconf fdopen getuid getgid)
144 AC_CHECK_FUNCS(strtoull)
146 AC_CHECK_DECLS(basename)
147 AC_CHECK_DECLS(ftello)
148 AC_CHECK_DECLS(ftello64)
149 AC_CHECK_DECLS(fseeko)
150 AC_CHECK_DECLS(fseeko64)
152 BFD_BINARY_FOPEN
154 AC_CHECK_DECLS(ffs)
155 AC_CHECK_DECLS(free)
156 AC_CHECK_DECLS(getenv)
157 AC_CHECK_DECLS(malloc)
158 AC_CHECK_DECLS(realloc)
159 AC_CHECK_DECLS(stpcpy)
160 AC_CHECK_DECLS(strstr)
161 AC_CHECK_DECLS(snprintf)
162 AC_CHECK_DECLS(vsnprintf)
164 # If we are configured native, pick a core file support file.
165 COREFILE=
166 COREFLAG=
167 TRAD_HEADER=
168 if test "${target}" = "${host}"; then
169   case "${host}" in
170   alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
171         COREFILE=''
172         ;;
173   alpha*-*-linux-*)
174         COREFILE=trad-core.lo
175         TRAD_HEADER='"hosts/alphalinux.h"'
176         ;;
177   alpha*-*-netbsd* | alpha*-*-openbsd*)
178         COREFILE=netbsd-core.lo
179         ;;
180   alpha*-*-*)           COREFILE=osf-core.lo ;;
181   arm-*-freebsd* | arm-*-kfreebsd*-gnu)
182                         COREFILE='' ;;
183   arm-*-netbsd* | arm-*-openbsd*)
184         COREFILE=netbsd-core.lo
185         ;;
186   arm-*-riscix)         COREFILE=trad-core.lo ;;
187   hppa*-*-hpux*)        COREFILE=hpux-core.lo ;;
188   hppa*-*-hiux*)        COREFILE=hpux-core.lo ;;
189   hppa*-*-mpeix*)       COREFILE=hpux-core.lo ;;
190   hppa*-*-bsd*)         COREFILE="hpux-core.lo hppabsd-core.lo"
191                         COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
192   hppa*-*-netbsd* | hppa*-*-openbsd*)
193         COREFILE=netbsd-core.lo
194         ;;
196   i370-*-*)
197         COREFILE=trad-core.lo
198         TRAD_HEADER='"hosts/i370linux.h"'
199         ;;
201 changequote(,)dnl
202   i[3-7]86-sequent-bsd*)
203 changequote([,])dnl
204         COREFILE=trad-core.lo
205         TRAD_HEADER='"hosts/symmetry.h"'
206         ;;
207 changequote(,)dnl
208   i[3-7]86-sequent-sysv4*) ;;
209   i[3-7]86-sequent-sysv*)
210 changequote([,])dnl
211         COREFILE=trad-core.lo
212         TRAD_HEADER='"hosts/symmetry.h"'
213         ;;
214 changequote(,)dnl
215   i[3-7]86-*-bsdi)
216 changequote([,])dnl
217         COREFILE=
218         ;;
219 changequote(,)dnl
220   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*)
221 changequote([,])dnl
222         COREFILE=trad-core.lo
223         TRAD_HEADER='"hosts/i386bsd.h"'
224         ;;
225 changequote(,)dnl
226   i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu)
227 changequote([,])dnl
228         COREFILE=''
229         TRAD_HEADER='"hosts/i386bsd.h"'
230         ;;
231 changequote(,)dnl
232   i[3-7]86-*-netbsd* | i[3-7]86-*-knetbsd*-gnu | i[3-7]86-*-openbsd*)
233 changequote([,])dnl
234         COREFILE=netbsd-core.lo
235         ;;
236 changequote(,)dnl
237   i[3-7]86-esix-sysv3*)
238 changequote([,])dnl
239         COREFILE=trad-core.lo
240         TRAD_HEADER='"hosts/esix.h"'
241         ;;
242 changequote(,)dnl
243   i[3-7]86-*-sco3.2v5*)
244 changequote([,])dnl
245         COREFILE=sco5-core.lo
246         ;;
247 changequote(,)dnl
248   i[3-7]86-*-sco* | i[3-7]86-*-isc*)
249 changequote([,])dnl
250         COREFILE=trad-core.lo
251         TRAD_HEADER='"hosts/i386sco.h"'
252         ;;
253 changequote(,)dnl
254   i[3-7]86-*-mach3*)
255 changequote([,])dnl
256         COREFILE=trad-core.lo
257         TRAD_HEADER='"hosts/i386mach3.h"'
258         ;;
259 changequote(,)dnl
260   i[3-7]86-*-linux-*)
261 changequote([,])dnl
262         COREFILE=trad-core.lo
263         TRAD_HEADER='"hosts/i386linux.h"'
264         ;;
265 changequote(,)dnl
266   i[3-7]86-*-isc*)      COREFILE=trad-core.lo ;;
267   i[3-7]86-*-aix*)      COREFILE=aix386-core.lo ;;
268 changequote([,])dnl
269   i860-*-mach3* | i860-*-osf1*)
270         COREFILE=trad-core.lo
271         TRAD_HEADER='"hosts/i860mach3.h"'
272         ;;
273   mips-*-netbsd* | mips*-*-openbsd*)
274         COREFILE=netbsd-core.lo
275         ;;
276   mips-dec-*)
277         COREFILE=trad-core.lo
278         TRAD_HEADER='"hosts/decstation.h"'
279         ;;
280   mips-sgi-irix4*)      COREFILE=irix-core.lo ;;
281   mips-sgi-irix5*)      COREFILE=irix-core.lo ;;
282   mips-sgi-irix6*)      COREFILE=irix-core.lo ;;
283   mips-*-sysv4*)        ;;
284   mips-*-sysv* | mips-*-riscos*)
285         COREFILE=trad-core.lo
286         TRAD_HEADER='"hosts/riscos.h"'
287         ;;
288   mips-sony-bsd*)
289         COREFILE=trad-core.lo
290         TRAD_HEADER='"hosts/news-mips.h"'
291         ;;
292   m68*-bull*-sysv*)
293         COREFILE=trad-core.lo
294         TRAD_HEADER='"hosts/dpx2.h"'
295         ;;
296   m68*-hp-hpux*)        COREFILE=hpux-core.lo ;;
297   m68*-hp-bsd*)
298         COREFILE=trad-core.lo
299         TRAD_HEADER='"hosts/hp300bsd.h"'
300         ;;
301   m68*-*-linux-*)
302         COREFILE=trad-core.lo
303         TRAD_HEADER='"hosts/m68klinux.h"'
304         ;;
305   m68*-motorola-sysv*)
306         COREFILE=trad-core.lo
307         TRAD_HEADER='"hosts/delta68.h"'
308         ;;
309   m68*-sony-*)
310         COREFILE=trad-core.lo
311         TRAD_HEADER='"hosts/news.h"'
312         ;;
313   m68*-*-netbsd* | m68*-*-openbsd*)
314         COREFILE=netbsd-core.lo
315         ;;
316   m68*-apple-aux*)
317         COREFILE=trad-core.lo
318         TRAD_HEADER='"hosts/m68kaux.h"'
319         ;;
320   m88*-*-sysv4*)
321         ;;
322   m88*-motorola-sysv*)
323         COREFILE=ptrace-core.lo
324         ;;
325   m88*-*-mach3*)
326         COREFILE=trad-core.lo
327         TRAD_HEADER='"hosts/m88kmach3.h"'
328         ;;
329   m88*-*-openbsd*)
330         COREFILE=netbsd-core.lo
331         ;;
332   ns32k-pc532-mach)
333         COREFILE=trad-core.lo
334         TRAD_HEADER='"hosts/pc532mach.h"'
335         ;;
336   ns32k-*-netbsd* | ns32k-*-openbsd*)
337         COREFILE=netbsd-core.lo
338         ;;
339   rs6000-*-lynx*)
340         COREFILE=lynx-core.lo
341         ;;
342   rs6000-*-aix5.* | powerpc-*-aix5.*)
343         COREFILE=rs6000-core.lo
344         COREFLAG="$COREFLAG -DAIX_5_CORE -DAIX_CORE_DUMPX_CORE"
345         ;;
346 changequote(,)dnl
347   rs6000-*-aix4.[3-9]* | powerpc-*-aix4.[3-9]*)
348 changequote([,])dnl
349         COREFILE=rs6000-core.lo
350         COREFLAG="$COREFLAG -DAIX_CORE_DUMPX_CORE"
351         # Not all versions of AIX with -DAIX_CORE_DUMPX_CORE
352         # have c_impl as a member of struct core_dumpx
353         AC_MSG_CHECKING([for c_impl in struct core_dumpx])
354         AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <core.h>]], [[struct core_dumpx c; c.c_impl = 0;]])],[AC_DEFINE(HAVE_ST_C_IMPL, 1,
355             [Define if struct core_dumpx has member c_impl])
356           AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
357         ;;
358   rs6000-*-aix4*)       COREFILE=rs6000-core.lo ;;
359   rs6000-*-*)           COREFILE=rs6000-core.lo ;;
360   powerpc-*-aix4*)      COREFILE=rs6000-core.lo ;;
361   powerpc-*-aix*)       COREFILE=rs6000-core.lo ;;
362   powerpc-*-beos*)      ;;
363   powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu)
364                         COREFILE='' ;;
365   powerpc-*-netbsd*)    COREFILE=netbsd-core.lo ;;
366   powerpc-*-*bsd*)      COREFILE=netbsd-core.lo ;;
367   s390*-*-*)            COREFILE=trad-core.lo ;;
368   sh*-*-netbsd* | sh*-*-openbsd*)
369         COREFILE=netbsd-core.lo
370         ;;
371   sparc-*-netbsd* | sparc*-*-openbsd*)
372         COREFILE=netbsd-core.lo
373         ;;
374   tahoe-*-*)
375         COREFILE=trad-core.lo
376         TRAD_HEADER='"hosts/tahoe.h"'
377         ;;
378   vax-*-netbsd* | vax-*-openbsd*)
379         COREFILE=netbsd-core.lo
380         ;;
381   vax-*-ultrix2*)
382         COREFILE=trad-core.lo
383         TRAD_HEADER='"hosts/vaxult2.h"'
384         ;;
385   vax-*-ultrix*)
386         COREFILE=trad-core.lo
387         TRAD_HEADER='"hosts/vaxult2.h"'
388         ;;
389   vax-*-linux-*)
390         COREFILE=trad-core.lo
391         TRAD_HEADER='"hosts/vaxlinux.h"'
392         ;;
393   vax-*-*)
394         COREFILE=trad-core.lo
395         TRAD_HEADER='"hosts/vaxbsd.h"'
396         ;;
397   x86_64-*-netbsd* | x86_64-*-openbsd*)
398         COREFILE=netbsd-core.lo
399         ;;
400   esac
402   case "$COREFILE" in
403   aix386-core.lo)       COREFLAG=-DAIX386_CORE ;;
404   hppabsd-core.lo)      COREFLAG=-DHPPABSD_CORE ;;
405   hpux-core.lo)         COREFLAG=-DHPUX_CORE ;;
406   irix-core.lo)         COREFLAG=-DIRIX_CORE ;;
407   lynx-core.lo)         COREFLAG=-DLYNX_CORE ;;
408   netbsd-core.lo)       COREFLAG=-DNETBSD_CORE ;;
409   osf-core.lo)          COREFLAG=-DOSF_CORE ;;
410   ptrace-core.lo)       COREFLAG=-DPTRACE_CORE ;;
411   rs6000-core.lo)       COREFLAG="$COREFLAG -DAIX_CORE" ;;
412   sco5-core.lo)         COREFLAG="$COREFLAG -DSCO5_CORE" ;;
413   trad-core.lo)         COREFLAG="$COREFLAG -DTRAD_CORE" ;;
414   esac
416   # ELF corefile support has several flavors, but all of
417   # them use something called <sys/procfs.h>
418   AC_CHECK_HEADERS(sys/procfs.h)
419   if test "$ac_cv_header_sys_procfs_h" = yes; then
420     BFD_HAVE_SYS_PROCFS_TYPE(prstatus_t)
421     BFD_HAVE_SYS_PROCFS_TYPE(prstatus32_t)
422     BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prstatus_t, pr_who)
423     BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prstatus32_t, pr_who)
424     BFD_HAVE_SYS_PROCFS_TYPE(pstatus_t)
425     BFD_HAVE_SYS_PROCFS_TYPE(pxstatus_t)
426     BFD_HAVE_SYS_PROCFS_TYPE(pstatus32_t)
427     BFD_HAVE_SYS_PROCFS_TYPE(prpsinfo_t)
428     BFD_HAVE_SYS_PROCFS_TYPE(prpsinfo32_t)
429     BFD_HAVE_SYS_PROCFS_TYPE(psinfo_t)
430     BFD_HAVE_SYS_PROCFS_TYPE(psinfo32_t)
431     BFD_HAVE_SYS_PROCFS_TYPE(lwpstatus_t)
432     BFD_HAVE_SYS_PROCFS_TYPE(lwpxstatus_t)
433     BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_context)
434     BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_reg)
435     BFD_HAVE_SYS_PROCFS_TYPE(win32_pstatus_t)
436   fi
438 AC_SUBST(COREFILE)
439 AC_SUBST(COREFLAG)
440 if test -n "$TRAD_HEADER"; then
441   AC_DEFINE_UNQUOTED(TRAD_HEADER, $TRAD_HEADER,
442     [Name of host specific header file to include in trad-core.c.])
445 # Horrible hacks to build DLLs on Windows.
446 WIN32LDFLAGS=
447 WIN32LIBADD=
448 case "${host}" in
449 *-*-cygwin*)
450   if test "$enable_shared" = "yes"; then
451     WIN32LDFLAGS="-no-undefined"
452     WIN32LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32"
453   fi
454   ;;
455 *-*-linux*)
456   # We borrow WIN32LIBADD so that the shared libbfd won't depend on
457   # libiberty.a.
458   case "${host}" in
459   mips*-*-linux*)
460     # Linux/MIPS uses PIC by default.
461     if test "$enable_shared" = "yes"; then
462       WIN32LIBADD="-L../libiberty -liberty"
463     fi
464     ;;
465   *)
466 changequote(,)dnl
467     x=`sed -n -e 's/^[  ]*PICFLAG[      ]*=[    ]*//p' < ../libiberty/Makefile | sed -n '$p'`
468 changequote([,])dnl
469     if test -n "$x"; then
470       WIN32LIBADD="-L../libiberty/pic -liberty"
471     fi
472   ;;
473   esac
474   ;;
475 esac
476 AC_SUBST(WIN32LDFLAGS)
477 AC_SUBST(WIN32LIBADD)
479 # target stuff:
481 # Canonicalize the secondary target names.
482 if test -n "$enable_targets" ; then
483     for targ in `echo $enable_targets | sed 's/,/ /g'`
484     do
485         result=`$ac_config_sub $targ 2>/dev/null`
486         if test -n "$result" ; then
487             canon_targets="$canon_targets $result"
488         else
489             # Allow targets that config.sub doesn't recognize, like "all".
490             canon_targets="$canon_targets $targ"
491         fi
492     done
495 all_targets=false
496 defvec=
497 selvecs=
498 assocvecs=
499 selarchs=
500 TDEFINES=
501 for targ in $target $canon_targets
503     if test "x$targ" = "xall"; then
504         all_targets=true
505         assocvecs="$assocvecs $targ_defvec $targ_selvecs"
506     else
507         . $srcdir/config.bfd
508         if test "x$targ" = "x$target"; then
509             defvec=$targ_defvec
510         fi
511         selvecs="$selvecs $targ_defvec $targ_selvecs"
512         selarchs="$selarchs $targ_archs"
513         TDEFINES="$TDEFINES $targ_cflags"
514     fi
515 done
516 AC_SUBST(TDEFINES)
518 # This processing still needs to be done if we're to decide properly whether
519 # 64-bit support needs to be compiled in.  Currently, it will be included if
520 # the default or any other explicitly requested target requires it; it
521 # will not be included on a 32-bit host if no 64-bit target is requested, and
522 # no "--with-64-bit-bfd" option is given, even if "--enable-targets=all" is
523 # used.
525 # uniq the default and selected vectors in all the configured targets.
526 f=""
527 for i in $selvecs ; do
528     case " $f " in
529     *" $i "*) ;;
530     *) f="$f $i" ;;
531     esac
532 done
533 selvecs="$f"
536 # uniq the associated vectors in all the configured targets.
537 f=""
538 for i in $assocvecs ; do
539     case " $f " in
540     *" $i "*) ;;
541     *) f="$f $i" ;;
542     esac
543 done
544 assocvecs="$f"
547 # uniq the architectures in all the configured targets.
548 f=""
549 for i in $selarchs ; do
550     case " $f " in
551     *" $i "*) ;;
552     *) f="$f $i" ;;
553     esac
554 done
555 selarchs="$f"
557 # Target backend .o files.
560 elf="elf.lo elflink.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo"
562 for vec in $selvecs
564     target_size=32
565     case "$vec" in
566     # This list is alphabetized to make it easy to compare
567     # with the two vector lists in targets.c.  For the same reason,
568     # use one entry per line, even though this leads to long lines.
569     a_out_adobe_vec)            tb="$tb aout-adobe.lo aout32.lo" ;;
570     aix5coff64_vec)             tb="$tb coff64-rs6000.lo xcofflink.lo aix5ppc-core.lo"; target_size=64 ;;
571     aout0_big_vec)              tb="$tb aout0.lo aout32.lo" ;;
572     aout_arm_big_vec)           tb="$tb aout-arm.lo aout32.lo" ;;
573     aout_arm_little_vec)        tb="$tb aout-arm.lo aout32.lo" ;;
574     apollocoff_vec)             tb="$tb coff-apollo.lo" ;;
575     arm_epoc_pe_big_vec)        tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;;
576     arm_epoc_pe_little_vec)     tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;;
577     arm_epoc_pei_big_vec)       tb="$tb epoc-pei-arm.lo peigen.lo cofflink.lo " ;;
578     arm_epoc_pei_little_vec)    tb="$tb epoc-pei-arm.lo peigen.lo cofflink.lo " ;;
579     arm_wince_pe_big_vec)       tb="$tb pe-arm-wince.lo pe-arm.lo peigen.lo cofflink.lo " ;;
580     arm_wince_pe_little_vec)    tb="$tb pe-arm-wince.lo pe-arm.lo peigen.lo cofflink.lo " ;;
581     arm_wince_pei_big_vec)      tb="$tb pei-arm-wince.lo pei-arm.lo peigen.lo cofflink.lo " ;;
582     arm_wince_pei_little_vec)   tb="$tb pei-arm-wince.lo pei-arm.lo peigen.lo cofflink.lo " ;;
583     armcoff_big_vec)            tb="$tb coff-arm.lo cofflink.lo " ;;
584     armcoff_little_vec)         tb="$tb coff-arm.lo cofflink.lo " ;;
585     armnetbsd_vec)              tb="$tb armnetbsd.lo aout32.lo" ;;
586     armpe_big_vec)              tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;;
587     armpe_little_vec)           tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;;
588     armpei_big_vec)             tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;;
589     armpei_little_vec)          tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;;
590     b_out_vec_big_host)         tb="$tb bout.lo aout32.lo" ;;
591     b_out_vec_little_host)      tb="$tb bout.lo aout32.lo" ;;
592     bfd_efi_app_ia32_vec)       tb="$tb efi-app-ia32.lo peigen.lo cofflink.lo" ;;
593     bfd_efi_app_ia64_vec)       tb="$tb efi-app-ia64.lo pepigen.lo cofflink.lo"; target_size=64 ;;
594     bfd_elf32_am33lin_vec)      tb="$tb elf32-am33lin.lo elf32.lo $elf" ;;
595     bfd_elf32_avr_vec)          tb="$tb elf32-avr.lo elf32.lo $elf" ;;
596     bfd_elf32_bfin_vec)         tb="$tb elf32-bfin.lo elf32.lo $elf" ;;
597     bfd_elf32_bfinfdpic_vec)    tb="$tb elf32-bfin.lo elf32.lo $elf" ;;
598     bfd_elf32_big_generic_vec)  tb="$tb elf32-gen.lo elf32.lo $elf" ;;
599     bfd_elf32_bigarc_vec)       tb="$tb elf32-arc.lo elf32.lo $elf" ;;
600     bfd_elf32_bigarm_vec)       tb="$tb elf32-arm.lo elf32.lo elf-vxworks.lo $elf" ;;
601     bfd_elf32_bigarm_symbian_vec)       
602                                 tb="$tb elf32-arm.lo elf32.lo elf-vxworks.lo $elf" ;;
603     bfd_elf32_bigarm_vxworks_vec)       
604                                 tb="$tb elf32-arm.lo elf32.lo elf-vxworks.lo $elf" ;;
605     bfd_elf32_bigmips_vec)      tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
606     bfd_elf32_bigmips_vxworks_vec)
607                                 tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
608     bfd_elf32_cr16c_vec)        tb="$tb elf32-cr16c.lo elf32.lo $elf" ;;
609     bfd_elf32_cris_vec)         tb="$tb elf32-cris.lo elf32.lo $elf" ;;
610     bfd_elf32_crx_vec)          tb="$tb elf32-crx.lo elf32.lo $elf" ;;    
611     bfd_elf32_d10v_vec)         tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
612     bfd_elf32_d30v_vec)         tb="$tb elf32-d30v.lo elf32.lo $elf" ;;
613     bfd_elf32_dlx_big_vec)      tb="$tb elf32-dlx.lo elf32.lo $elf" ;;
614     bfd_elf32_fr30_vec)         tb="$tb elf32-fr30.lo elf32.lo $elf" ;;
615     bfd_elf32_frv_vec)          tb="$tb elf32-frv.lo elf32.lo $elf" ;;
616     bfd_elf32_frvfdpic_vec)     tb="$tb elf32-frv.lo elf32.lo $elf" ;;
617     bfd_elf32_h8300_vec)        tb="$tb elf32-h8300.lo elf32.lo $elf" ;;
618     bfd_elf32_hppa_linux_vec)   tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
619     bfd_elf32_hppa_nbsd_vec)    tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
620     bfd_elf32_hppa_vec)         tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
621     bfd_elf32_i370_vec)         tb="$tb elf32-i370.lo elf32.lo $elf" ;;
622     bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386.lo elf-vxworks.lo elf32.lo $elf" ;;
623     bfd_elf32_i386_vxworks_vec) tb="$tb elf32-i386.lo elf-vxworks.lo elf32.lo $elf" ;;
624     bfd_elf32_i386_vec)         tb="$tb elf32-i386.lo elf-vxworks.lo elf32.lo $elf" ;;
625     bfd_elf32_i860_little_vec)  tb="$tb elf32-i860.lo elf32.lo $elf" ;;
626     bfd_elf32_i860_vec)         tb="$tb elf32-i860.lo elf32.lo $elf" ;;
627     bfd_elf32_i960_vec)         tb="$tb elf32-i960.lo elf32.lo $elf" ;;
628     bfd_elf32_ia64_big_vec)     tb="$tb elf32-ia64.lo elf32.lo $elf" ;;
629     bfd_elf32_ia64_hpux_big_vec) tb="$tb elf32-ia64.lo elf32.lo $elf";;
630     bfd_elf32_ip2k_vec)         tb="$tb elf32-ip2k.lo elf32.lo $elf" ;;
631     bfd_elf32_iq2000_vec)       tb="$tb elf32-iq2000.lo elf32.lo $elf" ;;
632     bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
633     bfd_elf32_littlearc_vec)    tb="$tb elf32-arc.lo elf32.lo $elf" ;;
634     bfd_elf32_littlearm_symbian_vec)
635                                 tb="$tb elf32-arm.lo elf32.lo elf-vxworks.lo $elf" ;;
636     bfd_elf32_littlearm_vxworks_vec)
637                                 tb="$tb elf32-arm.lo elf32.lo elf-vxworks.lo $elf" ;;
638     bfd_elf32_littlearm_vec)    tb="$tb elf32-arm.lo elf32.lo elf-vxworks.lo $elf" ;;
639     bfd_elf32_littlemips_vec)   tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
640     bfd_elf32_littlemips_vxworks_vec)
641                                 tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
642     bfd_elf32_m32c_vec)         tb="$tb elf32-m32c.lo elf32.lo $elf" ;;
643     bfd_elf32_m32r_vec)         tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
644     bfd_elf32_m32rle_vec)       tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
645     bfd_elf32_m32rlin_vec)      tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
646     bfd_elf32_m32rlelin_vec)    tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
647     bfd_elf32_m68hc11_vec)      tb="$tb elf32-m68hc11.lo elf32-m68hc1x.lo elf32.lo $elf" ;;
648     bfd_elf32_m68hc12_vec)      tb="$tb elf32-m68hc12.lo elf32-m68hc1x.lo elf32.lo $elf" ;;
649     bfd_elf32_m68k_vec)         tb="$tb elf32-m68k.lo elf32.lo $elf" ;;
650     bfd_elf32_m88k_vec)         tb="$tb elf32-m88k.lo elf32.lo $elf" ;;
651     bfd_elf32_mcore_big_vec)    tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
652     bfd_elf32_mcore_little_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
653     bfd_elf32_mn10200_vec)      tb="$tb elf-m10200.lo elf32.lo $elf" ;;
654     bfd_elf32_mn10300_vec)      tb="$tb elf-m10300.lo elf32.lo $elf" ;;
655     bfd_elf32_mt_vec)           tb="$tb elf32-mt.lo elf32.lo $elf" ;;
656     bfd_elf32_msp430_vec)       tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
657     bfd_elf32_nbigmips_vec)     tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
658     bfd_elf32_nlittlemips_vec)  tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
659     bfd_elf32_ntradbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
660     bfd_elf32_ntradlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
661     bfd_elf32_openrisc_vec)     tb="$tb elf32-openrisc.lo elf32.lo $elf" ;;
662     bfd_elf32_or32_big_vec)     tb="$tb elf32-or32.lo elf32.lo $elf" ;;
663     bfd_elf32_pj_vec)           tb="$tb elf32-pj.lo elf32.lo $elf";;
664     bfd_elf32_pjl_vec)          tb="$tb elf32-pj.lo elf32.lo $elf";;
665     bfd_elf32_powerpc_vec)      tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
666     bfd_elf32_powerpcle_vec)    tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
667     bfd_elf32_powerpc_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
668     bfd_elf32_s390_vec)         tb="$tb elf32-s390.lo elf32.lo $elf" ;;
669     bfd_elf32_bigscore_vec)     tb="$tb elf32-score.lo elf32.lo $elf" ;;
670     bfd_elf32_littlescore_vec)  tb="$tb elf32-score.lo elf32.lo $elf" ;; 
671     # FIXME: We include cofflink.lo not because it's needed for
672     # bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec
673     # which needs it but does not list it.  Should be fixed in right place.
674     bfd_elf32_sh64_vec)         tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
675     bfd_elf32_sh64l_vec)        tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
676     bfd_elf32_sh64lin_vec)      tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
677     bfd_elf32_sh64blin_vec)     tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
678     bfd_elf32_sh64lnbsd_vec)    tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf cofflink.lo" ;;
679     bfd_elf32_sh64nbsd_vec)     tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf cofflink.lo" ;;
680     bfd_elf32_sh_vec)           tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo" ;;
681     bfd_elf32_shblin_vec)       tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
682     bfd_elf32_shl_vec)          tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo" ;;
683     bfd_elf32_shl_symbian_vec)  tb="$tb elf32-sh-symbian.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo" ;;
684     bfd_elf32_shlin_vec)        tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
685     bfd_elf32_shlnbsd_vec)      tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
686     bfd_elf32_shlvxworks_vec)   tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo" ;;
687     bfd_elf32_shnbsd_vec)       tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
688     bfd_elf32_shvxworks_vec)    tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo" ;;
689     bfd_elf32_sparc_vec)        tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;;
690     bfd_elf32_sparc_vxworks_vec) tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;;
691     bfd_elf32_spu_vec)          tb="$tb elf32-spu.lo elf32.lo $elf" ;;
692     bfd_elf32_tradbigmips_vec)  tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
693     bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
694     bfd_elf32_us_cris_vec)      tb="$tb elf32-cris.lo elf32.lo $elf" ;;
695     bfd_elf32_v850_vec)         tb="$tb elf32-v850.lo elf32.lo $elf" ;;
696     bfd_elf32_vax_vec)          tb="$tb elf32-vax.lo elf32.lo $elf" ;;
697     bfd_elf32_xstormy16_vec)    tb="$tb elf32-xstormy16.lo elf32.lo $elf" ;;
698     bfd_elf32_xc16x_vec)                tb="$tb elf32-xc16x.lo elf32.lo $elf" ;;
699     bfd_elf32_xtensa_le_vec)    tb="$tb xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;;
700     bfd_elf32_xtensa_be_vec)    tb="$tb xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;;
701     bfd_elf64_alpha_freebsd_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
702     bfd_elf64_alpha_vec)        tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
703     bfd_elf64_big_generic_vec)  tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
704     bfd_elf64_bigmips_vec)      tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
705     bfd_elf64_hppa_linux_vec)   tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;;
706     bfd_elf64_hppa_vec)         tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;;
707     bfd_elf64_ia64_big_vec)     tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
708     bfd_elf64_ia64_hpux_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
709     bfd_elf64_ia64_little_vec)  tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
710     bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
711     bfd_elf64_littlemips_vec)   tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
712     bfd_elf64_mmix_vec)         tb="$tb elf64-mmix.lo elf64.lo $elf" target_size=64 ;;
713     bfd_elf64_powerpc_vec)      tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
714     bfd_elf64_powerpcle_vec)    tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
715     bfd_elf64_s390_vec)         tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;;
716     bfd_elf64_sh64_vec)         tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
717     bfd_elf64_sh64l_vec)        tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
718     bfd_elf64_sh64lin_vec)      tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
719     bfd_elf64_sh64blin_vec)     tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
720     bfd_elf64_sh64lnbsd_vec)    tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
721     bfd_elf64_sh64nbsd_vec)     tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
722     bfd_elf64_sparc_vec)        tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
723     bfd_elf64_sparc_freebsd_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
724     bfd_elf64_tradbigmips_vec)  tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
725     bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
726     bfd_elf64_x86_64_freebsd_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;;
727     bfd_elf64_x86_64_vec)       tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;;
728     bfd_mmo_vec)                tb="$tb mmo.lo" target_size=64 ;;
729     bfd_powerpc_pe_vec)         tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
730     bfd_powerpc_pei_vec)        tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
731     bfd_powerpcle_pe_vec)       tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
732     bfd_powerpcle_pei_vec)      tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
733     cris_aout_vec)              tb="$tb aout-cris.lo" ;;
734     demo_64_vec)                tb="$tb demo64.lo aout64.lo"; target_size=64 ;;
735     ecoff_big_vec)              tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
736     ecoff_biglittle_vec)        tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
737     ecoff_little_vec)           tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
738     ecoffalpha_little_vec)      tb="$tb coff-alpha.lo ecoff.lo ecofflink.lo"; target_size=64 ;;
739     go32coff_vec)               tb="$tb coff-go32.lo cofflink.lo" ;;
740     go32stubbedcoff_vec)        tb="$tb coff-stgo32.lo cofflink.lo" ;;
741     h8300coff_vec)              tb="$tb coff-h8300.lo reloc16.lo" ;;
742     h8500coff_vec)              tb="$tb coff-h8500.lo reloc16.lo" ;;
743     host_aout_vec)              tb="$tb host-aout.lo aout32.lo" ;;
744     hp300bsd_vec)               tb="$tb hp300bsd.lo aout32.lo" ;;
745     hp300hpux_vec)              tb="$tb hp300hpux.lo aout32.lo" ;;
746     i386aout_vec)               tb="$tb i386aout.lo aout32.lo" ;;
747     i386bsd_vec)                tb="$tb i386bsd.lo aout32.lo" ;;
748     i386coff_vec)               tb="$tb coff-i386.lo cofflink.lo" ;;
749     x86_64coff_vec)             tb="$tb coff-x86_64.lo cofflink.lo"; target_size=64 ;;
750     i386dynix_vec)              tb="$tb i386dynix.lo aout32.lo" ;;
751     i386freebsd_vec)            tb="$tb i386freebsd.lo aout32.lo" ;;
752     i386linux_vec)              tb="$tb i386linux.lo aout32.lo" ;;
753     i386lynx_aout_vec)          tb="$tb i386lynx.lo lynx-core.lo aout32.lo" ;;
754     i386lynx_coff_vec)          tb="$tb cf-i386lynx.lo cofflink.lo lynx-core.lo" ;;
755     i386mach3_vec)              tb="$tb i386mach3.lo aout32.lo" ;;
756     i386msdos_vec)              tb="$tb i386msdos.lo" ;;
757     i386netbsd_vec)             tb="$tb i386netbsd.lo aout32.lo" ;;
758     i386os9k_vec)               tb="$tb i386os9k.lo aout32.lo" ;;
759     i386pe_vec)                 tb="$tb pe-i386.lo peigen.lo cofflink.lo" ;;
760     i386pei_vec)                tb="$tb pei-i386.lo peigen.lo cofflink.lo" ;;
761     x86_64pe_vec)               tb="$tb pe-x86_64.lo pex64igen.lo cofflink.lo"; target_size=64 ;;
762     x86_64pei_vec)              tb="$tb pei-x86_64.lo pex64igen.lo cofflink.lo"; target_size=64 ;;
763     i860coff_vec)               tb="$tb coff-i860.lo cofflink.lo" ;;
764     icoff_big_vec)              tb="$tb coff-i960.lo cofflink.lo" ;;
765     icoff_little_vec)           tb="$tb coff-i960.lo cofflink.lo" ;;
766     ieee_vec)                   tb="$tb ieee.lo" ;;
767     m68k4knetbsd_vec)           tb="$tb m68k4knetbsd.lo aout32.lo" ;;
768     m68kaux_coff_vec)           tb="$tb coff-aux.lo coff-m68k.lo cofflink.lo" ;;
769     m68kcoff_vec)               tb="$tb coff-m68k.lo cofflink.lo" ;;
770     m68kcoffun_vec)             tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;;
771     m68klinux_vec)              tb="$tb m68klinux.lo aout32.lo" ;;
772     m68knetbsd_vec)             tb="$tb m68knetbsd.lo aout32.lo" ;;
773     m68ksysvcoff_vec)           tb="$tb coff-svm68k.lo cofflink.lo" ;;
774     m88kbcs_vec)                tb="$tb coff-m88k.lo" ;;
775     m88kmach3_vec)              tb="$tb m88kmach3.lo aout32.lo" ;;
776     m88kopenbsd_vec)            tb="$tb m88kopenbsd.lo aout32.lo" ;;
777     maxqcoff_vec)               tb="$tb coff-maxq.lo" ;;
778     mach_o_be_vec)              tb="$tb mach-o.lo" ;;
779     mach_o_le_vec)              tb="$tb mach-o.lo" ;;
780     mach_o_fat_vec)             tb="$tb mach-o.lo" ;;
781     mcore_pe_big_vec)           tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;;
782     mcore_pe_little_vec)        tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;;
783     mcore_pei_big_vec)          tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;;
784     mcore_pei_little_vec)       tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;;
785     mipslpe_vec)                tb="$tb pe-mips.lo peigen.lo cofflink.lo" ;;
786     mipslpei_vec)               tb="$tb pei-mips.lo peigen.lo cofflink.lo" ;;
787     newsos3_vec)                tb="$tb newsos3.lo aout32.lo" ;;
788     nlm32_alpha_vec)            tb="$tb nlm32-alpha.lo nlm32.lo nlm.lo"; target_size=64 ;;
789     nlm32_i386_vec)             tb="$tb nlm32-i386.lo nlm32.lo nlm.lo" ;;
790     nlm32_powerpc_vec)          tb="$tb nlm32-ppc.lo nlm32.lo nlm.lo" ;;
791     nlm32_sparc_vec)            tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;;
792     or32coff_big_vec)           tb="$tb coff-or32.lo cofflink.lo" ;;
793     pc532machaout_vec)          tb="$tb pc532-mach.lo aout-ns32k.lo" ;;
794     pc532netbsd_vec)            tb="$tb ns32knetbsd.lo aout-ns32k.lo" ;;
795     pef_vec)                    tb="$tb pef.lo" ;;
796     pef_xlib_vec)               tb="$tb pef.lo" ;;
797     pdp11_aout_vec)             tb="$tb pdp11.lo" ;;
798     pmac_xcoff_vec)             tb="$tb coff-rs6000.lo xcofflink.lo" ;;
799     ppcboot_vec)                tb="$tb ppcboot.lo" ;;
800     riscix_vec)                 tb="$tb aout32.lo riscix.lo" ;;
801     rs6000coff64_vec)           tb="$tb coff64-rs6000.lo xcofflink.lo aix5ppc-core.lo"; target_size=64 ;;
802     rs6000coff_vec)             tb="$tb coff-rs6000.lo xcofflink.lo" ;;
803     shcoff_small_vec)           tb="$tb coff-sh.lo cofflink.lo" ;;
804     shcoff_vec)                 tb="$tb coff-sh.lo cofflink.lo" ;;
805     shlcoff_small_vec)          tb="$tb coff-sh.lo cofflink.lo" ;;
806     shlcoff_vec)                tb="$tb coff-sh.lo cofflink.lo" ;;
807     shlpe_vec)                  tb="$tb pe-sh.lo coff-sh.lo peigen.lo cofflink.lo" ;;
808     shlpei_vec)                 tb="$tb pei-sh.lo coff-sh.lo peigen.lo cofflink.lo" ;;
809     som_vec)                    tb="$tb som.lo" ;;
810     sparccoff_vec)              tb="$tb coff-sparc.lo" ;;
811     sparcle_aout_vec)           tb="$tb aout-sparcle.lo aout32.lo" ;;
812     sparclinux_vec)             tb="$tb sparclinux.lo aout32.lo" ;;
813     sparclynx_aout_vec)         tb="$tb sparclynx.lo lynx-core.lo aout32.lo" ;;
814     sparclynx_coff_vec)         tb="$tb cf-sparclynx.lo lynx-core.lo" ;;
815     sparcnetbsd_vec)            tb="$tb sparcnetbsd.lo aout32.lo" ;;
816     sunos_big_vec)              tb="$tb sunos.lo aout32.lo" ;;
817     sym_vec)                    tb="$tb xsym.lo" ;;
818     tic30_aout_vec)             tb="$tb aout-tic30.lo" ;;
819     tic30_coff_vec)             tb="$tb coff-tic30.lo" ;;
820     tic4x_coff0_vec)            tb="$tb coff-tic4x.lo" ;;
821     tic4x_coff0_beh_vec)        tb="$tb coff-tic4x.lo" ;;
822     tic4x_coff1_vec)            tb="$tb coff-tic4x.lo" ;;
823     tic4x_coff1_beh_vec)        tb="$tb coff-tic4x.lo" ;;
824     tic4x_coff2_vec)            tb="$tb coff-tic4x.lo" ;;
825     tic4x_coff2_beh_vec)        tb="$tb coff-tic4x.lo" ;;
826     tic54x_coff0_beh_vec)       tb="$tb coff-tic54x.lo" ;;
827     tic54x_coff0_vec)           tb="$tb coff-tic54x.lo" ;;
828     tic54x_coff1_beh_vec)       tb="$tb coff-tic54x.lo" ;;
829     tic54x_coff1_vec)           tb="$tb coff-tic54x.lo" ;;
830     tic54x_coff2_beh_vec)       tb="$tb coff-tic54x.lo" ;;
831     tic54x_coff2_vec)           tb="$tb coff-tic54x.lo" ;;
832     tic80coff_vec)              tb="$tb coff-tic80.lo cofflink.lo" ;;
833     vaxnetbsd_vec)              tb="$tb vaxnetbsd.lo aout32.lo" ;;
834     vax1knetbsd_vec)            tb="$tb vax1knetbsd.lo aout32.lo" ;;
835     vaxbsd_vec)                 tb="$tb vaxbsd.lo aout32.lo" ;;
836     versados_vec)               tb="$tb versados.lo" ;;
837     vms_alpha_vec)              tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo"; target_size=64 ;;
838     vms_vax_vec)                tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo" ;;
839     w65_vec)                    tb="$tb coff-w65.lo reloc16.lo" ;;
840     we32kcoff_vec)              tb="$tb coff-we32k.lo" ;;
841     z80coff_vec)                tb="$tb coff-z80.lo reloc16.lo" ;;
842     z8kcoff_vec)                tb="$tb coff-z8k.lo reloc16.lo cofflink.lo" ;;
844     # These appear out of order in targets.c
845     srec_vec)                   tb="$tb srec.lo" ;;
846     symbolsrec_vec)             tb="$tb srec.lo" ;;
847     tekhex_vec)                 tb="$tb tekhex.lo" ;;
848     cisco_core_big_vec)         tb="$tb cisco-core.lo" ;;
849     cisco_core_little_vec)      tb="$tb cisco-core.lo" ;;
851     "")                 ;;
852     *) AC_MSG_ERROR(*** unknown target vector $vec) ;;
853     esac
855     if test ${target_size} = 64; then
856         target64=true
857     fi
858     if test x"${vec}" = x"${defvec}"; then
859         bfd_default_target_size=${target_size}
860     fi
861 done
863 # Target architecture .o files.
864 # A couple of CPUs use shorter file names to avoid problems on DOS
865 # filesystems.
866 ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.lo/g -e s/mn10200/m10200/ -e s/mn10300/m10300/`
868 # Weed out duplicate .o files.
869 f=""
870 for i in $tb ; do
871     case " $f " in
872     *" $i "*) ;;
873     *) f="$f $i" ;;
874     esac
875 done
876 tb="$f"
878 f=""
879 for i in $ta ; do
880     case " $f " in
881     *" $i "*) ;;
882     *) f="$f $i" ;;
883     esac
884 done
885 ta="$f"
887 bfd_backends="$tb"
888 bfd_machines="$ta"
890 if test x${all_targets} = xtrue ; then
891   bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)'
892   bfd_machines="${bfd_machines}"' $(ALL_MACHINES)'
893   selvecs=
894   havevecs=
895   selarchs=
896   test -n "$assocvecs" &&
897     assocvecs=`echo $assocvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
898 else    # all_targets is true
899   # Only set these if they will be nonempty, for the clever echo.
900   havevecs=
901   assocvecs=
902   test -n "$selvecs" &&
903     havevecs=`echo $selvecs | sed -e 's/^/-DHAVE_/' -e 's/ \(.\)/ -DHAVE_\1/g'`
904   test -n "$selvecs" &&
905     selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
906   test -n "$selarchs" &&
907     selarchs=`echo $selarchs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
908 fi      # all_targets is true
910 case ${host64}-${target64}-${want64} in
911   *true*)
912     wordsize=64
913     bfd_libs='$(BFD64_LIBS) $(BFD32_LIBS)'
914     all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)'
915     if test $BFD_HOST_64_BIT_DEFINED = 0; then
916       AC_MSG_WARN([You have requested a 64 bit BFD configuration, but])
917       AC_MSG_WARN([your compiler may not have a 64 bit integral type])
918     fi
919     if test -n "$GCC" ; then
920        bad_64bit_gcc=no;
921        AC_MSG_CHECKING([for gcc version with buggy 64-bit support])
922        # Add more tests for gcc versions with non-working 64-bit support here.
923        AC_EGREP_CPP([: 2 : 91 : 1 :],[:__GNUC__:__GNUC_MINOR__:__i386__:],
924                     bad_64bit_gcc=yes;
925                     AC_MSG_RESULT([yes: egcs-1.1.2 on ix86 spotted]),
926                     AC_MSG_RESULT(no))
927        if test $bad_64bit_gcc = yes ; then
928          AC_MSG_ERROR([A newer version of gcc is needed for the requested 64-bit BFD configuration])
929        fi
930     fi
931     ;;
932   false-false-false)
933     wordsize=32
934     bfd_libs='$(BFD32_LIBS)'
935     all_backends='$(BFD32_BACKENDS)'
936     ;;
937 esac
939 AC_SUBST(wordsize)
940 AC_SUBST(bfd_libs)
941 AC_SUBST(all_backends)
942 AC_SUBST(bfd_backends)
943 AC_SUBST(bfd_machines)
944 AC_SUBST(bfd_default_target_size)
946 # Determine the host dependant file_ptr a.k.a. off_t type.  In order
947 # prefer: off64_t - if ftello64 and fseeko64, off_t - if ftello and
948 # fseeko, long.  This assumes that sizeof off_t is .ge. sizeof long.
949 # Hopefully a reasonable assumption since fseeko et.al. should be
950 # upward compatible.
951 AC_CHECK_FUNCS(ftello ftello64 fseeko fseeko64 fopen64)
952 if test x"$ac_cv_func_ftello" = xyes -a x"$ac_cv_func_fseeko" = xyes; then
953     AC_CHECK_SIZEOF(off_t)
955 AC_MSG_CHECKING([file_ptr type])
956 bfd_file_ptr="long"
957 bfd_ufile_ptr="unsigned long"
958 if test x"$ac_cv_func_ftello64" = xyes -a x"$ac_cv_func_fseeko64" = xyes \
959         -o x"${ac_cv_sizeof_off_t}" = x8; then
960     bfd_file_ptr=BFD_HOST_64_BIT
961     bfd_ufile_ptr=BFD_HOST_U_64_BIT
963 AC_MSG_RESULT($bfd_file_ptr)
964 AC_SUBST(bfd_file_ptr)
965 AC_SUBST(bfd_ufile_ptr)
968 tdefaults=""
969 test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
970 test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'"
971 test -n "${assocvecs}" && tdefaults="${tdefaults} -DASSOCIATED_VECS='${assocvecs}'"
972 test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'"
973 test -n "${havevecs}" && tdefaults="${tdefaults} ${havevecs}"
974 AC_SUBST(tdefaults)
976 dnl AC_CHECK_HEADERS(sys/mman.h)
977 AC_FUNC_MMAP
978 AC_CHECK_FUNCS(madvise mprotect)
979 case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in
980   true+yes )  AC_DEFINE(USE_MMAP, 1, [Use mmap if it's available?]) ;;
981 esac
983 rm -f doc/config.status
984 AC_CONFIG_FILES([Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in])
986 dnl We need this duplication, even though we use AM_PO_SUBDIRS, because of
987 dnl our two separate POTFILES.  Yuck.
988 AC_CONFIG_COMMANDS([default],
990 case "$srcdir" in
991   .) srcdirpre= ;;
992   *) srcdirpre='$(srcdir)/' ;;
993 esac
994 POFILES=
995 GMOFILES=
996 for lang in dummy $OBSOLETE_ALL_LINGUAS; do
997   if test $lang != dummy; then
998     POFILES="$POFILES $srcdirpre$lang.po"
999     GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
1000   fi
1001 done
1002 sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' \
1003     -e '/BLD-POTFILES =/r po/BLD-POTFILES' \
1004     -e "s,@POFILES@,$POFILES," \
1005     -e "s,@GMOFILES@,$GMOFILES," \
1006     po/Makefile.in > po/Makefile]],[[]])
1008 dnl Required by html and install-html
1009 AC_SUBST(datarootdir)
1010 AC_SUBST(docdir)
1011 AC_SUBST(htmldir)
1013 AC_OUTPUT