source: trunk/geant4/config/scripts/env.csh.SH @ 554

Last change on this file since 554 was 483, checked in by garnier, 17 years ago

r569@mac-90108: laurentgarnier | 2007-06-05 15:53:34 +0200
version contre geant4.8.2.p01

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