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

Last change on this file since 1255 was 1213, checked in by garnier, 15 years ago

Suppression de Xaw. Sauf dans Configure et les fichier G4UIXaw.hh et cc

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