Commit in lcdd on MAIN
aclocal.m4+40-1761.9 -> 1.10
JM: Add G4VERBOSE config to LCDD

lcdd
aclocal.m4 1.9 -> 1.10
diff -u -r1.9 -r1.10
--- aclocal.m4	30 Mar 2006 19:45:48 -0000	1.9
+++ aclocal.m4	31 Mar 2006 01:08:57 -0000	1.10
@@ -1,99 +1,24 @@
-# $Header: /cvs/lcd/lcdd/aclocal.m4,v 1.9 2006/03/30 19:45:48 jeremy Exp $
-#
-# local m4 macros for SLIC autoconf
-#
+dnl $Header: /cvs/lcd/lcdd/aclocal.m4,v 1.10 2006/03/31 01:08:57 jeremy Exp $
+dnl
+dnl local m4 macros for SLIC autoconf
+dnl
 
-# /\/\/\ SLIC /\/\/\
-AC_DEFUN(SIM_SETUP_SLIC, [
-
-AC_MSG_CHECKING(for valid SLIC installation at current directory)
-
-SLIC_PREFIX=`pwd`
-
-SLIC_TEST_FILE=${SLIC_PREFIX}/slic.cc
-
-if ! test -e ${SLIC_TEST_FILE}; then
-  AC_MSG_ERROR(Not a valid SLIC installation at $SLIC_PREFIX)
-else
-  AC_MSG_RESULT(Yes)
-fi
-
-AC_SUBST(SLIC_PREFIX)
-
-# set as default install dir
-AC_PREFIX_DEFAULT($SLIC_BASE)
-
-# enable debugging
-AC_MSG_CHECKING(whether SLIC code debugging should be enabled)
-
-AC_ARG_ENABLE(slic-debug,
-	AC_HELP_STRING([--enable-slic-debug], [Enable debugging in code by setting SLIC_DEBUG, G4DEBUG and G4PROFILE]),
-	[SLIC_DEBUG_ENABLE="$enable_slic_debug"] )
-
-# default to non-debug mode
-if test -n "${SLIC_DEBUG_ENABLE}" && test "${SLIC_DEBUG_ENABLE}" != "no"; then
-    AC_MSG_RESULT(Yes)
-
-    # GNUmakefile vars
-    G4DEBUG_SET="G4DEBUG_SET=1"
-    AC_SUBST(G4DEBUG_SET)
-
-    G4PROFILE_SET="G4PROFILE_SET=1"
-    AC_SUBST(G4PROFILE_SET)
-
-    # compiler defines
-    AC_DEFINE(SLIC_DEBUG)
-    AC_DEFINE(G4DEBUG)
-    AC_DEFINE(G4PROFILE)
-
-    # make sure to compile with debugging switches
-    CXXFLAGS="${CXXFLAGS} -g -ggdb -pg"
-else
-  AC_MSG_RESULT(No)
-fi
-
-# enable SLIC verbose system
-AC_MSG_CHECKING(whether SLIC verbose system should be enabled)
-
-AC_ARG_ENABLE(slic-verbose,
-	AC_HELP_STRING([--enable-slic-verbose],[Enable usage of verbose output using SLIC_VERBOSE]),
-	[SLIC_VERBOSE_ENABLE="${enable_slic_verbose}"] )
-
-# yes or null (not specified) then set verbose system to on
-if test "${SLIC_VERBOSE_ENABLE}" = "yes" || test -z "${SLIC_VERBOSE_ENABLE}"; then
-  AC_MSG_RESULT(Yes)
-
-  # compiler defines
-  AC_DEFINE(G4VERBOSE)
-  AC_DEFINE(SLIC_VERBOSE)
-
-  # GNUmakefile vars
-  G4VERBOSE_SET="G4VERBOSE=1"
-  AC_SUBST(G4VERBOSE_SET)
-
-  SLIC_VERBOSE_SET="SLIC_VERBOSE=1"
-  AC_SUBST(SLIC_VERBOSE_SET)
-
-else
-  AC_MSG_RESULT(No)
-fi
-
-])
 
