]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Do the same for detecting g77/gfortran versions.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 16 Apr 2010 14:46:04 +0000 (14:46 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 16 Apr 2010 14:46:04 +0000 (14:46 +0000)
git-svn-id: https://svn.dealii.org/trunk@21000 0785d39b-7218-0410-832d-ea1e28bc413d

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

index b07c8d3ec9e1fbbf87304b9df34a95813bdbce82..7421f33780afe810ba40264e902f3f4cc377e239 100644 (file)
@@ -1396,76 +1396,11 @@ AC_DEFUN(DEAL_II_DETERMINE_F77_BRAND, dnl
            -n "`echo $F77_VERSION_STRING | grep \"gcc version\"`" ; then
       dnl Yes, this is a GNU g77 version. find out the right version
       G77_VERSION_STRING="`($F77 -v 2>&1) | grep \"gcc version\"`"
-      case "$G77_VERSION_STRING" in
-        *version\ 2.95*)
-          AC_MSG_RESULT(F77 compiler is gcc-2.95)
-         F77_VERSION=gcc2.95
-         ;;
-        *version\ 2.96*)
-         AC_MSG_RESULT(F77 compiler is gcc-2.96)
-         F77_VERSION=gcc2.96
-         ;;
-        *version\ 2.97*)
-         AC_MSG_RESULT(F77 compiler is gcc-2.97)
-         F77_VERSION=gcc2.97
-         ;;
-        *version\ 3.0*)
-         AC_MSG_RESULT(F77 compiler is gcc-3.0)
-         F77_VERSION=gcc3.0
-         ;;
-        *version\ 3.1*)
-         AC_MSG_RESULT(F77 compiler is gcc-3.1)
-         F77_VERSION=gcc3.1
-         ;;
-        *version\ 3.2*)
-         AC_MSG_RESULT(F77 compiler is gcc-3.2)
-         F77_VERSION=gcc3.2
-         ;;
-        *version\ 3.3*)
-         AC_MSG_RESULT(F77 compiler is gcc-3.3)
-         F77_VERSION=gcc3.3
-         ;;
-        *version\ 3.4*)
-         AC_MSG_RESULT(F77 compiler is gcc-3.4)
-         F77_VERSION=gcc3.4
-         ;;
-        *version\ 3.5*)
-         AC_MSG_RESULT(F77 compiler is gcc-3.5)
-         F77_VERSION=gcc3.5
-         ;;
-        *version\ 4.0*)
-         AC_MSG_RESULT(F77 compiler is gcc-4.0)
-         F77_VERSION=gcc4.0
-         ;;
-        *version\ 4.1*)
-         AC_MSG_RESULT(F77 compiler is gcc-4.1)
-         F77_VERSION=gcc4.1
-         ;;
-        *version\ 4.2*)
-         AC_MSG_RESULT(F77 compiler is gcc-4.2)
-         F77_VERSION=gcc4.2
-         ;;
-        *version\ 4.3*)
-         AC_MSG_RESULT(F77 compiler is gcc-4.3)
-         F77_VERSION=gcc4.3
-         ;;
-        *version\ 4.4*)
-         AC_MSG_RESULT(F77 compiler is gcc-4.4)
-         F77_VERSION=gcc4.4
-         ;;
-        *version\ 4.5*)
-         AC_MSG_RESULT(F77 compiler is gcc-4.5)
-         F77_VERSION=gcc4.5
-         ;;
-        *version\ 4.6*)
-         AC_MSG_RESULT(F77 compiler is gcc-4.6)
-         F77_VERSION=gcc4.6
-         ;;
-        *)
-         AC_MSG_RESULT(F77 compiler is unknown but accepted gcc version)
-         F77_VERSION=gcc-other
-         ;;
-      esac
+
+      full_version=`echo "$G77_VERSION_STRING" | perl -pi -e 's/.*version (\d\.\d\.\d).*/\1/g;'`
+      F77_VERSION=gcc`echo $full_version | perl -pi -e 's/(\d\.\d).*/\1/g;'`
+
+      AC_MSG_RESULT(F77 compiler is $CC_VERSION)
 
     else
 
index 6ef5ec55a714d5f7b3ae08fadd3ae8d5d1bd00ca..7dced9cf61320852b0ea0d23de9f28e927020c69 100755 (executable)
@@ -11983,93 +11983,12 @@ if test "x$F77" != "x" ; then
     if test -n "`echo $F77_VERSION_STRING | grep \"GNU F77\"`" -o \
            -n "`echo $F77_VERSION_STRING | grep \"gcc version\"`" ; then
             G77_VERSION_STRING="`($F77 -v 2>&1) | grep \"gcc version\"`"
