* Makefile.am (ALL_MACHINES,BFD32_BACKENDS): Add txvu support.
[external/binutils.git] / bfd / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2 dnl
3
4 dnl Default to a non shared library.  This may be overridden by the
5 dnl configure option --enable-shared.  The divert stuff is a hack
6 dnl to set the variable before argument parsing is done.
7 divert(AC_DIVERSION_INIT)
8 enable_shared=no
9 divert(-1)
10
11 AC_PREREQ(2.5)
12 AC_INIT(libbfd.c)
13
14 AC_CANONICAL_SYSTEM
15 AC_ISC_POSIX
16
17 AM_INIT_AUTOMAKE(bfd, 2.8.2)
18
19 dnl These must be called before AM_PROG_LIBTOOL, because it may want
20 dnl to call AC_CHECK_PROG.
21 AC_CHECK_TOOL(AR, ar)
22 AC_CHECK_TOOL(RANLIB, ranlib, :)
23
24 AM_PROG_LIBTOOL
25
26 AC_ARG_ENABLE(64-bit-bfd,
27 [  --enable-64-bit-bfd     64-bit support (on hosts with narrower word sizes)],
28 [case "${enableval}" in
29   yes)  want64=true  ;;
30   no)   want64=false ;;
31   *)    AC_MSG_ERROR(bad value ${enableval} for 64-bit-bfd option) ;;
32 esac],[want64=false])dnl
33 AC_ARG_ENABLE(targets,
34 [  --enable-targets        alternative target configurations],
35 [case "${enableval}" in
36   yes | "") AC_ERROR(enable-targets option must specify target names or 'all')
37             ;;
38   no)       enable_targets= ;;
39   *)        enable_targets=$enableval ;;
40 esac])dnl
41 AC_ARG_ENABLE(commonbfdlib,
42 [  --enable-commonbfdlib   build shared BFD/opcodes/libiberty library],
43 [case "${enableval}" in
44   yes) commonbfdlib=true ;;
45   no)  commonbfdlib=false ;;
46   *)   AC_MSG_ERROR([bad value ${enableval} for BFD commonbfdlib option]) ;;
47 esac])dnl
48 AC_ARG_WITH(mmap,
49 [  --with-mmap             try using mmap for BFD input files if available],
50 [case "${withval}" in
51   yes)  want_mmap=true ;;
52   no)   want_mmap=false ;;
53   *)    AC_MSG_ERROR(bad value ${withval} for BFD with-mmap option) ;;
54 esac],[want_mmap=false])dnl
55
56 AM_CONFIG_HEADER(config.h:config.in)
57
58 if test -z "$target" ; then
59     AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
60 fi
61 AC_ARG_PROGRAM
62
63 AM_MAINTAINER_MODE
64 AM_CYGWIN32
65 AM_EXEEXT
66
67 host64=false
68 target64=false
69
70 # host stuff:
71
72 AC_PROG_CC
73
74 # Permit host specific settings.
75 . ${srcdir}/configure.host
76
77 AC_SUBST(HDEFINES)
78 AM_PROG_INSTALL
79
80 BFD_HOST_64BIT_LONG=0
81 BFD_HOST_64_BIT_DEFINED=0
82 BFD_HOST_64_BIT=
83 BFD_HOST_U_64_BIT=
84 if test "x${HOST_64BIT_TYPE}" = "xlong"; then
85   BFD_HOST_64BIT_LONG=1
86 elif test "x${HOST_64BIT_TYPE}" != "x"; then
87   BFD_HOST_64_BIT_DEFINED=1
88   BFD_HOST_64_BIT=${HOST_64BIT_TYPE}
89   BFD_HOST_U_64_BIT=${HOST_U_64BIT_TYPE}
90 fi
91 AC_SUBST(BFD_HOST_64BIT_LONG)
92 AC_SUBST(BFD_HOST_64_BIT_DEFINED)
93 AC_SUBST(BFD_HOST_64_BIT)
94 AC_SUBST(BFD_HOST_U_64_BIT)
95
96 BFD_CC_FOR_BUILD
97
98 AC_CHECK_HEADERS(stddef.h string.h strings.h stdlib.h time.h unistd.h)
99 AC_CHECK_HEADERS(fcntl.h sys/file.h sys/time.h)
100 AC_HEADER_TIME
101 AC_CHECK_FUNCS(fcntl getpagesize setitimer sysconf fdopen)
102
103 BFD_BINARY_FOPEN
104
105 BFD_NEED_DECLARATION(strstr)
106 BFD_NEED_DECLARATION(malloc)
107 BFD_NEED_DECLARATION(realloc)
108 BFD_NEED_DECLARATION(free)
109 BFD_NEED_DECLARATION(getenv)
110
111 # If we are configured native, pick a core file support file.
112 COREFILE=
113 COREFLAG=
114 if test "${target}" = "${host}"; then
115   case "${host}" in
116   alpha*-*-linux*)
117         COREFILE=trad-core.lo
118         AC_DEFINE(TRAD_HEADER,"hosts/alphalinux.h")
119         ;;
120   alpha*-*-*)           COREFILE=osf-core.lo ;;
121   arm-*-riscix)         COREFILE=trad-core.lo ;;
122   hppa*-*-hpux*)        COREFILE=hpux-core.lo ;;
123   hppa*-*-hiux*)        COREFILE=hpux-core.lo ;;
124   hppa*-*-bsd*)         COREFILE="hpux-core.lo hppabsd-core.lo"
125                         COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
126 changequote(,)dnl
127   i[3456]86-sequent-bsd*)
128 changequote([,])dnl
129         COREFILE=trad-core.lo;
130         AC_DEFINE(TRAD_HEADER,"hosts/symmetry.h")
131         ;;
132 changequote(,)dnl
133   i[3456]86-sequent-sysv4*) ;;
134   i[3456]86-sequent-sysv*)
135 changequote([,])dnl
136         COREFILE=trad-core.lo
137         AC_DEFINE(TRAD_HEADER,"hosts/symmetry.h")
138         ;;
139 changequote(,)dnl
140   i[3456]86-*-bsd* | i[3456]86-*-freebsd*)
141 changequote([,])dnl
142         COREFILE=trad-core.lo
143         AC_DEFINE(TRAD_HEADER,"hosts/i386bsd.h")
144         ;;
145 changequote(,)dnl
146   i[3456]86-*-netbsd* | i[3456]86-*-openbsd*)
147 changequote([,])dnl
148         COREFILE=netbsd-core.lo
149         ;;
150 changequote(,)dnl
151   i[3456]86-esix-sysv3*)
152 changequote([,])dnl
153         COREFILE=trad-core.lo
154         AC_DEFINE(TRAD_HEADER,"hosts/esix.h")
155         ;;
156 changequote(,)dnl
157   i[3456]86-*-sco* | i[3456]86-*-isc*)
158 changequote([,])dnl
159         COREFILE=trad-core.lo
160         AC_DEFINE(TRAD_HEADER,"hosts/i386sco.h")
161         ;;
162 changequote(,)dnl
163   i[3456]86-*-mach3*)
164 changequote([,])dnl
165         COREFILE=trad-core.lo
166         AC_DEFINE(TRAD_HEADER,"hosts/i386mach3.h")
167         ;;
168 changequote(,)dnl
169   i[3456]86-*-linux*)
170 changequote([,])dnl
171         COREFILE=trad-core.lo
172         AC_DEFINE(TRAD_HEADER,"hosts/i386linux.h")
173         ;;
174 changequote(,)dnl
175   i[3456]86-*-isc*)     COREFILE=trad-core.lo ;;
176   i[3456]86-*-aix*)     COREFILE=aix386-core.lo ;;
177 changequote([,])dnl
178   i860-*-mach3* | i860-*-osf1*)
179         COREFILE=trad-core.lo
180         AC_DEFINE(TRAD_HEADER,"hosts/i860mach3.h")
181         ;;
182   mips-dec-bsd*)
183         COREFILE=trad-core.lo
184         AC_DEFINE(TRAD_HEADER,"hosts/mipsbsd.h")
185         ;;
186   mips-dec-mach3*)
187         COREFILE=trad-core.lo
188         AC_DEFINE(TRAD_HEADER,"hosts/mipsmach3.h")
189         ;;
190   mips-*-netbsd* | mips*-*-openbsd*)
191         COREFILE=netbsd-core.lo
192         ;;
193   mips-dec-*)
194         COREFILE=trad-core.lo
195         AC_DEFINE(TRAD_HEADER,"hosts/decstation.h")
196         ;;
197   mips-sgi-irix4*)      COREFILE=irix-core.lo ;;
198   mips-sgi-irix5*)      COREFILE=irix-core.lo ;;
199   mips-sgi-irix6*)      COREFILE=irix-core.lo ;;
200   mips-*-mach3*)
201         COREFILE=trad-core.lo
202         AC_DEFINE(TRAD_HEADER,"hosts/mipsmach3.h")
203         ;;
204   mips-*-sysv4*)        ;;
205   mips-*-sysv* | mips-*-riscos*)
206         COREFILE=trad-core.lo
207         AC_DEFINE(TRAD_HEADER,"hosts/riscos.h")
208         ;;
209   mips-sony-bsd*)
210         COREFILE=trad-core.lo
211         AC_DEFINE(TRAD_HEADER,"hosts/news-mips.h")
212         ;;
213   m68*-bull*-sysv*)
214         COREFILE=trad-core.lo
215         AC_DEFINE(TRAD_HEADER,"hosts/dpx2.h")
216         ;;
217   m68*-hp-hpux*)        COREFILE=hpux-core.lo ;;
218   m68*-hp-bsd*)
219         COREFILE=trad-core.lo
220         AC_DEFINE(TRAD_HEADER,"hosts/hp300bsd.h")
221         ;;
222   m68*-*-linux*)
223         COREFILE=trad-core.lo
224         AC_DEFINE(TRAD_HEADER,"hosts/m68klinux.h")
225         ;;
226   m68*-motorola-sysv*)
227         COREFILE=trad-core.lo
228         AC_DEFINE(TRAD_HEADER, "hosts/delta68.h")
229         ;;
230   m68*-sony-*)
231         COREFILE=trad-core.lo
232         AC_DEFINE(TRAD_HEADER,"hosts/news.h")
233         ;;
234   m68*-*-netbsd* | m68*-*-openbsd*)
235         COREFILE=netbsd-core.lo
236         ;;
237   m68*-apple-aux*)
238         COREFILE=trad-core.lo
239         AC_DEFINE(TRAD_HEADER,"hosts/m68kaux.h")
240         ;;
241   m88*-*-sysv4*)        ;;
242   m88*-motorola-sysv*)  COREFILE=ptrace-core.lo ;;
243   m88*-*-mach3*)
244         COREFILE=trad-core.lo
245         AC_DEFINE(TRAD_HEADER,"hosts/m88kmach3.h")
246         ;;
247   ns32k-pc532-mach)
248         COREFILE=trad-core.lo
249         AC_DEFINE(TRAD_HEADER,"hosts/pc532mach.h")
250         ;;
251   ns32k-*-netbsd* | ns32k-*-openbsd*)
252         COREFILE=netbsd-core.lo
253         ;;
254   rs6000-*-lynx*)       COREFILE=lynx-core.lo ;;
255   rs6000-*-aix4*)       COREFILE=rs6000-core.lo ;;
256   rs6000-*-*)           COREFILE=rs6000-core.lo ;;
257   powerpc-*-*bsd*)      COREFILE=netbsd-core.lo ;;
258   powerpc-*-aix4*)      COREFILE=rs6000-core.lo ;;
259   powerpc-*-aix*)       COREFILE=rs6000-core.lo ;;
260   powerpc-*-beos*)      ;;
261   sparc-*-netbsd* | sparc-*-openbsd*)
262         COREFILE=netbsd-core.lo
263         ;;
264   sparc*-*-linux*)
265         COREFILE=trad-core.lo
266         AC_DEFINE(TRAD_HEADER,"hosts/sparclinux.h")
267         ;;
268   tahoe-*-*)
269         COREFILE=trad-core.lo
270         AC_DEFINE(TRAD_HEADER,"hosts/tahoe.h")
271         ;;
272   vax-*-ultrix2*)
273         COREFILE=trad-core.lo
274         AC_DEFINE(TRAD_HEADER,"hosts/vaxult2.h")
275         ;;
276   vax-*-ultrix*)
277         COREFILE=trad-core.lo
278         AC_DEFINE(TRAD_HEADER,"hosts/vaxult2.h")
279         ;;
280   vax-*-*)
281         COREFILE=trad-core.lo
282         AC_DEFINE(TRAD_HEADER,"hosts/vaxbsd.h")
283         ;;
284   esac
285
286   case "$COREFILE" in
287   aix386-core.lo)       COREFLAG=-DAIX386_CORE ;;
288   hppabsd-core.lo)      COREFLAG=-DHPPABSD_CORE ;;
289   hpux-core.lo)         COREFLAG=-DHPUX_CORE ;;
290   irix-core.lo)         COREFLAG=-DIRIX_CORE ;;
291   lynx-core.lo)         COREFLAG=-DLYNX_CORE ;;
292   osf-core.lo)          COREFLAG=-DOSF_CORE ;;
293   ptrace-core.lo)       COREFLAG=-DPTRACE_CORE ;;
294   rs6000-core.lo)       COREFLAG="$COREFLAG -DAIX_CORE" ;;
295   trad-core.lo)         COREFLAG="$COREFLAG -DTRAD_CORE" ;;
296   esac
297
298   # The ELF code uses the native <sys/procfs.h> to handle core files.
299   # Define HAVE_SYS_PROCFS_H if the file exists and defines
300   # prstatus_t.
301   AC_MSG_CHECKING([for sys/procfs.h])
302   AC_CACHE_VAL(bfd_cv_header_sys_procfs_h,
303   [AC_TRY_COMPILE([#include <sys/procfs.h>],
304   [prstatus_t t;],
305   bfd_cv_header_sys_procfs_h=yes, bfd_cv_header_sys_procfs_h=no)])
306   AC_MSG_RESULT($bfd_cv_header_sys_procfs_h)
307   if test $bfd_cv_header_sys_procfs_h = yes; then
308     AC_DEFINE(HAVE_SYS_PROCFS_H)
309   fi
310
311 fi
312 AC_SUBST(COREFILE)
313 AC_SUBST(COREFLAG)
314
315 # target stuff:
316
317 # Canonicalize the secondary target names.
318 if test -n "$enable_targets" ; then
319     for targ in `echo $enable_targets | sed 's/,/ /g'`
320     do
321         result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ 2>/dev/null`
322         if test -n "$result" ; then
323             canon_targets="$canon_targets $result"
324         else
325             # Allow targets that config.sub doesn't recognize, like "all".
326             canon_targets="$canon_targets $targ"
327         fi
328     done
329 fi
330
331 all_targets=false
332 defvec=
333 selvecs=
334 selarchs=
335 TDEFINES=
336 for targ in $target $canon_targets
337 do
338     if test "x$targ" = "xall"; then
339         all_targets=true
340     else
341         . $srcdir/config.bfd
342         if test "x$targ" = "x$target"; then
343             defvec=$targ_defvec
344         fi
345         selvecs="$selvecs $targ_defvec $targ_selvecs"
346         selarchs="$selarchs $targ_archs"
347         TDEFINES="$TDEFINES $targ_cflags"
348     fi
349 done
350 AC_SUBST(TDEFINES)
351
352 # This processing still needs to be done if we're to decide properly whether
353 # 64-bit support needs to be compiled in.  Currently, it will be included if
354 # the default or any other explicitly requested target requires it; it
355 # will not be included on a 32-bit host if no 64-bit target is requested, and
356 # no "--with-64-bit-bfd" option is given, even if "--with-targets=all" is
357 # used.
358
359 # uniq the default and selected vectors in all the configured targets.
360 f=""
361 for i in $selvecs ; do
362     case " $f " in
363     *" $i "*) ;;
364     *) f="$f $i" ;;
365     esac
366 done
367 selvecs="$f"
368
369 # uniq the architectures in all the configured targets.
370 f=""
371 for i in $selarchs ; do
372     case " $f " in
373     *" $i "*) ;;
374     *) f="$f $i" ;;
375     esac
376 done
377 selarchs="$f"
378
379 # Target backend .o files.
380 tb=
381
382 elf="elflink.lo dwarf2.lo"
383
384 for vec in $selvecs
385 do
386     case "$vec" in
387     # This list is alphabetized to make it easy to compare
388     # with the two vector lists in targets.c.
389     a29kcoff_big_vec)           tb="$tb coff-a29k.lo cofflink.lo" ;;
390     a_out_adobe_vec)            tb="$tb aout-adobe.lo aout32.lo" ;;
391     armcoff_little_vec)         tb="$tb coff-arm.lo cofflink.lo " ;;
392     armcoff_big_vec)            tb="$tb coff-arm.lo cofflink.lo " ;;
393     armpe_little_vec)           tb="$tb pe-arm.lo cofflink.lo " ;;
394     armpe_big_vec)              tb="$tb pe-arm.lo cofflink.lo " ;;
395     armpei_little_vec)          tb="$tb pei-arm.lo cofflink.lo " ;;
396     armpei_big_vec)             tb="$tb pei-arm.lo cofflink.lo " ;;
397     aout0_big_vec)              tb="$tb aout0.lo aout32.lo" ;;
398     aout_arm_big_vec)           tb="$tb aout-arm.lo aout32.lo" ;;
399     aout_arm_little_vec)        tb="$tb aout-arm.lo aout32.lo" ;;
400     aout_mips_big_vec)          tb="$tb mipsbsd.lo aout32.lo" ;;
401     aout_mips_little_vec)       tb="$tb mipsbsd.lo aout32.lo" ;;
402     apollocoff_vec)             tb="$tb coff-apollo.lo" ;;
403     b_out_vec_big_host)         tb="$tb bout.lo aout32.lo" ;;
404     b_out_vec_little_host)      tb="$tb bout.lo aout32.lo" ;;
405     bfd_elf64_alpha_vec)        tb="$tb elf64-alpha.lo elf64.lo $elf"
406                                 target64=true ;;
407     bfd_elf32_littlearc_vec)    tb="$tb elf32-arc.lo elf32.lo $elf" ;;
408     bfd_elf32_bigarc_vec)       tb="$tb elf32-arc.lo elf32.lo $elf" ;;
409     bfd_elf32_big_generic_vec)  tb="$tb elf32-gen.lo elf32.lo $elf" ;;
410     bfd_elf32_bigmips_vec)      tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
411     bfd_elf64_bigmips_vec)      tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"
412                                 target64=true ;;
413     bfd_elf32_d10v_vec)         tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
414 # start-sanitize-d30v
415     bfd_elf32_d30v_vec)         tb="$tb elf32-d30v.lo elf32.lo $elf" ;;
416 # end-sanitize-d30v
417     bfd_elf32_hppa_vec)         tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
418     bfd_elf32_i386_vec)         tb="$tb elf32-i386.lo elf32.lo $elf" ;;
419     bfd_elf32_i860_vec)         tb="$tb elf32-i860.lo elf32.lo $elf" ;;
420     bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
421     bfd_elf32_littlemips_vec)   tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
422     bfd_elf64_littlemips_vec)   tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"
423                                 target64=true ;;
424     bfd_elf32_m32r_vec)         tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
425     bfd_elf32_m68k_vec)         tb="$tb elf32-m68k.lo elf32.lo $elf" ;;
426     bfd_elf32_m88k_vec)         tb="$tb elf32-m88k.lo elf32.lo $elf" ;;
427     bfd_elf32_mn10200_vec)      tb="$tb elf-m10200.lo elf32.lo $elf" ;;
428     bfd_elf32_mn10300_vec)      tb="$tb elf-m10300.lo elf32.lo $elf" ;;
429     bfd_elf32_powerpc_vec)      tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
430     bfd_elf32_powerpcle_vec)    tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
431     bfd_elf32_sh_vec)           tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
432     bfd_elf32_shl_vec)          tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
433     bfd_elf32_sparc_vec)        tb="$tb elf32-sparc.lo elf32.lo $elf" ;;
434 # start-sanitize-sky
435     bfd_elf32_txvu_vec)         tb="$tb elf32-txvu.lo elf32.lo $elf" ;;
436 # end-sanitize-sky
437     bfd_elf32_v850_vec)         tb="$tb elf32-v850.lo elf32.lo $elf" ;;
438     bfd_elf64_big_generic_vec)  tb="$tb elf64-gen.lo elf64.lo $elf"
439                                 target64=true ;;
440     bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"
441                                 target64=true ;;
442     bfd_elf64_sparc_vec)        tb="$tb elf64-sparc.lo elf64.lo $elf"
443                                 target64=true ;;
444     cisco_core_vec)             tb="$tb cisco-core.lo" ;;
445     demo_64_vec)                tb="$tb demo64.lo aout64.lo"
446                                 target64=true ;;
447     ecoff_big_vec)              tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
448     ecoff_little_vec)           tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
449     ecoff_biglittle_vec)        tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
450     ecoffalpha_little_vec)      tb="$tb coff-alpha.lo ecoff.lo ecofflink.lo"
451                                 target64=true ;;
452     go32coff_vec)               tb="$tb coff-go32.lo cofflink.lo" ;;
453     go32stubbedcoff_vec)        tb="$tb coff-stgo32.lo cofflink.lo" ;;
454     evax_alpha_vec)             tb="$tb evax-alpha.lo evax-emh.lo evax-egsd.lo evax-etir.lo evax-misc.lo"
455                                 target64=true ;;
456     h8300coff_vec)              tb="$tb coff-h8300.lo reloc16.lo" ;;
457     h8500coff_vec)              tb="$tb coff-h8500.lo reloc16.lo" ;;
458     host_aout_vec)              tb="$tb host-aout.lo aout32.lo" ;;
459     hp300bsd_vec)               tb="$tb hp300bsd.lo aout32.lo" ;;
460     hp300hpux_vec)              tb="$tb hp300hpux.lo aout32.lo" ;;
461     i386aout_vec)               tb="$tb i386aout.lo aout32.lo" ;;
462     i386bsd_vec)                tb="$tb i386bsd.lo aout32.lo" ;;
463     i386coff_vec)               tb="$tb coff-i386.lo cofflink.lo" ;;
464     i386dynix_vec)              tb="$tb i386dynix.lo aout32.lo" ;;
465     i386freebsd_vec)            tb="$tb i386freebsd.lo aout32.lo" ;;
466     i386msdos_vec)              tb="$tb i386msdos.lo" ;;
467     i386pe_vec)                 tb="$tb pe-i386.lo cofflink.lo " ;;
468     i386pei_vec)                tb="$tb pei-i386.lo cofflink.lo" ;;
469     i386linux_vec)              tb="$tb i386linux.lo aout32.lo" ;;
470     i386lynx_aout_vec)          tb="$tb i386lynx.lo lynx-core.lo aout32.lo" ;;
471     i386lynx_coff_vec)          tb="$tb cf-i386lynx.lo cofflink.lo lynx-core.lo" ;;
472     i386mach3_vec)              tb="$tb i386mach3.lo aout32.lo" ;;
473     i386netbsd_vec)             tb="$tb i386netbsd.lo aout32.lo" ;;
474     i386os9k_vec)               tb="$tb i386os9k.lo aout32.lo" ;;
475     i860coff_vec)               tb="$tb coff-i860.lo cofflink.lo" ;;
476     icoff_big_vec)              tb="$tb coff-i960.lo cofflink.lo" ;;
477     icoff_little_vec)           tb="$tb coff-i960.lo cofflink.lo" ;;
478     ieee_vec)                   tb="$tb ieee.lo" ;;
479     m68kcoff_vec)               tb="$tb coff-m68k.lo cofflink.lo" ;;
480     m68kcoffun_vec)             tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;;
481     m68klinux_vec)              tb="$tb m68klinux.lo aout32.lo" ;;
482     m68klynx_aout_vec)          tb="$tb m68klynx.lo lynx-core.lo aout32.lo" ;;
483     m68klynx_coff_vec)          tb="$tb cf-m68klynx.lo coff-m68k.lo cofflink.lo lynx-core.lo" ;;
484     m68knetbsd_vec)             tb="$tb m68knetbsd.lo aout32.lo" ;;
485     m68k4knetbsd_vec)           tb="$tb m68k4knetbsd.lo aout32.lo" ;;
486     m68kaux_coff_vec)           tb="$tb coff-aux.lo coff-m68k.lo cofflink.lo" ;;
487     m68ksysvcoff_vec)           tb="$tb coff-svm68k.lo cofflink.lo" ;;
488     m88kbcs_vec)                tb="$tb coff-m88k.lo" ;;
489     newsos3_vec)                tb="$tb newsos3.lo aout32.lo" ;;
490     nlm32_i386_vec)             tb="$tb nlm32-i386.lo nlm32.lo nlm.lo" ;;
491     nlm32_sparc_vec)            tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;;
492     nlm32_alpha_vec)            tb="$tb nlm32-alpha.lo nlm32.lo nlm.lo"
493                                 target64=true ;;
494     riscix_vec)                 tb="$tb aout32.lo riscix.lo" ;;
495     nlm32_powerpc_vec)          tb="$tb nlm32-ppc.lo nlm32.lo nlm.lo" ;;
496     pc532netbsd_vec)            tb="$tb ns32knetbsd.lo aout-ns32k.lo" ;;
497     pc532machaout_vec)          tb="$tb pc532-mach.lo aout-ns32k.lo" ;;
498     pmac_xcoff_vec)             tb="$tb coff-pmac.lo xcofflink.lo" ;;
499     rs6000coff_vec)             tb="$tb coff-rs6000.lo xcofflink.lo" ;;
500     bfd_powerpc_pe_vec)         tb="$tb pe-ppc.lo cofflink.lo" ;;  
501     bfd_powerpcle_pe_vec)       tb="$tb pe-ppc.lo cofflink.lo" ;;  
502     bfd_powerpc_pei_vec)        tb="$tb pei-ppc.lo cofflink.lo" ;;
503     bfd_powerpcle_pei_vec)      tb="$tb pei-ppc.lo cofflink.lo" ;;
504     ppcboot_vec)                tb="$tb ppcboot.lo" ;;
505     shcoff_vec)                 tb="$tb coff-sh.lo cofflink.lo" ;;
506     shlcoff_vec)                tb="$tb coff-sh.lo cofflink.lo" ;;
507     shcoff_small_vec)           tb="$tb coff-sh.lo cofflink.lo" ;;
508     shlcoff_small_vec)          tb="$tb coff-sh.lo cofflink.lo" ;;
509     som_vec)                    tb="$tb som.lo" ;;
510     sparcle_aout_vec)           tb="$tb aout-sparcle.lo aout32.lo" ;;
511     sparclinux_vec)             tb="$tb sparclinux.lo aout32.lo stab-syms.lo" ;;
512     sparclynx_aout_vec)         tb="$tb sparclynx.lo lynx-core.lo aout32.lo" ;;
513     sparclynx_coff_vec)         tb="$tb cf-sparclynx.lo lynx-core.lo" ;;
514     sparcnetbsd_vec)            tb="$tb sparcnetbsd.lo aout32.lo" ;;
515     sparccoff_vec)              tb="$tb coff-sparc.lo" ;;
516     srec_vec)                   tb="$tb srec.lo" ;;
517     sunos_big_vec)              tb="$tb sunos.lo aout32.lo" ;;
518     symbolsrec_vec)             tb="$tb srec.lo" ;;
519     tekhex_vec)                 tb="$tb tekhex.lo" ;;
520 # start-sanitize-tic80
521     tic80coff_vec)              tb="$tb coff-tic80.lo cofflink.lo" ;;
522 # end-sanitize-tic80
523     we32kcoff_vec)              tb="$tb coff-we32k.lo" ;;
524     z8kcoff_vec)                tb="$tb coff-z8k.lo reloc16.lo" ;;
525     w65_vec)                    tb="$tb coff-w65.lo reloc16.lo" ;;
526     versados_vec)               tb="$tb versados.lo" ;;
527
528     "")                 ;;
529     *) AC_MSG_ERROR(*** unknown target vector $vec) ;;
530     esac
531 done
532
533 # Target architecture .o files.
534 # A couple of CPUs use shorter file names to avoid problems on DOS
535 # filesystems.
536 ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.lo/g -e s/mn10200/m10200/ -e s/mn10300/m10300/`
537
538 # Weed out duplicate .o files.
539 f=""
540 for i in $tb ; do
541     case " $f " in
542     *" $i "*) ;;
543     *) f="$f $i" ;;
544     esac
545 done
546 tb="$f"
547
548 f=""
549 for i in $ta ; do
550     case " $f " in
551     *" $i "*) ;;
552     *) f="$f $i" ;;
553     esac
554 done
555 ta="$f"
556
557 bfd_backends="$tb"
558 bfd_machines="$ta"
559
560 if test x${all_targets} = xtrue ; then
561   bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)'
562   bfd_machines="${bfd_machines}"' $(ALL_MACHINES)'
563   selvecs=
564   havevecs=
565   selarchs=
566 else    # all_targets is true
567   # Only set these if they will be nonempty, for the clever echo.
568   havevecs=
569   test -n "$selvecs" &&
570     havevecs=`echo $selvecs | sed -e 's/^/-DHAVE_/' -e 's/ \(.\)/ -DHAVE_\1/g'`
571   test -n "$selvecs" &&
572     selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
573   test -n "$selarchs" &&
574     selarchs=`echo $selarchs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
575 fi      # all_targets is true
576
577 case ${host64}-${target64}-${want64} in
578   *true*)
579     wordsize=64
580     all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)'
581     if test -z "$GCC" && test "$BFD_HOST_64BIT_LONG" = "0" && test "$BFD_HOST_64_BIT_DEFINED" = "0"; then
582       AC_MSG_WARN([You have requested a 64 bit BFD configuration, but])
583       AC_MSG_WARN([your compiler may not have a 64 bit integral type])
584     fi
585     ;;
586   false-false-false)
587     wordsize=32
588     all_backends='$(BFD32_BACKENDS)'
589     ;;
590 esac
591
592 AC_SUBST(wordsize)
593 AC_SUBST(all_backends)
594 AC_SUBST(bfd_backends)
595 AC_SUBST(bfd_machines)
596
597 tdefaults=""
598 test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
599 test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'"
600 test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'"
601 test -n "${havevecs}" && tdefaults="${tdefaults} ${havevecs}"
602 AC_SUBST(tdefaults)
603
604 dnl AC_CHECK_HEADERS(sys/mman.h)
605 AC_FUNC_MMAP
606 AC_CHECK_FUNCS(madvise mprotect)
607 case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in
608   true+yes )  AC_DEFINE(USE_MMAP) ;;
609 esac
610
611 rm -f doc/config.status
612 AC_OUTPUT(Makefile doc/Makefile bfd-in3.h:bfd-in2.h)