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