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