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