From: wolf Date: Thu, 3 Jul 2003 19:20:37 +0000 (+0000) Subject: Check for compilers disguising as gcc, even though they are not. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4126a8628389b3670caf5eb35fc68d2db3f0a871;p=dealii-svn.git Check for compilers disguising as gcc, even though they are not. git-svn-id: https://svn.dealii.org/trunk@7844 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/aclocal.m4 b/deal.II/aclocal.m4 index 18b518dbde..d61f403304 100644 --- a/deal.II/aclocal.m4 +++ b/deal.II/aclocal.m4 @@ -24,6 +24,18 @@ dnl dnl ------------------------------------------------------------- AC_DEFUN(DEAL_II_DETERMINE_CXX_BRAND, dnl [ + dnl It used to be the case that AC_PROG_CXX could properly detect + dnl whether we are working with gcc or not, but then Intel came across + dnl the brilliant idea to disguise it's compiler as gcc by setting + dnl GCC preprocessor variables for versions etc. So we have to figure + dnl out again whether this is really gcc + if test "$GXX" = "yes" ; then + GXX_VERSION_STRING=`($CXX -v 2>&1) | grep "gcc version"` + if test "x$GXX_VERSION_STRING" = "x" ; then + GXX=no + fi + fi + if test "$GXX" = yes ; then dnl find out the right version GXX_VERSION_STRING=`($CXX -v 2>&1) | grep "gcc version"` @@ -117,6 +129,7 @@ AC_DEFUN(DEAL_II_DETERMINE_CXX_BRAND, dnl version5="`echo $is_intel_icc | grep 'Version 5'`" version6="`echo $is_intel_icc | grep 'Version 6'`" version7="`echo $is_intel_icc | grep 'Version 7'`" + version8="`echo $is_intel_icc | grep 'Version 8'`" if test "x$version5" != "x" ; then AC_MSG_RESULT(C++ compiler is Intel ICC 5) GXX_VERSION=intel_icc5 @@ -126,10 +139,13 @@ AC_DEFUN(DEAL_II_DETERMINE_CXX_BRAND, dnl else if test "x$version7" != "x" ; then AC_MSG_RESULT(C++ compiler is Intel ICC 7) GXX_VERSION=intel_icc7 + else if test "x$version8" != "x" ; then + AC_MSG_RESULT(C++ compiler is Intel ICC 8) + GXX_VERSION=intel_icc8 else AC_MSG_RESULT(C++ compiler is Intel ICC) GXX_VERSION=intel_icc - fi fi fi + fi fi fi fi else dnl Or DEC's cxx compiler? diff --git a/deal.II/configure b/deal.II/configure index 3216e5f13e..d066bb61e1 100755 --- a/deal.II/configure +++ b/deal.II/configure @@ -2672,6 +2672,13 @@ fi + if test "$GXX" = "yes" ; then + GXX_VERSION_STRING=`($CXX -v 2>&1) | grep "gcc version"` + if test "x$GXX_VERSION_STRING" = "x" ; then + GXX=no + fi + fi + if test "$GXX" = yes ; then GXX_VERSION_STRING=`($CXX -v 2>&1) | grep "gcc version"` case "$GXX_VERSION_STRING" in @@ -2762,6 +2769,7 @@ echo "${ECHO_T}C++ compiler is MIPSpro C++ compiler" >&6 version5="`echo $is_intel_icc | grep 'Version 5'`" version6="`echo $is_intel_icc | grep 'Version 6'`" version7="`echo $is_intel_icc | grep 'Version 7'`" + version8="`echo $is_intel_icc | grep 'Version 8'`" if test "x$version5" != "x" ; then echo "$as_me:$LINENO: result: C++ compiler is Intel ICC 5" >&5 echo "${ECHO_T}C++ compiler is Intel ICC 5" >&6 @@ -2774,11 +2782,15 @@ echo "${ECHO_T}C++ compiler is Intel ICC 6" >&6 echo "$as_me:$LINENO: result: C++ compiler is Intel ICC 7" >&5 echo "${ECHO_T}C++ compiler is Intel ICC 7" >&6 GXX_VERSION=intel_icc7 + else if test "x$version8" != "x" ; then + echo "$as_me:$LINENO: result: C++ compiler is Intel ICC 8" >&5 +echo "${ECHO_T}C++ compiler is Intel ICC 8" >&6 + GXX_VERSION=intel_icc8 else echo "$as_me:$LINENO: result: C++ compiler is Intel ICC" >&5 echo "${ECHO_T}C++ compiler is Intel ICC" >&6 GXX_VERSION=intel_icc - fi fi fi + fi fi fi fi else is_dec_cxx="`($CXX -V 2>&1) | grep 'Compaq C++'`" @@ -3097,8 +3109,8 @@ rm -f conftest.$ac_objext conftest.$ac_ext ;; portland_group) - CXXFLAGSG="$CXXFLAGS -DDEBUG -g --display_error_number --diag_suppress 111 --diag_suppress 177 --diag_suppress 175" - CXXFLAGSO="$CXXFLAGS -fast -O2 --display_error_number --diag_suppress 111 --diag_suppress 177 --diag_suppress 175" + CXXFLAGSG="$CXXFLAGS -DDEBUG -g --display_error_number --diag_suppress 111 --diag_suppress 177 --diag_suppress 175 --diag_suppress 284" + CXXFLAGSO="$CXXFLAGS -fast -O2 --display_error_number --diag_suppress 111 --diag_suppress 177 --diag_suppress 175 --diag_suppress 284" CXXFLAGSPIC="-Kpic" ;;