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