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

Subversion Repositories openrisc_me

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

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

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

powered by: WebSVN 2.1.0

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