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