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