Commit in SimDist on MAIN
configure+33-61.59 -> 1.60
configure.in+2-11.3 -> 1.4
build/geant4.m4+67-381.5 -> 1.6
     /ogl.m4+18-11.3 -> 1.4
+120-46
4 modified files
JM: Add configure option for opengl.

SimDist
configure 1.59 -> 1.60
diff -u -r1.59 -r1.60
--- configure	14 Aug 2007 22:39:21 -0000	1.59
+++ configure	17 Aug 2007 18:16:31 -0000	1.60
@@ -814,6 +814,12 @@
    esac
   cat <<\_ACEOF
 
+Optional Features:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-opengl         Enable or disable usage of OpenGL with Geant4.
+
+
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
@@ -2389,8 +2395,8 @@
 
 if test -n "$OGLHOME"
 then
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+  echo "$as_me:$LINENO: result: $OGLHOME" >&5
+echo "${ECHO_T}$OGLHOME" >&6
 else
   echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
@@ -2401,6 +2407,26 @@
 
 
 
+echo "$as_me:$LINENO: checking whether to use OpenGL" >&5
+echo $ECHO_N "checking whether to use OpenGL... $ECHO_C" >&6
+
+# Check whether --enable-opengl or --disable-opengl was given.
+if test "${enable_opengl+set}" = set; then
+  enableval="$enable_opengl"
+
+fi;
+
+if test "${enable_opengl}" != "no"; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+
+
 
 for p in $(echo ${packages_list})
 do
@@ -2558,12 +2584,13 @@
 echo "$as_me:$LINENO: result: $G4SYSTEM" >&5
 echo "${ECHO_T}$G4SYSTEM" >&6
 
-if test -n "$OGLHOME"
-then
-G4VIS_USE_OPENGLX=1
-G4VIS_BUILD_OPENGLX_DRIVER=1
+# OpenGL.
+if test "${enable_opengl}" = "yes"; then
+  G4VIS_USE_OPENGLX=1
+  G4VIS_BUILD_OPENGLX_DRIVER=1
 fi
 
+
 # Win32 OpenGL config.
 
 # terminal

SimDist
configure.in 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- configure.in	15 Sep 2006 21:10:11 -0000	1.3
+++ configure.in	17 Aug 2007 18:16:31 -0000	1.4
@@ -1,4 +1,4 @@
-dnl $Header: /cvs/lcd/SimDist/configure.in,v 1.3 2006/09/15 21:10:11 jeremy Exp $
+dnl $Header: /cvs/lcd/SimDist/configure.in,v 1.4 2007/08/17 18:16:31 jeremy Exp $
 dnl
 dnl Process this file with autoconf to produce the configure script for SimDist.
 dnl
@@ -35,6 +35,7 @@
 
 dnl Setup OpenGL if found.
 AC_OPENGL
+AC_ENABLE_OPENGL
 
 dnl Setup each package.
 AC_CONFIG_PACKAGES

