bfd:
[deliverable/binutils-gdb.git] / bfd / configure.in
index 0755226c255a6a1bf86f1c65b411213f78f38d31..a4444185fd37385df6b9a83f1cf5ea0b0da578de 100644 (file)
@@ -8,18 +8,40 @@ AC_CONFIG_SRCDIR([libbfd.c])
 AC_CANONICAL_TARGET
 AC_ISC_POSIX
 
-AM_INIT_AUTOMAKE(bfd, 2.17.50)
+AM_INIT_AUTOMAKE(bfd, 2.19.51)
 
-dnl These must be called before AM_PROG_LIBTOOL, because it may want
+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.
-AM_DISABLE_SHARED
+AC_DISABLE_SHARED
 
-AM_PROG_LIBTOOL
+AC_PROG_CC
+AC_GNU_SOURCE
+AC_USE_SYSTEM_EXTENSIONS
+
+case "${target}" in
+changequote(,)dnl
+  sparc-*-solaris*|i[3-7]86-*-solaris*)
+changequote([,])dnl
+    # On native 32bit sparc and ia32 solaris, large-file and procfs support
+    # are mutually exclusive; and without procfs support, the elf module
+    # cannot provide certain routines such as elfcore_write_prpsinfo
+    # or elfcore_write_prstatus.  So unless the user explicitly requested
+    # large-file support through the --enable-largefile switch, disable
+    # large-file support in favor of procfs support.
+    if test "${target}" = "${host}" -a "$enable_largefile" != 'yes'; then
+      enable_largefile="no"
+    fi
+    ;;
+esac
+
+AC_SYS_LARGEFILE
+
+LT_INIT
 
 AC_ARG_ENABLE(64-bit-bfd,
 [  --enable-64-bit-bfd     64-bit support (on hosts with narrower word sizes)],
@@ -28,6 +50,7 @@ AC_ARG_ENABLE(64-bit-bfd,
   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
@@ -36,13 +59,7 @@ AC_ARG_ENABLE(targets,
   no)       enable_targets= ;;
   *)        enable_targets=$enableval ;;
 esac])dnl
-AC_ARG_ENABLE(commonbfdlib,
-[  --enable-commonbfdlib   build shared BFD/opcodes/libiberty library],
-[case "${enableval}" in
-  yes) commonbfdlib=true ;;
-  no)  commonbfdlib=false ;;
-  *)   AC_MSG_ERROR([bad value ${enableval} for BFD commonbfdlib option]) ;;
-esac])dnl
+
 AC_ARG_WITH(mmap,
 [  --with-mmap             try using mmap for BFD input files if available],
 [case "${withval}" in
@@ -63,22 +80,39 @@ if test $use_secureplt = true; then
     [Define if we should default to creating read-only plt entries])
 fi
 
-# Package version.  For an official FSF release, it is empty.
-AC_ARG_WITH(pkgversion,
-  AS_HELP_STRING([--with-pkgversion=PKG],
-                 [Add PKG to the version string]),
-  [case "$withval" in
-    yes) AC_MSG_ERROR([package version not specified]) ;;
-    no)  PKGVERSION= ;;
-    *)   PKGVERSION="($withval) " ;;
-   esac],
-  PKGVERSION=
-)
-AC_SUBST(PKGVERSION)
+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
 
-AM_CONFIG_HEADER(config.h:config.in)
+AC_CONFIG_HEADERS(config.h:config.in)
 
 if test -z "$target" ; then
     AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
@@ -95,10 +129,7 @@ bfd_default_target_size=32
 
 # host stuff:
 
-AC_PROG_CC
-AC_GNU_SOURCE
-
-ALL_LINGUAS="fr tr ja es sv da zh_CN ro rw vi"
+ALL_LINGUAS="fr tr ja es sv da zh_CN ro rw vi fi id"
 ZW_GNU_GETTEXT_SISTER_DIR
 AM_PO_SUBDIRS
 
@@ -109,29 +140,31 @@ AC_SUBST(HDEFINES)
 AC_PROG_INSTALL
 
 BFD_HOST_64BIT_LONG=0
