[472] | 1 | case $CONFIG in |
---|
| 2 | '') |
---|
| 3 | if test -f config.sh; then TOP=.; |
---|
| 4 | elif test -f ../config.sh; then TOP=..; |
---|
| 5 | elif test -f ../../config.sh; then TOP=../..; |
---|
| 6 | elif test -f ../../../config.sh; then TOP=../../..; |
---|
| 7 | elif test -f ../../../../config.sh; then TOP=../../../..; |
---|
| 8 | else |
---|
| 9 | echo "Can't find config.sh."; exit 1 |
---|
| 10 | fi |
---|
| 11 | . $TOP/config.sh |
---|
| 12 | ;; |
---|
| 13 | esac |
---|
| 14 | : This forces SH files to create target in same directory as SH file. |
---|
| 15 | : This is so that make depend always knows where to find SH derivatives. |
---|
| 16 | case "$0" in |
---|
| 17 | */*) cd `expr X$0 : 'X\(.*\)/'` ;; |
---|
| 18 | esac |
---|
| 19 | #echo "Extracting env.csh (with variable substitutions)" |
---|
| 20 | : This section of the file will have variable substitutions done on it. |
---|
| 21 | : Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!. |
---|
| 22 | : Protect any dollar signs and backticks that you do not want interpreted |
---|
| 23 | : by putting a backslash in front. You may delete these comments. |
---|
| 24 | $spitshell >env.csh <<!GROK!THIS! |
---|
| 25 | ###################################### |
---|
| 26 | # |
---|
| 27 | # g4system.U |
---|
| 28 | # |
---|
| 29 | #+ |
---|
| 30 | setenv G4SYSTEM "$g4system" |
---|
| 31 | echo "On this machine the G4SYSTEM=\$G4SYSTEM" |
---|
| 32 | |
---|
| 33 | # |
---|
| 34 | # g4dirs.U |
---|
| 35 | # |
---|
| 36 | #+ |
---|
| 37 | if ( X$g4install != X$g4final_install ) then |
---|
| 38 | setenv G4INSTALL "$g4final_install/src/geant4" |
---|
| 39 | echo "On this machine the G4INSTALL=\$G4INSTALL" |
---|
| 40 | else |
---|
| 41 | setenv G4INSTALL "$g4install" |
---|
| 42 | echo "On this machine the G4INSTALL=\$G4INSTALL" |
---|
| 43 | endif |
---|
| 44 | |
---|
| 45 | #+ |
---|
| 46 | if ( X$g4includes_flag != Xn ) then |
---|
| 47 | if ( X$g4install != X$g4final_install ) then |
---|
| 48 | setenv G4INCLUDE "$g4final_install/include/geant4" |
---|
| 49 | else |
---|
| 50 | setenv G4INCLUDE "$g4final_install/include" |
---|
| 51 | endif |
---|
| 52 | echo "On this machine the G4INCLUDE=\$G4INCLUDE" |
---|
| 53 | #else |
---|
| 54 | #setenv G4BASE "$g4final_install/include/geant4/source" |
---|
| 55 | #echo "On this machine the G4BASE=\$G4BASE" |
---|
| 56 | endif |
---|
| 57 | |
---|
| 58 | #+ |
---|
| 59 | if ( X$g4lib != X ) then |
---|
| 60 | if ( X$g4install != X$g4final_install ) then |
---|
| 61 | setenv G4LIB "$g4final_install/lib/geant4" |
---|
| 62 | else |
---|
| 63 | setenv G4LIB "$g4final_install/lib" |
---|
| 64 | endif |
---|
| 65 | echo "On this machine the G4LIB=\$G4LIB" |
---|
| 66 | endif |
---|
| 67 | |
---|
| 68 | #+ |
---|
| 69 | if ( X$g4levelgammadata != X ) then |
---|
| 70 | setenv G4LEVELGAMMADATA "$g4levelgammadata" |
---|
| 71 | echo "On this machine the G4LEVELGAMMADATA=\$G4LEVELGAMMADATA" |
---|
| 72 | endif |
---|
| 73 | |
---|
| 74 | #+ |
---|
| 75 | if ( X$g4radioactivedata != X ) then |
---|
| 76 | setenv G4RADIOACTIVEDATA "$g4radioactivedata" |
---|
| 77 | echo "On this machine the G4RADIOACTIVEDATA=\$G4RADIOACTIVEDATA" |
---|
| 78 | endif |
---|
| 79 | |
---|
| 80 | #+ |
---|
| 81 | if ( X$g4ledata != X ) then |
---|
| 82 | setenv G4LEDATA "$g4ledata" |
---|
| 83 | echo "On this machine the G4LEDATA=\$G4LEDATA" |
---|
| 84 | endif |
---|
| 85 | |
---|
| 86 | #+ |
---|
| 87 | if ( X$g4neutronhpcrosssections != X ) then |
---|
| 88 | setenv NeutronHPCrossSections "$g4neutronhpcrosssections" |
---|
| 89 | echo "On this machine the NeutronHPCrossSections=\$NeutronHPCrossSections" |
---|
| 90 | endif |
---|
| 91 | |
---|
| 92 | #+ |
---|
| 93 | if ( X$g4elasticdata != X ) then |
---|
| 94 | setenv G4ELASTICDATA "$g4elasticdata" |
---|
| 95 | echo "On this machine the G4ELASTICDATA=\$G4ELASTICDATA" |
---|
| 96 | endif |
---|
| 97 | |
---|
| 98 | # |
---|
| 99 | # g4clhep.U |
---|
| 100 | # |
---|
| 101 | if ( X$g4clhep_base_dir != X ) then |
---|
| 102 | setenv CLHEP_BASE_DIR "$g4clhep_base_dir" |
---|
| 103 | echo "On this machine the CLHEP_BASE_DIR=\$CLHEP_BASE_DIR" |
---|
| 104 | endif |
---|
| 105 | |
---|
| 106 | #+ |
---|
| 107 | if ( X$g4clhep_include_dir != X ) then |
---|
| 108 | setenv CLHEP_INCLUDE_DIR "$g4clhep_include_dir" |
---|
| 109 | echo "On this machine the CLHEP_INCLUDE_DIR=\$CLHEP_INCLUDE_DIR" |
---|
| 110 | endif |
---|
| 111 | |
---|
| 112 | #+ |
---|
| 113 | if ( X$g4clhep_lib_dir != X ) then |
---|
| 114 | setenv CLHEP_LIB_DIR "$g4clhep_lib_dir" |
---|
| 115 | echo "On this machine the CLHEP_LIB_DIR=\$CLHEP_LIB_DIR" |
---|
| 116 | endif |
---|
| 117 | |
---|
| 118 | #+ |
---|
| 119 | if ( X$g4clhep_lib != X ) then |
---|
| 120 | setenv CLHEP_LIB "$g4clhep_lib" |
---|
| 121 | echo "On this machine the CLHEP_LIB=\$CLHEP_LIB" |
---|
| 122 | endif |
---|
| 123 | |
---|
| 124 | #+ |
---|
| 125 | # |
---|
| 126 | # g4debug |
---|
| 127 | # |
---|
| 128 | if ( X$g4debug != X ) then |
---|
| 129 | setenv G4DEBUG "$g4debug" |
---|
| 130 | echo "On this machine the G4DEBUG=\$G4DEBUG" |
---|
| 131 | endif |
---|
| 132 | |
---|
| 133 | # |
---|
| 134 | # g4analysis |
---|
| 135 | # |
---|
| 136 | #+ |
---|
| 137 | if ( X$g4wanalysis_use == Xy ) then |
---|
| 138 | setenv G4ANALYSIS_USE 1 |
---|
| 139 | echo "On this machine the G4ANALYSIS_USE=\$G4ANALYSIS_USE" |
---|
| 140 | endif |
---|
| 141 | |
---|
| 142 | # |
---|
| 143 | # g4ui |
---|
| 144 | # |
---|
| 145 | #+ |
---|
| 146 | if ( X$g4ui_build_xaw_session == Xy ) then |
---|
| 147 | setenv G4UI_BUILD_XAW_SESSION 1 |
---|
| 148 | echo "On this machine the G4UI_BUILD_XAW_SESSION=\$G4UI_BUILD_XAW_SESSION" |
---|
| 149 | endif |
---|
| 150 | |
---|
| 151 | #+ |
---|
| 152 | if ( X$g4ui_use_xaw == Xy ) then |
---|
| 153 | setenv G4UI_USE_XAW 1 |
---|
| 154 | echo "On this machine the G4UI_USE_XAW=\$G4UI_USE_XAW" |
---|
| 155 | endif |
---|
| 156 | |
---|
| 157 | #+ |
---|
| 158 | if ( X$g4ui_build_xm_session == Xy ) then |
---|
| 159 | setenv G4UI_BUILD_XM_SESSION 1 |
---|
| 160 | echo "On this machine the G4UI_BUILD_XM_SESSION=\$G4UI_BUILD_XM_SESSION" |
---|
| 161 | endif |
---|
| 162 | |
---|
| 163 | #+ |
---|
| 164 | if ( X$g4ui_use_xm == Xy ) then |
---|
| 165 | setenv G4UI_USE_XM 1 |
---|
| 166 | echo "On this machine the G4UI_USE_XM=\$G4UI_USE_XM" |
---|
| 167 | endif |
---|
| 168 | |
---|
| 169 | #+ |
---|
| 170 | if ( X$g4ui_build_win32_session == Xy ) then |
---|
| 171 | setenv G4UI_BUILD_WIN32_SESSION 1 |
---|
| 172 | echo "On this machine the G4UI_BUILD_WIN32_SESSION=\$G4UI_BUILD_WIN32_SESSION" |
---|
| 173 | endif |
---|
| 174 | |
---|
| 175 | #+ |
---|
| 176 | if ( X$g4ui_use_win32 == Xy ) then |
---|
| 177 | setenv G4UI_USE_WIN32 1 |
---|
| 178 | echo "On this machine the G4UI_USE_WIN32=\$G4UI_USE_WIN32" |
---|
| 179 | endif |
---|
| 180 | |
---|
| 181 | # |
---|
| 182 | # g4vis |
---|
| 183 | # |
---|
| 184 | #+ |
---|
| 185 | if ( X$g4vis_build_dawn_driver == Xy ) then |
---|
| 186 | setenv G4VIS_BUILD_DAWN_DRIVER 1 |
---|
| 187 | echo "On this machine the G4VIS_BUILD_DAWN_DRIVER=\$G4VIS_BUILD_DAWN_DRIVER" |
---|
| 188 | endif |
---|
| 189 | |
---|
| 190 | #+ |
---|
| 191 | if ( X$g4vis_build_openglx_driver == Xy ) then |
---|
| 192 | setenv G4VIS_BUILD_OPENGLX_DRIVER 1 |
---|
| 193 | echo "On this machine the G4VIS_BUILD_OPENGLX_DRIVER=\$G4VIS_BUILD_OPENGLX_DRIVER" |
---|
| 194 | endif |
---|
| 195 | |
---|
| 196 | #+ |
---|
| 197 | if ( X$g4vis_build_openglxm_driver == Xy ) then |
---|
| 198 | setenv G4VIS_BUILD_OPENGLXM_DRIVER 1 |
---|
| 199 | echo "On this machine the G4VIS_BUILD_OPENGLXM_DRIVER=\$G4VIS_BUILD_OPENGLXM_DRIVER" |
---|
| 200 | endif |
---|
| 201 | |
---|
| 202 | #+ |
---|
| 203 | if ( X$g4vis_build_openglwin32_driver == Xy ) then |
---|
| 204 | setenv G4VIS_BUILD_OPENGLWIN32_DRIVER 1 |
---|
| 205 | echo "On this machine the G4VIS_BUILD_OPENGLWIN32_DRIVER=\$G4VIS_BUILD_OPENGLWIN32_DRIVER" |
---|
| 206 | endif |
---|
| 207 | |
---|
| 208 | #+ |
---|
| 209 | if ( X$g4vis_build_oix_driver == Xy ) then |
---|
| 210 | setenv G4VIS_BUILD_OIX_DRIVER 1 |
---|
| 211 | echo "On this machine the G4VIS_BUILD_OIX_DRIVER=\$G4VIS_BUILD_OIX_DRIVER" |
---|
| 212 | endif |
---|
| 213 | |
---|
| 214 | #+ |
---|
| 215 | if ( X$g4vis_build_raytracerx_driver == Xy ) then |
---|
| 216 | setenv G4VIS_BUILD_RAYTRACERX_DRIVER 1 |
---|
| 217 | echo "On this machine the G4VIS_BUILD_RAYTRACERX_DRIVER=\$G4VIS_BUILD_RAYTRACERX_DRIVER" |
---|
| 218 | endif |
---|
| 219 | |
---|
| 220 | #+ |
---|
| 221 | if ( X$g4vis_build_oiwin32_driver == Xy ) then |
---|
| 222 | setenv G4VIS_BUILD_OIWIN32_DRIVER 1 |
---|
| 223 | echo "On this machine the G4VIS_BUILD_OIWIN32_DRIVER=\$G4VIS_BUILD_OIWIN32_DRIVER" |
---|
| 224 | endif |
---|
| 225 | |
---|
| 226 | #+ |
---|
| 227 | if ( X$g4vis_build_vrml_driver == Xy ) then |
---|
| 228 | setenv G4VIS_BUILD_VRML_DRIVER 1 |
---|
| 229 | echo "On this machine the G4VIS_BUILD_VRML_DRIVER=\$G4VIS_BUILD_VRML_DRIVER" |
---|
| 230 | endif |
---|
| 231 | |
---|
| 232 | #+ |
---|
| 233 | if ( X$g4vis_use_dawn == Xy ) then |
---|
| 234 | setenv G4VIS_USE_DAWN 1 |
---|
| 235 | echo "On this machine the G4VIS_USE_DAWN=\$G4VIS_USE_DAWN" |
---|
| 236 | endif |
---|
| 237 | |
---|
| 238 | #+ |
---|
| 239 | if ( X$g4vis_use_openglx == Xy ) then |
---|
| 240 | setenv G4VIS_USE_OPENGLX 1 |
---|
| 241 | echo "On this machine the G4VIS_USE_OPENGLX=\$G4VIS_USE_OPENGLX" |
---|
| 242 | endif |
---|
| 243 | |
---|
| 244 | #+ |
---|
| 245 | if ( X$g4vis_use_openglxm == Xy ) then |
---|
| 246 | setenv G4VIS_USE_OPENGLXM 1 |
---|
| 247 | echo "On this machine the G4VIS_USE_OPENGLXM=\$G4VIS_USE_OPENGLXM" |
---|
| 248 | endif |
---|
| 249 | |
---|
| 250 | #+ |
---|
| 251 | if ( X$g4vis_use_openglwin32 == Xy ) then |
---|
| 252 | setenv G4VIS_USE_OPENGLWIN32 1 |
---|
| 253 | echo "On this machine the G4VIS_USE_OPENGLWIN32=\$G4VIS_USE_OPENGLWIN32" |
---|
| 254 | endif |
---|
| 255 | |
---|
| 256 | #+ |
---|
| 257 | if ( X$g4vis_use_oix == Xy ) then |
---|
| 258 | setenv G4VIS_USE_OIX 1 |
---|
| 259 | echo "On this machine the G4VIS_USE_OIX=\$G4VIS_USE_OIX" |
---|
| 260 | endif |
---|
| 261 | |
---|
| 262 | #+ |
---|
| 263 | if ( X$g4vis_use_raytracerx == Xy ) then |
---|
| 264 | setenv G4VIS_USE_RAYTRACERX 1 |
---|
| 265 | echo "On this machine the G4VIS_USE_RAYTRACERX=\$G4VIS_USE_RAYTRACERX" |
---|
| 266 | endif |
---|
| 267 | |
---|
| 268 | #+ |
---|
| 269 | if ( X$g4vis_use_oiwin32 == Xy ) then |
---|
| 270 | setenv G4VIS_USE_OIWIN32 1 |
---|
| 271 | echo "On this machine the G4VIS_USE_OIWIN32=\$G4VIS_USE_OIWIN32" |
---|
| 272 | endif |
---|
| 273 | |
---|
| 274 | #+ |
---|
| 275 | if ( X$g4vis_use_vrml == Xy ) then |
---|
| 276 | setenv G4VIS_USE_VRML 1 |
---|
| 277 | echo "On this machine the G4VIS_USE_VRML=\$G4VIS_USE_VRML" |
---|
| 278 | endif |
---|
| 279 | |
---|
| 280 | #+ |
---|
| 281 | if ( X$g4vis_oglhome != X ) then |
---|
| 282 | setenv OGLHOME "$g4vis_oglhome" |
---|
| 283 | echo "On this machine the OGLHOME=\$OGLHOME" |
---|
| 284 | endif |
---|
| 285 | |
---|
| 286 | #+ |
---|
| 287 | if ( X$g4vis_oivhome != X ) then |
---|
| 288 | setenv OIVHOME "$g4vis_oivhome" |
---|
| 289 | echo "On this machine the OIVHOME=\$OIVHOME" |
---|
| 290 | endif |
---|
| 291 | |
---|
| 292 | #+ |
---|
| 293 | if ( X$g4vis_build_openglxm_driver != X ) then |
---|
| 294 | setenv XMFLAGS "$g4vis_xmflags" |
---|
| 295 | echo "On this machine the XMFLAGS=\$XMFLAGS" |
---|
| 296 | endif |
---|
| 297 | |
---|
| 298 | #+ |
---|
| 299 | if ( X$g4vis_build_openglxm_driver != X ) then |
---|
| 300 | setenv XMLIBS "$g4vis_xmlibs" |
---|
| 301 | echo "On this machine the XMLIBS=\$XMLIBS" |
---|
| 302 | endif |
---|
| 303 | |
---|
| 304 | #+ |
---|
| 305 | if ( X$g4ui_build_xm_session != X ) then |
---|
| 306 | setenv XMFLAGS "$g4vis_xmflags" |
---|
| 307 | echo "On this machine the XMFLAGS=\$XMFLAGS" |
---|
| 308 | endif |
---|
| 309 | |
---|
| 310 | #+ |
---|
| 311 | if ( X$g4ui_build_xm_session != X ) then |
---|
| 312 | setenv XMLIBS "$g4vis_xmlibs" |
---|
| 313 | echo "On this machine the XMLIBS=\$XMLIBS" |
---|
| 314 | endif |
---|
| 315 | |
---|
| 316 | #+ |
---|
| 317 | if ( X$g4ui_build_xaw_session != X ) then |
---|
| 318 | setenv XAWFLAGS "$g4ui_xawflags" |
---|
| 319 | echo "On this machine the XAWFLAGS=\$XAWFLAGS" |
---|
| 320 | endif |
---|
| 321 | |
---|
| 322 | #+ |
---|
| 323 | if ( X$g4ui_build_xaw_session != X ) then |
---|
| 324 | setenv XAWLIBS "$g4ui_xawlibs" |
---|
| 325 | echo "On this machine the XAWLIBS=\$XAWLIBS" |
---|
| 326 | endif |
---|
| 327 | |
---|
| 328 | # |
---|
| 329 | # Use G3TOG4 module |
---|
| 330 | # |
---|
| 331 | #+ |
---|
| 332 | if ( X$g4wlib_build_g3tog4 == Xy ) then |
---|
| 333 | setenv G4LIB_BUILD_G3TOG4 1 |
---|
| 334 | echo "On this machine the G4LIB_BUILD_G3TOG4=\$G4LIB_BUILD_G3TOG4" |
---|
| 335 | endif |
---|
| 336 | |
---|
| 337 | if ( X$g4w_use_g3tog4 == Xy ) then |
---|
| 338 | setenv G4LIB_USE_G3TOG4 1 |
---|
| 339 | echo "On this machine the G4LIB_USE_G3TOG4=\$G4LIB_USE_G3TOG4" |
---|
| 340 | endif |
---|
| 341 | |
---|
| 342 | |
---|
| 343 | # |
---|
| 344 | # Use ZLIB module |
---|
| 345 | # |
---|
| 346 | #+ |
---|
| 347 | if ( X$g4wlib_build_zlib == Xy ) then |
---|
| 348 | setenv G4LIB_BUILD_ZLIB 1 |
---|
| 349 | echo "On this machine the G4LIB_BUILD_ZLIB=\$G4LIB_BUILD_ZLIB" |
---|
| 350 | endif |
---|
| 351 | |
---|
| 352 | if ( X$g4w_use_ZLIB == Xy ) then |
---|
| 353 | setenv G4LIB_USE_ZLIB 1 |
---|
| 354 | echo "On this machine the G4LIB_USE_ZLIB=\$G4LIB_USE_ZLIB" |
---|
| 355 | endif |
---|
| 356 | |
---|
| 357 | #+ |
---|
| 358 | # |
---|
| 359 | # g4shared |
---|
| 360 | # |
---|
| 361 | if ( X$g4lib_build_shared == Xy ) then |
---|
| 362 | setenv G4LIB_BUILD_SHARED 1 |
---|
| 363 | echo "On this machine the G4LIB_BUILD_SHARED=\$G4LIB_BUILD_SHARED" |
---|
| 364 | endif |
---|
| 365 | |
---|
| 366 | if ( X$g4lib_build_static == Xy ) then |
---|
| 367 | setenv G4LIB_BUILD_STATIC 1 |
---|
| 368 | echo "On this machine the G4LIB_BUILD_STATIC=\$G4LIB_BUILD_STATIC" |
---|
| 369 | endif |
---|
| 370 | |
---|
| 371 | #+ |
---|
| 372 | # |
---|
| 373 | # g4granular |
---|
| 374 | # |
---|
| 375 | if ( X$g4lib_use_granular == Xy ) then |
---|
| 376 | setenv G4LIB_USE_GRANULAR 1 |
---|
| 377 | echo "On this machine the G4LIB_USE_GRANULAR=\$G4LIB_USE_GRANULAR" |
---|
| 378 | endif |
---|
| 379 | |
---|
| 380 | # Check for Windows! |
---|
| 381 | if ( "X\$G4SYSTEM" != "XWIN32-VC" && "X\$G4SYSTEM" != "XWIN32-VC7" ) then |
---|
| 382 | setenv G4UI_USE_TCSH 1 |
---|
| 383 | echo "On this machine the G4UI_USE_TCSH=\$G4UI_USE_TCSH" |
---|
| 384 | endif |
---|
| 385 | |
---|
| 386 | ##################################################################### |
---|
| 387 | |
---|
| 388 | !GROK!THIS! |
---|
| 389 | |
---|
| 390 | : In the following dollars and backticks do not need the extra backslash. |
---|
| 391 | $spitshell >>env.csh <<'!NO!SUBS!' |
---|
| 392 | |
---|
| 393 | |
---|
| 394 | #+ |
---|
| 395 | # |
---|
| 396 | # G4WORKDIR |
---|
| 397 | # |
---|
| 398 | if ( ${?G4WORKDIR} ) then |
---|
| 399 | echo "In your environment you have the G4WORKDIR=$G4WORKDIR" |
---|
| 400 | else |
---|
| 401 | # Check for Windows! |
---|
| 402 | if ( "X$G4SYSTEM" == "XWIN32-VC" || "X$G4SYSTEM" == "XWIN32-VC7" ) then |
---|
| 403 | |
---|
| 404 | echo "G4WORKDIR will be set to c:/geant4 (in "native" Windows syntax)." |
---|
| 405 | setenv G4WORKDIR "c:/geant4" |
---|
| 406 | |
---|
| 407 | else # if Unix |
---|
| 408 | |
---|
| 409 | echo "G4WORKDIR will be set to HOME/geant4=$HOME/geant4" |
---|
| 410 | setenv G4WORKDIR $HOME/geant4 |
---|
| 411 | |
---|
| 412 | endif |
---|
| 413 | endif |
---|
| 414 | |
---|
| 415 | # |
---|
| 416 | # Shared libraries |
---|
| 417 | # |
---|
| 418 | if ( ${?G4LIB_BUILD_SHARED} ) then |
---|
| 419 | if ( ${?LD_LIBRARY_PATH} ) then |
---|
| 420 | setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${G4LIB}/${G4SYSTEM} |
---|
| 421 | else |
---|
| 422 | setenv LD_LIBRARY_PATH ${G4LIB}/${G4SYSTEM} |
---|
| 423 | endif |
---|
| 424 | endif |
---|
| 425 | |
---|
| 426 | # |
---|
| 427 | # For BIN |
---|
| 428 | # |
---|
| 429 | setenv PATH ${PATH}:${G4WORKDIR}/bin/${G4SYSTEM} |
---|
| 430 | |
---|
| 431 | !NO!SUBS! |
---|
| 432 | chmod 755 env.csh |
---|
| 433 | $eunicefix env.csh |
---|