source: trunk/config/scripts/env.csh.SH @ 1167

Last change on this file since 1167 was 1045, checked in by garnier, 15 years ago

maj en aussi sur CVS

  • Property svn:executable set to *
File size: 14.4 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
387#+
388if ( X$g4vis_build_openglxm_driver != X )  then
389setenv XMFLAGS "$g4vis_xmflags"
390echo "On this machine the XMFLAGS=\$XMFLAGS"
391endif
392
393#+
394if ( X$g4vis_build_openglxm_driver != X )  then
395setenv XMLIBS "$g4vis_xmlibs"
396echo "On this machine the XMLIBS=\$XMLIBS"
397endif
398
399#+
400if ( X$g4ui_build_xm_session != X )  then
401setenv XMFLAGS "$g4vis_xmflags"
402echo "On this machine the XMFLAGS=\$XMFLAGS"
403endif
404
405#+
406if ( X$g4ui_build_xm_session != X )  then
407setenv XMLIBS "$g4vis_xmlibs"
408echo "On this machine the XMLIBS=\$XMLIBS"
409endif
410
411#+
412if ( X$g4ui_build_xaw_session != X )  then
413setenv XAWFLAGS "$g4ui_xawflags"
414echo "On this machine the XAWFLAGS=\$XAWFLAGS"
415endif
416
417#+
418if ( X$g4ui_build_xaw_session != X )  then
419setenv XAWLIBS "$g4ui_xawlibs"
420echo "On this machine the XAWLIBS=\$XAWLIBS"
421endif
422
423
424#
425# Qt Flags and Libs, messy, but needed for backward compatibility
426#+
427if ( "X$g4ui_build_qt_session" == "Xy" || "X$g4ui_use_qt" == "Xy" )  then
428setenv QTFLAGS "$g4_qt_cxxflags"
429setenv QTLIBS "$g4_qt_libs"
430setenv QTMOC "$g4_qt_moc"
431echo "On this machine the QTFLAGS=\$QTFLAGS"
432echo "On this machine the QTLIBS=\$QTLIBS"
433echo "On this machine the QTMOC=\$QTMOC"
434endif
435
436if ( "X$g4vis_build_openglqt_driver" == "Xy" || "X$g4vis_build_openglqt_driver" == "Xy" )  then
437if ( "X\$QTFLAGS" == "X" )  then
438setenv QTFLAGS "$g4_qt_cxxflags $g4_qt_gl_cxxflags"
439else
440setenv QTFLAGS "\$QTFLAGS $g4_qt_gl_cxxflags"
441endif
442if ( "X\$QTMOC" == "X" )  then
443setenv QTMOC "$g4_qt_moc"
444endif
445setenv GLQTLIBS "$g4_qt_libs $g4_qt_gl_libs"
446echo "On this machine the QTFLAGS=\$QTFLAGS"
447echo "On this machine the GLQTLIBS=\$GLQTLIBS"
448echo "On this machine the QTMOC=\$QTMOC"
449endif
450
451
452
453
454
455#
456# Use GDML module
457#
458#+
459if ( X$g4lib_build_gdml == Xy ) then
460setenv G4LIB_BUILD_GDML 1
461echo "On this machine the G4LIB_BUILD_GDML=\$G4LIB_BUILD_GDML"
462endif
463
464if ( X$g4lib_build_gdml == Xy ) then
465setenv XERCESCROOT "$g4gdml_xercesc_root"
466echo "On this machine the XERCESCROOT=\$XERCESCROOT"
467endif
468
469
470
471
472#
473# Use G3TOG4 module
474#
475#+
476if ( X$g4wlib_build_g3tog4 == Xy )  then
477setenv G4LIB_BUILD_G3TOG4 1
478echo "On this machine the G4LIB_BUILD_G3TOG4=\$G4LIB_BUILD_G3TOG4"
479endif
480
481if ( X$g4w_use_g3tog4 == Xy )  then
482setenv G4LIB_USE_G3TOG4 1
483echo "On this machine the G4LIB_USE_G3TOG4=\$G4LIB_USE_G3TOG4"
484endif
485
486
487#
488# Use ZLIB module
489#
490#+
491if ( X$g4wlib_build_zlib == Xy )  then
492setenv G4LIB_BUILD_ZLIB 1
493echo "On this machine the G4LIB_BUILD_ZLIB=\$G4LIB_BUILD_ZLIB"
494endif
495
496if ( X$g4w_use_ZLIB == Xy )  then
497setenv G4LIB_USE_ZLIB 1
498echo "On this machine the G4LIB_USE_ZLIB=\$G4LIB_USE_ZLIB"
499endif
500
501#+
502#
503# g4shared
504#
505if ( X$g4lib_build_shared == Xy ) then
506setenv G4LIB_BUILD_SHARED 1
507echo "On this machine the G4LIB_BUILD_SHARED=\$G4LIB_BUILD_SHARED"
508endif
509
510if ( X$g4lib_build_static == Xy ) then
511setenv G4LIB_BUILD_STATIC 1
512echo "On this machine the G4LIB_BUILD_STATIC=\$G4LIB_BUILD_STATIC"
513endif
514
515#+
516#
517# g4granular
518#
519if ( X$g4lib_use_granular == Xy ) then
520setenv G4LIB_USE_GRANULAR 1
521echo "On this machine the G4LIB_USE_GRANULAR=\$G4LIB_USE_GRANULAR"
522endif
523
524# Check for Windows!
525if ( "X\$G4SYSTEM" != "XWIN32-VC" && "X\$G4SYSTEM" != "XWIN32-VC7" ) then
526setenv G4UI_USE_TCSH 1
527echo "On this machine the G4UI_USE_TCSH=\$G4UI_USE_TCSH"
528endif
529
530#####################################################################
531
532!GROK!THIS!
533
534: In the following dollars and backticks do not need the extra backslash.
535$spitshell >>env.csh <<'!NO!SUBS!'
536
537
538#+
539#
540# G4WORKDIR
541#
542if ( ${?G4WORKDIR} ) then
543echo "In your environment you have the G4WORKDIR=$G4WORKDIR"
544else
545# Check for Windows!
546if ( "X$G4SYSTEM" == "XWIN32-VC" || "X$G4SYSTEM" == "XWIN32-VC7" ) then
547
548echo "G4WORKDIR will be set to c:/geant4 (in "native" Windows syntax)."
549setenv G4WORKDIR "c:/geant4"
550
551else # if Unix
552
553echo "G4WORKDIR will be set to HOME/geant4=$HOME/geant4"
554setenv G4WORKDIR $HOME/geant4
555
556endif
557endif
558
559#
560# Shared libraries
561#
562if ( ${?G4LIB_BUILD_SHARED} ) then
563
564#
565# Warning about LD_LIBRARY_PATH
566#
567echo ''
568echo 'LD_LIBRARY_PATH is set to include CLHEP and Geant4 libraries. '
569echo ''
570echo 'NOTE : verify that the correct path for the CLHEP library'
571echo '- $CLHEP_BASE_DIR/lib - is included in the $LD_LIBRARY_PATH'
572echo 'variable in your environment, and no other outdated installations'
573echo 'of CLHEP are by chance referenced through $LD_LIBRARY_PATH and'
574echo 'present in your system !'
575echo ''
576
577if ( ${?LD_LIBRARY_PATH} )  then
578setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${G4LIB}/${G4SYSTEM}
579setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${CLHEP_LIB_DIR}
580
581if ( ${?G4LIB_BUILD_GDML} ) then
582   setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${XERCESCROOT}/lib
583endif
584
585else
586setenv LD_LIBRARY_PATH ${G4LIB}/${G4SYSTEM}
587setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${CLHEP_LIB_DIR}
588
589if ( ${?G4LIB_BUILD_GDML} ) then
590   setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${XERCESCROOT}/lib
591endif
592
593endif
594endif
595
596#
597# Shared libraries for Mac
598#
599if ( "X$G4SYSTEM" == "XDarwin-g++" ) then
600
601if ( ${?G4LIB_BUILD_SHARED} ) then
602if ( ${?DYLD_LIBRARY_PATH} )  then
603setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:${G4LIB}/${G4SYSTEM}
604setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:${CLHEP_LIB_DIR}
605
606if ( ${?G4LIB_BUILD_GDML} ) then
607   setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:${XERCESCROOT}/lib
608endif
609
610else
611setenv DYLD_LIBRARY_PATH ${G4LIB}/${G4SYSTEM}
612setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:${CLHEP_LIB_DIR}
613
614if ( ${?G4LIB_BUILD_GDML} ) then
615   setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:${XERCESCROOT}/lib
616endif
617
618endif
619endif
620
621endif
622
623#
624# For BIN
625#
626setenv PATH ${PATH}:${G4WORKDIR}/bin/${G4SYSTEM}
627
628!NO!SUBS!
629chmod 755 env.csh
630$eunicefix env.csh
Note: See TracBrowser for help on using the repository browser.