1 | case $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 | ;; |
---|
13 | esac |
---|
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. |
---|
16 | case "$0" in |
---|
17 | */*) cd `expr X$0 : 'X\(.*\)/'` ;; |
---|
18 | esac |
---|
19 | #echo "Extracting env.sh (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.sh <<!GROK!THIS! |
---|
25 | ###################################### |
---|
26 | # |
---|
27 | # Clean all G4 envs |
---|
28 | unset CLHEP_BASE_DIR |
---|
29 | unset CLHEP_INCLUDE_DIR |
---|
30 | unset CLHEP_LIB |
---|
31 | unset CLHEP_LIB_DIR |
---|
32 | |
---|
33 | unset G4ANALYSIS_USE |
---|
34 | unset G4DEBUG |
---|
35 | unset G4INCLUDE |
---|
36 | unset G4INSTALL |
---|
37 | |
---|
38 | unset G4LEDATA |
---|
39 | unset G4LEVELGAMMADATA |
---|
40 | unset G4NEUTRONHPDATA |
---|
41 | unset G4RADIOACTIVEDATA |
---|
42 | unset G4ABLADATA |
---|
43 | |
---|
44 | unset G4LIB |
---|
45 | unset G4LIB_BUILD_G3TOG4 |
---|
46 | unset G4LIB_BUILD_SHARED |
---|
47 | unset G4LIB_BUILD_STATIC |
---|
48 | unset G4LIB_BUILD_ZLIB |
---|
49 | unset G4LIB_BUILD_GDML |
---|
50 | unset G4LIB_USE_G3TOG4 |
---|
51 | unset G4LIB_USE_GRANULAR |
---|
52 | unset G4LIB_USE_ZLIB |
---|
53 | |
---|
54 | unset G4SYSTEM |
---|
55 | |
---|
56 | unset G4UI_BUILD_WIN32_SESSION |
---|
57 | unset G4UI_BUILD_XAW_SESSION |
---|
58 | unset G4UI_BUILD_XM_SESSION |
---|
59 | unset G4UI_USE_TCSH |
---|
60 | unset G4UI_USE_WIN32 |
---|
61 | unset G4UI_USE_XAW |
---|
62 | unset G4UI_USE_XM |
---|
63 | unset G4UI_USE_QT |
---|
64 | |
---|
65 | unset G4VIS_BUILD_DAWN_DRIVER |
---|
66 | unset G4VIS_BUILD_OIWIN32_DRIVER |
---|
67 | unset G4VIS_BUILD_OIX_DRIVER |
---|
68 | unset G4VIS_BUILD_OPENGLWIN32_DRIVER |
---|
69 | unset G4VIS_BUILD_OPENGLXM_DRIVER |
---|
70 | unset G4VIS_BUILD_OPENGLX_DRIVER |
---|
71 | unset G4VIS_BUILD_RAYTRACERX_DRIVER |
---|
72 | unset G4VIS_BUILD_VRML_DRIVER |
---|
73 | unset G4VIS_BUILD_OPENGLQT_DRIVER |
---|
74 | |
---|
75 | unset G4VIS_USE_DAWN |
---|
76 | unset G4VIS_USE_OIWIN32 |
---|
77 | unset G4VIS_USE_OIX |
---|
78 | unset G4VIS_USE_OPENGLWIN32 |
---|
79 | unset G4VIS_USE_OPENGLX |
---|
80 | unset G4VIS_USE_OPENGLXM |
---|
81 | unset G4VIS_USE_RAYTRACERX |
---|
82 | unset G4VIS_USE_VRML |
---|
83 | unset G4VIS_USE_OPENGLQT |
---|
84 | |
---|
85 | |
---|
86 | # |
---|
87 | # g4system.U |
---|
88 | # |
---|
89 | #+ |
---|
90 | G4SYSTEM="$g4system" |
---|
91 | export G4SYSTEM |
---|
92 | if [ X\$g4non_display = X ] ; then |
---|
93 | echo "On this machine the G4SYSTEM=\$G4SYSTEM" |
---|
94 | fi |
---|
95 | |
---|
96 | # |
---|
97 | # g4dirs.U |
---|
98 | # |
---|
99 | #+ |
---|
100 | if [ X$g4install != X$g4final_install ] ; then |
---|
101 | G4INSTALL="$g4final_install/src/geant4" |
---|
102 | else |
---|
103 | G4INSTALL="$g4install" |
---|
104 | fi |
---|
105 | export G4INSTALL |
---|
106 | if [ X\$g4non_display = X ] ; then |
---|
107 | echo "On this machine the G4INSTALL=\$G4INSTALL" |
---|
108 | fi |
---|
109 | |
---|
110 | #+ |
---|
111 | if [ X$g4includes_flag != Xn ] ; then |
---|
112 | if [ X$g4install != X$g4final_install ] ; then |
---|
113 | G4INCLUDE="$g4final_install/include/geant4" |
---|
114 | else |
---|
115 | G4INCLUDE="$g4install/include/" |
---|
116 | fi |
---|
117 | export G4INCLUDE |
---|
118 | if [ X\$g4non_display = X ] ; then |
---|
119 | echo "On this machine the G4INCLUDE=\$G4INCLUDE" |
---|
120 | fi |
---|
121 | #else |
---|
122 | #G4BASE="$g4final_install/include/geant4/source" |
---|
123 | #export G4BASE |
---|
124 | #if [ X\$g4non_display = X ] ; then |
---|
125 | #echo "On this machine the G4BASE=\$G4BASE" |
---|
126 | #fi |
---|
127 | fi |
---|
128 | |
---|
129 | #+ |
---|
130 | if [ X$g4lib != X ] ; then |
---|
131 | if [ X$g4install != X$g4final_install ] ; then |
---|
132 | G4LIB="$g4final_install/lib/geant4" |
---|
133 | else |
---|
134 | G4LIB="$g4install/lib" |
---|
135 | fi |
---|
136 | export G4LIB |
---|
137 | if [ X\$g4non_display = X ] ; then |
---|
138 | echo "On this machine the G4LIB=\$G4LIB" |
---|
139 | fi |
---|
140 | fi |
---|
141 | |
---|
142 | #+ |
---|
143 | if [ X$g4levelgammadata != X ] ; then |
---|
144 | G4LEVELGAMMADATA="$g4levelgammadata" |
---|
145 | export G4LEVELGAMMADATA |
---|
146 | if [ X\$g4non_display = X ] ; then |
---|
147 | echo "On this machine the G4LEVELGAMMADATA=\$G4LEVELGAMMADATA" |
---|
148 | fi |
---|
149 | fi |
---|
150 | |
---|
151 | #+ |
---|
152 | if [ X$g4radioactivedata != X ] ; then |
---|
153 | G4RADIOACTIVEDATA="$g4radioactivedata" |
---|
154 | export G4RADIOACTIVEDATA |
---|
155 | if [ X\$g4non_display = X ] ; then |
---|
156 | echo "On this machine the G4RADIOACTIVEDATA=\$G4RADIOACTIVEDATA" |
---|
157 | fi |
---|
158 | fi |
---|
159 | |
---|
160 | #+ |
---|
161 | if [ X$g4ledata != X ] ; then |
---|
162 | G4LEDATA="$g4ledata" |
---|
163 | export G4LEDATA |
---|
164 | if [ X\$g4non_display = X ] ; then |
---|
165 | echo "On this machine the G4LEDATA=\$G4LEDATA" |
---|
166 | fi |
---|
167 | fi |
---|
168 | |
---|
169 | #+ |
---|
170 | if [ X$g4neutronhpcrosssections != X ] ; then |
---|
171 | G4NEUTRONHPDATA="$g4neutronhpcrosssections" |
---|
172 | export G4NEUTRONHPDATA |
---|
173 | if [ X\$g4non_display = X ] ; then |
---|
174 | echo "On this machine the G4NEUTRONHPDATA=\$G4NEUTRONHPDATA" |
---|
175 | fi |
---|
176 | fi |
---|
177 | |
---|
178 | #+ |
---|
179 | if [ X$g4abladata != X ] ; then |
---|
180 | G4ABLADATA="$g4abladata" |
---|
181 | export G4ABLADATA |
---|
182 | if [ X\$g4non_display = X ] ; then |
---|
183 | echo "On this machine the G4ABLADATA=\$G4ABLADATA" |
---|
184 | fi |
---|
185 | fi |
---|
186 | |
---|
187 | |
---|
188 | |
---|
189 | |
---|
190 | #+ |
---|
191 | #if [ X$g4elasticdata != X ] ; then |
---|
192 | #G4ELASTICDATA="$g4elasticdata" |
---|
193 | #export G4ELASTICDATA |
---|
194 | #if [ X\$g4non_display = X ] ; then |
---|
195 | #echo "On this machine the G4ELASTICDATA=\$G4ELASTICDATA" |
---|
196 | #fi |
---|
197 | #fi |
---|
198 | |
---|
199 | # |
---|
200 | # g4clhep.U |
---|
201 | # |
---|
202 | if [ X$g4clhep_base_dir != X ] ; then |
---|
203 | CLHEP_BASE_DIR="$g4clhep_base_dir" |
---|
204 | export CLHEP_BASE_DIR |
---|
205 | if [ X\$g4non_display = X ] ; then |
---|
206 | echo "On this machine the CLHEP_BASE_DIR=\$CLHEP_BASE_DIR" |
---|
207 | fi |
---|
208 | fi |
---|
209 | |
---|
210 | #+ |
---|
211 | if [ X$g4clhep_include_dir != X ] ; then |
---|
212 | CLHEP_INCLUDE_DIR="$g4clhep_include_dir" |
---|
213 | export CLHEP_INCLUDE_DIR |
---|
214 | if [ X\$g4non_display = X ] ; then |
---|
215 | echo "On this machine the CLHEP_INCLUDE_DIR=\$CLHEP_INCLUDE_DIR" |
---|
216 | fi |
---|
217 | fi |
---|
218 | |
---|
219 | #+ |
---|
220 | if [ X$g4clhep_lib_dir != X ] ; then |
---|
221 | CLHEP_LIB_DIR="$g4clhep_lib_dir" |
---|
222 | export CLHEP_LIB_DIR |
---|
223 | if [ X\$g4non_display = X ] ; then |
---|
224 | echo "On this machine the CLHEP_LIB_DIR=\$CLHEP_LIB_DIR" |
---|
225 | fi |
---|
226 | fi |
---|
227 | |
---|
228 | #+ |
---|
229 | if [ X$g4clhep_lib != X ] ; then |
---|
230 | CLHEP_LIB="$g4clhep_lib" |
---|
231 | export CLHEP_LIB |
---|
232 | if [ X\$g4non_display = X ] ; then |
---|
233 | echo "On this machine the CLHEP_LIB=\$CLHEP_LIB" |
---|
234 | fi |
---|
235 | fi |
---|
236 | |
---|
237 | #+ |
---|
238 | # |
---|
239 | # g4debug |
---|
240 | # |
---|
241 | if [ X$g4debug = Xy ] ; then |
---|
242 | G4DEBUG=1 |
---|
243 | export G4DEBUG |
---|
244 | if [ X\$g4non_display = X ] ; then |
---|
245 | echo "On this machine the G4DEBUG=\$G4DEBUG" |
---|
246 | fi |
---|
247 | fi |
---|
248 | |
---|
249 | # |
---|
250 | # g4analysis |
---|
251 | # |
---|
252 | #+ |
---|
253 | if [ X$g4wanalysis_use = Xy ] ; then |
---|
254 | G4ANALYSIS_USE=1 |
---|
255 | export G4ANALYSIS_USE |
---|
256 | if [ X\$g4non_display = X ] ; then |
---|
257 | echo "On this machine the G4ANALYSIS_USE=\$G4ANALYSIS_USE" |
---|
258 | fi |
---|
259 | fi |
---|
260 | |
---|
261 | # |
---|
262 | # g4ui |
---|
263 | # |
---|
264 | #+ |
---|
265 | if [ X$g4ui_build_xaw_session = Xy ] ; then |
---|
266 | G4UI_BUILD_XAW_SESSION=1 |
---|
267 | export G4UI_BUILD_XAW_SESSION |
---|
268 | if [ X\$g4non_display = X ] ; then |
---|
269 | echo "On this machine the G4UI_BUILD_XAW_SESSION=\$G4UI_BUILD_XAW_SESSION" |
---|
270 | fi |
---|
271 | fi |
---|
272 | |
---|
273 | #+ |
---|
274 | if [ X$g4ui_use_xaw = Xy ] ; then |
---|
275 | G4UI_USE_XAW=1 |
---|
276 | export G4UI_USE_XAW |
---|
277 | if [ X\$g4non_display = X ] ; then |
---|
278 | echo "On this machine the G4UI_USE_XAW=\$G4UI_USE_XAW" |
---|
279 | fi |
---|
280 | fi |
---|
281 | |
---|
282 | #+ |
---|
283 | if [ X$g4ui_build_xm_session = Xy ] ; then |
---|
284 | G4UI_BUILD_XM_SESSION=1 |
---|
285 | export G4UI_BUILD_XM_SESSION |
---|
286 | if [ X\$g4non_display = X ] ; then |
---|
287 | echo "On this machine the G4UI_BUILD_XM_SESSION=\$G4UI_BUILD_XM_SESSION" |
---|
288 | fi |
---|
289 | fi |
---|
290 | |
---|
291 | #+ |
---|
292 | if [ X$g4ui_use_xm = Xy ] ; then |
---|
293 | G4UI_USE_XM=1 |
---|
294 | export G4UI_USE_XM |
---|
295 | if [ X\$g4non_display = X ] ; then |
---|
296 | echo "On this machine the G4UI_USE_XM=\$G4UI_USE_XM" |
---|
297 | fi |
---|
298 | fi |
---|
299 | |
---|
300 | #+ |
---|
301 | if [ X$g4ui_build_win32_session = Xy ] ; then |
---|
302 | G4UI_BUILD_WIN32_SESSION=1 |
---|
303 | export G4UI_BUILD_WIN32_SESSION |
---|
304 | if [ X\$g4non_display = X ] ; then |
---|
305 | echo "On this machine the G4UI_BUILD_WIN32_SESSION=\$G4UI_BUILD_WIN32_SESSION" |
---|
306 | fi |
---|
307 | fi |
---|
308 | |
---|
309 | #+ |
---|
310 | if [ X$g4ui_use_win32 = Xy ] ; then |
---|
311 | G4UI_USE_WIN32=1 |
---|
312 | export G4UI_USE_WIN32 |
---|
313 | if [ X\$g4non_display = X ] ; then |
---|
314 | echo "On this machine the G4UI_USE_WIN32=\$G4UI_USE_WIN32" |
---|
315 | fi |
---|
316 | fi |
---|
317 | |
---|
318 | |
---|
319 | #+ |
---|
320 | if [ X$g4ui_build_qt_session = Xy ] ; then |
---|
321 | G4UI_BUILD_QT_SESSION=1 |
---|
322 | export G4UI_BUILD_QT_SESSION |
---|
323 | if [ X\$g4non_display = X ] ; then |
---|
324 | echo "On this machine the G4UI_BUILD_QT_SESSION=\$G4UI_BUILD_QT_SESSION" |
---|
325 | fi |
---|
326 | fi |
---|
327 | |
---|
328 | #+ |
---|
329 | if [ X$g4ui_use_qt = Xy ] ; then |
---|
330 | G4UI_USE_QT=1 |
---|
331 | export G4UI_USE_QT |
---|
332 | if [ X\$g4non_display = X ] ; then |
---|
333 | echo "On this machine the G4UI_USE_QT=\$G4UI_USE_QT" |
---|
334 | fi |
---|
335 | fi |
---|
336 | |
---|
337 | |
---|
338 | |
---|
339 | # |
---|
340 | # g4vis |
---|
341 | # |
---|
342 | #+ |
---|
343 | if [ X$g4vis_build_dawn_driver = Xy ] ; then |
---|
344 | G4VIS_BUILD_DAWN_DRIVER=1 |
---|
345 | export G4VIS_BUILD_DAWN_DRIVER |
---|
346 | if [ X\$g4non_display = X ] ; then |
---|
347 | echo "On this machine the G4VIS_BUILD_DAWN_DRIVER=\$G4VIS_BUILD_DAWN_DRIVER" |
---|
348 | fi |
---|
349 | fi |
---|
350 | |
---|
351 | #+ |
---|
352 | if [ X$g4vis_build_openglx_driver = Xy ] ; then |
---|
353 | G4VIS_BUILD_OPENGLX_DRIVER=1 |
---|
354 | export G4VIS_BUILD_OPENGLX_DRIVER |
---|
355 | if [ X\$g4non_display = X ] ; then |
---|
356 | echo "On this machine the G4VIS_BUILD_OPENGLX_DRIVER=\$G4VIS_BUILD_OPENGLX_DRIVER" |
---|
357 | fi |
---|
358 | fi |
---|
359 | |
---|
360 | #+ |
---|
361 | if [ X$g4vis_build_openglxm_driver = Xy ] ; then |
---|
362 | G4VIS_BUILD_OPENGLXM_DRIVER=1 |
---|
363 | export G4VIS_BUILD_OPENGLXM_DRIVER |
---|
364 | if [ X\$g4non_display = X ] ; then |
---|
365 | echo "On this machine the G4VIS_BUILD_OPENGLXM_DRIVER=\$G4VIS_BUILD_OPENGLXM_DRIVER" |
---|
366 | fi |
---|
367 | fi |
---|
368 | |
---|
369 | #+ |
---|
370 | if [ X$g4vis_build_openglwin32_driver = Xy ] ; then |
---|
371 | G4VIS_BUILD_OPENGLWIN32_DRIVER=1 |
---|
372 | export G4VIS_BUILD_OPENGLWIN32_DRIVER |
---|
373 | if [ X\$g4non_display = X ] ; then |
---|
374 | echo "On this machine the G4VIS_BUILD_OPENGLWIN32_DRIVER=\$G4VIS_BUILD_OPENGLWIN32_DRIVER" |
---|
375 | fi |
---|
376 | fi |
---|
377 | |
---|
378 | #+ |
---|
379 | if [ X$g4vis_build_oix_driver = Xy ] ; then |
---|
380 | G4VIS_BUILD_OIX_DRIVER=1 |
---|
381 | export G4VIS_BUILD_OIX_DRIVER |
---|
382 | if [ X\$g4non_display = X ] ; then |
---|
383 | echo "On this machine the G4VIS_BUILD_OIX_DRIVER=\$G4VIS_BUILD_OIX_DRIVER" |
---|
384 | fi |
---|
385 | fi |
---|
386 | |
---|
387 | #+ |
---|
388 | if [ X$g4vis_build_raytracerx_driver = Xy ] ; then |
---|
389 | G4VIS_BUILD_RAYTRACERX_DRIVER=1 |
---|
390 | export G4VIS_BUILD_RAYTRACERX_DRIVER |
---|
391 | if [ X\$g4non_display = X ] ; then |
---|
392 | echo "On this machine the G4VIS_BUILD_RAYTRACERX_DRIVER=\$G4VIS_BUILD_RAYTRACERX_DRIVER" |
---|
393 | fi |
---|
394 | fi |
---|
395 | |
---|
396 | #+ |
---|
397 | if [ X$g4vis_build_oiwin32_driver = Xy ] ; then |
---|
398 | G4VIS_BUILD_OIWIN32_DRIVER=1 |
---|
399 | export G4VIS_BUILD_OIWIN32_DRIVER |
---|
400 | if [ X\$g4non_display = X ] ; then |
---|
401 | echo "On this machine the G4VIS_BUILD_OIWIN32_DRIVER=\$G4VIS_BUILD_OIWIN32_DRIVER" |
---|
402 | fi |
---|
403 | fi |
---|
404 | |
---|
405 | #+ |
---|
406 | if [ X$g4vis_build_vrml_driver = Xy ] ; then |
---|
407 | G4VIS_BUILD_VRML_DRIVER=1 |
---|
408 | export G4VIS_BUILD_VRML_DRIVER |
---|
409 | if [ X\$g4non_display = X ] ; then |
---|
410 | echo "On this machine the G4VIS_BUILD_VRML_DRIVER=\$G4VIS_BUILD_VRML_DRIVER" |
---|
411 | fi |
---|
412 | fi |
---|
413 | |
---|
414 | #+ |
---|
415 | if [ X$g4vis_build_openglqt_driver = Xy ] ; then |
---|
416 | G4VIS_BUILD_OPENGLQT_DRIVER=1 |
---|
417 | export G4VIS_BUILD_OPENGLQT_DRIVER |
---|
418 | if [ X\$g4non_display = X ] ; then |
---|
419 | echo "On this machine the G4VIS_BUILD_OPENGLQT_DRIVER=\$G4VIS_BUILD_OPENGLQT_DRIVER" |
---|
420 | fi |
---|
421 | fi |
---|
422 | |
---|
423 | |
---|
424 | |
---|
425 | #+ |
---|
426 | if [ X$g4vis_use_dawn = Xy ] ; then |
---|
427 | G4VIS_USE_DAWN=1 |
---|
428 | export G4VIS_USE_DAWN |
---|
429 | if [ X\$g4non_display = X ] ; then |
---|
430 | echo "On this machine the G4VIS_USE_DAWN=\$G4VIS_USE_DAWN" |
---|
431 | fi |
---|
432 | fi |
---|
433 | |
---|
434 | #+ |
---|
435 | if [ X$g4vis_use_openglx = Xy ] ; then |
---|
436 | G4VIS_USE_OPENGLX=1 |
---|
437 | export G4VIS_USE_OPENGLX |
---|
438 | if [ X\$g4non_display = X ] ; then |
---|
439 | echo "On this machine the G4VIS_USE_OPENGLX=\$G4VIS_USE_OPENGLX" |
---|
440 | fi |
---|
441 | fi |
---|
442 | |
---|
443 | #+ |
---|
444 | if [ X$g4vis_use_openglxm = Xy ] ; then |
---|
445 | G4VIS_USE_OPENGLXM=1 |
---|
446 | export G4VIS_USE_OPENGLXM |
---|
447 | if [ X\$g4non_display = X ] ; then |
---|
448 | echo "On this machine the G4VIS_USE_OPENGLXM=\$G4VIS_USE_OPENGLXM" |
---|
449 | fi |
---|
450 | fi |
---|
451 | |
---|
452 | #+ |
---|
453 | if [ X$g4vis_use_openglwin32 = Xy ] ; then |
---|
454 | G4VIS_USE_OPENGLWIN32=1 |
---|
455 | export G4VIS_USE_OPENGLWIN32 |
---|
456 | if [ X\$g4non_display = X ] ; then |
---|
457 | echo "On this machine the G4VIS_USE_OPENGLWIN32=\$G4VIS_USE_OPENGLWIN32" |
---|
458 | fi |
---|
459 | fi |
---|
460 | |
---|
461 | #+ |
---|
462 | if [ X$g4vis_use_oix = Xy ] ; then |
---|
463 | G4VIS_USE_OIX=1 |
---|
464 | export G4VIS_USE_OIX |
---|
465 | if [ X\$g4non_display = X ] ; then |
---|
466 | echo "On this machine the G4VIS_USE_OIX=\$G4VIS_USE_OIX" |
---|
467 | fi |
---|
468 | fi |
---|
469 | |
---|
470 | #+ |
---|
471 | if [ X$g4vis_use_raytracerx = Xy ] ; then |
---|
472 | G4VIS_USE_RAYTRACERX=1 |
---|
473 | export G4VIS_USE_RAYTRACERX |
---|
474 | if [ X\$g4non_display = X ] ; then |
---|
475 | echo "On this machine the G4VIS_USE_RAYTRACERX=\$G4VIS_USE_RAYTRACERX" |
---|
476 | fi |
---|
477 | fi |
---|
478 | |
---|
479 | #+ |
---|
480 | if [ X$g4vis_use_oiwin32 = Xy ] ; then |
---|
481 | G4VIS_USE_OIWIN32=1 |
---|
482 | export G4VIS_USE_OIWIN32 |
---|
483 | if [ X\$g4non_display = X ] ; then |
---|
484 | echo "On this machine the G4VIS_USE_OIWIN32=\$G4VIS_USE_OIWIN32" |
---|
485 | fi |
---|
486 | fi |
---|
487 | |
---|
488 | #+ |
---|
489 | if [ X$g4vis_use_vrml = Xy ] ; then |
---|
490 | G4VIS_USE_VRML=1 |
---|
491 | export G4VIS_USE_VRML |
---|
492 | if [ X\$g4non_display = X ] ; then |
---|
493 | echo "On this machine the G4VIS_USE_VRML=\$G4VIS_USE_VRML" |
---|
494 | fi |
---|
495 | fi |
---|
496 | |
---|
497 | #+ |
---|
498 | if [ X$g4vis_use_openglqt = Xy ] ; then |
---|
499 | G4VIS_USE_OPENGLQT=1 |
---|
500 | export G4VIS_USE_OPENGLQT |
---|
501 | if [ X\$g4non_display = X ] ; then |
---|
502 | echo "On this machine the G4VIS_USE_OPENGLQT=\$G4VIS_USE_OPENGLQT" |
---|
503 | fi |
---|
504 | fi |
---|
505 | |
---|
506 | |
---|
507 | |
---|
508 | #+ |
---|
509 | if [ X$g4vis_oglhome != X ] ; then |
---|
510 | OGLHOME="$g4vis_oglhome" |
---|
511 | export OGLHOME |
---|
512 | if [ X\$g4non_display = X ] ; then |
---|
513 | echo "On this machine the OGLHOME=\$OGLHOME" |
---|
514 | fi |
---|
515 | fi |
---|
516 | |
---|
517 | #+ |
---|
518 | if [ X$g4vis_oivhome != X ] ; then |
---|
519 | OIVHOME="$g4vis_oivhome" |
---|
520 | export OIVHOME |
---|
521 | if [ X\$g4non_display = X ] ; then |
---|
522 | echo "On this machine the OIVHOME=\$OIVHOME" |
---|
523 | fi |
---|
524 | fi |
---|
525 | |
---|
526 | |
---|
527 | |
---|
528 | #+ |
---|
529 | if [ X$g4vis_build_openglxm_driver != X ] ; then |
---|
530 | XMFLAGS="$g4vis_xmflags" |
---|
531 | export XMFLAGS |
---|
532 | if [ X\$g4non_display = X ] ; then |
---|
533 | echo "On this machine the XMFLAGS=\$XMFLAGS" |
---|
534 | fi |
---|
535 | fi |
---|
536 | |
---|
537 | #+ |
---|
538 | if [ X$g4vis_build_openglxm_driver != X ] ; then |
---|
539 | XMLIBS="$g4vis_xmlibs" |
---|
540 | export XMLIBS |
---|
541 | if [ X\$g4non_display = X ] ; then |
---|
542 | echo "On this machine the XMLIBS=\$XMLIBS" |
---|
543 | fi |
---|
544 | fi |
---|
545 | |
---|
546 | #+ |
---|
547 | if [ X$g4ui_build_xm_session != X ] ; then |
---|
548 | XMFLAGS="$g4vis_xmflags" |
---|
549 | export XMFLAGS |
---|
550 | if [ X\$g4non_display = X ] ; then |
---|
551 | echo "On this machine the XMFLAGS=\$XMFLAGS" |
---|
552 | fi |
---|
553 | fi |
---|
554 | |
---|
555 | #+ |
---|
556 | if [ X$g4vis_build_xm_session != X ] ; then |
---|
557 | XMLIBS="$g4vis_xmlibs" |
---|
558 | export XMLIBS |
---|
559 | if [ X\$g4non_display = X ] ; then |
---|
560 | echo "On this machine the XMLIBS=\$XMLIBS" |
---|
561 | fi |
---|
562 | fi |
---|
563 | |
---|
564 | #+ |
---|
565 | if [ X$g4ui_build_xaw_session != X ] ; then |
---|
566 | XAWFLAGS="$g4ui_xawflags" |
---|
567 | export XAWFLAGS |
---|
568 | if [ X\$g4non_display = X ] ; then |
---|
569 | echo "On this machine the XAWFLAGS=\$XAWFLAGS" |
---|
570 | fi |
---|
571 | fi |
---|
572 | |
---|
573 | #+ |
---|
574 | if [ X$g4ui_build_xaw_session != X ] ; then |
---|
575 | XAWLIBS="$g4ui_xawlibs" |
---|
576 | export XAWLIBS |
---|
577 | if [ X\$g4non_display = X ] ; then |
---|
578 | echo "On this machine the XAWLIBS=\$XAWLIBS" |
---|
579 | fi |
---|
580 | fi |
---|
581 | |
---|
582 | |
---|
583 | # |
---|
584 | # Qt Flags and Libs, messy, but needed for backward compatibility |
---|
585 | #+ |
---|
586 | if [ "X$g4ui_build_qt_session" = "Xy" -o "X$g4ui_use_qt" = "Xy" ] ; then |
---|
587 | QTFLAGS="$g4_qt_cxxflags" |
---|
588 | QTLIBS="$g4_qt_libs" |
---|
589 | QTMOC="$g4_qt_moc" |
---|
590 | export QTFLAGS |
---|
591 | export QTLIBS |
---|
592 | export QTMOC |
---|
593 | echo "On this machine the QTFLAGS=\$QTFLAGS" |
---|
594 | echo "On this machine the QTLIBS=\$QTLIBS" |
---|
595 | echo "On this machine the QTMOC=\$QTMOC" |
---|
596 | fi |
---|
597 | |
---|
598 | if [ "X$g4vis_build_openglqt_driver" = "Xy" -o "X$g4vis_build_openglqt_driver" = "Xy" ] ; then |
---|
599 | if [ "X\$QTFLAGS" = "X" ] ; then |
---|
600 | QTFLAGS="$g4_qt_cxxflags $g4_qt_gl_cxxflags" |
---|
601 | else |
---|
602 | QTFLAGS="\$QTFLAGS $g4_qt_gl_cxxflags" |
---|
603 | fi |
---|
604 | if [ "X\$QTMOC" = "X" ] ; then |
---|
605 | QTMOC="$g4_qt_moc" |
---|
606 | fi |
---|
607 | GLQTLIBS="$g4_qt_libs $g4_qt_gl_libs" |
---|
608 | export QTFLAGS |
---|
609 | export QTMOC |
---|
610 | export GLQTLIBS |
---|
611 | echo "On this machine the QTFLAGS=\$QTFLAGS" |
---|
612 | echo "On this machine the GLQTLIBS=\$GLQTLIBS" |
---|
613 | echo "On this machine the QTMOC=\$QTMOC" |
---|
614 | fi |
---|
615 | |
---|
616 | |
---|
617 | |
---|
618 | # |
---|
619 | # Use GDML module |
---|
620 | # |
---|
621 | #+ |
---|
622 | if [ X$g4lib_build_gdml = Xy ] ; then |
---|
623 | G4LIB_BUILD_GDML=1 |
---|
624 | export G4LIB_BUILD_GDML |
---|
625 | echo "On this machine the G4LIB_BUILD_GDML=\$G4LIB_BUILD_GDML" |
---|
626 | fi |
---|
627 | |
---|
628 | if [ X$g4lib_build_gdml = Xy ] ; then |
---|
629 | XERCESCROOT=$g4gdml_xercesc_root |
---|
630 | export XERCESCROOT |
---|
631 | echo "On this machine the XERCESCROOT=\$XERCESCROOT" |
---|
632 | fi |
---|
633 | |
---|
634 | |
---|
635 | |
---|
636 | # |
---|
637 | # Use G3TOG4 module |
---|
638 | # |
---|
639 | #+ |
---|
640 | if [ X$g4wlib_build_g3tog4 = Xy ] ; then |
---|
641 | G4LIB_BUILD_G3TOG4=1 |
---|
642 | export G4LIB_BUILD_G3TOG4 |
---|
643 | if [ X\$g4non_display = X ] ; then |
---|
644 | echo "On this machine the G4LIB_BUILD_G3TOG4=\$G4LIB_BUILD_G3TOG4" |
---|
645 | fi |
---|
646 | fi |
---|
647 | |
---|
648 | if [ X$g4w_use_g3tog4 = Xy ] ; then |
---|
649 | G4LIB_USE_G3TOG4=1 |
---|
650 | export G4LIB_USE_G3TOG4 |
---|
651 | if [ X\$g4non_display = X ] ; then |
---|
652 | echo "On this machine the G4LIB_USE_G3TOG4=\$G4LIB_USE_G3TOG4" |
---|
653 | fi |
---|
654 | fi |
---|
655 | |
---|
656 | # |
---|
657 | # Use ZLIB module |
---|
658 | # |
---|
659 | #+ |
---|
660 | if [ X$g4wlib_build_zlib = Xy ] ; then |
---|
661 | G4LIB_BUILD_ZLIB=1 |
---|
662 | export G4LIB_BUILD_ZLIB |
---|
663 | if [ X\$g4non_display = X ] ; then |
---|
664 | echo "On this machine the G4LIB_BUILD_ZLIB=\$G4LIB_BUILD_ZLIB" |
---|
665 | fi |
---|
666 | fi |
---|
667 | |
---|
668 | if [ X$g4w_use_zlib = Xy ] ; then |
---|
669 | G4LIB_USE_ZLIB=1 |
---|
670 | export G4LIB_USE_ZLIB |
---|
671 | if [ X\$g4non_display = X ] ; then |
---|
672 | echo "On this machine the G4LIB_USE_ZLIB=\$G4LIB_USE_ZLIB" |
---|
673 | fi |
---|
674 | fi |
---|
675 | |
---|
676 | |
---|
677 | #+ |
---|
678 | # |
---|
679 | # g4shared |
---|
680 | # |
---|
681 | if [ X$g4lib_build_shared = Xy ] ; then |
---|
682 | G4LIB_BUILD_SHARED=1 |
---|
683 | export G4LIB_BUILD_SHARED |
---|
684 | if [ X\$g4non_display = X ] ; then |
---|
685 | echo "On this machine the G4LIB_BUILD_SHARED=\$G4LIB_BUILD_SHARED" |
---|
686 | fi |
---|
687 | fi |
---|
688 | |
---|
689 | if [ X$g4lib_build_static = Xy ] ; then |
---|
690 | G4LIB_BUILD_STATIC=1 |
---|
691 | export G4LIB_BUILD_STATIC |
---|
692 | if [ X\$g4non_display = X ] ; then |
---|
693 | echo "On this machine the G4LIB_BUILD_STATIC=\$G4LIB_BUILD_STATIC" |
---|
694 | fi |
---|
695 | fi |
---|
696 | |
---|
697 | #+ |
---|
698 | # |
---|
699 | # g4granular |
---|
700 | # |
---|
701 | if [ X$g4lib_use_granular = Xy ] ; then |
---|
702 | G4LIB_USE_GRANULAR=1 |
---|
703 | export G4LIB_USE_GRANULAR |
---|
704 | if [ X\$g4non_display = X ] ; then |
---|
705 | echo "On this machine the G4LIB_USE_GRANULAR=\$G4LIB_USE_GRANULAR" |
---|
706 | fi |
---|
707 | fi |
---|
708 | |
---|
709 | # Check for Windows! |
---|
710 | if test "X\$G4SYSTEM" != "XWIN32-VC" -a "X\$G4SYSTEM" != "XWIN32-VC7"; then |
---|
711 | #+ |
---|
712 | # |
---|
713 | # UI_USE_TCSH for Unix |
---|
714 | # |
---|
715 | G4UI_USE_TCSH=1 |
---|
716 | export G4UI_USE_TCSH |
---|
717 | if [ X\$g4non_display = X ] ; then |
---|
718 | echo "On this machine the G4UI_USE_TCSH=\$G4UI_USE_TCSH" |
---|
719 | fi |
---|
720 | fi |
---|
721 | |
---|
722 | ##################################################################### |
---|
723 | |
---|
724 | !GROK!THIS! |
---|
725 | |
---|
726 | : In the following dollars and backticks do not need the extra backslash. |
---|
727 | $spitshell >>env.sh <<'!NO!SUBS!' |
---|
728 | |
---|
729 | |
---|
730 | #+ |
---|
731 | # |
---|
732 | # G4WORKDIR |
---|
733 | # |
---|
734 | if [ $G4WORKDIR ] ; then |
---|
735 | |
---|
736 | if [ X\$g4non_display = X ] ; then |
---|
737 | echo "In your environment you have the G4WORKDIR=$G4WORKDIR" |
---|
738 | fi |
---|
739 | |
---|
740 | else |
---|
741 | |
---|
742 | # Check for Windows! |
---|
743 | if test "X$G4SYSTEM" = "XWIN32-VC" -o "X$G4SYSTEM" = "XWIN32-VC7"; then |
---|
744 | |
---|
745 | if [ X\$g4non_display = X ] ; then |
---|
746 | echo "G4WORKDIR will be set to c:/geant4 (in "native" Windows syntax)" |
---|
747 | fi |
---|
748 | |
---|
749 | G4WORKDIR="c:/geant4" |
---|
750 | export G4WORKDIR |
---|
751 | |
---|
752 | else # if Unix |
---|
753 | |
---|
754 | if [ X\$g4non_display = X ] ; then |
---|
755 | echo "G4WORKDIR will be set to HOME/geant4=$HOME/geant4" |
---|
756 | fi |
---|
757 | |
---|
758 | G4WORKDIR=$HOME/geant4 |
---|
759 | export G4WORKDIR |
---|
760 | |
---|
761 | fi # if platforms |
---|
762 | |
---|
763 | fi |
---|
764 | |
---|
765 | |
---|
766 | |
---|
767 | |
---|
768 | # |
---|
769 | # Shared libraries |
---|
770 | # |
---|
771 | if [ $G4LIB_BUILD_SHARED ] ; then |
---|
772 | # |
---|
773 | # Warning about LD_LIBRARY_PATH |
---|
774 | # |
---|
775 | echo '' |
---|
776 | echo 'LD_LIBRARY_PATH is set to include CLHEP and Geant4 libraries. ' |
---|
777 | echo '' |
---|
778 | echo 'NOTE : verify that the correct path for the CLHEP library' |
---|
779 | echo '- $CLHEP_BASE_DIR/lib - is included in the $LD_LIBRARY_PATH' |
---|
780 | echo 'variable in your environment, and no other outdated installations' |
---|
781 | echo 'of CLHEP are by chance referenced through $LD_LIBRARY_PATH and' |
---|
782 | echo 'present in your system !' |
---|
783 | echo '' |
---|
784 | |
---|
785 | if [ $LD_LIBRARY_PATH ] ; then |
---|
786 | LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${G4LIB}/${G4SYSTEM} |
---|
787 | LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${CLHEP_BASE_DIR}/lib |
---|
788 | |
---|
789 | if [ $G4LIB_BUILD_GDML ] ; then |
---|
790 | LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${XERCESCROOT}/lib |
---|
791 | fi |
---|
792 | export LD_LIBRARY_PATH |
---|
793 | |
---|
794 | else |
---|
795 | LD_LIBRARY_PATH=${G4LIB}/${G4SYSTEM} |
---|
796 | LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${CLHEP_BASE_DIR}/lib |
---|
797 | |
---|
798 | if [ $G4LIB_BUILD_GDML ] ; then |
---|
799 | LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${XERCESCROOT}/lib |
---|
800 | fi |
---|
801 | |
---|
802 | export LD_LIBRARY_PATH |
---|
803 | fi |
---|
804 | fi |
---|
805 | |
---|
806 | # |
---|
807 | # Shared libraries for Mac |
---|
808 | # |
---|
809 | if test "X$G4SYSTEM" = "XDarwin-g++" ; then |
---|
810 | |
---|
811 | if [ $G4LIB_BUILD_SHARED ] ; then |
---|
812 | if [ $DYLD_LIBRARY_PATH ] ; then |
---|
813 | DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${G4LIB}/${G4SYSTEM} |
---|
814 | DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${CLHEP_BASE_DIR}/lib |
---|
815 | |
---|
816 | if [ $G4LIB_BUILD_GDML ] ; then |
---|
817 | DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${XERCESCROOT}/lib |
---|
818 | fi |
---|
819 | |
---|
820 | export DYLD_LIBRARY_PATH |
---|
821 | else |
---|
822 | DYLD_LIBRARY_PATH=${G4LIB}/${G4SYSTEM} |
---|
823 | DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${CLHEP_BASE_DIR}/lib |
---|
824 | |
---|
825 | if [ $G4LIB_BUILD_GDML ] ; then |
---|
826 | DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${XERCESCROOT}/lib |
---|
827 | fi |
---|
828 | |
---|
829 | export DYLD_LIBRARY_PATH |
---|
830 | fi |
---|
831 | fi |
---|
832 | |
---|
833 | fi |
---|
834 | |
---|
835 | # |
---|
836 | # For BIN |
---|
837 | # |
---|
838 | PATH=${PATH}:${G4WORKDIR}/bin/${G4SYSTEM} |
---|
839 | export PATH |
---|
840 | |
---|
841 | !NO!SUBS! |
---|
842 | chmod 755 env.sh |
---|
843 | $eunicefix env.sh |
---|