SimDist/build
geant4.m4 1.5 -> 1.6
diff -u -r1.5 -r1.6
--- geant4.m4	12 Jul 2006 00:17:06 -0000	1.5
+++ geant4.m4	17 Aug 2007 18:16:32 -0000	1.6
@@ -1,44 +1,67 @@
-#AC_DEFUN([AC_GEANT4],
-#  AC_GEANT4_BASEDIR
-#])
-
-# AC_DEFUN([AC_GEANT4_BASEDIR],
-# [
-#   AC_ARG_VAR([GEANT4_BASEDIR],[base installation directory of Geant4])
-
-#   AC_MSG_CHECKING(for GEANT4_BASEDIR)
-
-#   if test -z "$GEANT4_BASEDIR"
-#   then
-#     AC_ARG_WITH(geant4-basedir,
-#                 AC_HELP_STRING([--with-geant4-basedir=<path>],
-#                                [absolute path to Geant4 base install directory]),
-#                 [
-#                   if test "$withval" != "yes"
-#                   then
-#                     GEANT4_BASEDIR="$withval"
-#                   fi
-#                 ]
-#                )
-#   fi
-
-#   if test -z "$GEANT4_BASEDIR"
-#   then
-#     if test -n "$G4INSTALL"
-#     then
-#       GEANT4_BASEDIR=$G4INSTALL
-#     fi
-#   fi
+dnl Macro to extract the Geant4 version from G4Version.hh or G4RunManagerKernel.hh, if the former file does not exist.
+AC_DEFUN(AC_GEANT4_VERSION, [
 
-#   AC_MSG_RESULT($GEANT4_BASEDIR)
+AC_MSG_CHECKING(for Geant4 version)
 
-#   AC_SUBST(GEANT4_BASEDIR)
+if test -n "$G4INSTALL"
+then
+
+  if ! test -d $G4INSTALL; then
+    AC_MSG_ERROR(G4INSTALL is not a valid directory)
+  fi
+
+  if test -e "$G4INSTALL/source/global/management/include/G4Version.hh"
+  then
+    GEANT4_VERSION=$(grep G4Version $G4INSTALL/source/global/management/include/G4Version.hh | grep -o "geant4[[0-9\-]]*" | sed 's/geant4-//g' | sed 's/-/./g')
+  elif test -e "$G4INSTALL/source/run/src/G4RunManagerKernel.cc"
+  then
+    GEANT4_VERSION=$(grep "[$]Name" $G4INSTALL/source/run/src/G4RunManagerKernel.cc | grep GEANT4 | grep -o "geant4[[0-9a-z\-]]*" | sed -e 's/geant4-//g' -e 's/patch-//g'| sed 's/-/./g')
+  else
+    AC_MSG_ERROR(could not determine Geant4 version because G4Version.hh or G4RunManagerKernel.hh was not found in Geant4 source)
+  fi
+else
+  AC_MSG_ERROR(G4INSTALL is not set)
+fi
+
+GEANT4_MAJOR=$(echo "$GEANT4_VERSION" | awk 'BEGIN{ FS="." } { print [$]1 }' | sed 's/0*//')
+GEANT4_MINOR=$(echo "$GEANT4_VERSION" | awk 'BEGIN{ FS="." } { print [$]2 }' | sed 's/0*//')
+GEANT4_PATCH=$(echo "$GEANT4_VERSION" | awk 'BEGIN{ FS="." } { print [$]3 }' | sed 's/0*//')
+
+if test -z "$GEANT4_MINOR";
+then
+  GEANT4_MINOR=0
+fi
+
+if test -z "$GEANT4_PATCH";
+then
+  GEANT4_PATCH=0
+fi
 
-# ])
+GEANT4_VERSION=$GEANT4_MAJOR"."$GEANT4_MINOR"."$GEANT4_PATCH
+
+AC_MSG_RESULT($GEANT4_VERSION)
+
+AC_MSG_CHECKING(for Geant4 major version level)
+AC_MSG_RESULT($GEANT4_MAJOR)
+
+AC_MSG_CHECKING(for Geant4 minor version level)
+AC_MSG_RESULT($GEANT4_MINOR)
+
+AC_MSG_CHECKING(for Geant4 patch level)
+AC_MSG_RESULT($GEANT4_PATCH)
+
+AC_SUBST(GEANT4_VERSION)
+AC_SUBST(GEANT4_MAJOR)
+AC_SUBST(GEANT4_MINOR)
+AC_SUBST(GEANT4_PATCH)
+
+])
 
 dnl Macro to setup Geant4.
 AC_DEFUN(AC_GEANT4, [
 
+dnl AC_GEANT4_VERSION
+
 AC_MSG_CHECKING(for G4SYSTEM setting)
 
 # G4SYSTEM
@@ -66,12 +89,18 @@
 
 AC_MSG_RESULT($G4SYSTEM)
 
-if test -n "$OGLHOME"
-then
-G4VIS_USE_OPENGLX=1
-G4VIS_BUILD_OPENGLX_DRIVER=1
+# OpenGL.
+if test "${enable_opengl}" = "yes"; then
+  G4VIS_USE_OPENGLX=1
+  G4VIS_BUILD_OPENGLX_DRIVER=1
 fi
 
+dnl if test -n "$OGLHOME"
+dnl then
+dnl G4VIS_USE_OPENGLX=1
+dnl G4VIS_BUILD_OPENGLX_DRIVER=1
+dnl fi
+
 # Win32 OpenGL config.
 dnl case "$host_os" in
 dnl  cygwin* )

SimDist/build
ogl.m4 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- ogl.m4	12 Jul 2006 00:17:06 -0000	1.3
+++ ogl.m4	17 Aug 2007 18:16:32 -0000	1.4
@@ -21,7 +21,7 @@
 
 if test -n "$OGLHOME"
 then
-  AC_MSG_RESULT(yes)
+  AC_MSG_RESULT($OGLHOME)
 else
   AC_MSG_RESULT(no)
 fi
@@ -29,3 +29,20 @@
 AC_SUBST(OGLHOME)
 
 ])
+
+AC_DEFUN(AC_ENABLE_OPENGL, [
+
+AC_MSG_CHECKING(whether to use OpenGL)
+
+AC_ARG_ENABLE([opengl],
+              AC_HELP_STRING([--enable-opengl],
+                             [Enable or disable usage of OpenGL with Geant4.])
+             )
+
+if test "${enable_opengl}" != "no"; then
+  AC_MSG_RESULT(yes)
+else
+  AC_MSG_RESULT(no)
+fi
+
+])
CVSspam 0.2.8