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