]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Check for existence of isnan for both sets of compiler flags independently.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 27 Jun 2000 08:10:08 +0000 (08:10 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 27 Jun 2000 08:10:08 +0000 (08:10 +0000)
git-svn-id: https://svn.dealii.org/trunk@3087 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/aclocal.m4
deal.II/configure

index e95daa5208b3ed0a55765d7ad4bfcf76beb00ca1..1cd141ab9ef767358e5da8432feed7b241ebe09b 100644 (file)
@@ -119,13 +119,13 @@ dnl simply declared in <math.h> (or <cmath>, for what it's worth), but
 dnl on Linux for example, it is only declared if we specifically require
 dnl support for ISO C 99. This macro checks whether `isnan' is declared
 dnl or whether we have to pass special compiler flags, namely 
-dnl -D_ISOC99_SOURCE. Note that when checking we have to use the strict
-dnl compiler flags including -ansi -pedantic.
+dnl -D_ISOC99_SOURCE. Note that when checking we have to use the two
+dnl sets of compiler flags.
 dnl
 dnl Usage: DEAL_II_CHECK_ISNAN
 dnl
 AC_DEFUN(DEAL_II_CHECK_ISNAN, dnl
-  AC_MSG_CHECKING(whether isnan is declared)
+  AC_MSG_CHECKING(whether isnan is declared with debug flags)
   AC_REQUIRE([AC_LANG_CPLUSPLUS])
   CXXFLAGS="$CXXFLAGSG"
   AC_TRY_COMPILE(
@@ -142,6 +142,23 @@ AC_DEFUN(DEAL_II_CHECK_ISNAN, dnl
     [
        AC_MSG_RESULT("no")
        CXXFLAGSG="$CXXFLAGSG -D_ISOC99_SOURCE"
+    ])
+  AC_MSG_CHECKING(whether isnan is declared with optimized flags)
+  AC_REQUIRE([AC_LANG_CPLUSPLUS])
+  CXXFLAGS="$CXXFLAGSO"
+  AC_TRY_COMPILE(
+    [
+#include <cmath>
+    ],
+    [
+       double d;
+       isnan (d);
+    ],
+    [
+       AC_MSG_RESULT("yes")
+    ],
+    [
+       AC_MSG_RESULT("no")
        CXXFLAGSO="$CXXFLAGSO -D_ISOC99_SOURCE"
     ])
 )      
index cea4d7128458b27f4e73e6e7facca4f897466b3a..9b8a7ddda3ef0fd34ecdeb1a7923a12e20d52145 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# From configure.in Revision: 1.27 
+# From configure.in Revision: 1.28 
 
 
 
@@ -1518,8 +1518,8 @@ else
 fi
 rm -f conftest*
 
-  echo $ac_n "checking whether isnan is declared""... $ac_c" 1>&6
-echo "configure:1523: checking whether isnan is declared" >&5
+  echo $ac_n "checking whether isnan is declared with debug flags""... $ac_c" 1>&6
+echo "configure:1523: checking whether isnan is declared with debug flags" >&5
   
   CXXFLAGS="$CXXFLAGSG"
   cat > conftest.$ac_ext <<EOF
@@ -1547,6 +1547,37 @@ else
   
        echo "$ac_t"""no"" 1>&6
        CXXFLAGSG="$CXXFLAGSG -D_ISOC99_SOURCE"
+    
+fi
+rm -f conftest*
+  echo $ac_n "checking whether isnan is declared with optimized flags""... $ac_c" 1>&6
+echo "configure:1555: checking whether isnan is declared with optimized flags" >&5
+  
+  CXXFLAGS="$CXXFLAGSO"
+  cat > conftest.$ac_ext <<EOF
+#line 1559 "configure"
+#include "confdefs.h"
+
+#include <cmath>
+    
+int main() {
+
+       double d;
+       isnan (d);
+    
+; return 0; }
+EOF
+if { (eval echo configure:1571: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  
+       echo "$ac_t"""yes"" 1>&6
+    
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  
+       echo "$ac_t"""no"" 1>&6
        CXXFLAGSO="$CXXFLAGSO -D_ISOC99_SOURCE"
     
 fi
@@ -1567,17 +1598,17 @@ esac
 
 
 echo $ac_n "checking for consistency of CXXFLAGSG flags""... $ac_c" 1>&6
-echo "configure:1571: checking for consistency of CXXFLAGSG flags" >&5
+echo "configure:1602: checking for consistency of CXXFLAGSG flags" >&5
 CXXFLAGS="$CXXFLAGSG"
 cat > conftest.$ac_ext <<EOF
-#line 1574 "configure"
+#line 1605 "configure"
 #include "confdefs.h"
 
 int main() {
 ;
 ; return 0; }
 EOF
-if { (eval echo configure:1581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
     echo "$ac_t""yes" 1>&6
@@ -1594,17 +1625,17 @@ fi
 rm -f conftest*
 
 echo $ac_n "checking for consistency of CXXFLAGSO flags""... $ac_c" 1>&6
-echo "configure:1598: checking for consistency of CXXFLAGSO flags" >&5
+echo "configure:1629: checking for consistency of CXXFLAGSO flags" >&5
 CXXFLAGS="$CXXFLAGSO"
 cat > conftest.$ac_ext <<EOF
-#line 1601 "configure"
+#line 1632 "configure"
 #include "confdefs.h"
 
 int main() {
 ;
 ; return 0; }
 EOF
-if { (eval echo configure:1608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
     echo "$ac_t""yes" 1>&6

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.