From: Alan Modra Date: Fri, 4 Jul 2014 03:29:42 +0000 (+0930) Subject: Rename configure.in to configure.ac X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=35eafcc71b8a54330704656fb6df0b5d6665ed15;p=binutils-gdb.git Rename configure.in to configure.ac bfd/ * configure.ac: Rename from configure.in. * Makefile.in: Regenerate. * config.in: Regenerate. * doc/Makefile.in: Regenerate. opcodes/ * configure.ac: Rename from configure.in. * Makefile.in: Regenerate. * config.in: Regenerate. binutils/ * configure.ac: Rename from configure.in. * Makefile.in: Regenerate. * config.in: Regenerate. * doc/Makefile.in: Regenerate. gas/ * configure.ac: Rename from configure.in. * Makefile.in: Regenerate. * config.in: Regenerate. * doc/Makefile.in: Regenerate. gprof/ * configure.ac: Rename from configure.in. * configure.ac: Rename from configure.in. * Makefile.in: Regenerate. * gconfig.in: Regenerate. ld/ * configure.ac: Rename from configure.in. * Makefile.in: Regenerate. * config.in: Regenerate. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index d189f2dbed2..16511f2e045 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2014-07-04 Alan Modra + + * configure.ac: Rename from configure.in. + * Makefile.in: Regenerate. + * config.in: Regenerate. + * doc/Makefile.in: Regenerate. + 2014-07-04 Alan Modra * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Remove configure.in. diff --git a/bfd/Makefile.in b/bfd/Makefile.in index 215dea0939c..4c589b69d2f 100644 --- a/bfd/Makefile.in +++ b/bfd/Makefile.in @@ -80,7 +80,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \ $(top_srcdir)/bfd.m4 $(top_srcdir)/warning.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/../config/zlib.m4 \ - $(top_srcdir)/version.m4 $(top_srcdir)/configure.in + $(top_srcdir)/version.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ diff --git a/bfd/config.in b/bfd/config.in index 05829e27f8a..b911bf6efd0 100644 --- a/bfd/config.in +++ b/bfd/config.in @@ -1,4 +1,4 @@ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ diff --git a/bfd/configure.ac b/bfd/configure.ac new file mode 100644 index 00000000000..017304f4557 --- /dev/null +++ b/bfd/configure.ac @@ -0,0 +1,1205 @@ +dnl Process this file with autoconf to produce a configure script. +dnl +dnl Copyright (C) 2012-2014 Free Software Foundation, Inc. +dnl +dnl This file is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; see the file COPYING3. If not see +dnl . +dnl + +AC_PREREQ(2.59) +m4_include([version.m4]) +AC_INIT([bfd], BFD_VERSION) +AC_CONFIG_SRCDIR([libbfd.c]) + +AC_CANONICAL_TARGET +AC_ISC_POSIX + +AM_INIT_AUTOMAKE + +dnl These must be called before LT_INIT, because it may want +dnl to call AC_CHECK_PROG. +AC_CHECK_TOOL(AR, ar) +AC_CHECK_TOOL(RANLIB, ranlib, :) + +dnl Default to a non shared library. This may be overridden by the +dnl configure option --enable-shared. +AC_DISABLE_SHARED + +AC_PROG_CC +AC_GNU_SOURCE +AC_USE_SYSTEM_EXTENSIONS + +LT_INIT([dlopen]) + +# AC_PLUGINS setting $plugins is called by ACX_LARGEFILE. +ACX_LARGEFILE + +AM_CONDITIONAL(PLUGINS, test "$plugins" = "yes") + +if test "$plugins" = "yes"; then + if test "$enable_dlopen" != "yes" ; then + AC_MSG_ERROR([ + Building BFD with plugin support requires a host that supports -ldl.]) + fi + enable_targets="$enable_targets plugin" +fi + +AC_ARG_ENABLE(64-bit-bfd, +[ --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)], +[case "${enableval}" in + yes) want64=true ;; + no) want64=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for 64-bit-bfd option) ;; +esac],[want64=false])dnl + +AC_ARG_ENABLE(targets, +[ --enable-targets alternative target configurations], +[case "${enableval}" in + yes | "") AC_MSG_ERROR([enable-targets option must specify target names or 'all']) + ;; + no) enable_targets= ;; + *) enable_targets=$enableval ;; +esac])dnl + +AC_ARG_WITH(mmap, +[ --with-mmap try using mmap for BFD input files if available], +[case "${withval}" in + yes) want_mmap=true ;; + no) want_mmap=false ;; + *) AC_MSG_ERROR(bad value ${withval} for BFD with-mmap option) ;; +esac],[want_mmap=false])dnl + +AC_ARG_ENABLE(secureplt, +[ --enable-secureplt Default to creating read-only plt entries], +[case "${enableval}" in + yes) use_secureplt=true ;; + no) use_secureplt=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for secureplt option) ;; +esac],[use_secureplt=true])dnl +if test $use_secureplt = true; then + AC_DEFINE(USE_SECUREPLT, 1, + [Define if we should default to creating read-only plt entries]) +fi + +AC_ARG_ENABLE(leading-mingw64-underscores, + AS_HELP_STRING([--enable-leading-mingw64-underscores], + [Enable leading underscores on 64 bit mingw targets]), + [],[]) +AS_IF([ test x"$enable_leading_mingw64_underscores" = xyes ], + [AC_DEFINE(USE_MINGW64_LEADING_UNDERSCORES, 1, + [Define if we should use leading underscore on 64 bit mingw targets])]) + +DEBUGDIR=${libdir}/debug +AC_ARG_WITH(separate-debug-dir, + AS_HELP_STRING([--with-separate-debug-dir=DIR], + [Look for global separate debug info in DIR [[default=LIBDIR/debug]]]), +[DEBUGDIR="${withval}"]) +AC_SUBST(DEBUGDIR) + +# Check to see if we should allow the generation of +# symbols with the ELF standard's STT_COMMON type. +AC_ARG_ENABLE(elf-stt-common, +[ --enable-elf-stt-common Allow the generation of ELF symbols with the STT_COMMON type], +[case "${enableval}" in + yes) want_elf_stt_common=true ;; + no) want_elf_stt_common=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for ELF STT_COMMON option) ;; + esac], +# We have to choose a default behaviour. For native builds we could +# test whether the loader supports the STT_COMMON type, but that would +# mean that built binaries could not be exported to older systems where +# the loader does not support it. So by default we always choose to +# disable this feature. + want_elf_stt_common=false)dnl +if test $want_elf_stt_common = true; then + AC_DEFINE(USE_STT_COMMON, 1, + [Define if we may generate symbols with ELF's STT_COMMON type]) +fi + +ACX_PKGVERSION([GNU Binutils]) +ACX_BUGURL([http://www.sourceware.org/bugzilla/]) + +AM_BINUTILS_WARNINGS + +AC_CONFIG_HEADERS(config.h:config.in) + +# PR 14072 +AH_VERBATIM([00_CONFIG_H_CHECK], +[/* Check that config.h is #included before system headers + (this works only for glibc, but that should be enough). */ +#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__) +# error config.h must be #included before system headers +#endif +#define __CONFIG_H__ 1]) + +if test -z "$target" ; then + AC_MSG_ERROR(Unrecognized target system type; please check config.sub.) +fi + +AM_MAINTAINER_MODE +AM_CONDITIONAL(GENINSRC_NEVER, false) +AM_INSTALL_LIBBFD +AC_EXEEXT + +host64=false +target64=false +bfd_default_target_size=32 + +# host stuff: + +ALL_LINGUAS="fr tr ja es sv da zh_CN ro rw vi fi id ru uk" +ZW_GNU_GETTEXT_SISTER_DIR +AM_PO_SUBDIRS + +# Permit host specific settings. +. ${srcdir}/configure.host + +AC_SUBST(HDEFINES) +AC_PROG_INSTALL + +BFD_HOST_64BIT_LONG=0 +BFD_HOST_64BIT_LONG_LONG=0 +BFD_HOST_64_BIT_DEFINED=0 +BFD_HOST_64_BIT= +BFD_HOST_U_64_BIT= +BFD_HOSTPTR_T="unsigned long" + +AC_CHECK_SIZEOF(long long) +AC_CHECK_SIZEOF(void *) +AC_CHECK_SIZEOF(long) + +if test "x${ac_cv_sizeof_void_p}" = "x8"; then + host64=true +fi + +if test "x${ac_cv_sizeof_long}" = "x8"; then + BFD_HOST_64BIT_LONG=1 + test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long" + test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long" +elif test "x${ac_cv_sizeof_long_long}" = "x8"; then + BFD_HOST_64BIT_LONG_LONG=1 + test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long" + test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long" + if test "x${ac_cv_sizeof_void_p}" = "x8"; then + BFD_HOSTPTR_T="unsigned long long" + fi +fi + +if test -n "${HOST_64BIT_TYPE}" -a -n "${HOST_U_64BIT_TYPE}"; then + BFD_HOST_64_BIT_DEFINED=1 + BFD_HOST_64_BIT="${HOST_64BIT_TYPE}" + BFD_HOST_U_64_BIT="${HOST_U_64BIT_TYPE}" +fi + +AC_SUBST(BFD_HOST_64BIT_LONG) +AC_SUBST(BFD_HOST_64BIT_LONG_LONG) +AC_SUBST(BFD_HOST_64_BIT_DEFINED) +AC_SUBST(BFD_HOST_64_BIT) +AC_SUBST(BFD_HOST_U_64_BIT) +AC_SUBST(BFD_HOSTPTR_T) + +BFD_CC_FOR_BUILD + +AC_CHECK_HEADERS(alloca.h stddef.h string.h strings.h stdlib.h time.h unistd.h wchar.h) +AC_CHECK_HEADERS(fcntl.h sys/file.h sys/time.h sys/stat.h sys/resource.h) +GCC_HEADER_STDINT(bfd_stdint.h) +AC_HEADER_TIME +AC_HEADER_DIRENT + +AC_CHECK_HEADERS(windows.h dlfcn.h) + +ACX_HEADER_STRING +AC_CHECK_FUNCS(fcntl getpagesize setitimer sysconf fdopen getuid getgid fileno) +AC_CHECK_FUNCS(strtoull getrlimit) + +AC_CHECK_DECLS(basename) +AC_CHECK_DECLS(ftello) +AC_CHECK_DECLS(ftello64) +AC_CHECK_DECLS(fseeko) +AC_CHECK_DECLS(fseeko64) + +BFD_BINARY_FOPEN + +AC_CHECK_DECLS(ffs) +AC_CHECK_DECLS(free) +AC_CHECK_DECLS(getenv) +AC_CHECK_DECLS(malloc) +AC_CHECK_DECLS(realloc) +AC_CHECK_DECLS(stpcpy) +AC_CHECK_DECLS(strstr) +AC_CHECK_DECLS(snprintf) +AC_CHECK_DECLS(vsnprintf) +AC_CHECK_DECLS(strnlen) + +# Link in zlib if we can. This allows us to read compressed debug sections. +# This is used only by compress.c. +AM_ZLIB + +# If we are configured native, pick a core file support file. +COREFILE= +COREFLAG= +CORE_HEADER= +TRAD_HEADER= +if test "${target}" = "${host}"; then + case "${host}" in + alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu | alpha*-*-*vms*) + COREFILE='' + ;; + alpha*-*-linux-*) + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/alphalinux.h"' + ;; + alpha*-*-netbsd* | alpha*-*-openbsd*) + COREFILE=netbsd-core.lo + ;; + alpha*-*-*) + COREFILE=osf-core.lo + ;; + arm-*-freebsd* | arm-*-kfreebsd*-gnu) + COREFILE='' ;; + arm-*-netbsd* | arm-*-openbsd*) + COREFILE=netbsd-core.lo + ;; + arm-*-riscix) COREFILE=trad-core.lo ;; + hppa*-*-hpux*) COREFILE=hpux-core.lo ;; + hppa*-*-hiux*) COREFILE=hpux-core.lo ;; + hppa*-*-mpeix*) COREFILE=hpux-core.lo ;; + hppa*-*-bsd*) COREFILE="hpux-core.lo hppabsd-core.lo" + COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;; + hppa*-*-netbsd* | hppa*-*-openbsd*) + COREFILE=netbsd-core.lo + ;; + + i370-*-*) + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/i370linux.h"' + ;; + +changequote(,)dnl + i[3-7]86-sequent-bsd*) +changequote([,])dnl + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/symmetry.h"' + ;; +changequote(,)dnl + i[3-7]86-sequent-sysv4*) ;; + i[3-7]86-sequent-sysv*) +changequote([,])dnl + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/symmetry.h"' + ;; +changequote(,)dnl + i[3-7]86-*-bsdi) +changequote([,])dnl + COREFILE= + ;; +changequote(,)dnl + 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*) +changequote([,])dnl + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/i386bsd.h"' + ;; +changequote(,)dnl + i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu | i[3-7]86-*-dragonfly*) +changequote([,])dnl + COREFILE='' + TRAD_HEADER='"hosts/i386bsd.h"' + ;; +changequote(,)dnl + i[3-7]86-*-netbsd* | i[3-7]86-*-knetbsd*-gnu | i[3-7]86-*-openbsd*) +changequote([,])dnl + COREFILE=netbsd-core.lo + ;; +changequote(,)dnl + i[3-7]86-esix-sysv3*) +changequote([,])dnl + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/esix.h"' + ;; +changequote(,)dnl + i[3-7]86-*-sco3.2v5*) +changequote([,])dnl + COREFILE=sco5-core.lo + ;; +changequote(,)dnl + i[3-7]86-*-sco* | i[3-7]86-*-isc*) +changequote([,])dnl + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/i386sco.h"' + ;; +changequote(,)dnl + i[3-7]86-*-mach3*) +changequote([,])dnl + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/i386mach3.h"' + ;; +changequote(,)dnl + i[3-7]86-*-linux-*) +changequote([,])dnl + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/i386linux.h"' + case "$enable_targets"-"$want64" in + *x86_64-*linux*|*-true) + CORE_HEADER='"hosts/x86-64linux.h"' + esac + ;; +changequote(,)dnl + i[3-7]86-*-isc*) COREFILE=trad-core.lo ;; + i[3-7]86-*-aix*) COREFILE=aix386-core.lo ;; +changequote([,])dnl + i860-*-mach3* | i860-*-osf1*) + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/i860mach3.h"' + ;; + mips-*-netbsd* | mips*-*-openbsd*) + COREFILE=netbsd-core.lo + ;; + mips-dec-*) + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/decstation.h"' + ;; + mips-sgi-irix4*) COREFILE=irix-core.lo ;; + mips-sgi-irix5*) COREFILE=irix-core.lo ;; + mips-sgi-irix6*) COREFILE=irix-core.lo ;; + mips-*-sysv4*) ;; + mips-*-sysv* | mips-*-riscos*) + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/riscos.h"' + ;; + mips-sony-bsd*) + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/news-mips.h"' + ;; + m68*-bull*-sysv*) + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/dpx2.h"' + ;; + m68*-hp-hpux*) COREFILE=hpux-core.lo ;; + m68*-hp-bsd*) + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/hp300bsd.h"' + ;; + m68*-*-linux-*) + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/m68klinux.h"' + ;; + m68*-motorola-sysv*) + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/delta68.h"' + ;; + m68*-sony-*) + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/news.h"' + ;; + m68*-*-netbsd* | m68*-*-openbsd*) + COREFILE=netbsd-core.lo + ;; + m68*-apple-aux*) + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/m68kaux.h"' + ;; + m88*-*-sysv4*) + ;; + m88*-motorola-sysv*) + COREFILE=ptrace-core.lo + ;; + m88*-*-mach3*) + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/m88kmach3.h"' + ;; + m88*-*-openbsd*) + COREFILE=netbsd-core.lo + ;; + ns32k-pc532-mach) + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/pc532mach.h"' + ;; + ns32k-*-netbsd* | ns32k-*-openbsd*) + COREFILE=netbsd-core.lo + ;; + rs6000-*-lynx*) + COREFILE=lynx-core.lo + ;; +changequote(,)dnl + rs6000-*-aix[5-9].* | powerpc-*-aix[5-9].*) +changequote([,])dnl + COREFILE=rs6000-core.lo + COREFLAG="$COREFLAG -DAIX_5_CORE -DAIX_CORE_DUMPX_CORE" + ;; +changequote(,)dnl + rs6000-*-aix4.[3-9]* | powerpc-*-aix4.[3-9]*) +changequote([,])dnl + COREFILE=rs6000-core.lo + COREFLAG="$COREFLAG -DAIX_CORE_DUMPX_CORE" + # Not all versions of AIX with -DAIX_CORE_DUMPX_CORE + # have c_impl as a member of struct core_dumpx + AC_MSG_CHECKING([for c_impl in struct core_dumpx]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[struct core_dumpx c; c.c_impl = 0;]])],[AC_DEFINE(HAVE_ST_C_IMPL, 1, + [Define if struct core_dumpx has member c_impl]) + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)]) + ;; + rs6000-*-aix4*) COREFILE=rs6000-core.lo ;; + rs6000-*-*) COREFILE=rs6000-core.lo ;; + powerpc-*-aix4*) COREFILE=rs6000-core.lo ;; + powerpc-*-aix*) COREFILE=rs6000-core.lo ;; + powerpc-*-beos*) ;; + powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu) + COREFILE='' ;; + powerpc-*-netbsd*) COREFILE=netbsd-core.lo ;; + powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;; + s390*-*-*) COREFILE=trad-core.lo ;; + sh*-*-netbsd* | sh*-*-openbsd*) + COREFILE=netbsd-core.lo + ;; + sparc-*-netbsd* | sparc*-*-openbsd*) + COREFILE=netbsd-core.lo + ;; + tahoe-*-*) + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/tahoe.h"' + ;; + vax-*-netbsd* | vax-*-openbsd*) + COREFILE=netbsd-core.lo + ;; + vax-*-ultrix2*) + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/vaxult2.h"' + ;; + vax-*-ultrix*) + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/vaxult2.h"' + ;; + vax-*-linux-*) + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/vaxlinux.h"' + ;; + vax-*-*) + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/vaxbsd.h"' + ;; + x86_64-*-linux*) + CORE_HEADER='"hosts/x86-64linux.h"' + ;; + x86_64-*-netbsd* | x86_64-*-openbsd*) + COREFILE=netbsd-core.lo + ;; + esac + + case "$COREFILE" in + aix386-core.lo) COREFLAG=-DAIX386_CORE ;; + hppabsd-core.lo) COREFLAG=-DHPPABSD_CORE ;; + hpux-core.lo) COREFLAG=-DHPUX_CORE ;; + irix-core.lo) COREFLAG=-DIRIX_CORE ;; + lynx-core.lo) COREFLAG=-DLYNX_CORE ;; + netbsd-core.lo) COREFLAG=-DNETBSD_CORE ;; + osf-core.lo) COREFLAG=-DOSF_CORE ;; + ptrace-core.lo) COREFLAG=-DPTRACE_CORE ;; + rs6000-core.lo) COREFLAG="$COREFLAG -DAIX_CORE" ;; + sco5-core.lo) COREFLAG="$COREFLAG -DSCO5_CORE" ;; + trad-core.lo) COREFLAG="$COREFLAG -DTRAD_CORE" ;; + esac + + # ELF corefile support has several flavors, but all of + # them use something called + AC_CHECK_HEADERS(sys/procfs.h) + if test "$ac_cv_header_sys_procfs_h" = yes; then + BFD_HAVE_SYS_PROCFS_TYPE(prstatus_t) + BFD_HAVE_SYS_PROCFS_TYPE(prstatus32_t) + BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prstatus_t, pr_who) + BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prstatus32_t, pr_who) + BFD_HAVE_SYS_PROCFS_TYPE(pstatus_t) + BFD_HAVE_SYS_PROCFS_TYPE(pxstatus_t) + BFD_HAVE_SYS_PROCFS_TYPE(pstatus32_t) + BFD_HAVE_SYS_PROCFS_TYPE(prpsinfo_t) + BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prpsinfo_t, pr_pid) + BFD_HAVE_SYS_PROCFS_TYPE(prpsinfo32_t) + BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prpsinfo32_t, pr_pid) + BFD_HAVE_SYS_PROCFS_TYPE(psinfo_t) + BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(psinfo_t, pr_pid) + BFD_HAVE_SYS_PROCFS_TYPE(psinfo32_t) + BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(psinfo32_t, pr_pid) + BFD_HAVE_SYS_PROCFS_TYPE(lwpstatus_t) + BFD_HAVE_SYS_PROCFS_TYPE(lwpxstatus_t) + BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_context) + BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_reg) + BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_fpreg) + BFD_HAVE_SYS_PROCFS_TYPE(win32_pstatus_t) + fi +fi +AC_SUBST(COREFILE) +AC_SUBST(COREFLAG) +if test -n "$CORE_HEADER"; then + AC_DEFINE_UNQUOTED(CORE_HEADER, $CORE_HEADER, + [Name of host specific core header file to include in elf.c.]) +fi +if test -n "$TRAD_HEADER"; then + AC_DEFINE_UNQUOTED(TRAD_HEADER, $TRAD_HEADER, + [Name of host specific header file to include in trad-core.c.]) +fi + +# Check if linker supports --as-needed and --no-as-needed options +AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed, + [bfd_cv_ld_as_needed=no + if $LD --help 2>/dev/null | grep as-needed > /dev/null; then + bfd_cv_ld_as_needed=yes + fi + ]) + +LT_LIB_M + +# When building a shared libbfd, link against the pic version of libiberty +# so that apps that use libbfd won't need libiberty just to satisfy any +# libbfd references. +# We can't do that if a pic libiberty is unavailable since including non-pic +# code would insert text relocations into libbfd. +SHARED_LIBADD= +SHARED_LDFLAGS= +if test "$enable_shared" = "yes"; then +changequote(,)dnl + x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` +changequote([,])dnl + if test -n "$x"; then + SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" + fi + +# More hacks to build DLLs on Windows. + case "${host}" in + *-*-cygwin*) + SHARED_LDFLAGS="-no-undefined" + SHARED_LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32" + ;; + + # Hack to build or1k-src on OSX + or1k*-*-darwin*) + SHARED_LIBADD="-L`pwd`/../libiberty/pic -L`pwd`/../intl -liberty -lintl" + ;; + esac + + if test -n "$SHARED_LIBADD"; then + if test -n "$LIBM"; then + if test x"$bfd_cv_ld_as_needed" = xyes; then + # Link against libm only when needed. Put -lc, -lm inside -Wl + # to stop libtool reordering these options. + SHARED_LIBADD="$SHARED_LIBADD -Wl,-lc,--as-needed,`echo $LIBM | sed 's/ /,/g'`,--no-as-needed" + else + SHARED_LIBADD="$SHARED_LIBADD $LIBM" + fi + fi + fi +fi +AC_SUBST(SHARED_LDFLAGS) +AC_SUBST(SHARED_LIBADD) + +# target stuff: + +# Canonicalize the secondary target names. +if test -n "$enable_targets" ; then + for targ in `echo $enable_targets | sed 's/,/ /g'` + do + result=`$ac_config_sub $targ 2>/dev/null` + if test -n "$result" ; then + canon_targets="$canon_targets $result" + else + # Allow targets that config.sub doesn't recognize, like "all". + canon_targets="$canon_targets $targ" + fi + done +fi + +all_targets=false +defvec= +selvecs= +assocvecs= +selarchs= +TDEFINES= +for targ in $target $canon_targets +do + if test "x$targ" = "xall"; then + all_targets=true + assocvecs="$assocvecs $targ_defvec $targ_selvecs" + else + . $srcdir/config.bfd + if test "x$targ" = "x$target"; then + defvec=$targ_defvec + fi + selvecs="$selvecs $targ_defvec $targ_selvecs" + selarchs="$selarchs $targ_archs" + TDEFINES="$TDEFINES $targ_cflags" + fi +done +AC_SUBST(TDEFINES) + +# This processing still needs to be done if we're to decide properly whether +# 64-bit support needs to be compiled in. Currently, it will be included if +# the default or any other explicitly requested target requires it; it +# will not be included on a 32-bit host if no 64-bit target is requested, and +# no "--with-64-bit-bfd" option is given, even if "--enable-targets=all" is +# used. + +# uniq the default and selected vectors in all the configured targets. +f="" +for i in $selvecs ; do + case " $f " in + *" $i "*) ;; + *) f="$f $i" ;; + esac +done +selvecs="$f" + + +# uniq the associated vectors in all the configured targets. +f="" +for i in $assocvecs ; do + case " $f " in + *" $i "*) ;; + *) f="$f $i" ;; + esac +done +assocvecs="$f" + + +# uniq the architectures in all the configured targets. +f="" +for i in $selarchs ; do + case " $f " in + *" $i "*) ;; + *) f="$f $i" ;; + esac +done +selarchs="$f" + +# Target backend .o files. +tb= + +elf="elf.lo elflink.lo elf-attrs.lo elf-strtab.lo + elf-eh-frame.lo dwarf1.lo" + +for vec in $selvecs +do + target_size=32 + case "$vec" in + # This list is alphabetized to make it easy to compare + # with the two vector lists in targets.c. For the same reason, + # use one entry per line, even though this leads to long lines. + aarch64_elf32_be_vec) tb="$tb elf32-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf32.lo $elf"; target_size=64 ;; + aarch64_elf32_le_vec) tb="$tb elf32-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf32.lo $elf"; target_size=64 ;; + aarch64_elf64_be_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;; + aarch64_elf64_le_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;; + alpha_ecoff_le_vec) tb="$tb coff-alpha.lo ecoff.lo ecofflink.lo"; target_size=64 ;; + alpha_elf64_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;; + alpha_elf64_fbsd_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;; + alpha_nlm32_vec) tb="$tb nlm32-alpha.lo nlm32.lo nlm.lo"; target_size=64 ;; + alpha_vms_vec) tb="$tb vms-alpha.lo vms-misc.lo vms-lib.lo"; target_size=64 ;; + alpha_vms_lib_txt_vec) tb="$tb vms-lib.lo vms-misc.lo" ;; + am33_elf32_linux_vec) tb="$tb elf32-am33lin.lo elf32.lo $elf" ;; + aout0_be_vec) tb="$tb aout0.lo aout32.lo" ;; + aout64_vec) tb="$tb demo64.lo aout64.lo"; target_size=64 ;; + aout_vec) tb="$tb host-aout.lo aout32.lo" ;; + aout_adobe_vec) tb="$tb aout-adobe.lo aout32.lo" ;; + arc_elf32_be_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;; + arc_elf32_le_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;; + arm_aout_be_vec) tb="$tb aout-arm.lo aout32.lo" ;; + arm_aout_le_vec) tb="$tb aout-arm.lo aout32.lo" ;; + arm_aout_nbsd_vec) tb="$tb armnetbsd.lo aout32.lo" ;; + arm_aout_riscix_vec) tb="$tb aout32.lo riscix.lo" ;; + arm_coff_be_vec) tb="$tb coff-arm.lo cofflink.lo " ;; + arm_coff_le_vec) tb="$tb coff-arm.lo cofflink.lo " ;; + arm_elf32_be_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;; + arm_elf32_le_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;; + arm_elf32_nacl_be_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;; + arm_elf32_nacl_le_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;; + arm_elf32_symbian_be_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;; + arm_elf32_symbian_le_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;; + arm_elf32_vxworks_be_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;; + arm_elf32_vxworks_le_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;; + arm_pe_be_vec) tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;; + arm_pe_le_vec) tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;; + arm_pe_epoc_be_vec) tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;; + arm_pe_epoc_le_vec) tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;; + arm_pe_wince_be_vec) tb="$tb pe-arm-wince.lo pe-arm.lo peigen.lo cofflink.lo " ;; + arm_pe_wince_le_vec) tb="$tb pe-arm-wince.lo pe-arm.lo peigen.lo cofflink.lo " ;; + arm_pei_be_vec) tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;; + arm_pei_le_vec) tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;; + arm_pei_epoc_be_vec) tb="$tb epoc-pei-arm.lo peigen.lo cofflink.lo " ;; + arm_pei_epoc_le_vec) tb="$tb epoc-pei-arm.lo peigen.lo cofflink.lo " ;; + arm_pei_wince_be_vec) tb="$tb pei-arm-wince.lo pei-arm.lo peigen.lo cofflink.lo " ;; + arm_pei_wince_le_vec) tb="$tb pei-arm-wince.lo pei-arm.lo peigen.lo cofflink.lo " ;; + avr_elf32_vec) tb="$tb elf32-avr.lo elf32.lo $elf" ;; + bfin_elf32_vec) tb="$tb elf32-bfin.lo elf32.lo $elf" ;; + bfin_elf32_fdpic_vec) tb="$tb elf32-bfin.lo elf32.lo $elf" ;; + bout_be_vec) tb="$tb bout.lo aout32.lo" ;; + bout_le_vec) tb="$tb bout.lo aout32.lo" ;; + cr16_elf32_vec) tb="$tb elf32-cr16.lo elf32.lo $elf" ;; + cr16c_elf32_vec) tb="$tb elf32-cr16c.lo elf32.lo $elf" ;; + cris_aout_vec) tb="$tb aout-cris.lo" ;; + cris_elf32_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;; + cris_elf32_us_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;; + crx_elf32_vec) tb="$tb elf32-crx.lo elf32.lo $elf" ;; + d10v_elf32_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;; + d30v_elf32_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;; + dlx_elf32_be_vec) tb="$tb elf32-dlx.lo elf32.lo $elf" ;; + elf32_be_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;; + elf32_le_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;; + elf64_be_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;; + elf64_le_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;; + epiphany_elf32_vec) tb="$tb elf32-epiphany.lo elf32.lo $elf" ;; + fr30_elf32_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;; + frv_elf32_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;; + frv_elf32_fdpic_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;; + h8300_coff_vec) tb="$tb coff-h8300.lo reloc16.lo" ;; + h8300_elf32_vec) tb="$tb elf32-h8300.lo elf32.lo $elf" ;; + h8500_coff_vec) tb="$tb coff-h8500.lo reloc16.lo" ;; + hppa_elf32_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; + hppa_elf32_linux_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; + hppa_elf32_nbsd_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; + hppa_elf64_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;; + hppa_elf64_linux_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;; + hppa_som_vec) tb="$tb som.lo" ;; + i370_elf32_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;; + i386_aout_vec) tb="$tb i386aout.lo aout32.lo" ;; + i386_aout_bsd_vec) tb="$tb i386bsd.lo aout32.lo" ;; + i386_aout_dynix_vec) tb="$tb i386dynix.lo aout32.lo" ;; + i386_aout_fbsd_vec) tb="$tb i386freebsd.lo aout32.lo" ;; + i386_aout_linux_vec) tb="$tb i386linux.lo aout32.lo" ;; + i386_aout_lynx_vec) tb="$tb i386lynx.lo lynx-core.lo aout32.lo" ;; + i386_aout_mach3_vec) tb="$tb i386mach3.lo aout32.lo" ;; + i386_aout_nbsd_vec) tb="$tb i386netbsd.lo aout32.lo" ;; + i386_aout_os9k_vec) tb="$tb i386os9k.lo aout32.lo" ;; + i386_coff_vec) tb="$tb coff-i386.lo cofflink.lo" ;; + i386_coff_go32_vec) tb="$tb coff-go32.lo cofflink.lo" ;; + i386_coff_go32stubbed_vec) tb="$tb coff-stgo32.lo cofflink.lo" ;; + i386_coff_lynx_vec) tb="$tb cf-i386lynx.lo cofflink.lo lynx-core.lo" ;; + i386_elf32_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;; + i386_elf32_fbsd_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;; + i386_elf32_nacl_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;; + i386_elf32_sol2_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;; + i386_elf32_vxworks_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;; + i386_mach_o_vec) tb="$tb mach-o-i386.lo" ;; + i386_msdos_vec) tb="$tb i386msdos.lo" ;; + i386_nlm32_vec) tb="$tb nlm32-i386.lo nlm32.lo nlm.lo" ;; + i386_pe_vec) tb="$tb pe-i386.lo peigen.lo cofflink.lo" ;; + i386_pei_vec) tb="$tb pei-i386.lo peigen.lo cofflink.lo" ;; + i860_coff_vec) tb="$tb coff-i860.lo cofflink.lo" ;; + i860_elf32_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;; + i860_elf32_le_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;; + i960_elf32_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;; + ia64_elf32_be_vec) tb="$tb elf32-ia64.lo elfxx-ia64.lo elf32.lo $elf" ;; + ia64_elf32_hpux_be_vec) tb="$tb elf32-ia64.lo elfxx-ia64.lo elf32.lo $elf" ;; + ia64_elf64_be_vec) tb="$tb elf64-ia64.lo elfxx-ia64.lo elf64.lo $elf"; target_size=64 ;; + ia64_elf64_le_vec) tb="$tb elf64-ia64.lo elfxx-ia64.lo elf64.lo $elf"; target_size=64 ;; + ia64_elf64_hpux_be_vec) tb="$tb elf64-ia64.lo elfxx-ia64.lo elf64.lo $elf"; target_size=64 ;; + ia64_elf64_vms_vec) tb="$tb elf64-ia64-vms.lo elf64-ia64.lo elfxx-ia64.lo elf64.lo vms-lib.lo vms-misc.lo $elf"; target_size=64 ;; + ia64_pei_vec) tb="$tb pei-ia64.lo pepigen.lo cofflink.lo"; target_size=64 ;; + icoff_be_vec) tb="$tb coff-i960.lo cofflink.lo" ;; + icoff_le_vec) tb="$tb coff-i960.lo cofflink.lo" ;; + ieee_vec) tb="$tb ieee.lo" ;; + ip2k_elf32_vec) tb="$tb elf32-ip2k.lo elf32.lo $elf" ;; + iq2000_elf32_vec) tb="$tb elf32-iq2000.lo elf32.lo $elf" ;; + k1om_elf64_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;; + k1om_elf64_fbsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;; + l1om_elf64_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;; + l1om_elf64_fbsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;; + lm32_elf32_vec) tb="$tb elf32-lm32.lo elf32.lo $elf" ;; + lm32_elf32_fdpic_vec) tb="$tb elf32-lm32.lo elf32.lo $elf" ;; + m32c_elf32_vec) tb="$tb elf32-m32c.lo elf32.lo $elf" ;; + m32r_elf32_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;; + m32r_elf32_le_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;; + m32r_elf32_linux_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;; + m32r_elf32_linux_le_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;; + m68hc11_elf32_vec) tb="$tb elf32-m68hc11.lo elf32-m68hc1x.lo elf32.lo $elf" ;; + m68hc12_elf32_vec) tb="$tb elf32-m68hc12.lo elf32-m68hc1x.lo elf32.lo $elf" ;; + m68k_aout_4knbsd_vec) tb="$tb m68k4knetbsd.lo aout32.lo" ;; + m68k_aout_hp300bsd_vec) tb="$tb hp300bsd.lo aout32.lo" ;; + m68k_aout_hp300hpux_vec) tb="$tb hp300hpux.lo aout32.lo" ;; + m68k_aout_linux_vec) tb="$tb m68klinux.lo aout32.lo" ;; + m68k_aout_nbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;; + m68k_aout_newsos3_vec) tb="$tb newsos3.lo aout32.lo" ;; + m68k_coff_vec) tb="$tb coff-m68k.lo cofflink.lo" ;; + m68k_coff_apollo_vec) tb="$tb coff-apollo.lo" ;; + m68k_coff_aux_vec) tb="$tb coff-aux.lo coff-m68k.lo cofflink.lo" ;; + m68k_coff_sysv_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;; + m68k_coff_un_vec) tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;; + m68k_elf32_vec) tb="$tb elf32-m68k.lo elf32.lo $elf" ;; + m68k_versados_vec) tb="$tb versados.lo" ;; + m88k_aout_mach3_vec) tb="$tb m88kmach3.lo aout32.lo" ;; + m88k_aout_obsd_vec) tb="$tb m88kopenbsd.lo aout32.lo" ;; + m88k_coff_bcs_vec) tb="$tb coff-m88k.lo" ;; + m88k_elf32_vec) tb="$tb elf32-m88k.lo elf32.lo $elf" ;; + mach_o_be_vec) tb="$tb mach-o.lo" ;; + mach_o_le_vec) tb="$tb mach-o.lo" ;; + mach_o_fat_vec) tb="$tb mach-o.lo" ;; + mcore_elf32_be_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;; + mcore_elf32_le_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;; + mcore_pe_be_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;; + mcore_pe_le_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;; + mcore_pei_be_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;; + mcore_pei_le_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;; + mep_elf32_vec) tb="$tb elf32-mep.lo elf32.lo $elf" ;; + mep_elf32_le_vec) tb="$tb elf32-mep.lo elf32.lo $elf" ;; + metag_elf32_vec) tb="$tb elf32-metag.lo elf32.lo $elf" ;; + microblaze_elf32_vec) tb="$tb elf32-microblaze.lo elf32.lo $elf" ;; + microblaze_elf32_le_vec) tb="$tb elf32-microblaze.lo elf32.lo $elf" ;; + mips_ecoff_be_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;; + mips_ecoff_le_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;; + mips_ecoff_bele_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;; + mips_elf32_be_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;; + mips_elf32_le_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;; + mips_elf32_n_be_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; + mips_elf32_n_le_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; + mips_elf32_ntrad_be_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; + mips_elf32_ntrad_le_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; + mips_elf32_ntradfbsd_be_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; + mips_elf32_ntradfbsd_le_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; + mips_elf32_trad_be_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;; + mips_elf32_trad_le_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;; + mips_elf32_tradfbsd_be_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;; + mips_elf32_tradfbsd_le_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;; + mips_elf32_vxworks_be_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;; + mips_elf32_vxworks_le_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;; + mips_elf64_be_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; + mips_elf64_le_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; + mips_elf64_trad_be_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; + mips_elf64_trad_le_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; + mips_elf64_tradfbsd_be_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; + mips_elf64_tradfbsd_le_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; + mips_pe_le_vec) tb="$tb pe-mips.lo peigen.lo cofflink.lo" ;; + mips_pei_le_vec) tb="$tb pei-mips.lo peigen.lo cofflink.lo" ;; + mmix_elf64_vec) tb="$tb elf64-mmix.lo elf64.lo $elf" target_size=64 ;; + mmix_mmo_vec) tb="$tb mmo.lo" target_size=64 ;; + mn10200_elf32_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;; + mn10300_elf32_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;; + moxie_elf32_be_vec) tb="$tb elf32-moxie.lo elf32.lo $elf" ;; + moxie_elf32_le_vec) tb="$tb elf32-moxie.lo elf32.lo $elf" ;; + msp430_elf32_vec) tb="$tb elf32-msp430.lo elf32.lo $elf" ;; + msp430_elf32_ti_vec) tb="$tb elf32-msp430.lo elf32.lo $elf" ;; + mt_elf32_vec) tb="$tb elf32-mt.lo elf32.lo $elf" ;; + nds32_elf32_be_vec) tb="$tb elf32-nds32.lo elf32.lo $elf" ;; + nds32_elf32_le_vec) tb="$tb elf32-nds32.lo elf32.lo $elf" ;; + nds32_elf32_linux_be_vec) tb="$tb elf32-nds32.lo elf32.lo $elf" ;; + nds32_elf32_linux_le_vec) tb="$tb elf32-nds32.lo elf32.lo $elf" ;; + nios2_elf32_be_vec) tb="$tb elf32-nios2.lo elf32.lo $elf" ;; + nios2_elf32_le_vec) tb="$tb elf32-nios2.lo elf32.lo $elf" ;; + ns32k_aout_pc532mach_vec) tb="$tb pc532-mach.lo aout-ns32k.lo" ;; + ns32k_aout_pc532nbsd_vec) tb="$tb ns32knetbsd.lo aout-ns32k.lo" ;; + or1k_elf32_vec) tb="$tb elf32-or1k.lo elf32.lo $elf" ;; + pdp11_aout_vec) tb="$tb pdp11.lo" ;; + pef_vec) tb="$tb pef.lo" ;; + pef_xlib_vec) tb="$tb pef.lo" ;; + pj_elf32_vec) tb="$tb elf32-pj.lo elf32.lo $elf" ;; + pj_elf32_le_vec) tb="$tb elf32-pj.lo elf32.lo $elf" ;; + plugin_vec) tb="$tb plugin.lo" ;; + powerpc_boot_vec) tb="$tb ppcboot.lo" ;; + powerpc_elf32_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; + powerpc_elf32_le_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; + powerpc_elf32_fbsd_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; + powerpc_elf32_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; + powerpc_elf64_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;; + powerpc_elf64_le_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;; + powerpc_elf64_fbsd_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;; + powerpc_nlm32_vec) tb="$tb nlm32-ppc.lo nlm32.lo nlm.lo" ;; + powerpc_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;; + powerpc_pe_le_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;; + powerpc_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;; + powerpc_pei_le_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;; + powerpc_xcoff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;; + rl78_elf32_vec) tb="$tb elf32-rl78.lo elf32.lo $elf" ;; + rs6000_xcoff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo aix5ppc-core.lo"; target_size=64 ;; + rs6000_xcoff64_aix_vec) tb="$tb coff64-rs6000.lo xcofflink.lo aix5ppc-core.lo"; target_size=64 ;; + rs6000_xcoff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;; + rx_elf32_be_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;; + rx_elf32_be_ns_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;; + rx_elf32_le_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;; + s390_elf32_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;; + s390_elf64_vec) tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;; + score_elf32_be_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true; target_size=64 ;; + score_elf32_le_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true; target_size=64 ;; + # FIXME: We include cofflink.lo not because it's needed for + # sh64_elf32[_le]_vec, but because we include sh_elf32[_le]_vec + # which needs it but does not list it. Should be fixed in right place. + sh64_elf32_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf cofflink.lo" target_size=64 ;; + sh64_elf32_le_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf cofflink.lo" target_size=64 ;; + sh64_elf32_linux_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf cofflink.lo" target_size=64 ;; + sh64_elf32_linux_be_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf cofflink.lo" target_size=64 ;; + sh64_elf32_nbsd_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf cofflink.lo" ;; + sh64_elf32_nbsd_le_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf cofflink.lo" ;; + sh64_elf64_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; + sh64_elf64_le_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; + sh64_elf64_linux_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; + sh64_elf64_linux_be_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; + sh64_elf64_nbsd_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; + sh64_elf64_nbsd_le_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; + sh_coff_vec) tb="$tb coff-sh.lo cofflink.lo" ;; + sh_coff_le_vec) tb="$tb coff-sh.lo cofflink.lo" ;; + sh_coff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;; + sh_coff_small_le_vec) tb="$tb coff-sh.lo cofflink.lo" ;; + sh_elf32_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo" ;; + sh_elf32_le_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo" ;; + sh_elf32_fdpic_be_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; + sh_elf32_fdpic_le_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; + sh_elf32_linux_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; + sh_elf32_linux_be_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; + sh_elf32_nbsd_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; + sh_elf32_nbsd_le_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; + sh_elf32_symbian_le_vec) tb="$tb elf32-sh-symbian.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo" ;; + sh_elf32_vxworks_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo" ;; + sh_elf32_vxworks_le_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo" ;; + sh_pe_le_vec) tb="$tb pe-sh.lo coff-sh.lo peigen.lo cofflink.lo" ;; + sh_pei_le_vec) tb="$tb pei-sh.lo coff-sh.lo peigen.lo cofflink.lo" ;; + sparc_aout_le_vec) tb="$tb aout-sparcle.lo aout32.lo" ;; + sparc_aout_linux_vec) tb="$tb sparclinux.lo aout32.lo" ;; + sparc_aout_lynx_vec) tb="$tb sparclynx.lo lynx-core.lo aout32.lo" ;; + sparc_aout_nbsd_vec) tb="$tb sparcnetbsd.lo aout32.lo" ;; + sparc_aout_sunos_be_vec) tb="$tb sunos.lo aout32.lo" ;; + sparc_coff_vec) tb="$tb coff-sparc.lo" ;; + sparc_coff_lynx_vec) tb="$tb cf-sparclynx.lo lynx-core.lo" ;; + sparc_elf32_vec) tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;; + sparc_elf32_sol2_vec) tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;; + sparc_elf32_vxworks_vec) tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;; + sparc_elf64_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;; + sparc_elf64_fbsd_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;; + sparc_elf64_sol2_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;; + sparc_nlm32_vec) tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;; + spu_elf32_vec) tb="$tb elf32-spu.lo elf32.lo $elf" ;; + sym_vec) tb="$tb xsym.lo" ;; + tic30_aout_vec) tb="$tb aout-tic30.lo" ;; + tic30_coff_vec) tb="$tb coff-tic30.lo" ;; + tic4x_coff0_vec) tb="$tb coff-tic4x.lo" ;; + tic4x_coff0_beh_vec) tb="$tb coff-tic4x.lo" ;; + tic4x_coff1_vec) tb="$tb coff-tic4x.lo" ;; + tic4x_coff1_beh_vec) tb="$tb coff-tic4x.lo" ;; + tic4x_coff2_vec) tb="$tb coff-tic4x.lo" ;; + tic4x_coff2_beh_vec) tb="$tb coff-tic4x.lo" ;; + tic54x_coff0_vec) tb="$tb coff-tic54x.lo" ;; + tic54x_coff0_beh_vec) tb="$tb coff-tic54x.lo" ;; + tic54x_coff1_vec) tb="$tb coff-tic54x.lo" ;; + tic54x_coff1_beh_vec) tb="$tb coff-tic54x.lo" ;; + tic54x_coff2_vec) tb="$tb coff-tic54x.lo" ;; + tic54x_coff2_beh_vec) tb="$tb coff-tic54x.lo" ;; + tic6x_elf32_be_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;; + tic6x_elf32_le_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;; + tic6x_elf32_c6000_be_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;; + tic6x_elf32_c6000_le_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;; + tic6x_elf32_linux_be_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;; + tic6x_elf32_linux_le_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;; + tic80_coff_vec) tb="$tb coff-tic80.lo cofflink.lo" ;; + tilegx_elf32_be_vec) tb="$tb elf32-tilegx.lo elfxx-tilegx.lo elf32.lo $elf" ; target_size=32 ;; + tilegx_elf32_le_vec) tb="$tb elf32-tilegx.lo elfxx-tilegx.lo elf32.lo $elf" ; target_size=32 ;; + tilegx_elf64_be_vec) tb="$tb elf64-tilegx.lo elfxx-tilegx.lo elf64.lo $elf" ; target_size=64 ;; + tilegx_elf64_le_vec) tb="$tb elf64-tilegx.lo elfxx-tilegx.lo elf64.lo $elf" ; target_size=64 ;; + tilepro_elf32_vec) tb="$tb elf32-tilepro.lo elf32.lo $elf" ;; + v800_elf32_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;; + v850_elf32_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;; + vax_aout_1knbsd_vec) tb="$tb vax1knetbsd.lo aout32.lo" ;; + vax_aout_bsd_vec) tb="$tb vaxbsd.lo aout32.lo" ;; + vax_aout_nbsd_vec) tb="$tb vaxnetbsd.lo aout32.lo" ;; + vax_elf32_vec) tb="$tb elf32-vax.lo elf32.lo $elf" ;; + w65_coff_vec) tb="$tb coff-w65.lo reloc16.lo" ;; + we32k_coff_vec) tb="$tb coff-we32k.lo" ;; + x86_64_coff_vec) tb="$tb coff-x86_64.lo cofflink.lo"; target_size=64 ;; + x86_64_elf32_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo elf32.lo $elf"; target_size=64 ;; + x86_64_elf32_nacl_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo elf32.lo $elf"; target_size=64 ;; + x86_64_elf64_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;; + x86_64_elf64_fbsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;; + x86_64_elf64_nacl_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;; + x86_64_elf64_sol2_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;; + x86_64_mach_o_vec) tb="$tb mach-o-x86-64.lo" ;; + x86_64_pe_vec) tb="$tb pe-x86_64.lo pex64igen.lo cofflink.lo"; target_size=64 ;; + x86_64_pe_be_vec) tb="$tb pe-x86_64.lo pex64igen.lo cofflink.lo"; target_size=64 ;; + x86_64_pei_vec) tb="$tb pei-x86_64.lo pex64igen.lo cofflink.lo"; target_size=64 ;; + xc16x_elf32_vec) tb="$tb elf32-xc16x.lo elf32.lo $elf" ;; + xgate_elf32_vec) tb="$tb elf32-xgate.lo elf32.lo $elf" ;; + xstormy16_elf32_vec) tb="$tb elf32-xstormy16.lo elf32.lo $elf" ;; + xtensa_elf32_be_vec) tb="$tb xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;; + xtensa_elf32_le_vec) tb="$tb xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;; + z80_coff_vec) tb="$tb coff-z80.lo reloc16.lo" ;; + z8k_coff_vec) tb="$tb coff-z8k.lo reloc16.lo cofflink.lo" ;; + + # These appear out of order in targets.c + srec_vec) tb="$tb srec.lo" ;; + symbolsrec_vec) tb="$tb srec.lo" ;; + tekhex_vec) tb="$tb tekhex.lo" ;; + core_cisco_be_vec) tb="$tb cisco-core.lo" ;; + core_cisco_le_vec) tb="$tb cisco-core.lo" ;; + + "") ;; + *) AC_MSG_ERROR(*** unknown target vector $vec) ;; + esac + + if test ${target_size} = 64; then + target64=true + fi + if test x"${vec}" = x"${defvec}"; then + bfd_default_target_size=${target_size} + fi +done + +# Target architecture .o files. +# A couple of CPUs use shorter file names to avoid problems on DOS +# filesystems. +ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.lo/g -e s/mn10200/m10200/ -e s/mn10300/m10300/` + +# Weed out duplicate .o files. +f="" +for i in $tb ; do + case " $f " in + *" $i "*) ;; + *) f="$f $i" ;; + esac +done +tb="$f" + +f="" +for i in $ta ; do + case " $f " in + *" $i "*) ;; + *) f="$f $i" ;; + esac +done +ta="$f" + +bfd_backends="$tb" +bfd_machines="$ta" + +if test x${all_targets} = xtrue ; then + bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)' + bfd_machines="${bfd_machines}"' $(ALL_MACHINES)' + selvecs= + havevecs=-DHAVE_all_vecs + selarchs= + test -n "$assocvecs" && + assocvecs=`echo $assocvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'` +else # all_targets is true + # Only set these if they will be nonempty, for the clever echo. + havevecs= + assocvecs= + test -n "$selvecs" && + havevecs=`echo $selvecs | sed -e 's/^/-DHAVE_/' -e 's/ \(.\)/ -DHAVE_\1/g'` + test -n "$selvecs" && + selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'` + test -n "$selarchs" && + selarchs=`echo $selarchs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'` +fi # all_targets is true + +case ${host64}-${target64}-${want64} in + *true*) + wordsize=64 + bfd64_libs='$(BFD64_LIBS)' + all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)' + if test $BFD_HOST_64_BIT_DEFINED = 0; then + AC_MSG_WARN([You have requested a 64 bit BFD configuration, but]) + AC_MSG_WARN([your compiler may not have a 64 bit integral type]) + fi + if test -n "$GCC" ; then + bad_64bit_gcc=no; + AC_MSG_CHECKING([for gcc version with buggy 64-bit support]) + # Add more tests for gcc versions with non-working 64-bit support here. + AC_EGREP_CPP([: 2 : 91 : 1 :],[:__GNUC__:__GNUC_MINOR__:__i386__:], + bad_64bit_gcc=yes; + AC_MSG_RESULT([yes: egcs-1.1.2 on ix86 spotted]), + AC_MSG_RESULT(no)) + if test $bad_64bit_gcc = yes ; then + AC_MSG_ERROR([A newer version of gcc is needed for the requested 64-bit BFD configuration]) + fi + fi + ;; + false-false-false) + wordsize=32 + all_backends='$(BFD32_BACKENDS)' + ;; +esac + +AC_SUBST(wordsize) +AC_SUBST(bfd64_libs) +AC_SUBST(all_backends) +AC_SUBST(bfd_backends) +AC_SUBST(bfd_machines) +AC_SUBST(bfd_default_target_size) + +if test "$plugins" = "yes"; then + supports_plugins=1 +else + supports_plugins=0 +fi +AC_SUBST(supports_plugins) +AC_SUBST(lt_cv_dlopen_libs) + +# Determine the host dependant file_ptr a.k.a. off_t type. In order +# prefer: off64_t - if ftello64 and fseeko64, off_t - if ftello and +# fseeko, long. This assumes that sizeof off_t is .ge. sizeof long. +# Hopefully a reasonable assumption since fseeko et.al. should be +# upward compatible. +AC_CHECK_FUNCS(ftello ftello64 fseeko fseeko64 fopen64) +if test x"$ac_cv_func_ftello" = xyes -a x"$ac_cv_func_fseeko" = xyes; then + AC_CHECK_SIZEOF(off_t) +fi +AC_MSG_CHECKING([file_ptr type]) +bfd_file_ptr="long" +bfd_ufile_ptr="unsigned long" +if test x"$ac_cv_func_ftello64" = xyes -a x"$ac_cv_func_fseeko64" = xyes \ + -o x"${ac_cv_sizeof_off_t}" = x8; then + bfd_file_ptr=BFD_HOST_64_BIT + bfd_ufile_ptr=BFD_HOST_U_64_BIT +fi +AC_MSG_RESULT($bfd_file_ptr) +AC_SUBST(bfd_file_ptr) +AC_SUBST(bfd_ufile_ptr) + + +tdefaults="" +test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}" +test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'" +test -n "${assocvecs}" && tdefaults="${tdefaults} -DASSOCIATED_VECS='${assocvecs}'" +test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'" +AC_SUBST(tdefaults) +AC_SUBST(havevecs) + +dnl AC_CHECK_HEADERS(sys/mman.h) +AC_FUNC_MMAP +AC_CHECK_FUNCS(madvise mprotect) +case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in + true+yes ) AC_DEFINE(USE_MMAP, 1, [Use mmap if it's available?]) ;; +esac + +rm -f doc/config.status +AC_CONFIG_FILES([Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in]) + +dnl We need this duplication, even though we use AM_PO_SUBDIRS, because of +dnl our two separate POTFILES. Yuck. +AC_CONFIG_COMMANDS([default], +[[ +case "$srcdir" in + .) srcdirpre= ;; + *) srcdirpre='$(srcdir)/' ;; +esac +POFILES= +GMOFILES= +for lang in dummy $OBSOLETE_ALL_LINGUAS; do + if test $lang != dummy; then + POFILES="$POFILES $srcdirpre$lang.po" + GMOFILES="$GMOFILES $srcdirpre$lang.gmo" + fi +done +sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' \ + -e '/BLD-POTFILES =/r po/BLD-POTFILES' \ + -e "s,@POFILES@,$POFILES," \ + -e "s,@GMOFILES@,$GMOFILES," \ + po/Makefile.in > po/Makefile]],[[]]) + +dnl Required by html, pdf, install-pdf and install-html +AC_SUBST(datarootdir) +AC_SUBST(docdir) +AC_SUBST(htmldir) +AC_SUBST(pdfdir) + +AC_OUTPUT diff --git a/bfd/configure.in b/bfd/configure.in deleted file mode 100644 index 017304f4557..00000000000 --- a/bfd/configure.in +++ /dev/null @@ -1,1205 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -dnl -dnl Copyright (C) 2012-2014 Free Software Foundation, Inc. -dnl -dnl This file is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 3 of the License, or -dnl (at your option) any later version. -dnl -dnl This program is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with this program; see the file COPYING3. If not see -dnl . -dnl - -AC_PREREQ(2.59) -m4_include([version.m4]) -AC_INIT([bfd], BFD_VERSION) -AC_CONFIG_SRCDIR([libbfd.c]) - -AC_CANONICAL_TARGET -AC_ISC_POSIX - -AM_INIT_AUTOMAKE - -dnl These must be called before LT_INIT, because it may want -dnl to call AC_CHECK_PROG. -AC_CHECK_TOOL(AR, ar) -AC_CHECK_TOOL(RANLIB, ranlib, :) - -dnl Default to a non shared library. This may be overridden by the -dnl configure option --enable-shared. -AC_DISABLE_SHARED - -AC_PROG_CC -AC_GNU_SOURCE -AC_USE_SYSTEM_EXTENSIONS - -LT_INIT([dlopen]) - -# AC_PLUGINS setting $plugins is called by ACX_LARGEFILE. -ACX_LARGEFILE - -AM_CONDITIONAL(PLUGINS, test "$plugins" = "yes") - -if test "$plugins" = "yes"; then - if test "$enable_dlopen" != "yes" ; then - AC_MSG_ERROR([ - Building BFD with plugin support requires a host that supports -ldl.]) - fi - enable_targets="$enable_targets plugin" -fi - -AC_ARG_ENABLE(64-bit-bfd, -[ --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)], -[case "${enableval}" in - yes) want64=true ;; - no) want64=false ;; - *) AC_MSG_ERROR(bad value ${enableval} for 64-bit-bfd option) ;; -esac],[want64=false])dnl - -AC_ARG_ENABLE(targets, -[ --enable-targets alternative target configurations], -[case "${enableval}" in - yes | "") AC_MSG_ERROR([enable-targets option must specify target names or 'all']) - ;; - no) enable_targets= ;; - *) enable_targets=$enableval ;; -esac])dnl - -AC_ARG_WITH(mmap, -[ --with-mmap try using mmap for BFD input files if available], -[case "${withval}" in - yes) want_mmap=true ;; - no) want_mmap=false ;; - *) AC_MSG_ERROR(bad value ${withval} for BFD with-mmap option) ;; -esac],[want_mmap=false])dnl - -AC_ARG_ENABLE(secureplt, -[ --enable-secureplt Default to creating read-only plt entries], -[case "${enableval}" in - yes) use_secureplt=true ;; - no) use_secureplt=false ;; - *) AC_MSG_ERROR(bad value ${enableval} for secureplt option) ;; -esac],[use_secureplt=true])dnl -if test $use_secureplt = true; then - AC_DEFINE(USE_SECUREPLT, 1, - [Define if we should default to creating read-only plt entries]) -fi - -AC_ARG_ENABLE(leading-mingw64-underscores, - AS_HELP_STRING([--enable-leading-mingw64-underscores], - [Enable leading underscores on 64 bit mingw targets]), - [],[]) -AS_IF([ test x"$enable_leading_mingw64_underscores" = xyes ], - [AC_DEFINE(USE_MINGW64_LEADING_UNDERSCORES, 1, - [Define if we should use leading underscore on 64 bit mingw targets])]) - -DEBUGDIR=${libdir}/debug -AC_ARG_WITH(separate-debug-dir, - AS_HELP_STRING([--with-separate-debug-dir=DIR], - [Look for global separate debug info in DIR [[default=LIBDIR/debug]]]), -[DEBUGDIR="${withval}"]) -AC_SUBST(DEBUGDIR) - -# Check to see if we should allow the generation of -# symbols with the ELF standard's STT_COMMON type. -AC_ARG_ENABLE(elf-stt-common, -[ --enable-elf-stt-common Allow the generation of ELF symbols with the STT_COMMON type], -[case "${enableval}" in - yes) want_elf_stt_common=true ;; - no) want_elf_stt_common=false ;; - *) AC_MSG_ERROR(bad value ${enableval} for ELF STT_COMMON option) ;; - esac], -# We have to choose a default behaviour. For native builds we could -# test whether the loader supports the STT_COMMON type, but that would -# mean that built binaries could not be exported to older systems where -# the loader does not support it. So by default we always choose to -# disable this feature. - want_elf_stt_common=false)dnl -if test $want_elf_stt_common = true; then - AC_DEFINE(USE_STT_COMMON, 1, - [Define if we may generate symbols with ELF's STT_COMMON type]) -fi - -ACX_PKGVERSION([GNU Binutils]) -ACX_BUGURL([http://www.sourceware.org/bugzilla/]) - -AM_BINUTILS_WARNINGS - -AC_CONFIG_HEADERS(config.h:config.in) - -# PR 14072 -AH_VERBATIM([00_CONFIG_H_CHECK], -[/* Check that config.h is #included before system headers - (this works only for glibc, but that should be enough). */ -#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__) -# error config.h must be #included before system headers -#endif -#define __CONFIG_H__ 1]) - -if test -z "$target" ; then - AC_MSG_ERROR(Unrecognized target system type; please check config.sub.) -fi - -AM_MAINTAINER_MODE -AM_CONDITIONAL(GENINSRC_NEVER, false) -AM_INSTALL_LIBBFD -AC_EXEEXT - -host64=false -target64=false -bfd_default_target_size=32 - -# host stuff: - -ALL_LINGUAS="fr tr ja es sv da zh_CN ro rw vi fi id ru uk" -ZW_GNU_GETTEXT_SISTER_DIR -AM_PO_SUBDIRS - -# Permit host specific settings. -. ${srcdir}/configure.host - -AC_SUBST(HDEFINES) -AC_PROG_INSTALL - -BFD_HOST_64BIT_LONG=0 -BFD_HOST_64BIT_LONG_LONG=0 -BFD_HOST_64_BIT_DEFINED=0 -BFD_HOST_64_BIT= -BFD_HOST_U_64_BIT= -BFD_HOSTPTR_T="unsigned long" - -AC_CHECK_SIZEOF(long long) -AC_CHECK_SIZEOF(void *) -AC_CHECK_SIZEOF(long) - -if test "x${ac_cv_sizeof_void_p}" = "x8"; then - host64=true -fi - -if test "x${ac_cv_sizeof_long}" = "x8"; then - BFD_HOST_64BIT_LONG=1 - test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long" - test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long" -elif test "x${ac_cv_sizeof_long_long}" = "x8"; then - BFD_HOST_64BIT_LONG_LONG=1 - test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long" - test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long" - if test "x${ac_cv_sizeof_void_p}" = "x8"; then - BFD_HOSTPTR_T="unsigned long long" - fi -fi - -if test -n "${HOST_64BIT_TYPE}" -a -n "${HOST_U_64BIT_TYPE}"; then - BFD_HOST_64_BIT_DEFINED=1 - BFD_HOST_64_BIT="${HOST_64BIT_TYPE}" - BFD_HOST_U_64_BIT="${HOST_U_64BIT_TYPE}" -fi - -AC_SUBST(BFD_HOST_64BIT_LONG) -AC_SUBST(BFD_HOST_64BIT_LONG_LONG) -AC_SUBST(BFD_HOST_64_BIT_DEFINED) -AC_SUBST(BFD_HOST_64_BIT) -AC_SUBST(BFD_HOST_U_64_BIT) -AC_SUBST(BFD_HOSTPTR_T) - -BFD_CC_FOR_BUILD - -AC_CHECK_HEADERS(alloca.h stddef.h string.h strings.h stdlib.h time.h unistd.h wchar.h) -AC_CHECK_HEADERS(fcntl.h sys/file.h sys/time.h sys/stat.h sys/resource.h) -GCC_HEADER_STDINT(bfd_stdint.h) -AC_HEADER_TIME -AC_HEADER_DIRENT - -AC_CHECK_HEADERS(windows.h dlfcn.h) - -ACX_HEADER_STRING -AC_CHECK_FUNCS(fcntl getpagesize setitimer sysconf fdopen getuid getgid fileno) -AC_CHECK_FUNCS(strtoull getrlimit) - -AC_CHECK_DECLS(basename) -AC_CHECK_DECLS(ftello) -AC_CHECK_DECLS(ftello64) -AC_CHECK_DECLS(fseeko) -AC_CHECK_DECLS(fseeko64) - -BFD_BINARY_FOPEN - -AC_CHECK_DECLS(ffs) -AC_CHECK_DECLS(free) -AC_CHECK_DECLS(getenv) -AC_CHECK_DECLS(malloc) -AC_CHECK_DECLS(realloc) -AC_CHECK_DECLS(stpcpy) -AC_CHECK_DECLS(strstr) -AC_CHECK_DECLS(snprintf) -AC_CHECK_DECLS(vsnprintf) -AC_CHECK_DECLS(strnlen) - -# Link in zlib if we can. This allows us to read compressed debug sections. -# This is used only by compress.c. -AM_ZLIB - -# If we are configured native, pick a core file support file. -COREFILE= -COREFLAG= -CORE_HEADER= -TRAD_HEADER= -if test "${target}" = "${host}"; then - case "${host}" in - alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu | alpha*-*-*vms*) - COREFILE='' - ;; - alpha*-*-linux-*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/alphalinux.h"' - ;; - alpha*-*-netbsd* | alpha*-*-openbsd*) - COREFILE=netbsd-core.lo - ;; - alpha*-*-*) - COREFILE=osf-core.lo - ;; - arm-*-freebsd* | arm-*-kfreebsd*-gnu) - COREFILE='' ;; - arm-*-netbsd* | arm-*-openbsd*) - COREFILE=netbsd-core.lo - ;; - arm-*-riscix) COREFILE=trad-core.lo ;; - hppa*-*-hpux*) COREFILE=hpux-core.lo ;; - hppa*-*-hiux*) COREFILE=hpux-core.lo ;; - hppa*-*-mpeix*) COREFILE=hpux-core.lo ;; - hppa*-*-bsd*) COREFILE="hpux-core.lo hppabsd-core.lo" - COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;; - hppa*-*-netbsd* | hppa*-*-openbsd*) - COREFILE=netbsd-core.lo - ;; - - i370-*-*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/i370linux.h"' - ;; - -changequote(,)dnl - i[3-7]86-sequent-bsd*) -changequote([,])dnl - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/symmetry.h"' - ;; -changequote(,)dnl - i[3-7]86-sequent-sysv4*) ;; - i[3-7]86-sequent-sysv*) -changequote([,])dnl - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/symmetry.h"' - ;; -changequote(,)dnl - i[3-7]86-*-bsdi) -changequote([,])dnl - COREFILE= - ;; -changequote(,)dnl - 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*) -changequote([,])dnl - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/i386bsd.h"' - ;; -changequote(,)dnl - i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu | i[3-7]86-*-dragonfly*) -changequote([,])dnl - COREFILE='' - TRAD_HEADER='"hosts/i386bsd.h"' - ;; -changequote(,)dnl - i[3-7]86-*-netbsd* | i[3-7]86-*-knetbsd*-gnu | i[3-7]86-*-openbsd*) -changequote([,])dnl - COREFILE=netbsd-core.lo - ;; -changequote(,)dnl - i[3-7]86-esix-sysv3*) -changequote([,])dnl - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/esix.h"' - ;; -changequote(,)dnl - i[3-7]86-*-sco3.2v5*) -changequote([,])dnl - COREFILE=sco5-core.lo - ;; -changequote(,)dnl - i[3-7]86-*-sco* | i[3-7]86-*-isc*) -changequote([,])dnl - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/i386sco.h"' - ;; -changequote(,)dnl - i[3-7]86-*-mach3*) -changequote([,])dnl - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/i386mach3.h"' - ;; -changequote(,)dnl - i[3-7]86-*-linux-*) -changequote([,])dnl - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/i386linux.h"' - case "$enable_targets"-"$want64" in - *x86_64-*linux*|*-true) - CORE_HEADER='"hosts/x86-64linux.h"' - esac - ;; -changequote(,)dnl - i[3-7]86-*-isc*) COREFILE=trad-core.lo ;; - i[3-7]86-*-aix*) COREFILE=aix386-core.lo ;; -changequote([,])dnl - i860-*-mach3* | i860-*-osf1*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/i860mach3.h"' - ;; - mips-*-netbsd* | mips*-*-openbsd*) - COREFILE=netbsd-core.lo - ;; - mips-dec-*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/decstation.h"' - ;; - mips-sgi-irix4*) COREFILE=irix-core.lo ;; - mips-sgi-irix5*) COREFILE=irix-core.lo ;; - mips-sgi-irix6*) COREFILE=irix-core.lo ;; - mips-*-sysv4*) ;; - mips-*-sysv* | mips-*-riscos*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/riscos.h"' - ;; - mips-sony-bsd*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/news-mips.h"' - ;; - m68*-bull*-sysv*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/dpx2.h"' - ;; - m68*-hp-hpux*) COREFILE=hpux-core.lo ;; - m68*-hp-bsd*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/hp300bsd.h"' - ;; - m68*-*-linux-*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/m68klinux.h"' - ;; - m68*-motorola-sysv*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/delta68.h"' - ;; - m68*-sony-*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/news.h"' - ;; - m68*-*-netbsd* | m68*-*-openbsd*) - COREFILE=netbsd-core.lo - ;; - m68*-apple-aux*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/m68kaux.h"' - ;; - m88*-*-sysv4*) - ;; - m88*-motorola-sysv*) - COREFILE=ptrace-core.lo - ;; - m88*-*-mach3*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/m88kmach3.h"' - ;; - m88*-*-openbsd*) - COREFILE=netbsd-core.lo - ;; - ns32k-pc532-mach) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/pc532mach.h"' - ;; - ns32k-*-netbsd* | ns32k-*-openbsd*) - COREFILE=netbsd-core.lo - ;; - rs6000-*-lynx*) - COREFILE=lynx-core.lo - ;; -changequote(,)dnl - rs6000-*-aix[5-9].* | powerpc-*-aix[5-9].*) -changequote([,])dnl - COREFILE=rs6000-core.lo - COREFLAG="$COREFLAG -DAIX_5_CORE -DAIX_CORE_DUMPX_CORE" - ;; -changequote(,)dnl - rs6000-*-aix4.[3-9]* | powerpc-*-aix4.[3-9]*) -changequote([,])dnl - COREFILE=rs6000-core.lo - COREFLAG="$COREFLAG -DAIX_CORE_DUMPX_CORE" - # Not all versions of AIX with -DAIX_CORE_DUMPX_CORE - # have c_impl as a member of struct core_dumpx - AC_MSG_CHECKING([for c_impl in struct core_dumpx]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[struct core_dumpx c; c.c_impl = 0;]])],[AC_DEFINE(HAVE_ST_C_IMPL, 1, - [Define if struct core_dumpx has member c_impl]) - AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)]) - ;; - rs6000-*-aix4*) COREFILE=rs6000-core.lo ;; - rs6000-*-*) COREFILE=rs6000-core.lo ;; - powerpc-*-aix4*) COREFILE=rs6000-core.lo ;; - powerpc-*-aix*) COREFILE=rs6000-core.lo ;; - powerpc-*-beos*) ;; - powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu) - COREFILE='' ;; - powerpc-*-netbsd*) COREFILE=netbsd-core.lo ;; - powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;; - s390*-*-*) COREFILE=trad-core.lo ;; - sh*-*-netbsd* | sh*-*-openbsd*) - COREFILE=netbsd-core.lo - ;; - sparc-*-netbsd* | sparc*-*-openbsd*) - COREFILE=netbsd-core.lo - ;; - tahoe-*-*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/tahoe.h"' - ;; - vax-*-netbsd* | vax-*-openbsd*) - COREFILE=netbsd-core.lo - ;; - vax-*-ultrix2*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/vaxult2.h"' - ;; - vax-*-ultrix*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/vaxult2.h"' - ;; - vax-*-linux-*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/vaxlinux.h"' - ;; - vax-*-*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/vaxbsd.h"' - ;; - x86_64-*-linux*) - CORE_HEADER='"hosts/x86-64linux.h"' - ;; - x86_64-*-netbsd* | x86_64-*-openbsd*) - COREFILE=netbsd-core.lo - ;; - esac - - case "$COREFILE" in - aix386-core.lo) COREFLAG=-DAIX386_CORE ;; - hppabsd-core.lo) COREFLAG=-DHPPABSD_CORE ;; - hpux-core.lo) COREFLAG=-DHPUX_CORE ;; - irix-core.lo) COREFLAG=-DIRIX_CORE ;; - lynx-core.lo) COREFLAG=-DLYNX_CORE ;; - netbsd-core.lo) COREFLAG=-DNETBSD_CORE ;; - osf-core.lo) COREFLAG=-DOSF_CORE ;; - ptrace-core.lo) COREFLAG=-DPTRACE_CORE ;; - rs6000-core.lo) COREFLAG="$COREFLAG -DAIX_CORE" ;; - sco5-core.lo) COREFLAG="$COREFLAG -DSCO5_CORE" ;; - trad-core.lo) COREFLAG="$COREFLAG -DTRAD_CORE" ;; - esac - - # ELF corefile support has several flavors, but all of - # them use something called - AC_CHECK_HEADERS(sys/procfs.h) - if test "$ac_cv_header_sys_procfs_h" = yes; then - BFD_HAVE_SYS_PROCFS_TYPE(prstatus_t) - BFD_HAVE_SYS_PROCFS_TYPE(prstatus32_t) - BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prstatus_t, pr_who) - BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prstatus32_t, pr_who) - BFD_HAVE_SYS_PROCFS_TYPE(pstatus_t) - BFD_HAVE_SYS_PROCFS_TYPE(pxstatus_t) - BFD_HAVE_SYS_PROCFS_TYPE(pstatus32_t) - BFD_HAVE_SYS_PROCFS_TYPE(prpsinfo_t) - BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prpsinfo_t, pr_pid) - BFD_HAVE_SYS_PROCFS_TYPE(prpsinfo32_t) - BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prpsinfo32_t, pr_pid) - BFD_HAVE_SYS_PROCFS_TYPE(psinfo_t) - BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(psinfo_t, pr_pid) - BFD_HAVE_SYS_PROCFS_TYPE(psinfo32_t) - BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(psinfo32_t, pr_pid) - BFD_HAVE_SYS_PROCFS_TYPE(lwpstatus_t) - BFD_HAVE_SYS_PROCFS_TYPE(lwpxstatus_t) - BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_context) - BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_reg) - BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_fpreg) - BFD_HAVE_SYS_PROCFS_TYPE(win32_pstatus_t) - fi -fi -AC_SUBST(COREFILE) -AC_SUBST(COREFLAG) -if test -n "$CORE_HEADER"; then - AC_DEFINE_UNQUOTED(CORE_HEADER, $CORE_HEADER, - [Name of host specific core header file to include in elf.c.]) -fi -if test -n "$TRAD_HEADER"; then - AC_DEFINE_UNQUOTED(TRAD_HEADER, $TRAD_HEADER, - [Name of host specific header file to include in trad-core.c.]) -fi - -# Check if linker supports --as-needed and --no-as-needed options -AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed, - [bfd_cv_ld_as_needed=no - if $LD --help 2>/dev/null | grep as-needed > /dev/null; then - bfd_cv_ld_as_needed=yes - fi - ]) - -LT_LIB_M - -# When building a shared libbfd, link against the pic version of libiberty -# so that apps that use libbfd won't need libiberty just to satisfy any -# libbfd references. -# We can't do that if a pic libiberty is unavailable since including non-pic -# code would insert text relocations into libbfd. -SHARED_LIBADD= -SHARED_LDFLAGS= -if test "$enable_shared" = "yes"; then -changequote(,)dnl - x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` -changequote([,])dnl - if test -n "$x"; then - SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" - fi - -# More hacks to build DLLs on Windows. - case "${host}" in - *-*-cygwin*) - SHARED_LDFLAGS="-no-undefined" - SHARED_LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32" - ;; - - # Hack to build or1k-src on OSX - or1k*-*-darwin*) - SHARED_LIBADD="-L`pwd`/../libiberty/pic -L`pwd`/../intl -liberty -lintl" - ;; - esac - - if test -n "$SHARED_LIBADD"; then - if test -n "$LIBM"; then - if test x"$bfd_cv_ld_as_needed" = xyes; then - # Link against libm only when needed. Put -lc, -lm inside -Wl - # to stop libtool reordering these options. - SHARED_LIBADD="$SHARED_LIBADD -Wl,-lc,--as-needed,`echo $LIBM | sed 's/ /,/g'`,--no-as-needed" - else - SHARED_LIBADD="$SHARED_LIBADD $LIBM" - fi - fi - fi -fi -AC_SUBST(SHARED_LDFLAGS) -AC_SUBST(SHARED_LIBADD) - -# target stuff: - -# Canonicalize the secondary target names. -if test -n "$enable_targets" ; then - for targ in `echo $enable_targets | sed 's/,/ /g'` - do - result=`$ac_config_sub $targ 2>/dev/null` - if test -n "$result" ; then - canon_targets="$canon_targets $result" - else - # Allow targets that config.sub doesn't recognize, like "all". - canon_targets="$canon_targets $targ" - fi - done -fi - -all_targets=false -defvec= -selvecs= -assocvecs= -selarchs= -TDEFINES= -for targ in $target $canon_targets -do - if test "x$targ" = "xall"; then - all_targets=true - assocvecs="$assocvecs $targ_defvec $targ_selvecs" - else - . $srcdir/config.bfd - if test "x$targ" = "x$target"; then - defvec=$targ_defvec - fi - selvecs="$selvecs $targ_defvec $targ_selvecs" - selarchs="$selarchs $targ_archs" - TDEFINES="$TDEFINES $targ_cflags" - fi -done -AC_SUBST(TDEFINES) - -# This processing still needs to be done if we're to decide properly whether -# 64-bit support needs to be compiled in. Currently, it will be included if -# the default or any other explicitly requested target requires it; it -# will not be included on a 32-bit host if no 64-bit target is requested, and -# no "--with-64-bit-bfd" option is given, even if "--enable-targets=all" is -# used. - -# uniq the default and selected vectors in all the configured targets. -f="" -for i in $selvecs ; do - case " $f " in - *" $i "*) ;; - *) f="$f $i" ;; - esac -done -selvecs="$f" - - -# uniq the associated vectors in all the configured targets. -f="" -for i in $assocvecs ; do - case " $f " in - *" $i "*) ;; - *) f="$f $i" ;; - esac -done -assocvecs="$f" - - -# uniq the architectures in all the configured targets. -f="" -for i in $selarchs ; do - case " $f " in - *" $i "*) ;; - *) f="$f $i" ;; - esac -done -selarchs="$f" - -# Target backend .o files. -tb= - -elf="elf.lo elflink.lo elf-attrs.lo elf-strtab.lo - elf-eh-frame.lo dwarf1.lo" - -for vec in $selvecs -do - target_size=32 - case "$vec" in - # This list is alphabetized to make it easy to compare - # with the two vector lists in targets.c. For the same reason, - # use one entry per line, even though this leads to long lines. - aarch64_elf32_be_vec) tb="$tb elf32-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf32.lo $elf"; target_size=64 ;; - aarch64_elf32_le_vec) tb="$tb elf32-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf32.lo $elf"; target_size=64 ;; - aarch64_elf64_be_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;; - aarch64_elf64_le_vec) tb="$tb elf64-aarch64.lo elfxx-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;; - alpha_ecoff_le_vec) tb="$tb coff-alpha.lo ecoff.lo ecofflink.lo"; target_size=64 ;; - alpha_elf64_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;; - alpha_elf64_fbsd_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;; - alpha_nlm32_vec) tb="$tb nlm32-alpha.lo nlm32.lo nlm.lo"; target_size=64 ;; - alpha_vms_vec) tb="$tb vms-alpha.lo vms-misc.lo vms-lib.lo"; target_size=64 ;; - alpha_vms_lib_txt_vec) tb="$tb vms-lib.lo vms-misc.lo" ;; - am33_elf32_linux_vec) tb="$tb elf32-am33lin.lo elf32.lo $elf" ;; - aout0_be_vec) tb="$tb aout0.lo aout32.lo" ;; - aout64_vec) tb="$tb demo64.lo aout64.lo"; target_size=64 ;; - aout_vec) tb="$tb host-aout.lo aout32.lo" ;; - aout_adobe_vec) tb="$tb aout-adobe.lo aout32.lo" ;; - arc_elf32_be_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;; - arc_elf32_le_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;; - arm_aout_be_vec) tb="$tb aout-arm.lo aout32.lo" ;; - arm_aout_le_vec) tb="$tb aout-arm.lo aout32.lo" ;; - arm_aout_nbsd_vec) tb="$tb armnetbsd.lo aout32.lo" ;; - arm_aout_riscix_vec) tb="$tb aout32.lo riscix.lo" ;; - arm_coff_be_vec) tb="$tb coff-arm.lo cofflink.lo " ;; - arm_coff_le_vec) tb="$tb coff-arm.lo cofflink.lo " ;; - arm_elf32_be_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;; - arm_elf32_le_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;; - arm_elf32_nacl_be_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;; - arm_elf32_nacl_le_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;; - arm_elf32_symbian_be_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;; - arm_elf32_symbian_le_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;; - arm_elf32_vxworks_be_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;; - arm_elf32_vxworks_le_vec) tb="$tb elf32-arm.lo elf32.lo elf-nacl.lo elf-vxworks.lo $elf" ;; - arm_pe_be_vec) tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;; - arm_pe_le_vec) tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;; - arm_pe_epoc_be_vec) tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;; - arm_pe_epoc_le_vec) tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;; - arm_pe_wince_be_vec) tb="$tb pe-arm-wince.lo pe-arm.lo peigen.lo cofflink.lo " ;; - arm_pe_wince_le_vec) tb="$tb pe-arm-wince.lo pe-arm.lo peigen.lo cofflink.lo " ;; - arm_pei_be_vec) tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;; - arm_pei_le_vec) tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;; - arm_pei_epoc_be_vec) tb="$tb epoc-pei-arm.lo peigen.lo cofflink.lo " ;; - arm_pei_epoc_le_vec) tb="$tb epoc-pei-arm.lo peigen.lo cofflink.lo " ;; - arm_pei_wince_be_vec) tb="$tb pei-arm-wince.lo pei-arm.lo peigen.lo cofflink.lo " ;; - arm_pei_wince_le_vec) tb="$tb pei-arm-wince.lo pei-arm.lo peigen.lo cofflink.lo " ;; - avr_elf32_vec) tb="$tb elf32-avr.lo elf32.lo $elf" ;; - bfin_elf32_vec) tb="$tb elf32-bfin.lo elf32.lo $elf" ;; - bfin_elf32_fdpic_vec) tb="$tb elf32-bfin.lo elf32.lo $elf" ;; - bout_be_vec) tb="$tb bout.lo aout32.lo" ;; - bout_le_vec) tb="$tb bout.lo aout32.lo" ;; - cr16_elf32_vec) tb="$tb elf32-cr16.lo elf32.lo $elf" ;; - cr16c_elf32_vec) tb="$tb elf32-cr16c.lo elf32.lo $elf" ;; - cris_aout_vec) tb="$tb aout-cris.lo" ;; - cris_elf32_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;; - cris_elf32_us_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;; - crx_elf32_vec) tb="$tb elf32-crx.lo elf32.lo $elf" ;; - d10v_elf32_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;; - d30v_elf32_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;; - dlx_elf32_be_vec) tb="$tb elf32-dlx.lo elf32.lo $elf" ;; - elf32_be_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;; - elf32_le_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;; - elf64_be_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;; - elf64_le_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;; - epiphany_elf32_vec) tb="$tb elf32-epiphany.lo elf32.lo $elf" ;; - fr30_elf32_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;; - frv_elf32_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;; - frv_elf32_fdpic_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;; - h8300_coff_vec) tb="$tb coff-h8300.lo reloc16.lo" ;; - h8300_elf32_vec) tb="$tb elf32-h8300.lo elf32.lo $elf" ;; - h8500_coff_vec) tb="$tb coff-h8500.lo reloc16.lo" ;; - hppa_elf32_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; - hppa_elf32_linux_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; - hppa_elf32_nbsd_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; - hppa_elf64_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;; - hppa_elf64_linux_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;; - hppa_som_vec) tb="$tb som.lo" ;; - i370_elf32_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;; - i386_aout_vec) tb="$tb i386aout.lo aout32.lo" ;; - i386_aout_bsd_vec) tb="$tb i386bsd.lo aout32.lo" ;; - i386_aout_dynix_vec) tb="$tb i386dynix.lo aout32.lo" ;; - i386_aout_fbsd_vec) tb="$tb i386freebsd.lo aout32.lo" ;; - i386_aout_linux_vec) tb="$tb i386linux.lo aout32.lo" ;; - i386_aout_lynx_vec) tb="$tb i386lynx.lo lynx-core.lo aout32.lo" ;; - i386_aout_mach3_vec) tb="$tb i386mach3.lo aout32.lo" ;; - i386_aout_nbsd_vec) tb="$tb i386netbsd.lo aout32.lo" ;; - i386_aout_os9k_vec) tb="$tb i386os9k.lo aout32.lo" ;; - i386_coff_vec) tb="$tb coff-i386.lo cofflink.lo" ;; - i386_coff_go32_vec) tb="$tb coff-go32.lo cofflink.lo" ;; - i386_coff_go32stubbed_vec) tb="$tb coff-stgo32.lo cofflink.lo" ;; - i386_coff_lynx_vec) tb="$tb cf-i386lynx.lo cofflink.lo lynx-core.lo" ;; - i386_elf32_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;; - i386_elf32_fbsd_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;; - i386_elf32_nacl_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;; - i386_elf32_sol2_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;; - i386_elf32_vxworks_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;; - i386_mach_o_vec) tb="$tb mach-o-i386.lo" ;; - i386_msdos_vec) tb="$tb i386msdos.lo" ;; - i386_nlm32_vec) tb="$tb nlm32-i386.lo nlm32.lo nlm.lo" ;; - i386_pe_vec) tb="$tb pe-i386.lo peigen.lo cofflink.lo" ;; - i386_pei_vec) tb="$tb pei-i386.lo peigen.lo cofflink.lo" ;; - i860_coff_vec) tb="$tb coff-i860.lo cofflink.lo" ;; - i860_elf32_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;; - i860_elf32_le_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;; - i960_elf32_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;; - ia64_elf32_be_vec) tb="$tb elf32-ia64.lo elfxx-ia64.lo elf32.lo $elf" ;; - ia64_elf32_hpux_be_vec) tb="$tb elf32-ia64.lo elfxx-ia64.lo elf32.lo $elf" ;; - ia64_elf64_be_vec) tb="$tb elf64-ia64.lo elfxx-ia64.lo elf64.lo $elf"; target_size=64 ;; - ia64_elf64_le_vec) tb="$tb elf64-ia64.lo elfxx-ia64.lo elf64.lo $elf"; target_size=64 ;; - ia64_elf64_hpux_be_vec) tb="$tb elf64-ia64.lo elfxx-ia64.lo elf64.lo $elf"; target_size=64 ;; - ia64_elf64_vms_vec) tb="$tb elf64-ia64-vms.lo elf64-ia64.lo elfxx-ia64.lo elf64.lo vms-lib.lo vms-misc.lo $elf"; target_size=64 ;; - ia64_pei_vec) tb="$tb pei-ia64.lo pepigen.lo cofflink.lo"; target_size=64 ;; - icoff_be_vec) tb="$tb coff-i960.lo cofflink.lo" ;; - icoff_le_vec) tb="$tb coff-i960.lo cofflink.lo" ;; - ieee_vec) tb="$tb ieee.lo" ;; - ip2k_elf32_vec) tb="$tb elf32-ip2k.lo elf32.lo $elf" ;; - iq2000_elf32_vec) tb="$tb elf32-iq2000.lo elf32.lo $elf" ;; - k1om_elf64_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;; - k1om_elf64_fbsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;; - l1om_elf64_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;; - l1om_elf64_fbsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;; - lm32_elf32_vec) tb="$tb elf32-lm32.lo elf32.lo $elf" ;; - lm32_elf32_fdpic_vec) tb="$tb elf32-lm32.lo elf32.lo $elf" ;; - m32c_elf32_vec) tb="$tb elf32-m32c.lo elf32.lo $elf" ;; - m32r_elf32_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;; - m32r_elf32_le_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;; - m32r_elf32_linux_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;; - m32r_elf32_linux_le_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;; - m68hc11_elf32_vec) tb="$tb elf32-m68hc11.lo elf32-m68hc1x.lo elf32.lo $elf" ;; - m68hc12_elf32_vec) tb="$tb elf32-m68hc12.lo elf32-m68hc1x.lo elf32.lo $elf" ;; - m68k_aout_4knbsd_vec) tb="$tb m68k4knetbsd.lo aout32.lo" ;; - m68k_aout_hp300bsd_vec) tb="$tb hp300bsd.lo aout32.lo" ;; - m68k_aout_hp300hpux_vec) tb="$tb hp300hpux.lo aout32.lo" ;; - m68k_aout_linux_vec) tb="$tb m68klinux.lo aout32.lo" ;; - m68k_aout_nbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;; - m68k_aout_newsos3_vec) tb="$tb newsos3.lo aout32.lo" ;; - m68k_coff_vec) tb="$tb coff-m68k.lo cofflink.lo" ;; - m68k_coff_apollo_vec) tb="$tb coff-apollo.lo" ;; - m68k_coff_aux_vec) tb="$tb coff-aux.lo coff-m68k.lo cofflink.lo" ;; - m68k_coff_sysv_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;; - m68k_coff_un_vec) tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;; - m68k_elf32_vec) tb="$tb elf32-m68k.lo elf32.lo $elf" ;; - m68k_versados_vec) tb="$tb versados.lo" ;; - m88k_aout_mach3_vec) tb="$tb m88kmach3.lo aout32.lo" ;; - m88k_aout_obsd_vec) tb="$tb m88kopenbsd.lo aout32.lo" ;; - m88k_coff_bcs_vec) tb="$tb coff-m88k.lo" ;; - m88k_elf32_vec) tb="$tb elf32-m88k.lo elf32.lo $elf" ;; - mach_o_be_vec) tb="$tb mach-o.lo" ;; - mach_o_le_vec) tb="$tb mach-o.lo" ;; - mach_o_fat_vec) tb="$tb mach-o.lo" ;; - mcore_elf32_be_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;; - mcore_elf32_le_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;; - mcore_pe_be_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;; - mcore_pe_le_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;; - mcore_pei_be_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;; - mcore_pei_le_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;; - mep_elf32_vec) tb="$tb elf32-mep.lo elf32.lo $elf" ;; - mep_elf32_le_vec) tb="$tb elf32-mep.lo elf32.lo $elf" ;; - metag_elf32_vec) tb="$tb elf32-metag.lo elf32.lo $elf" ;; - microblaze_elf32_vec) tb="$tb elf32-microblaze.lo elf32.lo $elf" ;; - microblaze_elf32_le_vec) tb="$tb elf32-microblaze.lo elf32.lo $elf" ;; - mips_ecoff_be_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;; - mips_ecoff_le_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;; - mips_ecoff_bele_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;; - mips_elf32_be_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;; - mips_elf32_le_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;; - mips_elf32_n_be_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; - mips_elf32_n_le_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; - mips_elf32_ntrad_be_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; - mips_elf32_ntrad_le_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; - mips_elf32_ntradfbsd_be_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; - mips_elf32_ntradfbsd_le_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; - mips_elf32_trad_be_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;; - mips_elf32_trad_le_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;; - mips_elf32_tradfbsd_be_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;; - mips_elf32_tradfbsd_le_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;; - mips_elf32_vxworks_be_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;; - mips_elf32_vxworks_le_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;; - mips_elf64_be_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; - mips_elf64_le_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; - mips_elf64_trad_be_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; - mips_elf64_trad_le_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; - mips_elf64_tradfbsd_be_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; - mips_elf64_tradfbsd_le_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; - mips_pe_le_vec) tb="$tb pe-mips.lo peigen.lo cofflink.lo" ;; - mips_pei_le_vec) tb="$tb pei-mips.lo peigen.lo cofflink.lo" ;; - mmix_elf64_vec) tb="$tb elf64-mmix.lo elf64.lo $elf" target_size=64 ;; - mmix_mmo_vec) tb="$tb mmo.lo" target_size=64 ;; - mn10200_elf32_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;; - mn10300_elf32_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;; - moxie_elf32_be_vec) tb="$tb elf32-moxie.lo elf32.lo $elf" ;; - moxie_elf32_le_vec) tb="$tb elf32-moxie.lo elf32.lo $elf" ;; - msp430_elf32_vec) tb="$tb elf32-msp430.lo elf32.lo $elf" ;; - msp430_elf32_ti_vec) tb="$tb elf32-msp430.lo elf32.lo $elf" ;; - mt_elf32_vec) tb="$tb elf32-mt.lo elf32.lo $elf" ;; - nds32_elf32_be_vec) tb="$tb elf32-nds32.lo elf32.lo $elf" ;; - nds32_elf32_le_vec) tb="$tb elf32-nds32.lo elf32.lo $elf" ;; - nds32_elf32_linux_be_vec) tb="$tb elf32-nds32.lo elf32.lo $elf" ;; - nds32_elf32_linux_le_vec) tb="$tb elf32-nds32.lo elf32.lo $elf" ;; - nios2_elf32_be_vec) tb="$tb elf32-nios2.lo elf32.lo $elf" ;; - nios2_elf32_le_vec) tb="$tb elf32-nios2.lo elf32.lo $elf" ;; - ns32k_aout_pc532mach_vec) tb="$tb pc532-mach.lo aout-ns32k.lo" ;; - ns32k_aout_pc532nbsd_vec) tb="$tb ns32knetbsd.lo aout-ns32k.lo" ;; - or1k_elf32_vec) tb="$tb elf32-or1k.lo elf32.lo $elf" ;; - pdp11_aout_vec) tb="$tb pdp11.lo" ;; - pef_vec) tb="$tb pef.lo" ;; - pef_xlib_vec) tb="$tb pef.lo" ;; - pj_elf32_vec) tb="$tb elf32-pj.lo elf32.lo $elf" ;; - pj_elf32_le_vec) tb="$tb elf32-pj.lo elf32.lo $elf" ;; - plugin_vec) tb="$tb plugin.lo" ;; - powerpc_boot_vec) tb="$tb ppcboot.lo" ;; - powerpc_elf32_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; - powerpc_elf32_le_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; - powerpc_elf32_fbsd_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; - powerpc_elf32_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; - powerpc_elf64_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;; - powerpc_elf64_le_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;; - powerpc_elf64_fbsd_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;; - powerpc_nlm32_vec) tb="$tb nlm32-ppc.lo nlm32.lo nlm.lo" ;; - powerpc_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;; - powerpc_pe_le_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;; - powerpc_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;; - powerpc_pei_le_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;; - powerpc_xcoff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;; - rl78_elf32_vec) tb="$tb elf32-rl78.lo elf32.lo $elf" ;; - rs6000_xcoff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo aix5ppc-core.lo"; target_size=64 ;; - rs6000_xcoff64_aix_vec) tb="$tb coff64-rs6000.lo xcofflink.lo aix5ppc-core.lo"; target_size=64 ;; - rs6000_xcoff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;; - rx_elf32_be_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;; - rx_elf32_be_ns_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;; - rx_elf32_le_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;; - s390_elf32_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;; - s390_elf64_vec) tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;; - score_elf32_be_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true; target_size=64 ;; - score_elf32_le_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true; target_size=64 ;; - # FIXME: We include cofflink.lo not because it's needed for - # sh64_elf32[_le]_vec, but because we include sh_elf32[_le]_vec - # which needs it but does not list it. Should be fixed in right place. - sh64_elf32_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf cofflink.lo" target_size=64 ;; - sh64_elf32_le_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf cofflink.lo" target_size=64 ;; - sh64_elf32_linux_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf cofflink.lo" target_size=64 ;; - sh64_elf32_linux_be_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf cofflink.lo" target_size=64 ;; - sh64_elf32_nbsd_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf cofflink.lo" ;; - sh64_elf32_nbsd_le_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf cofflink.lo" ;; - sh64_elf64_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; - sh64_elf64_le_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; - sh64_elf64_linux_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; - sh64_elf64_linux_be_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; - sh64_elf64_nbsd_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; - sh64_elf64_nbsd_le_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; - sh_coff_vec) tb="$tb coff-sh.lo cofflink.lo" ;; - sh_coff_le_vec) tb="$tb coff-sh.lo cofflink.lo" ;; - sh_coff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;; - sh_coff_small_le_vec) tb="$tb coff-sh.lo cofflink.lo" ;; - sh_elf32_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo" ;; - sh_elf32_le_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo" ;; - sh_elf32_fdpic_be_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; - sh_elf32_fdpic_le_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; - sh_elf32_linux_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; - sh_elf32_linux_be_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; - sh_elf32_nbsd_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; - sh_elf32_nbsd_le_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; - sh_elf32_symbian_le_vec) tb="$tb elf32-sh-symbian.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo" ;; - sh_elf32_vxworks_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo" ;; - sh_elf32_vxworks_le_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo" ;; - sh_pe_le_vec) tb="$tb pe-sh.lo coff-sh.lo peigen.lo cofflink.lo" ;; - sh_pei_le_vec) tb="$tb pei-sh.lo coff-sh.lo peigen.lo cofflink.lo" ;; - sparc_aout_le_vec) tb="$tb aout-sparcle.lo aout32.lo" ;; - sparc_aout_linux_vec) tb="$tb sparclinux.lo aout32.lo" ;; - sparc_aout_lynx_vec) tb="$tb sparclynx.lo lynx-core.lo aout32.lo" ;; - sparc_aout_nbsd_vec) tb="$tb sparcnetbsd.lo aout32.lo" ;; - sparc_aout_sunos_be_vec) tb="$tb sunos.lo aout32.lo" ;; - sparc_coff_vec) tb="$tb coff-sparc.lo" ;; - sparc_coff_lynx_vec) tb="$tb cf-sparclynx.lo lynx-core.lo" ;; - sparc_elf32_vec) tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;; - sparc_elf32_sol2_vec) tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;; - sparc_elf32_vxworks_vec) tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;; - sparc_elf64_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;; - sparc_elf64_fbsd_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;; - sparc_elf64_sol2_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;; - sparc_nlm32_vec) tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;; - spu_elf32_vec) tb="$tb elf32-spu.lo elf32.lo $elf" ;; - sym_vec) tb="$tb xsym.lo" ;; - tic30_aout_vec) tb="$tb aout-tic30.lo" ;; - tic30_coff_vec) tb="$tb coff-tic30.lo" ;; - tic4x_coff0_vec) tb="$tb coff-tic4x.lo" ;; - tic4x_coff0_beh_vec) tb="$tb coff-tic4x.lo" ;; - tic4x_coff1_vec) tb="$tb coff-tic4x.lo" ;; - tic4x_coff1_beh_vec) tb="$tb coff-tic4x.lo" ;; - tic4x_coff2_vec) tb="$tb coff-tic4x.lo" ;; - tic4x_coff2_beh_vec) tb="$tb coff-tic4x.lo" ;; - tic54x_coff0_vec) tb="$tb coff-tic54x.lo" ;; - tic54x_coff0_beh_vec) tb="$tb coff-tic54x.lo" ;; - tic54x_coff1_vec) tb="$tb coff-tic54x.lo" ;; - tic54x_coff1_beh_vec) tb="$tb coff-tic54x.lo" ;; - tic54x_coff2_vec) tb="$tb coff-tic54x.lo" ;; - tic54x_coff2_beh_vec) tb="$tb coff-tic54x.lo" ;; - tic6x_elf32_be_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;; - tic6x_elf32_le_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;; - tic6x_elf32_c6000_be_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;; - tic6x_elf32_c6000_le_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;; - tic6x_elf32_linux_be_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;; - tic6x_elf32_linux_le_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;; - tic80_coff_vec) tb="$tb coff-tic80.lo cofflink.lo" ;; - tilegx_elf32_be_vec) tb="$tb elf32-tilegx.lo elfxx-tilegx.lo elf32.lo $elf" ; target_size=32 ;; - tilegx_elf32_le_vec) tb="$tb elf32-tilegx.lo elfxx-tilegx.lo elf32.lo $elf" ; target_size=32 ;; - tilegx_elf64_be_vec) tb="$tb elf64-tilegx.lo elfxx-tilegx.lo elf64.lo $elf" ; target_size=64 ;; - tilegx_elf64_le_vec) tb="$tb elf64-tilegx.lo elfxx-tilegx.lo elf64.lo $elf" ; target_size=64 ;; - tilepro_elf32_vec) tb="$tb elf32-tilepro.lo elf32.lo $elf" ;; - v800_elf32_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;; - v850_elf32_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;; - vax_aout_1knbsd_vec) tb="$tb vax1knetbsd.lo aout32.lo" ;; - vax_aout_bsd_vec) tb="$tb vaxbsd.lo aout32.lo" ;; - vax_aout_nbsd_vec) tb="$tb vaxnetbsd.lo aout32.lo" ;; - vax_elf32_vec) tb="$tb elf32-vax.lo elf32.lo $elf" ;; - w65_coff_vec) tb="$tb coff-w65.lo reloc16.lo" ;; - we32k_coff_vec) tb="$tb coff-we32k.lo" ;; - x86_64_coff_vec) tb="$tb coff-x86_64.lo cofflink.lo"; target_size=64 ;; - x86_64_elf32_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo elf32.lo $elf"; target_size=64 ;; - x86_64_elf32_nacl_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo elf32.lo $elf"; target_size=64 ;; - x86_64_elf64_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;; - x86_64_elf64_fbsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;; - x86_64_elf64_nacl_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;; - x86_64_elf64_sol2_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;; - x86_64_mach_o_vec) tb="$tb mach-o-x86-64.lo" ;; - x86_64_pe_vec) tb="$tb pe-x86_64.lo pex64igen.lo cofflink.lo"; target_size=64 ;; - x86_64_pe_be_vec) tb="$tb pe-x86_64.lo pex64igen.lo cofflink.lo"; target_size=64 ;; - x86_64_pei_vec) tb="$tb pei-x86_64.lo pex64igen.lo cofflink.lo"; target_size=64 ;; - xc16x_elf32_vec) tb="$tb elf32-xc16x.lo elf32.lo $elf" ;; - xgate_elf32_vec) tb="$tb elf32-xgate.lo elf32.lo $elf" ;; - xstormy16_elf32_vec) tb="$tb elf32-xstormy16.lo elf32.lo $elf" ;; - xtensa_elf32_be_vec) tb="$tb xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;; - xtensa_elf32_le_vec) tb="$tb xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;; - z80_coff_vec) tb="$tb coff-z80.lo reloc16.lo" ;; - z8k_coff_vec) tb="$tb coff-z8k.lo reloc16.lo cofflink.lo" ;; - - # These appear out of order in targets.c - srec_vec) tb="$tb srec.lo" ;; - symbolsrec_vec) tb="$tb srec.lo" ;; - tekhex_vec) tb="$tb tekhex.lo" ;; - core_cisco_be_vec) tb="$tb cisco-core.lo" ;; - core_cisco_le_vec) tb="$tb cisco-core.lo" ;; - - "") ;; - *) AC_MSG_ERROR(*** unknown target vector $vec) ;; - esac - - if test ${target_size} = 64; then - target64=true - fi - if test x"${vec}" = x"${defvec}"; then - bfd_default_target_size=${target_size} - fi -done - -# Target architecture .o files. -# A couple of CPUs use shorter file names to avoid problems on DOS -# filesystems. -ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.lo/g -e s/mn10200/m10200/ -e s/mn10300/m10300/` - -# Weed out duplicate .o files. -f="" -for i in $tb ; do - case " $f " in - *" $i "*) ;; - *) f="$f $i" ;; - esac -done -tb="$f" - -f="" -for i in $ta ; do - case " $f " in - *" $i "*) ;; - *) f="$f $i" ;; - esac -done -ta="$f" - -bfd_backends="$tb" -bfd_machines="$ta" - -if test x${all_targets} = xtrue ; then - bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)' - bfd_machines="${bfd_machines}"' $(ALL_MACHINES)' - selvecs= - havevecs=-DHAVE_all_vecs - selarchs= - test -n "$assocvecs" && - assocvecs=`echo $assocvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'` -else # all_targets is true - # Only set these if they will be nonempty, for the clever echo. - havevecs= - assocvecs= - test -n "$selvecs" && - havevecs=`echo $selvecs | sed -e 's/^/-DHAVE_/' -e 's/ \(.\)/ -DHAVE_\1/g'` - test -n "$selvecs" && - selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'` - test -n "$selarchs" && - selarchs=`echo $selarchs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'` -fi # all_targets is true - -case ${host64}-${target64}-${want64} in - *true*) - wordsize=64 - bfd64_libs='$(BFD64_LIBS)' - all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)' - if test $BFD_HOST_64_BIT_DEFINED = 0; then - AC_MSG_WARN([You have requested a 64 bit BFD configuration, but]) - AC_MSG_WARN([your compiler may not have a 64 bit integral type]) - fi - if test -n "$GCC" ; then - bad_64bit_gcc=no; - AC_MSG_CHECKING([for gcc version with buggy 64-bit support]) - # Add more tests for gcc versions with non-working 64-bit support here. - AC_EGREP_CPP([: 2 : 91 : 1 :],[:__GNUC__:__GNUC_MINOR__:__i386__:], - bad_64bit_gcc=yes; - AC_MSG_RESULT([yes: egcs-1.1.2 on ix86 spotted]), - AC_MSG_RESULT(no)) - if test $bad_64bit_gcc = yes ; then - AC_MSG_ERROR([A newer version of gcc is needed for the requested 64-bit BFD configuration]) - fi - fi - ;; - false-false-false) - wordsize=32 - all_backends='$(BFD32_BACKENDS)' - ;; -esac - -AC_SUBST(wordsize) -AC_SUBST(bfd64_libs) -AC_SUBST(all_backends) -AC_SUBST(bfd_backends) -AC_SUBST(bfd_machines) -AC_SUBST(bfd_default_target_size) - -if test "$plugins" = "yes"; then - supports_plugins=1 -else - supports_plugins=0 -fi -AC_SUBST(supports_plugins) -AC_SUBST(lt_cv_dlopen_libs) - -# Determine the host dependant file_ptr a.k.a. off_t type. In order -# prefer: off64_t - if ftello64 and fseeko64, off_t - if ftello and -# fseeko, long. This assumes that sizeof off_t is .ge. sizeof long. -# Hopefully a reasonable assumption since fseeko et.al. should be -# upward compatible. -AC_CHECK_FUNCS(ftello ftello64 fseeko fseeko64 fopen64) -if test x"$ac_cv_func_ftello" = xyes -a x"$ac_cv_func_fseeko" = xyes; then - AC_CHECK_SIZEOF(off_t) -fi -AC_MSG_CHECKING([file_ptr type]) -bfd_file_ptr="long" -bfd_ufile_ptr="unsigned long" -if test x"$ac_cv_func_ftello64" = xyes -a x"$ac_cv_func_fseeko64" = xyes \ - -o x"${ac_cv_sizeof_off_t}" = x8; then - bfd_file_ptr=BFD_HOST_64_BIT - bfd_ufile_ptr=BFD_HOST_U_64_BIT -fi -AC_MSG_RESULT($bfd_file_ptr) -AC_SUBST(bfd_file_ptr) -AC_SUBST(bfd_ufile_ptr) - - -tdefaults="" -test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}" -test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'" -test -n "${assocvecs}" && tdefaults="${tdefaults} -DASSOCIATED_VECS='${assocvecs}'" -test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'" -AC_SUBST(tdefaults) -AC_SUBST(havevecs) - -dnl AC_CHECK_HEADERS(sys/mman.h) -AC_FUNC_MMAP -AC_CHECK_FUNCS(madvise mprotect) -case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in - true+yes ) AC_DEFINE(USE_MMAP, 1, [Use mmap if it's available?]) ;; -esac - -rm -f doc/config.status -AC_CONFIG_FILES([Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in]) - -dnl We need this duplication, even though we use AM_PO_SUBDIRS, because of -dnl our two separate POTFILES. Yuck. -AC_CONFIG_COMMANDS([default], -[[ -case "$srcdir" in - .) srcdirpre= ;; - *) srcdirpre='$(srcdir)/' ;; -esac -POFILES= -GMOFILES= -for lang in dummy $OBSOLETE_ALL_LINGUAS; do - if test $lang != dummy; then - POFILES="$POFILES $srcdirpre$lang.po" - GMOFILES="$GMOFILES $srcdirpre$lang.gmo" - fi -done -sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' \ - -e '/BLD-POTFILES =/r po/BLD-POTFILES' \ - -e "s,@POFILES@,$POFILES," \ - -e "s,@GMOFILES@,$GMOFILES," \ - po/Makefile.in > po/Makefile]],[[]]) - -dnl Required by html, pdf, install-pdf and install-html -AC_SUBST(datarootdir) -AC_SUBST(docdir) -AC_SUBST(htmldir) -AC_SUBST(pdfdir) - -AC_OUTPUT diff --git a/bfd/doc/Makefile.in b/bfd/doc/Makefile.in index 944dee808cc..65ad42db065 100644 --- a/bfd/doc/Makefile.in +++ b/bfd/doc/Makefile.in @@ -76,7 +76,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \ $(top_srcdir)/bfd.m4 $(top_srcdir)/warning.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/../config/zlib.m4 \ - $(top_srcdir)/version.m4 $(top_srcdir)/configure.in + $(top_srcdir)/version.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 076ecc92687..1310d14c0be 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,10 @@ +2014-07-04 Alan Modra + + * configure.ac: Rename from configure.in. + * Makefile.in: Regenerate. + * config.in: Regenerate. + * doc/Makefile.in: Regenerate. + 2014-07-04 Alan Modra * configure.in: Include bfd/version.m4. diff --git a/binutils/Makefile.in b/binutils/Makefile.in index 456c69e7805..c6e0003dc31 100644 --- a/binutils/Makefile.in +++ b/binutils/Makefile.in @@ -92,7 +92,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \ $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \ $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \ $(top_srcdir)/../lt~obsolete.m4 \ - $(top_srcdir)/../bfd/version.m4 $(top_srcdir)/configure.in + $(top_srcdir)/../bfd/version.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ diff --git a/binutils/config.in b/binutils/config.in index 0a8551ffc09..70a127ed542 100644 --- a/binutils/config.in +++ b/binutils/config.in @@ -1,4 +1,4 @@ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ diff --git a/binutils/configure.ac b/binutils/configure.ac new file mode 100644 index 00000000000..ff0d4dcd0bb --- /dev/null +++ b/binutils/configure.ac @@ -0,0 +1,497 @@ +dnl Process this file with autoconf to produce a configure script. +dnl +dnl Copyright (C) 2012-2014 Free Software Foundation, Inc. +dnl +dnl This file is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; see the file COPYING3. If not see +dnl . +dnl + +AC_PREREQ(2.59) +m4_include([../bfd/version.m4]) +AC_INIT([binutils], BFD_VERSION) +AC_CONFIG_SRCDIR(ar.c) + +AC_CANONICAL_TARGET +AC_ISC_POSIX + +AM_INIT_AUTOMAKE + +AC_PROG_CC +AC_GNU_SOURCE +AC_USE_SYSTEM_EXTENSIONS + +ACX_LARGEFILE +LT_INIT + +AC_ARG_ENABLE(targets, +[ --enable-targets alternative target configurations], +[case "${enableval}" in + yes | "") AC_MSG_ERROR(enable-targets option must specify target names or 'all') + ;; + no) enable_targets= ;; + *) enable_targets=$enableval ;; +esac])dnl + +AC_ARG_ENABLE(deterministic-archives, +[AS_HELP_STRING([--enable-deterministic-archives], + [ar and ranlib default to -D behavior])], [ +if test "${enableval}" = no; then + default_ar_deterministic=0 +else + default_ar_deterministic=1 +fi], [default_ar_deterministic=0]) + +AC_DEFINE_UNQUOTED(DEFAULT_AR_DETERMINISTIC, $default_ar_deterministic, + [Should ar and ranlib use -D behavior by default?]) + +AM_BINUTILS_WARNINGS + +AC_CONFIG_HEADERS(config.h:config.in) + +AH_VERBATIM([00_CONFIG_H_CHECK], +[/* Check that config.h is #included before system headers + (this works only for glibc, but that should be enough). */ +#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__) +# error config.h must be #included before system headers +#endif +#define __CONFIG_H__ 1]) + +if test -z "$target" ; then + AC_MSG_ERROR(Unrecognized target system type; please check config.sub.) +fi +if test -z "$host" ; then + AC_MSG_ERROR(Unrecognized host system type; please check config.sub.) +fi + +AC_PROG_YACC +AM_PROG_LEX + +ALL_LINGUAS="bg da es fi fr id it ja ro ru rw sk sv tr uk vi zh_CN zh_TW hr" +ZW_GNU_GETTEXT_SISTER_DIR +AM_PO_SUBDIRS + +AM_MAINTAINER_MODE +AM_CONDITIONAL(GENINSRC_NEVER, false) +AC_EXEEXT +if test -n "$EXEEXT"; then + AC_DEFINE(HAVE_EXECUTABLE_SUFFIX, 1, + [Does the platform use an executable suffix?]) +fi +AC_DEFINE_UNQUOTED(EXECUTABLE_SUFFIX, "${EXEEXT}", + [Suffix used for executables, if any.]) + +# host-specific stuff: + +HDEFINES= + +. ${srcdir}/../bfd/configure.host + +AC_SUBST(HDEFINES) +AR=${AR-ar} +AC_SUBST(AR) +AC_PROG_RANLIB +AC_PROG_INSTALL + +BFD_CC_FOR_BUILD + +DEMANGLER_NAME=c++filt +case "${host}" in + *-*-go32* | *-*-msdos*) + DEMANGLER_NAME=cxxfilt +esac +AC_SUBST(DEMANGLER_NAME) + +AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h limits.h locale.h sys/param.h wchar.h) +AC_HEADER_SYS_WAIT +ACX_HEADER_STRING +AC_FUNC_ALLOCA +AC_CHECK_FUNCS(sbrk utimes setmode getc_unlocked strcoll setlocale) +AC_CHECK_FUNC([mkstemp], + AC_DEFINE([HAVE_MKSTEMP], 1, + [Define to 1 if you have the `mkstemp' function.])) +AC_CHECK_FUNC([mkdtemp], + AC_DEFINE([HAVE_MKDTEMP], 1, + [Define to 1 if you have the `mkdtemp' function.])) + AC_MSG_CHECKING([for mbstate_t]) + AC_TRY_COMPILE([#include ], + [mbstate_t teststate;], + have_mbstate_t=yes, have_mbstate_t=no) + AC_MSG_RESULT($have_mbstate_t) + if test x"$have_mbstate_t" = xyes; then + AC_DEFINE(HAVE_MBSTATE_T,1,[Define if mbstate_t exists in wchar.h.]) + fi + +# Some systems have frexp only in -lm, not in -lc. +AC_SEARCH_LIBS(frexp, m) + +AM_LC_MESSAGES + +AC_MSG_CHECKING(for time_t in time.h) +AC_CACHE_VAL(bu_cv_decl_time_t_time_h, +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [time_t i;])], +bu_cv_decl_time_t_time_h=yes, bu_cv_decl_time_t_time_h=no)]) +AC_MSG_RESULT($bu_cv_decl_time_t_time_h) +if test $bu_cv_decl_time_t_time_h = yes; then + AC_DEFINE([HAVE_TIME_T_IN_TIME_H], 1, + [Is the type time_t defined in ?]) +fi + +AC_MSG_CHECKING(for time_t in sys/types.h) +AC_CACHE_VAL(bu_cv_decl_time_t_types_h, +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [time_t i;])], +bu_cv_decl_time_t_types_h=yes, bu_cv_decl_time_t_types_h=no)]) +AC_MSG_RESULT($bu_cv_decl_time_t_types_h) +if test $bu_cv_decl_time_t_types_h = yes; then + AC_DEFINE([HAVE_TIME_T_IN_TYPES_H], 1, + [Is the type time_t defined in ?]) +fi + +AC_MSG_CHECKING(for a known getopt prototype in unistd.h) +AC_CACHE_VAL(bu_cv_decl_getopt_unistd_h, +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [extern int getopt (int, char *const*, const char *);])], +bu_cv_decl_getopt_unistd_h=yes, bu_cv_decl_getopt_unistd_h=no)]) +AC_MSG_RESULT($bu_cv_decl_getopt_unistd_h) +if test $bu_cv_decl_getopt_unistd_h = yes; then + AC_DEFINE([HAVE_DECL_GETOPT], 1, + [Is the prototype for getopt in in the expected format?]) +fi + +# Under Next 3.2 apparently does not define struct utimbuf +# by default. +AC_MSG_CHECKING([for utime.h]) +AC_CACHE_VAL(bu_cv_header_utime_h, +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include +#ifdef HAVE_TIME_H +#include +#endif +#include ], +[struct utimbuf s;])], +bu_cv_header_utime_h=yes, bu_cv_header_utime_h=no)]) +AC_MSG_RESULT($bu_cv_header_utime_h) +if test $bu_cv_header_utime_h = yes; then + AC_DEFINE(HAVE_GOOD_UTIME_H, 1, [Does define struct utimbuf?]) +fi + +AC_CHECK_DECLS([environ, fprintf, getc_unlocked, getenv, + sbrk, snprintf, stpcpy, strnlen, strstr, vsnprintf]) + +# Link in zlib if we can. This allows us to read compressed debug +# sections. This is used only by readelf.c (objdump uses bfd for +# reading compressed sections). +AM_ZLIB + +BFD_BINARY_FOPEN + +# target-specific stuff: + +# Canonicalize the secondary target names. +if test -n "$enable_targets"; then + for targ in `echo $enable_targets | sed 's/,/ /g'` + do + result=`$ac_config_sub $targ 2>/dev/null` + if test -n "$result"; then + canon_targets="$canon_targets $result" + else + # Allow targets that config.sub doesn't recognize, like "all". + canon_targets="$canon_targets $targ" + fi + done +fi + +AC_CHECK_HEADER(iconv.h) +AM_ICONV + +all_targets=false +BUILD_NLMCONV= +NLMCONV_DEFS= +BUILD_SRCONV= +BUILD_DLLTOOL= +DLLTOOL_DEFS= +DLLTOOL_DEFAULT= +BUILD_WINDRES= +BUILD_WINDMC= +BUILD_DLLWRAP= +BUILD_MISC= +BUILD_INSTALL_MISC= +OBJDUMP_DEFS= +OBJDUMP_PRIVATE_VECTORS= +OBJDUMP_PRIVATE_OFILES= +od_vectors= + +for targ in $target $canon_targets +do + if test "x$targ" = "xall"; then + all_targets=true + BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)' + BUILD_SRCONV='$(SRCONV_PROG)' + NLMCONV_DEFS="-DNLMCONV_I386 -DNLMCONV_ALPHA -DNLMCONV_POWERPC -DNLMCONV_SPARC" + BUILD_MISC="${BUILD_MISC} "'bin2c$(EXEEXT_FOR_BUILD)' + BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' + BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' + BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' + if test -z "$DLLTOOL_DEFAULT"; then + DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_I386" + fi + DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386" + BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)' + od_vectors="$od_vectors objdump_private_desc_xcoff" + else + case $targ in +changequote(,)dnl + i[3-7]86*-*-netware*) +changequote([,])dnl + BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)' + NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_I386" + ;; + alpha*-*-netware*) + BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)' + NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_ALPHA" + ;; + powerpc*-*-netware*) + BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)' + NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_POWERPC" + ;; + sparc*-*-netware*) + BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)' + NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_SPARC" + ;; + esac + + case $targ in + *-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)' ;; + esac + + case $targ in + arm-epoc-pe*) + BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' + if test -z "$DLLTOOL_DEFAULT"; then + DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_ARM_EPOC" + fi + DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM_EPOC -DDLLTOOL_ARM" + BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' + BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' + ;; + arm-wince-pe* | arm-*-wince | arm*-*-cegcc* | arm*-*-mingw32ce*) + BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' + if test -z "$DLLTOOL_DEFAULT"; then + DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_ARM_WINCE" + fi + DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM_WINCE -DDLLTOOL_ARM" + BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' + BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' + ;; + arm-*-pe*) + BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' + if test -z "$DLLTOOL_DEFAULT"; then + DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_ARM" + fi + DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM" + BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' + BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' + ;; + x86_64-*-mingw* | x86_64-*-cygwin*) + BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' + if test -z "$DLLTOOL_DEFAULT"; then + DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MX86_64" + fi + DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MX86_64" + BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' + BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' + BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)' + ;; +changequote(,)dnl + i[3-7]86-*-pe* | i[3-7]86-*-cygwin* | i[3-7]86-*-mingw32** | i[3-7]86-*-netbsdpe*) +changequote([,])dnl + BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' + if test -z "$DLLTOOL_DEFAULT"; then + DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_I386" + fi + DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386" + BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' + BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' + BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)' + ;; +changequote(,)dnl + i[3-7]86-*-interix) +changequote([,])dnl + BUILD_DLLTOOL='$(DLLTOOL_PROG)' + if test -z "$DLLTOOL_DEFAULT"; then + DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_I386" + fi + DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386" + ;; +changequote(,)dnl + powerpc*-aix5.[01]) +changequote([,])dnl + ;; +changequote(,)dnl + powerpc*-aix[5-9].*) +changequote([,])dnl + OBJDUMP_DEFS="-DAIX_WEAK_SUPPORT" + ;; + powerpc*-*-pe* | powerpc*-*-cygwin*) + BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' + if test -z "$DLLTOOL_DEFAULT"; then + DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_PPC" + fi + DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC" + BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' + BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' + ;; + powerpc*-*-linux* | powerpc*-*-elf* | powerpc*-*-eabi*) + case "$BUILD_INSTALL_MISC" in + *embedspu*) ;; + *) BUILD_INSTALL_MISC="${BUILD_INSTALL_MISC} embedspu" + esac + ;; + sh*-*-pe) + BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' + if test -z "$DLLTOOL_DEFAULT"; then + DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_SH" + fi + DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_SH" + BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' + BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' + ;; + spu-*-*) + BUILD_MISC="${BUILD_MISC} "'bin2c$(EXEEXT_FOR_BUILD)' + ;; + mips*-*-pe) + BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' + if test -z "$DLLTOOL_DEFAULT"; then + DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MIPS" + fi + DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MIPS" + BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' + BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' + ;; + mcore-*-pe) + BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' + if test -z "$DLLTOOL_DEFAULT"; then + DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MCORE" + fi + DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE" + BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' + BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' + ;; + mcore-*-elf) + BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' + if test -z "$DLLTOOL_DEFAULT"; then + DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MCORE_ELF" + fi + DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE_ELF" + ;; + mep-*) + OBJDUMP_DEFS="-DSKIP_ZEROES=256 -DSKIP_ZEROES_AT_END=0" + ;; + esac + + # Add objdump private vectors. + case $targ in + powerpc-*-aix*) + od_vectors="$od_vectors objdump_private_desc_xcoff" + ;; + *-*-darwin*) + od_vectors="$od_vectors objdump_private_desc_mach_o" + ;; + esac + fi +done + +# Uniq objdump private vector, build objdump target ofiles. +od_files= +f="" +for i in $od_vectors ; do + case " $f " in + *" $i "*) ;; + *) + f="$f $i" + OBJDUMP_PRIVATE_VECTORS="$OBJDUMP_PRIVATE_VECTORS &$i," + case $i in + objdump_private_desc_xcoff) + od_files="$od_files od-xcoff" ;; + objdump_private_desc_mach_o) + od_files="$od_files od-macho" ;; + *) AC_MSG_ERROR(*** unknown private vector $i) ;; + esac + ;; + esac +done + +# Uniq objdump target ofiles +f="" +for i in $od_files ; do + case " $f " in + *" $i "*) ;; + *) + f="$f $i" + OBJDUMP_PRIVATE_OFILES="$OBJDUMP_PRIVATE_OFILES $i.$objext" + ;; + esac +done + +DLLTOOL_DEFS="$DLLTOOL_DEFS $DLLTOOL_DEFAULT" + +if test "${with_windres+set}" = set; then + BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' +fi + +if test "${with_windmc+set}" = set; then + BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' +fi + +OBJDUMP_DEFS="${OBJDUMP_DEFS} -DOBJDUMP_PRIVATE_VECTORS=\"${OBJDUMP_PRIVATE_VECTORS}\"" + +AC_SUBST(NLMCONV_DEFS) +AC_SUBST(BUILD_NLMCONV) +AC_SUBST(BUILD_SRCONV) +AC_SUBST(BUILD_DLLTOOL) +AC_SUBST(DLLTOOL_DEFS) +AC_SUBST(BUILD_WINDRES) +AC_SUBST(BUILD_WINDMC) +AC_SUBST(BUILD_DLLWRAP) +AC_SUBST(BUILD_MISC) +AC_SUBST(BUILD_INSTALL_MISC) +AC_SUBST(OBJDUMP_DEFS) +AC_SUBST(OBJDUMP_PRIVATE_OFILES) + +AC_DEFINE_UNQUOTED(TARGET, "${target}", [Configured target name.]) + +targ=$target +. $srcdir/../bfd/config.bfd +if test "x$targ_underscore" = "xyes"; then + UNDERSCORE=1 +else + UNDERSCORE=0 +fi +AC_DEFINE_UNQUOTED(TARGET_PREPENDS_UNDERSCORE, $UNDERSCORE, + [Define to 1 if user symbol names have a leading underscore, 0 if not.]) + +# Emulation +targ=$target +. ${srcdir}/configure.tgt +EMULATION=$targ_emul +EMULATION_VECTOR=$targ_emul_vector + +AC_SUBST(EMULATION) +AC_SUBST(EMULATION_VECTOR) + +# Required for html and install-html +AC_SUBST(datarootdir) +AC_SUBST(docdir) +AC_SUBST(htmldir) +AC_SUBST(pdfdir) + +AC_CONFIG_FILES(Makefile doc/Makefile po/Makefile.in:po/Make-in) +AC_OUTPUT diff --git a/binutils/configure.in b/binutils/configure.in deleted file mode 100644 index ff0d4dcd0bb..00000000000 --- a/binutils/configure.in +++ /dev/null @@ -1,497 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -dnl -dnl Copyright (C) 2012-2014 Free Software Foundation, Inc. -dnl -dnl This file is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 3 of the License, or -dnl (at your option) any later version. -dnl -dnl This program is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with this program; see the file COPYING3. If not see -dnl . -dnl - -AC_PREREQ(2.59) -m4_include([../bfd/version.m4]) -AC_INIT([binutils], BFD_VERSION) -AC_CONFIG_SRCDIR(ar.c) - -AC_CANONICAL_TARGET -AC_ISC_POSIX - -AM_INIT_AUTOMAKE - -AC_PROG_CC -AC_GNU_SOURCE -AC_USE_SYSTEM_EXTENSIONS - -ACX_LARGEFILE -LT_INIT - -AC_ARG_ENABLE(targets, -[ --enable-targets alternative target configurations], -[case "${enableval}" in - yes | "") AC_MSG_ERROR(enable-targets option must specify target names or 'all') - ;; - no) enable_targets= ;; - *) enable_targets=$enableval ;; -esac])dnl - -AC_ARG_ENABLE(deterministic-archives, -[AS_HELP_STRING([--enable-deterministic-archives], - [ar and ranlib default to -D behavior])], [ -if test "${enableval}" = no; then - default_ar_deterministic=0 -else - default_ar_deterministic=1 -fi], [default_ar_deterministic=0]) - -AC_DEFINE_UNQUOTED(DEFAULT_AR_DETERMINISTIC, $default_ar_deterministic, - [Should ar and ranlib use -D behavior by default?]) - -AM_BINUTILS_WARNINGS - -AC_CONFIG_HEADERS(config.h:config.in) - -AH_VERBATIM([00_CONFIG_H_CHECK], -[/* Check that config.h is #included before system headers - (this works only for glibc, but that should be enough). */ -#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__) -# error config.h must be #included before system headers -#endif -#define __CONFIG_H__ 1]) - -if test -z "$target" ; then - AC_MSG_ERROR(Unrecognized target system type; please check config.sub.) -fi -if test -z "$host" ; then - AC_MSG_ERROR(Unrecognized host system type; please check config.sub.) -fi - -AC_PROG_YACC -AM_PROG_LEX - -ALL_LINGUAS="bg da es fi fr id it ja ro ru rw sk sv tr uk vi zh_CN zh_TW hr" -ZW_GNU_GETTEXT_SISTER_DIR -AM_PO_SUBDIRS - -AM_MAINTAINER_MODE -AM_CONDITIONAL(GENINSRC_NEVER, false) -AC_EXEEXT -if test -n "$EXEEXT"; then - AC_DEFINE(HAVE_EXECUTABLE_SUFFIX, 1, - [Does the platform use an executable suffix?]) -fi -AC_DEFINE_UNQUOTED(EXECUTABLE_SUFFIX, "${EXEEXT}", - [Suffix used for executables, if any.]) - -# host-specific stuff: - -HDEFINES= - -. ${srcdir}/../bfd/configure.host - -AC_SUBST(HDEFINES) -AR=${AR-ar} -AC_SUBST(AR) -AC_PROG_RANLIB -AC_PROG_INSTALL - -BFD_CC_FOR_BUILD - -DEMANGLER_NAME=c++filt -case "${host}" in - *-*-go32* | *-*-msdos*) - DEMANGLER_NAME=cxxfilt -esac -AC_SUBST(DEMANGLER_NAME) - -AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h limits.h locale.h sys/param.h wchar.h) -AC_HEADER_SYS_WAIT -ACX_HEADER_STRING -AC_FUNC_ALLOCA -AC_CHECK_FUNCS(sbrk utimes setmode getc_unlocked strcoll setlocale) -AC_CHECK_FUNC([mkstemp], - AC_DEFINE([HAVE_MKSTEMP], 1, - [Define to 1 if you have the `mkstemp' function.])) -AC_CHECK_FUNC([mkdtemp], - AC_DEFINE([HAVE_MKDTEMP], 1, - [Define to 1 if you have the `mkdtemp' function.])) - AC_MSG_CHECKING([for mbstate_t]) - AC_TRY_COMPILE([#include ], - [mbstate_t teststate;], - have_mbstate_t=yes, have_mbstate_t=no) - AC_MSG_RESULT($have_mbstate_t) - if test x"$have_mbstate_t" = xyes; then - AC_DEFINE(HAVE_MBSTATE_T,1,[Define if mbstate_t exists in wchar.h.]) - fi - -# Some systems have frexp only in -lm, not in -lc. -AC_SEARCH_LIBS(frexp, m) - -AM_LC_MESSAGES - -AC_MSG_CHECKING(for time_t in time.h) -AC_CACHE_VAL(bu_cv_decl_time_t_time_h, -[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [time_t i;])], -bu_cv_decl_time_t_time_h=yes, bu_cv_decl_time_t_time_h=no)]) -AC_MSG_RESULT($bu_cv_decl_time_t_time_h) -if test $bu_cv_decl_time_t_time_h = yes; then - AC_DEFINE([HAVE_TIME_T_IN_TIME_H], 1, - [Is the type time_t defined in ?]) -fi - -AC_MSG_CHECKING(for time_t in sys/types.h) -AC_CACHE_VAL(bu_cv_decl_time_t_types_h, -[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [time_t i;])], -bu_cv_decl_time_t_types_h=yes, bu_cv_decl_time_t_types_h=no)]) -AC_MSG_RESULT($bu_cv_decl_time_t_types_h) -if test $bu_cv_decl_time_t_types_h = yes; then - AC_DEFINE([HAVE_TIME_T_IN_TYPES_H], 1, - [Is the type time_t defined in ?]) -fi - -AC_MSG_CHECKING(for a known getopt prototype in unistd.h) -AC_CACHE_VAL(bu_cv_decl_getopt_unistd_h, -[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [extern int getopt (int, char *const*, const char *);])], -bu_cv_decl_getopt_unistd_h=yes, bu_cv_decl_getopt_unistd_h=no)]) -AC_MSG_RESULT($bu_cv_decl_getopt_unistd_h) -if test $bu_cv_decl_getopt_unistd_h = yes; then - AC_DEFINE([HAVE_DECL_GETOPT], 1, - [Is the prototype for getopt in in the expected format?]) -fi - -# Under Next 3.2 apparently does not define struct utimbuf -# by default. -AC_MSG_CHECKING([for utime.h]) -AC_CACHE_VAL(bu_cv_header_utime_h, -[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include -#ifdef HAVE_TIME_H -#include -#endif -#include ], -[struct utimbuf s;])], -bu_cv_header_utime_h=yes, bu_cv_header_utime_h=no)]) -AC_MSG_RESULT($bu_cv_header_utime_h) -if test $bu_cv_header_utime_h = yes; then - AC_DEFINE(HAVE_GOOD_UTIME_H, 1, [Does define struct utimbuf?]) -fi - -AC_CHECK_DECLS([environ, fprintf, getc_unlocked, getenv, - sbrk, snprintf, stpcpy, strnlen, strstr, vsnprintf]) - -# Link in zlib if we can. This allows us to read compressed debug -# sections. This is used only by readelf.c (objdump uses bfd for -# reading compressed sections). -AM_ZLIB - -BFD_BINARY_FOPEN - -# target-specific stuff: - -# Canonicalize the secondary target names. -if test -n "$enable_targets"; then - for targ in `echo $enable_targets | sed 's/,/ /g'` - do - result=`$ac_config_sub $targ 2>/dev/null` - if test -n "$result"; then - canon_targets="$canon_targets $result" - else - # Allow targets that config.sub doesn't recognize, like "all". - canon_targets="$canon_targets $targ" - fi - done -fi - -AC_CHECK_HEADER(iconv.h) -AM_ICONV - -all_targets=false -BUILD_NLMCONV= -NLMCONV_DEFS= -BUILD_SRCONV= -BUILD_DLLTOOL= -DLLTOOL_DEFS= -DLLTOOL_DEFAULT= -BUILD_WINDRES= -BUILD_WINDMC= -BUILD_DLLWRAP= -BUILD_MISC= -BUILD_INSTALL_MISC= -OBJDUMP_DEFS= -OBJDUMP_PRIVATE_VECTORS= -OBJDUMP_PRIVATE_OFILES= -od_vectors= - -for targ in $target $canon_targets -do - if test "x$targ" = "xall"; then - all_targets=true - BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)' - BUILD_SRCONV='$(SRCONV_PROG)' - NLMCONV_DEFS="-DNLMCONV_I386 -DNLMCONV_ALPHA -DNLMCONV_POWERPC -DNLMCONV_SPARC" - BUILD_MISC="${BUILD_MISC} "'bin2c$(EXEEXT_FOR_BUILD)' - BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' - BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' - BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' - if test -z "$DLLTOOL_DEFAULT"; then - DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_I386" - fi - DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386" - BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)' - od_vectors="$od_vectors objdump_private_desc_xcoff" - else - case $targ in -changequote(,)dnl - i[3-7]86*-*-netware*) -changequote([,])dnl - BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)' - NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_I386" - ;; - alpha*-*-netware*) - BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)' - NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_ALPHA" - ;; - powerpc*-*-netware*) - BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)' - NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_POWERPC" - ;; - sparc*-*-netware*) - BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)' - NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_SPARC" - ;; - esac - - case $targ in - *-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)' ;; - esac - - case $targ in - arm-epoc-pe*) - BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' - if test -z "$DLLTOOL_DEFAULT"; then - DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_ARM_EPOC" - fi - DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM_EPOC -DDLLTOOL_ARM" - BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' - BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' - ;; - arm-wince-pe* | arm-*-wince | arm*-*-cegcc* | arm*-*-mingw32ce*) - BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' - if test -z "$DLLTOOL_DEFAULT"; then - DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_ARM_WINCE" - fi - DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM_WINCE -DDLLTOOL_ARM" - BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' - BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' - ;; - arm-*-pe*) - BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' - if test -z "$DLLTOOL_DEFAULT"; then - DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_ARM" - fi - DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM" - BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' - BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' - ;; - x86_64-*-mingw* | x86_64-*-cygwin*) - BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' - if test -z "$DLLTOOL_DEFAULT"; then - DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MX86_64" - fi - DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MX86_64" - BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' - BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' - BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)' - ;; -changequote(,)dnl - i[3-7]86-*-pe* | i[3-7]86-*-cygwin* | i[3-7]86-*-mingw32** | i[3-7]86-*-netbsdpe*) -changequote([,])dnl - BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' - if test -z "$DLLTOOL_DEFAULT"; then - DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_I386" - fi - DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386" - BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' - BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' - BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)' - ;; -changequote(,)dnl - i[3-7]86-*-interix) -changequote([,])dnl - BUILD_DLLTOOL='$(DLLTOOL_PROG)' - if test -z "$DLLTOOL_DEFAULT"; then - DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_I386" - fi - DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386" - ;; -changequote(,)dnl - powerpc*-aix5.[01]) -changequote([,])dnl - ;; -changequote(,)dnl - powerpc*-aix[5-9].*) -changequote([,])dnl - OBJDUMP_DEFS="-DAIX_WEAK_SUPPORT" - ;; - powerpc*-*-pe* | powerpc*-*-cygwin*) - BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' - if test -z "$DLLTOOL_DEFAULT"; then - DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_PPC" - fi - DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC" - BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' - BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' - ;; - powerpc*-*-linux* | powerpc*-*-elf* | powerpc*-*-eabi*) - case "$BUILD_INSTALL_MISC" in - *embedspu*) ;; - *) BUILD_INSTALL_MISC="${BUILD_INSTALL_MISC} embedspu" - esac - ;; - sh*-*-pe) - BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' - if test -z "$DLLTOOL_DEFAULT"; then - DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_SH" - fi - DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_SH" - BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' - BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' - ;; - spu-*-*) - BUILD_MISC="${BUILD_MISC} "'bin2c$(EXEEXT_FOR_BUILD)' - ;; - mips*-*-pe) - BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' - if test -z "$DLLTOOL_DEFAULT"; then - DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MIPS" - fi - DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MIPS" - BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' - BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' - ;; - mcore-*-pe) - BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' - if test -z "$DLLTOOL_DEFAULT"; then - DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MCORE" - fi - DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE" - BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' - BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' - ;; - mcore-*-elf) - BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' - if test -z "$DLLTOOL_DEFAULT"; then - DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MCORE_ELF" - fi - DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE_ELF" - ;; - mep-*) - OBJDUMP_DEFS="-DSKIP_ZEROES=256 -DSKIP_ZEROES_AT_END=0" - ;; - esac - - # Add objdump private vectors. - case $targ in - powerpc-*-aix*) - od_vectors="$od_vectors objdump_private_desc_xcoff" - ;; - *-*-darwin*) - od_vectors="$od_vectors objdump_private_desc_mach_o" - ;; - esac - fi -done - -# Uniq objdump private vector, build objdump target ofiles. -od_files= -f="" -for i in $od_vectors ; do - case " $f " in - *" $i "*) ;; - *) - f="$f $i" - OBJDUMP_PRIVATE_VECTORS="$OBJDUMP_PRIVATE_VECTORS &$i," - case $i in - objdump_private_desc_xcoff) - od_files="$od_files od-xcoff" ;; - objdump_private_desc_mach_o) - od_files="$od_files od-macho" ;; - *) AC_MSG_ERROR(*** unknown private vector $i) ;; - esac - ;; - esac -done - -# Uniq objdump target ofiles -f="" -for i in $od_files ; do - case " $f " in - *" $i "*) ;; - *) - f="$f $i" - OBJDUMP_PRIVATE_OFILES="$OBJDUMP_PRIVATE_OFILES $i.$objext" - ;; - esac -done - -DLLTOOL_DEFS="$DLLTOOL_DEFS $DLLTOOL_DEFAULT" - -if test "${with_windres+set}" = set; then - BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' -fi - -if test "${with_windmc+set}" = set; then - BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)' -fi - -OBJDUMP_DEFS="${OBJDUMP_DEFS} -DOBJDUMP_PRIVATE_VECTORS=\"${OBJDUMP_PRIVATE_VECTORS}\"" - -AC_SUBST(NLMCONV_DEFS) -AC_SUBST(BUILD_NLMCONV) -AC_SUBST(BUILD_SRCONV) -AC_SUBST(BUILD_DLLTOOL) -AC_SUBST(DLLTOOL_DEFS) -AC_SUBST(BUILD_WINDRES) -AC_SUBST(BUILD_WINDMC) -AC_SUBST(BUILD_DLLWRAP) -AC_SUBST(BUILD_MISC) -AC_SUBST(BUILD_INSTALL_MISC) -AC_SUBST(OBJDUMP_DEFS) -AC_SUBST(OBJDUMP_PRIVATE_OFILES) - -AC_DEFINE_UNQUOTED(TARGET, "${target}", [Configured target name.]) - -targ=$target -. $srcdir/../bfd/config.bfd -if test "x$targ_underscore" = "xyes"; then - UNDERSCORE=1 -else - UNDERSCORE=0 -fi -AC_DEFINE_UNQUOTED(TARGET_PREPENDS_UNDERSCORE, $UNDERSCORE, - [Define to 1 if user symbol names have a leading underscore, 0 if not.]) - -# Emulation -targ=$target -. ${srcdir}/configure.tgt -EMULATION=$targ_emul -EMULATION_VECTOR=$targ_emul_vector - -AC_SUBST(EMULATION) -AC_SUBST(EMULATION_VECTOR) - -# Required for html and install-html -AC_SUBST(datarootdir) -AC_SUBST(docdir) -AC_SUBST(htmldir) -AC_SUBST(pdfdir) - -AC_CONFIG_FILES(Makefile doc/Makefile po/Makefile.in:po/Make-in) -AC_OUTPUT diff --git a/binutils/doc/Makefile.in b/binutils/doc/Makefile.in index 542a55972ca..2b172e118b7 100644 --- a/binutils/doc/Makefile.in +++ b/binutils/doc/Makefile.in @@ -75,7 +75,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \ $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \ $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \ $(top_srcdir)/../lt~obsolete.m4 \ - $(top_srcdir)/../bfd/version.m4 $(top_srcdir)/configure.in + $(top_srcdir)/../bfd/version.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs diff --git a/gas/ChangeLog b/gas/ChangeLog index 7c045d4c01d..96307e86c44 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +2014-07-04 Alan Modra + + * configure.ac: Rename from configure.in. + * Makefile.in: Regenerate. + * config.in: Regenerate. + * doc/Makefile.in: Regenerate. + 2014-07-04 Alan Modra * doc/Makefile.am (CONFIG_STATUS_DEPENDENCIES): Delete. diff --git a/gas/Makefile.in b/gas/Makefile.in index 93d01ce5b08..be2711b65a9 100644 --- a/gas/Makefile.in +++ b/gas/Makefile.in @@ -81,7 +81,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \ $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \ $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \ $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/../bfd/version.m4 $(top_srcdir)/configure.in + $(top_srcdir)/../bfd/version.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ diff --git a/gas/config.in b/gas/config.in index f3ed2b4849f..9acb545d5f4 100644 --- a/gas/config.in +++ b/gas/config.in @@ -1,4 +1,4 @@ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ diff --git a/gas/configure.ac b/gas/configure.ac new file mode 100644 index 00000000000..cc4fc54d46c --- /dev/null +++ b/gas/configure.ac @@ -0,0 +1,852 @@ +dnl Process this file with autoconf to produce a configure script. +dnl +dnl And be careful when changing it! If you must add tests with square +dnl brackets, be sure changequote invocations surround it. +dnl +dnl Copyright (C) 2012-2014 Free Software Foundation, Inc. +dnl +dnl This file is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; see the file COPYING3. If not see +dnl . +dnl +dnl v2.5 needed for --bindir et al +AC_PREREQ(2.59) +m4_include([../bfd/version.m4]) +AC_INIT([gas], BFD_VERSION) +AC_CONFIG_SRCDIR(as.h) + +dnl Autoconf 2.57 will find the aux dir without this. However, unless +dnl we specify this explicitly, automake-1.7 will assume that ylwrap is in +dnl gas/ instead of gas/../. +AC_CONFIG_AUX_DIR(..) +AC_CANONICAL_TARGET +AC_ISC_POSIX + +AM_INIT_AUTOMAKE + +AC_PROG_CC +AC_GNU_SOURCE +AC_USE_SYSTEM_EXTENSIONS +ACX_LARGEFILE + +LT_INIT + +AC_ARG_ENABLE(targets, +[ --enable-targets alternative target configurations besides the primary], +[case "${enableval}" in + yes | "") AC_MSG_ERROR(enable-targets option must specify target names or 'all') + ;; + no) enable_targets= ;; + *) enable_targets=$enableval ;; +esac])dnl + +ac_checking=yes +if grep '^RELEASE=y' ${srcdir}/../bfd/Makefile.am >/dev/null 2>/dev/null ; then + ac_checking= +fi +AC_ARG_ENABLE(checking, +[ --enable-checking enable run-time checks], +[case "${enableval}" in + no|none) ac_checking= ;; + *) ac_checking=yes ;; +esac])dnl +if test x$ac_checking != x ; then + AC_DEFINE(ENABLE_CHECKING, 1, [Define if you want run-time sanity checks.]) +fi + +using_cgen=no + +AM_BINUTILS_WARNINGS + +# Generate a header file +AC_CONFIG_HEADERS(config.h:config.in) + +# PR 14072 +AH_VERBATIM([00_CONFIG_H_CHECK], +[/* Check that config.h is #included before system headers + (this works only for glibc, but that should be enough). */ +#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__) +# error config.h must be #included before system headers +#endif +#define __CONFIG_H__ 1]) + +# If we are on a DOS filesystem, we must use gdb.ini rather than +# .gdbinit. +case "${host}" in + *-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-windows*) + GDBINIT="gdb.ini" + AC_CONFIG_FILES(gdb.ini:gdbinit.in) + ;; + *) + GDBINIT=".gdbinit" + AC_CONFIG_FILES(.gdbinit:gdbinit.in) + ;; +esac +AC_SUBST(GDBINIT) + +#We need this for the host. BOUT header is in host order. +AC_C_BIGENDIAN + +te_file=generic + +# Makefile target for installing gas in $(tooldir)/bin. +install_tooldir=install-exec-tooldir + +canon_targets="" +all_targets=no +if test -n "$enable_targets" ; then + for t in `echo $enable_targets | sed 's/,/ /g'`; do + if test $t = "all"; then + all_targets=yes + continue + fi + result=`$ac_config_sub $t 2>/dev/null` + if test -n "$result" ; then + canon_targets="$canon_targets $result" +# else +# # Permit "all", etc. We don't support it yet though. +# canon_targets="$canon_targets $t" + fi + done + GAS_UNIQ(canon_targets) +fi + +emulations="" + +for this_target in $target $canon_targets ; do + + targ=${this_target} + . ${srcdir}/configure.tgt + + case ${target_cpu} in + crisv32) + AC_DEFINE_UNQUOTED(DEFAULT_CRIS_ARCH, $arch, + [Default CRIS architecture.]) + ;; + esac + + if test ${this_target} = $target ; then + target_cpu_type=${cpu_type} + elif test ${target_cpu_type} != ${cpu_type} ; then + continue + fi + + generic_target=${cpu_type}-${target_vendor}-${target_os} + case ${generic_target} in + i386-*-sco3.2v5*) + if test ${this_target} = $target; then + AC_DEFINE(SCO_ELF, 1, [Define if defaulting to ELF on SCO 5.]) + fi + ;; + + i386-*-msdosdjgpp* \ + | i386-*-go32* \ + | i386-go32-rtems*) + AC_DEFINE(STRICTCOFF, 1, [Using strict COFF?]) + ;; + + i860-*-*) + AC_MSG_WARN(GAS support for ${generic_target} is preliminary and a work in progress) + ;; + + microblaze*) + ;; + +changequote(,)dnl + ppc-*-aix[5-9].*) +changequote([,])dnl + AC_DEFINE(AIX_WEAK_SUPPORT, 1, + [Define if using AIX 5.2 value for C_WEAKEXT.]) + ;; + ppc-*-solaris*) + if test ${this_target} = $target; then + AC_DEFINE(TARGET_SOLARIS_COMMENT, 1, + [Define if default target is PowerPC Solaris.]) + fi + if test x${endian} = xbig; then + AC_MSG_ERROR(Solaris must be configured little endian) + fi + ;; + + sh*-*-symbianelf*) + AC_DEFINE(TARGET_SYMBIAN, 1, [Define if target is Symbian OS.]) + ;; + esac + + if test ${this_target} = $target ; then + endian_def= + if test x${endian} = xbig; then + endian_def=1 + elif test x${endian} = xlittle; then + endian_def=0 + fi + if test x${endian_def} != x; then + AC_DEFINE_UNQUOTED(TARGET_BYTES_BIG_ENDIAN, $endian_def, + [Define as 1 if big endian.]) + fi + fi + +# Other random stuff. + + case ${cpu_type} in + mips) + # Set mips_cpu to the name of the default CPU. + case ${target_cpu} in + mips | mipsbe | mipseb | mipsle | mipsel | mips64 | mips64el) + mips_cpu=from-abi + ;; + mipsisa32 | mipsisa32el) + mips_cpu=mips32 + ;; + mipsisa32r2 | mipsisa32r2el) + mips_cpu=mips32r2 + ;; + mipsisa32r3 | mipsisa32r3el) + mips_cpu=mips32r3 + ;; + mipsisa32r5 | mipsisa32r5el) + mips_cpu=mips32r5 + ;; + mipsisa64 | mipsisa64el) + mips_cpu=mips64 + ;; + mipsisa64r2 | mipsisa64r2el) + mips_cpu=mips64r2 + ;; + mipsisa64r3 | mipsisa64r3el) + mips_cpu=mips64r3 + ;; + mipsisa64r5 | mipsisa64r5el) + mips_cpu=mips64r5 + ;; + mipstx39 | mipstx39el) + mips_cpu=r3900 + ;; + mips64vr | mips64vrel) + mips_cpu=vr4100 + ;; + mipsisa32r2* | mipsisa64r2*) +changequote(,)dnl + mips_cpu=`echo $target_cpu | sed -e 's/[a-z]*..r2//' -e 's/el$//'` +changequote([,])dnl + ;; + mips64* | mipsisa64* | mipsisa32*) +changequote(,)dnl + mips_cpu=`echo $target_cpu | sed -e 's/[a-z]*..//' -e 's/el$//'` +changequote([,])dnl + ;; + mips*) +changequote(,)dnl + mips_cpu=`echo $target_cpu | sed -e 's/^mips//' -e 's/el$//'` +changequote([,])dnl + ;; + *) + AC_MSG_ERROR($target_cpu isn't a supported MIPS CPU name) + ;; + esac + # See whether it's appropriate to set E_MIPS_ABI_O32 for o32 + # binaries. It's a GNU extension that some OSes don't understand. + case ${target} in + *-*-irix*) + use_e_mips_abi_o32=0 + ;; + *) + use_e_mips_abi_o32=1 + ;; + esac + # Decide whether to generate 32-bit or 64-bit code by default. + # Used to resolve -march=from-abi when an embedded ABI is selected. + case ${target} in + mips64*-*-* | mipsisa64*-*-*) + mips_default_64bit=1 + ;; + *) + mips_default_64bit=0 + ;; + esac + # Decide which ABI to target by default. + case ${target} in + mips64*-linux* | mips-sgi-irix6* | mips64*-freebsd* | mips64*-kfreebsd*-gnu) + mips_default_abi=N32_ABI + ;; + mips*-linux* | mips*-freebsd* | mips*-kfreebsd*-gnu) + mips_default_abi=O32_ABI + ;; + mips64*-openbsd*) + mips_default_abi=N64_ABI + ;; + *) + mips_default_abi=NO_ABI + ;; + esac + AC_DEFINE_UNQUOTED(MIPS_CPU_STRING_DEFAULT, "$mips_cpu", + [Default CPU for MIPS targets. ]) + AC_DEFINE_UNQUOTED(USE_E_MIPS_ABI_O32, $use_e_mips_abi_o32, + [Allow use of E_MIPS_ABI_O32 on MIPS targets. ]) + AC_DEFINE_UNQUOTED(MIPS_DEFAULT_64BIT, $mips_default_64bit, + [Generate 64-bit code by default on MIPS targets. ]) + AC_DEFINE_UNQUOTED(MIPS_DEFAULT_ABI, $mips_default_abi, + [Choose a default ABI for MIPS targets. ]) + ;; + esac + + # Do we need the opcodes library? + case ${cpu_type} in + vax | tic30) + ;; + + *) + need_opcodes=yes + + case "${enable_shared}" in + yes) shared_opcodes=true ;; + *opcodes*) shared_opcodes=true ;; + *) shared_opcodes=false ;; + esac + ;; + esac + + # Any other special object files needed ? + case ${cpu_type} in + + bfin) + echo ${extra_objects} | grep -s "bfin-parse.o" + if test $? -ne 0 ; then + extra_objects="$extra_objects bfin-parse.o" + fi + + echo ${extra_objects} | grep -s "bfin-lex-wrapper.o" + if test $? -ne 0 ; then + extra_objects="$extra_objects bfin-lex-wrapper.o" + fi + ;; + + epiphany | fr30 | ip2k | iq2000 | lm32 | m32r | or1k) + using_cgen=yes + ;; + + m32c) + using_cgen=yes + ;; + frv) + using_cgen=yes + ;; + m68k) + case ${extra_objects} in + *m68k-parse.o*) ;; + *) extra_objects="$extra_objects m68k-parse.o" ;; + esac + ;; + + mep) + using_cgen=yes + ;; + + mips) + echo ${extra_objects} | grep -s "itbl-parse.o" + if test $? -ne 0 ; then + extra_objects="$extra_objects itbl-parse.o" + fi + + echo ${extra_objects} | grep -s "itbl-lex-wrapper.o" + if test $? -ne 0 ; then + extra_objects="$extra_objects itbl-lex-wrapper.o" + fi + + echo ${extra_objects} | grep -s "itbl-ops.o" + if test $? -ne 0 ; then + extra_objects="$extra_objects itbl-ops.o" + fi + ;; + + mt) + using_cgen=yes + ;; + + nds32) + # Decide BASELINE, REDUCED_REGS, FPU_DP_EXT, FPU_SP_EXT features + # based on arch_name. + AC_MSG_CHECKING(for default configuration of --with-arch) + if test "x${with_arch}" != x; then + case ${with_arch} in + v2j | v2s | v2f | v2 | v3m | v3j | v3s | v3f | v3 ) + AC_DEFINE_UNQUOTED(NDS32_DEFAULT_ARCH_NAME, "$with_arch", + [Define value for nds32_arch_name]) + ;; + *) + AC_MSG_ERROR(This kind of arch name does *NOT* exist!) + ;; + esac + fi + AC_MSG_RESULT($with_arch) + + # Decide features one by one. + AC_MSG_CHECKING(for default configuration of --enable-dx-regs) + if test "x${enable_dx_regs}" == xyes; then + AC_DEFINE(NDS32_DEFAULT_DX_REGS, 1, + [Define value for nds32_dx_regs]) + else + AC_DEFINE(NDS32_DEFAULT_DX_REGS, 0, + [Define default value for nds32_dx_regs]) + fi + AC_MSG_RESULT($enable_dx_regs) + + AC_MSG_CHECKING(for default configuration of --enable-perf-ext) + if test "x${enable_perf_ext}" == xno; then + AC_DEFINE(NDS32_DEFAULT_PERF_EXT, 0, + [Define value for nds32_perf_ext]) + else + AC_DEFINE(NDS32_DEFAULT_PERF_EXT, 1, + [Define default value for nds32_perf_ext]) + fi + AC_MSG_RESULT($enable_perf_ext) + + AC_MSG_CHECKING(for default configuration of --enable-perf-ext2) + if test "x${enable_perf_ext2}" == xno; then + AC_DEFINE(NDS32_DEFAULT_PERF_EXT2, 0, + [Define value for nds32_perf_ext2]) + else + AC_DEFINE(NDS32_DEFAULT_PERF_EXT2, 1, + [Define default value for nds32_perf_ext2]) + fi + AC_MSG_RESULT($enable_perf_ext2) + + AC_MSG_CHECKING(for default configuration of --enable-string-ext) + if test "x${enable_string_ext}" == xno; then + AC_DEFINE(NDS32_DEFAULT_STRING_EXT, 0, + [Define value for nds32_string_ext]) + else + AC_DEFINE(NDS32_DEFAULT_STRING_EXT, 1, + [Define default value for nds32_string_ext]) + fi + AC_MSG_RESULT($enable_string_ext) + + AC_MSG_CHECKING(for default configuration of --enable-audio-ext) + if test "x${enable_audio_ext}" == xno; then + AC_DEFINE(NDS32_DEFAULT_AUDIO_EXT, 0, + [Define value for nds32_audio_ext]) + else + AC_DEFINE(NDS32_DEFAULT_AUDIO_EXT, 1, + [Define default value for nds32_audio_ext]) + fi + AC_MSG_RESULT($enable_audio_ext) + ;; + + i386 | s390 | sparc) + if test $this_target = $target ; then + AC_DEFINE_UNQUOTED(DEFAULT_ARCH, "${arch}", [Default architecture.]) + fi + ;; + + rl78) + echo ${extra_objects} | grep -s "rl78-parse.o" + if test $? -ne 0 ; then + extra_objects="$extra_objects rl78-parse.o" + fi + ;; + + rx) + echo ${extra_objects} | grep -s "rx-parse.o" + if test $? -ne 0 ; then + extra_objects="$extra_objects rx-parse.o" + fi + ;; + + xstormy16) + using_cgen=yes + ;; + + xc16x) + using_cgen=yes + ;; + + xtensa) + echo ${extra_objects} | grep -s "xtensa-relax.o" + if test $? -ne 0 ; then + extra_objects="$extra_objects xtensa-relax.o" + fi + ;; + + *) + ;; + esac + + if test $using_cgen = yes ; then + case "x${extra_objects}" in + *cgen.o*) ;; + *) extra_objects="$extra_objects cgen.o" ;; + esac + fi + +# See if we really can support this configuration with the emulation code. + + if test $this_target = $target ; then + obj_format=$fmt + te_file=$em + fi + + case ${te_file} in + vms) extra_objects="$extra_objects te-vms.o" ;; + esac + +# From target name and format, produce a list of supported emulations. + + case ${generic_target}-${fmt} in + mips-*-*-*) case "$endian" in + big) emulation="mipsbelf mipslelf mipself" ;; + *) emulation="mipslelf mipsbelf mipself" ;; + esac ;; + # i386-pc-pe-coff != i386-pc-coff. + i386-*-pe-coff) ;; + # Uncommenting the next line will turn on support for i386 AOUT + # for the default linux configuration + # i386-*-linux*-elf) emulation="i386elf i386aout" ;; + # + i386-*-aout) emulation="i386aout" ;; + i386-*-coff) emulation="i386coff" ;; + i386-*-elf) emulation="i386elf" ;; + + # Always all formats. The first stated emulation becomes the default. + cris-*-*aout*) emulation="crisaout criself" ;; + cris-*-*) emulation="criself crisaout" ;; + esac + + emulations="$emulations $emulation" + +done + +# Turn on all targets if possible +if test ${all_targets} = "yes"; then + case ${target_cpu_type} in + i386) + case ${obj_format} in + aout) + emulations="$emulations i386coff i386elf" + ;; + coff) + emulations="$emulations i386aout i386elf" + ;; + elf) + emulations="$emulations i386aout i386coff" + ;; + esac + ;; + x86_64) + case ${obj_format} in + aout) + emulations="$emulations i386coff i386elf" + ;; + coff) + emulations="$emulations i386aout i386elf" + ;; + elf) + emulations="$emulations i386aout i386coff" + ;; + esac + ;; + esac +fi + +# PE code has way too many macros tweaking behaviour +case ${te_file} in + pe*) emulations="" ;; +esac + +# Assign floating point type. Most processors with FP support +# IEEE FP. On those that don't support FP at all, usually IEEE +# is emulated. +case ${target_cpu} in + vax | pdp11 ) atof=vax ;; + *) atof=ieee ;; +esac + +case "${obj_format}" in + "") AC_MSG_ERROR(GAS does not know what format to use for target ${target}) ;; +esac + +# Unfortunately the cpu in cpu-opc.h file isn't always $(TARGET_CPU). +cgen_cpu_prefix="" +if test $using_cgen = yes ; then + case ${target_cpu} in + or1knd) + cgen_cpu_prefix=or1k ;; + *) cgen_cpu_prefix=${target_cpu} ;; + esac + AC_SUBST(cgen_cpu_prefix) + AC_DEFINE(USING_CGEN, 1, [Using cgen code?]) +fi + +dnl +dnl Make sure the desired support files exist. +dnl + +if test ! -r ${srcdir}/config/tc-${target_cpu_type}.c; then + AC_MSG_ERROR(GAS does not support target CPU ${target_cpu_type}) +fi + +if test ! -r ${srcdir}/config/obj-${obj_format}.c; then + AC_MSG_ERROR(GAS does not have support for object file format ${obj_format}) +fi + +# Some COFF configurations want these random other flags set. +case ${obj_format} in + coff) + case ${target_cpu_type} in + i386) AC_DEFINE(I386COFF, 1, [Using i386 COFF?]) ;; + m68k) AC_DEFINE(M68KCOFF, 1, [Using m68k COFF?]) ;; + m88k) AC_DEFINE(M88KCOFF, 1, [Using m88k COFF?]) ;; + x86_64) AC_DEFINE(I386COFF, 1, [Using i386 COFF?]) ;; + esac + ;; +esac + +# Getting this done right is going to be a bitch. Each configuration specified +# with --enable-targets=... should be checked for environment, format, cpu +# setting. +# +# For each configuration, the necessary object file support code must be linked +# in. This might be only one, it might be up to four. The necessary emulation +# code needs to be provided, too. +# +# And then there's "--enable-targets=all".... +# +# For now, just always do it for MIPS ELF configurations. Sigh. + +formats="${obj_format}" +emfiles="" +EMULATIONS="" +GAS_UNIQ(emulations) +for em in . $emulations ; do + case $em in + .) continue ;; + mipsbelf | mipslelf | mipself) + fmt=elf file=mipself ;; + *coff) + fmt=coff file=$em ;; + *aout) + fmt=aout file=$em ;; + *elf) + fmt=elf file=$em ;; + esac + formats="$formats $fmt" + emfiles="$emfiles e-$file.o" + EMULATIONS="$EMULATIONS &$em," +done +GAS_UNIQ(formats) +GAS_UNIQ(emfiles) +if test `set . $formats ; shift ; echo $#` -gt 1 ; then + for fmt in $formats ; do + case $fmt in + aout) AC_DEFINE(OBJ_MAYBE_AOUT, 1, [a.out support?]) ;; + bout) AC_DEFINE(OBJ_MAYBE_BOUT, 1, [b.out support?]) ;; + coff) AC_DEFINE(OBJ_MAYBE_COFF, 1, [COFF support?]) ;; + ecoff) AC_DEFINE(OBJ_MAYBE_ECOFF, 1, [ECOFF support?]) ;; + elf) AC_DEFINE(OBJ_MAYBE_ELF, 1, [ELF support?]) ;; + generic) AC_DEFINE(OBJ_MAYBE_GENERIC, 1, [generic support?]) ;; + som) AC_DEFINE(OBJ_MAYBE_SOM, 1, [SOM support?]) ;; + esac + extra_objects="$extra_objects obj-$fmt.o" + done + obj_format=multi +fi +if test `set . $emfiles ; shift ; echo $#` -gt 0 ; then + DEFAULT_EMULATION=`set . $emulations ; echo $2` + # e-mipself has more than one emulation per file, e-i386* has just one at the + # moment. If only one emulation is specified, then don't define + # USE_EMULATIONS or include any of the e-files as they will only be bloat. + case "${obj_format}${emfiles}" in + multi* | *mipself*) + extra_objects="$extra_objects $emfiles" + AC_DEFINE(USE_EMULATIONS, 1, [Use emulation support?]) ;; + esac +fi +AC_SUBST(extra_objects) +AC_DEFINE_UNQUOTED(EMULATIONS, $EMULATIONS, [Supported emulations.]) +AC_DEFINE_UNQUOTED(DEFAULT_EMULATION, "$DEFAULT_EMULATION", + [Default emulation.]) + +reject_dev_configs=yes + +case ${reject_dev_configs}-${dev} in + yes-yes) # Oops. + AC_MSG_ERROR(GAS does not support the ${generic_target} configuration.) + ;; +esac + +AC_SUBST(target_cpu_type) +AC_SUBST(obj_format) +AC_SUBST(te_file) +AC_SUBST(install_tooldir) +AC_SUBST(atof) +dnl AC_SUBST(emulation) + +# do we need the opcodes library? +case "${need_opcodes}" in +yes) + OPCODES_LIB=../opcodes/libopcodes.la + ;; +esac + +AC_SUBST(OPCODES_LIB) + +AC_DEFINE_UNQUOTED(TARGET_ALIAS, "${target_alias}", [Target alias.]) +AC_DEFINE_UNQUOTED(TARGET_CANONICAL, "${target}", [Canonical target.]) +AC_DEFINE_UNQUOTED(TARGET_CPU, "${target_cpu}", [Target CPU.]) +AC_DEFINE_UNQUOTED(TARGET_VENDOR, "${target_vendor}", [Target vendor.]) +AC_DEFINE_UNQUOTED(TARGET_OS, "${target_os}", [Target OS.]) + +AC_PROG_YACC +AM_PROG_LEX + +ALL_LINGUAS="fr tr es rw id ru fi ja" +ZW_GNU_GETTEXT_SISTER_DIR +AM_PO_SUBDIRS + +AM_MAINTAINER_MODE +AM_CONDITIONAL(GENINSRC_NEVER, false) +AC_EXEEXT + +AC_CHECK_HEADERS(string.h stdlib.h memory.h strings.h unistd.h errno.h sys/types.h limits.h locale.h time.h sys/stat.h) +ACX_HEADER_STRING + +# Put this here so that autoconf's "cross-compiling" message doesn't confuse +# people who are not cross-compiling but are compiling cross-assemblers. +AC_MSG_CHECKING(whether compiling a cross-assembler) +if test "${host}" = "${target}"; then + cross_gas=no +else + cross_gas=yes + AC_DEFINE(CROSS_COMPILE, 1, [Compiling cross-assembler?]) +fi +AC_MSG_RESULT($cross_gas) + +dnl ansidecl.h will deal with const +dnl AC_C_CONST +AC_FUNC_ALLOCA +AC_C_INLINE + +# VMS doesn't have unlink. +AC_CHECK_FUNCS(unlink remove, break) +AC_CHECK_FUNCS(sbrk setlocale) + +AM_LC_MESSAGES + +# do we need the math library? +case "${need_libm}" in +yes) + LT_LIB_M + AC_SUBST(LIBM) + ;; +esac + +# Some non-ANSI preprocessors botch requoting inside strings. That's bad +# enough, but on some of those systems, the assert macro relies on requoting +# working properly! +GAS_WORKING_ASSERT + +# On some systems, the system header files may not declare malloc, realloc, +# and free. There are places where gas needs these functions to have been +# declared -- such as when taking their addresses. +gas_test_headers=" +#ifdef HAVE_MEMORY_H +#include +#endif +#ifdef HAVE_STRING_H +#include +#else +#ifdef HAVE_STRINGS_H +#include +#endif +#endif +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif +" + +# Does errno.h declare errno, or do we have to add a separate declaration +# for it? +GAS_CHECK_DECL_NEEDED(errno, f, int f, [ +#ifdef HAVE_ERRNO_H +#include +#endif +]) + +AC_MSG_CHECKING(for a known getopt prototype in unistd.h) +AC_CACHE_VAL(gas_cv_decl_getopt_unistd_h, +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [extern int getopt (int, char *const*, const char *);])], +gas_cv_decl_getopt_unistd_h=yes, gas_cv_decl_getopt_unistd_h=no)]) +AC_MSG_RESULT($gas_cv_decl_getopt_unistd_h) +if test $gas_cv_decl_getopt_unistd_h = yes; then + AC_DEFINE([HAVE_DECL_GETOPT], 1, + [Is the prototype for getopt in in the expected format?]) +fi + +GAS_CHECK_DECL_NEEDED(environ, f, char **f, $gas_test_headers) +GAS_CHECK_DECL_NEEDED(ffs, f, int (*f)(int), $gas_test_headers) +GAS_CHECK_DECL_NEEDED(free, f, void (*f)(), $gas_test_headers) +GAS_CHECK_DECL_NEEDED(malloc, f, char *(*f)(), $gas_test_headers) +GAS_CHECK_DECL_NEEDED(sbrk, f, char *(*f)(), $gas_test_headers) +GAS_CHECK_DECL_NEEDED(strstr, f, char *(*f)(), $gas_test_headers) + +AC_CHECK_DECLS([free, getenv, malloc, mempcpy, realloc, stpcpy, strstr, vsnprintf]) + +BFD_BINARY_FOPEN + +# Link in zlib if we can. This allows us to write compressed debug sections. +AM_ZLIB + +# Support for VMS timestamps via cross compile + +if test "$ac_cv_header_time_h" = yes; then + GAS_HAVE_TIME_TYPE_MEMBER(struct tm, tm_gmtoff) +fi + +if test "$ac_cv_header_sys_stat_h" = yes; then + GAS_HAVE_SYS_STAT_TYPE_MEMBER(struct stat, st_mtim, tv_sec) + GAS_HAVE_SYS_STAT_TYPE_MEMBER(struct stat, st_mtim, tv_nsec) +fi + + +dnl Required for html, pdf, install-pdf and install-html targets. +AC_SUBST(datarootdir) +AC_SUBST(docdir) +AC_SUBST(htmldir) +AC_SUBST(pdfdir) + +dnl This must come last. + +dnl We used to make symlinks to files in the source directory, but now +dnl we just use the right name for .c files, and create .h files in +dnl the build directory which include the right .h file. Make sure +dnl the old symlinks don't exist, so that a reconfigure in an existing +dnl directory behaves reasonably. + +AC_CONFIG_FILES(Makefile doc/Makefile po/Makefile.in:po/Make-in) +AC_CONFIG_COMMANDS([default], +[rm -f targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c itbl-cpu.h + echo '#include "tc-'"${target_cpu_type}"'.h"' > targ-cpu.h + echo '#include "obj-'"${obj_format}"'.h"' > obj-format.h + echo '#include "te-'"${te_file}"'.h"' > targ-env.h + echo '#include "itbl-'"${target_cpu_type}"'.h"' > itbl-cpu.h + if test "x$cgen_cpu_prefix" != x ; then + echo '#include "opcodes/'"${cgen_cpu_prefix}"'-desc.h"' > cgen-desc.h + fi], +[target_cpu_type=${target_cpu_type} + cgen_cpu_prefix=${cgen_cpu_prefix} + obj_format=${obj_format} + te_file=${te_file}]) + +AC_OUTPUT diff --git a/gas/configure.in b/gas/configure.in deleted file mode 100644 index cc4fc54d46c..00000000000 --- a/gas/configure.in +++ /dev/null @@ -1,852 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -dnl -dnl And be careful when changing it! If you must add tests with square -dnl brackets, be sure changequote invocations surround it. -dnl -dnl Copyright (C) 2012-2014 Free Software Foundation, Inc. -dnl -dnl This file is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 3 of the License, or -dnl (at your option) any later version. -dnl -dnl This program is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with this program; see the file COPYING3. If not see -dnl . -dnl -dnl v2.5 needed for --bindir et al -AC_PREREQ(2.59) -m4_include([../bfd/version.m4]) -AC_INIT([gas], BFD_VERSION) -AC_CONFIG_SRCDIR(as.h) - -dnl Autoconf 2.57 will find the aux dir without this. However, unless -dnl we specify this explicitly, automake-1.7 will assume that ylwrap is in -dnl gas/ instead of gas/../. -AC_CONFIG_AUX_DIR(..) -AC_CANONICAL_TARGET -AC_ISC_POSIX - -AM_INIT_AUTOMAKE - -AC_PROG_CC -AC_GNU_SOURCE -AC_USE_SYSTEM_EXTENSIONS -ACX_LARGEFILE - -LT_INIT - -AC_ARG_ENABLE(targets, -[ --enable-targets alternative target configurations besides the primary], -[case "${enableval}" in - yes | "") AC_MSG_ERROR(enable-targets option must specify target names or 'all') - ;; - no) enable_targets= ;; - *) enable_targets=$enableval ;; -esac])dnl - -ac_checking=yes -if grep '^RELEASE=y' ${srcdir}/../bfd/Makefile.am >/dev/null 2>/dev/null ; then - ac_checking= -fi -AC_ARG_ENABLE(checking, -[ --enable-checking enable run-time checks], -[case "${enableval}" in - no|none) ac_checking= ;; - *) ac_checking=yes ;; -esac])dnl -if test x$ac_checking != x ; then - AC_DEFINE(ENABLE_CHECKING, 1, [Define if you want run-time sanity checks.]) -fi - -using_cgen=no - -AM_BINUTILS_WARNINGS - -# Generate a header file -AC_CONFIG_HEADERS(config.h:config.in) - -# PR 14072 -AH_VERBATIM([00_CONFIG_H_CHECK], -[/* Check that config.h is #included before system headers - (this works only for glibc, but that should be enough). */ -#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__) -# error config.h must be #included before system headers -#endif -#define __CONFIG_H__ 1]) - -# If we are on a DOS filesystem, we must use gdb.ini rather than -# .gdbinit. -case "${host}" in - *-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-windows*) - GDBINIT="gdb.ini" - AC_CONFIG_FILES(gdb.ini:gdbinit.in) - ;; - *) - GDBINIT=".gdbinit" - AC_CONFIG_FILES(.gdbinit:gdbinit.in) - ;; -esac -AC_SUBST(GDBINIT) - -#We need this for the host. BOUT header is in host order. -AC_C_BIGENDIAN - -te_file=generic - -# Makefile target for installing gas in $(tooldir)/bin. -install_tooldir=install-exec-tooldir - -canon_targets="" -all_targets=no -if test -n "$enable_targets" ; then - for t in `echo $enable_targets | sed 's/,/ /g'`; do - if test $t = "all"; then - all_targets=yes - continue - fi - result=`$ac_config_sub $t 2>/dev/null` - if test -n "$result" ; then - canon_targets="$canon_targets $result" -# else -# # Permit "all", etc. We don't support it yet though. -# canon_targets="$canon_targets $t" - fi - done - GAS_UNIQ(canon_targets) -fi - -emulations="" - -for this_target in $target $canon_targets ; do - - targ=${this_target} - . ${srcdir}/configure.tgt - - case ${target_cpu} in - crisv32) - AC_DEFINE_UNQUOTED(DEFAULT_CRIS_ARCH, $arch, - [Default CRIS architecture.]) - ;; - esac - - if test ${this_target} = $target ; then - target_cpu_type=${cpu_type} - elif test ${target_cpu_type} != ${cpu_type} ; then - continue - fi - - generic_target=${cpu_type}-${target_vendor}-${target_os} - case ${generic_target} in - i386-*-sco3.2v5*) - if test ${this_target} = $target; then - AC_DEFINE(SCO_ELF, 1, [Define if defaulting to ELF on SCO 5.]) - fi - ;; - - i386-*-msdosdjgpp* \ - | i386-*-go32* \ - | i386-go32-rtems*) - AC_DEFINE(STRICTCOFF, 1, [Using strict COFF?]) - ;; - - i860-*-*) - AC_MSG_WARN(GAS support for ${generic_target} is preliminary and a work in progress) - ;; - - microblaze*) - ;; - -changequote(,)dnl - ppc-*-aix[5-9].*) -changequote([,])dnl - AC_DEFINE(AIX_WEAK_SUPPORT, 1, - [Define if using AIX 5.2 value for C_WEAKEXT.]) - ;; - ppc-*-solaris*) - if test ${this_target} = $target; then - AC_DEFINE(TARGET_SOLARIS_COMMENT, 1, - [Define if default target is PowerPC Solaris.]) - fi - if test x${endian} = xbig; then - AC_MSG_ERROR(Solaris must be configured little endian) - fi - ;; - - sh*-*-symbianelf*) - AC_DEFINE(TARGET_SYMBIAN, 1, [Define if target is Symbian OS.]) - ;; - esac - - if test ${this_target} = $target ; then - endian_def= - if test x${endian} = xbig; then - endian_def=1 - elif test x${endian} = xlittle; then - endian_def=0 - fi - if test x${endian_def} != x; then - AC_DEFINE_UNQUOTED(TARGET_BYTES_BIG_ENDIAN, $endian_def, - [Define as 1 if big endian.]) - fi - fi - -# Other random stuff. - - case ${cpu_type} in - mips) - # Set mips_cpu to the name of the default CPU. - case ${target_cpu} in - mips | mipsbe | mipseb | mipsle | mipsel | mips64 | mips64el) - mips_cpu=from-abi - ;; - mipsisa32 | mipsisa32el) - mips_cpu=mips32 - ;; - mipsisa32r2 | mipsisa32r2el) - mips_cpu=mips32r2 - ;; - mipsisa32r3 | mipsisa32r3el) - mips_cpu=mips32r3 - ;; - mipsisa32r5 | mipsisa32r5el) - mips_cpu=mips32r5 - ;; - mipsisa64 | mipsisa64el) - mips_cpu=mips64 - ;; - mipsisa64r2 | mipsisa64r2el) - mips_cpu=mips64r2 - ;; - mipsisa64r3 | mipsisa64r3el) - mips_cpu=mips64r3 - ;; - mipsisa64r5 | mipsisa64r5el) - mips_cpu=mips64r5 - ;; - mipstx39 | mipstx39el) - mips_cpu=r3900 - ;; - mips64vr | mips64vrel) - mips_cpu=vr4100 - ;; - mipsisa32r2* | mipsisa64r2*) -changequote(,)dnl - mips_cpu=`echo $target_cpu | sed -e 's/[a-z]*..r2//' -e 's/el$//'` -changequote([,])dnl - ;; - mips64* | mipsisa64* | mipsisa32*) -changequote(,)dnl - mips_cpu=`echo $target_cpu | sed -e 's/[a-z]*..//' -e 's/el$//'` -changequote([,])dnl - ;; - mips*) -changequote(,)dnl - mips_cpu=`echo $target_cpu | sed -e 's/^mips//' -e 's/el$//'` -changequote([,])dnl - ;; - *) - AC_MSG_ERROR($target_cpu isn't a supported MIPS CPU name) - ;; - esac - # See whether it's appropriate to set E_MIPS_ABI_O32 for o32 - # binaries. It's a GNU extension that some OSes don't understand. - case ${target} in - *-*-irix*) - use_e_mips_abi_o32=0 - ;; - *) - use_e_mips_abi_o32=1 - ;; - esac - # Decide whether to generate 32-bit or 64-bit code by default. - # Used to resolve -march=from-abi when an embedded ABI is selected. - case ${target} in - mips64*-*-* | mipsisa64*-*-*) - mips_default_64bit=1 - ;; - *) - mips_default_64bit=0 - ;; - esac - # Decide which ABI to target by default. - case ${target} in - mips64*-linux* | mips-sgi-irix6* | mips64*-freebsd* | mips64*-kfreebsd*-gnu) - mips_default_abi=N32_ABI - ;; - mips*-linux* | mips*-freebsd* | mips*-kfreebsd*-gnu) - mips_default_abi=O32_ABI - ;; - mips64*-openbsd*) - mips_default_abi=N64_ABI - ;; - *) - mips_default_abi=NO_ABI - ;; - esac - AC_DEFINE_UNQUOTED(MIPS_CPU_STRING_DEFAULT, "$mips_cpu", - [Default CPU for MIPS targets. ]) - AC_DEFINE_UNQUOTED(USE_E_MIPS_ABI_O32, $use_e_mips_abi_o32, - [Allow use of E_MIPS_ABI_O32 on MIPS targets. ]) - AC_DEFINE_UNQUOTED(MIPS_DEFAULT_64BIT, $mips_default_64bit, - [Generate 64-bit code by default on MIPS targets. ]) - AC_DEFINE_UNQUOTED(MIPS_DEFAULT_ABI, $mips_default_abi, - [Choose a default ABI for MIPS targets. ]) - ;; - esac - - # Do we need the opcodes library? - case ${cpu_type} in - vax | tic30) - ;; - - *) - need_opcodes=yes - - case "${enable_shared}" in - yes) shared_opcodes=true ;; - *opcodes*) shared_opcodes=true ;; - *) shared_opcodes=false ;; - esac - ;; - esac - - # Any other special object files needed ? - case ${cpu_type} in - - bfin) - echo ${extra_objects} | grep -s "bfin-parse.o" - if test $? -ne 0 ; then - extra_objects="$extra_objects bfin-parse.o" - fi - - echo ${extra_objects} | grep -s "bfin-lex-wrapper.o" - if test $? -ne 0 ; then - extra_objects="$extra_objects bfin-lex-wrapper.o" - fi - ;; - - epiphany | fr30 | ip2k | iq2000 | lm32 | m32r | or1k) - using_cgen=yes - ;; - - m32c) - using_cgen=yes - ;; - frv) - using_cgen=yes - ;; - m68k) - case ${extra_objects} in - *m68k-parse.o*) ;; - *) extra_objects="$extra_objects m68k-parse.o" ;; - esac - ;; - - mep) - using_cgen=yes - ;; - - mips) - echo ${extra_objects} | grep -s "itbl-parse.o" - if test $? -ne 0 ; then - extra_objects="$extra_objects itbl-parse.o" - fi - - echo ${extra_objects} | grep -s "itbl-lex-wrapper.o" - if test $? -ne 0 ; then - extra_objects="$extra_objects itbl-lex-wrapper.o" - fi - - echo ${extra_objects} | grep -s "itbl-ops.o" - if test $? -ne 0 ; then - extra_objects="$extra_objects itbl-ops.o" - fi - ;; - - mt) - using_cgen=yes - ;; - - nds32) - # Decide BASELINE, REDUCED_REGS, FPU_DP_EXT, FPU_SP_EXT features - # based on arch_name. - AC_MSG_CHECKING(for default configuration of --with-arch) - if test "x${with_arch}" != x; then - case ${with_arch} in - v2j | v2s | v2f | v2 | v3m | v3j | v3s | v3f | v3 ) - AC_DEFINE_UNQUOTED(NDS32_DEFAULT_ARCH_NAME, "$with_arch", - [Define value for nds32_arch_name]) - ;; - *) - AC_MSG_ERROR(This kind of arch name does *NOT* exist!) - ;; - esac - fi - AC_MSG_RESULT($with_arch) - - # Decide features one by one. - AC_MSG_CHECKING(for default configuration of --enable-dx-regs) - if test "x${enable_dx_regs}" == xyes; then - AC_DEFINE(NDS32_DEFAULT_DX_REGS, 1, - [Define value for nds32_dx_regs]) - else - AC_DEFINE(NDS32_DEFAULT_DX_REGS, 0, - [Define default value for nds32_dx_regs]) - fi - AC_MSG_RESULT($enable_dx_regs) - - AC_MSG_CHECKING(for default configuration of --enable-perf-ext) - if test "x${enable_perf_ext}" == xno; then - AC_DEFINE(NDS32_DEFAULT_PERF_EXT, 0, - [Define value for nds32_perf_ext]) - else - AC_DEFINE(NDS32_DEFAULT_PERF_EXT, 1, - [Define default value for nds32_perf_ext]) - fi - AC_MSG_RESULT($enable_perf_ext) - - AC_MSG_CHECKING(for default configuration of --enable-perf-ext2) - if test "x${enable_perf_ext2}" == xno; then - AC_DEFINE(NDS32_DEFAULT_PERF_EXT2, 0, - [Define value for nds32_perf_ext2]) - else - AC_DEFINE(NDS32_DEFAULT_PERF_EXT2, 1, - [Define default value for nds32_perf_ext2]) - fi - AC_MSG_RESULT($enable_perf_ext2) - - AC_MSG_CHECKING(for default configuration of --enable-string-ext) - if test "x${enable_string_ext}" == xno; then - AC_DEFINE(NDS32_DEFAULT_STRING_EXT, 0, - [Define value for nds32_string_ext]) - else - AC_DEFINE(NDS32_DEFAULT_STRING_EXT, 1, - [Define default value for nds32_string_ext]) - fi - AC_MSG_RESULT($enable_string_ext) - - AC_MSG_CHECKING(for default configuration of --enable-audio-ext) - if test "x${enable_audio_ext}" == xno; then - AC_DEFINE(NDS32_DEFAULT_AUDIO_EXT, 0, - [Define value for nds32_audio_ext]) - else - AC_DEFINE(NDS32_DEFAULT_AUDIO_EXT, 1, - [Define default value for nds32_audio_ext]) - fi - AC_MSG_RESULT($enable_audio_ext) - ;; - - i386 | s390 | sparc) - if test $this_target = $target ; then - AC_DEFINE_UNQUOTED(DEFAULT_ARCH, "${arch}", [Default architecture.]) - fi - ;; - - rl78) - echo ${extra_objects} | grep -s "rl78-parse.o" - if test $? -ne 0 ; then - extra_objects="$extra_objects rl78-parse.o" - fi - ;; - - rx) - echo ${extra_objects} | grep -s "rx-parse.o" - if test $? -ne 0 ; then - extra_objects="$extra_objects rx-parse.o" - fi - ;; - - xstormy16) - using_cgen=yes - ;; - - xc16x) - using_cgen=yes - ;; - - xtensa) - echo ${extra_objects} | grep -s "xtensa-relax.o" - if test $? -ne 0 ; then - extra_objects="$extra_objects xtensa-relax.o" - fi - ;; - - *) - ;; - esac - - if test $using_cgen = yes ; then - case "x${extra_objects}" in - *cgen.o*) ;; - *) extra_objects="$extra_objects cgen.o" ;; - esac - fi - -# See if we really can support this configuration with the emulation code. - - if test $this_target = $target ; then - obj_format=$fmt - te_file=$em - fi - - case ${te_file} in - vms) extra_objects="$extra_objects te-vms.o" ;; - esac - -# From target name and format, produce a list of supported emulations. - - case ${generic_target}-${fmt} in - mips-*-*-*) case "$endian" in - big) emulation="mipsbelf mipslelf mipself" ;; - *) emulation="mipslelf mipsbelf mipself" ;; - esac ;; - # i386-pc-pe-coff != i386-pc-coff. - i386-*-pe-coff) ;; - # Uncommenting the next line will turn on support for i386 AOUT - # for the default linux configuration - # i386-*-linux*-elf) emulation="i386elf i386aout" ;; - # - i386-*-aout) emulation="i386aout" ;; - i386-*-coff) emulation="i386coff" ;; - i386-*-elf) emulation="i386elf" ;; - - # Always all formats. The first stated emulation becomes the default. - cris-*-*aout*) emulation="crisaout criself" ;; - cris-*-*) emulation="criself crisaout" ;; - esac - - emulations="$emulations $emulation" - -done - -# Turn on all targets if possible -if test ${all_targets} = "yes"; then - case ${target_cpu_type} in - i386) - case ${obj_format} in - aout) - emulations="$emulations i386coff i386elf" - ;; - coff) - emulations="$emulations i386aout i386elf" - ;; - elf) - emulations="$emulations i386aout i386coff" - ;; - esac - ;; - x86_64) - case ${obj_format} in - aout) - emulations="$emulations i386coff i386elf" - ;; - coff) - emulations="$emulations i386aout i386elf" - ;; - elf) - emulations="$emulations i386aout i386coff" - ;; - esac - ;; - esac -fi - -# PE code has way too many macros tweaking behaviour -case ${te_file} in - pe*) emulations="" ;; -esac - -# Assign floating point type. Most processors with FP support -# IEEE FP. On those that don't support FP at all, usually IEEE -# is emulated. -case ${target_cpu} in - vax | pdp11 ) atof=vax ;; - *) atof=ieee ;; -esac - -case "${obj_format}" in - "") AC_MSG_ERROR(GAS does not know what format to use for target ${target}) ;; -esac - -# Unfortunately the cpu in cpu-opc.h file isn't always $(TARGET_CPU). -cgen_cpu_prefix="" -if test $using_cgen = yes ; then - case ${target_cpu} in - or1knd) - cgen_cpu_prefix=or1k ;; - *) cgen_cpu_prefix=${target_cpu} ;; - esac - AC_SUBST(cgen_cpu_prefix) - AC_DEFINE(USING_CGEN, 1, [Using cgen code?]) -fi - -dnl -dnl Make sure the desired support files exist. -dnl - -if test ! -r ${srcdir}/config/tc-${target_cpu_type}.c; then - AC_MSG_ERROR(GAS does not support target CPU ${target_cpu_type}) -fi - -if test ! -r ${srcdir}/config/obj-${obj_format}.c; then - AC_MSG_ERROR(GAS does not have support for object file format ${obj_format}) -fi - -# Some COFF configurations want these random other flags set. -case ${obj_format} in - coff) - case ${target_cpu_type} in - i386) AC_DEFINE(I386COFF, 1, [Using i386 COFF?]) ;; - m68k) AC_DEFINE(M68KCOFF, 1, [Using m68k COFF?]) ;; - m88k) AC_DEFINE(M88KCOFF, 1, [Using m88k COFF?]) ;; - x86_64) AC_DEFINE(I386COFF, 1, [Using i386 COFF?]) ;; - esac - ;; -esac - -# Getting this done right is going to be a bitch. Each configuration specified -# with --enable-targets=... should be checked for environment, format, cpu -# setting. -# -# For each configuration, the necessary object file support code must be linked -# in. This might be only one, it might be up to four. The necessary emulation -# code needs to be provided, too. -# -# And then there's "--enable-targets=all".... -# -# For now, just always do it for MIPS ELF configurations. Sigh. - -formats="${obj_format}" -emfiles="" -EMULATIONS="" -GAS_UNIQ(emulations) -for em in . $emulations ; do - case $em in - .) continue ;; - mipsbelf | mipslelf | mipself) - fmt=elf file=mipself ;; - *coff) - fmt=coff file=$em ;; - *aout) - fmt=aout file=$em ;; - *elf) - fmt=elf file=$em ;; - esac - formats="$formats $fmt" - emfiles="$emfiles e-$file.o" - EMULATIONS="$EMULATIONS &$em," -done -GAS_UNIQ(formats) -GAS_UNIQ(emfiles) -if test `set . $formats ; shift ; echo $#` -gt 1 ; then - for fmt in $formats ; do - case $fmt in - aout) AC_DEFINE(OBJ_MAYBE_AOUT, 1, [a.out support?]) ;; - bout) AC_DEFINE(OBJ_MAYBE_BOUT, 1, [b.out support?]) ;; - coff) AC_DEFINE(OBJ_MAYBE_COFF, 1, [COFF support?]) ;; - ecoff) AC_DEFINE(OBJ_MAYBE_ECOFF, 1, [ECOFF support?]) ;; - elf) AC_DEFINE(OBJ_MAYBE_ELF, 1, [ELF support?]) ;; - generic) AC_DEFINE(OBJ_MAYBE_GENERIC, 1, [generic support?]) ;; - som) AC_DEFINE(OBJ_MAYBE_SOM, 1, [SOM support?]) ;; - esac - extra_objects="$extra_objects obj-$fmt.o" - done - obj_format=multi -fi -if test `set . $emfiles ; shift ; echo $#` -gt 0 ; then - DEFAULT_EMULATION=`set . $emulations ; echo $2` - # e-mipself has more than one emulation per file, e-i386* has just one at the - # moment. If only one emulation is specified, then don't define - # USE_EMULATIONS or include any of the e-files as they will only be bloat. - case "${obj_format}${emfiles}" in - multi* | *mipself*) - extra_objects="$extra_objects $emfiles" - AC_DEFINE(USE_EMULATIONS, 1, [Use emulation support?]) ;; - esac -fi -AC_SUBST(extra_objects) -AC_DEFINE_UNQUOTED(EMULATIONS, $EMULATIONS, [Supported emulations.]) -AC_DEFINE_UNQUOTED(DEFAULT_EMULATION, "$DEFAULT_EMULATION", - [Default emulation.]) - -reject_dev_configs=yes - -case ${reject_dev_configs}-${dev} in - yes-yes) # Oops. - AC_MSG_ERROR(GAS does not support the ${generic_target} configuration.) - ;; -esac - -AC_SUBST(target_cpu_type) -AC_SUBST(obj_format) -AC_SUBST(te_file) -AC_SUBST(install_tooldir) -AC_SUBST(atof) -dnl AC_SUBST(emulation) - -# do we need the opcodes library? -case "${need_opcodes}" in -yes) - OPCODES_LIB=../opcodes/libopcodes.la - ;; -esac - -AC_SUBST(OPCODES_LIB) - -AC_DEFINE_UNQUOTED(TARGET_ALIAS, "${target_alias}", [Target alias.]) -AC_DEFINE_UNQUOTED(TARGET_CANONICAL, "${target}", [Canonical target.]) -AC_DEFINE_UNQUOTED(TARGET_CPU, "${target_cpu}", [Target CPU.]) -AC_DEFINE_UNQUOTED(TARGET_VENDOR, "${target_vendor}", [Target vendor.]) -AC_DEFINE_UNQUOTED(TARGET_OS, "${target_os}", [Target OS.]) - -AC_PROG_YACC -AM_PROG_LEX - -ALL_LINGUAS="fr tr es rw id ru fi ja" -ZW_GNU_GETTEXT_SISTER_DIR -AM_PO_SUBDIRS - -AM_MAINTAINER_MODE -AM_CONDITIONAL(GENINSRC_NEVER, false) -AC_EXEEXT - -AC_CHECK_HEADERS(string.h stdlib.h memory.h strings.h unistd.h errno.h sys/types.h limits.h locale.h time.h sys/stat.h) -ACX_HEADER_STRING - -# Put this here so that autoconf's "cross-compiling" message doesn't confuse -# people who are not cross-compiling but are compiling cross-assemblers. -AC_MSG_CHECKING(whether compiling a cross-assembler) -if test "${host}" = "${target}"; then - cross_gas=no -else - cross_gas=yes - AC_DEFINE(CROSS_COMPILE, 1, [Compiling cross-assembler?]) -fi -AC_MSG_RESULT($cross_gas) - -dnl ansidecl.h will deal with const -dnl AC_C_CONST -AC_FUNC_ALLOCA -AC_C_INLINE - -# VMS doesn't have unlink. -AC_CHECK_FUNCS(unlink remove, break) -AC_CHECK_FUNCS(sbrk setlocale) - -AM_LC_MESSAGES - -# do we need the math library? -case "${need_libm}" in -yes) - LT_LIB_M - AC_SUBST(LIBM) - ;; -esac - -# Some non-ANSI preprocessors botch requoting inside strings. That's bad -# enough, but on some of those systems, the assert macro relies on requoting -# working properly! -GAS_WORKING_ASSERT - -# On some systems, the system header files may not declare malloc, realloc, -# and free. There are places where gas needs these functions to have been -# declared -- such as when taking their addresses. -gas_test_headers=" -#ifdef HAVE_MEMORY_H -#include -#endif -#ifdef HAVE_STRING_H -#include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -" - -# Does errno.h declare errno, or do we have to add a separate declaration -# for it? -GAS_CHECK_DECL_NEEDED(errno, f, int f, [ -#ifdef HAVE_ERRNO_H -#include -#endif -]) - -AC_MSG_CHECKING(for a known getopt prototype in unistd.h) -AC_CACHE_VAL(gas_cv_decl_getopt_unistd_h, -[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [extern int getopt (int, char *const*, const char *);])], -gas_cv_decl_getopt_unistd_h=yes, gas_cv_decl_getopt_unistd_h=no)]) -AC_MSG_RESULT($gas_cv_decl_getopt_unistd_h) -if test $gas_cv_decl_getopt_unistd_h = yes; then - AC_DEFINE([HAVE_DECL_GETOPT], 1, - [Is the prototype for getopt in in the expected format?]) -fi - -GAS_CHECK_DECL_NEEDED(environ, f, char **f, $gas_test_headers) -GAS_CHECK_DECL_NEEDED(ffs, f, int (*f)(int), $gas_test_headers) -GAS_CHECK_DECL_NEEDED(free, f, void (*f)(), $gas_test_headers) -GAS_CHECK_DECL_NEEDED(malloc, f, char *(*f)(), $gas_test_headers) -GAS_CHECK_DECL_NEEDED(sbrk, f, char *(*f)(), $gas_test_headers) -GAS_CHECK_DECL_NEEDED(strstr, f, char *(*f)(), $gas_test_headers) - -AC_CHECK_DECLS([free, getenv, malloc, mempcpy, realloc, stpcpy, strstr, vsnprintf]) - -BFD_BINARY_FOPEN - -# Link in zlib if we can. This allows us to write compressed debug sections. -AM_ZLIB - -# Support for VMS timestamps via cross compile - -if test "$ac_cv_header_time_h" = yes; then - GAS_HAVE_TIME_TYPE_MEMBER(struct tm, tm_gmtoff) -fi - -if test "$ac_cv_header_sys_stat_h" = yes; then - GAS_HAVE_SYS_STAT_TYPE_MEMBER(struct stat, st_mtim, tv_sec) - GAS_HAVE_SYS_STAT_TYPE_MEMBER(struct stat, st_mtim, tv_nsec) -fi - - -dnl Required for html, pdf, install-pdf and install-html targets. -AC_SUBST(datarootdir) -AC_SUBST(docdir) -AC_SUBST(htmldir) -AC_SUBST(pdfdir) - -dnl This must come last. - -dnl We used to make symlinks to files in the source directory, but now -dnl we just use the right name for .c files, and create .h files in -dnl the build directory which include the right .h file. Make sure -dnl the old symlinks don't exist, so that a reconfigure in an existing -dnl directory behaves reasonably. - -AC_CONFIG_FILES(Makefile doc/Makefile po/Makefile.in:po/Make-in) -AC_CONFIG_COMMANDS([default], -[rm -f targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c itbl-cpu.h - echo '#include "tc-'"${target_cpu_type}"'.h"' > targ-cpu.h - echo '#include "obj-'"${obj_format}"'.h"' > obj-format.h - echo '#include "te-'"${te_file}"'.h"' > targ-env.h - echo '#include "itbl-'"${target_cpu_type}"'.h"' > itbl-cpu.h - if test "x$cgen_cpu_prefix" != x ; then - echo '#include "opcodes/'"${cgen_cpu_prefix}"'-desc.h"' > cgen-desc.h - fi], -[target_cpu_type=${target_cpu_type} - cgen_cpu_prefix=${cgen_cpu_prefix} - obj_format=${obj_format} - te_file=${te_file}]) - -AC_OUTPUT diff --git a/gas/doc/Makefile.in b/gas/doc/Makefile.in index 3ced97cf84e..2db51216700 100644 --- a/gas/doc/Makefile.in +++ b/gas/doc/Makefile.in @@ -72,7 +72,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \ $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \ $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \ $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/../bfd/version.m4 $(top_srcdir)/configure.in + $(top_srcdir)/../bfd/version.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs diff --git a/gprof/ChangeLog b/gprof/ChangeLog index f4128c89603..cb03efe08c3 100644 --- a/gprof/ChangeLog +++ b/gprof/ChangeLog @@ -1,3 +1,9 @@ +2014-07-04 Alan Modra + + * configure.ac: Rename from configure.in. + * Makefile.in: Regenerate. + * gconfig.in: Regenerate. + 2014-07-04 Alan Modra * configure.in: Include bfd/version.m4. diff --git a/gprof/Makefile.in b/gprof/Makefile.in index 7aada8f0f4a..01797b6e210 100644 --- a/gprof/Makefile.in +++ b/gprof/Makefile.in @@ -75,7 +75,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../bfd/warning.m4 \ $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \ $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \ $(top_srcdir)/../lt~obsolete.m4 \ - $(top_srcdir)/../bfd/version.m4 $(top_srcdir)/configure.in + $(top_srcdir)/../bfd/version.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ diff --git a/gprof/configure.ac b/gprof/configure.ac new file mode 100644 index 00000000000..583ad244cc6 --- /dev/null +++ b/gprof/configure.ac @@ -0,0 +1,77 @@ +dnl Process this file with autoconf to produce a configure script. +dnl +dnl Copyright (C) 2012-2014 Free Software Foundation, Inc. +dnl +dnl This file is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; see the file COPYING3. If not see +dnl . +dnl +AC_PREREQ(2.59) +m4_include([../bfd/version.m4]) +AC_INIT([gprof], BFD_VERSION) +AC_CONFIG_SRCDIR([gprof.c]) + +AC_CANONICAL_TARGET([]) +AC_ISC_POSIX + +AM_INIT_AUTOMAKE + +dnl For simplicity, we use the BFD configuration file for most +dnl things. However, we also need our own configuration file for +dnl the automake PACKAGE and VERSION macros. We don't name it +dnl config.h, to avoid any possible confusion with the bfd config.h. +AC_CONFIG_HEADERS([gconfig.h:gconfig.in]) + +AC_PROG_CC +AC_GNU_SOURCE +AC_USE_SYSTEM_EXTENSIONS +ACX_LARGEFILE +AC_PROG_INSTALL + +LT_INIT + +AC_CHECK_FUNCS(setmode) + +ALL_LINGUAS="fr tr sv es id da pt_BR de vi rw ga ms fi nl bg eo ja sr" +ZW_GNU_GETTEXT_SISTER_DIR +AM_PO_SUBDIRS + +AM_MAINTAINER_MODE +AM_CONDITIONAL(GENINSRC_NEVER, false) +AC_EXEEXT + +AC_CHECK_HEADERS(sys/gmon_out.h) + +AC_MSG_CHECKING(for a known getopt prototype in unistd.h) +AC_CACHE_VAL(gprof_cv_decl_getopt_unistd_h, +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [extern int getopt (int, char *const*, const char *);])], +gprof_cv_decl_getopt_unistd_h=yes, gprof_cv_decl_getopt_unistd_h=no)]) +AC_MSG_RESULT($gprof_cv_decl_getopt_unistd_h) +if test $gprof_cv_decl_getopt_unistd_h = yes; then + AC_DEFINE([HAVE_DECL_GETOPT], 1, + [Is the prototype for getopt in in the expected format?]) +fi + +# Some systems have fabs only in -lm, not in -lc. +AC_SEARCH_LIBS(fabs, m) + +AM_BINUTILS_WARNINGS + +dnl Required by html, pdf, install-pdf and install-html +AC_SUBST(datarootdir) +AC_SUBST(docdir) +AC_SUBST(htmldir) +AC_SUBST(pdfdir) + +AC_CONFIG_FILES([Makefile po/Makefile.in:po/Make-in]) +AC_OUTPUT diff --git a/gprof/configure.in b/gprof/configure.in deleted file mode 100644 index 583ad244cc6..00000000000 --- a/gprof/configure.in +++ /dev/null @@ -1,77 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -dnl -dnl Copyright (C) 2012-2014 Free Software Foundation, Inc. -dnl -dnl This file is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 3 of the License, or -dnl (at your option) any later version. -dnl -dnl This program is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with this program; see the file COPYING3. If not see -dnl . -dnl -AC_PREREQ(2.59) -m4_include([../bfd/version.m4]) -AC_INIT([gprof], BFD_VERSION) -AC_CONFIG_SRCDIR([gprof.c]) - -AC_CANONICAL_TARGET([]) -AC_ISC_POSIX - -AM_INIT_AUTOMAKE - -dnl For simplicity, we use the BFD configuration file for most -dnl things. However, we also need our own configuration file for -dnl the automake PACKAGE and VERSION macros. We don't name it -dnl config.h, to avoid any possible confusion with the bfd config.h. -AC_CONFIG_HEADERS([gconfig.h:gconfig.in]) - -AC_PROG_CC -AC_GNU_SOURCE -AC_USE_SYSTEM_EXTENSIONS -ACX_LARGEFILE -AC_PROG_INSTALL - -LT_INIT - -AC_CHECK_FUNCS(setmode) - -ALL_LINGUAS="fr tr sv es id da pt_BR de vi rw ga ms fi nl bg eo ja sr" -ZW_GNU_GETTEXT_SISTER_DIR -AM_PO_SUBDIRS - -AM_MAINTAINER_MODE -AM_CONDITIONAL(GENINSRC_NEVER, false) -AC_EXEEXT - -AC_CHECK_HEADERS(sys/gmon_out.h) - -AC_MSG_CHECKING(for a known getopt prototype in unistd.h) -AC_CACHE_VAL(gprof_cv_decl_getopt_unistd_h, -[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [extern int getopt (int, char *const*, const char *);])], -gprof_cv_decl_getopt_unistd_h=yes, gprof_cv_decl_getopt_unistd_h=no)]) -AC_MSG_RESULT($gprof_cv_decl_getopt_unistd_h) -if test $gprof_cv_decl_getopt_unistd_h = yes; then - AC_DEFINE([HAVE_DECL_GETOPT], 1, - [Is the prototype for getopt in in the expected format?]) -fi - -# Some systems have fabs only in -lm, not in -lc. -AC_SEARCH_LIBS(fabs, m) - -AM_BINUTILS_WARNINGS - -dnl Required by html, pdf, install-pdf and install-html -AC_SUBST(datarootdir) -AC_SUBST(docdir) -AC_SUBST(htmldir) -AC_SUBST(pdfdir) - -AC_CONFIG_FILES([Makefile po/Makefile.in:po/Make-in]) -AC_OUTPUT diff --git a/gprof/gconfig.in b/gprof/gconfig.in index 25679910ee7..1325a1f1864 100644 --- a/gprof/gconfig.in +++ b/gprof/gconfig.in @@ -1,4 +1,4 @@ -/* gconfig.in. Generated from configure.in by autoheader. */ +/* gconfig.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ diff --git a/ld/ChangeLog b/ld/ChangeLog index 4a07def9184..aa3cb10e43d 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2014-07-04 Alan Modra + + * configure.ac: Rename from configure.in. + * Makefile.in: Regenerate. + * config.in: Regenerate. + 2014-07-04 Alan Modra * configure.in: Include bfd/version.m4. diff --git a/ld/Makefile.in b/ld/Makefile.in index 0a587378097..971dc5f8289 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -83,7 +83,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \ $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \ $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \ $(top_srcdir)/../lt~obsolete.m4 \ - $(top_srcdir)/../bfd/version.m4 $(top_srcdir)/configure.in + $(top_srcdir)/../bfd/version.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ diff --git a/ld/config.in b/ld/config.in index f4a8a23e8f5..4b370e8a304 100644 --- a/ld/config.in +++ b/ld/config.in @@ -1,4 +1,4 @@ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ diff --git a/ld/configure.ac b/ld/configure.ac new file mode 100644 index 00000000000..d1bf1e48dd4 --- /dev/null +++ b/ld/configure.ac @@ -0,0 +1,411 @@ +dnl Process this file with autoconf to produce a configure script +dnl +dnl Copyright (C) 2012-2014 Free Software Foundation, Inc. +dnl +dnl This file is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; see the file COPYING3. If not see +dnl . +dnl + +AC_PREREQ(2.59) +m4_include([../bfd/version.m4]) +AC_INIT([ld], BFD_VERSION) +AC_CONFIG_SRCDIR(ldmain.c) + +AC_CANONICAL_TARGET +AC_CANONICAL_BUILD +AC_ISC_POSIX + +AM_INIT_AUTOMAKE +AM_MAINTAINER_MODE + +AC_ARG_WITH(lib-path, [ --with-lib-path=dir1:dir2... set default LIB_PATH],LIB_PATH=$withval) +AC_ARG_ENABLE(targets, +[ --enable-targets alternative target configurations], +[case "${enableval}" in + yes | "") AC_MSG_ERROR(enable-targets option must specify target names or 'all') + ;; + no) enable_targets= ;; + *) enable_targets=$enableval ;; +esac])dnl +AC_ARG_ENABLE(64-bit-bfd, +[ --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)], +[case "${enableval}" in + yes) want64=true ;; + no) want64=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for 64-bit-bfd option) ;; +esac],[want64=false])dnl + +AC_ARG_WITH(sysroot, +[ --with-sysroot[=DIR] Search for usr/lib et al within DIR.], +[ + case ${with_sysroot} in + yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;; + *) TARGET_SYSTEM_ROOT=$with_sysroot ;; + esac + + TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' + use_sysroot=yes + + if test "x$prefix" = xNONE; then + test_prefix=/usr/local + else + test_prefix=$prefix + fi + if test "x$exec_prefix" = xNONE; then + test_exec_prefix=$test_prefix + else + test_exec_prefix=$exec_prefix + fi + case ${TARGET_SYSTEM_ROOT} in + "${test_prefix}"|"${test_prefix}/"*|\ + "${test_exec_prefix}"|"${test_exec_prefix}/"*|\ + '${prefix}'|'${prefix}/'*|\ + '${exec_prefix}'|'${exec_prefix}/'*) + t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" + TARGET_SYSTEM_ROOT_DEFINE="$t" + ;; + esac +], [ + use_sysroot=no + TARGET_SYSTEM_ROOT= + TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"' +]) +AC_SUBST(use_sysroot) +AC_SUBST(TARGET_SYSTEM_ROOT) +AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE) + +dnl Use --enable-gold to decide if this linker should be the default. +dnl "install_as_default" is set to false if gold is the default linker. +dnl "installed_linker" is the installed BFD linker name. +AC_ARG_ENABLE(gold, +[[ --enable-gold[=ARG] build gold [ARG={default,yes,no}]]], +[case "${enableval}" in + default) + install_as_default=no + installed_linker=ld.bfd + ;; + yes|no) + install_as_default=yes + installed_linker=ld.bfd + ;; + *) + AC_MSG_ERROR([invalid --enable-gold argument]) + ;; + esac], +[install_as_default=yes + installed_linker=ld.bfd]) +AC_SUBST(install_as_default) +AC_SUBST(installed_linker) + +AC_ARG_ENABLE([got], +AS_HELP_STRING([--enable-got=], + [GOT handling scheme (target, single, negative, multigot)]), +[case "${enableval}" in + target | single | negative | multigot) got_handling=$enableval ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-got option) ;; +esac], +[got_handling=target]) + +case "${got_handling}" in + target) + AC_DEFINE([GOT_HANDLING_DEFAULT], [GOT_HANDLING_TARGET_DEFAULT], + [Define to choose default GOT handling scheme]) ;; + single) + AC_DEFINE([GOT_HANDLING_DEFAULT], [GOT_HANDLING_SINGLE], + [Define to choose default GOT handling scheme]) ;; + negative) + AC_DEFINE([GOT_HANDLING_DEFAULT], [GOT_HANDLING_NEGATIVE], + [Define to choose default GOT handling scheme]) ;; + multigot) + AC_DEFINE([GOT_HANDLING_DEFAULT], [GOT_HANDLING_MULTIGOT], + [Define to choose default GOT handling scheme]) ;; + *) AC_MSG_ERROR(bad value ${got_handling} for --enable-got option) ;; +esac + +AM_BINUTILS_WARNINGS + +AM_LC_MESSAGES + +AC_CONFIG_HEADERS([config.h:config.in]) + +# PR 14072 +AH_VERBATIM([00_CONFIG_H_CHECK], +[/* Check that config.h is #included before system headers + (this works only for glibc, but that should be enough). */ +#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__) +# error config.h must be #included before system headers +#endif +#define __CONFIG_H__ 1]) + +if test -z "$target" ; then + AC_MSG_ERROR(Unrecognized target system type; please check config.sub.) +fi +if test -z "$host" ; then + AC_MSG_ERROR(Unrecognized host system type; please check config.sub.) +fi + +# host-specific stuff: + +AC_PROG_CC +AC_PROG_CXX +AC_GNU_SOURCE +AC_USE_SYSTEM_EXTENSIONS +ACX_LARGEFILE +AC_PROG_INSTALL + +LT_INIT + +ALL_LINGUAS="fr sv tr es da vi zh_CN zh_TW ga fi id bg it uk" +ZW_GNU_GETTEXT_SISTER_DIR +AM_PO_SUBDIRS + +AC_EXEEXT + +AC_PROG_YACC +AM_PROG_LEX + +AM_MAINTAINER_MODE +AM_CONDITIONAL(GENINSRC_NEVER, false) +ACX_PROG_CMP_IGNORE_INITIAL + +. ${srcdir}/configure.host + +AC_SUBST(HDEFINES) +AC_SUBST(HOSTING_CRT0) +AC_SUBST(HOSTING_SCRT0) +AC_SUBST(HOSTING_LIBS) +AC_SUBST(HOSTING_SLIBS) +AC_SUBST(NATIVE_LIB_DIRS) + +AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h elf-hints.h limits.h locale.h sys/param.h) +AC_CHECK_HEADERS(fcntl.h sys/file.h sys/time.h sys/stat.h) +ACX_HEADER_STRING +AC_CHECK_FUNCS(glob mkstemp realpath sbrk setlocale waitpid) +AC_CHECK_FUNCS(open lseek close) +AC_HEADER_DIRENT + +# Check for dlopen support and enable plugins if possible. +enable_plugins=yes +AC_CHECK_HEADER([dlfcn.h],[],[enable_plugins=no],[AC_INCLUDES_DEFAULT]) +AC_SEARCH_LIBS([dlopen],[dl],[],[enable_plugins=no],[]) +AC_CHECK_FUNCS([dlopen dlsym dlclose],[],[enable_plugins=no]) +# We also support plugins on Windows (MinGW). +if test x$enable_plugins = xno ; then + AC_CHECK_HEADERS([windows.h],[enable_plugins=yes],[],[AC_INCLUDES_DEFAULT]) +fi +AM_CONDITIONAL([ENABLE_PLUGINS], [test x$enable_plugins = xyes]) + +AC_ARG_ENABLE(initfini-array, + [ --enable-initfini-array use .init_array/.fini_array sections], + [], [ +AC_CACHE_CHECK(for .preinit_array/.init_array/.fini_array support, + gcc_cv_initfini_array, [dnl + if test "x${build}" = "x${target}" ; then + AC_RUN_IFELSE([AC_LANG_SOURCE([ +static int x = -1; +int main (void) { return x; } +int foo (void) { x = 0; } +int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;])], + [gcc_cv_initfini_array=yes], [gcc_cv_initfini_array=no], + [gcc_cv_initfini_array=no]) + else + gcc_cv_initfini_array=no + fi]) + enable_initfini_array=$gcc_cv_initfini_array +]) +AC_SUBST(enable_initfini_array) +if test $enable_initfini_array = yes; then + AC_DEFINE(HAVE_INITFINI_ARRAY, 1, + [Define .init_array/.fini_array sections are available and working.]) +fi + +AC_MSG_CHECKING(for a known getopt prototype in unistd.h) +AC_CACHE_VAL(ld_cv_decl_getopt_unistd_h, +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [extern int getopt (int, char *const*, const char *);])], +ld_cv_decl_getopt_unistd_h=yes, ld_cv_decl_getopt_unistd_h=no)]) +AC_MSG_RESULT($ld_cv_decl_getopt_unistd_h) +if test $ld_cv_decl_getopt_unistd_h = yes; then + AC_DEFINE([HAVE_DECL_GETOPT], 1, + [Is the prototype for getopt in in the expected format?]) +fi + +BFD_BINARY_FOPEN + +AC_CHECK_DECLS([strstr, free, sbrk, getenv, environ]) + +# Link in zlib if we can. This is needed only for the bootstrap tests +# right now, since those tests use libbfd, which depends on zlib. +AM_ZLIB + +# When converting linker scripts into strings for use in emulation +# files, use astring.sed if the compiler supports ANSI string +# concatenation, or ostring.sed otherwise. This is to support the +# broken Microsoft MSVC compiler, which limits the length of string +# constants, while still supporting pre-ANSI compilers which do not +# support string concatenation. +AC_MSG_CHECKING([whether ANSI C string concatenation works]) +AC_CACHE_VAL(ld_cv_string_concatenation, +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [char *a = "a" "a";])], + ld_cv_string_concatenation=yes, + ld_cv_string_concatenation=no)]) +AC_MSG_RESULT($ld_cv_string_concatenation) +if test "$ld_cv_string_concatenation" = "yes"; then + STRINGIFY=astring.sed +else + STRINGIFY=ostring.sed +fi +AC_SUBST(STRINGIFY) + +# target-specific stuff: + +all_targets= +EMUL= +all_emuls= +all_emul_extras= +all_libpath= + +dnl We need to get an arbitrary number of tdir definitions into +dnl Makefile. We can't do it using AC_SUBST, because autoconf does +dnl not permit literal newlines in an AC_SUBST variables. So we use a +dnl file. +rm -f tdirs + +# If the host is 64-bit, then we enable 64-bit targets by default. +# This is consistent with what ../bfd/configure.in does. +if test x${want64} = xfalse; then + AC_CHECK_SIZEOF(void *) + if test "x${ac_cv_sizeof_void_p}" = "x8"; then + want64=true + fi +fi + +for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` +do + if test "$targ_alias" = "all"; then + all_targets=true + else + # Canonicalize the secondary target names. + result=`$ac_config_sub $targ_alias 2>/dev/null` + if test -n "$result"; then + targ=$result + else + targ=$targ_alias + fi + + . ${srcdir}/configure.tgt + + if test "$targ" = "$target"; then + EMUL=$targ_emul + fi + + if test x${want64} = xfalse; then + . ${srcdir}/../bfd/config.bfd + fi + + if test x${want64} = xtrue; then + targ_extra_emuls="$targ_extra_emuls $targ64_extra_emuls" + targ_extra_libpath="$targ_extra_libpath $targ64_extra_libpath" + fi + + for i in $targ_emul $targ_extra_emuls $targ_extra_libpath; do + case " $all_emuls " in + *" e${i}.o "*) ;; + *) + all_emuls="$all_emuls e${i}.o" + eval result=\$tdir_$i + test -z "$result" && result=$targ_alias + echo tdir_$i=$result >> tdirs + ;; + esac + done + + for i in $targ_emul $targ_extra_libpath; do + case " $all_libpath " in + *" ${i} "*) ;; + *) + if test -z "$all_libpath"; then + all_libpath=${i} + else + all_libpath="$all_libpath ${i}" + fi + ;; + esac + done + + for i in $targ_extra_ofiles; do + case " $all_emul_extras " in + *" ${i} "*) ;; + *) + all_emul_extras="$all_emul_extras ${i}" + ;; + esac + done + + fi +done + +AC_SUBST(EMUL) + +TDIRS=tdirs +AC_SUBST_FILE(TDIRS) + +if test x${all_targets} = xtrue; then + if test x${want64} = xtrue; then + EMULATION_OFILES='$(ALL_EMULATIONS) $(ALL_64_EMULATIONS)' + EMUL_EXTRA_OFILES='$(ALL_EMUL_EXTRA_OFILES) $(ALL_64_EMUL_EXTRA_OFILES)' + else + EMULATION_OFILES='$(ALL_EMULATIONS)' + EMUL_EXTRA_OFILES='$(ALL_EMUL_EXTRA_OFILES)' + fi +else + EMULATION_OFILES=$all_emuls + EMUL_EXTRA_OFILES=$all_emul_extras +fi +AC_SUBST(EMULATION_OFILES) +AC_SUBST(EMUL_EXTRA_OFILES) +AC_SUBST(LIB_PATH) + +EMULATION_LIBPATH=$all_libpath +AC_SUBST(EMULATION_LIBPATH) + +if test x${enable_static} = xno; then + TESTBFDLIB="--rpath ../bfd/.libs ../bfd/.libs/libbfd.so" +else + TESTBFDLIB="../bfd/.libs/libbfd.a" +fi +AC_SUBST(TESTBFDLIB) + +target_vendor=${target_vendor=$host_vendor} +case "$target_vendor" in + hp) EXTRA_SHLIB_EXTENSION=".sl" ;; + *) EXTRA_SHLIB_EXTENSION= ;; +esac + +case "$target_os" in + lynxos) EXTRA_SHLIB_EXTENSION=".a" ;; +esac + +if test x${EXTRA_SHLIB_EXTENSION} != x ; then + AC_DEFINE_UNQUOTED(EXTRA_SHLIB_EXTENSION, "$EXTRA_SHLIB_EXTENSION", + [Additional extension a shared object might have.]) +fi + +dnl Required by html, pdf, install-pdf and install-html +AC_SUBST(datarootdir) +AC_SUBST(docdir) +AC_SUBST(htmldir) +AC_SUBST(pdfdir) + +AC_CONFIG_FILES(Makefile po/Makefile.in:po/Make-in) +AC_OUTPUT diff --git a/ld/configure.in b/ld/configure.in deleted file mode 100644 index d1bf1e48dd4..00000000000 --- a/ld/configure.in +++ /dev/null @@ -1,411 +0,0 @@ -dnl Process this file with autoconf to produce a configure script -dnl -dnl Copyright (C) 2012-2014 Free Software Foundation, Inc. -dnl -dnl This file is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 3 of the License, or -dnl (at your option) any later version. -dnl -dnl This program is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with this program; see the file COPYING3. If not see -dnl . -dnl - -AC_PREREQ(2.59) -m4_include([../bfd/version.m4]) -AC_INIT([ld], BFD_VERSION) -AC_CONFIG_SRCDIR(ldmain.c) - -AC_CANONICAL_TARGET -AC_CANONICAL_BUILD -AC_ISC_POSIX - -AM_INIT_AUTOMAKE -AM_MAINTAINER_MODE - -AC_ARG_WITH(lib-path, [ --with-lib-path=dir1:dir2... set default LIB_PATH],LIB_PATH=$withval) -AC_ARG_ENABLE(targets, -[ --enable-targets alternative target configurations], -[case "${enableval}" in - yes | "") AC_MSG_ERROR(enable-targets option must specify target names or 'all') - ;; - no) enable_targets= ;; - *) enable_targets=$enableval ;; -esac])dnl -AC_ARG_ENABLE(64-bit-bfd, -[ --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)], -[case "${enableval}" in - yes) want64=true ;; - no) want64=false ;; - *) AC_MSG_ERROR(bad value ${enableval} for 64-bit-bfd option) ;; -esac],[want64=false])dnl - -AC_ARG_WITH(sysroot, -[ --with-sysroot[=DIR] Search for usr/lib et al within DIR.], -[ - case ${with_sysroot} in - yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;; - *) TARGET_SYSTEM_ROOT=$with_sysroot ;; - esac - - TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' - use_sysroot=yes - - if test "x$prefix" = xNONE; then - test_prefix=/usr/local - else - test_prefix=$prefix - fi - if test "x$exec_prefix" = xNONE; then - test_exec_prefix=$test_prefix - else - test_exec_prefix=$exec_prefix - fi - case ${TARGET_SYSTEM_ROOT} in - "${test_prefix}"|"${test_prefix}/"*|\ - "${test_exec_prefix}"|"${test_exec_prefix}/"*|\ - '${prefix}'|'${prefix}/'*|\ - '${exec_prefix}'|'${exec_prefix}/'*) - t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" - TARGET_SYSTEM_ROOT_DEFINE="$t" - ;; - esac -], [ - use_sysroot=no - TARGET_SYSTEM_ROOT= - TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"' -]) -AC_SUBST(use_sysroot) -AC_SUBST(TARGET_SYSTEM_ROOT) -AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE) - -dnl Use --enable-gold to decide if this linker should be the default. -dnl "install_as_default" is set to false if gold is the default linker. -dnl "installed_linker" is the installed BFD linker name. -AC_ARG_ENABLE(gold, -[[ --enable-gold[=ARG] build gold [ARG={default,yes,no}]]], -[case "${enableval}" in - default) - install_as_default=no - installed_linker=ld.bfd - ;; - yes|no) - install_as_default=yes - installed_linker=ld.bfd - ;; - *) - AC_MSG_ERROR([invalid --enable-gold argument]) - ;; - esac], -[install_as_default=yes - installed_linker=ld.bfd]) -AC_SUBST(install_as_default) -AC_SUBST(installed_linker) - -AC_ARG_ENABLE([got], -AS_HELP_STRING([--enable-got=], - [GOT handling scheme (target, single, negative, multigot)]), -[case "${enableval}" in - target | single | negative | multigot) got_handling=$enableval ;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-got option) ;; -esac], -[got_handling=target]) - -case "${got_handling}" in - target) - AC_DEFINE([GOT_HANDLING_DEFAULT], [GOT_HANDLING_TARGET_DEFAULT], - [Define to choose default GOT handling scheme]) ;; - single) - AC_DEFINE([GOT_HANDLING_DEFAULT], [GOT_HANDLING_SINGLE], - [Define to choose default GOT handling scheme]) ;; - negative) - AC_DEFINE([GOT_HANDLING_DEFAULT], [GOT_HANDLING_NEGATIVE], - [Define to choose default GOT handling scheme]) ;; - multigot) - AC_DEFINE([GOT_HANDLING_DEFAULT], [GOT_HANDLING_MULTIGOT], - [Define to choose default GOT handling scheme]) ;; - *) AC_MSG_ERROR(bad value ${got_handling} for --enable-got option) ;; -esac - -AM_BINUTILS_WARNINGS - -AM_LC_MESSAGES - -AC_CONFIG_HEADERS([config.h:config.in]) - -# PR 14072 -AH_VERBATIM([00_CONFIG_H_CHECK], -[/* Check that config.h is #included before system headers - (this works only for glibc, but that should be enough). */ -#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__) -# error config.h must be #included before system headers -#endif -#define __CONFIG_H__ 1]) - -if test -z "$target" ; then - AC_MSG_ERROR(Unrecognized target system type; please check config.sub.) -fi -if test -z "$host" ; then - AC_MSG_ERROR(Unrecognized host system type; please check config.sub.) -fi - -# host-specific stuff: - -AC_PROG_CC -AC_PROG_CXX -AC_GNU_SOURCE -AC_USE_SYSTEM_EXTENSIONS -ACX_LARGEFILE -AC_PROG_INSTALL - -LT_INIT - -ALL_LINGUAS="fr sv tr es da vi zh_CN zh_TW ga fi id bg it uk" -ZW_GNU_GETTEXT_SISTER_DIR -AM_PO_SUBDIRS - -AC_EXEEXT - -AC_PROG_YACC -AM_PROG_LEX - -AM_MAINTAINER_MODE -AM_CONDITIONAL(GENINSRC_NEVER, false) -ACX_PROG_CMP_IGNORE_INITIAL - -. ${srcdir}/configure.host - -AC_SUBST(HDEFINES) -AC_SUBST(HOSTING_CRT0) -AC_SUBST(HOSTING_SCRT0) -AC_SUBST(HOSTING_LIBS) -AC_SUBST(HOSTING_SLIBS) -AC_SUBST(NATIVE_LIB_DIRS) - -AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h elf-hints.h limits.h locale.h sys/param.h) -AC_CHECK_HEADERS(fcntl.h sys/file.h sys/time.h sys/stat.h) -ACX_HEADER_STRING -AC_CHECK_FUNCS(glob mkstemp realpath sbrk setlocale waitpid) -AC_CHECK_FUNCS(open lseek close) -AC_HEADER_DIRENT - -# Check for dlopen support and enable plugins if possible. -enable_plugins=yes -AC_CHECK_HEADER([dlfcn.h],[],[enable_plugins=no],[AC_INCLUDES_DEFAULT]) -AC_SEARCH_LIBS([dlopen],[dl],[],[enable_plugins=no],[]) -AC_CHECK_FUNCS([dlopen dlsym dlclose],[],[enable_plugins=no]) -# We also support plugins on Windows (MinGW). -if test x$enable_plugins = xno ; then - AC_CHECK_HEADERS([windows.h],[enable_plugins=yes],[],[AC_INCLUDES_DEFAULT]) -fi -AM_CONDITIONAL([ENABLE_PLUGINS], [test x$enable_plugins = xyes]) - -AC_ARG_ENABLE(initfini-array, - [ --enable-initfini-array use .init_array/.fini_array sections], - [], [ -AC_CACHE_CHECK(for .preinit_array/.init_array/.fini_array support, - gcc_cv_initfini_array, [dnl - if test "x${build}" = "x${target}" ; then - AC_RUN_IFELSE([AC_LANG_SOURCE([ -static int x = -1; -int main (void) { return x; } -int foo (void) { x = 0; } -int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;])], - [gcc_cv_initfini_array=yes], [gcc_cv_initfini_array=no], - [gcc_cv_initfini_array=no]) - else - gcc_cv_initfini_array=no - fi]) - enable_initfini_array=$gcc_cv_initfini_array -]) -AC_SUBST(enable_initfini_array) -if test $enable_initfini_array = yes; then - AC_DEFINE(HAVE_INITFINI_ARRAY, 1, - [Define .init_array/.fini_array sections are available and working.]) -fi - -AC_MSG_CHECKING(for a known getopt prototype in unistd.h) -AC_CACHE_VAL(ld_cv_decl_getopt_unistd_h, -[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [extern int getopt (int, char *const*, const char *);])], -ld_cv_decl_getopt_unistd_h=yes, ld_cv_decl_getopt_unistd_h=no)]) -AC_MSG_RESULT($ld_cv_decl_getopt_unistd_h) -if test $ld_cv_decl_getopt_unistd_h = yes; then - AC_DEFINE([HAVE_DECL_GETOPT], 1, - [Is the prototype for getopt in in the expected format?]) -fi - -BFD_BINARY_FOPEN - -AC_CHECK_DECLS([strstr, free, sbrk, getenv, environ]) - -# Link in zlib if we can. This is needed only for the bootstrap tests -# right now, since those tests use libbfd, which depends on zlib. -AM_ZLIB - -# When converting linker scripts into strings for use in emulation -# files, use astring.sed if the compiler supports ANSI string -# concatenation, or ostring.sed otherwise. This is to support the -# broken Microsoft MSVC compiler, which limits the length of string -# constants, while still supporting pre-ANSI compilers which do not -# support string concatenation. -AC_MSG_CHECKING([whether ANSI C string concatenation works]) -AC_CACHE_VAL(ld_cv_string_concatenation, -[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [char *a = "a" "a";])], - ld_cv_string_concatenation=yes, - ld_cv_string_concatenation=no)]) -AC_MSG_RESULT($ld_cv_string_concatenation) -if test "$ld_cv_string_concatenation" = "yes"; then - STRINGIFY=astring.sed -else - STRINGIFY=ostring.sed -fi -AC_SUBST(STRINGIFY) - -# target-specific stuff: - -all_targets= -EMUL= -all_emuls= -all_emul_extras= -all_libpath= - -dnl We need to get an arbitrary number of tdir definitions into -dnl Makefile. We can't do it using AC_SUBST, because autoconf does -dnl not permit literal newlines in an AC_SUBST variables. So we use a -dnl file. -rm -f tdirs - -# If the host is 64-bit, then we enable 64-bit targets by default. -# This is consistent with what ../bfd/configure.in does. -if test x${want64} = xfalse; then - AC_CHECK_SIZEOF(void *) - if test "x${ac_cv_sizeof_void_p}" = "x8"; then - want64=true - fi -fi - -for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` -do - if test "$targ_alias" = "all"; then - all_targets=true - else - # Canonicalize the secondary target names. - result=`$ac_config_sub $targ_alias 2>/dev/null` - if test -n "$result"; then - targ=$result - else - targ=$targ_alias - fi - - . ${srcdir}/configure.tgt - - if test "$targ" = "$target"; then - EMUL=$targ_emul - fi - - if test x${want64} = xfalse; then - . ${srcdir}/../bfd/config.bfd - fi - - if test x${want64} = xtrue; then - targ_extra_emuls="$targ_extra_emuls $targ64_extra_emuls" - targ_extra_libpath="$targ_extra_libpath $targ64_extra_libpath" - fi - - for i in $targ_emul $targ_extra_emuls $targ_extra_libpath; do - case " $all_emuls " in - *" e${i}.o "*) ;; - *) - all_emuls="$all_emuls e${i}.o" - eval result=\$tdir_$i - test -z "$result" && result=$targ_alias - echo tdir_$i=$result >> tdirs - ;; - esac - done - - for i in $targ_emul $targ_extra_libpath; do - case " $all_libpath " in - *" ${i} "*) ;; - *) - if test -z "$all_libpath"; then - all_libpath=${i} - else - all_libpath="$all_libpath ${i}" - fi - ;; - esac - done - - for i in $targ_extra_ofiles; do - case " $all_emul_extras " in - *" ${i} "*) ;; - *) - all_emul_extras="$all_emul_extras ${i}" - ;; - esac - done - - fi -done - -AC_SUBST(EMUL) - -TDIRS=tdirs -AC_SUBST_FILE(TDIRS) - -if test x${all_targets} = xtrue; then - if test x${want64} = xtrue; then - EMULATION_OFILES='$(ALL_EMULATIONS) $(ALL_64_EMULATIONS)' - EMUL_EXTRA_OFILES='$(ALL_EMUL_EXTRA_OFILES) $(ALL_64_EMUL_EXTRA_OFILES)' - else - EMULATION_OFILES='$(ALL_EMULATIONS)' - EMUL_EXTRA_OFILES='$(ALL_EMUL_EXTRA_OFILES)' - fi -else - EMULATION_OFILES=$all_emuls - EMUL_EXTRA_OFILES=$all_emul_extras -fi -AC_SUBST(EMULATION_OFILES) -AC_SUBST(EMUL_EXTRA_OFILES) -AC_SUBST(LIB_PATH) - -EMULATION_LIBPATH=$all_libpath -AC_SUBST(EMULATION_LIBPATH) - -if test x${enable_static} = xno; then - TESTBFDLIB="--rpath ../bfd/.libs ../bfd/.libs/libbfd.so" -else - TESTBFDLIB="../bfd/.libs/libbfd.a" -fi -AC_SUBST(TESTBFDLIB) - -target_vendor=${target_vendor=$host_vendor} -case "$target_vendor" in - hp) EXTRA_SHLIB_EXTENSION=".sl" ;; - *) EXTRA_SHLIB_EXTENSION= ;; -esac - -case "$target_os" in - lynxos) EXTRA_SHLIB_EXTENSION=".a" ;; -esac - -if test x${EXTRA_SHLIB_EXTENSION} != x ; then - AC_DEFINE_UNQUOTED(EXTRA_SHLIB_EXTENSION, "$EXTRA_SHLIB_EXTENSION", - [Additional extension a shared object might have.]) -fi - -dnl Required by html, pdf, install-pdf and install-html -AC_SUBST(datarootdir) -AC_SUBST(docdir) -AC_SUBST(htmldir) -AC_SUBST(pdfdir) - -AC_CONFIG_FILES(Makefile po/Makefile.in:po/Make-in) -AC_OUTPUT diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 0b206d5fc19..db54a807696 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,9 @@ +2014-07-04 Alan Modra + + * configure.ac: Rename from configure.in. + * Makefile.in: Regenerate. + * config.in: Regenerate. + 2014-07-04 Alan Modra * configure.in: Include bfd/version.m4. diff --git a/opcodes/Makefile.in b/opcodes/Makefile.in index 6079002094d..46ef017de6a 100644 --- a/opcodes/Makefile.in +++ b/opcodes/Makefile.in @@ -76,7 +76,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \ $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \ $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \ $(top_srcdir)/../lt~obsolete.m4 \ - $(top_srcdir)/../bfd/version.m4 $(top_srcdir)/configure.in + $(top_srcdir)/../bfd/version.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ diff --git a/opcodes/config.in b/opcodes/config.in index ee1ddbbcbc4..55a80fd9fe4 100644 --- a/opcodes/config.in +++ b/opcodes/config.in @@ -1,4 +1,4 @@ -/* config.in. Generated from configure.in by autoheader. */ +/* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ diff --git a/opcodes/configure.ac b/opcodes/configure.ac new file mode 100644 index 00000000000..b93e855a719 --- /dev/null +++ b/opcodes/configure.ac @@ -0,0 +1,395 @@ +dnl Process this file with autoconf to produce a configure script. +dnl +dnl Copyright (C) 2012-2014 Free Software Foundation, Inc. +dnl +dnl This file is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; see the file COPYING3. If not see +dnl . +dnl + +AC_PREREQ(2.59) +m4_include([../bfd/version.m4]) +AC_INIT([opcodes], BFD_VERSION) +AC_CONFIG_SRCDIR([z8k-dis.c]) + +AC_CANONICAL_TARGET +AC_ISC_POSIX + +AM_INIT_AUTOMAKE + +AC_PROG_CC +AC_GNU_SOURCE +AC_USE_SYSTEM_EXTENSIONS + +dnl These must be called before LT_INIT, because it may want +dnl to call AC_CHECK_PROG. +AC_CHECK_TOOL(AR, ar) +AC_CHECK_TOOL(RANLIB, ranlib, :) + +dnl Default to a non shared library. This may be overridden by the +dnl configure option --enable-shared. +AC_DISABLE_SHARED + +LT_INIT + +AC_ARG_ENABLE(targets, +[ --enable-targets alternative target configurations], +[case "${enableval}" in + yes | "") AC_MSG_ERROR([enable-targets option must specify target names or 'all']) + ;; + no) enable_targets= ;; + *) enable_targets=$enableval ;; +esac])dnl + +AM_BINUTILS_WARNINGS +ACX_PROG_CC_WARNING_OPTS([-Wno-missing-field-initializers], + [NO_WMISSING_FIELD_INITIALIZERS]) + +AC_CONFIG_HEADERS(config.h:config.in) + +# PR 14072 +AH_VERBATIM([00_CONFIG_H_CHECK], +[/* Check that config.h is #included before system headers + (this works only for glibc, but that should be enough). */ +#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__) +# error config.h must be #included before system headers +#endif +#define __CONFIG_H__ 1]) + +if test -z "$target" ; then + AC_MSG_ERROR(Unrecognized target system type; please check config.sub.) +fi + +AM_MAINTAINER_MODE +AM_INSTALL_LIBBFD +AC_EXEEXT + +# host-specific stuff: + +ALL_LINGUAS="fr sv tr es da de id pt_BR ro nl fi vi ga zh_CN it uk" +ZW_GNU_GETTEXT_SISTER_DIR +AM_PO_SUBDIRS + +. ${srcdir}/../bfd/configure.host + +BFD_CC_FOR_BUILD + +AC_SUBST(HDEFINES) +AC_PROG_INSTALL + +AC_CHECK_HEADERS(string.h strings.h stdlib.h limits.h) +ACX_HEADER_STRING + +AC_CHECK_DECLS([basename, stpcpy]) + +# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do +# since sigsetjmp might only be defined as a macro. +AC_CACHE_CHECK([for sigsetjmp], gdb_cv_func_sigsetjmp, +[AC_TRY_COMPILE([ +#include +], [sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);], +bfd_cv_func_sigsetjmp=yes, bfd_cv_func_sigsetjmp=no)]) +if test $bfd_cv_func_sigsetjmp = yes; then + AC_DEFINE(HAVE_SIGSETJMP, 1, [Define if sigsetjmp is available. ]) +fi + +cgen_maint=no +cgendir='$(srcdir)/../cgen' + +AC_ARG_ENABLE(cgen-maint, +[ --enable-cgen-maint[=dir] build cgen generated files], +[case "${enableval}" in + yes) cgen_maint=yes ;; + no) cgen_maint=no ;; + *) + # argument is cgen install directory (not implemented yet). + # Having a `share' directory might be more appropriate for the .scm, + # .cpu, etc. files. + cgen_maint=yes + cgendir=${cgen_maint}/lib/cgen + ;; +esac])dnl +AM_CONDITIONAL(CGEN_MAINT, test x${cgen_maint} = xyes) +AC_SUBST(cgendir) + +using_cgen=no + +# Check if linker supports --as-needed and --no-as-needed options +AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed, + [bfd_cv_ld_as_needed=no + if $LD --help 2>/dev/null | grep as-needed > /dev/null; then + bfd_cv_ld_as_needed=yes + fi + ]) + +LT_LIB_M + +#Libs for generator progs +if test "x$cross_compiling" = "xno"; then + BUILD_LIBS=../libiberty/libiberty.a + BUILD_LIB_DEPS=$BUILD_LIBS +else + # if cross-compiling, assume that the system provides -liberty + # and that the version is compatible with new headers. + BUILD_LIBS=-liberty + BUILD_LIB_DEPS= +fi +BUILD_LIBS="$BUILD_LIBS $LIBINTL" +BUILD_LIB_DEPS="$BUILD_LIB_DEPS $LIBINTL_DEP" + +AC_SUBST(BUILD_LIBS) +AC_SUBST(BUILD_LIB_DEPS) + +# Horrible hacks to build DLLs on Windows and a shared library elsewhere. +SHARED_LDFLAGS= +SHARED_LIBADD= +SHARED_DEPENDENCIES= +if test "$enable_shared" = "yes"; then +# When building a shared libopcodes, link against the pic version of libiberty +# so that apps that use libopcodes won't need libiberty just to satisfy any +# libopcodes references. +# We can't do that if a pic libiberty is unavailable since including non-pic +# code would insert text relocations into libopcodes. +# Note that linking against libbfd as we do here, which is itself linked +# against libiberty, may not satisfy all the libopcodes libiberty references +# since libbfd may not pull in the entirety of libiberty. +changequote(,)dnl + x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` +changequote([,])dnl + if test -n "$x"; then + SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" + fi + + case "${host}" in + *-*-cygwin*) + SHARED_LDFLAGS="-no-undefined" + SHARED_LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin" + ;; + *-*-darwin*) + SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.dylib ${SHARED_LIBADD}" + SHARED_DEPENDENCIES="../bfd/libbfd.la" + ;; + *) + case "$host_vendor" in + hp) + SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.sl ${SHARED_LIBADD}" + ;; + *) + SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.so ${SHARED_LIBADD}" + ;; + esac + SHARED_DEPENDENCIES="../bfd/libbfd.la" + ;; + esac + + if test -n "$SHARED_LIBADD"; then + if test -n "$LIBM"; then + if test x"$bfd_cv_ld_as_needed" = xyes; then + # Link against libm only when needed. Put -lc, -lm inside -Wl + # to stop libtool reordering these options. + SHARED_LIBADD="$SHARED_LIBADD -Wl,-lc,--as-needed,`echo $LIBM | sed 's/ /,/g'`,--no-as-needed" + else + SHARED_LIBADD="$SHARED_LIBADD $LIBM" + fi + fi + fi +fi +AC_SUBST(SHARED_LDFLAGS) +AC_SUBST(SHARED_LIBADD) +AC_SUBST(SHARED_DEPENDENCIES) + +# target-specific stuff: + +# Canonicalize the secondary target names. +if test -n "$enable_targets" ; then + for targ in `echo $enable_targets | sed 's/,/ /g'` + do + result=`$ac_config_sub $targ 2>/dev/null` + if test -n "$result" ; then + canon_targets="$canon_targets $result" + else + # Allow targets that config.sub doesn't recognize, like "all". + canon_targets="$canon_targets $targ" + fi + done +fi + +all_targets=false +selarchs= +for targ in $target $canon_targets +do + if test "x$targ" = "xall" ; then + all_targets=true + else + . $srcdir/../bfd/config.bfd + selarchs="$selarchs $targ_archs" + fi +done + +# Utility var, documents generic cgen support files. + +cgen_files="cgen-opc.lo cgen-asm.lo cgen-dis.lo cgen-bitset.lo" + +# We don't do any links based on the target system, just makefile config. + +if test x${all_targets} = xfalse ; then + + # Target architecture .o files. + ta= + + for arch in $selarchs + do + ad=`echo $arch | sed -e s/bfd_//g -e s/_arch//g` + archdefs="$archdefs -DARCH_$ad" + case "$arch" in + bfd_aarch64_arch) ta="$ta aarch64-asm.lo aarch64-dis.lo aarch64-opc.lo aarch64-asm-2.lo aarch64-dis-2.lo aarch64-opc-2.lo" ;; + bfd_alpha_arch) ta="$ta alpha-dis.lo alpha-opc.lo" ;; + bfd_arc_arch) ta="$ta arc-dis.lo arc-opc.lo arc-ext.lo" ;; + bfd_arm_arch) ta="$ta arm-dis.lo" ;; + bfd_avr_arch) ta="$ta avr-dis.lo" ;; + bfd_bfin_arch) ta="$ta bfin-dis.lo" ;; + bfd_cr16_arch) ta="$ta cr16-dis.lo cr16-opc.lo" ;; + bfd_cris_arch) ta="$ta cris-dis.lo cris-opc.lo cgen-bitset.lo" ;; + bfd_crx_arch) ta="$ta crx-dis.lo crx-opc.lo" ;; + bfd_d10v_arch) ta="$ta d10v-dis.lo d10v-opc.lo" ;; + bfd_d30v_arch) ta="$ta d30v-dis.lo d30v-opc.lo" ;; + bfd_dlx_arch) ta="$ta dlx-dis.lo" ;; + bfd_fr30_arch) ta="$ta fr30-asm.lo fr30-desc.lo fr30-dis.lo fr30-ibld.lo fr30-opc.lo" using_cgen=yes ;; + bfd_frv_arch) ta="$ta frv-asm.lo frv-desc.lo frv-dis.lo frv-ibld.lo frv-opc.lo" using_cgen=yes ;; + bfd_moxie_arch) ta="$ta moxie-dis.lo moxie-opc.lo" ;; + bfd_h8300_arch) ta="$ta h8300-dis.lo" ;; + bfd_h8500_arch) ta="$ta h8500-dis.lo" ;; + bfd_hppa_arch) ta="$ta hppa-dis.lo" ;; + bfd_i370_arch) ta="$ta i370-dis.lo i370-opc.lo" ;; + bfd_i386_arch|bfd_l1om_arch|bfd_k1om_arch) + ta="$ta i386-dis.lo i386-opc.lo" ;; + bfd_i860_arch) ta="$ta i860-dis.lo" ;; + bfd_i960_arch) ta="$ta i960-dis.lo" ;; + bfd_ia64_arch) ta="$ta ia64-dis.lo ia64-opc.lo" ;; + bfd_ip2k_arch) ta="$ta ip2k-asm.lo ip2k-desc.lo ip2k-dis.lo ip2k-ibld.lo ip2k-opc.lo" using_cgen=yes ;; + bfd_epiphany_arch) ta="$ta epiphany-asm.lo epiphany-desc.lo epiphany-dis.lo epiphany-ibld.lo epiphany-opc.lo" using_cgen=yes ;; + bfd_iq2000_arch) ta="$ta iq2000-asm.lo iq2000-desc.lo iq2000-dis.lo iq2000-ibld.lo iq2000-opc.lo" using_cgen=yes ;; + bfd_lm32_arch) ta="$ta lm32-asm.lo lm32-desc.lo lm32-dis.lo lm32-ibld.lo lm32-opc.lo lm32-opinst.lo" using_cgen=yes ;; + bfd_m32c_arch) ta="$ta m32c-asm.lo m32c-desc.lo m32c-dis.lo m32c-ibld.lo m32c-opc.lo" using_cgen=yes ;; + bfd_m32r_arch) ta="$ta m32r-asm.lo m32r-desc.lo m32r-dis.lo m32r-ibld.lo m32r-opc.lo m32r-opinst.lo" using_cgen=yes ;; + bfd_m68hc11_arch) ta="$ta m68hc11-dis.lo m68hc11-opc.lo" ;; + bfd_m68hc12_arch) ta="$ta m68hc11-dis.lo m68hc11-opc.lo" ;; + bfd_m9s12x_arch) ta="$ta m68hc11-dis.lo m68hc11-opc.lo" ;; + bfd_m9s12xg_arch) ta="$ta m68hc11-dis.lo m68hc11-opc.lo" ;; + bfd_m68k_arch) ta="$ta m68k-dis.lo m68k-opc.lo" ;; + bfd_m88k_arch) ta="$ta m88k-dis.lo" ;; + bfd_mcore_arch) ta="$ta mcore-dis.lo" ;; + bfd_mep_arch) ta="$ta mep-asm.lo mep-desc.lo mep-dis.lo mep-ibld.lo mep-opc.lo" using_cgen=yes ;; + bfd_metag_arch) ta="$ta metag-dis.lo" ;; + bfd_microblaze_arch) ta="$ta microblaze-dis.lo" ;; + bfd_mips_arch) ta="$ta mips-dis.lo mips-opc.lo mips16-opc.lo micromips-opc.lo" ;; + bfd_mmix_arch) ta="$ta mmix-dis.lo mmix-opc.lo" ;; + bfd_mn10200_arch) ta="$ta m10200-dis.lo m10200-opc.lo" ;; + bfd_mn10300_arch) ta="$ta m10300-dis.lo m10300-opc.lo" ;; + bfd_mt_arch) ta="$ta mt-asm.lo mt-desc.lo mt-dis.lo mt-ibld.lo mt-opc.lo" using_cgen=yes ;; + bfd_msp430_arch) ta="$ta msp430-dis.lo msp430-decode.lo" ;; + bfd_nds32_arch) ta="$ta nds32-asm.lo nds32-dis.lo" ;; + bfd_nios2_arch) ta="$ta nios2-dis.lo nios2-opc.lo" ;; + bfd_ns32k_arch) ta="$ta ns32k-dis.lo" ;; + bfd_or1k_arch) ta="$ta or1k-asm.lo or1k-desc.lo or1k-dis.lo or1k-ibld.lo or1k-opc.lo" using_cgen=yes ;; + bfd_pdp11_arch) ta="$ta pdp11-dis.lo pdp11-opc.lo" ;; + bfd_pj_arch) ta="$ta pj-dis.lo pj-opc.lo" ;; + bfd_powerpc_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;; + bfd_powerpc_64_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;; + bfd_pyramid_arch) ;; + bfd_romp_arch) ;; + bfd_rs6000_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;; + bfd_rl78_arch) ta="$ta rl78-dis.lo rl78-decode.lo";; + bfd_rx_arch) ta="$ta rx-dis.lo rx-decode.lo";; + bfd_s390_arch) ta="$ta s390-dis.lo s390-opc.lo" ;; + bfd_score_arch) ta="$ta score-dis.lo score7-dis.lo" ;; + bfd_sh_arch) + # We can't decide what we want just from the CPU family. + # We want SH5 support unless a specific version of sh is + # specified, as in sh3-elf, sh3b-linux-gnu, etc. + # Include it just for ELF targets, since the SH5 bfd:s are ELF only. + for t in $target $canon_targets; do + case $t in + all | sh5*-* | sh64*-* | sh-*-*elf* | shl*-*-*elf* | \ + sh-*-linux* | shl-*-linux*) + ta="$ta sh64-dis.lo sh64-opc.lo" + archdefs="$archdefs -DINCLUDE_SHMEDIA" + break;; + esac; + done + ta="$ta sh-dis.lo cgen-bitset.lo" ;; + bfd_sparc_arch) ta="$ta sparc-dis.lo sparc-opc.lo" ;; + bfd_spu_arch) ta="$ta spu-dis.lo spu-opc.lo" ;; + bfd_tahoe_arch) ;; + bfd_tic30_arch) ta="$ta tic30-dis.lo" ;; + bfd_tic4x_arch) ta="$ta tic4x-dis.lo" ;; + bfd_tic54x_arch) ta="$ta tic54x-dis.lo tic54x-opc.lo" ;; + bfd_tic6x_arch) ta="$ta tic6x-dis.lo" ;; + bfd_tic80_arch) ta="$ta tic80-dis.lo tic80-opc.lo" ;; + bfd_tilegx_arch) ta="$ta tilegx-dis.lo tilegx-opc.lo" ;; + bfd_tilepro_arch) ta="$ta tilepro-dis.lo tilepro-opc.lo" ;; + bfd_v850_arch) ta="$ta v850-opc.lo v850-dis.lo" ;; + bfd_v850e_arch) ta="$ta v850-opc.lo v850-dis.lo" ;; + bfd_v850ea_arch) ta="$ta v850-opc.lo v850-dis.lo" ;; + bfd_v850_rh850_arch) ta="$ta v850-opc.lo v850-dis.lo" ;; + bfd_vax_arch) ta="$ta vax-dis.lo" ;; + bfd_w65_arch) ta="$ta w65-dis.lo" ;; + bfd_we32k_arch) ;; + bfd_xc16x_arch) ta="$ta xc16x-asm.lo xc16x-desc.lo xc16x-dis.lo xc16x-ibld.lo xc16x-opc.lo" using_cgen=yes ;; + bfd_xgate_arch) ta="$ta xgate-dis.lo xgate-opc.lo" ;; + bfd_xstormy16_arch) ta="$ta xstormy16-asm.lo xstormy16-desc.lo xstormy16-dis.lo xstormy16-ibld.lo xstormy16-opc.lo" using_cgen=yes ;; + bfd_xtensa_arch) ta="$ta xtensa-dis.lo" ;; + bfd_z80_arch) ta="$ta z80-dis.lo" ;; + bfd_z8k_arch) ta="$ta z8k-dis.lo" ;; + + "") ;; + *) AC_MSG_ERROR(*** unknown target architecture $arch) ;; + esac + done + + if test $using_cgen = yes ; then + ta="$ta $cgen_files" + fi + + # Weed out duplicate .o files. + f="" + for i in $ta ; do + case " $f " in + *" $i "*) ;; + *) f="$f $i" ;; + esac + done + ta="$f" + + # And duplicate -D flags. + f="" + for i in $archdefs ; do + case " $f " in + *" $i "*) ;; + *) f="$f $i" ;; + esac + done + archdefs="$f" + + BFD_MACHINES="$ta" + +else # all_targets is true + archdefs=-DARCH_all + BFD_MACHINES='$(ALL_MACHINES)' +fi + +AC_SUBST(archdefs) +AC_SUBST(BFD_MACHINES) + +AC_CONFIG_FILES([Makefile po/Makefile.in:po/Make-in]) +AC_OUTPUT diff --git a/opcodes/configure.in b/opcodes/configure.in deleted file mode 100644 index b93e855a719..00000000000 --- a/opcodes/configure.in +++ /dev/null @@ -1,395 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -dnl -dnl Copyright (C) 2012-2014 Free Software Foundation, Inc. -dnl -dnl This file is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 3 of the License, or -dnl (at your option) any later version. -dnl -dnl This program is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with this program; see the file COPYING3. If not see -dnl . -dnl - -AC_PREREQ(2.59) -m4_include([../bfd/version.m4]) -AC_INIT([opcodes], BFD_VERSION) -AC_CONFIG_SRCDIR([z8k-dis.c]) - -AC_CANONICAL_TARGET -AC_ISC_POSIX - -AM_INIT_AUTOMAKE - -AC_PROG_CC -AC_GNU_SOURCE -AC_USE_SYSTEM_EXTENSIONS - -dnl These must be called before LT_INIT, because it may want -dnl to call AC_CHECK_PROG. -AC_CHECK_TOOL(AR, ar) -AC_CHECK_TOOL(RANLIB, ranlib, :) - -dnl Default to a non shared library. This may be overridden by the -dnl configure option --enable-shared. -AC_DISABLE_SHARED - -LT_INIT - -AC_ARG_ENABLE(targets, -[ --enable-targets alternative target configurations], -[case "${enableval}" in - yes | "") AC_MSG_ERROR([enable-targets option must specify target names or 'all']) - ;; - no) enable_targets= ;; - *) enable_targets=$enableval ;; -esac])dnl - -AM_BINUTILS_WARNINGS -ACX_PROG_CC_WARNING_OPTS([-Wno-missing-field-initializers], - [NO_WMISSING_FIELD_INITIALIZERS]) - -AC_CONFIG_HEADERS(config.h:config.in) - -# PR 14072 -AH_VERBATIM([00_CONFIG_H_CHECK], -[/* Check that config.h is #included before system headers - (this works only for glibc, but that should be enough). */ -#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__) -# error config.h must be #included before system headers -#endif -#define __CONFIG_H__ 1]) - -if test -z "$target" ; then - AC_MSG_ERROR(Unrecognized target system type; please check config.sub.) -fi - -AM_MAINTAINER_MODE -AM_INSTALL_LIBBFD -AC_EXEEXT - -# host-specific stuff: - -ALL_LINGUAS="fr sv tr es da de id pt_BR ro nl fi vi ga zh_CN it uk" -ZW_GNU_GETTEXT_SISTER_DIR -AM_PO_SUBDIRS - -. ${srcdir}/../bfd/configure.host - -BFD_CC_FOR_BUILD - -AC_SUBST(HDEFINES) -AC_PROG_INSTALL - -AC_CHECK_HEADERS(string.h strings.h stdlib.h limits.h) -ACX_HEADER_STRING - -AC_CHECK_DECLS([basename, stpcpy]) - -# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do -# since sigsetjmp might only be defined as a macro. -AC_CACHE_CHECK([for sigsetjmp], gdb_cv_func_sigsetjmp, -[AC_TRY_COMPILE([ -#include -], [sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);], -bfd_cv_func_sigsetjmp=yes, bfd_cv_func_sigsetjmp=no)]) -if test $bfd_cv_func_sigsetjmp = yes; then - AC_DEFINE(HAVE_SIGSETJMP, 1, [Define if sigsetjmp is available. ]) -fi - -cgen_maint=no -cgendir='$(srcdir)/../cgen' - -AC_ARG_ENABLE(cgen-maint, -[ --enable-cgen-maint[=dir] build cgen generated files], -[case "${enableval}" in - yes) cgen_maint=yes ;; - no) cgen_maint=no ;; - *) - # argument is cgen install directory (not implemented yet). - # Having a `share' directory might be more appropriate for the .scm, - # .cpu, etc. files. - cgen_maint=yes - cgendir=${cgen_maint}/lib/cgen - ;; -esac])dnl -AM_CONDITIONAL(CGEN_MAINT, test x${cgen_maint} = xyes) -AC_SUBST(cgendir) - -using_cgen=no - -# Check if linker supports --as-needed and --no-as-needed options -AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed, - [bfd_cv_ld_as_needed=no - if $LD --help 2>/dev/null | grep as-needed > /dev/null; then - bfd_cv_ld_as_needed=yes - fi - ]) - -LT_LIB_M - -#Libs for generator progs -if test "x$cross_compiling" = "xno"; then - BUILD_LIBS=../libiberty/libiberty.a - BUILD_LIB_DEPS=$BUILD_LIBS -else - # if cross-compiling, assume that the system provides -liberty - # and that the version is compatible with new headers. - BUILD_LIBS=-liberty - BUILD_LIB_DEPS= -fi -BUILD_LIBS="$BUILD_LIBS $LIBINTL" -BUILD_LIB_DEPS="$BUILD_LIB_DEPS $LIBINTL_DEP" - -AC_SUBST(BUILD_LIBS) -AC_SUBST(BUILD_LIB_DEPS) - -# Horrible hacks to build DLLs on Windows and a shared library elsewhere. -SHARED_LDFLAGS= -SHARED_LIBADD= -SHARED_DEPENDENCIES= -if test "$enable_shared" = "yes"; then -# When building a shared libopcodes, link against the pic version of libiberty -# so that apps that use libopcodes won't need libiberty just to satisfy any -# libopcodes references. -# We can't do that if a pic libiberty is unavailable since including non-pic -# code would insert text relocations into libopcodes. -# Note that linking against libbfd as we do here, which is itself linked -# against libiberty, may not satisfy all the libopcodes libiberty references -# since libbfd may not pull in the entirety of libiberty. -changequote(,)dnl - x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` -changequote([,])dnl - if test -n "$x"; then - SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" - fi - - case "${host}" in - *-*-cygwin*) - SHARED_LDFLAGS="-no-undefined" - SHARED_LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin" - ;; - *-*-darwin*) - SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.dylib ${SHARED_LIBADD}" - SHARED_DEPENDENCIES="../bfd/libbfd.la" - ;; - *) - case "$host_vendor" in - hp) - SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.sl ${SHARED_LIBADD}" - ;; - *) - SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.so ${SHARED_LIBADD}" - ;; - esac - SHARED_DEPENDENCIES="../bfd/libbfd.la" - ;; - esac - - if test -n "$SHARED_LIBADD"; then - if test -n "$LIBM"; then - if test x"$bfd_cv_ld_as_needed" = xyes; then - # Link against libm only when needed. Put -lc, -lm inside -Wl - # to stop libtool reordering these options. - SHARED_LIBADD="$SHARED_LIBADD -Wl,-lc,--as-needed,`echo $LIBM | sed 's/ /,/g'`,--no-as-needed" - else - SHARED_LIBADD="$SHARED_LIBADD $LIBM" - fi - fi - fi -fi -AC_SUBST(SHARED_LDFLAGS) -AC_SUBST(SHARED_LIBADD) -AC_SUBST(SHARED_DEPENDENCIES) - -# target-specific stuff: - -# Canonicalize the secondary target names. -if test -n "$enable_targets" ; then - for targ in `echo $enable_targets | sed 's/,/ /g'` - do - result=`$ac_config_sub $targ 2>/dev/null` - if test -n "$result" ; then - canon_targets="$canon_targets $result" - else - # Allow targets that config.sub doesn't recognize, like "all". - canon_targets="$canon_targets $targ" - fi - done -fi - -all_targets=false -selarchs= -for targ in $target $canon_targets -do - if test "x$targ" = "xall" ; then - all_targets=true - else - . $srcdir/../bfd/config.bfd - selarchs="$selarchs $targ_archs" - fi -done - -# Utility var, documents generic cgen support files. - -cgen_files="cgen-opc.lo cgen-asm.lo cgen-dis.lo cgen-bitset.lo" - -# We don't do any links based on the target system, just makefile config. - -if test x${all_targets} = xfalse ; then - - # Target architecture .o files. - ta= - - for arch in $selarchs - do - ad=`echo $arch | sed -e s/bfd_//g -e s/_arch//g` - archdefs="$archdefs -DARCH_$ad" - case "$arch" in - bfd_aarch64_arch) ta="$ta aarch64-asm.lo aarch64-dis.lo aarch64-opc.lo aarch64-asm-2.lo aarch64-dis-2.lo aarch64-opc-2.lo" ;; - bfd_alpha_arch) ta="$ta alpha-dis.lo alpha-opc.lo" ;; - bfd_arc_arch) ta="$ta arc-dis.lo arc-opc.lo arc-ext.lo" ;; - bfd_arm_arch) ta="$ta arm-dis.lo" ;; - bfd_avr_arch) ta="$ta avr-dis.lo" ;; - bfd_bfin_arch) ta="$ta bfin-dis.lo" ;; - bfd_cr16_arch) ta="$ta cr16-dis.lo cr16-opc.lo" ;; - bfd_cris_arch) ta="$ta cris-dis.lo cris-opc.lo cgen-bitset.lo" ;; - bfd_crx_arch) ta="$ta crx-dis.lo crx-opc.lo" ;; - bfd_d10v_arch) ta="$ta d10v-dis.lo d10v-opc.lo" ;; - bfd_d30v_arch) ta="$ta d30v-dis.lo d30v-opc.lo" ;; - bfd_dlx_arch) ta="$ta dlx-dis.lo" ;; - bfd_fr30_arch) ta="$ta fr30-asm.lo fr30-desc.lo fr30-dis.lo fr30-ibld.lo fr30-opc.lo" using_cgen=yes ;; - bfd_frv_arch) ta="$ta frv-asm.lo frv-desc.lo frv-dis.lo frv-ibld.lo frv-opc.lo" using_cgen=yes ;; - bfd_moxie_arch) ta="$ta moxie-dis.lo moxie-opc.lo" ;; - bfd_h8300_arch) ta="$ta h8300-dis.lo" ;; - bfd_h8500_arch) ta="$ta h8500-dis.lo" ;; - bfd_hppa_arch) ta="$ta hppa-dis.lo" ;; - bfd_i370_arch) ta="$ta i370-dis.lo i370-opc.lo" ;; - bfd_i386_arch|bfd_l1om_arch|bfd_k1om_arch) - ta="$ta i386-dis.lo i386-opc.lo" ;; - bfd_i860_arch) ta="$ta i860-dis.lo" ;; - bfd_i960_arch) ta="$ta i960-dis.lo" ;; - bfd_ia64_arch) ta="$ta ia64-dis.lo ia64-opc.lo" ;; - bfd_ip2k_arch) ta="$ta ip2k-asm.lo ip2k-desc.lo ip2k-dis.lo ip2k-ibld.lo ip2k-opc.lo" using_cgen=yes ;; - bfd_epiphany_arch) ta="$ta epiphany-asm.lo epiphany-desc.lo epiphany-dis.lo epiphany-ibld.lo epiphany-opc.lo" using_cgen=yes ;; - bfd_iq2000_arch) ta="$ta iq2000-asm.lo iq2000-desc.lo iq2000-dis.lo iq2000-ibld.lo iq2000-opc.lo" using_cgen=yes ;; - bfd_lm32_arch) ta="$ta lm32-asm.lo lm32-desc.lo lm32-dis.lo lm32-ibld.lo lm32-opc.lo lm32-opinst.lo" using_cgen=yes ;; - bfd_m32c_arch) ta="$ta m32c-asm.lo m32c-desc.lo m32c-dis.lo m32c-ibld.lo m32c-opc.lo" using_cgen=yes ;; - bfd_m32r_arch) ta="$ta m32r-asm.lo m32r-desc.lo m32r-dis.lo m32r-ibld.lo m32r-opc.lo m32r-opinst.lo" using_cgen=yes ;; - bfd_m68hc11_arch) ta="$ta m68hc11-dis.lo m68hc11-opc.lo" ;; - bfd_m68hc12_arch) ta="$ta m68hc11-dis.lo m68hc11-opc.lo" ;; - bfd_m9s12x_arch) ta="$ta m68hc11-dis.lo m68hc11-opc.lo" ;; - bfd_m9s12xg_arch) ta="$ta m68hc11-dis.lo m68hc11-opc.lo" ;; - bfd_m68k_arch) ta="$ta m68k-dis.lo m68k-opc.lo" ;; - bfd_m88k_arch) ta="$ta m88k-dis.lo" ;; - bfd_mcore_arch) ta="$ta mcore-dis.lo" ;; - bfd_mep_arch) ta="$ta mep-asm.lo mep-desc.lo mep-dis.lo mep-ibld.lo mep-opc.lo" using_cgen=yes ;; - bfd_metag_arch) ta="$ta metag-dis.lo" ;; - bfd_microblaze_arch) ta="$ta microblaze-dis.lo" ;; - bfd_mips_arch) ta="$ta mips-dis.lo mips-opc.lo mips16-opc.lo micromips-opc.lo" ;; - bfd_mmix_arch) ta="$ta mmix-dis.lo mmix-opc.lo" ;; - bfd_mn10200_arch) ta="$ta m10200-dis.lo m10200-opc.lo" ;; - bfd_mn10300_arch) ta="$ta m10300-dis.lo m10300-opc.lo" ;; - bfd_mt_arch) ta="$ta mt-asm.lo mt-desc.lo mt-dis.lo mt-ibld.lo mt-opc.lo" using_cgen=yes ;; - bfd_msp430_arch) ta="$ta msp430-dis.lo msp430-decode.lo" ;; - bfd_nds32_arch) ta="$ta nds32-asm.lo nds32-dis.lo" ;; - bfd_nios2_arch) ta="$ta nios2-dis.lo nios2-opc.lo" ;; - bfd_ns32k_arch) ta="$ta ns32k-dis.lo" ;; - bfd_or1k_arch) ta="$ta or1k-asm.lo or1k-desc.lo or1k-dis.lo or1k-ibld.lo or1k-opc.lo" using_cgen=yes ;; - bfd_pdp11_arch) ta="$ta pdp11-dis.lo pdp11-opc.lo" ;; - bfd_pj_arch) ta="$ta pj-dis.lo pj-opc.lo" ;; - bfd_powerpc_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;; - bfd_powerpc_64_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;; - bfd_pyramid_arch) ;; - bfd_romp_arch) ;; - bfd_rs6000_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;; - bfd_rl78_arch) ta="$ta rl78-dis.lo rl78-decode.lo";; - bfd_rx_arch) ta="$ta rx-dis.lo rx-decode.lo";; - bfd_s390_arch) ta="$ta s390-dis.lo s390-opc.lo" ;; - bfd_score_arch) ta="$ta score-dis.lo score7-dis.lo" ;; - bfd_sh_arch) - # We can't decide what we want just from the CPU family. - # We want SH5 support unless a specific version of sh is - # specified, as in sh3-elf, sh3b-linux-gnu, etc. - # Include it just for ELF targets, since the SH5 bfd:s are ELF only. - for t in $target $canon_targets; do - case $t in - all | sh5*-* | sh64*-* | sh-*-*elf* | shl*-*-*elf* | \ - sh-*-linux* | shl-*-linux*) - ta="$ta sh64-dis.lo sh64-opc.lo" - archdefs="$archdefs -DINCLUDE_SHMEDIA" - break;; - esac; - done - ta="$ta sh-dis.lo cgen-bitset.lo" ;; - bfd_sparc_arch) ta="$ta sparc-dis.lo sparc-opc.lo" ;; - bfd_spu_arch) ta="$ta spu-dis.lo spu-opc.lo" ;; - bfd_tahoe_arch) ;; - bfd_tic30_arch) ta="$ta tic30-dis.lo" ;; - bfd_tic4x_arch) ta="$ta tic4x-dis.lo" ;; - bfd_tic54x_arch) ta="$ta tic54x-dis.lo tic54x-opc.lo" ;; - bfd_tic6x_arch) ta="$ta tic6x-dis.lo" ;; - bfd_tic80_arch) ta="$ta tic80-dis.lo tic80-opc.lo" ;; - bfd_tilegx_arch) ta="$ta tilegx-dis.lo tilegx-opc.lo" ;; - bfd_tilepro_arch) ta="$ta tilepro-dis.lo tilepro-opc.lo" ;; - bfd_v850_arch) ta="$ta v850-opc.lo v850-dis.lo" ;; - bfd_v850e_arch) ta="$ta v850-opc.lo v850-dis.lo" ;; - bfd_v850ea_arch) ta="$ta v850-opc.lo v850-dis.lo" ;; - bfd_v850_rh850_arch) ta="$ta v850-opc.lo v850-dis.lo" ;; - bfd_vax_arch) ta="$ta vax-dis.lo" ;; - bfd_w65_arch) ta="$ta w65-dis.lo" ;; - bfd_we32k_arch) ;; - bfd_xc16x_arch) ta="$ta xc16x-asm.lo xc16x-desc.lo xc16x-dis.lo xc16x-ibld.lo xc16x-opc.lo" using_cgen=yes ;; - bfd_xgate_arch) ta="$ta xgate-dis.lo xgate-opc.lo" ;; - bfd_xstormy16_arch) ta="$ta xstormy16-asm.lo xstormy16-desc.lo xstormy16-dis.lo xstormy16-ibld.lo xstormy16-opc.lo" using_cgen=yes ;; - bfd_xtensa_arch) ta="$ta xtensa-dis.lo" ;; - bfd_z80_arch) ta="$ta z80-dis.lo" ;; - bfd_z8k_arch) ta="$ta z8k-dis.lo" ;; - - "") ;; - *) AC_MSG_ERROR(*** unknown target architecture $arch) ;; - esac - done - - if test $using_cgen = yes ; then - ta="$ta $cgen_files" - fi - - # Weed out duplicate .o files. - f="" - for i in $ta ; do - case " $f " in - *" $i "*) ;; - *) f="$f $i" ;; - esac - done - ta="$f" - - # And duplicate -D flags. - f="" - for i in $archdefs ; do - case " $f " in - *" $i "*) ;; - *) f="$f $i" ;; - esac - done - archdefs="$f" - - BFD_MACHINES="$ta" - -else # all_targets is true - archdefs=-DARCH_all - BFD_MACHINES='$(ALL_MACHINES)' -fi - -AC_SUBST(archdefs) -AC_SUBST(BFD_MACHINES) - -AC_CONFIG_FILES([Makefile po/Makefile.in:po/Make-in]) -AC_OUTPUT