case $CONFIG in '') if test -f config.sh; then TOP=.; elif test -f ../config.sh; then TOP=..; elif test -f ../../config.sh; then TOP=../..; elif test -f ../../../config.sh; then TOP=../../..; elif test -f ../../../../config.sh; then TOP=../../../..; else echo "Can't find config.sh."; exit 1 fi . $TOP/config.sh ;; esac : This forces SH files to create target in same directory as SH file. : This is so that make depend always knows where to find SH derivatives. case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac #echo "Extracting env.sh (with variable substitutions)" : This section of the file will have variable substitutions done on it. : Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!. : Protect any dollar signs and backticks that you do not want interpreted : by putting a backslash in front. You may delete these comments. $spitshell >env.sh <>env.sh <<'!NO!SUBS!' #+ # # G4WORKDIR # if [ $G4WORKDIR ] ; then if [ X\$g4non_display = X ] ; then echo "In your environment you have the G4WORKDIR=$G4WORKDIR" fi else # Check for Windows! if test "X$G4SYSTEM" = "XWIN32-VC" -o "X$G4SYSTEM" = "XWIN32-VC7"; then if [ X\$g4non_display = X ] ; then echo "G4WORKDIR will be set to c:/geant4 (in "native" Windows syntax)" fi G4WORKDIR="c:/geant4" export G4WORKDIR else # if Unix if [ X\$g4non_display = X ] ; then echo "G4WORKDIR will be set to HOME/geant4=$HOME/geant4" fi G4WORKDIR=$HOME/geant4 export G4WORKDIR fi # if platforms fi # # *NIX Shared Libraries # If we built Geant4 with shared libraries, we need to add the Gean4 # library directory to (DY)LD_LIBRARY_PATH. # In all cases, external shared library directories should be added to # (DY)LD_LIBRARY_PATH if test "X$G4SYSTEM" != "XDarwin-g++" ; then if [ $LD_LIBRARY_PATH ] ; then if [ $G4LIB_BUILD_SHARED ] ; then LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${G4LIB}/${G4SYSTEM} fi LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${CLHEP_LIB_DIR} if [ $G4LIB_BUILD_GDML ] ; then LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${XERCESCROOT}/lib fi export LD_LIBRARY_PATH else if [ $G4LIB_BUILD_SHARED ] ; then LD_LIBRARY_PATH=${G4LIB}/${G4SYSTEM} LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${CLHEP_LIB_DIR} else LD_LIBRARY_PATH=${CLHEP_LIB_DIR} fi if [ $G4LIB_BUILD_GDML ] ; then LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${XERCESCROOT}/lib fi export LD_LIBRARY_PATH fi else # # Shared libraries for Mac # if [ $DYLD_LIBRARY_PATH ] ; then if [ $G4LIB_BUILD_SHARED ] ; then DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${G4LIB}/${G4SYSTEM} fi DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${CLHEP_LIB_DIR} if [ $G4LIB_BUILD_GDML ] ; then DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${XERCESCROOT}/lib fi export DYLD_LIBRARY_PATH else if [ $G4LIB_BUILD_SHARED ] ; then DYLD_LIBRARY_PATH=${G4LIB}/${G4SYSTEM} DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${CLHEP_LIB_DIR} else DYLD_LIBRARY_PATH=${CLHEP_LIB_DIR} fi if [ $G4LIB_BUILD_GDML ] ; then DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${XERCESCROOT}/lib fi export DYLD_LIBRARY_PATH fi fi # # Warning about LD_LIBRARY_PATH # NB: ONLY echo if g4non_display not set if [ $G4LIB_BUILD_SHARED ] ; then if test "X$G4SYSTEM" = "XDarwin-g++" ; then if [ X\$g4non_display = X ] ; then echo 'DYLD_LIBRARY_PATH is set to include CLHEP and Geant4 libraries. ' fi else if [ X\$g4non_display = X ] ; then echo 'LD_LIBRARY_PATH is set to include CLHEP and Geant4 libraries. ' fi fi else if test "X$G4SYSTEM" = "XDarwin-g++" ; then if [ X\$g4non_display = X ] ; then echo 'DYLD_LIBRARY_PATH is set to include CLHEP libraries. ' fi else if [ X\$g4non_display = X ] ; then echo 'LD_LIBRARY_PATH is set to include CLHEP libraries. ' fi fi fi if [ X\$g4non_display = X ] ; then echo 'NOTE : you should verify that the correct path for the CLHEP library' echo '' echo ${CLHEP_BASE_DIR}/lib echo '' echo 'is included in the dynamic library search path ahead of any other' echo 'installations of CLHEP on your system that may be referenced by this' echo 'path.' echo '' fi # # For BIN # PATH=${PATH}:${G4WORKDIR}/bin/${G4SYSTEM} export PATH !NO!SUBS! chmod 755 env.sh $eunicefix env.sh