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