* config.bfd, configure.in: Add dvp support.
[binutils-gdb.git] / bfd / configure.in
index 7d2d97b03d692e565fe0848bc368e62b1f6b8763..33d2ac8038d91e0b9da72fbf13f32ad21733ec65 100644 (file)
@@ -1,5 +1,13 @@
 dnl Process this file with autoconf to produce a configure script.
 dnl
+
+dnl Default to a non shared library.  This may be overridden by the
+dnl configure option --enable-shared.  The divert stuff is a hack
+dnl to set the variable before argument parsing is done.
+divert(AC_DIVERSION_INIT)
+enable_shared=no
+divert(-1)
+
 AC_PREREQ(2.5)
 AC_INIT(libbfd.c)
 
@@ -8,115 +16,10 @@ AC_ISC_POSIX
 
 AM_INIT_AUTOMAKE(bfd, 2.8.2)
 
-dnl This is a copy of AM_PROG_LIBTOOL from libtool 1.0, modified to
-dnl not produce a shared library by default.
-AC_DEFUN(AM_PROG_LIBTOOL,
-[AC_REQUIRE([AC_CANONICAL_HOST])
-AC_REQUIRE([AC_PROG_CC])
-AC_REQUIRE([AC_PROG_RANLIB])
-AC_REQUIRE([AM_PROG_LD])
-AC_REQUIRE([AC_PROG_LN_S])
-
-# Always use our own libtool.
-LIBTOOL='$(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)
-
-dnl Allow the --disable-shared flag to stop us from building shared libs.
-AC_ARG_ENABLE(shared,
-[  --enable-shared         build shared libraries [default=yes]],
-test "$enableval" = no && libtool_shared=" --disable-shared",
-libtool_shared=--disable-shared)
-
-dnl Allow the --disable-static flag to stop us from building static libs.
-AC_ARG_ENABLE(static,
-[  --enable-static         build static libraries [default=yes]],
-test "$enableval" = no && libtool_static=" --disable-static",
-libtool_static=)
-
-libtool_flags="$libtool_shared$libtool_static"
-test "$silent" = yes && libtool_flags="$libtool_flags --silent"
-test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
-test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-[case "$host" in
-*-*-irix6*)
-  for f in '-32' '-64' '-cckr' '-n32' '-mips1' '-mips2' '-mips3' '-mips4'; do
-    if echo " $CC $CFLAGS " | egrep -e "[      ]$f[     ]" > /dev/null; then
-      LD="${LD-ld} $f"
-    fi
-  done
-  ;;
-
-*-*-sco3.2v5*)
-  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
-  CFLAGS="$CFLAGS -belf"
-  ;;
-esac]
-
-# Actually configure libtool.  ac_aux_dir is where install-sh is found.
-CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-LD="$LD" RANLIB="$RANLIB" LN_S="$LN_S" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
-|| AC_MSG_ERROR([libtool configure failed])
-])
-
-# AM_PROG_LD - find the path to the GNU or non-GNU linker
-AC_DEFUN(AM_PROG_LD,
-[AC_ARG_WITH(gnu-ld,
-[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-if test "$with_gnu_ld" = yes; then
-  AC_MSG_CHECKING([for GNU ld])
-else
-  AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(ac_cv_path_LD,
-[case "$LD" in
-  /*)
-  ac_cv_path_LD="$LD" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f "$ac_dir/ld"; then
-      ac_cv_path_LD="$ac_dir/ld"
-      # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some GNU ld's only accept -v.
-      # Break only if it was the GNU/non-GNU ld that we prefer.
-      if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU ld|with BFD)' > /dev/null; then
-       test "$with_gnu_ld" = yes && break
-      else
-        test "$with_gnu_ld" != yes && break
-      fi
-    fi
-  done
-  IFS="$ac_save_ifs"
-  ;;
-esac])
-LD="$ac_cv_path_LD"
-if test -n "$LD"; then
-  AC_MSG_RESULT($LD)
-else
-  AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_SUBST(LD)
-AM_PROG_LD_GNU
-])
-
-AC_DEFUN(AM_PROG_LD_GNU,
-[AC_CACHE_CHECK([whether we are using GNU ld], ac_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU ld|with BFD)' > /dev/null; then
-  ac_cv_prog_gnu_ld=yes
-else
-  ac_cv_prog_gnu_ld=no
-fi])
-])
+dnl These must be called before AM_PROG_LIBTOOL, because it may want
+dnl to call AC_CHECK_PROG.
+AC_CHECK_TOOL(AR, ar)
+AC_CHECK_TOOL(RANLIB, ranlib, :)
 
 AM_PROG_LIBTOOL
 
@@ -172,9 +75,7 @@ AC_PROG_CC
 . ${srcdir}/configure.host
 
 AC_SUBST(HDEFINES)
-AC_CHECK_TOOL(AR, ar)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-AC_PROG_INSTALL
+AM_PROG_INSTALL
 
 BFD_HOST_64BIT_LONG=0
 BFD_HOST_64_BIT_DEFINED=0
@@ -360,6 +261,10 @@ changequote([,])dnl
   sparc-*-netbsd* | sparc-*-openbsd*)
        COREFILE=netbsd-core.lo
        ;;
+  sparc*-*-linux*)
+       COREFILE=trad-core.lo
+       AC_DEFINE(TRAD_HEADER,"hosts/sparclinux.h")
+       ;;
   tahoe-*-*)
        COREFILE=trad-core.lo
        AC_DEFINE(TRAD_HEADER,"hosts/tahoe.h")
@@ -461,6 +366,11 @@ for i in $selvecs ; do
 done
 selvecs="$f"
 
+# start-sanitize-sky
+# dvp is really mips, but we need to distinguish it from mips for opcodes
+selarchs=`echo $selarchs | sed -e s/dvp/mips/g`
+# end-sanitize-sky
+
 # uniq the architectures in all the configured targets.
 f=""
 for i in $selarchs ; do
@@ -474,7 +384,7 @@ selarchs="$f"
 # Target backend .o files.
 tb=
 
-elf="elf.lo elflink.lo"
+elf="elflink.lo dwarf2.lo"
 
 for vec in $selvecs
 do
@@ -499,10 +409,8 @@ do
     b_out_vec_little_host)     tb="$tb bout.lo aout32.lo" ;;
     bfd_elf64_alpha_vec)       tb="$tb elf64-alpha.lo elf64.lo $elf"
                                target64=true ;;
-# start-sanitize-arc
     bfd_elf32_littlearc_vec)   tb="$tb elf32-arc.lo elf32.lo $elf" ;;
     bfd_elf32_bigarc_vec)      tb="$tb elf32-arc.lo elf32.lo $elf" ;;
-# end-sanitize-arc
     bfd_elf32_big_generic_vec)         tb="$tb elf32-gen.lo elf32.lo $elf" ;;
     bfd_elf32_bigmips_vec)     tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
     bfd_elf64_bigmips_vec)     tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"
@@ -528,9 +436,7 @@ do
     bfd_elf32_sh_vec)          tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
     bfd_elf32_shl_vec)         tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
     bfd_elf32_sparc_vec)       tb="$tb elf32-sparc.lo elf32.lo $elf" ;;
-# start-sanitize-v850
     bfd_elf32_v850_vec)                tb="$tb elf32-v850.lo elf32.lo $elf" ;;
-# end-sanitize-v850
     bfd_elf64_big_generic_vec)         tb="$tb elf64-gen.lo elf64.lo $elf"
                                target64=true ;;
     bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"
@@ -546,7 +452,7 @@ do
     ecoffalpha_little_vec)     tb="$tb coff-alpha.lo ecoff.lo ecofflink.lo"
                                target64=true ;;
     go32coff_vec)              tb="$tb coff-go32.lo cofflink.lo" ;;
-    go32stubbedcoff_vec)       tb="$tb coff-stubgo32.lo cofflink.lo" ;;
+    go32stubbedcoff_vec)       tb="$tb coff-stgo32.lo cofflink.lo" ;;
     evax_alpha_vec)            tb="$tb evax-alpha.lo evax-emh.lo evax-egsd.lo evax-etir.lo evax-misc.lo"
                                target64=true ;;
     h8300coff_vec)             tb="$tb coff-h8300.lo reloc16.lo" ;;
@@ -600,6 +506,8 @@ do
     ppcboot_vec)               tb="$tb ppcboot.lo" ;;
     shcoff_vec)                        tb="$tb coff-sh.lo cofflink.lo" ;;
     shlcoff_vec)               tb="$tb coff-sh.lo cofflink.lo" ;;
+    shcoff_small_vec)          tb="$tb coff-sh.lo cofflink.lo" ;;
+    shlcoff_small_vec)         tb="$tb coff-sh.lo cofflink.lo" ;;
     som_vec)                   tb="$tb som.lo" ;;
     sparcle_aout_vec)          tb="$tb aout-sparcle.lo aout32.lo" ;;
     sparclinux_vec)            tb="$tb sparclinux.lo aout32.lo stab-syms.lo" ;;