2006-02-14 Paolo Bonzini <bonzini@gnu.org>
[external/binutils.git] / configure.in
index 1acdb33..785ace8 100644 (file)
@@ -148,10 +148,12 @@ target_libraries="target-libiberty \
                target-libstdc++-v3 \
                target-libmudflap \
                target-libssp \
+               target-libgcc-math \
                target-libgfortran \
                ${libgcj} \
                target-libobjc \
-               target-libada"
+               target-libada \
+               target-libgomp"
 
 # these tools are built using the target libraries, and are intended to
 # run only in the target environment
@@ -315,6 +317,21 @@ if test "${ENABLE_LIBSSP}" != "yes" ; then
   noconfigdirs="$noconfigdirs target-libssp"
 fi
 
+# Set the default so we build libgcc-math for ix86 and x86_64
+AC_ARG_ENABLE(libgcc-math,
+[  --enable-libgcc-math   Builds libgcc-math directory],,
+[
+case "${target}" in
+  i?86-* | x86_64-* )
+    enable_libgcc_math=yes ;;
+  *)
+    enable_libgcc_math=no ;;
+esac
+])
+if test "${enable_libgcc_math}" != "yes"; then
+  noconfigdirs="$noconfigdirs target-libgcc-math"
+fi
+
 # Save it here so that, even in case of --enable-libgcj, if the Java
 # front-end isn't enabled, we still get libgcj disabled.
 libgcj_saved=$libgcj
@@ -341,7 +358,7 @@ no)
     ;;
 "")
     case "${target}" in
-    *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
+    *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
         # Enable libmudflap by default in GNU and friends.
        ;;
     *-*-freebsd*)
@@ -354,6 +371,30 @@ no)
     esac
 esac
 
+# Allow --disable-libgomp to exclude target-libgomp
+case $enable_libgomp in
+yes)
+    ;;
+no)
+    noconfigdirs="$noconfigdirs target-libgomp"
+    ;;
+"")
+    # Enable libgomp by default on hosted POSIX systems.
+    case "${target}" in
+    *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
+       ;;
+    *-*-netbsd* | *-*-freebsd* | *-*-openbsd*)
+       ;;
+    *-*-solaris2* | *-*-sysv4* | *-*-irix* | *-*-osf* | *-*-hpux*)
+       ;;
+    *-*-darwin* | *-*-aix*)
+       ;;
+    *)
+       noconfigdirs="$noconfigdirs target-libgomp"
+       ;;
+    esac
+esac
+
 
 case "${target}" in
   *-*-chorusos)