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