source: trunk/geant4/config/scripts/env.sh.SH @ 474

Last change on this file since 474 was 472, checked in by garnier, 17 years ago

r549@wl-72148: laurentgarnier | 2007-05-15 10:37:42 +0200
import de geant4

  • Property svn:executable set to *
File size: 12.6 KB
Line 
1case $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        ;;
13esac
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.
16case "$0" in
17*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
18esac
19#echo "Extracting env.sh (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.sh <<!GROK!THIS!
25######################################
26#
27# g4system.U
28#
29#+
30G4SYSTEM="$g4system"
31export G4SYSTEM
32if [ X\$g4non_display = X ] ; then
33echo "On this machine the G4SYSTEM=\$G4SYSTEM"
34fi
35
36#
37# g4dirs.U
38#
39#+
40if [ X$g4install != X$g4final_install ] ; then
41G4INSTALL="$g4final_install/src/geant4"
42else
43G4INSTALL="$g4install"
44fi
45export G4INSTALL
46if [ X\$g4non_display = X ] ; then
47echo "On this machine the G4INSTALL=\$G4INSTALL"
48fi
49
50#+
51if [ X$g4includes_flag != Xn ] ; then 
52if [ X$g4install != X$g4final_install ] ; then
53G4INCLUDE="$g4final_install/include/geant4"
54else
55G4INCLUDE="$g4install/include/"
56fi
57export G4INCLUDE
58if [ X\$g4non_display = X ] ; then
59echo "On this machine the G4INCLUDE=\$G4INCLUDE"
60fi
61#else
62#G4BASE="$g4final_install/include/geant4/source"
63#export G4BASE
64#if [ X\$g4non_display = X ] ; then
65#echo "On this machine the G4BASE=\$G4BASE"
66#fi
67fi
68
69#+
70if [ X$g4lib != X ] ; then 
71if [ X$g4install != X$g4final_install ] ; then
72G4LIB="$g4final_install/lib/geant4"
73else
74G4LIB="$g4install/lib"
75fi
76export G4LIB
77if [ X\$g4non_display = X ] ; then
78echo "On this machine the G4LIB=\$G4LIB"
79fi
80fi
81
82#+
83if [ X$g4levelgammadata != X ] ; then 
84G4LEVELGAMMADATA="$g4levelgammadata"
85export G4LEVELGAMMADATA
86if [ X\$g4non_display = X ] ; then
87echo "On this machine the G4LEVELGAMMADATA=\$G4LEVELGAMMADATA"
88fi
89fi
90
91#+
92if [ X$g4radioactivedata != X ] ; then 
93G4RADIOACTIVEDATA="$g4radioactivedata"
94export G4RADIOACTIVEDATA
95if [ X\$g4non_display = X ] ; then
96echo "On this machine the G4RADIOACTIVEDATA=\$G4RADIOACTIVEDATA"
97fi
98fi
99
100#+
101if [ X$g4ledata != X ] ; then 
102G4LEDATA="$g4ledata"
103export G4LEDATA
104if [ X\$g4non_display = X ] ; then
105echo "On this machine the G4LEDATA=\$G4LEDATA"
106fi
107fi
108
109#+
110if [ X$g4neutronhpcrosssections != X ] ; then 
111NeutronHPCrossSections="$g4neutronhpcrosssections"
112export NeutronHPCrossSections
113if [ X\$g4non_display = X ] ; then
114echo "On this machine the NeutronHPCrossSections=\$NeutronHPCrossSections"
115fi
116fi
117
118#+
119if [ X$g4elasticdata != X ] ; then 
120G4ELASTICDATA="$g4elasticdata"
121export G4ELASTICDATA
122if [ X\$g4non_display = X ] ; then
123echo "On this machine the G4ELASTICDATA=\$G4ELASTICDATA"
124fi
125fi
126
127#
128# g4clhep.U
129#
130if [ X$g4clhep_base_dir != X ] ; then 
131CLHEP_BASE_DIR="$g4clhep_base_dir"
132export CLHEP_BASE_DIR
133if [ X\$g4non_display = X ] ; then
134echo "On this machine the CLHEP_BASE_DIR=\$CLHEP_BASE_DIR"
135fi
136fi
137
138#+
139if [ X$g4clhep_include_dir != X ] ; then 
140CLHEP_INCLUDE_DIR="$g4clhep_include_dir"
141export CLHEP_INCLUDE_DIR
142if [ X\$g4non_display = X ] ; then
143echo "On this machine the CLHEP_INCLUDE_DIR=\$CLHEP_INCLUDE_DIR"
144fi
145fi
146
147#+
148if [ X$g4clhep_lib_dir != X ] ; then 
149CLHEP_LIB_DIR="$g4clhep_lib_dir"
150export CLHEP_LIB_DIR
151if [ X\$g4non_display = X ] ; then
152echo "On this machine the CLHEP_LIB_DIR=\$CLHEP_LIB_DIR"
153fi
154fi
155
156#+
157if [ X$g4clhep_lib != X ] ; then 
158CLHEP_LIB="$g4clhep_lib"
159export CLHEP_LIB
160if [ X\$g4non_display = X ] ; then
161echo "On this machine the CLHEP_LIB=\$CLHEP_LIB"
162fi
163fi
164
165#+
166#
167# g4debug
168#
169if [ X$g4debug != X ] ; then 
170G4DEBUG="$g4debug"
171export G4DEBUG
172if [ X\$g4non_display = X ] ; then
173echo "On this machine the G4DEBUG=\$G4DEBUG"
174fi
175fi
176
177#
178# g4analysis
179#
180#+
181if [ X$g4wanalysis_use = Xy ] ; then
182G4ANALYSIS_USE=1
183export G4ANALYSIS_USE
184if [ X\$g4non_display = X ] ; then
185echo "On this machine the G4ANALYSIS_USE=\$G4ANALYSIS_USE"
186fi
187fi 
188
189#
190# g4ui
191#
192#+
193if [ X$g4ui_build_xaw_session = Xy ] ; then
194G4UI_BUILD_XAW_SESSION=1
195export G4UI_BUILD_XAW_SESSION
196if [ X\$g4non_display = X ] ; then
197echo "On this machine the G4UI_BUILD_XAW_SESSION=\$G4UI_BUILD_XAW_SESSION"
198fi
199fi 
200
201#+
202if [ X$g4ui_use_xaw = Xy ] ; then
203G4UI_USE_XAW=1
204export G4UI_USE_XAW
205if [ X\$g4non_display = X ] ; then
206echo "On this machine the G4UI_USE_XAW=\$G4UI_USE_XAW"
207fi
208fi 
209
210#+
211if [ X$g4ui_build_xm_session = Xy ] ; then
212G4UI_BUILD_XM_SESSION=1
213export G4UI_BUILD_XM_SESSION
214if [ X\$g4non_display = X ] ; then
215echo "On this machine the G4UI_BUILD_XM_SESSION=\$G4UI_BUILD_XM_SESSION"
216fi
217fi 
218
219#+
220if [ X$g4ui_use_xm = Xy ] ; then
221G4UI_USE_XM=1
222export G4UI_USE_XM
223if [ X\$g4non_display = X ] ; then
224echo "On this machine the G4UI_USE_XM=\$G4UI_USE_XM"
225fi
226fi 
227
228#+
229if [ X$g4ui_build_win32_session = Xy ] ; then
230G4UI_BUILD_WIN32_SESSION=1
231export G4UI_BUILD_WIN32_SESSION
232if [ X\$g4non_display = X ] ; then
233echo "On this machine the G4UI_BUILD_WIN32_SESSION=\$G4UI_BUILD_WIN32_SESSION"
234fi
235fi 
236
237#+
238if [ X$g4ui_use_win32 = Xy ] ; then
239G4UI_USE_WIN32=1
240export G4UI_USE_WIN32
241if [ X\$g4non_display = X ] ; then
242echo "On this machine the G4UI_USE_WIN32=\$G4UI_USE_WIN32"
243fi
244fi 
245
246#
247# g4vis
248#
249#+
250if [ X$g4vis_build_dawn_driver = Xy ] ; then
251G4VIS_BUILD_DAWN_DRIVER=1
252export G4VIS_BUILD_DAWN_DRIVER
253if [ X\$g4non_display = X ] ; then
254echo "On this machine the G4VIS_BUILD_DAWN_DRIVER=\$G4VIS_BUILD_DAWN_DRIVER"
255fi
256fi 
257
258#+
259if [ X$g4vis_build_openglx_driver = Xy ] ; then
260G4VIS_BUILD_OPENGLX_DRIVER=1
261export G4VIS_BUILD_OPENGLX_DRIVER
262if [ X\$g4non_display = X ] ; then
263echo "On this machine the G4VIS_BUILD_OPENGLX_DRIVER=\$G4VIS_BUILD_OPENGLX_DRIVER"
264fi
265fi 
266
267#+
268if [ X$g4vis_build_openglxm_driver = Xy ] ; then
269G4VIS_BUILD_OPENGLXM_DRIVER=1
270export G4VIS_BUILD_OPENGLXM_DRIVER
271if [ X\$g4non_display = X ] ; then
272echo "On this machine the G4VIS_BUILD_OPENGLXM_DRIVER=\$G4VIS_BUILD_OPENGLXM_DRIVER"
273fi
274fi 
275
276#+
277if [ X$g4vis_build_openglwin32_driver = Xy ] ; then
278G4VIS_BUILD_OPENGLWIN32_DRIVER=1
279export G4VIS_BUILD_OPENGLWIN32_DRIVER
280if [ X\$g4non_display = X ] ; then
281echo "On this machine the G4VIS_BUILD_OPENGLWIN32_DRIVER=\$G4VIS_BUILD_OPENGLWIN32_DRIVER"
282fi
283fi 
284
285#+
286if [ X$g4vis_build_oix_driver = Xy ] ; then
287G4VIS_BUILD_OIX_DRIVER=1
288export G4VIS_BUILD_OIX_DRIVER
289if [ X\$g4non_display = X ] ; then
290echo "On this machine the G4VIS_BUILD_OIX_DRIVER=\$G4VIS_BUILD_OIX_DRIVER"
291fi
292fi 
293
294#+
295if [ X$g4vis_build_raytracerx_driver = Xy ] ; then
296G4VIS_BUILD_RAYTRACERX_DRIVER=1
297export G4VIS_BUILD_RAYTRACERX_DRIVER
298if [ X\$g4non_display = X ] ; then
299echo "On this machine the G4VIS_BUILD_RAYTRACERX_DRIVER=\$G4VIS_BUILD_RAYTRACERX_DRIVER"
300fi
301fi 
302
303#+
304if [ X$g4vis_build_oiwin32_driver = Xy ] ; then
305G4VIS_BUILD_OIWIN32_DRIVER=1
306export G4VIS_BUILD_OIWIN32_DRIVER
307if [ X\$g4non_display = X ] ; then
308echo "On this machine the G4VIS_BUILD_OIWIN32_DRIVER=\$G4VIS_BUILD_OIWIN32_DRIVER"
309fi
310fi 
311
312#+
313if [ X$g4vis_build_vrml_driver = Xy ] ; then
314G4VIS_BUILD_VRML_DRIVER=1
315export G4VIS_BUILD_VRML_DRIVER
316if [ X\$g4non_display = X ] ; then
317echo "On this machine the G4VIS_BUILD_VRML_DRIVER=\$G4VIS_BUILD_VRML_DRIVER"
318fi
319fi 
320
321#+
322if [ X$g4vis_use_dawn = Xy ] ; then
323G4VIS_USE_DAWN=1
324export G4VIS_USE_DAWN
325if [ X\$g4non_display = X ] ; then
326echo "On this machine the G4VIS_USE_DAWN=\$G4VIS_USE_DAWN"
327fi
328fi 
329
330#+
331if [ X$g4vis_use_openglx = Xy ] ; then
332G4VIS_USE_OPENGLX=1
333export G4VIS_USE_OPENGLX
334if [ X\$g4non_display = X ] ; then
335echo "On this machine the G4VIS_USE_OPENGLX=\$G4VIS_USE_OPENGLX"
336fi
337fi 
338
339#+
340if [ X$g4vis_use_openglxm = Xy ] ; then
341G4VIS_USE_OPENGLXM=1
342export G4VIS_USE_OPENGLXM
343if [ X\$g4non_display = X ] ; then
344echo "On this machine the G4VIS_USE_OPENGLXM=\$G4VIS_USE_OPENGLXM"
345fi
346fi 
347
348#+
349if [ X$g4vis_use_openglwin32 = Xy ] ; then
350G4VIS_USE_OPENGLWIN32=1
351export G4VIS_USE_OPENGLWIN32
352if [ X\$g4non_display = X ] ; then
353echo "On this machine the G4VIS_USE_OPENGLWIN32=\$G4VIS_USE_OPENGLWIN32"
354fi
355fi 
356
357#+
358if [ X$g4vis_use_oix = Xy ] ; then
359G4VIS_USE_OIX=1
360export G4VIS_USE_OIX
361if [ X\$g4non_display = X ] ; then
362echo "On this machine the G4VIS_USE_OIX=\$G4VIS_USE_OIX"
363fi
364fi 
365
366#+
367if [ X$g4vis_use_raytracerx = Xy ] ; then
368G4VIS_USE_RAYTRACERX=1
369export G4VIS_USE_RAYTRACERX
370if [ X\$g4non_display = X ] ; then
371echo "On this machine the G4VIS_USE_RAYTRACERX=\$G4VIS_USE_RAYTRACERX"
372fi
373fi 
374
375#+
376if [ X$g4vis_use_oiwin32 = Xy ] ; then
377G4VIS_USE_OIWIN32=1
378export G4VIS_USE_OIWIN32
379if [ X\$g4non_display = X ] ; then
380echo "On this machine the G4VIS_USE_OIWIN32=\$G4VIS_USE_OIWIN32"
381fi
382fi 
383
384#+
385if [ X$g4vis_use_vrml = Xy ] ; then
386G4VIS_USE_VRML=1
387export G4VIS_USE_VRML
388if [ X\$g4non_display = X ] ; then
389echo "On this machine the G4VIS_USE_VRML=\$G4VIS_USE_VRML"
390fi
391fi 
392
393#+
394if [ X$g4vis_oglhome != X ] ; then
395OGLHOME="$g4vis_oglhome"
396export OGLHOME
397if [ X\$g4non_display = X ] ; then
398echo "On this machine the OGLHOME=\$OGLHOME"
399fi
400fi 
401
402#+
403if [ X$g4vis_oivhome != X ] ; then
404OIVHOME="$g4vis_oivhome"
405export OIVHOME
406if [ X\$g4non_display = X ] ; then
407echo "On this machine the OIVHOME=\$OIVHOME"
408fi
409fi 
410
411#+
412if [ X$g4vis_build_openglxm_driver != X ] ; then
413XMFLAGS="$g4vis_xmflags"
414export XMFLAGS
415if [ X\$g4non_display = X ] ; then
416echo "On this machine the XMFLAGS=\$XMFLAGS"
417fi
418fi 
419
420#+
421if [ X$g4vis_build_openglxm_driver != X ] ; then
422XMLIBS="$g4vis_xmlibs"
423export XMLIBS
424if [ X\$g4non_display = X ] ; then
425echo "On this machine the XMLIBS=\$XMLIBS"
426fi
427fi 
428
429#+
430if [ X$g4ui_build_xm_session != X ] ; then
431XMFLAGS="$g4vis_xmflags"
432export XMFLAGS
433if [ X\$g4non_display = X ] ; then
434echo "On this machine the XMFLAGS=\$XMFLAGS"
435fi
436fi 
437
438#+
439if [ X$g4vis_build_xm_session != X ] ; then
440XMLIBS="$g4vis_xmlibs"
441export XMLIBS
442if [ X\$g4non_display = X ] ; then
443echo "On this machine the XMLIBS=\$XMLIBS"
444fi
445fi 
446
447#+
448if [ X$g4ui_build_xaw_session != X ] ; then
449XAWFLAGS="$g4ui_xawflags"
450export XAWFLAGS
451if [ X\$g4non_display = X ] ; then
452echo "On this machine the XAWFLAGS=\$XAWFLAGS"
453fi
454fi 
455
456#+
457if [ X$g4ui_build_xaw_session != X ] ; then
458XAWLIBS="$g4ui_xawlibs"
459export XAWLIBS
460if [ X\$g4non_display = X ] ; then
461echo "On this machine the XAWLIBS=\$XAWLIBS"
462fi
463fi 
464
465#
466# Use G3TOG4 module
467#
468#+
469if [ X$g4wlib_build_g3tog4 = Xy ] ; then
470G4LIB_BUILD_G3TOG4=1
471export G4LIB_BUILD_G3TOG4
472if [ X\$g4non_display = X ] ; then
473echo "On this machine the G4LIB_BUILD_G3TOG4=\$G4LIB_BUILD_G3TOG4"
474fi
475fi 
476
477if [ X$g4w_use_g3tog4 = Xy ] ; then
478G4LIB_USE_G3TOG4=1
479export G4LIB_USE_G3TOG4
480if [ X\$g4non_display = X ] ; then
481echo "On this machine the G4LIB_USE_G3TOG4=\$G4LIB_USE_G3TOG4"
482fi
483fi 
484
485#
486# Use ZLIB module
487#
488#+
489if [ X$g4wlib_build_zlib = Xy ] ; then
490G4LIB_BUILD_ZLIB=1
491export G4LIB_BUILD_ZLIB
492echo "On this machine the G4LIB_BUILD_ZLIB=\$G4LIB_BUILD_ZLIB"
493fi 
494
495if [ X$g4w_use_zlib = Xy ] ; then
496G4LIB_USE_ZLIB=1
497export G4LIB_USE_ZLIB
498echo "On this machine the G4LIB_USE_ZLIB=\$G4LIB_USE_ZLIB"
499fi 
500
501
502#+
503#
504# g4shared
505#
506if [ X$g4lib_build_shared = Xy ] ; then
507G4LIB_BUILD_SHARED=1
508export G4LIB_BUILD_SHARED
509if [ X\$g4non_display = X ] ; then
510echo "On this machine the G4LIB_BUILD_SHARED=\$G4LIB_BUILD_SHARED"
511fi
512fi 
513
514if [ X$g4lib_build_static = Xy ] ; then
515G4LIB_BUILD_STATIC=1
516export G4LIB_BUILD_STATIC
517if [ X\$g4non_display = X ] ; then
518echo "On this machine the G4LIB_BUILD_STATIC=\$G4LIB_BUILD_STATIC"
519fi
520fi 
521
522#+
523#
524# g4granular
525#
526if [ X$g4lib_use_granular = Xy ] ; then
527G4LIB_USE_GRANULAR=1
528export G4LIB_USE_GRANULAR
529if [ X\$g4non_display = X ] ; then
530echo "On this machine the G4LIB_USE_GRANULAR=\$G4LIB_USE_GRANULAR"
531fi
532fi 
533
534# Check for Windows!
535if test "X\$G4SYSTEM" != "XWIN32-VC" -a "X\$G4SYSTEM" != "XWIN32-VC7"; then
536#+
537#
538# UI_USE_TCSH for Unix
539#
540G4UI_USE_TCSH=1
541export G4UI_USE_TCSH
542if [ X\$g4non_display = X ] ; then
543echo "On this machine the G4UI_USE_TCSH=\$G4UI_USE_TCSH"
544fi 
545fi
546
547#####################################################################
548
549!GROK!THIS!
550
551: In the following dollars and backticks do not need the extra backslash.
552$spitshell >>env.sh <<'!NO!SUBS!'
553
554
555#+
556#
557# G4WORKDIR
558#
559if [ $G4WORKDIR ] ; then
560
561if [ X$g4non_display = X ] ; then
562echo "In your environment you have the G4WORKDIR=$G4WORKDIR"
563fi # if non_display
564
565else
566
567if [ X$g4non_display = X ] ; then
568
569# Check for Windows!
570if test "X$G4SYSTEM" = "XWIN32-VC" -o "X$G4SYSTEM" = "XWIN32-VC7"; then
571
572echo "G4WORKDIR will be set to c:/geant4 (in "native" Windows syntax)"
573G4WORKDIR="c:/geant4"
574export G4WORKDIR
575
576else # if Unix
577
578echo "G4WORKDIR will be set to HOME/geant4=$HOME/geant4"
579export G4WORKDIR=$HOME/geant4
580
581fi # if platforms
582
583fi
584
585fi
586
587#
588# Shared libraries
589#
590if [ $G4LIB_BUILD_SHARED ] ; then
591if [ $LD_LIBRARY_PATH ] ; then
592LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${G4LIB}/${G4SYSTEM}
593export LD_LIBRARY_PATH
594else
595LD_LIBRARY_PATH=${G4LIB}/${G4SYSTEM}
596export LD_LIBRARY_PATH
597fi
598fi
599
600#
601# For BIN
602#
603PATH=${PATH}:${G4WORKDIR}/bin/${G4SYSTEM}
604export PATH
605
606!NO!SUBS!
607chmod 755 env.sh
608$eunicefix env.sh
Note: See TracBrowser for help on using the repository browser.