From: wolf Date: Wed, 1 Jun 2005 13:58:18 +0000 (+0000) Subject: Fix two typos (using CFLAGSO when only CFLAGS is used). Also check X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65fa8425ab1d2243f7e99cc8638dad8b97792c7b;p=dealii-svn.git Fix two typos (using CFLAGSO when only CFLAGS is used). Also check 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 --- diff --git a/deal.II/aclocal.m4 b/deal.II/aclocal.m4 index 449c35f2dc..58e712c54a 100644 --- a/deal.II/aclocal.m4 +++ b/deal.II/aclocal.m4 @@ -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 diff --git a/deal.II/configure b/deal.II/configure index 20e0eb7710..7b3f322fba 100755 --- a/deal.II/configure +++ b/deal.II/configure @@ -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