361 lines
8.0 KiB
Bash
361 lines
8.0 KiB
Bash
#!/bin/sh
|
|
|
|
#------------------------------------------------------------------------------
|
|
# sh config query script for Geant4 @Geant4_VERSION@ on UNIX platforms
|
|
# Autogenerated by CMake DO NOT EDIT
|
|
#
|
|
#------------------------------------------------------------------------------
|
|
|
|
#-----------------------------------------------------------------------------
|
|
# Determine location of this script.
|
|
# NB, we don't always use the result of this calculation, but it does not
|
|
# hurt to do it. Only possible error is if too long a chain of symbolic links
|
|
# are used to point to the physical script.
|
|
#
|
|
# Resolve symbolic links to script - we should end up with a physical file
|
|
script="$0"
|
|
calldir=`pwd`
|
|
loopcount=""
|
|
|
|
while [ "x`readlink $script`" != "x" ] ; do
|
|
preloc=`dirname $script`
|
|
script=`readlink $script`
|
|
|
|
if [ ${script##/} = ${script##~} ] ; then
|
|
# The symbolic link was relative...
|
|
script="$preloc/$script"
|
|
fi
|
|
loopcount="l$loopcount"
|
|
|
|
if [ ${#loopcount} -gt 10 ] ; then
|
|
echo "error: more than 10 symbolic links to geant4-config traversed."
|
|
exit 1
|
|
fi
|
|
done
|
|
|
|
# If we still have a relative path, then it must be relative to the calling dir
|
|
# NB we don't attempt to resolve directory symbolic links or remove '.' or '..'
|
|
if [ ${script##/} = ${script##~} ] ; then
|
|
script="$calldir/$script"
|
|
fi
|
|
|
|
#-----------------------------------------------------------------------------
|
|
# Finally, grab the directory in which the script is located
|
|
# Used below should we be setup to be relocatable.
|
|
scriptloc=`dirname $script`
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
# Expansion and calculation of all needed variables
|
|
#
|
|
prefix=@GEANT4_CONFIG_INSTALL_PREFIX@
|
|
exec_prefix=@GEANT4_CONFIG_EXECPREFIX@
|
|
libdir=@GEANT4_CONFIG_LIBDIR@
|
|
includedirs="@GEANT4_CONFIG_INCLUDE_DIRS@"
|
|
|
|
|
|
name="geant4"
|
|
description="Geant4 toolkit for the simulation of the passage of particles through matter"
|
|
version="@Geant4_VERSION@"
|
|
|
|
# 'Requires' that may affect cflags and libs.
|
|
clhep_config_exe=@CLHEP_CONFIG_EXECUTABLE@
|
|
|
|
# Basic flags and libraries for visualization
|
|
vis_cflags="-DG4UI_USE_TCSH"
|
|
|
|
vis_libs="-lG4Tree \
|
|
-lG4FR \
|
|
-lG4GMocren \
|
|
-lG4visHepRep \
|
|
-lG4RayTracer \
|
|
-lG4VRML \
|
|
-lG4vis_management \
|
|
-lG4modeling"
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
# Core setup...
|
|
#
|
|
cflags=""
|
|
|
|
for g4incdir in ${includedirs} ; do
|
|
cflags="${cflags} -I${g4incdir}"
|
|
done
|
|
|
|
libs="-lG4interfaces \
|
|
-lG4persistency \
|
|
-lG4analysis \
|
|
-lG4error_propagation \
|
|
-lG4readout \
|
|
-lG4physicslists \
|
|
-lG4run \
|
|
-lG4event \
|
|
-lG4tracking \
|
|
-lG4parmodels \
|
|
-lG4processes \
|
|
-lG4digits_hits \
|
|
-lG4track \
|
|
-lG4particles \
|
|
-lG4geometry \
|
|
-lG4materials \
|
|
-lG4graphics_reps \
|
|
-lG4intercoms \
|
|
-lG4global"
|
|
|
|
#----------------------------------------------------------------------------
|
|
# Extra optional features that were enabled.
|
|
#
|
|
# - ALL
|
|
feature_list=""
|
|
geant4_uses_opengl="no"
|
|
geant4_uses_x11="no"
|
|
|
|
# - CLHEP
|
|
have_clhep="@G4_BUILTWITH_CLHEP@"
|
|
feature_list="${feature_list} clhep[${have_clhep}]"
|
|
|
|
if test "x${have_clhep}" = "xno" ; then
|
|
cflags="${cflags} `${clhep_config_exe} --include`"
|
|
fi
|
|
if test "x${have_clhep}" = "xyes" ; then
|
|
libs="${libs} -lG4clhep"
|
|
fi
|
|
|
|
# - EXPAT
|
|
have_expat="@G4_BUILTWITH_EXPAT@"
|
|
feature_list="${feature_list} expat[${have_expat}]"
|
|
|
|
if test "x${have_expat}" = "xyes" ; then
|
|
libs="${libs} -lG4expat"
|
|
fi
|
|
|
|
# - GDML
|
|
have_gdml="@G4_BUILTWITH_GDML@"
|
|
feature_list="${feature_list} gdml[${have_gdml}]"
|
|
|
|
if test "x${have_gdml}" = "xyes" ; then
|
|
cflags="${cflags} -I@XERCESC_INCLUDE_DIRS@"
|
|
fi
|
|
|
|
|
|
# - Qt
|
|
have_qt="@G4_BUILTWITH_QT@"
|
|
feature_list="${feature_list} qt[${have_qt}]"
|
|
|
|
if test "x${have_qt}" = "xyes" ; then
|
|
vis_cflags="${vis_cflags} \
|
|
-DG4INTY_USE_QT -DG4UI_USE_QT -DG4VIS_USE_OPENGLQT \
|
|
-I@QT_QTCORE_INCLUDE_DIR@ \
|
|
-I@QT_QTGUI_INCLUDE_DIR@ \
|
|
-I@QT_QTOPENGL_INCLUDE_DIR@"
|
|
|
|
geant4_uses_opengl="yes"
|
|
fi
|
|
|
|
# - Motif
|
|
have_motif="@G4_BUILTWITH_MOTIF@"
|
|
feature_list="${feature_list} motif[${have_motif}]"
|
|
|
|
if test "x${have_motif}" = "xyes" ; then
|
|
vis_cflags="${vis_cflags} -DG4UI_USE_XM -DG4VIS_USE_OPENGLXM"
|
|
geant4_uses_x11="yes"
|
|
geant4_uses_opengl="yes"
|
|
fi
|
|
|
|
|
|
# - RayTracerX11
|
|
have_raytracerx11="@G4_BUILTWITH_RAYTRACERX11@"
|
|
feature_list="${feature_list} raytracer-x11[${have_raytracerx11}]"
|
|
|
|
if test "x${have_raytracerx11}" = "xyes" ; then
|
|
vis_cflags="${vis_cflags} -DG4VIS_USE_RAYTRACERX"
|
|
geant4_uses_x11="yes"
|
|
fi
|
|
|
|
|
|
# - OpenGL with X11
|
|
have_openglx11="@G4_BUILTWITH_OPENGLX11@"
|
|
feature_list="${feature_list} opengl-x11[${have_openglx11}]"
|
|
|
|
if test "x${have_openglx11}" = "xyes" ; then
|
|
vis_cflags="${vis_cflags} -DG4VIS_USE_OPENGLX"
|
|
geant4_uses_opengl="yes"
|
|
geant4_uses_x11="yes"
|
|
fi
|
|
|
|
|
|
# - OpenInventor
|
|
# Whilst it *is* an Xt based driver, don't *think* Xt or X11 appear
|
|
# in the public interface, nor do the Inventor headers...
|
|
have_openinventor="@G4_BUILTWITH_INVENTOR@"
|
|
feature_list="${feature_list} openinventor[${have_openinventor}]"
|
|
|
|
if test "x${have_openinventor}" = "xyes" ; then
|
|
vis_cflags="${vis_cflags} -DG4INTY_USE_XT -DG4VIS_USE_OI -DG4VIS_USE_OIX"
|
|
vis_libs="-lG4OpenInventor ${vis_libs}"
|
|
fi
|
|
|
|
|
|
|
|
# - If we have any OpenGL based feature, then we need to add in the
|
|
# OpenGL global define and the G4OpenGL/G4gl2ps libraries.
|
|
if test "x${geant4_uses_opengl}" = "xyes" ; then
|
|
vis_cflags="-DG4VIS_USE_OPENGL ${vis_cflags}"
|
|
vis_libs="-lG4OpenGL -lG4gl2ps ${vis_libs}"
|
|
fi
|
|
|
|
# - If we have any X11 based feature, then we need the INTY_XT define and
|
|
# *may* need the X11 includes
|
|
if test "x${geant4_uses_x11}" = "xyes" ; then
|
|
vis_cflags="-DG4INTY_USE_XT @G4_X11_INCLUDE_STATEMENT@ ${vis_cflags}"
|
|
fi
|
|
|
|
#-----------------------------------------------------------------------------
|
|
# help function
|
|
#
|
|
help()
|
|
{
|
|
cat<<EOF
|
|
Usage: geant4-config [OPTION...]
|
|
--prefix output installation prefix of Geant4
|
|
--version output version for Geant4
|
|
--libs output all linker flags
|
|
--cflags output all preprocessor
|
|
and compiler flags
|
|
|
|
--libs-without-gui output linker flags without
|
|
GUI components
|
|
--cflags-without-gui output preprocessor and compiler
|
|
flags without GUI components
|
|
|
|
--has-feature FEATURE output yes if FEATURE is supported,
|
|
or no if not supported
|
|
|
|
Known Features:
|
|
EOF
|
|
for f in ${feature_list} ; do
|
|
echo " $f"
|
|
done
|
|
|
|
cat<<EOF
|
|
|
|
Help options:
|
|
-?, --help show this help message
|
|
--usage display brief usage message
|
|
EOF
|
|
|
|
exit 1
|
|
}
|
|
|
|
|
|
#------------------------------------------------------------------------------
|
|
# usage function
|
|
#
|
|
usage()
|
|
{
|
|
cat<<EOF
|
|
Usage: geant4-config [--prefix] [--version] [--libs] [--cflags]
|
|
EOF
|
|
exit 1
|
|
}
|
|
|
|
#------------------------------------------------------------------------------
|
|
# Process arguments
|
|
#
|
|
if test $# -eq 0 ; then
|
|
usage
|
|
fi
|
|
|
|
while test $# -gt 0 ; do
|
|
case "$1" in
|
|
-*=*)
|
|
optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'`
|
|
;;
|
|
*)
|
|
optarg=
|
|
;;
|
|
esac
|
|
|
|
case "$1" in
|
|
--prefix)
|
|
echo ${prefix}
|
|
;;
|
|
|
|
--version)
|
|
echo ${version}
|
|
;;
|
|
|
|
--libs)
|
|
echo "-L${libdir}" ${vis_libs} ${libs}
|
|
;;
|
|
|
|
--cflags)
|
|
echo ${vis_cflags} ${cflags}
|
|
;;
|
|
|
|
--libs-without-gui)
|
|
echo "-L${libdir}" ${libs}
|
|
;;
|
|
|
|
--cflags-without-gui)
|
|
echo ${cflags}
|
|
;;
|
|
|
|
--has-feature)
|
|
shift
|
|
|
|
case "$1" in
|
|
clhep)
|
|
echo ${have_gdml}
|
|
;;
|
|
expat)
|
|
echo ${have_expat}
|
|
;;
|
|
gdml)
|
|
echo ${have_gdml}
|
|
;;
|
|
qt)
|
|
echo ${have_qt}
|
|
;;
|
|
motif)
|
|
echo ${have_motif}
|
|
;;
|
|
raytracer-x11)
|
|
echo ${have_raytracerx11}
|
|
;;
|
|
opengl-x11)
|
|
echo ${have_openglx11}
|
|
;;
|
|
openinventor)
|
|
echo ${have_openinventor}
|
|
;;
|
|
*)
|
|
echo "no"
|
|
;;
|
|
esac
|
|
;;
|
|
|
|
-?)
|
|
help
|
|
;;
|
|
|
|
--help)
|
|
help
|
|
;;
|
|
|
|
--usage)
|
|
usage
|
|
;;
|
|
|
|
*)
|
|
usage
|
|
;;
|
|
esac
|
|
|
|
shift
|
|
done
|
|
|
|
# Finally...
|
|
exit 0
|