bfd/
[deliverable/binutils-gdb.git] / bfd / configure.in
index b7946e7a53eae0832e757376c4101c7f48e9ee4c..0d1f5c93dc6d354e18009c2b0d7ad16ec0081e0a 100644 (file)
@@ -31,6 +31,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
@@ -39,6 +40,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
@@ -46,6 +48,7 @@ AC_ARG_ENABLE(commonbfdlib,
   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
@@ -67,13 +70,32 @@ if test $use_secureplt = true; then
 fi
 
 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/])
 
@@ -96,7 +118,7 @@ bfd_default_target_size=32
 
 # host stuff:
 
-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"
 ZW_GNU_GETTEXT_SISTER_DIR
 AM_PO_SUBDIRS
 
@@ -108,39 +130,30 @@ AC_PROG_INSTALL
 
 BFD_HOST_64BIT_LONG=0
 BFD_HOST_64BIT_LONG_LONG=0
-BFD_HOST_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)
-fi
-
+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
-  if test "x${ac_cv_sizeof_long}" = "x8"; then
+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"
-    BFD_HOSTPTR_T="unsigned long long"
-  fi
 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
@@ -151,7 +164,6 @@ fi
 
 AC_SUBST(BFD_HOST_64BIT_LONG)
 AC_SUBST(BFD_HOST_64BIT_LONG_LONG)
-AC_SUBST(BFD_HOST_LONG_LONG)
 AC_SUBST(BFD_HOST_64_BIT_DEFINED)
 AC_SUBST(BFD_HOST_64_BIT)
 AC_SUBST(BFD_HOST_U_64_BIT)
@@ -159,7 +171,7 @@ 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
@@ -186,6 +198,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=
@@ -248,7 +264,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"'
@@ -480,22 +496,12 @@ case "${host}" in
 *-*-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
-    ;;
-  *)
 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
-  ;;
-  esac
+  if test -n "$x"; then
+    WIN32LIBADD="-L../libiberty/pic -liberty"
+  fi
   ;;
 esac
 AC_SUBST(WIN32LDFLAGS)
@@ -615,8 +621,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" ;;
@@ -646,6 +658,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" ;;
This page took 0.033968 seconds and 4 git commands to generate.