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