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