]> git.uio.no Git - u/mrichter/AliRoot.git/blob - AliGeant4/config/setup.csh
removed obsolete options AG4_STACKING, AG4_TOY; G4MAKESHLIB setting changed to G4LIB_...
[u/mrichter/AliRoot.git] / AliGeant4 / config / setup.csh
1 # $Id$
2 # ----------------------------------------------------------------
3 # This script sets the default environment variables for
4 # Alice Geant4 based prototype
5 # Options: -g     verbose mode
6 #          local  recomended local configuration
7 #   
8 # csh version by I.Gonzalez  18.2.2000
9
10
11
12 #
13 # ==================================================================
14 # Alice configuration options: Please define your selection with the
15 # variables below.
16 # ==================================================================
17
18
19 #
20 # ====== AG4_VERSION
21 # Geant4 version
22 # If set: the provided Geant4 version and not the default one is set
23 #setenv AG4_VERSION 2.0_test
24
25 #
26 # ====== AG4_VISUALIZE
27 # Set/Unset to get/avoid Geant4 visualisation.
28 setenv AG4_VISUALIZE 1
29 #unsetenv AG4_VISUALIZE
30
31 #
32 # ====== AG4_OPACS
33 # Set/Unset to get OPACS as a Geant4 visualisation driver.
34 #setenv AG4_OPACS 1
35 unsetenv AG4_OPACS
36
37 #
38 # ====== AG4_NOPHYSICS
39 # If set: only geantino or charged geantino can be shooted  
40 #setenv AG4_NOPHYSICS 1
41 unsetenv AG4_NOPHYSICS
42
43 #
44 # ====== AG4_MAKESHLIB
45 # If set: shared libraris are created
46 setenv AG4_MAKESHLIB 1
47 #unsetenv AG4_MAKESHLIB
48
49 #
50 # ====== AG4_ODBMS
51 # If set: the environment for using Objectivity is set. Not available on Linux?
52 #setenv AG4_ODBMS 1
53 unsetenv AG4_ODBMS
54
55
56 #
57 # Resolve input parameters
58 #
59 set VERBOSE = "NO"
60 set LOCAL = "NO"
61 foreach param ( $* )
62   switch ( $param )
63     case -g:
64       set VERBOSE="YES"; shift; breaksw;
65     case local:
66       set LOCAL="YES"; shift; breaksw;
67   endsw
68 end
69
70 #
71 # ==================================================================
72 # Key path variables
73 # ==================================================================
74 #
75
76 if ( "$LOCAL" == "NO" ) then
77   # 
78   # AFS
79   #
80
81   # ====== ALICE_BASE
82   # ALICE base directory
83   set ALICE_BASE = /afs/cern.ch/alice/offline
84
85   # ====== G4_BASE
86   # Geant4 base directory
87   set G4_BASE = ${ALICE_BASE}/geant4
88
89   # ====== LHCXX_BASE
90   # LHC++ base directory
91   set LHCXX_BASE = /afs/cern.ch/sw/lhcxx/specific/@sys
92
93   # ====== ROOT_BASE
94   # Root base directory  
95   set ROOT_BASE = /afs/cern.ch/alice/library/root
96   # to be removed after aCC support will be defined
97   # in the offline in a standard way    
98   if ( "`uname`" == "HP-UX" ) then 
99    set ROOT_BASE = /afs/cern.ch/alice/library/.hp_ux102/root.2.23.aCC
100   endif 
101
102   # ====== IRST_BASE
103   # IRST code check tool base directory
104   setenv IRST_BASE /afs/cern.ch/alice/offline/geant4/tools/IRST
105
106   # ====== OBJY_BASE
107   # Objectivity base directory
108   set OBJY_BASE = /afs/cern.ch/rd45/objectivity
109
110 else
111   # 
112   # recommended local installation
113   #
114
115   # ====== ALICE_BASE
116   # ALICE base directory
117   set ALICE_BASE = $HOME/dev
118
119   # ====== G4_BASE
120   # Geant4 base directory
121   set G4_BASE = $HOME/dev
122
123   # ====== LHCXX_BASE
124   # LHC++ base directory
125   set LHCXX_BASE = $HOME/dev
126
127   # ====== ROOT_BASE
128   # Root base directory  
129   set ROOT_BASE = $HOME/dev/root
130
131   # ====== IRST_BASE
132   # IRST code check tool base directory
133   setenv IRST_BASE $HOME/dev/tools/IRST
134
135 endif
136
137
138 #....................................... SKIP ................................
139 #
140 # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
141 # You should not need to change 
142 # the lines below this one
143 # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
144
145 # ====== AG4_INSTALL
146 # Alice Geant4 install directory
147 #
148 setenv AG4_INSTALL $ALICE_ROOT/AliGeant4
149
150 # Set variables depending on other variables
151 # if opacs is selected then select also visualize
152 if ( "$?AG4_OPACS" == 1 ) then
153   setenv AG4_VISUALIZE 1
154 endif
155
156 # Start the output
157 if ( "$VERBOSE" == "YES" ) then
158   echo " "
159   echo "    =========================================="
160   echo "      ALICE Geant4 environment configuration"
161   echo "    =========================================="
162
163   #
164   # Some output on the selections... 
165   #
166
167   if ("$?AG4_VISUALIZE" == 1) then
168     echo "Geant4 visualisation is     selected."
169   else
170     echo "Geant4 visualisation is NOT selected."
171   endif
172   if ("$?AG4_OPACS" == 1) then
173     echo "OPACS driver         is     selected."
174   else
175     echo "OPACS driver         is NOT selected."
176   endif
177   if ("$?AG4_NOPHYSICS" == 1) then
178     echo "Only geantino or charged geantino can be shooted."
179   else
180     echo "Full physics has been selected."
181   endif
182   if ("$?AG4_ODBMS" == 1) then
183     echo "The environment for using Objectivity will be set."
184   else
185     echo "No Geant4 Persistency."
186   endif
187
188 endif
189
190 #
191 # ROOT Alice definitions & options
192 # ==================================
193 #
194 if ( "$?ROOTSYS" == 0 ) then
195   setenv ROOTSYS ${ROOT_BASE}
196 endif
197 if ( "$VERBOSE" == "YES" ) then
198   echo " "
199   echo "ROOT"
200   echo "===="
201   echo ROOTSYS set to $ROOTSYS
202 endif
203
204 #
205 # ODBMS Alice definitions & options
206 # ==================================
207 #
208 if ( "$VERBOSE" == "YES" ) then
209   echo " "
210   echo "ODBMS & Objectivity"
211   echo "==================="
212 endif
213 if ( "$?AG4_ODBMS" == 1 ) then
214   if ( "$VERBOSE" == "YES" ) then
215     echo Setting ODBMS Alice definitions & options...
216   endif
217   setenv G4ODBMS 1
218   unsetenv AG4_VISUALIZE
219   setenv ALBOOT_DIR $AG4_INSTALL/ObjyDatabase
220   setenv ALBOOT_NAME Alice
221   setenv ALBOOT $ALBOOT_DIR/$ALBOOT_NAME
222   if ( ! -d $ALBOOT_DIR ) then
223     echo "  Making new directory $ALBOOT_DIR ..."
224     mkdir $ALBOOT_DIR
225   endif
226 else
227   if ( "$VERBOSE" == "YES" ) then
228     echo Unsetting ODBMS Alice definitions \& options...
229   endif
230   unsetenv G4ODBMS
231   unsetenv ALBOOT_DIR
232   unsetenv ALBOOT_NAME
233   unsetenv ALBOOT
234 endif
235 #
236 # Objectivity G4 options
237 # according to run/example5/g4odbms_setup.sh
238 #
239 if ( "$?G4ODBMS" == 1 ) then
240   setenv OBJY_VERS 4.0.2
241   if ( -r $OBJY_BASE/objyenv.csh ) then
242     source $OBJY_BASE/objyenv.csh
243     if ( "$VERBOSE" == "YES" ) then
244       echo "  Environment for Objectivity has been set."
245     endif
246   endif
247   setenv HEP_ODBMS_DIR ${LHCXX_BASE}/HepODBMS/0.0
248   setenv HEP_ODBMS_INCLUDES $HEP_ODBMS_DIR/include
249 endif
250
251
252 #
253 # Geant4  
254 # ==================================
255 #
256 if ( "$VERBOSE" == "YES" ) then
257   echo " "
258   echo "Geant4 env. variables..."
259   echo "============================"
260 endif
261 if ("$?AG4_VERSION" == 0) then
262   setenv G4INSTALL ${G4_BASE}/geant4
263 else
264   setenv G4INSTALL ${G4_BASE}/g4dev/geant4.${AG4_VERSION}
265 endif
266
267 if ("$?AG4_MAKESHLIB" == 0) then
268   unsetenv G4LIB_BUILD_SHARED
269 else  
270   setenv G4LIB_BUILD_SHARED 1
271 endif  
272
273 # path to data files needed by hadronic processes
274 setenv G4LEVELGAMMADATA ${G4INSTALL}/data/PhotonEvaporation
275
276 # This is architecture dependent...
277 set SYSTEM = `uname`
278 if ( $SYSTEM == "HP-UX" ) then
279   setenv G4SYSTEM "HP-aCC"
280   #setenv G4USE_OSPACE 1        # compiling with Object Space STL
281 endif 
282 if ( $SYSTEM == "Linux" ) then
283   setenv G4SYSTEM "Linux-g++"
284 endif
285 if ( $SYSTEM == "OSF1" ) then
286   setenv G4SYSTEM "DEC-cxx"
287   #setenv G4NO_STD_NAMESPACE 1  # compiling witn non ISO/ANSI setup
288 endif 
289 if ( $SYSTEM == "SunOS" ) then
290   setenv G4SYSTEM "SUN-CC"
291   setenv G4USE_OSPACE 1         # compiling with Object Space STL
292 endif 
293 if ( "$VERBOSE" == "YES" ) then
294   echo "Architecture is $SYSTEM"
295   echo "Geant4 is istalled in $G4INSTALL"
296   echo "Geant4 architecture type is $G4SYSTEM"
297   if ( "$?G4USE_OSPACE" == 1 ) then
298     echo "ObjectSpace will be used for STL"
299   endif
300 endif
301
302
303 #
304 # CLHEP
305 # ==================================
306 #
307
308 if ( -d $LHCXX_BASE/CLHEP/1.5.0.0 ) then
309   setenv CLHEP_BASE_DIR $LHCXX_BASE/CLHEP/1.6.0.0
310 else
311   echo "WARNING: CLHEP has not been found in the default path."
312   if ( "$VERBOSE" == "YES" ) then
313     echo "         Please set the variable CLHEP_BASE_DIR to its base path"
314     echo "         Example: setenv  CLHEP_BASE_DIR /afs/cern.ch/sw/lhcxx/specific/@sys/CLHEP/pro"
315   endif
316 endif
317 if ( "$VERBOSE" == "YES" ) then
318   echo "CLHEP base directory: $CLHEP_BASE_DIR"
319 endif
320
321
322 #
323 # Visualization
324 # ==================================
325 #
326
327 if ( "$?AG4_VISUALIZE" == 1 ) then
328   if ( "$VERBOSE" == "YES" ) then
329     echo "G4 Visualization env. variables..."
330   endif
331
332   #
333   # Xm UI
334   #
335   if ( "$VERBOSE" == "YES" ) then
336     echo "* X11 with Motif..."
337   endif
338   setenv G4UI_BUILD_XM_DRIVER  1
339   setenv G4UI_BUILD_XM_SESSION 1
340   setenv G4UI_USE_XM           1
341
342   #
343   # Fukui Renderer
344   #
345   if ( "$VERBOSE" == "YES" ) then
346     echo "* Fukui Renderer (DAWN)..."
347   endif
348   setenv G4VIS_BUILD_DAWN_DRIVER     1
349   setenv G4VIS_BUILD_DAWNFILE_DRIVER 1
350   setenv G4VIS_USE_DAWN              1
351   setenv G4VIS_USE_DAWNFILE          1
352   setenv G4DAWNFILE_VIEWER   david
353   setenv DAWN_HOME ${G4_BASE}/tools/bin
354   if ( "`echo ${PATH} | grep ${DAWN_HOME} `" == "" ) then
355     setenv PATH "${PATH}:${DAWN_HOME}"
356     rehash
357   endif
358   setenv G4DAWN_MULTI_WINDOW 1
359   if ( $SYSTEM == "Linux" ) then
360     setenv G4DAWN_NAMED_PIPE 1
361   endif
362
363   if ( "$VERBOSE" == "YES" ) then
364     if ("$?G4VIS_USE_DAWN" == 1) then
365       echo "  Dawn driver activated"
366     endif
367     if ("$?G4VIS_USE_DAWNFILE" == 1) then
368       echo "  Dawn file driver activated"
369     endif
370     if ("$?G4DAWNFILE_VIEWER" == 1) then
371       echo "  Dawn file viewer set to ${G4DAWNFILE_VIEWER}"
372     endif
373     if ("$?DAWN_HOME" == 1) then
374       echo "  Dawn home path set to ${DAWN_HOME}"
375     endif
376     if ("$?G4DAWN_MULTI_WINDOW" == 1) then
377       echo "  Dawn multi window selected"
378     endif
379     if ("$?G4DAWN_NAMED_PIPE" == 1) then
380       echo "  Dawn named pipe selected"
381     endif
382   endif
383
384   # David flags
385   # Set colors for overlappings
386   setenv DAVID_RAINBOW_FLAG 1
387   #setenv DAVID_HIGHLIGHT_COLOR_R  r
388   #setenv DAVID_HIGHLIGHT_COLOR_G  g
389   #setenv DAVID_HIGHLIGHT_COLOR_B  b
390
391   # If set volumes names are shown
392   setenv DAVID_DISPLAY_PVNAME   1
393   # If set supresses the call to dawn
394   #setenv DAVID_NO_VIEW  1
395   setenv DAVID_EPSILON_3D  0.001
396
397   if ( "$VERBOSE" == "YES" ) then
398     if ("$?DAVID_RAINBOW_FLAG" == 1) then
399       echo "  DAVID Rainbow mode is ON"
400     endif
401     if ("$?DAVID_HIGHLIGHT_COLOR_R" == 1) then
402       echo "  DAVID Highlight color (Red) set to ${DAVID_HIGHLIGHT_COLOR_R}"
403     endif
404     if ("$?DAVID_HIGHLIGHT_COLOR_G" == 1) then
405       echo "  DAVID Highlight color (Green) set to ${DAVID_HIGHLIGHT_COLOR_G}"
406     endif
407     if ("$?DAVID_HIGHLIGHT_COLOR_B" == 1) then
408       echo "  DAVID Highlight color (Blue) set to ${DAVID_HIGHLIGHT_COLOR_B}"
409     endif
410     if ("$?DAVID_DISPLAY_PVNAME" == 1) then
411       echo "  DAVID will display intersected volumes name"
412     endif
413     if ("$?DAVID_DISPLAY_PVNAME" == 1) then
414       echo "  Dawn will not be called from DAVID"
415     endif
416     if ("$?DAVID_EPSILON_3D" == 1) then
417       echo "  DAVID tolerance set to ${DAVID_EPSILON_3D}"
418     endif
419   endif
420
421   #
422   # OpenGL
423   #
424   if ( "$VERBOSE" == "YES" ) then
425     echo "* OpenGL..."
426   endif
427   setenv G4VIS_BUILD_OPENGLX_DRIVER  1
428   setenv G4VIS_BUILD_OPENGLXM_DRIVER 1
429   setenv G4VIS_USE_OPENGLX           1
430   setenv G4VIS_USE_OPENGLXM          1
431   setenv OGLHOME /usr/local
432   setenv OGLLIBS "-L$OGLHOME/lib -lMesaGLU -lMesaGL"
433   if ( $SYSTEM == "HP-UX" ) then
434     setenv OGLLIBS "-L/usr/lib ${OGLLIBS}"
435   endif
436   if ( $SYSTEM == "OSF1" ) then
437     # temporarily excluded
438     # due to problems with Root
439     unsetenv G4VIS_BUILD_OPENGLX_DRIVER
440     unsetenv G4VIS_BUILD_OPENGLXM_DRIVER
441     unsetenv G4VIS_USE_OPENGLX
442     unsetenv G4VIS_USE_OPENGLXM
443     unsetenv OGLHOME
444     unsetenv OGLLIBS
445   endif
446   if ( "$VERBOSE" == "YES" ) then
447     if ("$?G4VIS_USE_OPENGLX" == 1) then
448       echo "  OpenGL and  X11 driver activated"
449     endif
450     if ("$?G4VIS_USE_OPENGLXM" == 1) then
451       echo "  OpenGL with Motif extension driver activated"
452     endif
453     if ("$?OGLHOME" == 1) then
454       echo "  OpenGL path set to ${OGLHOME}"
455     endif
456     if ("$?OGLLIBS" == 1) then
457       echo "  OpenGL libraries set to ${OGLLIBS}"
458     endif
459   endif
460
461   #
462   # OpenInventor
463   #
464   if ( "$VERBOSE" == "YES" ) then
465     echo "* OpenInventor..."
466   endif
467   #setenv G4VIS_USE_OPENINVENTOR 1
468   #setenv OIHOME whatever
469   #setenv HEPVISDIR something
470   if ( "$VERBOSE" == "YES" ) then
471     if ("$?G4VIS_USE_OPENINVENTOR" == 1) then
472       echo "  OpenInventor driver activated"
473       echo "  OpenInventor path is ${OIHOME}"
474       echo "  HepVis path is ${HEPVISDIR}"
475     endif
476   endif
477
478   #
479   # VRML1
480   #
481   if ( "$VERBOSE" == "YES" ) then
482     echo "* VRML..."
483   endif
484   setenv G4VIS_BUILD_VRML_DRIVER        1
485   setenv G4VIS_BUILD_VRMLFILE_DRIVER    1
486   setenv G4VIS_USE_VRML                 1
487   setenv G4VIS_USE_VRMLFILE             1
488   #Set preferred vrml viewer to be invoked in this mode
489   setenv G4VRMLFILE_VIEWER vrweb
490   #Set host name for VRML1 visualization.... the g4vrmlview machine!
491   setenv G4VRML_HOST_NAME nohost
492   #Command to run java listener for VRML driver
493   #alias javavrml "java -classpath $G4_BASE/tools/bin/java g4vrmlview vrweb"
494
495   if ( "$VERBOSE" == "YES" ) then
496     if ("$?G4VIS_USE_VRML" == 1) then
497       echo "  VRML driver activated"
498       echo "  Host Name for remote visualization is ${G4VRML_HOST_NAME}"
499     endif
500     if ("$?G4VIS_USE_VRMLFILE" == 1) then
501       echo "  VRML file driver activated"
502       echo "  VRML viewer set to ${G4VRMLFILE_VIEWER}"
503     endif
504   endif
505
506   #
507   # Ray Tracer
508   #
509   if ( "$VERBOSE" == "YES" ) then
510     echo "* Ray Tracer..."
511   endif
512   #setenv G4VIS_BUILD_RAYTRACER_DRIVER 1
513   #setenv G4VIS_USE_RAYTRACER          1
514   if ( "$VERBOSE" == "YES" ) then
515     if ("$?G4VIS_USE_RAYTRACER" == 1) then
516       echo "  Ray tracing driver activated"
517     endif
518   endif
519
520   #
521   # GAG
522   #
523   if ( "$VERBOSE" == "YES" ) then
524     echo "* Geant Adaptative GUI (GAG)..."
525   endif
526   setenv G4UI_BUILD_GAG_SESSION 1
527   setenv G4UI_USE_GAG           1
528   setenv MOMOPATH     ${G4_BASE}/tools/GAG/tcltk
529   if ( "`echo ${PATH} | grep ${MOMOPATH} `" == "" ) then
530     setenv PATH "${PATH}:${MOMOPATH}"
531     rehash
532   endif
533   set    NCLASSPATH = ".:${G4_BASE}/tools/swing-1.0.3/swingall.jar:${G4_BASE}/tools/GAG/java/GAG.jar"
534   if ("$?CLASSPATH" == 0) then
535     setenv CLASSPATH $NCLASSPATH
536   else
537     if ( "`echo ${CLASSPATH} | grep ${NCLASSPATH} `" == "" ) then
538       setenv CLASSPATH "${CLASSPATH}:${NCLASSPATH}"
539     endif
540   endif
541
542   if ( "$VERBOSE" == "YES" ) then
543     if ("$?G4UI_USE_GAG" == 1) then
544       echo "  GAG UI activated"
545       echo "  Momo path set to $MOMOPATH"
546       echo "    NOTE: Run "\'tmomo\' "to use Momo (TK/Tcl version)"
547       echo "  The path to the java GAG code was updated"
548       echo "    NOTE: Run "\'java gag\'" to use GAG (java version)"
549     endif
550   endif
551
552 else
553   if ( "$VERBOSE" == "YES" ) then
554     echo Unsetting G4 Visualization env. variables...
555   endif
556
557   #XM
558   unsetenv G4UI_BUILD_XM_DRIVER
559   unsetenv G4UI_BUILD_XM_SESSION
560   unsetenv G4UI_USE_XM
561
562   # Dawn
563   unsetenv G4VIS_BUILD_DAWN_DRIVER
564   unsetenv G4VIS_BUILD_DAWNFILE_DRIVER
565   unsetenv G4VIS_USE_DAWN
566   unsetenv G4VIS_USE_DAWNFILE
567   unsetenv G4DAWNFILE_VIEWER
568   unsetenv DAWN_HOME
569   unsetenv G4DAWN_MULTI_WINDOW
570   if ( $SYSTEM == "Linux" ) then
571     unsetenv G4DAWN_NAMED_PIPE
572   endif
573
574   # David
575   unsetenv DAVID_RAINBOW_FLAG
576   unsetenv DAVID_HIGHLIGHT_COLOR_R
577   unsetenv DAVID_HIGHLIGHT_COLOR_G
578   unsetenv DAVID_HIGHLIGHT_COLOR_B
579   unsetenv DAVID_DISPLAY_PVNAME
580   unsetenv DAVID_NO_VIEW
581   unsetenv DAVID_EPSILON_3D
582   
583   # OpenGL
584   unsetenv G4VIS_BUILD_OPENGLX_DRIVER
585   unsetenv G4VIS_BUILD_OPENGLXM_DRIVER
586   unsetenv G4VIS_USE_OPENGLX
587   unsetenv G4VIS_USE_OPENGLXM
588   unsetenv OGLHOME
589   unsetenv OGLLIBS
590
591   # OpenInventor
592   unsetenv G4VIS_USE_OPENINVENTOR
593
594   # VRML1
595   unsetenv G4VIS_BUILD_VRML_DRIVER
596   unsetenv G4VIS_BUILD_VRMLFILE_DRIVER
597   unsetenv G4VIS_USE_VRML
598   unsetenv G4VIS_USE_VRMLFILE
599   unsetenv G4VRMLFILE_VIEWER
600   unsetenv G4VRML_HOST_NAME
601
602   # GAG
603   unsetenv G4UI_BUILD_GAG_SESSION
604   unsetenv G4UI_USE_GAG
605   unsetenv MOMOPATH
606
607 endif
608
609 #
610 # OPACS
611 #
612 if ( "$?AG4_OPACS" == 1 ) then
613   if ( "$VERBOSE" == "YES" ) then
614     echo "* OPACS..."
615   endif
616   setenv AG4_VISUALIZE 1
617
618   #
619   # OpenGL: needed by OPACS
620   #
621   setenv G4VIS_BUILD_OPENGLX_DRIVER 1
622   setenv G4VIS_USE_OPENGLX          1
623   setenv OGLHOME /usr/local
624   setenv OGLLIBS "-L$OGLHOME/lib -lMesaGLU -lMesaGL"
625   if ( $SYSTEM == "HP-UX" ) then
626     setenv OGLLIBS "-L/usr/lib ${OGLLIBS}"
627   endif
628
629   #
630   # OPACS
631   #
632   setenv G4VIS_BUILD_OPACS_DRIVER 1
633   setenv G4UI_BUILD_WO_DRIVER     1
634   setenv G4UI_BUILD_WO_SESSION    1
635   setenv G4VIS_USE_OPACS          1
636   setenv G4UI_USE_WO              1
637   setenv OPACS_HOME $G4_BASE/tools/OPACS
638   #setenv OPACS_HOME /afs/cern.ch/rd44/dev/OPACS
639   if ( $SYSTEM == "Linux" ) then
640     setenv G4_OPACS_WIDGET_SET lesstif
641   else
642     setenv G4_OPACS_WIDGET_SET Xm
643   endif
644   source $OPACS_HOME/OPACS/v3/setup.csh
645   setenv WOENVIRONMENT $AG4_INSTALL/bin/Alice.odb
646   setenv OPATH "$OPATH $G4INSTALL/environments/OPACS/usr"
647   if ( "$VERBOSE" == "YES" ) then
648     if ("$?G4VIS_USE_OPACS" == 1) then
649       echo "  OPACS driver activated"
650       echo "  OPACS path set to $OPACS_HOME"
651     endif
652   endif
653 else   
654   if ( "$VERBOSE" == "YES" ) then
655     echo "* Unsetting OPACS driver env. variables ..."
656   endif
657   unsetenv G4VIS_BUILD_OPACS_DRIVER
658   unsetenv G4UI_BUILD_WO_DRIVER
659   unsetenv G4UI_BUILD_WO_SESSION
660   unsetenv G4VIS_USE_OPACS
661   unsetenv G4UI_USE_WO
662   unsetenv OPACS_HOME
663   unsetenv G4_OPACS_WIDGET_SET
664   unsetenv G4OROOT
665   unsetenv WOENVIRONMENT
666   unsetenv OPATH
667 endif
668
669 #
670 # path to AliGeant4 config scripts
671 #  
672 if ( "`echo ${PATH} | grep ${AG4_INSTALL}/config `" == "" ) then
673   if ( "$VERBOSE" == "YES" ) then
674     echo Adding ${AG4_INSTALL}/config to the path...
675   endif
676   setenv PATH "${PATH}:${AG4_INSTALL}/config"
677 endif
678
679 #
680 # path to shared libraries
681
682 if ( $SYSTEM == "HP-UX" ) then
683   set SHLIBVAR = $SHLIB_PATH
684   set SHLIBVARNAME = SHLIB_PATH
685 endif 
686 if ( $SYSTEM == "Linux" ) then
687   set SHLIBVAR = $LD_LIBRARY_PATH
688   set SHLIBVARNAME = LD_LIBRARY_PATH
689 endif
690 if ( $SYSTEM == "OSF1" ) then
691   set SHLIBVAR = $LD_LIBRARY_PATH
692   set SHLIBVARNAME = LD_LIBRARY_PATH
693 endif
694 if ( $SYSTEM == "SunOS" ) then
695   set SHLIBVAR = $LD_LIBRARY_PATH
696   set SHLIBVARNAME = LD_LIBRARY_PATH
697 endif
698
699 if ( "`echo ${SHLIBVAR} | grep ${G4INSTALL}/lib/${G4SYSTEM} `" == "" ) then
700   if ( "$VERBOSE" == "YES" ) then
701     echo Adding ${G4INSTALL}/lib/${G4SYSTEM} to the shared libraries path...
702   endif
703   set SHLIBVAR="${G4INSTALL}/lib/${G4SYSTEM}:${SHLIBVAR}"
704 endif
705 if ( "`echo ${SHLIBVAR} | grep ${CLHEP_BASE_DIR}/lib `" == "" ) then
706   if ( "$VERBOSE" == "YES" ) then
707     echo Adding ${CLHEP_BASE_DIR}/lib to the shared libraries path...
708   endif
709   set SHLIBVAR="${SHLIBVAR}:${CLHEP_BASE_DIR}/lib"
710 endif
711
712 setenv $SHLIBVARNAME $SHLIBVAR
713
714
715 #
716 # Remove unneeded variables. If this is not done the vars. remain in the env.
717 #
718
719 unset ALICE_BASE
720 unset G4_BASE
721 unset LHCXX_BASE
722 unset OBJY_BASE
723 unset SYSTEM
724 unset NCLASSPATH
725 unset SHLIBVAR
726 unset SHLIBVARNAME
727 unset LOCAL
728 unset VERBOSE
729
730 echo "Default ALICE environment for GEANT4 has been set."