-BFD_HOST_LONG_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_MSG_CHECKING([for long long])
-AC_CACHE_VAL(bfd_cv_has_long_long,
-[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[unsigned long long ll = 18446744073709551615ULL;]])],[bfd_cv_has_long_long=yes],[bfd_cv_has_long_long=no])])
-AC_MSG_RESULT($bfd_cv_has_long_long)
-if test $bfd_cv_has_long_long = yes; then
-  BFD_HOST_LONG_LONG=1
-  AC_CHECK_SIZEOF(long 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
 
-AC_CHECK_SIZEOF(long)
 if test "x${ac_cv_sizeof_long}" = "x8"; then
-  host64=true
   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
@@ -141,19 +174,21 @@ if test -n "${HOST_64BIT_TYPE}" -a -n "${HOST_U_64BIT_TYPE}"; then
 fi
 
 AC_SUBST(BFD_HOST_64BIT_LONG)
-AC_SUBST(BFD_HOST_LONG_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(stddef.h string.h strings.h stdlib.h time.h unistd.h)
+AC_CHECK_HEADERS(alloca.h stddef.h string.h strings.h stdlib.h time.h unistd.h)
 AC_CHECK_HEADERS(fcntl.h sys/file.h sys/time.h)
+GCC_HEADER_STDINT(bfd_stdint.h)
 AC_HEADER_TIME
 AC_HEADER_DIRENT
 ACX_HEADER_STRING
-AC_CHECK_FUNCS(fcntl getpagesize setitimer sysconf fdopen getuid getgid)
+AC_CHECK_FUNCS(fcntl getpagesize setitimer sysconf fdopen getuid getgid fileno)
 AC_CHECK_FUNCS(strtoull)
 
 AC_CHECK_DECLS(basename)
@@ -174,6 +209,10 @@ AC_CHECK_DECLS(strstr)
 AC_CHECK_DECLS(snprintf)
 AC_CHECK_DECLS(vsnprintf)
 
+# Link in zlib if we can.  This allows us to read compressed debug sections.
+# This is used only by compress.c.
+AC_SEARCH_LIBS(zlibVersion, z, [AC_CHECK_HEADERS(zlib.h)])
+
 # If we are configured native, pick a core file support file.
 COREFILE=
 COREFLAG=
@@ -236,7 +275,7 @@ changequote([,])dnl
        TRAD_HEADER='"hosts/i386bsd.h"'
        ;;
 changequote(,)dnl
-  i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu)
+  i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu | i[3-7]86-*-dragonfly*)
 changequote([,])dnl
        COREFILE=''
        TRAD_HEADER='"hosts/i386bsd.h"'
@@ -455,39 +494,31 @@ if test -n "$TRAD_HEADER"; then
     [Name of host specific header file to include in trad-core.c.])
 fi
 
-# Horrible hacks to build DLLs on Windows.
-WIN32LDFLAGS=
-WIN32LIBADD=
-case "${host}" in
-*-*-cygwin*)
-  if test "$enable_shared" = "yes"; then
-    WIN32LDFLAGS="-no-undefined"
-    WIN32LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32"
-  fi
-  ;;
-*-*-linux*)
-  # We borrow WIN32LIBADD so that the shared libbfd won't depend on
-  # libiberty.a.
-  case "${host}" in
-  mips*-*-linux*)
-    # Linux/MIPS uses PIC by default.
-    if test "$enable_shared" = "yes"; then
-      WIN32LIBADD="-L../libiberty -liberty"
-    fi
-    ;;
-  *)
+# 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'`
+  x=`sed -n -e 's/^[   ]*PICFLAG[      ]*=[    ]*//p' < ../libiberty/Makefile | sed -n '$p'`
 changequote([,])dnl
-    if test -n "$x"; then
-      WIN32LIBADD="-L../libiberty/pic -liberty"
-    fi
+  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"
   ;;
   esac
-  ;;
-esac
-AC_SUBST(WIN32LDFLAGS)
-AC_SUBST(WIN32LIBADD)
+fi
+AC_SUBST(SHARED_LDFLAGS)
+AC_SUBST(SHARED_LIBADD)
 
 # target stuff:
 
@@ -570,7 +601,7 @@ selarchs="$f"
 # Target backend .o files.
 tb=
 
-elf="elf.lo elflink.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo"
+elf="elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo"
 
 for vec in $selvecs
 do
@@ -603,7 +634,14 @@ do
     b_out_vec_big_host)                tb="$tb bout.lo aout32.lo" ;;
     b_out_vec_little_host)     tb="$tb bout.lo aout32.lo" ;;
     bfd_efi_app_ia32_vec)      tb="$tb efi-app-ia32.lo peigen.lo cofflink.lo" ;;
