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

Last change on this file since 776 was 689, checked in by garnier, 16 years ago

maj par rapport a cvs

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