OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [binutils-2.18.50/] [bfd/] [configure.in] - Blame information for rev 841

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.