+dnl macro to enable verbose compiler and linker output
 AC_DEFUN([SIM_SETUP_VERBOSE_COMPILE], [
-# enable verbose compiler output
+
 AC_MSG_CHECKING(whether verbose compiler output should be enabled)
 
 AC_ARG_ENABLE(compile-verbose,
 	AC_HELP_STRING([--enable-compile-verbose], [Use verbose compiler settings]),
 	[SLIC_COMPILE_VERBOSE_ENABLE="${enable_compile_verbose}"] )
 
-# specified and not = no
+dnl specified and not = no
 if test -n "${SLIC_COMPILE_VERBOSE_ENABLE}" && test "${SLIC_COMPILE_VERBOSE_ENABLE}" != "no"; then
 
     AC_MSG_RESULT(Yes)
 
-    # verbose compiler commands into cpp flags
+    dnl verbose compiler commands into cpp flags
     CXXFLAGS="${CXXFLAGS} -Wall -v -Wl,--verbose"
 
 else
@@ -111,50 +36,17 @@
 	,
 	)
 
-AC_MSG_RESULT($enable_version)
-
 if test "${enable_version}" = "yes"; then
+  AC_MSG_RESULT(yes)
   rm VERSION &> /dev/null
   echo "${PACKAGE_NAME} ${PACKAGE_VERSION}" > VERSION
-fi
-
-])
-
-# /\/\/\ LCIO /\/\/\
-AC_DEFUN(SIM_SETUP_LCIO, [
-
-AC_MSG_CHECKING(for LCIO installation)
-
-AC_ARG_WITH(lcio,
-	AC_HELP_STRING([--with-lcio=<path>],[LCIO installation base [[LCIO]] ]),
-	[LCIO_PREFIX=$with_lcio])
-
-if test -z "${with_lcio}"; then
-  if test -n "$LCIO"; then
-    LCIO_PREFIX=${LCIO} # env
-  else
-    AC_MSG_RESULT(No)
-    AC_MSG_ERROR(LCIO installation was not found) # not found
-  fi
-fi
-
-# test to see if it looks valid
-LCIO_TEST_FILE=${LCIO_PREFIX}/src/aid/EVENT/LCEvent.aid
-
-if test -e ${LCIO_TEST_FILE}; then
-  AC_MSG_RESULT(Yes)
-  echo "found valid LCIO installation at ${LCIO_PREFIX}."
 else
-  AC_MSG_RESULT(No)
-  AC_MSG_ERROR(invalid LCIO installation at ${LCIO_PREFIX})
+  AC_MSG_RESULT(no)
 fi
 
-# define LCIO_PREFIX in output
-AC_SUBST(LCIO_PREFIX)
-
 ])
 
-# /\/\/\ Geant4 /\/\/\
+dnl macro to setup Geant4
 AC_DEFUN(SIM_SETUP_G4, [
 
 AC_MSG_CHECKING(for Geant4 installation)
@@ -183,12 +75,12 @@
 
 AC_SUBST(G4_PREFIX)
 
-# set work dir
+dnl set work dir
 G4WORKDIR=${LCDD_BASE}
 
 AC_SUBST(G4WORKDIR)
 
-# try to derive G4SYSTEM if not set
+dnl try to derive G4SYSTEM, if not set
 
 AC_MSG_CHECKING([whether G4SYSTEM is set in your environment])
 
@@ -213,11 +105,9 @@
 fi
 
 AC_SUBST(G4SYSTEM)
-
-# libs/includes will be magically setup by Geant4 binmake.
 ])
 
-# /\/\/\ CLHEP /\/\/\
+dnl macro to setup CLHEP
 
 AC_DEFUN(SIM_SETUP_CLHEP, [
 
@@ -247,11 +137,9 @@
 
 AC_SUBST(CLHEP_PREFIX)
 
-# libs/includes will be setup by Geant4 binmake.
-
 ])
 
-# /\/\/\ LCDD /\/\/\
+dnl macro to setup LCDD
 AC_DEFUN(SIM_SETUP_LCDD, [
 
 LCDD_BASE=`pwd`
@@ -261,7 +149,7 @@
 
 ])
 
-# /\/\/\ Xerces /\/\/\
+dnl macro to setup Xerces
 AC_DEFUN(SIM_SETUP_XERCES, [
 
 AC_MSG_CHECKING(for Xerces installation)
@@ -292,7 +180,7 @@
 
 ])
 
-# /\/\/\ Xerces libname /\/\/\
+dnl macro to set Xerces libname
 AC_DEFUN(SIM_WITH_XERCES_LIBNAME, [
 
 AC_MSG_CHECKING(for Xerces libname)
@@ -308,44 +196,12 @@
 
 ])
 
