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

Last change on this file since 613 was 606, checked in by garnier, 17 years ago

r647@mac-90108: laurentgarnier | 2007-11-15 11:32:46 +0100
Ok en Qt 4.3.0

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