1 added + 4 modified, total 5 files
SimDist
diff -u -r1.20 -r1.21
--- aclocal.m4 25 Aug 2010 21:08:03 -0000 1.20
+++ aclocal.m4 8 Sep 2010 23:04:05 -0000 1.21
@@ -3,3 +3,4 @@
builtin(include, build/geant4.m4)
builtin(include, build/clhep.m4)
builtin(include, build/ogl.m4)
+builtin(include, build/qt.m4)
SimDist
diff -u -r1.13 -r1.14
--- configure.in 25 Aug 2010 21:08:03 -0000 1.13
+++ configure.in 8 Sep 2010 23:04:05 -0000 1.14
@@ -1,4 +1,4 @@
-dnl $Header: /cvs/lcd/SimDist/configure.in,v 1.13 2010/08/25 21:08:03 jeremy Exp $
+dnl $Header: /cvs/lcd/SimDist/configure.in,v 1.14 2010/09/08 23:04:05 jeremy Exp $
dnl
dnl Process this file with autoconf to produce the configure script for SimDist.
dnl
@@ -43,6 +43,13 @@
AC_OPENGL
fi
+dnl Set Qt settings.
+AC_ENABLE_QT
+if test -z "$DISABLE_QT"
+then
+ AC_WITH_QTHOME
+fi
+
dnl Setup each dependency package.
AC_CONFIG_PACKAGES
SimDist/build
diff -N qt.m4
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ qt.m4 8 Sep 2010 23:04:05 -0000 1.1
@@ -0,0 +1,56 @@
+dnl
+dnl Macro to set QTHOME.
+dnl
+AC_DEFUN(AC_WITH_QTHOME, [
+
+AC_MSG_CHECKING(for QTHOME directory)
+
+AC_ARG_WITH(qthome,
+ AC_HELP_STRING([--with-qthome=<path>], [Qt installation directory]),
+ [qthome=$with_qthome],
+ [qthome=])
+
+dnl May override setting from shell.
+if test -n "$qthome"
+then
+ QTHOME=$qthome
+fi
+
+AC_MSG_RESULT($QTHOME)
+
+dnl Now check that QTHOME looks valid using header file check.
+AC_CHECK_FILE($QTHOME/include/Qt/qconfig.h, [], [QTHOME=])
+
+if test -z "$QTHOME"
+then
+ AC_MSG_ERROR(valid Qt installation not found)
+fi
+
+HAVE_QT=1
+
+])
+
+dnl
+dnl Macro to enable or disable Qt.
+dnl
+AC_DEFUN(AC_ENABLE_QT, [
+
+AC_MSG_CHECKING(whether to use Qt)
+
+AC_ARG_ENABLE([qt],
+ AC_HELP_STRING([--enable-qt],
+ [Enable or disable usage of Qt with Geant4.])
+ )
+
+if test "${enable_qt}" != "no"; then
+ AC_MSG_RESULT(yes)
+ if test -z "${QTHOME}"; then
+ AC_MSG_ERROR(Qt enabled but QTHOME is not set)
+ fi
+ AC_SUBST(QTHOME)
+else
+ DISABLE_QT=1
+ AC_MSG_RESULT(no)
+fi
+
+])
SimDist/build
diff -u -r1.11 -r1.12
--- geant4.m4 25 Aug 2010 21:08:03 -0000 1.11
+++ geant4.m4 8 Sep 2010 23:04:05 -0000 1.12
@@ -57,6 +57,27 @@
])
+dnl
+dnl Macro to setup Qt variables for Geant4.
+dnl
+AC_DEFUN(AC_GEANT4_QT, [
+
+AC_MSG_CHECKING(whether Geant4 should enable Qt)
+
+dnl If HAVE_QT was set, then a valid Qt installation was already found.
+if test -n "$HAVE_QT"
+then
+ AC_MSG_RESULT(yes)
+ G4UI_BUILD_QT_SESSION=1
+ G4UI_USE_QT=1
+ G4VIS_BUILD_OPENGLQT_DRIVER=1
+ G4VIS_USE_OPENGLQT=1
+else
+ AC_MSG_RESULT(no)
+fi
+
+])
+
dnl Setup Geant4.
AC_DEFUN(AC_GEANT4, [
@@ -117,6 +138,9 @@
G4VIS_USE_RAYTRACERX=1
fi
+dnl Check whether Qt should be enabled.
+AC_GEANT4_QT
+
dnl Config verbose setting. No verbose means better performance.
AC_ENABLE_G4VERBOSE
@@ -168,6 +192,10 @@
AC_SUBST(G4VIS_USE_OPENGL)
AC_SUBST(G4VIS_BUILD_OPENGL)
AC_SUBST(G4VERBOSE)
+AC_SUBST(G4UI_BUILD_QT_SESSION)
+AC_SUBST(G4UI_USE_QT)
+AC_SUBST(G4VIS_BUILD_OPENGLQT_DRIVER)
+AC_SUBST(G4VIS_USE_OPENGLQT)
])
SimDist/packages/geant4
diff -u -r1.11 -r1.12
--- env.gmk.in 5 May 2010 21:05:14 -0000 1.11
+++ env.gmk.in 8 Sep 2010 23:04:05 -0000 1.12
@@ -1,4 +1,4 @@
-# $Id: env.gmk.in,v 1.11 2010/05/05 21:05:14 jeremy Exp $
+# $Id: env.gmk.in,v 1.12 2010/09/08 23:04:05 jeremy Exp $
# Environment variables for the Geant4 build system.
@@ -52,4 +52,11 @@
export G4VIS_BUILD_OPENGL=@G4VIS_BUILD_OPENGL@
export G4VERBOSE=@G4VERBOSE@
+export G4UI_BUILD_QT_SESSION=@G4UI_BUILD_QT_SESSION@
+export G4UI_USE_QT=@G4UI_USE_QT@
+export G4VIS_BUILD_OPENGLQT_DRIVER=@G4VIS_BUILD_OPENGLQT_DRIVER@
+export G4VIS_USE_OPENGLQT=@G4VIS_USE_OPENGLQT@
+
+export QTHOME=@QTHOME@
+
export OGLHOME=@OGLHOME@
CVSspam 0.2.8