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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-7.1/] [bfd/] [configure.in] - Blame information for rev 326

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

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

powered by: WebSVN 2.1.0

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