From 2ad45bc9361fe282589edf9a6ff76bc863d80129 Mon Sep 17 00:00:00 2001 From: bangerth Date: Fri, 16 Apr 2010 14:46:04 +0000 Subject: [PATCH] Do the same for detecting g77/gfortran versions. git-svn-id: https://svn.dealii.org/trunk@21000 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/aclocal.m4 | 75 +++---------------------------------- deal.II/configure | 93 +++------------------------------------------- 2 files changed, 11 insertions(+), 157 deletions(-) diff --git a/deal.II/aclocal.m4 b/deal.II/aclocal.m4 index b07c8d3ec9..7421f33780 100644 --- a/deal.II/aclocal.m4 +++ b/deal.II/aclocal.m4 @@ -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 diff --git a/deal.II/configure b/deal.II/configure index 6ef5ec55a7..7dced9cf61 100755 --- a/deal.II/configure +++ b/deal.II/configure @@ -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 -- 2.39.5