CXXFLAGSO="$CXXFLAGSO -opt_report_levelmin"
fi
- dnl For icc 7 and above, add this warning inhibition flag:
- dnl #1572: `floating-point equality and inequality comparisons are
- dnl unreliable'
- dnl (while true, this warning also triggers on comparisons
- dnl with zero, or comparing two variables for which one is
- dnl greater; there is about no way to write numeric code
- dnl without triggering this warning many times over)
- if test "x$GXX_VERSION" != "xintel_icc5" \
- -a "x$GXX_VERSION" != "xintel_icc6"; then
- CXXFLAGSG="$CXXFLAGSG -wd1572"
- fi
+ dnl Some versions of icc on some platforms issue a lot of warnings
+ dnl about the unreliability of floating point comparisons. Check
+ dnl whether we can switch that off
+ DEAL_II_ICC_WD_1572
dnl We would really like to use -ansi -Xc, since that
dnl is _very_ picky about standard C++, and is thus very efficient
+dnl -------------------------------------------------------------
+dnl Some versions of icc on some platforms issue a lot of warnings
+dnl about the unreliability of floating point comparisons. Check
+dnl whether we can switch that off by checking whether the compiler
+dnl allows -wdXXXX for this warning:
+dnl #1572: `floating-point equality and inequality comparisons are
+dnl unreliable'
+dnl (while true, this warning also triggers on comparisons
+dnl with zero, or comparing two variables for which one is
+dnl greater; there is about no way to write numeric code
+dnl without triggering this warning many times over)
+dnl
+dnl Usage: DEAL_II_ICC_WD_1572
+dnl
+dnl -------------------------------------------------------------
+AC_DEFUN(DEAL_II_ICC_WD_1572, dnl
+[
+ AC_MSG_CHECKING(whether -wd1572 is allowed)
+ AC_LANG(C++)
+ CXXFLAGS="$CXXFLAGSG -wd1572"
+ AC_TRY_COMPILE( [], [],
+ [
+ AC_MSG_RESULT(yes)
+ CXXFLAGSG="$CXXFLAGSG -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
;;
intel_icc*)
- CXXFLAGSG="$CXXFLAGS -Kc++eh -Krtti -w1 -wd175 -wd525 -wd327 -wd424 -wd11 -wd1572 -wd734 -wd858 -DDEBUG -inline_debug_info"
+ CXXFLAGSG="$CXXFLAGS -Kc++eh -Krtti -w1 -wd175 -wd525 -wd327 -wd424 -wd11 -wd734 -wd858 -DDEBUG -inline_debug_info"
CXXFLAGSO="$CXXFLAGS -Kc++eh -Krtti -O2 -unroll -w0 -wd424 -wd11"
CXXFLAGSPIC="-KPIC"
LDFLAGSPIC="-KPIC"
CXXFLAGSO="$CXXFLAGSO -opt_report_levelmin"
fi
+
+ echo "$as_me:$LINENO: checking whether -wd1572 is allowed" >&5
+echo $ECHO_N "checking whether -wd1572 is allowed... $ECHO_C" >&6
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ CXXFLAGS="$CXXFLAGSG -wd1572"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end 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>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_cxx_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_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
+ CXXFLAGSG="$CXXFLAGSG -wd1572"
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
if test "x$GXX_VERSION" = "xintel_icc7"; then
CXXFLAGSG="$CXXFLAGSG -Xc -ansi"
CXXFLAGSO="$CXXFLAGSO -ansi_alias"