+    bfd_efi_bsdrv_ia32_vec)    tb="$tb efi-bsdrv-ia32.lo peigen.lo cofflink.lo" ;;
+    bfd_efi_rtdrv_ia32_vec)    tb="$tb efi-rtdrv-ia32.lo peigen.lo cofflink.lo" ;;
+    bfd_efi_app_x86_64_vec)    tb="$tb efi-app-x86_64.lo pex64igen.lo cofflink.lo" ;target_size=64;;
+    bfd_efi_bsdrv_x86_64_vec)  tb="$tb efi-bsdrv-x86_64.lo pex64igen.lo cofflink.lo" ;target_size=64;;
+    bfd_efi_rtdrv_x86_64_vec)  tb="$tb efi-rtdrv-x86_64.lo pex64igen.lo cofflink.lo" ;target_size=64;;
     bfd_efi_app_ia64_vec)      tb="$tb efi-app-ia64.lo pepigen.lo cofflink.lo"; target_size=64 ;;
+    bfd_efi_bsdrv_ia64_vec)    tb="$tb efi-bsdrv-ia64.lo pepigen.lo cofflink.lo"; target_size=64 ;;
+    bfd_efi_rtdrv_ia64_vec)    tb="$tb efi-rtdrv-ia64.lo pepigen.lo cofflink.lo"; target_size=64 ;;
     bfd_elf32_am33lin_vec)     tb="$tb elf32-am33lin.lo elf32.lo $elf" ;;
     bfd_elf32_avr_vec)         tb="$tb elf32-avr.lo elf32.lo $elf" ;;
     bfd_elf32_bfin_vec)                tb="$tb elf32-bfin.lo elf32.lo $elf" ;;
@@ -618,6 +656,7 @@ do
     bfd_elf32_bigmips_vec)     tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
     bfd_elf32_bigmips_vxworks_vec)
                                tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
+    bfd_elf32_cr16_vec)                tb="$tb elf32-cr16.lo elf32.lo $elf" ;;
     bfd_elf32_cr16c_vec)       tb="$tb elf32-cr16c.lo elf32.lo $elf" ;;
     bfd_elf32_cris_vec)                tb="$tb elf32-cris.lo elf32.lo $elf" ;;
     bfd_elf32_crx_vec)          tb="$tb elf32-crx.lo elf32.lo $elf" ;;    
@@ -632,6 +671,8 @@ do
     bfd_elf32_hppa_nbsd_vec)   tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
     bfd_elf32_hppa_vec)                tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
     bfd_elf32_i370_vec)                tb="$tb elf32-i370.lo elf32.lo $elf" ;;
+    bfd_elf32_i386_dragonfly_vec)
+                               tb="$tb elf32-i386.lo elf-vxworks.lo elf32.lo $elf" ;;
     bfd_elf32_i386_freebsd_vec)        tb="$tb elf32-i386.lo elf-vxworks.lo elf32.lo $elf" ;;
     bfd_elf32_i386_vxworks_vec)        tb="$tb elf32-i386.lo elf-vxworks.lo elf32.lo $elf" ;;
     bfd_elf32_i386_vec)                tb="$tb elf32-i386.lo elf-vxworks.lo elf32.lo $elf" ;;
@@ -642,6 +683,8 @@ do
     bfd_elf32_ia64_hpux_big_vec) tb="$tb elf32-ia64.lo elf32.lo $elf";;
     bfd_elf32_ip2k_vec)                tb="$tb elf32-ip2k.lo elf32.lo $elf" ;;
     bfd_elf32_iq2000_vec)       tb="$tb elf32-iq2000.lo elf32.lo $elf" ;;
+    bfd_elf32_lm32_vec)         tb="$tb elf32-lm32.lo elf32.lo $elf" ;;
+    bfd_elf32_lm32fdpic_vec)         tb="$tb elf32-lm32.lo elf32.lo $elf" ;;
     bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
     bfd_elf32_littlearc_vec)   tb="$tb elf32-arc.lo elf32.lo $elf" ;;
     bfd_elf32_littlearm_symbian_vec)
@@ -722,6 +765,7 @@ do
     bfd_elf64_ia64_big_vec)    tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_ia64_hpux_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_ia64_little_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_ia64_vms_vec)    tb="$tb elf64-ia64.lo elf64.lo $elf vmsutil.lo"; target_size=64 ;;
     bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_littlemips_vec)  tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
     bfd_elf64_mmix_vec)        tb="$tb elf64-mmix.lo elf64.lo $elf" target_size=64 ;;
@@ -1019,10 +1063,11 @@ sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' \
     -e "s,@GMOFILES@,$GMOFILES," \
     po/Makefile.in > po/Makefile]],[[]])
 
-dnl Required by html and install-html
+dnl Required by html, pdf, install-pdf and install-html
 AC_SUBST(datarootdir)
 AC_SUBST(docdir)
 AC_SUBST(htmldir)
+AC_SUBST(pdfdir)
 
 AC_OUTPUT
 
This page took 0.028163 seconds and 4 git commands to generate.