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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [binutils-2.20.1/] [bfd/] [configure.in] - Blame information for rev 859

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

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

powered by: WebSVN 2.1.0

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