-# /\/\/\ LCPhys /\/\/\
-AC_DEFUN(SIM_SETUP_LCPHYS, [
-
-AC_MSG_CHECKING(for LCPhys installation)
-
-AC_ARG_WITH(lcphys,
-	AC_HELP_STRING([--with-lcphys=<path>],[ LCPhys installation base [[LCPHYS_BASE]] ]),
-	[LCPHYS_PREFIX=$with_lcphys])
-
-if test -z "${with_lcphys}"; then
-  if test -n "$LCPHYS_BASE"; then
-    LCPHYS_PREFIX=${LCPHYS_BASE} # env
-  else
-    AC_MSG_RESULT(No)
-    AC_MSG_ERROR(LCPhys installation was not found) # not found
-  fi
-fi
-
-LCPHYS_TEST_FILE=${LCPHYS_PREFIX}/include/LCPhysicsList.hh
-
-if test -e "${LCPHYS_TEST_FILE}"; then
-  AC_MSG_RESULT(Yes)
-  echo "found valid LCPhys installation at ${LCPHYS_PREFIX}"
-else
-  AC_MSG_ERROR(invalid LCPhys installation at ${LCPHYS_PREFIX})
-fi
-
-AC_SUBST(LCPHYS_PREFIX)
-
-])
-
-# /\/\/\ GDML /\/\/\
-
+dnl macro to setup GDML
 AC_DEFUN(SIM_SETUP_GDML, [
 
 AC_MSG_CHECKING(for GDML installation)
 
-# base dir
+dnl set GDML base dir
 AC_ARG_WITH(gdml,
 	AC_HELP_STRING([--with-gdml=<path>], [ GDML installation base [[GDML_BASE]] ]),
 	[GDML_PREFIX=$with_gdml])
@@ -370,7 +226,7 @@
 
 AC_SUBST(GDML_PREFIX)
 
-# platform
+dnl set platform
 AC_ARG_WITH(gdml-platform,
 	AC_HELP_STRING([--with-gdml-platform=<platform description>], [description of platform for GDML, e.g. Linux_gcc323.[[PLATFORM]] ]),
 	[GDML_PLATFORM=${with_gdml_platform}])
@@ -383,31 +239,21 @@
     comp_guess=$CXX
 
     GDML_PLATFORM=${host_guess}"-"${comp_guess}
-
-#    AC_MSG_RESULT(No)
-#    AC_MSG_ERROR(GDML's PLATFORM variable must be set with --with-gdml-platform or PLATFORM env var) # not found
   fi
 fi
 
 AC_SUBST(GDML_PLATFORM)
 
-# site
-AC_ARG_WITH(gdml-site,
-	AC_HELP_STRING([--with-gdml-site=<site description>], [description of site, e.g. SLAC. [[SITE]] ]),
-	[GDML_SITE=${with_gdml_site}])
-
-AC_SUBST(GDML_SITE)
-
 ])
 
-# macro to setup Doxygen for creating documentation
+dnl macro to setup Doxygen
 AC_DEFUN([SIM_SETUP_DOXYGEN], [
 
   AC_CHECK_PROGS(DOXYGEN, doxygen)
   AC_SUBST(DOXYGEN)
 ])
 
-# macro to set the GDML and LCDD schema installation directory
+dnl macro to set the GDML and LCDD schema installation directory
 AC_DEFUN([LCDD_WITH_SCHEMA_INSTALL_DIR], [
 
     AC_MSG_CHECKING(for schema installation target directory)
@@ -423,3 +269,21 @@
     AC_MSG_RESULT(${SCHEMA_INSTALL_DIR})
 ])
 
+dnl macro to check whether G4VERBOSE should be enabled
+AC_DEFUN([ENABLE_VERBOSE], [
+
+AC_MSG_CHECKING(whether to set G4VERBOSE)
+
+AC_ARG_ENABLE(verbose,
+              [AC_HELP_STRING([--enable-verbose],
+                              [set G4VERBOSE])])
+
+if test "${enable_verbose}" != "no"; then
+  AC_DEFINE(G4VERBOSE)
+  AC_MSG_RESULT(yes)
+else
+  AC_MSG_RESULT(no)
+fi
+
+])
+
CVSspam 0.2.8