-      case "$G77_VERSION_STRING" in
-        *version\ 2.95*)
-          { $as_echo "$as_me:$LINENO: result: F77 compiler is gcc-2.95" >&5
-$as_echo "F77 compiler is gcc-2.95" >&6; }
-         F77_VERSION=gcc2.95
-         ;;
-        *version\ 2.96*)
-         { $as_echo "$as_me:$LINENO: result: F77 compiler is gcc-2.96" >&5
-$as_echo "F77 compiler is gcc-2.96" >&6; }
-         F77_VERSION=gcc2.96
-         ;;
-        *version\ 2.97*)
-         { $as_echo "$as_me:$LINENO: result: F77 compiler is gcc-2.97" >&5
-$as_echo "F77 compiler is gcc-2.97" >&6; }
-         F77_VERSION=gcc2.97
-         ;;
-        *version\ 3.0*)
-         { $as_echo "$as_me:$LINENO: result: F77 compiler is gcc-3.0" >&5
-$as_echo "F77 compiler is gcc-3.0" >&6; }
-         F77_VERSION=gcc3.0
-         ;;
-        *version\ 3.1*)
-         { $as_echo "$as_me:$LINENO: result: F77 compiler is gcc-3.1" >&5
-$as_echo "F77 compiler is gcc-3.1" >&6; }
-         F77_VERSION=gcc3.1
-         ;;
-        *version\ 3.2*)
-         { $as_echo "$as_me:$LINENO: result: F77 compiler is gcc-3.2" >&5
-$as_echo "F77 compiler is gcc-3.2" >&6; }
-         F77_VERSION=gcc3.2
-         ;;
-        *version\ 3.3*)
-         { $as_echo "$as_me:$LINENO: result: F77 compiler is gcc-3.3" >&5
-$as_echo "F77 compiler is gcc-3.3" >&6; }
-         F77_VERSION=gcc3.3
-         ;;
-        *version\ 3.4*)
-         { $as_echo "$as_me:$LINENO: result: F77 compiler is gcc-3.4" >&5
-$as_echo "F77 compiler is gcc-3.4" >&6; }
-         F77_VERSION=gcc3.4
-         ;;
-        *version\ 3.5*)
-         { $as_echo "$as_me:$LINENO: result: F77 compiler is gcc-3.5" >&5
-$as_echo "F77 compiler is gcc-3.5" >&6; }
-         F77_VERSION=gcc3.5
-         ;;
-        *version\ 4.0*)
-         { $as_echo "$as_me:$LINENO: result: F77 compiler is gcc-4.0" >&5
-$as_echo "F77 compiler is gcc-4.0" >&6; }
-         F77_VERSION=gcc4.0
-         ;;
-        *version\ 4.1*)
-         { $as_echo "$as_me:$LINENO: result: F77 compiler is gcc-4.1" >&5
-$as_echo "F77 compiler is gcc-4.1" >&6; }
-         F77_VERSION=gcc4.1
-         ;;
-        *version\ 4.2*)
-         { $as_echo "$as_me:$LINENO: result: F77 compiler is gcc-4.2" >&5
-$as_echo "F77 compiler is gcc-4.2" >&6; }
-         F77_VERSION=gcc4.2
-         ;;
-        *version\ 4.3*)
-         { $as_echo "$as_me:$LINENO: result: F77 compiler is gcc-4.3" >&5
-$as_echo "F77 compiler is gcc-4.3" >&6; }
-         F77_VERSION=gcc4.3
-         ;;
-        *version\ 4.4*)
-         { $as_echo "$as_me:$LINENO: result: F77 compiler is gcc-4.4" >&5
-$as_echo "F77 compiler is gcc-4.4" >&6; }
-         F77_VERSION=gcc4.4
-         ;;
-        *version\ 4.5*)
-         { $as_echo "$as_me:$LINENO: result: F77 compiler is gcc-4.5" >&5
-$as_echo "F77 compiler is gcc-4.5" >&6; }
-         F77_VERSION=gcc4.5
-         ;;
-        *version\ 4.6*)
-         { $as_echo "$as_me:$LINENO: result: F77 compiler is gcc-4.6" >&5
-$as_echo "F77 compiler is gcc-4.6" >&6; }
-         F77_VERSION=gcc4.6
-         ;;
-        *)
-         { $as_echo "$as_me:$LINENO: result: F77 compiler is unknown but accepted gcc version" >&5
-$as_echo "F77 compiler is unknown but accepted gcc version" >&6; }
-         F77_VERSION=gcc-other
-         ;;
-      esac
+
+      full_version=`echo "$G77_VERSION_STRING" | perl -pi -e 's/.*version (\d\.\d\.\d).*/\1/g;'`
+      F77_VERSION=gcc`echo $full_version | perl -pi -e 's/(\d\.\d).*/\1/g;'`
+
+      { $as_echo "$as_me:$LINENO: result: F77 compiler is $CC_VERSION" >&5
+$as_echo "F77 compiler is $CC_VERSION" >&6; }
 
     else
 

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.