OSDN Git Service

2006-02-01 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 1 Feb 2006 10:30:43 +0000 (10:30 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 1 Feb 2006 10:30:43 +0000 (10:30 +0000)
        PR bootstrap/26055
* configure.ac: Disable libgcc-math if we cannot mix
declaration of __isinf and math.h inclusion.
* configure: Re-generate.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110469 138bc75d-0d04-0410-961f-82ee72b054a4

libgcc-math/ChangeLog
libgcc-math/configure
libgcc-math/configure.ac

index b9f9a21..f36e1cc 100644 (file)
@@ -1,3 +1,10 @@
+2006-02-01  Richard Guenther  <rguenther@suse.de>
+
+       PR bootstrap/26055
+       * configure.ac: Disable libgcc-math if we cannot mix
+       declaration of __isinf and math.h inclusion.
+       * configure: Re-generate.
+
 2006-01-31  Richard Guenther  <rguenther@suse.de>
        Paolo Bonzini  <bonzini@gnu.org>
 
index 1480acf..43833fa 100755 (executable)
@@ -4573,6 +4573,73 @@ else
 fi
 
 
+# Check for target library dependencies
+cannot_build=no
+
+echo "$as_me:$LINENO: checking whether math.h conflicts with defining __isinf" >&5
+echo $ECHO_N "checking whether math.h conflicts with defining __isinf... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include "math.h"
+int __isinf (double x)
+{
+}
+
+int
+main ()
+{
+
+return __isinf (1.0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+cannot_build=yes
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+
+
 # Now check which parts we include in the library.
 
 arch_subdirs=
@@ -4590,6 +4657,9 @@ esac
 
 
 
+if test "$cannot_build" = "yes"; then
+  arch_subdirs=
+fi
 
 
 if test "x$arch_subdirs" != x; then
index 3928552..7fa9e72 100644 (file)
@@ -124,6 +124,25 @@ else
 fi
 
 
+# Check for target library dependencies
+cannot_build=no
+
+AC_MSG_CHECKING([whether math.h conflicts with defining __isinf])
+AC_TRY_LINK([
+#include "math.h"
+int __isinf (double x)
+{
+}
+], [
+return __isinf (1.0);
+], [
+AC_MSG_RESULT([no])
+], [
+AC_MSG_RESULT([yes])
+cannot_build=yes
+])
+
+
 # Now check which parts we include in the library.
 
 arch_subdirs=
@@ -141,6 +160,9 @@ esac
 AC_SUBST(arch_subdirs)
 AC_SUBST(arch_libraries)
 AC_SUBST(arch_maps)
+if test "$cannot_build" = "yes"; then
+  arch_subdirs=
+fi
 AM_CONDITIONAL(BUILD_LIBGCC_MATH, [test "x$arch_subdirs" != x])