Print

Print


Commit in slic on MAIN
aclocal.m4+6-61.35 -> 1.36
configure+4-41.136 -> 1.137
+10-10
2 modified files
use different, simpler method for getting Geant4 version

slic
aclocal.m4 1.35 -> 1.36
diff -u -r1.35 -r1.36
--- aclocal.m4	26 Jul 2010 19:50:12 -0000	1.35
+++ aclocal.m4	26 Aug 2010 18:04:38 -0000	1.36
@@ -1,7 +1,7 @@
-]dnl $Header: /cvs/lcd/slic/aclocal.m4,v 1.35 2010/07/26 19:50:12 jeremy Exp $
+]dnl $Header: /cvs/lcd/slic/aclocal.m4,v 1.36 2010/08/26 18:04:38 jeremy Exp $
 
 dnl /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
-dnl Autoconf macros for SLIC and its dependencies friends.
+dnl Autoconf macros for SLIC and its dependencies.
 dnl /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
 
 dnl /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
@@ -215,7 +215,7 @@
 
   if test -e "$G4INSTALL/source/global/management/include/G4Version.hh"
   then
-    GEANT4_FULL_VERSION=$(grep G4Version $G4INSTALL/source/global/management/include/G4Version.hh | grep -o "geant4[[a-z0-9\-]]*" | sed -e 's/geant4-//g' -e 's/-/./g' -e 's/patch.//g')
+    GEANT4_VERSION_NUMBER=$(grep "define G4VERSION_NUMBER" $G4INSTALL/source/global/management/include/G4Version.hh | sed 's/#define G4VERSION_NUMBER\ \ //g')
   else
     AC_MSG_ERROR(FATAL ERROR: Could not determine Geant4 version because G4Version.hh was not found in Geant4 source code.  You are probably using an old Geant4 version.)
   fi
@@ -223,9 +223,9 @@
   AC_MSG_ERROR(G4INSTALL is not set.)
 fi
 
-GEANT4_MAJOR_VERSION=$(echo "$GEANT4_FULL_VERSION" | awk 'BEGIN{ FS="." } { print [$]1 }' | sed 's/0*//')
-GEANT4_MINOR_VERSION=$(echo "$GEANT4_FULL_VERSION" | awk 'BEGIN{ FS="." } { print [$]2 }' | sed 's/0*//')
-GEANT4_PATCH_VERSION=$(echo "$GEANT4_FULL_VERSION" | awk 'BEGIN{ FS="." } { print [$]3 }' | sed 's/0*//')
+GEANT4_MAJOR_VERSION=${GEANT4_VERSION_NUMBER:0:1}
+GEANT4_MINOR_VERSION=${GEANT4_VERSION_NUMBER:1:1}
+GEANT4_PATCH_VERSION=${GEANT4_VERSION_NUMBER:2:1}
 
 if test -z "$GEANT4_MINOR_VERSION";
 then

slic
configure 1.136 -> 1.137
diff -u -r1.136 -r1.137
--- configure	26 Jul 2010 20:00:46 -0000	1.136
+++ configure	26 Aug 2010 18:04:38 -0000	1.137
@@ -3421,7 +3421,7 @@
 
   if test -e "$G4INSTALL/source/global/management/include/G4Version.hh"
   then
-    GEANT4_FULL_VERSION=$(grep G4Version $G4INSTALL/source/global/management/include/G4Version.hh | grep -o "geant4[a-z0-9\-]*" | sed -e 's/geant4-//g' -e 's/-/./g' -e 's/patch.//g')
+    GEANT4_VERSION_NUMBER=$(grep "define G4VERSION_NUMBER" $G4INSTALL/source/global/management/include/G4Version.hh | sed 's/#define G4VERSION_NUMBER\ \ //g')
   else
     { { echo "$as_me:$LINENO: error: FATAL ERROR: Could not determine Geant4 version because G4Version.hh was not found in Geant4 source code.  You are probably using an old Geant4 version." >&5
 echo "$as_me: error: FATAL ERROR: Could not determine Geant4 version because G4Version.hh was not found in Geant4 source code.  You are probably using an old Geant4 version." >&2;}
@@ -3433,9 +3433,9 @@
    { (exit 1); exit 1; }; }
 fi
 
-GEANT4_MAJOR_VERSION=$(echo "$GEANT4_FULL_VERSION" | awk 'BEGIN{ FS="." } { print $1 }' | sed 's/0*//')
-GEANT4_MINOR_VERSION=$(echo "$GEANT4_FULL_VERSION" | awk 'BEGIN{ FS="." } { print $2 }' | sed 's/0*//')
-GEANT4_PATCH_VERSION=$(echo "$GEANT4_FULL_VERSION" | awk 'BEGIN{ FS="." } { print $3 }' | sed 's/0*//')
+GEANT4_MAJOR_VERSION=${GEANT4_VERSION_NUMBER:0:1}
+GEANT4_MINOR_VERSION=${GEANT4_VERSION_NUMBER:1:1}
+GEANT4_PATCH_VERSION=${GEANT4_VERSION_NUMBER:2:1}
 
 if test -z "$GEANT4_MINOR_VERSION";
 then
CVSspam 0.2.8