]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix two typos (using CFLAGSO when only CFLAGS is used). Also check
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 1 Jun 2005 13:58:18 +0000 (13:58 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 1 Jun 2005 13:58:18 +0000 (13:58 +0000)
whether we can switch off warning 1572 for the icc C compiler.

git-svn-id: https://svn.dealii.org/trunk@10806 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 449c35f2dc94336404559a36b6cd74dcefef9315..58e712c54aebc8d70862abb17279da3c67c57ca7 100644 (file)
@@ -1070,7 +1070,7 @@ AC_DEFUN(DEAL_II_SET_CC_FLAGS, dnl
           ;;
   
       MIPSpro*)
-          CFLAGSO="$CFLAGS -O2"
+          CFLAGS="$CFLAGS -O2"
           CFLAGSPIC="-KPIC"
           ;;
   
@@ -1090,11 +1090,15 @@ AC_DEFUN(DEAL_II_SET_CC_FLAGS, dnl
          dnl flags
          case "$target" in
            *86*)
-               CFLAGSO="$CFLAGS -tpp6"
+               CFLAGS="$CFLAGS -tpp6"
                ;;
          esac
           ;;
 
+         dnl Check whether we can switch off the annoying 1572 warning
+         dnl message about unreliable floating point comparisons
+         DEAL_II_ICC_C_WD_1572
+
       *)
           AC_MSG_RESULT(Unknown C compiler - using generic options)
          CFLAGS="$CFLAGS -O2"
@@ -3604,6 +3608,28 @@ AC_DEFUN(DEAL_II_ICC_WD_1572, dnl
 ])
 
 
+dnl -------------------------------------------------------------
+dnl Some test, but for the icc C compiler.
+dnl
+dnl Usage: DEAL_II_ICC_C_WD_1572
+dnl
+dnl -------------------------------------------------------------
+AC_DEFUN(DEAL_II_ICC_C_WD_1572, dnl
+[
+  AC_MSG_CHECKING(whether -wd1572 is allowed for the C compiler)
+  AC_LANG(C)
+  CFLAGS="$CFLAGS -wd1572"
+  AC_TRY_COMPILE( [], [],
+      [
+        AC_MSG_RESULT(yes)
+       CFLAGS="$CFLAGS -wd1572"
+      ],
+      [
+        AC_MSG_RESULT(no)
+      ])
+])
+
+
 dnl -------------------------------------------------------------
 dnl gcc2.95 doesn't have the std::iterator class, but the standard
 dnl requires it, so check whether we have to work around it
index 20e0eb7710888ab17a30c3ea64a0f1ba2d8d4727..7b3f322fba02816f7a1ed70c0a6583eda8956b1c 100755 (executable)
@@ -3576,6 +3576,7 @@ echo "${ECHO_T}Unrecognized compiler -- still trying" >&6
   fi
 
 
+
     if test "$GCC" = yes ; then
     CFLAGS="$CFLAGS -O3 -funroll-loops -funroll-all-loops -fstrict-aliasing"
                     case "$target" in
@@ -3606,7 +3607,7 @@ echo "${ECHO_T}Unrecognized compiler -- still trying" >&6
           ;;
 
       MIPSpro*)
-          CFLAGSO="$CFLAGS -O2"
+          CFLAGS="$CFLAGS -O2"
           CFLAGSPIC="-KPIC"
           ;;
 
@@ -3622,11 +3623,61 @@ echo "${ECHO_T}Unrecognized compiler -- still trying" >&6
 
                          case "$target" in
            *86*)
-               CFLAGSO="$CFLAGS -tpp6"
+               CFLAGS="$CFLAGS -tpp6"
                ;;
          esac
           ;;
 
+
+  echo "$as_me:$LINENO: checking whether -wd1572 is allowed for the C compiler" >&5
+echo $ECHO_N "checking whether -wd1572 is allowed for the C compiler... $ECHO_C" >&6
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+  CFLAGS="$CFLAGS -wd1572"
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (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: yes" >&5
+echo "${ECHO_T}yes" >&6
+       CFLAGS="$CFLAGS -wd1572"
+
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+
+        echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+
       *)
           echo "$as_me:$LINENO: result: Unknown C compiler - using generic options" >&5
 echo "${ECHO_T}Unknown C compiler - using generic options" >&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.