1 | #! /bin/sh |
---|
2 | # |
---|
3 | # If these # comments don't work, trim them. Don't worry about any other |
---|
4 | # shell scripts, Configure will trim # comments from them for you. |
---|
5 | # |
---|
6 | # (If you are trying to port this package to a machine without sh, |
---|
7 | # I would suggest you have a look at the prototypical config_h.SH file |
---|
8 | # and edit it to reflect your system. Some packages may include samples |
---|
9 | # of config.h for certain machines, so you might look for one of those.) |
---|
10 | # |
---|
11 | # Yes, you may rip this off to use in other distribution packages. This |
---|
12 | # script belongs to the public domain and cannot be copyrighted. |
---|
13 | # |
---|
14 | # (Note: this Configure script was generated automatically. Rather than |
---|
15 | # working with this copy of Configure, you may wish to get metaconfig. |
---|
16 | # The dist-3.0 package (which contains metaconfig) was posted in |
---|
17 | # comp.sources.misc and is available on CPAN under authors/id/RAM so |
---|
18 | # you may fetch it yourself from your nearest archive site.) |
---|
19 | # |
---|
20 | |
---|
21 | # $Id: Configure,v 1.104 2008/07/03 14:17:16 bmorgan Exp $ |
---|
22 | # |
---|
23 | # Generated on Thu Jul 3 14:50:17 BST 2008 [metaconfig 3.0 PL70] |
---|
24 | |
---|
25 | cat >/tmp/c1$$ <<EOF |
---|
26 | WARNING!!!!! |
---|
27 | |
---|
28 | SCO csh still thinks true is false! /bin/csh needs to be updated. |
---|
29 | EOF |
---|
30 | cat >/tmp/c2$$ <<EOF |
---|
31 | |
---|
32 | You didn't run Configure with sh! |
---|
33 | I'll attempt to run sh for you... |
---|
34 | EOF |
---|
35 | |
---|
36 | true || cat /tmp/c1$$ /tmp/c2$$ |
---|
37 | true || exec sh $0 $argv:q |
---|
38 | |
---|
39 | (exit $?0) || cat /tmp/c2$$ |
---|
40 | (exit $?0) || exec sh $0 $argv:q |
---|
41 | rm -f /tmp/c1$$ /tmp/c2$$ |
---|
42 | |
---|
43 | : compute my invocation name |
---|
44 | me=$0 |
---|
45 | case "$0" in |
---|
46 | */*) |
---|
47 | me=`echo $0 | sed -e 's!.*/\(.*\)!\1!' 2>/dev/null` |
---|
48 | test "$me" || me=$0 |
---|
49 | ;; |
---|
50 | esac |
---|
51 | |
---|
52 | : Proper PATH separator |
---|
53 | p_=: |
---|
54 | : On OS/2 this directory should exist if this is not floppy only system :-] |
---|
55 | #if test -d c:/.; then |
---|
56 | # p_=\; |
---|
57 | # PATH=`cmd /c "echo %PATH%" | tr '\\\\' / ` |
---|
58 | #?X: That's a bug in ksh5.22 |
---|
59 | # OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'` |
---|
60 | #fi |
---|
61 | |
---|
62 | : Proper PATH setting |
---|
63 | paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin' |
---|
64 | paths="$paths /opt/bin /opt/local/bin /opt/local /opt/lbin" |
---|
65 | paths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin" |
---|
66 | paths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin" |
---|
67 | paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb" |
---|
68 | paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /usr/ccs/bin" |
---|
69 | paths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib" |
---|
70 | paths="$paths /sbin /usr/sbin /usr/libexec" |
---|
71 | |
---|
72 | for p in $paths |
---|
73 | do |
---|
74 | case "$p_$PATH$p_" in |
---|
75 | *$p_$p$p_*) ;; |
---|
76 | *) test -d $p && PATH=$PATH$p_$p ;; |
---|
77 | esac |
---|
78 | done |
---|
79 | |
---|
80 | PATH=.$p_$PATH |
---|
81 | export PATH |
---|
82 | |
---|
83 | : shall we be using ksh? |
---|
84 | inksh='' |
---|
85 | needksh='' |
---|
86 | avoidksh='' |
---|
87 | newsh=/bin/ksh |
---|
88 | changesh='' |
---|
89 | if (PATH=.; alias -x) >/dev/null 2>&1; then |
---|
90 | inksh=true |
---|
91 | fi |
---|
92 | if test -f /hp-ux -a -f /bin/ksh; then |
---|
93 | needksh='to avoid sh bug in "here document" expansion' |
---|
94 | fi |
---|
95 | if test -d /usr/lpp -a -f /usr/bin/bsh -a -f /usr/bin/uname; then |
---|
96 | if test X`/usr/bin/uname -v` = X4; then |
---|
97 | avoidksh="to avoid AIX 4's /bin/sh" |
---|
98 | newsh=/usr/bin/bsh |
---|
99 | fi |
---|
100 | fi |
---|
101 | case "$inksh/$needksh" in |
---|
102 | /[a-z]*) |
---|
103 | unset ENV |
---|
104 | changesh=true |
---|
105 | reason="$needksh" |
---|
106 | ;; |
---|
107 | esac |
---|
108 | case "$inksh/$avoidksh" in |
---|
109 | true/[a-z]*) |
---|
110 | changesh=true |
---|
111 | reason="$avoidksh" |
---|
112 | ;; |
---|
113 | esac |
---|
114 | case "$inksh/$needksh-$avoidksh-" in |
---|
115 | true/--) |
---|
116 | cat <<EOM |
---|
117 | (I see you are using the Korn shell. In case of problems |
---|
118 | try the Bourne shell instead.) |
---|
119 | EOM |
---|
120 | ;; |
---|
121 | esac |
---|
122 | case "$changesh" in |
---|
123 | true) |
---|
124 | echo "(Feeding myself to $newsh $reason.)" |
---|
125 | case "$0" in |
---|
126 | Configure|*/Configure) exec $newsh $0 "$@";; |
---|
127 | *) exec $newsh Configure "$@";; |
---|
128 | esac |
---|
129 | ;; |
---|
130 | esac |
---|
131 | |
---|
132 | : Configure runs within the UU subdirectory |
---|
133 | test -d .config/UU || mkdir -p .config/UU |
---|
134 | unset CDPATH |
---|
135 | cd .config/UU && rm -f ./* |
---|
136 | |
---|
137 | eunicefix='' |
---|
138 | g4compiler='' |
---|
139 | g4osname='' |
---|
140 | g4system='' |
---|
141 | hint='' |
---|
142 | myuname='' |
---|
143 | osname='' |
---|
144 | osvers='' |
---|
145 | Author='' |
---|
146 | Date='' |
---|
147 | Header='' |
---|
148 | Id='' |
---|
149 | Locker='' |
---|
150 | Log='' |
---|
151 | RCSfile='' |
---|
152 | Revision='' |
---|
153 | Source='' |
---|
154 | State='' |
---|
155 | cf_by='' |
---|
156 | cf_time='' |
---|
157 | contains='' |
---|
158 | d_portable='' |
---|
159 | g4base='' |
---|
160 | g4conf='' |
---|
161 | g4final_install='' |
---|
162 | g4include='' |
---|
163 | g4includes_flag='' |
---|
164 | g4install='' |
---|
165 | g4workdir='' |
---|
166 | g4bin='' |
---|
167 | g4lib='' |
---|
168 | g4tmp='' |
---|
169 | g4abladata='' |
---|
170 | g4data='' |
---|
171 | g4elasticdata='' |
---|
172 | g4ledata='' |
---|
173 | g4levelgammadata='' |
---|
174 | g4neutronhpcrosssections='' |
---|
175 | g4radioactivedata='' |
---|
176 | g4clhep_base_dir='' |
---|
177 | g4clhep_include_dir='' |
---|
178 | g4clhep_lib='' |
---|
179 | g4clhep_lib_dir='' |
---|
180 | g4lib_build_shared='' |
---|
181 | g4lib_build_static='' |
---|
182 | g4lib_use_dll='' |
---|
183 | g4lib_use_dyn='' |
---|
184 | g4lib_use_shared='' |
---|
185 | g4lib_use_static='' |
---|
186 | g4global='' |
---|
187 | g4granular='' |
---|
188 | g4lib_use_granular='' |
---|
189 | g4debug='' |
---|
190 | g4ui_build_gag_session='' |
---|
191 | g4ui_build_terminal_session='' |
---|
192 | g4ui_build_win32_session='' |
---|
193 | g4ui_build_xaw_session='' |
---|
194 | g4ui_build_xm_session='' |
---|
195 | g4ui_none='' |
---|
196 | g4ui_use_gag='' |
---|
197 | g4ui_use_tcsh='' |
---|
198 | g4ui_use_terminal='' |
---|
199 | g4ui_use_win32='' |
---|
200 | g4ui_use_xaw='' |
---|
201 | g4ui_use_xm='' |
---|
202 | g4ui_xawflags='' |
---|
203 | g4ui_xawhome='' |
---|
204 | g4ui_xawlibs='' |
---|
205 | g4vis_xmflags='' |
---|
206 | g4vis_xmhome='' |
---|
207 | g4vis_xmlibs='' |
---|
208 | g4_qtmochome='' |
---|
209 | g4_qtincdir='' |
---|
210 | g4_qtlibdir='' |
---|
211 | g4ui_build_qt_session='' |
---|
212 | g4ui_use_qt='' |
---|
213 | g4vis_build_asciitree_driver='' |
---|
214 | g4vis_build_dawn_driver='' |
---|
215 | g4vis_build_dawnfile_driver='' |
---|
216 | g4vis_build_oiwin32_driver='' |
---|
217 | g4vis_build_oix_driver='' |
---|
218 | g4vis_build_openglwin32_driver='' |
---|
219 | g4vis_build_openglx_driver='' |
---|
220 | g4vis_build_openglxm_driver='' |
---|
221 | g4vis_build_raytracer_driver='' |
---|
222 | g4vis_build_raytracerx_driver='' |
---|
223 | g4vis_build_vrml_driver='' |
---|
224 | g4vis_build_vrmlfile_driver='' |
---|
225 | g4vis_oglhome='' |
---|
226 | g4vis_oivhome='' |
---|
227 | g4vis_use_asciitree='' |
---|
228 | g4vis_use_dawn='' |
---|
229 | g4vis_use_dawnfile='' |
---|
230 | g4vis_use_oiwin32='' |
---|
231 | g4vis_use_oix='' |
---|
232 | g4vis_use_openglwin32='' |
---|
233 | g4vis_use_openglx='' |
---|
234 | g4vis_use_openglxm='' |
---|
235 | g4vis_use_raytracer='' |
---|
236 | g4vis_use_raytracerx='' |
---|
237 | g4vis_use_vrml='' |
---|
238 | g4vis_use_vrmlfile='' |
---|
239 | g4vis_xmflags='' |
---|
240 | g4vis_xmhome='' |
---|
241 | g4vis_xmlibs='' |
---|
242 | g4vis_build_openglqt_driver='' |
---|
243 | g4vis_use_openglqt='' |
---|
244 | g4gdml_xercesc_root='' |
---|
245 | g4lib_build_gdml='' |
---|
246 | g4wanalysis_build='' |
---|
247 | g4wanalysis_build_jas='' |
---|
248 | g4wanalysis_build_lab='' |
---|
249 | g4wanalysis_build_lizard='' |
---|
250 | g4wanalysis_use='' |
---|
251 | g4wanalysis_use_jas='' |
---|
252 | g4wanalysis_use_lab='' |
---|
253 | g4wanalysis_use_lizard='' |
---|
254 | g4_gmake='' |
---|
255 | g4_gmake_version='' |
---|
256 | g4_make='' |
---|
257 | g4_make_version='' |
---|
258 | g4make='' |
---|
259 | g4w_use_g3tog4='' |
---|
260 | g4wlib_build_g3tog4='' |
---|
261 | g4w_use_zlib='' |
---|
262 | g4wlib_build_zlib='' |
---|
263 | lns='' |
---|
264 | c='' |
---|
265 | n='' |
---|
266 | package='' |
---|
267 | spackage='' |
---|
268 | sh='' |
---|
269 | sharpbang='' |
---|
270 | shsharp='' |
---|
271 | spitshell='' |
---|
272 | src='' |
---|
273 | startsh='' |
---|
274 | CONFIG='' |
---|
275 | |
---|
276 | define='define' |
---|
277 | undef='undef' |
---|
278 | smallmach='pdp11 i8086 z8000 i80286 iAPX286' |
---|
279 | rmlist='' |
---|
280 | |
---|
281 | : We must find out about Eunice early |
---|
282 | eunicefix=':' |
---|
283 | if test -f /etc/unixtovms; then |
---|
284 | eunicefix=/etc/unixtovms |
---|
285 | fi |
---|
286 | if test -f /etc/unixtovms.exe; then |
---|
287 | eunicefix=/etc/unixtovms.exe |
---|
288 | fi |
---|
289 | |
---|
290 | #INITIALIZE QT UI OPTIONS |
---|
291 | g4ui_build_qt_session='n' |
---|
292 | g4ui_use_qt='n' |
---|
293 | g4_qtmochome='' |
---|
294 | g4_qtincdir='' |
---|
295 | g4_qtlibdir='' |
---|
296 | #END QT UI OPTIONS |
---|
297 | #INITIALIZE QT UI OPTIONS |
---|
298 | g4ui_build_qt_session='n' |
---|
299 | g4ui_use_qt='n' |
---|
300 | g4_qtmochome='' |
---|
301 | g4_qtincdir='' |
---|
302 | g4_qtlibdir='' |
---|
303 | #END QT UI OPTIONS |
---|
304 | #INITIALIZE QT VIS DRIVER OPTIONS |
---|
305 | g4vis_build_openglqt_driver='n' |
---|
306 | g4ui_use_openglqt='n' |
---|
307 | #END QT VIS DRIVER OPTIONS |
---|
308 | |
---|
309 | : Find the basic shell for Bourne shell scripts |
---|
310 | case "$sh" in |
---|
311 | '') |
---|
312 | case "$SYSTYPE" in |
---|
313 | *bsd*|sys5*) xxx="/$SYSTYPE/bin/sh";; |
---|
314 | *) xxx='/bin/sh';; |
---|
315 | esac |
---|
316 | if test -f "$xxx"; then |
---|
317 | sh="$xxx" |
---|
318 | else |
---|
319 | : Build up a list and do a single loop so we can 'break' out. |
---|
320 | pth=`echo $PATH | sed -e "s/$p_/ /g"` |
---|
321 | for xxx in sh bash ksh pdksh ash; do |
---|
322 | for p in $pth; do |
---|
323 | try="$try ${p}/${xxx}" |
---|
324 | done |
---|
325 | done |
---|
326 | for xxx in $try; do |
---|
327 | if test -f "$xxx"; then |
---|
328 | sh="$xxx"; |
---|
329 | break |
---|
330 | elif test -f "$xxx.exe"; then |
---|
331 | sh="$xxx"; |
---|
332 | break |
---|
333 | fi |
---|
334 | done |
---|
335 | fi |
---|
336 | ;; |
---|
337 | esac |
---|
338 | |
---|
339 | case "$sh" in |
---|
340 | '') cat <<EOM >&2 |
---|
341 | $me: Fatal Error: I can't find a Bourne Shell anywhere. |
---|
342 | |
---|
343 | Usually it's in /bin/sh. |
---|
344 | Please contact Serguei.Sadilov@cern.ch and |
---|
345 | we'll try to straighten this all out. |
---|
346 | EOM |
---|
347 | exit 1 |
---|
348 | ;; |
---|
349 | esac |
---|
350 | |
---|
351 | : see if sh knows # comments |
---|
352 | if `$sh -c '#' >/dev/null 2>&1`; then |
---|
353 | shsharp=true |
---|
354 | spitshell=cat |
---|
355 | xcat=/bin/cat |
---|
356 | test -f $xcat || xcat=/usr/bin/cat |
---|
357 | echo "#!$xcat" >try |
---|
358 | $eunicefix try |
---|
359 | chmod +x try |
---|
360 | # |
---|
361 | # $xcat is wrong on WIN32: there is no /bin/cat and /usr/bin/cat by default. |
---|
362 | # But we are sure that sharpbang is to be '#!' and let 'today' will be !=0. |
---|
363 | # |
---|
364 | # ./try > today |
---|
365 | echo "#!$xcat" >today |
---|
366 | |
---|
367 | if test -s today; then |
---|
368 | sharpbang='#!' |
---|
369 | else |
---|
370 | echo "#! $xcat" > try |
---|
371 | $eunicefix try |
---|
372 | chmod +x try |
---|
373 | # |
---|
374 | # $xcat is wrong on WIN32: there is no /bin/cat and /usr/bin/cat by default. |
---|
375 | # But we are sure that sharpbang is to be '#!' and let 'today' will be !=0. |
---|
376 | # |
---|
377 | # ./try > today |
---|
378 | echo "#!$xcat" >today |
---|
379 | |
---|
380 | if test -s today; then |
---|
381 | sharpbang='#! ' |
---|
382 | else |
---|
383 | sharpbang=': use ' |
---|
384 | fi |
---|
385 | fi |
---|
386 | else |
---|
387 | echo " " |
---|
388 | echo "Your $sh doesn't grok # comments--I will strip them later on." |
---|
389 | shsharp=false |
---|
390 | cd .. |
---|
391 | echo "exec grep -v '^[ ]*#'" >spitshell |
---|
392 | chmod +x spitshell |
---|
393 | $eunicefix spitshell |
---|
394 | spitshell=`pwd`/spitshell |
---|
395 | cd UU |
---|
396 | echo "I presume that if # doesn't work, #! won't work either!" |
---|
397 | sharpbang=': use ' |
---|
398 | fi |
---|
399 | rm -f try today |
---|
400 | |
---|
401 | : figure out how to guarantee sh startup |
---|
402 | case "$startsh" in |
---|
403 | '') startsh=${sharpbang}${sh} ;; |
---|
404 | *) |
---|
405 | esac |
---|
406 | cat >try <<EOSS |
---|
407 | $startsh |
---|
408 | set abc |
---|
409 | test "$?abc" != 1 |
---|
410 | EOSS |
---|
411 | |
---|
412 | chmod +x try |
---|
413 | $eunicefix try |
---|
414 | if ./try; then |
---|
415 | : echo "Yup, it does." |
---|
416 | else |
---|
417 | echo "Hmm... '$startsh' does not guarantee sh startup..." |
---|
418 | echo "You may have to fix up the shell scripts to make sure $sh runs them." |
---|
419 | fi |
---|
420 | rm -f try |
---|
421 | |
---|
422 | : produce awk script to parse command line options |
---|
423 | cat >options.awk <<'EOF' |
---|
424 | BEGIN { |
---|
425 | optstr = "dD:eEf:hKOrsSU:V"; # getopt-style specification |
---|
426 | |
---|
427 | len = length(optstr); |
---|
428 | for (i = 1; i <= len; i++) { |
---|
429 | c = substr(optstr, i, 1); |
---|
430 | if (i < len) a = substr(optstr, i + 1, 1); else a = ""; |
---|
431 | if (a == ":") { |
---|
432 | arg[c] = 1; |
---|
433 | i++; |
---|
434 | } |
---|
435 | opt[c] = 1; |
---|
436 | } |
---|
437 | } |
---|
438 | { |
---|
439 | expect = 0; |
---|
440 | str = $0; |
---|
441 | if (substr(str, 1, 1) != "-") { |
---|
442 | printf("'%s'\n", str); |
---|
443 | next; |
---|
444 | } |
---|
445 | len = length($0); |
---|
446 | for (i = 2; i <= len; i++) { |
---|
447 | c = substr(str, i, 1); |
---|
448 | if (!opt[c]) { |
---|
449 | printf("-%s\n", substr(str, i)); |
---|
450 | next; |
---|
451 | } |
---|
452 | printf("-%s\n", c); |
---|
453 | if (arg[c]) { |
---|
454 | if (i < len) |
---|
455 | printf("'%s'\n", substr(str, i + 1)); |
---|
456 | else |
---|
457 | expect = 1; |
---|
458 | next; |
---|
459 | } |
---|
460 | } |
---|
461 | } |
---|
462 | END { |
---|
463 | if (expect) |
---|
464 | print "?"; |
---|
465 | } |
---|
466 | EOF |
---|
467 | |
---|
468 | : process the command line options |
---|
469 | set X `for arg in "$@"; do echo "X$arg"; done | |
---|
470 | sed -e s/X// | awk -f options.awk` |
---|
471 | eval "set $*" |
---|
472 | shift |
---|
473 | rm -f options.awk |
---|
474 | |
---|
475 | : set up default values |
---|
476 | fastread='' |
---|
477 | reuseval=false |
---|
478 | config_sh='' |
---|
479 | alldone='' |
---|
480 | error='' |
---|
481 | silent='' |
---|
482 | extractsh='' |
---|
483 | override='' |
---|
484 | knowitall='' |
---|
485 | echo "*********" |
---|
486 | echo `pwd` |
---|
487 | echo "*********" |
---|
488 | rm -f optdef.sh |
---|
489 | cat >optdef.sh <<EOS |
---|
490 | $startsh |
---|
491 | EOS |
---|
492 | |
---|
493 | |
---|
494 | : option parsing |
---|
495 | while test $# -gt 0; do |
---|
496 | case "$1" in |
---|
497 | -d) shift; fastread=yes;; |
---|
498 | -e) shift; alldone=cont;; |
---|
499 | -build) shift; g4build=yes;; |
---|
500 | -incflags) shift; g4incflags=yes;; |
---|
501 | -install) shift; install=yes;; |
---|
502 | -cppflags) shift; g4cppflags=yes;; |
---|
503 | -cxxflags) shift; g4cxxflags=yes;; |
---|
504 | -ldlibs) shift; g4ldlibs=yes;; |
---|
505 | -ldflags) shift; g4ldflags=yes;; |
---|
506 | -f) |
---|
507 | shift |
---|
508 | cd ../.. |
---|
509 | if test -r "$1"; then |
---|
510 | config_sh="$1" |
---|
511 | else |
---|
512 | echo "$me: cannot read config file $1." >&2 |
---|
513 | error=true |
---|
514 | fi |
---|
515 | cd .config/UU |
---|
516 | shift;; |
---|
517 | -h) shift; error=true;; |
---|
518 | -r) shift; reuseval=true;; |
---|
519 | -s) shift; silent=true; realsilent=true;; |
---|
520 | -E) shift; alldone=exit;; |
---|
521 | -K) shift; knowitall=true;; |
---|
522 | -O) shift; override=true;; |
---|
523 | -S) shift; silent=true; extractsh=true;; |
---|
524 | -D) |
---|
525 | shift |
---|
526 | case "$1" in |
---|
527 | *=) |
---|
528 | echo "$me: use '-U symbol=', not '-D symbol='." >&2 |
---|
529 | echo "$me: ignoring -D $1" >&2 |
---|
530 | ;; |
---|
531 | *=*) echo "$1" | \ |
---|
532 | sed -e "s/'/'\"'\"'/g" -e "s/=\(.*\)/='\1'/" >> optdef.sh;; |
---|
533 | *) echo "$1='define'" >> optdef.sh;; |
---|
534 | esac |
---|
535 | shift |
---|
536 | ;; |
---|
537 | -U) |
---|
538 | shift |
---|
539 | case "$1" in |
---|
540 | *=) echo "$1" >> optdef.sh;; |
---|
541 | *=*) |
---|
542 | echo "$me: use '-D symbol=val', not '-U symbol=val'." >&2 |
---|
543 | echo "$me: ignoring -U $1" >&2 |
---|
544 | ;; |
---|
545 | *) echo "$1='undef'" >> optdef.sh;; |
---|
546 | esac |
---|
547 | shift |
---|
548 | ;; |
---|
549 | -V) echo "$me generated by metaconfig 3.0 PL70." >&2 |
---|
550 | exit 0;; |
---|
551 | --) break;; |
---|
552 | -*) echo "$me: unknown option $1" >&2; shift; error=true;; |
---|
553 | *) break;; |
---|
554 | esac |
---|
555 | done |
---|
556 | |
---|
557 | case "$error" in |
---|
558 | true) |
---|
559 | cat >&2 <<EOM |
---|
560 | Usage: $me [-dehrsEKOSV] [-install] [-build] [-libs] [-f config.sh] [-D symbol] [-D symbol=value] |
---|
561 | [-U symbol] [-U symbol=] |
---|
562 | -d : use defaults for all answers. |
---|
563 | -e : go on without questioning past the production of config.sh. |
---|
564 | -build : start configuration AND build of Geant4 libraries. |
---|
565 | -cppflags : retrieve the list of cppflags |
---|
566 | -cxxflags : retrieve the list of cxxflags |
---|
567 | -incflags : retrieve the list of incflags |
---|
568 | -install : start installation of Geant4 libraries. |
---|
569 | -ldflags : retrieve the list of directories where libraries are placed |
---|
570 | -ldlibs : retrieve the list of libraries to link |
---|
571 | -f : specify an alternate default configuration file. |
---|
572 | -h : print this help message and exit (with an error status). |
---|
573 | -r : reuse C symbols value if possible (skips costly nm extraction). |
---|
574 | -s : silent mode, only echoes questions and essential information. |
---|
575 | -D : define symbol to have some value: |
---|
576 | -D symbol symbol gets the value 'define' |
---|
577 | -D symbol=value symbol gets the value 'value' |
---|
578 | -E : stop at the end of questions, after having produced config.sh. |
---|
579 | -K : do not use unless you know what you are doing. |
---|
580 | -O : let -D and -U override definitions from loaded configuration file. |
---|
581 | -S : perform variable substitutions on all .SH files (can mix with -f) |
---|
582 | -U : undefine symbol: |
---|
583 | -U symbol symbol gets the value 'undef' |
---|
584 | -U symbol= symbol gets completely empty |
---|
585 | -V : print version number and exit (with a zero status). |
---|
586 | EOM |
---|
587 | exit 1 |
---|
588 | ;; |
---|
589 | esac |
---|
590 | |
---|
591 | : Sanity checks |
---|
592 | case "$fastread$alldone" in |
---|
593 | yescont|yesexit) ;; |
---|
594 | *) |
---|
595 | if test ! -t 0; then |
---|
596 | echo "Say 'sh Configure', not 'sh <Configure'" |
---|
597 | exit 1 |
---|
598 | fi |
---|
599 | ;; |
---|
600 | esac |
---|
601 | |
---|
602 | exec 4>&1 |
---|
603 | case "$silent" in |
---|
604 | true) exec 1>/dev/null;; |
---|
605 | esac |
---|
606 | |
---|
607 | : run the defines and the undefines, if any, but leave the file out there... |
---|
608 | touch optdef.sh |
---|
609 | . ./optdef.sh |
---|
610 | |
---|
611 | : set package name |
---|
612 | package=g4conf |
---|
613 | |
---|
614 | : Some greps do not return status, grrr. |
---|
615 | echo "grimblepritz" >grimble |
---|
616 | if grep blurfldyick grimble >/dev/null 2>&1 ; then |
---|
617 | contains=contains |
---|
618 | elif grep grimblepritz grimble >/dev/null 2>&1 ; then |
---|
619 | contains=grep |
---|
620 | else |
---|
621 | contains=contains |
---|
622 | fi |
---|
623 | rm -f grimble |
---|
624 | : the following should work in any shell |
---|
625 | case "$contains" in |
---|
626 | contains*) |
---|
627 | echo " " |
---|
628 | echo "Grep doesn't return a status!! Attempting remedial action." |
---|
629 | cat >contains <<'EOSS' |
---|
630 | grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp |
---|
631 | EOSS |
---|
632 | chmod +x contains |
---|
633 | esac |
---|
634 | |
---|
635 | : first determine how to suppress newline on echo command |
---|
636 | #echo " " |
---|
637 | #echo "Checking echo to see how to suppress newlines..." |
---|
638 | (echo "hi there\c" ; echo " ") >.echotmp |
---|
639 | if $contains c .echotmp >/dev/null 2>&1 ; then |
---|
640 | # echo "...using -n." |
---|
641 | n='-n' |
---|
642 | c='' |
---|
643 | else |
---|
644 | # cat <<'EOM' |
---|
645 | #...using \c |
---|
646 | #EOM |
---|
647 | n='' |
---|
648 | c='\c' |
---|
649 | fi |
---|
650 | #echo $n "The star should be here-->$c" |
---|
651 | #echo '*' |
---|
652 | rm -f .echotmp |
---|
653 | |
---|
654 | : compute the number of columns on the terminal for proper question formatting |
---|
655 | case "$COLUMNS" in |
---|
656 | '') COLUMNS='80';; |
---|
657 | esac |
---|
658 | |
---|
659 | : set up the echo used in my read |
---|
660 | myecho="case \"\$xxxm\" in |
---|
661 | '') echo $n \"\$rp $c\" >&4;; |
---|
662 | *) case \"\$rp\" in |
---|
663 | '') echo $n \"[\$xxxm] $c\";; |
---|
664 | *) |
---|
665 | if test \`echo \"\$rp [\$xxxm] \" | wc -c\` -ge $COLUMNS; then |
---|
666 | echo \"\$rp\" >&4 |
---|
667 | echo $n \"[\$xxxm] $c\" >&4 |
---|
668 | else |
---|
669 | echo $n \"\$rp [\$xxxm] $c\" >&4 |
---|
670 | fi |
---|
671 | ;; |
---|
672 | esac;; |
---|
673 | esac" |
---|
674 | |
---|
675 | : now set up to do reads with possible shell escape and default assignment |
---|
676 | cat <<EOSC >myread |
---|
677 | $startsh |
---|
678 | xxxm=\$dflt |
---|
679 | $myecho |
---|
680 | ans='!' |
---|
681 | case "\$fastread" in |
---|
682 | yes) case "\$dflt" in |
---|
683 | '') ;; |
---|
684 | *) ans=''; |
---|
685 | case "\$silent-\$rp" in |
---|
686 | true-) ;; |
---|
687 | *) echo " " >&4;; |
---|
688 | esac;; |
---|
689 | esac;; |
---|
690 | *) case "\$silent" in |
---|
691 | true) case "\$rp" in |
---|
692 | '') ans='';; |
---|
693 | esac;; |
---|
694 | esac;; |
---|
695 | esac |
---|
696 | while expr "X\$ans" : "X!" >/dev/null; do |
---|
697 | read answ |
---|
698 | set x \$xxxm |
---|
699 | shift |
---|
700 | aok=''; eval "ans=\\"\$answ\\"" && aok=y |
---|
701 | case "\$answ" in |
---|
702 | "!") |
---|
703 | sh 1>&4 |
---|
704 | echo " " |
---|
705 | $myecho |
---|
706 | ;; |
---|
707 | !*) |
---|
708 | set x \`expr "X\$ans" : "X!\(.*\)\$"\` |
---|
709 | shift |
---|
710 | sh 1>&4 -c "\$*" |
---|
711 | echo " " |
---|
712 | $myecho |
---|
713 | ;; |
---|
714 | "\$ans") |
---|
715 | case "\$ans" in |
---|
716 | \\&*) |
---|
717 | set x \`expr "X\$ans" : "X&\(.*\)\$"\` |
---|
718 | shift |
---|
719 | case "\$1" in |
---|
720 | -d) |
---|
721 | fastread=yes |
---|
722 | echo "(OK, I'll run with -d after this question.)" >&4 |
---|
723 | ;; |
---|
724 | -*) |
---|
725 | echo "*** Sorry, \$1 not supported yet." >&4 |
---|
726 | ;; |
---|
727 | esac |
---|
728 | $myecho |
---|
729 | ans=! |
---|
730 | ;; |
---|
731 | esac;; |
---|
732 | *) |
---|
733 | case "\$aok" in |
---|
734 | y) |
---|
735 | echo "*** Substitution done -- please confirm." |
---|
736 | xxxm="\$ans" |
---|
737 | ans=\`echo $n "\$ans$c" | tr '\012' ' '\` |
---|
738 | xxxm="\$ans" |
---|
739 | ans=! |
---|
740 | ;; |
---|
741 | *) |
---|
742 | echo "*** Error -- try again." |
---|
743 | ans=! |
---|
744 | ;; |
---|
745 | esac |
---|
746 | $myecho |
---|
747 | ;; |
---|
748 | esac |
---|
749 | case "\$ans\$xxxm\$nostick" in |
---|
750 | '') |
---|
751 | ans=! |
---|
752 | $myecho |
---|
753 | ;; |
---|
754 | esac |
---|
755 | done |
---|
756 | case "\$ans" in |
---|
757 | '') ans="\$xxxm";; |
---|
758 | esac |
---|
759 | EOSC |
---|
760 | |
---|
761 | : Find the path to the source tree |
---|
762 | case "$src" in |
---|
763 | '') src=`echo $0 | sed -e 's%/[^/][^/]*$%%'` |
---|
764 | #echo "src=$src" |
---|
765 | ;; |
---|
766 | esac |
---|
767 | case "$src" in |
---|
768 | '') |
---|
769 | src=. |
---|
770 | rsrc=.. |
---|
771 | ;; |
---|
772 | /*) rsrc="$src/.." |
---|
773 | #echo "rsrc=$rsrc" |
---|
774 | ;; |
---|
775 | ./*) cur_dir=`pwd` |
---|
776 | cd ../../$src |
---|
777 | src=`pwd` |
---|
778 | cd $cur_dir |
---|
779 | rsrc="$src/.." |
---|
780 | rsrc="$src/.." |
---|
781 | #echo "src=$src" |
---|
782 | #echo "rsrc=$rsrc" |
---|
783 | ;; |
---|
784 | *) rsrc="../../$src" |
---|
785 | #echo "rsrc=$rsrc" |
---|
786 | ;; |
---|
787 | esac |
---|
788 | #cur_dir=`pwd` |
---|
789 | #echo "cur_dir=$cur_dir" |
---|
790 | if test -f $src/Configure && \ |
---|
791 | $contains "^package=$package" $src/Configure >/dev/null 2>&1 |
---|
792 | then |
---|
793 | : found it, so we are ok. |
---|
794 | else |
---|
795 | rsrc='' |
---|
796 | for src in . .. ../.. ../../.. ../../../..; do |
---|
797 | if test -f ../../$src/Configure && \ |
---|
798 | $contains "^package=$package" ../../$src/Configure >/dev/null 2>&1 |
---|
799 | then |
---|
800 | rsrc=../../$src |
---|
801 | break |
---|
802 | fi |
---|
803 | done |
---|
804 | fi |
---|
805 | case "$rsrc" in |
---|
806 | '') |
---|
807 | echo " " |
---|
808 | # dflt= |
---|
809 | # rp="Directory where sources for $package are located?" |
---|
810 | # . ./myread |
---|
811 | # src="$ans" |
---|
812 | rsrc="$src" |
---|
813 | #echo "src=$src" |
---|
814 | #echo "rsrc=$rsrc" |
---|
815 | if test -f $rsrc/Configure && \ |
---|
816 | $contains "^package=$package" $rsrc/Configure >/dev/null 2>&1 |
---|
817 | then |
---|
818 | echo "Ok, I've found them under $src" |
---|
819 | else |
---|
820 | echo "Sorry, I can't seem to be able to locate $package sources." >&4 |
---|
821 | echo "Please, use absolute path or relative with './' to Configure." >&4 |
---|
822 | exit 1 |
---|
823 | fi |
---|
824 | ;; |
---|
825 | ../../.) ;; |
---|
826 | *) |
---|
827 | # echo " " |
---|
828 | # echo "Sources for $package found in $src" >&4 |
---|
829 | ;; |
---|
830 | esac |
---|
831 | |
---|
832 | : script used to extract .SH files with variable substitutions |
---|
833 | cat >extract <<'EOS' |
---|
834 | CONFIG=true |
---|
835 | #echo "Doing variable substitutions on .SH files..." |
---|
836 | if test -f $src/MANIFEST; then |
---|
837 | set x `awk '{print $1}' <$src/MANIFEST | grep '\.SH'` |
---|
838 | else |
---|
839 | # echo "(Looking for .SH files under the source directory.)" |
---|
840 | set x `(cd $src; find ./config/scripts -name "*.SH" -print)` |
---|
841 | fi |
---|
842 | shift |
---|
843 | case $# in |
---|
844 | 0) set x `(cd $src; echo *.SH)`; shift;; |
---|
845 | esac |
---|
846 | if test ! -f $src/$1; then |
---|
847 | shift |
---|
848 | fi |
---|
849 | mkdir_p=' |
---|
850 | name=$1; |
---|
851 | create=""; |
---|
852 | while test $name; do |
---|
853 | if test ! -d "$name"; then |
---|
854 | create="$name $create"; |
---|
855 | name=`echo $name | sed -e "s|^[^/]*$||"`; |
---|
856 | name=`echo $name | sed -e "s|\(.*\)/.*|\1|"`; |
---|
857 | else |
---|
858 | name=""; |
---|
859 | fi; |
---|
860 | done; |
---|
861 | for file in $create; do |
---|
862 | mkdir $file; |
---|
863 | done |
---|
864 | ' |
---|
865 | for file in $*; do |
---|
866 | case "$src" in |
---|
867 | ".") |
---|
868 | case "$file" in |
---|
869 | */*) |
---|
870 | dir=`expr X$file : 'X\(.*\)/'` |
---|
871 | file_SH=`expr X$file : 'X.*/\(.*\)'` |
---|
872 | file_EX=`expr X$file : 'X.*/\(.*\).SH'` |
---|
873 | (cd $dir && . ./$file_SH && mkdir -p $abssrc/.config/bin/$g4system && mv $file_EX $abssrc/.config/bin/$g4system) |
---|
874 | # echo Sergei_1 |
---|
875 | # echo "file_SH=$file_SH" |
---|
876 | # echo "file_EX=$file_EX" |
---|
877 | # echo "file=$file" |
---|
878 | # echo "dir=$dir" |
---|
879 | # echo "src=$src" |
---|
880 | # echo "g4system=$g4system" |
---|
881 | # echo Sergei_1 |
---|
882 | ;; |
---|
883 | *) |
---|
884 | file_SH=`expr X$file : 'X.*/\(.*\)'` |
---|
885 | file_EX=`expr X$file : 'X.*/\(.*\).SH'` |
---|
886 | (. ./$file && mkdir -p $abssrc/.config/bin/$g4system && mv file-SH $abssrc/.config/bin/$g4system) |
---|
887 | # echo Sergei_2 |
---|
888 | # echo "file_SH=$file_SH" |
---|
889 | # echo "file_EX=$file_EX" |
---|
890 | # echo "file=$file" |
---|
891 | # echo "dir=$dir" |
---|
892 | # echo "src=$src" |
---|
893 | # echo "g4system=$g4system" |
---|
894 | # echo Sergei_2 |
---|
895 | ;; |
---|
896 | esac |
---|
897 | ;; |
---|
898 | *) |
---|
899 | case "$file" in |
---|
900 | */*) |
---|
901 | dir=`expr X$file : 'X\(.*\)/'` |
---|
902 | file_SH=`expr X$file : 'X.*/\(.*\)'` |
---|
903 | file_EX=`expr X$file : 'X.*/\(.*\)\.SH'` |
---|
904 | (set x $dir; shift; eval $mkdir_p) |
---|
905 | |
---|
906 | (sh <$src/$dir/$file_SH && mkdir -p $src/.config/bin/$g4system && mv $file_EX $src/.config/bin/$g4system) |
---|
907 | |
---|
908 | # echo Sergei_3 |
---|
909 | # echo "dir=$dir" |
---|
910 | # echo "file=$file" |
---|
911 | |
---|
912 | # echo Sergei_3 |
---|
913 | ;; |
---|
914 | *) |
---|
915 | file_SH=`expr X$file : 'X.*/\(.*\)'` |
---|
916 | file_EX=`expr X$file : 'X.*/\(.*\)\.SH'` |
---|
917 | (sh <$src/$file && mkdir -p $src/.config/bin/$g4system && mv $file_EX $src/.config/bin/$g4system) |
---|
918 | echo Sergei_4 |
---|
919 | ;; |
---|
920 | esac |
---|
921 | ;; |
---|
922 | esac |
---|
923 | done |
---|
924 | if test -f $src/config_h.SH; then |
---|
925 | if test ! -f config.h; then |
---|
926 | : oops, they left it out of MANIFEST, probably, so do it anyway. |
---|
927 | . $src/config_h.SH |
---|
928 | fi |
---|
929 | fi |
---|
930 | EOS |
---|
931 | |
---|
932 | : extract files and exit if asked to do so |
---|
933 | case "$extractsh" in |
---|
934 | true) |
---|
935 | case "$realsilent" in |
---|
936 | true) ;; |
---|
937 | *) exec 1>&4;; |
---|
938 | esac |
---|
939 | case "$config_sh" in |
---|
940 | '') config_sh='$g4conf/config.sh'; config="$g4conf/config.sh";; |
---|
941 | /*) config="$g4conf/$config_sh";; |
---|
942 | *) config="$g4conf/$config_sh";; |
---|
943 | esac |
---|
944 | echo " " |
---|
945 | echo "Fetching answers from $config_sh..." |
---|
946 | . $config |
---|
947 | test "$override" && . ./optdef.sh |
---|
948 | echo " " |
---|
949 | cd ../.. |
---|
950 | . .config/UU/extract |
---|
951 | rm -rf .config/UU |
---|
952 | echo "Done." |
---|
953 | exit 0 |
---|
954 | ;; |
---|
955 | esac |
---|
956 | |
---|
957 | : Eunice requires " " instead of "", can you believe it |
---|
958 | #echo " " |
---|
959 | : Here we go... |
---|
960 | #if [ X$install = Xyes ] ; then |
---|
961 | #echo " " |
---|
962 | #echo " " |
---|
963 | #echo " " |
---|
964 | #echo " --- Geant4 Toolkit Installation ---" |
---|
965 | #echo " " |
---|
966 | #echo " " |
---|
967 | #echo " " |
---|
968 | #echo " " |
---|
969 | #else |
---|
970 | #echo " " |
---|
971 | #echo " " |
---|
972 | #echo " " |
---|
973 | #echo " --- Geant4 Toolkit Installation ---" |
---|
974 | #echo " (setting environments for USER )" |
---|
975 | #echo " " |
---|
976 | #echo " " |
---|
977 | #echo " " |
---|
978 | #fi |
---|
979 | |
---|
980 | trap 'echo " ";rm -rf ../../.config/UU; test -d ../../.config/UU && rm -rf X $rmlist; exit 1' 1 2 3 15 |
---|
981 | |
---|
982 | : create .config dir to save info across Configure sessions |
---|
983 | test -d ../.config || mkdir ../.config |
---|
984 | cat >../.config/README <<EOF |
---|
985 | This directory created by Configure to save information that should |
---|
986 | persist across sessions for $package. |
---|
987 | |
---|
988 | You may safely delete it if you wish. |
---|
989 | EOF |
---|
990 | |
---|
991 | : general instructions |
---|
992 | needman=true |
---|
993 | firsttime=true |
---|
994 | user=`(logname) 2>/dev/null` |
---|
995 | case "$user" in |
---|
996 | '') user=`whoami 2>&1`;; |
---|
997 | esac |
---|
998 | |
---|
999 | #if [ X$install = Xyes ] ; then |
---|
1000 | # |
---|
1001 | #echo " " |
---|
1002 | #echo " " |
---|
1003 | #echo " " |
---|
1004 | #echo " --- Geant4 Toolkit Installation ---" |
---|
1005 | #echo " " |
---|
1006 | #echo " " |
---|
1007 | #echo " " |
---|
1008 | #echo " " |
---|
1009 | # |
---|
1010 | ##if $contains "^$user\$" ../../.config/instruct >/dev/null 2>&1; then |
---|
1011 | ## firsttime=false |
---|
1012 | ## echo " " |
---|
1013 | ## rp='Would you like to see the instructions?' |
---|
1014 | ## dflt=n |
---|
1015 | ## . ./myread |
---|
1016 | ## case "$ans" in |
---|
1017 | ## [yY]*) ;; |
---|
1018 | ## *) needman=false;; |
---|
1019 | ## esac |
---|
1020 | ##fi |
---|
1021 | #fi |
---|
1022 | |
---|
1023 | if [ X$g4build = Xyes ] ; then |
---|
1024 | |
---|
1025 | echo " " |
---|
1026 | echo " " |
---|
1027 | echo " " |
---|
1028 | echo " --- Geant4 Toolkit Build ---" |
---|
1029 | echo " " |
---|
1030 | echo " " |
---|
1031 | echo " " |
---|
1032 | echo " " |
---|
1033 | |
---|
1034 | if $contains "^$user\$" ../../.config/instruct >/dev/null 2>&1; then |
---|
1035 | firsttime=false |
---|
1036 | echo " " |
---|
1037 | rp='Would you like to see the instructions?' |
---|
1038 | dflt=n |
---|
1039 | . ./myread |
---|
1040 | case "$ans" in |
---|
1041 | [yY]*) ;; |
---|
1042 | *) needman=false;; |
---|
1043 | esac |
---|
1044 | fi |
---|
1045 | fi |
---|
1046 | |
---|
1047 | if [ X$install = Xyes ] ; then |
---|
1048 | needman=false |
---|
1049 | fi |
---|
1050 | |
---|
1051 | if [ X$install = X -a X$g4build = X ] ; then |
---|
1052 | needman=false |
---|
1053 | fi |
---|
1054 | |
---|
1055 | if $needman; then |
---|
1056 | cat <<EOH |
---|
1057 | |
---|
1058 | This installation shell script will examine your system and ask you questions |
---|
1059 | to determine how the Geant4 Toolkit should be installed. If you get stuck on |
---|
1060 | a question, you may use a ! shell escape to start a subshell or execute a |
---|
1061 | command. Many of the questions will have default answers in square brackets; |
---|
1062 | typing carriage return will set the default. |
---|
1063 | |
---|
1064 | On AFS it is allowed to specify either absolute or relative |
---|
1065 | paths (i.e. starting with the ~username construct). |
---|
1066 | |
---|
1067 | EOH |
---|
1068 | rp='' |
---|
1069 | dflt='Type carriage return to continue' |
---|
1070 | . ./myread |
---|
1071 | cat <<'EOH' |
---|
1072 | |
---|
1073 | The prompt used in this script allows you to use shell variables and backticks |
---|
1074 | in your answers. You may use $1, $2, etc... to refer to the words in the |
---|
1075 | default answer, as if the default line was a set of arguments given to a |
---|
1076 | script shell. This means you may also use $* to repeat the whole default line. |
---|
1077 | |
---|
1078 | Everytime there is a substitution, you will have to confirm. If there is an |
---|
1079 | error (e.g. an unmatched backtick), the default answer will remain unchanged |
---|
1080 | and you will be prompted again. |
---|
1081 | |
---|
1082 | Running 'Configure -d' will bypass nearly all the questions and |
---|
1083 | use the computed defaults (or answers saved in a configuration |
---|
1084 | previously generated). |
---|
1085 | |
---|
1086 | Type 'Configure -h' for a list of options. |
---|
1087 | |
---|
1088 | You may also start interactively and then answer '& -d' at any prompt to turn |
---|
1089 | on the non-interactive behaviour for the rest of the execution. |
---|
1090 | |
---|
1091 | EOH |
---|
1092 | . ./myread |
---|
1093 | cat <<EOH |
---|
1094 | |
---|
1095 | Much effort has been spent to ensure that this shell script will run on any |
---|
1096 | Unix system. If despite that you can't run Configure for some reason, you'll |
---|
1097 | have to set the proper environment variables by hand and follow the "manual" |
---|
1098 | installation as specified in the Geant4 Installation Guide. |
---|
1099 | |
---|
1100 | EOH |
---|
1101 | dflt='Type carriage return to continue' |
---|
1102 | . ./myread |
---|
1103 | case "$firsttime" in |
---|
1104 | true) echo $user >>../../.config/instruct;; |
---|
1105 | esac |
---|
1106 | fi |
---|
1107 | |
---|
1108 | : find out where common programs are |
---|
1109 | #echo " " |
---|
1110 | #echo "Locating common programs..." >&4 |
---|
1111 | cat <<EOSC >loc |
---|
1112 | $startsh |
---|
1113 | case \$# in |
---|
1114 | 0) exit 1;; |
---|
1115 | esac |
---|
1116 | thing=\$1 |
---|
1117 | shift |
---|
1118 | dflt=\$1 |
---|
1119 | shift |
---|
1120 | for dir in \$*; do |
---|
1121 | case "\$thing" in |
---|
1122 | .) |
---|
1123 | if test -d \$dir/\$thing; then |
---|
1124 | echo \$dir |
---|
1125 | exit 0 |
---|
1126 | fi |
---|
1127 | ;; |
---|
1128 | *) |
---|
1129 | for thisthing in \$dir/\$thing; do |
---|
1130 | : just loop through to pick last item |
---|
1131 | done |
---|
1132 | if test -f \$thisthing; then |
---|
1133 | echo \$thisthing |
---|
1134 | exit 0 |
---|
1135 | elif test -f \$dir/\$thing.exe; then |
---|
1136 | : on Eunice apparently |
---|
1137 | echo \$dir/\$thing |
---|
1138 | exit 0 |
---|
1139 | fi |
---|
1140 | ;; |
---|
1141 | esac |
---|
1142 | done |
---|
1143 | echo \$dflt |
---|
1144 | exit 1 |
---|
1145 | EOSC |
---|
1146 | chmod +x loc |
---|
1147 | $eunicefix loc |
---|
1148 | loclist=" |
---|
1149 | awk |
---|
1150 | cat |
---|
1151 | expr |
---|
1152 | grep |
---|
1153 | rm |
---|
1154 | sed |
---|
1155 | touch |
---|
1156 | tr |
---|
1157 | " |
---|
1158 | trylist=" |
---|
1159 | date |
---|
1160 | gcc |
---|
1161 | ln |
---|
1162 | test |
---|
1163 | uname |
---|
1164 | " |
---|
1165 | pth=`echo $PATH | sed -e "s/$p_/ /g"` |
---|
1166 | pth="$pth /lib /usr/lib" |
---|
1167 | for file in $loclist; do |
---|
1168 | eval xxx=\$$file |
---|
1169 | case "$xxx" in |
---|
1170 | /*|?:[\\/]*) |
---|
1171 | if test -f "$xxx"; then |
---|
1172 | : ok |
---|
1173 | else |
---|
1174 | echo "WARNING: no $xxx -- ignoring your setting for $file." >&4 |
---|
1175 | xxx=`./loc $file $file $pth` |
---|
1176 | fi |
---|
1177 | ;; |
---|
1178 | '') xxx=`./loc $file $file $pth`;; |
---|
1179 | *) xxx=`./loc $xxx $xxx $pth`;; |
---|
1180 | esac |
---|
1181 | eval $file=$xxx |
---|
1182 | eval _$file=$xxx |
---|
1183 | case "$xxx" in |
---|
1184 | /*) |
---|
1185 | echo "$file is in $xxx." > /dev/null |
---|
1186 | ;; |
---|
1187 | ?:[\\/]*) |
---|
1188 | echo "$file is in $xxx." > /dev/null |
---|
1189 | ;; |
---|
1190 | *) |
---|
1191 | echo "I don't know where '$file' is." >&4 |
---|
1192 | echo "Please, install it or fix your PATH settings!" >&4 |
---|
1193 | exit 1 |
---|
1194 | ;; |
---|
1195 | esac |
---|
1196 | done |
---|
1197 | #echo " " |
---|
1198 | #echo "Don't worry if any of the following aren't found..." |
---|
1199 | say=offhand |
---|
1200 | for file in $trylist; do |
---|
1201 | eval xxx=\$$file |
---|
1202 | case "$xxx" in |
---|
1203 | /*|?:[\\/]*) |
---|
1204 | if test -f "$xxx"; then |
---|
1205 | : ok |
---|
1206 | else |
---|
1207 | echo "WARNING: no $xxx -- ignoring your setting for $file." >&4 |
---|
1208 | xxx=`./loc $file $file $pth` |
---|
1209 | fi |
---|
1210 | ;; |
---|
1211 | '') xxx=`./loc $file $file $pth`;; |
---|
1212 | *) xxx=`./loc $xxx $xxx $pth`;; |
---|
1213 | esac |
---|
1214 | eval $file=$xxx |
---|
1215 | eval _$file=$xxx |
---|
1216 | case "$xxx" in |
---|
1217 | /*) |
---|
1218 | echo "$file is in $xxx." > /dev/null |
---|
1219 | ;; |
---|
1220 | ?:[\\/]*) |
---|
1221 | echo "$file is in $xxx." > /dev/null |
---|
1222 | ;; |
---|
1223 | *) |
---|
1224 | echo "I don't see $file out there, $say." |
---|
1225 | say=either |
---|
1226 | ;; |
---|
1227 | esac |
---|
1228 | done |
---|
1229 | case "$egrep" in |
---|
1230 | egrep) |
---|
1231 | # echo "Substituting grep for egrep." |
---|
1232 | egrep=$grep |
---|
1233 | ;; |
---|
1234 | esac |
---|
1235 | case "$ln" in |
---|
1236 | ln) |
---|
1237 | # echo "Substituting cp for ln." |
---|
1238 | ln=$cp |
---|
1239 | ;; |
---|
1240 | esac |
---|
1241 | case "$test" in |
---|
1242 | test) |
---|
1243 | echo "Hopefully test is built into your sh." > /dev/null |
---|
1244 | ;; |
---|
1245 | *) |
---|
1246 | if `sh -c "PATH= test true" >/dev/null 2>&1`; then |
---|
1247 | echo "Using the test built into your sh." > /dev/null |
---|
1248 | test=test |
---|
1249 | _test=test |
---|
1250 | fi |
---|
1251 | ;; |
---|
1252 | esac |
---|
1253 | case "$echo" in |
---|
1254 | echo) |
---|
1255 | echo "Hopefully echo is built into your sh." > /dev/null |
---|
1256 | ;; |
---|
1257 | '') ;; |
---|
1258 | *) |
---|
1259 | # echo " " |
---|
1260 | #echo "Checking compatibility between $echo and builtin echo (if any)..." >&4 |
---|
1261 | $echo $n "hi there$c" >foo1 |
---|
1262 | echo $n "hi there$c" >foo2 |
---|
1263 | if cmp foo1 foo2 >/dev/null 2>&1; then |
---|
1264 | echo "They are compatible. In fact, they may be identical." > /dev/null |
---|
1265 | else |
---|
1266 | case "$n" in |
---|
1267 | '-n') n='' c='\c';; |
---|
1268 | *) n='-n' c='';; |
---|
1269 | esac |
---|
1270 | cat <<FOO |
---|
1271 | They are not compatible! You are probably running ksh on a non-USG system. |
---|
1272 | I'll have to use $echo instead of the builtin, since Bourne shell doesn't |
---|
1273 | have echo built in and we may have to run some Bourne shell scripts. That |
---|
1274 | means I'll have to use '$n$c' to suppress newlines now. |
---|
1275 | |
---|
1276 | FOO |
---|
1277 | $echo $n "The star should be here-->$c" |
---|
1278 | $echo "*" |
---|
1279 | fi |
---|
1280 | $rm -f foo1 foo2 |
---|
1281 | ;; |
---|
1282 | esac |
---|
1283 | |
---|
1284 | : determine whether symbolic links are supported |
---|
1285 | #echo " " |
---|
1286 | $touch blurfl |
---|
1287 | if $ln -s blurfl sym > /dev/null 2>&1 ; then |
---|
1288 | # echo "Symbolic links are supported." >&4 |
---|
1289 | lns="$ln -s" |
---|
1290 | else |
---|
1291 | # echo "Symbolic links are NOT supported." >&4 |
---|
1292 | lns="$ln" |
---|
1293 | fi |
---|
1294 | $rm -f blurfl sym |
---|
1295 | |
---|
1296 | : see whether [:lower:] and [:upper:] are supported character classes |
---|
1297 | #echo " " |
---|
1298 | up='[A-Z]' |
---|
1299 | low='[a-z]' |
---|
1300 | case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in |
---|
1301 | ABYZ) |
---|
1302 | # echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4 |
---|
1303 | up='[:upper:]' |
---|
1304 | low='[:lower:]' |
---|
1305 | ;; |
---|
1306 | *) |
---|
1307 | # echo "Your tr only supports [a-z] and [A-Z] to convert case." >&4 |
---|
1308 | ;; |
---|
1309 | esac |
---|
1310 | : set up the translation script tr, must be called with ./tr of course |
---|
1311 | cat >tr <<EOSC |
---|
1312 | $startsh |
---|
1313 | case "\$1\$2" in |
---|
1314 | '[A-Z][a-z]') exec $tr '$up' '$low';; |
---|
1315 | '[a-z][A-Z]') exec $tr '$low' '$up';; |
---|
1316 | esac |
---|
1317 | exec $tr "\$@" |
---|
1318 | EOSC |
---|
1319 | chmod +x tr |
---|
1320 | $eunicefix tr |
---|
1321 | |
---|
1322 | : Try to determine whether config.sh was made on this system |
---|
1323 | case "$config_sh" in |
---|
1324 | '') |
---|
1325 | myuname=`( ($uname -a) 2>/dev/null || hostname) 2>&1` |
---|
1326 | |
---|
1327 | mygcc=`( ($g++ -v) 2>/dev/null) 2>&1` |
---|
1328 | myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \ |
---|
1329 | ./tr '[A-Z]' '[a-z]' | tr '\012' ' '` |
---|
1330 | newmyuname="$myuname" |
---|
1331 | dflt=n |
---|
1332 | case "$knowitall" in |
---|
1333 | '') |
---|
1334 | if test -f ../config.sh; then |
---|
1335 | if $contains myuname= ../config.sh >/dev/null 2>&1; then |
---|
1336 | eval "`grep myuname= ../config.sh`" |
---|
1337 | fi |
---|
1338 | if test "X$myuname" = "X$newmyuname"; then |
---|
1339 | dflt=y |
---|
1340 | fi |
---|
1341 | fi |
---|
1342 | ;; |
---|
1343 | *) dflt=y;; |
---|
1344 | esac |
---|
1345 | |
---|
1346 | : Get old answers from old config file if Configure was run on the |
---|
1347 | : same system, otherwise use the hints. |
---|
1348 | hint=default |
---|
1349 | cd ../.. |
---|
1350 | |
---|
1351 | if $test -d $src/hints ; then |
---|
1352 | (cd $src/hints; ls -C *.sh 2> /dev/null) | $sed 's/\.sh/ /g' >&4 |
---|
1353 | fi |
---|
1354 | dflt='' |
---|
1355 | : Half the following guesses are probably wrong... If you have better |
---|
1356 | : tests or hints, please send them to Serguei.Sadilov@cern.ch |
---|
1357 | : The metaconfig authors would also appreciate a copy... |
---|
1358 | $test -f /irix && osname=irix |
---|
1359 | $test -f /xenix && osname=sco_xenix |
---|
1360 | $test -f /dynix && osname=dynix |
---|
1361 | $test -f /dnix && osname=dnix |
---|
1362 | $test -f /lynx.os && osname=lynxos |
---|
1363 | $test -f /unicos && osname=unicos && osvers=`$uname -r` |
---|
1364 | $test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r` |
---|
1365 | $test -f /bin/mips && /bin/mips && osname=mips |
---|
1366 | $test -d /NextApps && set X `hostinfo | grep 'NeXT Mach.*:' | \ |
---|
1367 | $sed -e 's/://' -e 's/\./_/'` && osname=next && osvers=$4 |
---|
1368 | $test -d /usr/apollo/bin && osname=apollo |
---|
1369 | $test -f /etc/saf/_sactab && osname=svr4 |
---|
1370 | $test -d /usr/include/minix && osname=minix |
---|
1371 | if $test -d /MachTen; then |
---|
1372 | osname=machten |
---|
1373 | if $test -x /sbin/version; then |
---|
1374 | osvers=`/sbin/version | $awk '{print $2}' | |
---|
1375 | $sed -e 's/[A-Za-z]$//'` |
---|
1376 | elif $test -x /usr/etc/version; then |
---|
1377 | osvers=`/usr/etc/version | $awk '{print $2}' | |
---|
1378 | $sed -e 's/[A-Za-z]$//'` |
---|
1379 | else |
---|
1380 | osvers="$2.$3" |
---|
1381 | fi |
---|
1382 | fi |
---|
1383 | if $test -f $uname; then |
---|
1384 | set X $myuname |
---|
1385 | shift |
---|
1386 | |
---|
1387 | case "$5" in |
---|
1388 | fps*) osname=fps ;; |
---|
1389 | mips*) |
---|
1390 | case "$4" in |
---|
1391 | umips) osname=umips ;; |
---|
1392 | *) osname=mips ;; |
---|
1393 | esac;; |
---|
1394 | [23]100) osname=mips ;; |
---|
1395 | next*) osname=next ;; |
---|
1396 | news*) osname=news ;; |
---|
1397 | i386*) |
---|
1398 | if $test -f /etc/kconfig; then |
---|
1399 | osname=isc |
---|
1400 | if test "$lns" = "ln -s"; then |
---|
1401 | osvers=4 |
---|
1402 | elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then |
---|
1403 | osvers=3 |
---|
1404 | elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then |
---|
1405 | osvers=2 |
---|
1406 | fi |
---|
1407 | fi |
---|
1408 | ;; |
---|
1409 | esac |
---|
1410 | |
---|
1411 | case "$1" in |
---|
1412 | aix) osname=aix |
---|
1413 | tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1` |
---|
1414 | case "$tmp" in |
---|
1415 | 'not found') osvers="$4"."$3" ;; |
---|
1416 | '<3240'|'<>3240') osvers=3.2.0 ;; |
---|
1417 | '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;; |
---|
1418 | '=3250'|'>3250') osvers=3.2.5 ;; |
---|
1419 | *) osvers=$tmp;; |
---|
1420 | esac |
---|
1421 | ;; |
---|
1422 | *dc.osx) osname=dcosx |
---|
1423 | osvers="$3" |
---|
1424 | ;; |
---|
1425 | dnix) osname=dnix |
---|
1426 | osvers="$3" |
---|
1427 | ;; |
---|
1428 | cygwin*) osname=win32 |
---|
1429 | ;; |
---|
1430 | darwin*) osname=darwin |
---|
1431 | ;; |
---|
1432 | domainos) osname=apollo |
---|
1433 | osvers="$3" |
---|
1434 | ;; |
---|
1435 | dgux) osname=dgux |
---|
1436 | osvers="$3" |
---|
1437 | ;; |
---|
1438 | dynixptx*) osname=dynixptx |
---|
1439 | osvers="$3" |
---|
1440 | ;; |
---|
1441 | freebsd) osname=freebsd |
---|
1442 | osvers="$3" ;; |
---|
1443 | genix) osname=genix ;; |
---|
1444 | hp*) osname=hpux |
---|
1445 | case "$3" in |
---|
1446 | *.08.*) osvers=9 ;; |
---|
1447 | *.09.*) osvers=9 ;; |
---|
1448 | *.10.*) osvers=10 ;; |
---|
1449 | *) osvers="$3" ;; |
---|
1450 | esac |
---|
1451 | ;; |
---|
1452 | irix*) osname=irix |
---|
1453 | case "$3" in |
---|
1454 | 4*) osvers=4 ;; |
---|
1455 | 5*) osvers=5 ;; |
---|
1456 | *) osvers="$3" ;; |
---|
1457 | esac |
---|
1458 | ;; |
---|
1459 | linux) osname=linux |
---|
1460 | case "$3" in |
---|
1461 | 1*) osvers=1 ;; |
---|
1462 | *) osvers="$3" ;; |
---|
1463 | esac |
---|
1464 | ;; |
---|
1465 | netbsd*) osname=netbsd |
---|
1466 | osvers="$3" |
---|
1467 | ;; |
---|
1468 | bsd386) osname=bsd386 |
---|
1469 | osvers=`$uname -r` |
---|
1470 | ;; |
---|
1471 | next*) osname=next ;; |
---|
1472 | solaris) osname=solaris |
---|
1473 | case "$3" in |
---|
1474 | 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;; |
---|
1475 | *) osvers="$3" ;; |
---|
1476 | esac |
---|
1477 | ;; |
---|
1478 | sunos) osname=sunos |
---|
1479 | case "$3" in |
---|
1480 | 5*) osname=solaris |
---|
1481 | osvers=`echo $3 | $sed 's/^5/2/g'` ;; |
---|
1482 | *) osvers="$3" ;; |
---|
1483 | esac |
---|
1484 | ;; |
---|
1485 | titanos) osname=titanos |
---|
1486 | case "$3" in |
---|
1487 | 1*) osvers=1 ;; |
---|
1488 | 2*) osvers=2 ;; |
---|
1489 | 3*) osvers=3 ;; |
---|
1490 | 4*) osvers=4 ;; |
---|
1491 | *) osvers="$3" ;; |
---|
1492 | esac |
---|
1493 | ;; |
---|
1494 | ultrix) osname=ultrix |
---|
1495 | osvers="$3" |
---|
1496 | ;; |
---|
1497 | osf1|mls+) case "$5" in |
---|
1498 | alpha) |
---|
1499 | osname=dec_osf |
---|
1500 | osvers=`echo "$3" | sed 's/^[vt]//'` |
---|
1501 | ;; |
---|
1502 | hp*) osname=hp_osf1 ;; |
---|
1503 | mips) osname=mips_osf1 ;; |
---|
1504 | esac |
---|
1505 | ;; |
---|
1506 | uts) osname=uts |
---|
1507 | osvers="$3" |
---|
1508 | ;; |
---|
1509 | qnx) osname=qnx |
---|
1510 | osvers="$4" |
---|
1511 | ;; |
---|
1512 | $2) case "$osname" in |
---|
1513 | *isc*) ;; |
---|
1514 | *freebsd*) ;; |
---|
1515 | svr*) |
---|
1516 | : svr4.x or possibly later |
---|
1517 | case "svr$3" in |
---|
1518 | ${osname}*) |
---|
1519 | osname=svr$3 |
---|
1520 | osvers=$4 |
---|
1521 | ;; |
---|
1522 | esac |
---|
1523 | case "$osname" in |
---|
1524 | svr4.0) |
---|
1525 | : Check for ESIX |
---|
1526 | if test -f /stand/boot ; then |
---|
1527 | eval `grep '^INITPROG=[a-z/0-9]*$' /stand/boot` |
---|
1528 | if test -n "$INITPROG" -a -f "$INITPROG"; then |
---|
1529 | isesix=`strings -a $INITPROG|grep 'ESIX SYSTEM V/386 Release 4.0'` |
---|
1530 | if test -n "$isesix"; then |
---|
1531 | osname=esix4 |
---|
1532 | fi |
---|
1533 | fi |
---|
1534 | fi |
---|
1535 | ;; |
---|
1536 | esac |
---|
1537 | ;; |
---|
1538 | *) if test -f /etc/systemid; then |
---|
1539 | osname=sco |
---|
1540 | set `echo $3 | $sed 's/\./ /g'` $4 |
---|
1541 | if $test -f sco_$1_$2_$3.sh; then |
---|
1542 | osvers=$1.$2.$3 |
---|
1543 | elif $test -f sco_$1_$2.sh; then |
---|
1544 | osvers=$1.$2 |
---|
1545 | elif $test -f sco_$1.sh; then |
---|
1546 | osvers=$1 |
---|
1547 | fi |
---|
1548 | else |
---|
1549 | case "$osname" in |
---|
1550 | '') : Still unknown. Probably a generic Sys V. |
---|
1551 | osname="sysv" |
---|
1552 | osvers="$3" |
---|
1553 | ;; |
---|
1554 | esac |
---|
1555 | fi |
---|
1556 | ;; |
---|
1557 | esac |
---|
1558 | ;; |
---|
1559 | *) case "$osname" in |
---|
1560 | '') : Still unknown. Probably a generic BSD. |
---|
1561 | osname="$1" |
---|
1562 | osvers="$3" |
---|
1563 | ;; |
---|
1564 | esac |
---|
1565 | ;; |
---|
1566 | esac |
---|
1567 | else |
---|
1568 | if test -f /vmunix -a -f $src/hints/news_os.sh; then |
---|
1569 | (what /vmunix | .config/UU/tr '[A-Z]' '[a-z]') > .config/UU/kernel.what 2>&1 |
---|
1570 | if $contains news-os .config/UU/kernel.what >/dev/null 2>&1; then |
---|
1571 | osname=news_os |
---|
1572 | fi |
---|
1573 | $rm -f .config/UU/kernel.what |
---|
1574 | elif test -d c:/.; then |
---|
1575 | set X $myuname |
---|
1576 | osname=os2 |
---|
1577 | osvers="$5" |
---|
1578 | fi |
---|
1579 | fi |
---|
1580 | : Now look for a hint file osname_osvers, unless one has been |
---|
1581 | : specified already. |
---|
1582 | case "$hintfile" in |
---|
1583 | ''|' ') |
---|
1584 | file=`echo "${osname}_${osvers}" | $sed -e 's@\.@_@g' -e 's@_$@@'` |
---|
1585 | : Also try without trailing minor version numbers. |
---|
1586 | xfile=`echo $file | $sed -e 's@_[^_]*$@@'` |
---|
1587 | xxfile=`echo $xfile | $sed -e 's@_[^_]*$@@'` |
---|
1588 | xxxfile=`echo $xxfile | $sed -e 's@_[^_]*$@@'` |
---|
1589 | xxxxfile=`echo $xxxfile | $sed -e 's@_[^_]*$@@'` |
---|
1590 | case "$file" in |
---|
1591 | '') dflt=none ;; |
---|
1592 | *) case "$osvers" in |
---|
1593 | '') dflt=$file |
---|
1594 | ;; |
---|
1595 | *) if $test -f $src/hints/$file.sh ; then |
---|
1596 | dflt=$file |
---|
1597 | elif $test -f $src/hints/$xfile.sh ; then |
---|
1598 | dflt=$xfile |
---|
1599 | elif $test -f $src/hints/$xxfile.sh ; then |
---|
1600 | dflt=$xxfile |
---|
1601 | elif $test -f $src/hints/$xxxfile.sh ; then |
---|
1602 | dflt=$xxxfile |
---|
1603 | elif $test -f $src/hints/$xxxxfile.sh ; then |
---|
1604 | dflt=$xxxxfile |
---|
1605 | elif $test -f "$src/hints/${osname}.sh" ; then |
---|
1606 | dflt="${osname}" |
---|
1607 | else |
---|
1608 | dflt=none |
---|
1609 | fi |
---|
1610 | ;; |
---|
1611 | esac |
---|
1612 | ;; |
---|
1613 | esac |
---|
1614 | ;; |
---|
1615 | *) |
---|
1616 | dflt=`echo $hintfile | $sed 's/\.sh$//'` |
---|
1617 | ;; |
---|
1618 | esac |
---|
1619 | |
---|
1620 | if [ X$install = Xnever ] ; then |
---|
1621 | $cat <<EOM |
---|
1622 | |
---|
1623 | You may give one or more space-separated answers, or "none" if appropriate. |
---|
1624 | If your OS version has no hints, DO NOT give a wrong version -- say "none". |
---|
1625 | |
---|
1626 | EOM |
---|
1627 | rp="Which of these apply, if any?" |
---|
1628 | . .config/UU/myread |
---|
1629 | tans=$ans |
---|
1630 | for file in $tans; do |
---|
1631 | if $test -f $src/hints/$file.sh; then |
---|
1632 | . $src/hints/$file.sh |
---|
1633 | $cat $src/hints/$file.sh >> .config/UU/config.sh |
---|
1634 | elif $test X$tans = X -o X$tans = Xnone ; then |
---|
1635 | : nothing |
---|
1636 | else |
---|
1637 | : Give one chance to correct a possible typo. |
---|
1638 | echo "$file.sh does not exist" |
---|
1639 | dflt=$file |
---|
1640 | rp="hint to use instead?" |
---|
1641 | . .config/UU/myread |
---|
1642 | for file in $ans; do |
---|
1643 | if $test -f "$src/hints/$file.sh"; then |
---|
1644 | . $src/hints/$file.sh |
---|
1645 | $cat $src/hints/$file.sh >> .config/UU/config.sh |
---|
1646 | elif $test X$ans = X -o X$ans = Xnone ; then |
---|
1647 | : nothing |
---|
1648 | else |
---|
1649 | echo "$file.sh does not exist -- ignored." |
---|
1650 | fi |
---|
1651 | done |
---|
1652 | fi |
---|
1653 | done |
---|
1654 | fi |
---|
1655 | |
---|
1656 | hint=recommended |
---|
1657 | : Remember our hint file for later. |
---|
1658 | if $test -f "$src/hints/$file.sh" ; then |
---|
1659 | hintfile="$file" |
---|
1660 | else |
---|
1661 | hintfile='' |
---|
1662 | fi |
---|
1663 | : Sadilov: g4system.U - inserted here. |
---|
1664 | : 'current' directory is where 'Configure' is started |
---|
1665 | #echo " " |
---|
1666 | case "$g4osname" in |
---|
1667 | |
---|
1668 | '') |
---|
1669 | case "$osname" in |
---|
1670 | 'aix') g4osname=AIX |
---|
1671 | ;; |
---|
1672 | 'dec_osf') g4osname=DEC |
---|
1673 | ;; |
---|
1674 | 'hpux') g4osname=HP |
---|
1675 | ;; |
---|
1676 | 'linux') g4osname=Linux |
---|
1677 | ;; |
---|
1678 | 'irix') g4osname=SGI |
---|
1679 | ;; |
---|
1680 | 'sunos') g4osname=SUN |
---|
1681 | ;; |
---|
1682 | 'solaris') g4osname=SUN |
---|
1683 | ;; |
---|
1684 | 'win32') g4osname=WIN32 |
---|
1685 | ;; |
---|
1686 | 'darwin') g4osname=Darwin |
---|
1687 | ;; |
---|
1688 | esac |
---|
1689 | esac |
---|
1690 | |
---|
1691 | #echo " " |
---|
1692 | |
---|
1693 | case "$g4compiler" in |
---|
1694 | |
---|
1695 | '') |
---|
1696 | case "$g4osname" in |
---|
1697 | 'AIX') |
---|
1698 | g4compiler=xlC |
---|
1699 | ;; |
---|
1700 | 'DEC') |
---|
1701 | g4compiler=cxx |
---|
1702 | ;; |
---|
1703 | 'HP') |
---|
1704 | g4compiler=aCC |
---|
1705 | ;; |
---|
1706 | 'Linux') |
---|
1707 | # g4compiler=g++ |
---|
1708 | # Assume if "gcc" is in place then "g++" is here |
---|
1709 | gcccompiler=`( ($gcc -v) 1>/dev/null || echo "ERROR: There is no 'gcc' ('g++'?) compiler.") 2>&1` |
---|
1710 | case $gcccompiler in |
---|
1711 | *egcs*) g4compiler=egcs |
---|
1712 | ;; |
---|
1713 | *2.96*) |
---|
1714 | echo "WARNING: Found version of 'g++' (2.96.XXX) is known to be buggy!" |
---|
1715 | g4compiler="g++" |
---|
1716 | ;; |
---|
1717 | *) g4compiler="g++" |
---|
1718 | ;; |
---|
1719 | esac |
---|
1720 | |
---|
1721 | ;; |
---|
1722 | 'SGI') |
---|
1723 | g4compiler=CC |
---|
1724 | ;; |
---|
1725 | 'SUN') |
---|
1726 | g4compiler=CC |
---|
1727 | ;; |
---|
1728 | 'WIN32') |
---|
1729 | g4compiler=VC |
---|
1730 | clcompiler=`( cl 1>/dev/null || echo "ERROR: There is no 'cl' compiler.") 2>&1` |
---|
1731 | case $clcompiler in |
---|
1732 | *"Version 12"*) g4compiler=VC6 |
---|
1733 | ;; |
---|
1734 | *"Version 13"*) g4compiler=VC |
---|
1735 | ;; |
---|
1736 | *) g4compiler=VC |
---|
1737 | ;; |
---|
1738 | esac |
---|
1739 | ;; |
---|
1740 | 'Darwin') |
---|
1741 | g4compiler=g++ |
---|
1742 | ;; |
---|
1743 | esac |
---|
1744 | esac |
---|
1745 | |
---|
1746 | if [ X$g4system = X ] ; then |
---|
1747 | |
---|
1748 | if [ X$g4build = Xyes ] ; then |
---|
1749 | while test 1 = 1 ; do |
---|
1750 | |
---|
1751 | g4message=`cat << EOM |
---|
1752 | |
---|
1753 | Definition of G4SYSTEM variable is $g4osname-$g4compiler. |
---|
1754 | That stands for: |
---|
1755 | |
---|
1756 | 1) OS : $g4osname |
---|
1757 | |
---|
1758 | 2) Compiler : $g4compiler |
---|
1759 | |
---|
1760 | To modify default settings, select number above (e.g. 2) |
---|
1761 | EOM` |
---|
1762 | |
---|
1763 | dflt="Press [Enter] for default settings" |
---|
1764 | rp=$g4message |
---|
1765 | . .config/UU/myread |
---|
1766 | gans=$ans |
---|
1767 | |
---|
1768 | case $gans in |
---|
1769 | |
---|
1770 | 1) |
---|
1771 | case "$osname" in |
---|
1772 | 'aix') |
---|
1773 | g4osnamerec=AIX |
---|
1774 | ;; |
---|
1775 | 'dec_osf') |
---|
1776 | g4osnamerec=DEC |
---|
1777 | ;; |
---|
1778 | 'hpux') |
---|
1779 | g4osnamerec=HP |
---|
1780 | ;; |
---|
1781 | 'linux') |
---|
1782 | g4osnamerec=Linux |
---|
1783 | ;; |
---|
1784 | 'irix') |
---|
1785 | g4osnamerec=SGI |
---|
1786 | ;; |
---|
1787 | 'sunos') |
---|
1788 | g4osnamerec=SUN |
---|
1789 | ;; |
---|
1790 | 'win32') |
---|
1791 | g4osnamerec=WIN32 |
---|
1792 | ;; |
---|
1793 | 'darwin') |
---|
1794 | g4osnamerec=Darwin |
---|
1795 | ;; |
---|
1796 | esac |
---|
1797 | dflt=$g4osname |
---|
1798 | rp="What is your OS'?" |
---|
1799 | . .config/UU/myread |
---|
1800 | tans=$ans |
---|
1801 | |
---|
1802 | if test X$tans != X$g4osnamerec ; then |
---|
1803 | echo "" |
---|
1804 | |
---|
1805 | cat << EOM |
---|
1806 | |
---|
1807 | You are running 'Configure' on NOT native platform! |
---|
1808 | You are on your own way !!! |
---|
1809 | |
---|
1810 | EOM |
---|
1811 | |
---|
1812 | dflt=$tans |
---|
1813 | rp="Confirm your selection or set native '$g4osnamerec'!" |
---|
1814 | . .config/UU/myread |
---|
1815 | tans=$ans |
---|
1816 | fi |
---|
1817 | |
---|
1818 | g4osname=$tans |
---|
1819 | ;; |
---|
1820 | 2) |
---|
1821 | case "$g4osname" in |
---|
1822 | 'AIX') |
---|
1823 | g4compilerrec=xlC |
---|
1824 | ;; |
---|
1825 | 'DEC') |
---|
1826 | g4compilerrec=cxx |
---|
1827 | ;; |
---|
1828 | 'HP') |
---|
1829 | g4compilerrec=aCC |
---|
1830 | ;; |
---|
1831 | 'Linux') |
---|
1832 | g4compilerrec=g++ |
---|
1833 | ;; |
---|
1834 | 'SGI') |
---|
1835 | g4compilerrec=CC |
---|
1836 | ;; |
---|
1837 | 'SUN') |
---|
1838 | g4compilerrec=CC |
---|
1839 | ;; |
---|
1840 | 'WIN32') |
---|
1841 | g4compilerrec=VC |
---|
1842 | ;; |
---|
1843 | 'Darwin') |
---|
1844 | g4compilerrec=g++ |
---|
1845 | ;; |
---|
1846 | esac |
---|
1847 | dflt=$g4compiler |
---|
1848 | rp="Which C++ compiler?" |
---|
1849 | . .config/UU/myread |
---|
1850 | tans=$ans |
---|
1851 | |
---|
1852 | if test X$tans != X$g4compilerrec ; then |
---|
1853 | echo "" |
---|
1854 | |
---|
1855 | cat << EOM |
---|
1856 | |
---|
1857 | The recommmended compiler for this platform ($g4osname) is $g4compilerrec. |
---|
1858 | You are on your own way !!! |
---|
1859 | |
---|
1860 | EOM |
---|
1861 | |
---|
1862 | dflt=$tans |
---|
1863 | rp="Confirm your selection or set recommended '$g4compilerrec'!" |
---|
1864 | . .config/UU/myread |
---|
1865 | tans=$ans |
---|
1866 | fi |
---|
1867 | |
---|
1868 | g4compiler=$tans |
---|
1869 | ;; |
---|
1870 | # [eE]) |
---|
1871 | # break |
---|
1872 | # ;; |
---|
1873 | *) |
---|
1874 | # echo " " |
---|
1875 | break |
---|
1876 | ;; |
---|
1877 | esac |
---|
1878 | done |
---|
1879 | |
---|
1880 | fi |
---|
1881 | |
---|
1882 | # |
---|
1883 | # Ask about compiler used. |
---|
1884 | # |
---|
1885 | g4system=$g4osname-$g4compiler |
---|
1886 | |
---|
1887 | fi |
---|
1888 | |
---|
1889 | #cat << EOM |
---|
1890 | # |
---|
1891 | #G4SYSTEM is now set to $g4system. |
---|
1892 | # |
---|
1893 | #EOM |
---|
1894 | |
---|
1895 | cd .config/UU |
---|
1896 | |
---|
1897 | myuname=`( ($uname -a) 2>/dev/null || hostname) 2>&1` |
---|
1898 | myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \ |
---|
1899 | ./tr '[A-Z]' '[a-z]' | tr '\012' ' '` |
---|
1900 | newmyuname="$myuname" |
---|
1901 | dflt=n |
---|
1902 | |
---|
1903 | cd ../.. |
---|
1904 | |
---|
1905 | |
---|
1906 | if [ X$g4build = X ] ; then |
---|
1907 | |
---|
1908 | if test -f $src/.config/bin/$g4system/env.sh; then |
---|
1909 | |
---|
1910 | # create not_display flag |
---|
1911 | |
---|
1912 | if [ X$g4ldlibs != X -o X$g4ldflags != X -o X$g4cxxflags != X -o X$g4cppflags != X -o X$g4incflags != X ] ; then |
---|
1913 | g4non_display=yes |
---|
1914 | # echo g4non_display=$g4non_display |
---|
1915 | fi |
---|
1916 | |
---|
1917 | if [ X$install = Xyes ] ; then |
---|
1918 | |
---|
1919 | $rm -rf .config/UU |
---|
1920 | |
---|
1921 | . $src/.config/bin/$g4system/move.sh |
---|
1922 | |
---|
1923 | exit 1 |
---|
1924 | |
---|
1925 | fi #end of cppflags |
---|
1926 | |
---|
1927 | if [ X$g4cppflags = Xyes ] ; then |
---|
1928 | |
---|
1929 | . $src/.config/bin/$g4system/env.sh |
---|
1930 | |
---|
1931 | CPPFLAGS=`grep 'CPPFLAGS_FINAL :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\):=//'` |
---|
1932 | |
---|
1933 | # echo CPPFLAGS=$CPPFLAGS |
---|
1934 | echo $CPPFLAGS |
---|
1935 | |
---|
1936 | $rm -rf .config/UU |
---|
1937 | exit 1 |
---|
1938 | |
---|
1939 | fi #end of cppflags |
---|
1940 | |
---|
1941 | if [ X$g4cxxflags = Xyes ] ; then |
---|
1942 | |
---|
1943 | . $src/.config/bin/$g4system/env.sh |
---|
1944 | |
---|
1945 | CXXFLAGS=`grep 'CXXFLAGS_FINAL :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\):=//'` |
---|
1946 | |
---|
1947 | # echo CXXFLAGS=$CXXFLAGS |
---|
1948 | echo $CXXFLAGS |
---|
1949 | |
---|
1950 | $rm -rf .config/UU |
---|
1951 | exit 1 |
---|
1952 | |
---|
1953 | fi #end of cxxflags |
---|
1954 | |
---|
1955 | |
---|
1956 | |
---|
1957 | g4install_lib_AAA=`echo $g4install/lib|sed -e "s/\//AAA/g"` |
---|
1958 | g4final_install_lib_AAA=`echo $g4final_install/lib/geant4|sed -e "s/\//AAA/g"` |
---|
1959 | |
---|
1960 | |
---|
1961 | ############################################################################# |
---|
1962 | if [ X$g4incflags = Xyes ] ; then |
---|
1963 | |
---|
1964 | . $src/.config/bin/$g4system/env.sh |
---|
1965 | |
---|
1966 | ### Getting G4FIRST_INSTALL |
---|
1967 | G4FIRST_INSTALL_AAA=`grep 'G4INSTALL =' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\)= //'|$sed -e 's/\//AAA/g'` |
---|
1968 | G4INSTALL_AAA=`echo $G4INSTALL|sed -e "s/\//AAA/g"` |
---|
1969 | ### |
---|
1970 | INCFLAGS_AAA=`grep 'INCFLAGS_FINAL :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\):=//'|$sed -e 's/\//AAA/g'` |
---|
1971 | |
---|
1972 | # echo INCFLAGS_AAA=$INCFLAGS_AAA |
---|
1973 | # echo G4INSTALL_AAA=$G4INSTALL_AAA |
---|
1974 | # echo G4FIRST_INSTALL_AAA=$G4FIRST_INSTALL_AAA |
---|
1975 | |
---|
1976 | INCFLAGS_AAA_NEW=`echo $INCFLAGS_AAA| $sed -e "s/$G4FIRST_INSTALL_AAA/$G4INSTALL_AAA/g"` |
---|
1977 | |
---|
1978 | # echo INCFLAGS_AAA_NEW=$INCFLAGS_AAA_NEW |
---|
1979 | |
---|
1980 | INCFLAGS=`echo $INCFLAGS_AAA_NEW| $sed -e "s/AAA/\//g"` |
---|
1981 | |
---|
1982 | # echo INCFLAGS=$INCFLAGS |
---|
1983 | |
---|
1984 | if [ X$G4INCLUDE = X ] ; then |
---|
1985 | echo $INCFLAGS |
---|
1986 | else |
---|
1987 | echo -I$G4INCLUDE |
---|
1988 | fi |
---|
1989 | |
---|
1990 | $rm -rf .config/UU |
---|
1991 | exit 1 |
---|
1992 | |
---|
1993 | fi #end of incflags |
---|
1994 | ############################################################################# |
---|
1995 | |
---|
1996 | |
---|
1997 | ############################################################################# |
---|
1998 | if [ X$g4ldflags = Xyes ] ; then |
---|
1999 | |
---|
2000 | . $src/.config/bin/$g4system/env.sh |
---|
2001 | |
---|
2002 | ### Getting G4FIRST_INSTALL |
---|
2003 | G4FIRST_LIB_AAA=`grep 'G4LIB =' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\)= //'|$sed -e 's/\//AAA/g'` |
---|
2004 | G4LIB_AAA=`echo $G4LIB|sed -e "s/\//AAA/g"` |
---|
2005 | ### |
---|
2006 | # G4FIRST_INSTALL_LIB_AAA=${G4FIRST_INSTALL_AAA}AAAlib |
---|
2007 | # G4INSTALL_LIB_AAA=${G4INSTALL_AAA}AAAlibAAAgeant4 |
---|
2008 | |
---|
2009 | # echo G4FIRST_INSTALL_LIB_AAA=$G4FIRST_INSTALL_LIB_AAA |
---|
2010 | # echo G4INSTALL_LIB_AAA=$G4INSTALL_LIB_AAA |
---|
2011 | |
---|
2012 | LDFLAGS_AAA=`grep 'LDFLAGS_FINAL :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\):=//'|$sed -e 's/\//AAA/g'` |
---|
2013 | LDFLAGS_AAA_NEW=`echo $LDFLAGS_AAA| $sed -e "s/$G4FIRST_LIB_AAA/$G4LIB_AAA/g"` |
---|
2014 | LDFLAGS=`echo $LDFLAGS_AAA_NEW| $sed -e "s/AAA/\//g"` |
---|
2015 | |
---|
2016 | # echo LDFLAGS=$LDFLAGS |
---|
2017 | echo $LDFLAGS |
---|
2018 | |
---|
2019 | $rm -rf .config/UU |
---|
2020 | exit 1 |
---|
2021 | |
---|
2022 | fi #end of ldflags |
---|
2023 | ############################################################################# |
---|
2024 | |
---|
2025 | if [ X$g4ldlibs = Xyes ] ; then |
---|
2026 | |
---|
2027 | # cat >&2 <<EOM |
---|
2028 | #--------------------------------------------------- |
---|
2029 | #LibList mode :) |
---|
2030 | #--------------------------------------------------- |
---|
2031 | #EOM |
---|
2032 | |
---|
2033 | . $src/.config/bin/$g4system/env.sh |
---|
2034 | |
---|
2035 | # echo TEST |
---|
2036 | |
---|
2037 | # ls -l $G4INSTALL/config/scripts/GNUmakefile |
---|
2038 | # ls -l $G4LIB/$G4SYSTEM/GNUmakefile.db |
---|
2039 | |
---|
2040 | # LDLIBS_1=`grep 'LDLIBS_FINAL :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | awk -F := '{print $2}'` |
---|
2041 | # LDLIBS_2=`echo $LDLIBS_1 | awk -F -lMarker '{print $2}'` |
---|
2042 | |
---|
2043 | # echo LDLIBS_2=$LDLIBS_2 |
---|
2044 | # echo $LDLIBS_2 |
---|
2045 | |
---|
2046 | if [ X$G4LIB_USE_GRANULAR = X ] ; then |
---|
2047 | |
---|
2048 | # Global libs |
---|
2049 | |
---|
2050 | ### LDLIBS_1=`grep 'LDLIBS_FINAL :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\):=//'` |
---|
2051 | ### LDLIBS_2=`echo $LDLIBS_1 | $sed -e 's/^\(.*\)-lMarker//'` |
---|
2052 | ### echo "$LDLIBS_2 $c" |
---|
2053 | |
---|
2054 | LIBLIST_LIST=`$G4LIB/$G4SYSTEM/liblist -m $G4LIB/$G4SYSTEM < $G4LIB/$G4SYSTEM/libname.map` |
---|
2055 | |
---|
2056 | LDLIBS3=`grep 'LDLIBS3 :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\):=//'` |
---|
2057 | LDLIBS4=`grep 'LDLIBS4 :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\):=//'` |
---|
2058 | |
---|
2059 | LDLIBS=$LIBLIST_LIST $LDLIBS3 $LDLIBS4 |
---|
2060 | |
---|
2061 | echo $LDLIBS |
---|
2062 | |
---|
2063 | # echo "-L$G4WORKDIR/lib/$G4SYSTEM -lG4persistency -lG4readout -lG4run -lG4event -lG4tracking -lG4parmodels -lG4processes -lG4digits+hits -lG4track -lG4particles -lG4geometry -lG4materials -lG4graphics_reps -lG4intercoms -lG4global $c" |
---|
2064 | |
---|
2065 | $rm -rf .config/UU |
---|
2066 | exit 1 |
---|
2067 | |
---|
2068 | else |
---|
2069 | |
---|
2070 | # Granular libs |
---|
2071 | |
---|
2072 | # echo $n "-L$G4WORKDIR/lib/$G4SYSTEM $c" ; $G4WORKDIR/lib/$G4SYSTEM/liblist -m $G4WORKDIR/lib/$G4SYSTEM < $G4WORKDIR/lib/$G4SYSTEM/libname.map |
---|
2073 | |
---|
2074 | # echo G4LIB=$G4LIB/$G4SYSTEM |
---|
2075 | |
---|
2076 | LIBLIST_LIST=`$G4LIB/$G4SYSTEM/liblist -m $G4LIB/$G4SYSTEM < $G4LIB/$G4SYSTEM/libname.map` |
---|
2077 | |
---|
2078 | LDLIBS3=`grep 'LDLIBS3 :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\):=//'` |
---|
2079 | LDLIBS4=`grep 'LDLIBS4 :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\):=//'` |
---|
2080 | |
---|
2081 | LDLIBS=$LIBLIST_LIST $LDLIBS3 $LDLIBS4 |
---|
2082 | |
---|
2083 | echo $LDLIBS |
---|
2084 | |
---|
2085 | $rm -rf .config/UU |
---|
2086 | |
---|
2087 | exit 1 |
---|
2088 | fi #end of check for global/granular |
---|
2089 | |
---|
2090 | else #if not -lib but user mode |
---|
2091 | |
---|
2092 | # header for User |
---|
2093 | echo " " |
---|
2094 | echo " " |
---|
2095 | echo " " |
---|
2096 | echo " --- Geant4 Toolkit Installation ---" |
---|
2097 | echo " (setting environments for USER )" |
---|
2098 | echo " " |
---|
2099 | echo " " |
---|
2100 | echo " " |
---|
2101 | |
---|
2102 | #cat << EOM |
---|
2103 | # |
---|
2104 | #G4SYSTEM is now set to $g4system. |
---|
2105 | # |
---|
2106 | #EOM |
---|
2107 | |
---|
2108 | cat >&2 <<EOM |
---|
2109 | --------------------------------------------------- |
---|
2110 | The Geant4 toolkit installation was found. |
---|
2111 | The files env.[c]sh will be copied to your current directory. |
---|
2112 | For setting Geant4 environments you should make: |
---|
2113 | |
---|
2114 | source env.csh |
---|
2115 | |
---|
2116 | or |
---|
2117 | |
---|
2118 | . env.sh |
---|
2119 | |
---|
2120 | It will also check G4WORKDIR setting and set it to |
---|
2121 | your HOME if needed. |
---|
2122 | You can use these files also for further modifications |
---|
2123 | (adding your own environments). |
---|
2124 | --------------------------------------------------- |
---|
2125 | EOM |
---|
2126 | $rm -rf .config/UU |
---|
2127 | |
---|
2128 | cp -i $src/.config/bin/$g4system/env.csh . |
---|
2129 | cp -i $src/.config/bin/$g4system/env.sh . |
---|
2130 | |
---|
2131 | exit 1 |
---|
2132 | fi #end of -lib or user |
---|
2133 | else #there is no env.sh |
---|
2134 | |
---|
2135 | # header for Installer |
---|
2136 | echo " " |
---|
2137 | echo " " |
---|
2138 | echo " " |
---|
2139 | echo " --- Geant4 Toolkit Installation ---" |
---|
2140 | echo " " |
---|
2141 | echo " " |
---|
2142 | echo " " |
---|
2143 | echo " " |
---|
2144 | |
---|
2145 | echo " " |
---|
2146 | echo "WARNING: Geant4 is NOT built yet!" |
---|
2147 | echo "You (or the administrator if you have not enough privileges)" |
---|
2148 | echo "should start with \$G4INSTALL/Configure -build." |
---|
2149 | echo "(where \$G4INSTALL is Geant4 install directory)." |
---|
2150 | echo " " |
---|
2151 | $rm -rf .config/UU |
---|
2152 | exit 1 |
---|
2153 | fi #end of check for existence of env.sh |
---|
2154 | fi #end of check for "not -install" |
---|
2155 | |
---|
2156 | cd .config/UU |
---|
2157 | |
---|
2158 | case "$knowitall" in |
---|
2159 | '') |
---|
2160 | cd ../.. |
---|
2161 | if test -f $src/.config/bin/$g4system/config.sh; then |
---|
2162 | if $contains myuname= $src/.config/bin/$g4system/config.sh >/dev/null 2>&1; then |
---|
2163 | eval "`grep myuname= $src/.config/bin/$g4system/config.sh`" |
---|
2164 | fi |
---|
2165 | if test "X$myuname" = "X$newmyuname"; then |
---|
2166 | dflt=y |
---|
2167 | fi |
---|
2168 | fi |
---|
2169 | cd .config/UU |
---|
2170 | ;; |
---|
2171 | *) dflt=y;; |
---|
2172 | esac |
---|
2173 | |
---|
2174 | cd ../.. |
---|
2175 | |
---|
2176 | if test -f $src/.config/bin/$g4system/config.sh; then |
---|
2177 | echo " " |
---|
2178 | rp="There exists a config.sh file. Shall I use it to set the defaults?" |
---|
2179 | . .config/UU/myread |
---|
2180 | case "$ans" in |
---|
2181 | n*|N*) echo "OK, I'll ignore it."; mv $src/.config/bin/$g4system/config.sh $src/.config/bin/$g4system/config.sh.old;; |
---|
2182 | *) echo "Fetching default answers from your old config.sh file..." >&4 |
---|
2183 | tmp_n="$n" |
---|
2184 | tmp_c="$c" |
---|
2185 | tmp_sh="$sh" |
---|
2186 | . $src/.config/bin/$g4system/config.sh |
---|
2187 | cp $src/.config/bin/$g4system/config.sh .config/UU |
---|
2188 | n="$tmp_n" |
---|
2189 | c="$tmp_c" |
---|
2190 | : Older versions did not always set $sh. Catch re-use of such |
---|
2191 | : an old config.sh. |
---|
2192 | case "$sh" in |
---|
2193 | '') sh="$tmp_sh" ;; |
---|
2194 | esac |
---|
2195 | hint=previous |
---|
2196 | ;; |
---|
2197 | esac |
---|
2198 | fi |
---|
2199 | |
---|
2200 | cd .config/UU |
---|
2201 | ;; |
---|
2202 | *) |
---|
2203 | echo " " |
---|
2204 | echo "Fetching default answers from $config_sh..." >&4 |
---|
2205 | tmp_n="$n" |
---|
2206 | tmp_c="$c" |
---|
2207 | cd ../.. |
---|
2208 | cp $config_sh config.sh 2>/dev/null |
---|
2209 | chmod +w config.sh |
---|
2210 | . ./config.sh |
---|
2211 | cd .config/UU |
---|
2212 | cp ../config.sh . |
---|
2213 | n="$tmp_n" |
---|
2214 | c="$tmp_c" |
---|
2215 | hint=previous |
---|
2216 | ;; |
---|
2217 | esac |
---|
2218 | test "$override" && . ./optdef.sh |
---|
2219 | myuname="$newmyuname" |
---|
2220 | |
---|
2221 | : Restore computed paths |
---|
2222 | for file in $loclist $trylist; do |
---|
2223 | eval $file="\$_$file" |
---|
2224 | done |
---|
2225 | |
---|
2226 | |
---|
2227 | : who configured the system |
---|
2228 | cf_time=`$date 2>&1` |
---|
2229 | cf_by=`(logname) 2>/dev/null` |
---|
2230 | case "$cf_by" in |
---|
2231 | "") |
---|
2232 | cf_by=`(whoami) 2>/dev/null` |
---|
2233 | case "$cf_by" in |
---|
2234 | "") cf_by=unknown ;; |
---|
2235 | esac ;; |
---|
2236 | esac |
---|
2237 | |
---|
2238 | : decide how portable to be |
---|
2239 | case "$d_portable" in |
---|
2240 | "$define") dflt=y;; |
---|
2241 | *) dflt=n;; |
---|
2242 | esac |
---|
2243 | $cat <<'EOH' |
---|
2244 | |
---|
2245 | I can set things up so that your shell scripts and binaries are more portable, |
---|
2246 | at what may be a noticable cost in performance. In particular, if you |
---|
2247 | ask to be portable, the following happens: |
---|
2248 | |
---|
2249 | 1) Shell scripts will rely on the PATH variable rather than using |
---|
2250 | the paths derived above. |
---|
2251 | 2) ~username interpretations will be done at run time rather than |
---|
2252 | by Configure. |
---|
2253 | |
---|
2254 | EOH |
---|
2255 | rp="Do you expect to run these scripts and binaries on multiple machines?" |
---|
2256 | . ./myread |
---|
2257 | case "$ans" in |
---|
2258 | y*) d_portable="$define" |
---|
2259 | ;; |
---|
2260 | *) d_portable="$undef" ;; |
---|
2261 | esac |
---|
2262 | |
---|
2263 | : set up shell script to do ~ expansion |
---|
2264 | cat >filexp <<EOSS |
---|
2265 | $startsh |
---|
2266 | : expand filename |
---|
2267 | case "\$1" in |
---|
2268 | ~/*|~) |
---|
2269 | echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|" |
---|
2270 | ;; |
---|
2271 | ~*) |
---|
2272 | if $test -f /bin/csh; then |
---|
2273 | /bin/csh -f -c "glob \$1" |
---|
2274 | failed=\$? |
---|
2275 | echo "" |
---|
2276 | exit \$failed |
---|
2277 | else |
---|
2278 | name=\`$expr x\$1 : '..\([^/]*\)'\` |
---|
2279 | dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\` |
---|
2280 | if $test ! -d "\$dir"; then |
---|
2281 | me=\`basename \$0\` |
---|
2282 | echo "\$me: can't locate home directory for: \$name" >&2 |
---|
2283 | exit 1 |
---|
2284 | fi |
---|
2285 | case "\$1" in |
---|
2286 | */*) |
---|
2287 | echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\` |
---|
2288 | ;; |
---|
2289 | *) |
---|
2290 | echo \$dir |
---|
2291 | ;; |
---|
2292 | esac |
---|
2293 | fi |
---|
2294 | ;; |
---|
2295 | *) |
---|
2296 | echo \$1 |
---|
2297 | ;; |
---|
2298 | esac |
---|
2299 | EOSS |
---|
2300 | chmod +x filexp |
---|
2301 | $eunicefix filexp |
---|
2302 | |
---|
2303 | : now set up to get a file name |
---|
2304 | cat <<EOS >getfile |
---|
2305 | $startsh |
---|
2306 | EOS |
---|
2307 | cat <<'EOSC' >>getfile |
---|
2308 | tilde='' |
---|
2309 | fullpath='' |
---|
2310 | already='' |
---|
2311 | skip='' |
---|
2312 | none_ok='' |
---|
2313 | exp_file='' |
---|
2314 | nopath_ok='' |
---|
2315 | orig_rp="$rp" |
---|
2316 | orig_dflt="$dflt" |
---|
2317 | |
---|
2318 | case "$fn" in |
---|
2319 | *\(*) |
---|
2320 | expr $fn : '.*(\(.*\)).*' | tr ',' '\012' >getfile.ok |
---|
2321 | fn=`echo $fn | sed 's/(.*)//'` |
---|
2322 | ;; |
---|
2323 | esac |
---|
2324 | |
---|
2325 | case "$fn" in |
---|
2326 | *:*) |
---|
2327 | loc_file=`expr $fn : '.*:\(.*\)'` |
---|
2328 | fn=`expr $fn : '\(.*\):.*'` |
---|
2329 | ;; |
---|
2330 | esac |
---|
2331 | |
---|
2332 | case "$fn" in |
---|
2333 | *~*) tilde=true;; |
---|
2334 | esac |
---|
2335 | case "$fn" in |
---|
2336 | */*) fullpath=true;; |
---|
2337 | esac |
---|
2338 | case "$fn" in |
---|
2339 | *+*) skip=true;; |
---|
2340 | esac |
---|
2341 | case "$fn" in |
---|
2342 | *n*) none_ok=true;; |
---|
2343 | esac |
---|
2344 | case "$fn" in |
---|
2345 | *e*) exp_file=true;; |
---|
2346 | esac |
---|
2347 | case "$fn" in |
---|
2348 | *p*) nopath_ok=true;; |
---|
2349 | esac |
---|
2350 | |
---|
2351 | case "$fn" in |
---|
2352 | *f*) type='File';; |
---|
2353 | *d*) type='Directory';; |
---|
2354 | *l*) type='Locate';; |
---|
2355 | esac |
---|
2356 | |
---|
2357 | what="$type" |
---|
2358 | case "$what" in |
---|
2359 | Locate) what='File';; |
---|
2360 | esac |
---|
2361 | |
---|
2362 | case "$exp_file" in |
---|
2363 | '') |
---|
2364 | case "$d_portable" in |
---|
2365 | "$define") ;; |
---|
2366 | *) exp_file=true;; |
---|
2367 | esac |
---|
2368 | ;; |
---|
2369 | esac |
---|
2370 | |
---|
2371 | cd ../.. |
---|
2372 | while test "$type"; do |
---|
2373 | redo='' |
---|
2374 | rp="$orig_rp" |
---|
2375 | dflt="$orig_dflt" |
---|
2376 | case "$tilde" in |
---|
2377 | true) rp="$rp ";; |
---|
2378 | esac |
---|
2379 | . .config/UU/myread |
---|
2380 | if test -f .config/UU/getfile.ok && \ |
---|
2381 | $contains "^$ans\$" .config/UU/getfile.ok >/dev/null 2>&1 |
---|
2382 | then |
---|
2383 | value="$ans" |
---|
2384 | ansexp="$ans" |
---|
2385 | break |
---|
2386 | fi |
---|
2387 | case "$ans" in |
---|
2388 | none) |
---|
2389 | value='' |
---|
2390 | ansexp='' |
---|
2391 | case "$none_ok" in |
---|
2392 | true) type='';; |
---|
2393 | esac |
---|
2394 | ;; |
---|
2395 | *) |
---|
2396 | case "$tilde" in |
---|
2397 | '') value="$ans" |
---|
2398 | ansexp="$ans";; |
---|
2399 | *) |
---|
2400 | value=`.config/UU/filexp $ans` |
---|
2401 | case $? in |
---|
2402 | 0) |
---|
2403 | if test "$ans" != "$value"; then |
---|
2404 | echo "(That expands to $value on this system.)" |
---|
2405 | fi |
---|
2406 | ;; |
---|
2407 | *) value="$ans";; |
---|
2408 | esac |
---|
2409 | ansexp="$value" |
---|
2410 | case "$exp_file" in |
---|
2411 | '') value="$ans";; |
---|
2412 | esac |
---|
2413 | ;; |
---|
2414 | esac |
---|
2415 | case "$fullpath" in |
---|
2416 | true) |
---|
2417 | case "$ansexp" in |
---|
2418 | /*) value="$ansexp" ;; |
---|
2419 | *) |
---|
2420 | redo=true |
---|
2421 | case "$already" in |
---|
2422 | true) |
---|
2423 | echo "I shall only accept a full path name, as in /bin/ls." >&4 |
---|
2424 | echo "Use a ! shell escape if you wish to check pathnames." >&4 |
---|
2425 | ;; |
---|
2426 | *) |
---|
2427 | echo "Please give a full path name, starting with slash." >&4 |
---|
2428 | case "$tilde" in |
---|
2429 | true) |
---|
2430 | echo "Note that using ~username is ok provided it expands well." >&4 |
---|
2431 | already=true |
---|
2432 | ;; |
---|
2433 | esac |
---|
2434 | esac |
---|
2435 | ;; |
---|
2436 | esac |
---|
2437 | ;; |
---|
2438 | esac |
---|
2439 | case "$redo" in |
---|
2440 | '') |
---|
2441 | case "$type" in |
---|
2442 | File) |
---|
2443 | if test -f "$ansexp"; then |
---|
2444 | type='' |
---|
2445 | elif test -r "$ansexp" || (test -h "$ansexp") >/dev/null 2>&1 |
---|
2446 | then |
---|
2447 | echo "($value is not a plain file, but that's ok.)" |
---|
2448 | type='' |
---|
2449 | fi |
---|
2450 | ;; |
---|
2451 | Directory) |
---|
2452 | if test -d "$ansexp"; then |
---|
2453 | type='' |
---|
2454 | fi |
---|
2455 | ;; |
---|
2456 | Locate) |
---|
2457 | if test -d "$ansexp"; then |
---|
2458 | echo "(Looking for $loc_file in directory $value.)" |
---|
2459 | value="$value/$loc_file" |
---|
2460 | ansexp="$ansexp/$loc_file" |
---|
2461 | fi |
---|
2462 | if test -f "$ansexp"; then |
---|
2463 | type='' |
---|
2464 | fi |
---|
2465 | case "$nopath_ok" in |
---|
2466 | true) case "$value" in |
---|
2467 | */*) ;; |
---|
2468 | *) echo "Assuming $value will be in people's path." |
---|
2469 | type='' |
---|
2470 | ;; |
---|
2471 | esac |
---|
2472 | ;; |
---|
2473 | esac |
---|
2474 | ;; |
---|
2475 | esac |
---|
2476 | |
---|
2477 | case "$skip" in |
---|
2478 | true) type=''; |
---|
2479 | esac |
---|
2480 | |
---|
2481 | case "$type" in |
---|
2482 | '') ;; |
---|
2483 | *) |
---|
2484 | if test "$fastread" = yes; then |
---|
2485 | dflt=y |
---|
2486 | else |
---|
2487 | dflt=n |
---|
2488 | fi |
---|
2489 | rp="$what $value doesn't exist. Use that name anyway?" |
---|
2490 | . .config/UU/myread |
---|
2491 | dflt='' |
---|
2492 | case "$ans" in |
---|
2493 | y*) type='';; |
---|
2494 | *) echo " ";; |
---|
2495 | esac |
---|
2496 | ;; |
---|
2497 | esac |
---|
2498 | ;; |
---|
2499 | esac |
---|
2500 | ;; |
---|
2501 | esac |
---|
2502 | done |
---|
2503 | cd .config/UU |
---|
2504 | ans="$value" |
---|
2505 | |
---|
2506 | # Check for Windows! |
---|
2507 | if test "X$g4system" = "XWIN32-VC" -o "X$g4system" = "XWIN32-VC7"; then |
---|
2508 | |
---|
2509 | checkdrive=`echo $ans|cut -d"/" -f2` |
---|
2510 | |
---|
2511 | if test "X$checkdrive" = "Xcygdrive"; then |
---|
2512 | |
---|
2513 | windrive=`echo $ans|cut -d"/" -f3` |
---|
2514 | winpath=`echo $ans|cut -d"/" -f4-` |
---|
2515 | |
---|
2516 | fullwinpath="$windrive:/$winpath" |
---|
2517 | ans=$fullwinpath |
---|
2518 | |
---|
2519 | fi # if cygwin syntax is used |
---|
2520 | fi # if Win |
---|
2521 | |
---|
2522 | rp="$orig_rp" |
---|
2523 | dflt="$orig_dflt" |
---|
2524 | rm -f getfile.ok |
---|
2525 | EOSC |
---|
2526 | |
---|
2527 | echo " " |
---|
2528 | |
---|
2529 | #echo "SSS" |
---|
2530 | #echo `pwd` |
---|
2531 | #echo "SSS" |
---|
2532 | |
---|
2533 | if [ X$src = X. ] ; then |
---|
2534 | cd ../.. |
---|
2535 | abssrc=`pwd` |
---|
2536 | cd .config/UU |
---|
2537 | else |
---|
2538 | abssrc=$src |
---|
2539 | fi |
---|
2540 | |
---|
2541 | case "$g4conf" in |
---|
2542 | '') |
---|
2543 | g4conf=$abssrc/.config/bin/$g4system |
---|
2544 | ;; |
---|
2545 | esac |
---|
2546 | |
---|
2547 | #echo "g4conf=$g4conf" |
---|
2548 | |
---|
2549 | case "$g4install" in |
---|
2550 | '') |
---|
2551 | if test $g4system = "WIN32-VC" -o $g4system = "WIN32-VC7"; then |
---|
2552 | # g4install="c:/geant4" |
---|
2553 | g4install=$abssrc |
---|
2554 | else |
---|
2555 | # if [ X"$HOME" = X/ ] ; then |
---|
2556 | # HOME="" |
---|
2557 | # fi |
---|
2558 | # g4install="$HOME"/geant4 |
---|
2559 | g4install=$abssrc |
---|
2560 | |
---|
2561 | fi |
---|
2562 | |
---|
2563 | # Check for Windows! |
---|
2564 | if test $g4system = "WIN32-VC" -o $g4system = "WIN32-VC7"; then |
---|
2565 | |
---|
2566 | checkdrive=`echo $g4install|cut -d"/" -f2` |
---|
2567 | |
---|
2568 | if test $checkdrive = "cygdrive"; then |
---|
2569 | |
---|
2570 | windrive=`echo $g4install|cut -d"/" -f3` |
---|
2571 | winpath=`echo $g4install|cut -d"/" -f4-` |
---|
2572 | |
---|
2573 | fullwinpath="$windrive:/$winpath" |
---|
2574 | g4install=$fullwinpath |
---|
2575 | |
---|
2576 | fi |
---|
2577 | fi |
---|
2578 | ;; |
---|
2579 | esac |
---|
2580 | |
---|
2581 | case "$g4final_install" in |
---|
2582 | '') |
---|
2583 | g4final_install=$g4install |
---|
2584 | ;; |
---|
2585 | esac |
---|
2586 | |
---|
2587 | case "$g4workdir" in |
---|
2588 | '') |
---|
2589 | g4workdir=$g4install |
---|
2590 | ;; |
---|
2591 | esac |
---|
2592 | |
---|
2593 | case "$g4includes_flag" in |
---|
2594 | '') |
---|
2595 | g4includes_flag=n |
---|
2596 | ;; |
---|
2597 | esac |
---|
2598 | |
---|
2599 | |
---|
2600 | g4message=`cat << EOM |
---|
2601 | |
---|
2602 | Where is Geant4 source installed? |
---|
2603 | EOM` |
---|
2604 | |
---|
2605 | #dflt="NO DEFAULT ANSWER" |
---|
2606 | dflt=$g4install |
---|
2607 | fn='d~' |
---|
2608 | rp=$g4message |
---|
2609 | . ./getfile |
---|
2610 | g4install=$ans |
---|
2611 | g4workdir=$g4install |
---|
2612 | ################################# |
---|
2613 | g4message=`cat << EOM |
---|
2614 | |
---|
2615 | Specify the path where Geant4 libraries and source files should be |
---|
2616 | installed. |
---|
2617 | EOM` |
---|
2618 | |
---|
2619 | #dflt="NO DEFAULT ANSWER" |
---|
2620 | dflt=$g4final_install |
---|
2621 | fn='d~' |
---|
2622 | rp=$g4message |
---|
2623 | . ./getfile |
---|
2624 | g4final_install=$ans |
---|
2625 | #g4workdir=$g4install |
---|
2626 | |
---|
2627 | ################################## |
---|
2628 | g4message=`cat << EOM |
---|
2629 | |
---|
2630 | Do you want to copy all Geant4 headers |
---|
2631 | in one directory? |
---|
2632 | EOM` |
---|
2633 | |
---|
2634 | #dflt="NO DEFAULT ANSWER" |
---|
2635 | dflt=$g4includes_flag |
---|
2636 | #fn='d~' |
---|
2637 | rp=$g4message |
---|
2638 | . ./myread |
---|
2639 | g4includes_flag=$ans |
---|
2640 | |
---|
2641 | if [ X$g4includes_flag = Xy ] ; then |
---|
2642 | |
---|
2643 | case "$g4include" in |
---|
2644 | '') |
---|
2645 | g4include=$g4install/include |
---|
2646 | # g4include='' |
---|
2647 | ;; |
---|
2648 | esac |
---|
2649 | |
---|
2650 | #g4message=`cat << EOM |
---|
2651 | # |
---|
2652 | #Where will be directory to copy all Geant4 headers? |
---|
2653 | #EOM` |
---|
2654 | # |
---|
2655 | ##dflt="NO DEFAULT ANSWER" |
---|
2656 | ####dflt=$g4install/include |
---|
2657 | #dflt=$g4include |
---|
2658 | #fn='d~+' |
---|
2659 | #rp=$g4message |
---|
2660 | #. ./getfile |
---|
2661 | #g4include=$ans |
---|
2662 | |
---|
2663 | # Set constantly! |
---|
2664 | if [ X$g4install != X$g4final_install ] ; then |
---|
2665 | g4include=$g4final_install/include/geant4 |
---|
2666 | else |
---|
2667 | g4include=$g4final_install/include |
---|
2668 | fi |
---|
2669 | |
---|
2670 | fi |
---|
2671 | |
---|
2672 | #if test "X$g4include" = "X[NOT DEFINED]" ; then |
---|
2673 | #g4include="" |
---|
2674 | #fi |
---|
2675 | |
---|
2676 | echo " " |
---|
2677 | |
---|
2678 | case "$g4tmp" in |
---|
2679 | '') |
---|
2680 | g4tmp=$g4workdir/tmp |
---|
2681 | ;; |
---|
2682 | esac |
---|
2683 | |
---|
2684 | case "$g4lib" in |
---|
2685 | '') |
---|
2686 | g4lib=$g4workdir/lib |
---|
2687 | ;; |
---|
2688 | esac |
---|
2689 | |
---|
2690 | #case "$g4bin" in |
---|
2691 | #'') |
---|
2692 | # g4bin=$g4workdir/bin |
---|
2693 | # ;; |
---|
2694 | #esac |
---|
2695 | |
---|
2696 | while test 1 = 0 ; do |
---|
2697 | |
---|
2698 | g4message=`cat << EOM |
---|
2699 | |
---|
2700 | (OPTIONAL) You can now customise installation directories: |
---|
2701 | G4TMP - tmp/ containing temporary dependency (.d) and object (.o) files; |
---|
2702 | G4LIB - lib/ containing final static (.a) or shared (.so) libraries; |
---|
2703 | |
---|
2704 | 1) G4TMP: $g4tmp |
---|
2705 | |
---|
2706 | 2) G4LIB: $g4lib |
---|
2707 | |
---|
2708 | To modify default settings, select number above (e.g. 2) |
---|
2709 | EOM` |
---|
2710 | |
---|
2711 | #dflt="NO DEFAULT ANSWER" |
---|
2712 | dflt="Press [Enter] for default settings" |
---|
2713 | #fn='d~' |
---|
2714 | rp=$g4message |
---|
2715 | . ./myread |
---|
2716 | gans=$ans |
---|
2717 | |
---|
2718 | |
---|
2719 | case $gans in |
---|
2720 | |
---|
2721 | 1) |
---|
2722 | dflt=$g4tmp |
---|
2723 | fn='d~+' |
---|
2724 | rp="Where will be your Geant4 tmp directory?" |
---|
2725 | . ./getfile |
---|
2726 | g4tmp=$ans |
---|
2727 | ;; |
---|
2728 | 2) |
---|
2729 | dflt=$g4lib |
---|
2730 | fn='d~+' |
---|
2731 | rp="Where will be your Geant4 lib directory?" |
---|
2732 | . ./getfile |
---|
2733 | g4lib=$ans |
---|
2734 | ;; |
---|
2735 | # 3) |
---|
2736 | # dflt=$g4bin |
---|
2737 | # fn='d~+' |
---|
2738 | # rp="Where will be your Geant4 bin directory?" |
---|
2739 | # . ./getfile |
---|
2740 | # g4bin=$ans |
---|
2741 | # ;; |
---|
2742 | |
---|
2743 | # [eE]) |
---|
2744 | # break |
---|
2745 | # ;; |
---|
2746 | *) |
---|
2747 | break |
---|
2748 | # echo " " |
---|
2749 | ;; |
---|
2750 | esac |
---|
2751 | done |
---|
2752 | |
---|
2753 | echo " " |
---|
2754 | |
---|
2755 | case "$g4data" in |
---|
2756 | '') |
---|
2757 | g4data=$g4install/data |
---|
2758 | ;; |
---|
2759 | esac |
---|
2760 | |
---|
2761 | case "$g4levelgammadata" in |
---|
2762 | '') |
---|
2763 | g4levelgammadata=$g4data/PhotonEvaporation2.0 |
---|
2764 | ;; |
---|
2765 | esac |
---|
2766 | |
---|
2767 | case "$g4radioactivedata" in |
---|
2768 | '') |
---|
2769 | g4radioactivedata=$g4data/RadioactiveDecay3.2 |
---|
2770 | ;; |
---|
2771 | esac |
---|
2772 | |
---|
2773 | case "$g4ledata" in |
---|
2774 | '') |
---|
2775 | g4ledata=$g4data/G4EMLOW6.1 |
---|
2776 | ;; |
---|
2777 | esac |
---|
2778 | |
---|
2779 | case "$g4neutronhpcrosssections" in |
---|
2780 | '') |
---|
2781 | g4neutronhpcrosssections=$g4data/G4NDL3.12 |
---|
2782 | ;; |
---|
2783 | esac |
---|
2784 | |
---|
2785 | case "$g4abladata" in |
---|
2786 | '') |
---|
2787 | g4abladata=$g4data/G4ABLA3.0 |
---|
2788 | ;; |
---|
2789 | esac |
---|
2790 | |
---|
2791 | |
---|
2792 | #case "$g4elasticdata" in |
---|
2793 | #'') |
---|
2794 | # g4elasticdata=$g4data/G4ELASTIC1.1 |
---|
2795 | # ;; |
---|
2796 | #esac |
---|
2797 | |
---|
2798 | ######################################################################### |
---|
2799 | |
---|
2800 | # while test 1 = 1 ; do |
---|
2801 | |
---|
2802 | g4message=`cat << EOM |
---|
2803 | |
---|
2804 | Please, specify default directory where ALL the Geant4 data is installed: |
---|
2805 | |
---|
2806 | G4LEVELGAMMADATA: $g4levelgammadata |
---|
2807 | |
---|
2808 | G4RADIOACTIVEDATA: $g4radioactivedata |
---|
2809 | |
---|
2810 | G4LEDATA: $g4ledata |
---|
2811 | |
---|
2812 | G4NEUTRONHPDATA: $g4neutronhpcrosssections |
---|
2813 | |
---|
2814 | G4ABLADATA: $g4abladata |
---|
2815 | |
---|
2816 | You will be asked about customizing these next. |
---|
2817 | |
---|
2818 | EOM` |
---|
2819 | |
---|
2820 | #dflt="NO DEFAULT ANSWER" |
---|
2821 | dflt=$g4data |
---|
2822 | #fn='d~' |
---|
2823 | rp=$g4message |
---|
2824 | #. ./myread |
---|
2825 | gans=$ans |
---|
2826 | |
---|
2827 | dflt=$g4data |
---|
2828 | fn='d~' |
---|
2829 | . ./getfile |
---|
2830 | |
---|
2831 | if [ X$g4data != X$ans ] ; then |
---|
2832 | g4data=$ans |
---|
2833 | |
---|
2834 | g4levelgammadata=$g4data/PhotonEvaporation2.0 |
---|
2835 | g4radioactivedata=$g4data/RadioactiveDecay3.2 |
---|
2836 | g4ledata=$g4data/G4EMLOW6.1 |
---|
2837 | g4neutronhpcrosssections=$g4data/G4NDL3.12 |
---|
2838 | g4abladata=$g4data/G4ABLA3.0 |
---|
2839 | # g4elasticdata=$g4data/G4ELASTIC1.1 |
---|
2840 | fi |
---|
2841 | # done |
---|
2842 | |
---|
2843 | ################################################################### |
---|
2844 | |
---|
2845 | while test 1 = 1 ; do |
---|
2846 | |
---|
2847 | g4message=`cat << EOM |
---|
2848 | |
---|
2849 | Please, specify default directory where the Geant4 data is installed: |
---|
2850 | |
---|
2851 | 1) G4LEVELGAMMADATA: $g4levelgammadata |
---|
2852 | |
---|
2853 | 2) G4RADIOACTIVEDATA: $g4radioactivedata |
---|
2854 | |
---|
2855 | 3) G4LEDATA: $g4ledata |
---|
2856 | |
---|
2857 | 4) G4NEUTRONHPDATA: $g4neutronhpcrosssections |
---|
2858 | |
---|
2859 | 5) G4ABLADATA: $g4abladata |
---|
2860 | |
---|
2861 | To modify default settings, select number above (e.g. 2) |
---|
2862 | EOM` |
---|
2863 | |
---|
2864 | #dflt="NO DEFAULT ANSWER" |
---|
2865 | dflt="Press [Enter] for default settings" |
---|
2866 | #fn='d~' |
---|
2867 | rp=$g4message |
---|
2868 | . ./myread |
---|
2869 | gans=$ans |
---|
2870 | |
---|
2871 | |
---|
2872 | case $gans in |
---|
2873 | |
---|
2874 | 1) |
---|
2875 | dflt=$g4levelgammadata |
---|
2876 | fn='d~' |
---|
2877 | rp="Where is Geant4 PhotonEvaporation2.0 data installed?" |
---|
2878 | . ./getfile |
---|
2879 | g4levelgammadata=$ans |
---|
2880 | ;; |
---|
2881 | 2) |
---|
2882 | dflt=$g4radioactivedata |
---|
2883 | fn='d~' |
---|
2884 | rp="Where is Geant4 RadioactiveDecay3.2 data installed?" |
---|
2885 | . ./getfile |
---|
2886 | g4radioactivedata=$ans |
---|
2887 | ;; |
---|
2888 | 3) |
---|
2889 | dflt=$g4ledata |
---|
2890 | fn='d~' |
---|
2891 | rp="Where is G4EMLOW6.1 data installed ?" |
---|
2892 | . ./getfile |
---|
2893 | g4ledata=$ans |
---|
2894 | ;; |
---|
2895 | 4) |
---|
2896 | dflt=$g4neutronhpcrosssections |
---|
2897 | fn='d~' |
---|
2898 | rp="Where is G4NDL3.12 data installed?" |
---|
2899 | . ./getfile |
---|
2900 | g4neutronhpcrosssections=$ans |
---|
2901 | ;; |
---|
2902 | |
---|
2903 | 5) |
---|
2904 | dflt=$g4abladata |
---|
2905 | fn='d~' |
---|
2906 | rp="Where is G4ABLA3.0 data installed?" |
---|
2907 | . ./getfile |
---|
2908 | g4abladata=$ans |
---|
2909 | ;; |
---|
2910 | |
---|
2911 | # 5) |
---|
2912 | # dflt=$g4elasticdata |
---|
2913 | # fn='d~' |
---|
2914 | # rp="Where is G4ELASTIC1.1 data installed?" |
---|
2915 | # . ./getfile |
---|
2916 | # g4elasticdata=$ans |
---|
2917 | # ;; |
---|
2918 | |
---|
2919 | # [eE]) |
---|
2920 | # break |
---|
2921 | # ;; |
---|
2922 | *) |
---|
2923 | break |
---|
2924 | # echo " " |
---|
2925 | ;; |
---|
2926 | esac |
---|
2927 | done |
---|
2928 | |
---|
2929 | |
---|
2930 | if test "X$g4clhep_base_dir" = "X" ; then |
---|
2931 | |
---|
2932 | clhep_dirs=`find $g4clhep_base_dir /usr/local/include /usr/include -type d -name CLHEP 2>/dev/null |xargs echo` |
---|
2933 | #echo clhep_dirs=$clhep_dirs |
---|
2934 | |
---|
2935 | fi |
---|
2936 | |
---|
2937 | if test "X$clhep_dirs" != "X" ; then |
---|
2938 | |
---|
2939 | g4clhep_base_dir_found=`echo $clhep_dirs|cut -d" " -f1` |
---|
2940 | #echo g4clhep_base_dir_found=$g4clhep_base_dir_found |
---|
2941 | |
---|
2942 | |
---|
2943 | #g4clhep_base_dir_n=`echo $g4clhep_base_dir_found |awk -F"/" '{print NF}'` |
---|
2944 | #echo g4clhep_base_dir_n=$g4clhep_base_dir_n |
---|
2945 | g4clhep_base_dir_found=`dirname $g4clhep_base_dir_found` |
---|
2946 | g4clhep_base_dir_found=`dirname $g4clhep_base_dir_found` |
---|
2947 | |
---|
2948 | g4clhep_base_dir=$g4clhep_base_dir_found |
---|
2949 | |
---|
2950 | #else |
---|
2951 | #case "$g4clhep_base_dir" in |
---|
2952 | #'') |
---|
2953 | # if test "X$g4system" = "XWIN32-VC" -o "X$g4system" = "XWIN32-VC7"; then |
---|
2954 | # g4clhep_base_dir="c:/usr/local" |
---|
2955 | # else |
---|
2956 | # g4clhep_base_dir=/usr/local |
---|
2957 | # fi |
---|
2958 | # ;; |
---|
2959 | #esac |
---|
2960 | fi |
---|
2961 | |
---|
2962 | |
---|
2963 | #while test 1 = 1 ; do |
---|
2964 | |
---|
2965 | #if test "X$g4clhep_base_dir" != "X" ; then |
---|
2966 | #clhep_dirs=$g4clhep_base_dir |
---|
2967 | #echo 1 g4clhep_base_dir=$g4clhep_base_dir |
---|
2968 | #fi |
---|
2969 | |
---|
2970 | if test "X$g4clhep_base_dir" != "X" ; then |
---|
2971 | |
---|
2972 | g4message=`cat << EOM |
---|
2973 | |
---|
2974 | Please, specify where CLHEP is installed. It was found in: |
---|
2975 | |
---|
2976 | CLHEP_BASE_DIR: $g4clhep_base_dir |
---|
2977 | |
---|
2978 | EOM` |
---|
2979 | |
---|
2980 | dflt=$g4clhep_base_dir |
---|
2981 | fn='d~' |
---|
2982 | rp=$g4message |
---|
2983 | . ./getfile |
---|
2984 | |
---|
2985 | cend="no" |
---|
2986 | while test "$cend" = "no" ; do |
---|
2987 | if test -e "$ans/include/CLHEP" ; then |
---|
2988 | cend="yes" |
---|
2989 | |
---|
2990 | g4clhep_base_dir=$ans |
---|
2991 | |
---|
2992 | else |
---|
2993 | |
---|
2994 | g4message=`cat << EOM |
---|
2995 | |
---|
2996 | Could not find CLHEP installed in $ans! |
---|
2997 | Please, specify where CLHEP is installed: |
---|
2998 | |
---|
2999 | CLHEP_BASE_DIR: |
---|
3000 | |
---|
3001 | EOM` |
---|
3002 | |
---|
3003 | dflt="" |
---|
3004 | fn='d~' |
---|
3005 | rp=$g4message |
---|
3006 | . ./getfile |
---|
3007 | fi |
---|
3008 | done |
---|
3009 | |
---|
3010 | else |
---|
3011 | |
---|
3012 | g4message=`cat << EOM |
---|
3013 | |
---|
3014 | Could not find CLHEP installed on this system! |
---|
3015 | Please, specify where CLHEP is installed: |
---|
3016 | |
---|
3017 | CLHEP_BASE_DIR: |
---|
3018 | |
---|
3019 | EOM` |
---|
3020 | |
---|
3021 | dflt="" |
---|
3022 | fn='d~' |
---|
3023 | rp=$g4message |
---|
3024 | . ./getfile |
---|
3025 | |
---|
3026 | cend="no" |
---|
3027 | while test "$cend" = "no" ; do |
---|
3028 | if test -e "$ans/include/CLHEP" ; then |
---|
3029 | cend="yes" |
---|
3030 | |
---|
3031 | g4clhep_base_dir=$ans |
---|
3032 | |
---|
3033 | else |
---|
3034 | |
---|
3035 | g4message=`cat << EOM |
---|
3036 | |
---|
3037 | Could not find CLHEP installed in $ans! |
---|
3038 | Please, specify where CLHEP is installed: |
---|
3039 | |
---|
3040 | CLHEP_BASE_DIR: |
---|
3041 | |
---|
3042 | EOM` |
---|
3043 | |
---|
3044 | dflt="" |
---|
3045 | fn='d~' |
---|
3046 | rp=$g4message |
---|
3047 | . ./getfile |
---|
3048 | fi |
---|
3049 | done |
---|
3050 | |
---|
3051 | fi |
---|
3052 | |
---|
3053 | #dflt="Press [Enter] for default settings" |
---|
3054 | #fn='d~' |
---|
3055 | #####rp=$g4message |
---|
3056 | #. ./myread |
---|
3057 | #gans=$ans |
---|
3058 | |
---|
3059 | # case $gans in |
---|
3060 | |
---|
3061 | # 1) |
---|
3062 | ## dflt="" |
---|
3063 | ## fn='d~' |
---|
3064 | # rp="Where is CLHEP installed?" |
---|
3065 | ## . ./getfile |
---|
3066 | ## g4clhep_base_dir=$ans |
---|
3067 | |
---|
3068 | ##### g4clhep_include_dir=$ans/include |
---|
3069 | ##### g4clhep_lib_dir=$ans/lib |
---|
3070 | # ;; |
---|
3071 | # 2) |
---|
3072 | # dflt=$g4clhep_include_dir |
---|
3073 | # fn='d~' |
---|
3074 | # rp="Where is CLHEP include directory?" |
---|
3075 | # . ./getfile |
---|
3076 | # g4clhep_include_dir=$ans |
---|
3077 | # ;; |
---|
3078 | # 3) |
---|
3079 | # dflt=$g4clhep_lib_dir |
---|
3080 | # fn='d~' |
---|
3081 | # rp="Where is CLHEP lib directory?" |
---|
3082 | # . ./getfile |
---|
3083 | # g4clhep_lib_dir=$ans |
---|
3084 | # ;; |
---|
3085 | # 4) |
---|
3086 | # dflt=$g4clhep_lib |
---|
3087 | # rp="What is CLHEP lib title?" |
---|
3088 | # . ./myread |
---|
3089 | # g4clhep_lib=$ans |
---|
3090 | # ;; |
---|
3091 | ## [eE]) |
---|
3092 | ## break |
---|
3093 | ## ;; |
---|
3094 | # *) |
---|
3095 | # echo " " |
---|
3096 | # break |
---|
3097 | # ;; |
---|
3098 | # esac |
---|
3099 | #done |
---|
3100 | |
---|
3101 | case "$g4clhep_include_dir" in |
---|
3102 | '') |
---|
3103 | g4clhep_include_dir=$g4clhep_base_dir/include |
---|
3104 | ;; |
---|
3105 | esac |
---|
3106 | |
---|
3107 | case "$g4clhep_lib_dir" in |
---|
3108 | '') |
---|
3109 | g4clhep_lib_dir=$g4clhep_base_dir/lib |
---|
3110 | ;; |
---|
3111 | esac |
---|
3112 | |
---|
3113 | case "$g4clhep_lib" in |
---|
3114 | '') |
---|
3115 | if test "X$g4system" = "XWIN32-VC" -o "X$g4system" = "XWIN32-VC7"; then |
---|
3116 | g4clhep_lib="CLHEP.lib" |
---|
3117 | else |
---|
3118 | g4clhep_lib=CLHEP |
---|
3119 | fi |
---|
3120 | ;; |
---|
3121 | esac |
---|
3122 | |
---|
3123 | while test 1 = 1 ; do |
---|
3124 | |
---|
3125 | g4message_1=`cat << You |
---|
3126 | |
---|
3127 | You can customize paths and library name of you CLHEP installation: |
---|
3128 | |
---|
3129 | 1) CLHEP_INCLUDE_DIR: $g4clhep_include_dir |
---|
3130 | 2) CLHEP_LIB_DIR: $g4clhep_lib_dir |
---|
3131 | 3) CLHEP_LIB: $g4clhep_lib |
---|
3132 | |
---|
3133 | You` |
---|
3134 | |
---|
3135 | g4message_2=" need to use full library name with its extension (e.g. libCLHEP.lib)." |
---|
3136 | |
---|
3137 | g4message_3=`cat << EOM |
---|
3138 | |
---|
3139 | To modify default settings, select number above (e.g. 2) |
---|
3140 | EOM` |
---|
3141 | |
---|
3142 | |
---|
3143 | if test "X$g4system" != "XWIN32-VC" -a "X$g4system" != "XWIN32-VC7"; then |
---|
3144 | rp=$g4message_1$g4message_3 |
---|
3145 | else |
---|
3146 | rp=$g4message_1$g4message_2$g4message_3 |
---|
3147 | fi |
---|
3148 | |
---|
3149 | dflt="Press [Enter] for default settings" |
---|
3150 | #fn='d~' |
---|
3151 | . ./myread |
---|
3152 | gans=$ans |
---|
3153 | |
---|
3154 | case $gans in |
---|
3155 | |
---|
3156 | 1) |
---|
3157 | dflt=$g4clhep_include_dir |
---|
3158 | fn='d~' |
---|
3159 | rp="Where is CLHEP include directory?" |
---|
3160 | . ./getfile |
---|
3161 | g4clhep_include_dir=$ans |
---|
3162 | ;; |
---|
3163 | 2) |
---|
3164 | dflt=$g4clhep_lib_dir |
---|
3165 | fn='d~' |
---|
3166 | rp="Where is CLHEP lib directory?" |
---|
3167 | . ./getfile |
---|
3168 | g4clhep_lib_dir=$ans |
---|
3169 | ;; |
---|
3170 | 3) |
---|
3171 | dflt=$g4clhep_lib |
---|
3172 | rp="What is CLHEP lib title?" |
---|
3173 | . ./myread |
---|
3174 | g4clhep_lib=$ans |
---|
3175 | ;; |
---|
3176 | # [eE]) |
---|
3177 | ## break |
---|
3178 | ## ;; |
---|
3179 | *) |
---|
3180 | # echo " " |
---|
3181 | break |
---|
3182 | ;; |
---|
3183 | esac |
---|
3184 | done |
---|
3185 | |
---|
3186 | #if test "X$g4clhep_base_dir" = "X/usr" -o "X$g4clhep_base_dir" = "X/usr/local"; then |
---|
3187 | #g4clhep_base_dir="" |
---|
3188 | #fi |
---|
3189 | # |
---|
3190 | #if test "X$g4clhep_include_dir" = "X/usr/include" -o "X$g4clhep_include_dir" = "X/usr/local/include"; then |
---|
3191 | #g4clhep_include_dir="" |
---|
3192 | #fi |
---|
3193 | # |
---|
3194 | #if test "X$g4clhep_lib_dir" = "X/usr/lib" -o "X$g4clhep_lib_dir" = "X/usr/local/lib"; then |
---|
3195 | #g4clhep_lib_dir="" |
---|
3196 | #fi |
---|
3197 | |
---|
3198 | echo " " |
---|
3199 | |
---|
3200 | case "$g4lib_build_shared" in |
---|
3201 | '') |
---|
3202 | g4lib_build_shared=n |
---|
3203 | ;; |
---|
3204 | esac |
---|
3205 | |
---|
3206 | echo " " |
---|
3207 | |
---|
3208 | case "$g4lib_build_static" in |
---|
3209 | '') |
---|
3210 | g4lib_build_static=n |
---|
3211 | ;; |
---|
3212 | esac |
---|
3213 | |
---|
3214 | echo " " |
---|
3215 | |
---|
3216 | case "$g4lib_use_shared" in |
---|
3217 | '') |
---|
3218 | g4lib_use_shared=n |
---|
3219 | ;; |
---|
3220 | esac |
---|
3221 | |
---|
3222 | echo " " |
---|
3223 | |
---|
3224 | case "$g4lib_use_static" in |
---|
3225 | '') |
---|
3226 | g4lib_use_static=n |
---|
3227 | ;; |
---|
3228 | esac |
---|
3229 | |
---|
3230 | case "$g4lib_build_dll" in |
---|
3231 | '') |
---|
3232 | g4lib_build_dll=n |
---|
3233 | ;; |
---|
3234 | esac |
---|
3235 | |
---|
3236 | case "$g4lib_build_dyn" in |
---|
3237 | '') |
---|
3238 | g4lib_build_dyn=n |
---|
3239 | ;; |
---|
3240 | esac |
---|
3241 | |
---|
3242 | # |
---|
3243 | # Ask about building of SHARED|STATIC libraries - default STATIC. |
---|
3244 | # |
---|
3245 | echo "" |
---|
3246 | |
---|
3247 | if test "X$g4system" = "XWIN32-VC" -o "X$g4system" = "XWIN32-VC7"; then |
---|
3248 | |
---|
3249 | while test 1 = 1 ; do |
---|
3250 | |
---|
3251 | g4message=`cat << EOM |
---|
3252 | |
---|
3253 | By default 'static' libraries are built. |
---|
3254 | |
---|
3255 | Do you want to build DLL (.dll) libraries? |
---|
3256 | EOM` |
---|
3257 | |
---|
3258 | dflt=$g4lib_build_dll |
---|
3259 | rp=$g4message |
---|
3260 | . ./myread |
---|
3261 | gans=$ans |
---|
3262 | |
---|
3263 | case $gans in |
---|
3264 | |
---|
3265 | n*|N*) |
---|
3266 | g4lib_build_dll=n |
---|
3267 | g4lib_build_shared=n |
---|
3268 | g4lib_build_static=y |
---|
3269 | break |
---|
3270 | ;; |
---|
3271 | y*|Y*) |
---|
3272 | g4lib_build_dll=y |
---|
3273 | g4lib_build_shared=n |
---|
3274 | g4lib_build_static=n |
---|
3275 | |
---|
3276 | # g4lib_build_static="" |
---|
3277 | # g4lib_use_shared=1 |
---|
3278 | # g4lib_use_static="" |
---|
3279 | break |
---|
3280 | ;; |
---|
3281 | # [eE]) |
---|
3282 | # break |
---|
3283 | # ;; |
---|
3284 | # *) |
---|
3285 | # echo " " |
---|
3286 | # break |
---|
3287 | # ;; |
---|
3288 | esac |
---|
3289 | done |
---|
3290 | |
---|
3291 | fi |
---|
3292 | |
---|
3293 | if test "X$g4system" != "XWIN32-VC" -a "X$g4system" != "XWIN32-VC7" ; then |
---|
3294 | |
---|
3295 | while test 1 = 1 ; do |
---|
3296 | |
---|
3297 | g4message=`cat << EOM |
---|
3298 | |
---|
3299 | By default 'static' (.a) libraries are built. |
---|
3300 | |
---|
3301 | Do you want to build 'shared' (.so) libraries? |
---|
3302 | EOM` |
---|
3303 | |
---|
3304 | dflt=$g4lib_build_shared |
---|
3305 | rp=$g4message |
---|
3306 | . ./myread |
---|
3307 | gans=$ans |
---|
3308 | |
---|
3309 | case $gans in |
---|
3310 | |
---|
3311 | n*|N*) |
---|
3312 | g4lib_build_shared=n |
---|
3313 | g4lib_build_static=y |
---|
3314 | break |
---|
3315 | ;; |
---|
3316 | y*|Y*) |
---|
3317 | g4lib_build_shared=y |
---|
3318 | # g4lib_build_static="" |
---|
3319 | # g4lib_use_shared=1 |
---|
3320 | # g4lib_use_static="" |
---|
3321 | break |
---|
3322 | ;; |
---|
3323 | # [eE]) |
---|
3324 | # break |
---|
3325 | # ;; |
---|
3326 | # *) |
---|
3327 | # echo " " |
---|
3328 | # break |
---|
3329 | # ;; |
---|
3330 | esac |
---|
3331 | done |
---|
3332 | |
---|
3333 | if [ X$g4lib_build_shared = Xy ] ; then |
---|
3334 | # |
---|
3335 | # Ask about g4lib_build_static - default "n". |
---|
3336 | # |
---|
3337 | echo "" |
---|
3338 | |
---|
3339 | while test 1 = 1 ; do |
---|
3340 | |
---|
3341 | g4message=`cat << EOM |
---|
3342 | |
---|
3343 | You selected to build 'shared' (.so) libraries. |
---|
3344 | Do you want to build 'static' (.a) libraries too? |
---|
3345 | EOM` |
---|
3346 | |
---|
3347 | #dflt=$g4lib_build_static |
---|
3348 | dflt=n |
---|
3349 | rp=$g4message |
---|
3350 | . ./myread |
---|
3351 | gans=$ans |
---|
3352 | |
---|
3353 | case $gans in |
---|
3354 | |
---|
3355 | n*|N*) |
---|
3356 | g4lib_build_static=n |
---|
3357 | break |
---|
3358 | ;; |
---|
3359 | y*|Y*) |
---|
3360 | # g4lib_build_shared=1 |
---|
3361 | g4lib_build_static=y |
---|
3362 | # g4lib_use_shared=1 |
---|
3363 | # g4lib_use_static="" |
---|
3364 | break |
---|
3365 | ;; |
---|
3366 | # [eE]) |
---|
3367 | # break |
---|
3368 | # ;; |
---|
3369 | # *) |
---|
3370 | # echo " " |
---|
3371 | # break |
---|
3372 | # ;; |
---|
3373 | esac |
---|
3374 | done |
---|
3375 | |
---|
3376 | ## Comment out in waiting G4LIB_USE_STATIC and G4LIB_USE_SHARED. |
---|
3377 | # |
---|
3378 | #if [ X$g4lib_build_static = Xy ] ; then |
---|
3379 | ## |
---|
3380 | ## Ask about g4lib_use_static - default "n". |
---|
3381 | ## |
---|
3382 | #echo "" |
---|
3383 | # |
---|
3384 | #while test 1 = 1 ; do |
---|
3385 | # |
---|
3386 | #g4message=`cat << EOM |
---|
3387 | # |
---|
3388 | #You selected to build 'shared' (.so) and 'static' (.a) libraries. |
---|
3389 | #Do you want to use 'static' (.a) libraries? |
---|
3390 | #EOM` |
---|
3391 | # |
---|
3392 | #dflt=$g4lib_use_static |
---|
3393 | #rp=$g4message |
---|
3394 | #. ./myread |
---|
3395 | #gans=$ans |
---|
3396 | # |
---|
3397 | # case $gans in |
---|
3398 | # |
---|
3399 | # n*|N*) |
---|
3400 | # break |
---|
3401 | # ;; |
---|
3402 | # y*|Y*) |
---|
3403 | ## g4lib_build_shared=1 |
---|
3404 | ## g4lib_build_static=1 |
---|
3405 | ## g4lib_use_shared=1 |
---|
3406 | # g4lib_use_static=y |
---|
3407 | # break |
---|
3408 | # ;; |
---|
3409 | ## [eE]) |
---|
3410 | ## break |
---|
3411 | ## ;; |
---|
3412 | ## *) |
---|
3413 | ## echo " " |
---|
3414 | ## break |
---|
3415 | ## ;; |
---|
3416 | # esac |
---|
3417 | #done |
---|
3418 | #fi |
---|
3419 | |
---|
3420 | fi |
---|
3421 | |
---|
3422 | fi # if !Win |
---|
3423 | |
---|
3424 | echo " " |
---|
3425 | case "$g4global" in |
---|
3426 | '') |
---|
3427 | g4global=n |
---|
3428 | ;; |
---|
3429 | esac |
---|
3430 | |
---|
3431 | echo " " |
---|
3432 | # By default it's 'grabular'! |
---|
3433 | case "$g4granular" in |
---|
3434 | '') |
---|
3435 | g4granular=y |
---|
3436 | ;; |
---|
3437 | esac |
---|
3438 | |
---|
3439 | echo " " |
---|
3440 | # Will be set (if needed) in GNUmakefile! |
---|
3441 | case "$g4lib_use_granular" in |
---|
3442 | '') |
---|
3443 | g4lib_use_granular=y |
---|
3444 | ;; |
---|
3445 | esac |
---|
3446 | |
---|
3447 | if test \( \( "X$g4system" = "XWIN32-VC" -o "X$g4system" = "XWIN32-VC7" \) -a "X$g4lib_build_dll" = "Xy" \) -o \( "X$g4system" = "XDarwin-g++" -a "X$g4lib_build_dyn" = "Xy" \) ; then |
---|
3448 | |
---|
3449 | g4global=n |
---|
3450 | g4granular=n |
---|
3451 | g4lib_use_granular=n |
---|
3452 | |
---|
3453 | fi |
---|
3454 | |
---|
3455 | if test \( "X$g4system" != "XWIN32-VC" -a "X$g4system" != "XWIN32-VC7" -a "X$g4system" != "XDarwin-g++" \) -o \( \( "X$g4system" = "XWIN32-VC" -o "X$g4system" = "XWIN32-VC7" \) -a "X$g4lib_build_dll" = "Xn" \) -o \( "X$g4system" = "XDarwin-g++" -a "X$g4lib_build_dyn" = "Xn" \) ; then |
---|
3456 | |
---|
3457 | # |
---|
3458 | # Ask about g4global - default "(empty)". |
---|
3459 | # |
---|
3460 | echo "" |
---|
3461 | |
---|
3462 | while test 1 = 1 ; do |
---|
3463 | |
---|
3464 | g4message=`cat << EOM |
---|
3465 | |
---|
3466 | Do you want to build 'global' compound libraries? |
---|
3467 | EOM` |
---|
3468 | |
---|
3469 | dflt=$g4global |
---|
3470 | rp=$g4message |
---|
3471 | . ./myread |
---|
3472 | gans=$ans |
---|
3473 | |
---|
3474 | case $gans in |
---|
3475 | |
---|
3476 | n*|N*) |
---|
3477 | g4global=n |
---|
3478 | g4granular=y |
---|
3479 | g4lib_use_granular=y |
---|
3480 | break |
---|
3481 | ;; |
---|
3482 | y*|Y*) |
---|
3483 | g4global=y |
---|
3484 | # Shoud be comment out to keep settings from config.sh - not now to keep as in release |
---|
3485 | g4granular=n |
---|
3486 | # Shoud be comment out to keep settings from config.sh - not now to keep as in release |
---|
3487 | g4lib_use_granular=n |
---|
3488 | break |
---|
3489 | ;; |
---|
3490 | # [eE]) |
---|
3491 | # break |
---|
3492 | # ;; |
---|
3493 | # *) |
---|
3494 | # echo " " |
---|
3495 | # break |
---|
3496 | # ;; |
---|
3497 | esac |
---|
3498 | done |
---|
3499 | |
---|
3500 | if [ X$g4global = Xy ] ; then |
---|
3501 | # |
---|
3502 | # Ask about g4granular - default "n". |
---|
3503 | # |
---|
3504 | echo "" |
---|
3505 | |
---|
3506 | while test 1 = 1 ; do |
---|
3507 | |
---|
3508 | g4message=`cat << EOM |
---|
3509 | |
---|
3510 | Granular libraries are used by defaults, you asked to build global |
---|
3511 | compound libraries. Do you want to build 'granular' libraries too? |
---|
3512 | EOM` |
---|
3513 | |
---|
3514 | dflt=$g4granular |
---|
3515 | rp=$g4message |
---|
3516 | . ./myread |
---|
3517 | gans=$ans |
---|
3518 | |
---|
3519 | case $gans in |
---|
3520 | |
---|
3521 | n*|N*) |
---|
3522 | g4granular=n |
---|
3523 | break |
---|
3524 | ;; |
---|
3525 | y*|Y*) |
---|
3526 | g4granular=y |
---|
3527 | break |
---|
3528 | ;; |
---|
3529 | # [eE]) |
---|
3530 | # break |
---|
3531 | # ;; |
---|
3532 | # *) |
---|
3533 | # echo " " |
---|
3534 | # break |
---|
3535 | # ;; |
---|
3536 | esac |
---|
3537 | done |
---|
3538 | |
---|
3539 | if [ X$g4granular = Xy ] ; then |
---|
3540 | # |
---|
3541 | # Ask about g4lib_use_granular - default "n". |
---|
3542 | # |
---|
3543 | echo "" |
---|
3544 | |
---|
3545 | while test 1 = 1 ; do |
---|
3546 | |
---|
3547 | g4message=`cat << EOM |
---|
3548 | |
---|
3549 | Global libraries are used by defaults, you asked to build global |
---|
3550 | compound libraries and granular libraries. |
---|
3551 | Do you want to use 'granular' libraries instead? |
---|
3552 | EOM` |
---|
3553 | |
---|
3554 | dflt=$g4lib_use_granular |
---|
3555 | rp=$g4message |
---|
3556 | . ./myread |
---|
3557 | gans=$ans |
---|
3558 | |
---|
3559 | case $gans in |
---|
3560 | |
---|
3561 | n*|N*) |
---|
3562 | g4lib_use_granular=n |
---|
3563 | break |
---|
3564 | ;; |
---|
3565 | y*|Y*) |
---|
3566 | g4lib_use_granular=y |
---|
3567 | break |
---|
3568 | ;; |
---|
3569 | # [eE]) |
---|
3570 | # break |
---|
3571 | # ;; |
---|
3572 | # *) |
---|
3573 | # echo " " |
---|
3574 | # break |
---|
3575 | # ;; |
---|
3576 | esac |
---|
3577 | done |
---|
3578 | fi |
---|
3579 | fi |
---|
3580 | |
---|
3581 | fi # !Win |
---|
3582 | |
---|
3583 | ### End file - without will be problem! Check in others... |
---|
3584 | |
---|
3585 | |
---|
3586 | echo " " |
---|
3587 | case "$g4debug" in |
---|
3588 | '') |
---|
3589 | g4debug=n |
---|
3590 | ;; |
---|
3591 | esac |
---|
3592 | |
---|
3593 | # |
---|
3594 | # Ask about g4debug - default "(empty)". |
---|
3595 | # |
---|
3596 | echo "" |
---|
3597 | |
---|
3598 | while test 1 = 1 ; do |
---|
3599 | |
---|
3600 | g4message=`cat << EOM |
---|
3601 | |
---|
3602 | Do you want to compile libraries in DEBUG mode (-g)? |
---|
3603 | EOM` |
---|
3604 | |
---|
3605 | dflt=$g4debug |
---|
3606 | rp=$g4message |
---|
3607 | . ./myread |
---|
3608 | gans=$ans |
---|
3609 | |
---|
3610 | case $gans in |
---|
3611 | |
---|
3612 | n*|N*) |
---|
3613 | break |
---|
3614 | ;; |
---|
3615 | y*|Y*) |
---|
3616 | g4debug=y |
---|
3617 | break |
---|
3618 | ;; |
---|
3619 | # [eE]) |
---|
3620 | # break |
---|
3621 | # ;; |
---|
3622 | # *) |
---|
3623 | # echo " " |
---|
3624 | # break |
---|
3625 | # ;; |
---|
3626 | esac |
---|
3627 | done |
---|
3628 | |
---|
3629 | |
---|
3630 | echo " " |
---|
3631 | |
---|
3632 | case "$g4ui_none" in |
---|
3633 | '') |
---|
3634 | g4ui_none=n |
---|
3635 | ;; |
---|
3636 | esac |
---|
3637 | |
---|
3638 | # Set by default! |
---|
3639 | case "$g4ui_build_terminal_session" in |
---|
3640 | '') |
---|
3641 | g4ui_build_terminal_session=y |
---|
3642 | ;; |
---|
3643 | esac |
---|
3644 | |
---|
3645 | # Set by default! |
---|
3646 | case "$g4ui_use_terminal" in |
---|
3647 | '') |
---|
3648 | g4ui_use_terminal=y |
---|
3649 | ;; |
---|
3650 | esac |
---|
3651 | |
---|
3652 | # Set by default! |
---|
3653 | case "$g4ui_build_gag_session" in |
---|
3654 | '') |
---|
3655 | g4ui_build_gag_session=y |
---|
3656 | ;; |
---|
3657 | esac |
---|
3658 | |
---|
3659 | # Set by default! |
---|
3660 | case "$g4ui_use_gag" in |
---|
3661 | '') |
---|
3662 | g4ui_use_gag=y |
---|
3663 | ;; |
---|
3664 | esac |
---|
3665 | |
---|
3666 | case "$g4ui_build_xm_session" in |
---|
3667 | '') |
---|
3668 | g4ui_build_xm_session=n |
---|
3669 | ;; |
---|
3670 | esac |
---|
3671 | |
---|
3672 | case "$g4ui_use_xm" in |
---|
3673 | '') |
---|
3674 | g4ui_use_xm=n |
---|
3675 | ;; |
---|
3676 | esac |
---|
3677 | |
---|
3678 | case "$g4ui_build_xaw_session" in |
---|
3679 | '') |
---|
3680 | g4ui_build_xaw_session=n |
---|
3681 | ;; |
---|
3682 | esac |
---|
3683 | |
---|
3684 | case "$g4ui_use_xaw" in |
---|
3685 | '') |
---|
3686 | g4ui_use_xaw=n |
---|
3687 | ;; |
---|
3688 | esac |
---|
3689 | |
---|
3690 | case "$g4ui_build_win32_session" in |
---|
3691 | '') |
---|
3692 | g4ui_build_win32_session=n |
---|
3693 | ;; |
---|
3694 | esac |
---|
3695 | |
---|
3696 | case "$g4ui_use_win32" in |
---|
3697 | '') |
---|
3698 | g4ui_use_win32=n |
---|
3699 | ;; |
---|
3700 | esac |
---|
3701 | |
---|
3702 | # Set by default! |
---|
3703 | case "$g4ui_use_tcsh" in |
---|
3704 | '') |
---|
3705 | g4ui_use_tcsh=y |
---|
3706 | ;; |
---|
3707 | esac |
---|
3708 | |
---|
3709 | |
---|
3710 | |
---|
3711 | |
---|
3712 | echo "" |
---|
3713 | |
---|
3714 | g4message=`cat << EOM |
---|
3715 | |
---|
3716 | G4UI_NONE |
---|
3717 | |
---|
3718 | If this variable is set, no UI sessions nor any UI libraries are built. |
---|
3719 | This can be useful when running a pure batch job or in a user framework |
---|
3720 | having its own UI system. |
---|
3721 | Do you want to set this variable ? |
---|
3722 | |
---|
3723 | EOM` |
---|
3724 | |
---|
3725 | dflt=$g4ui_none |
---|
3726 | rp=$g4message |
---|
3727 | . ./myread |
---|
3728 | gans=$ans |
---|
3729 | |
---|
3730 | case $gans in |
---|
3731 | |
---|
3732 | n*|N*) |
---|
3733 | g4ui_none=n |
---|
3734 | ;; |
---|
3735 | y*|Y*) |
---|
3736 | g4ui_none=y |
---|
3737 | ;; |
---|
3738 | esac |
---|
3739 | |
---|
3740 | case $g4ui_none in |
---|
3741 | |
---|
3742 | n) |
---|
3743 | |
---|
3744 | g4message=`cat << EOM |
---|
3745 | |
---|
3746 | G4UI_BUILD_TERMINAL_SESSION |
---|
3747 | Specifies to include in kernel library a basic dumb terminal |
---|
3748 | user interface (default). |
---|
3749 | |
---|
3750 | G4UI_USE_TERMINAL |
---|
3751 | Specifies to use dumb terminal interface in the application to be |
---|
3752 | built (default). |
---|
3753 | EOM` |
---|
3754 | |
---|
3755 | dflt=$g4ui_use_terminal |
---|
3756 | rp=$g4message |
---|
3757 | #. ./myread |
---|
3758 | #gans=$ans |
---|
3759 | gans=y |
---|
3760 | |
---|
3761 | case $gans in |
---|
3762 | |
---|
3763 | n*|N*) |
---|
3764 | g4ui_build_terminal_session=n |
---|
3765 | g4ui_use_terminal=n |
---|
3766 | ;; |
---|
3767 | y*|Y*) |
---|
3768 | g4ui_build_terminal_session=y |
---|
3769 | g4ui_use_terminal=y |
---|
3770 | ;; |
---|
3771 | esac |
---|
3772 | |
---|
3773 | g4message=`cat << EOM |
---|
3774 | |
---|
3775 | G4UI_BUILD_GAG_SESSION |
---|
3776 | Specifies to include in kernel library the GAG based |
---|
3777 | user interface. |
---|
3778 | |
---|
3779 | G4UI_USE_GAG |
---|
3780 | Specifies to use the GAG interface in the application to be |
---|
3781 | built. |
---|
3782 | EOM` |
---|
3783 | |
---|
3784 | dflt=$g4ui_use_gag |
---|
3785 | rp=$g4message |
---|
3786 | #. ./myread |
---|
3787 | #gans=$ans |
---|
3788 | gans=y |
---|
3789 | |
---|
3790 | case $gans in |
---|
3791 | |
---|
3792 | n*|N*) |
---|
3793 | g4ui_build_gag_session=n |
---|
3794 | g4ui_use_gag=n |
---|
3795 | ;; |
---|
3796 | y*|Y*) |
---|
3797 | g4ui_build_gag_session=y |
---|
3798 | g4ui_use_gag=y |
---|
3799 | ;; |
---|
3800 | esac |
---|
3801 | |
---|
3802 | if test "X$g4system" != "XWIN32-VC" -a "X$g4system" != "XWIN32-VC7"; then |
---|
3803 | |
---|
3804 | g4message=`cat << EOM |
---|
3805 | |
---|
3806 | G4UI_BUILD_XAW_SESSION |
---|
3807 | G4UI_USE_XAW |
---|
3808 | |
---|
3809 | Specifies to include and use the XAW interfaces in the |
---|
3810 | application to be built. |
---|
3811 | The XAW (X11 Athena Widget set) extensions are required to activate |
---|
3812 | and build this driver. |
---|
3813 | EOM` |
---|
3814 | |
---|
3815 | dflt=$g4ui_use_xaw |
---|
3816 | rp=$g4message |
---|
3817 | . ./myread |
---|
3818 | gans=$ans |
---|
3819 | |
---|
3820 | case $gans in |
---|
3821 | |
---|
3822 | n*|N*) |
---|
3823 | g4ui_build_xaw_session=n |
---|
3824 | g4ui_use_xaw=n |
---|
3825 | ;; |
---|
3826 | y*|Y*) |
---|
3827 | g4ui_build_xaw_session=y |
---|
3828 | g4ui_use_xaw=y |
---|
3829 | ;; |
---|
3830 | esac |
---|
3831 | |
---|
3832 | ############################################################ |
---|
3833 | ############################################################ |
---|
3834 | |
---|
3835 | if test "X$g4ui_build_xaw_session" = "Xy" ; then |
---|
3836 | |
---|
3837 | if test "X$g4ui_xawhome" = "X" ; then |
---|
3838 | xaw_dirs=`find $g4ui_xawhome /usr/X11R6/include /usr/local/include /usr/include /sw/include -type d -name Xaw 2>/dev/null |xargs echo` |
---|
3839 | #echo ogl_dirs=$ogl_dirs |
---|
3840 | |
---|
3841 | if test "X$xaw_dirs" != "X" ; then |
---|
3842 | |
---|
3843 | g4xaw_base_dir_found=`echo $xaw_dirs|cut -d" " -f1` |
---|
3844 | #echo g4ogl_base_dir_found=$g4ogl_base_dir_found |
---|
3845 | |
---|
3846 | # That's right: should be 3 times! (e.g./usr/local/lib/libGLU.so -> /usr/local) |
---|
3847 | g4xaw_base_dir_found=`dirname $g4xaw_base_dir_found` |
---|
3848 | g4xaw_base_dir_found=`dirname $g4xaw_base_dir_found` |
---|
3849 | g4xaw_base_dir_found=`dirname $g4xaw_base_dir_found` |
---|
3850 | |
---|
3851 | g4ui_xawhome=$g4xaw_base_dir_found |
---|
3852 | #else |
---|
3853 | #case "$g4ui_xawhome" in |
---|
3854 | #'') |
---|
3855 | # g4ui_xawhome=/usr/X11R6/ |
---|
3856 | # ;; |
---|
3857 | #esac |
---|
3858 | fi |
---|
3859 | fi |
---|
3860 | |
---|
3861 | ########################################################################## |
---|
3862 | |
---|
3863 | #if test "X$g4ui_xawhome" != "X" ; then |
---|
3864 | #xaw_dirs=$g4ui_xawhome |
---|
3865 | #fi |
---|
3866 | |
---|
3867 | if test "X$g4ui_xawhome" != "X" ; then |
---|
3868 | |
---|
3869 | g4message=`cat << EOM |
---|
3870 | |
---|
3871 | You have selected to use the XAW based user interfaces. |
---|
3872 | Specify the correct path where XAW is installed in your system. |
---|
3873 | It was found in $g4ui_xawhome. Press [Enter] to set this path or type the correct one. |
---|
3874 | |
---|
3875 | You can set '-' (without quotation) to CANCEL the XAW flag at all: |
---|
3876 | |
---|
3877 | EOM` |
---|
3878 | |
---|
3879 | dflt=$g4ui_xawhome |
---|
3880 | fn='d~(-)' |
---|
3881 | rp=$g4message |
---|
3882 | . ./getfile |
---|
3883 | |
---|
3884 | cend="no" |
---|
3885 | while test "$cend" = "no" ; do |
---|
3886 | if test -e "$ans/include/X11/Xaw" || [ "X$ans" = "X-" ]; then |
---|
3887 | cend="yes" |
---|
3888 | if test "X$ans" != "X-" ; then |
---|
3889 | |
---|
3890 | g4ui_xawhome=$ans |
---|
3891 | |
---|
3892 | else |
---|
3893 | |
---|
3894 | g4ui_build_xaw_session=n |
---|
3895 | g4ui_use_xaw=n |
---|
3896 | |
---|
3897 | fi |
---|
3898 | else |
---|
3899 | |
---|
3900 | g4message=`cat << EOM |
---|
3901 | |
---|
3902 | You have selected to use XAW based user interfaces. |
---|
3903 | But XAW was not found in $ans. |
---|
3904 | Please specify the correct path where XAW is installed in your system. |
---|
3905 | |
---|
3906 | You can set '-' (without quotation) to CANCEL the XAW flag at all: |
---|
3907 | |
---|
3908 | EOM` |
---|
3909 | |
---|
3910 | dflt="" |
---|
3911 | fn='d~(-)' |
---|
3912 | rp=$g4message |
---|
3913 | . ./getfile |
---|
3914 | fi |
---|
3915 | done |
---|
3916 | |
---|
3917 | else |
---|
3918 | |
---|
3919 | g4message=`cat << EOM |
---|
3920 | |
---|
3921 | You have selected to use XAW based user interfaces. |
---|
3922 | But XAW was not found in expected place. |
---|
3923 | Please specify the correct path where XAW is installed in your system. |
---|
3924 | |
---|
3925 | You can set '-' (without quotation) to CANCEL the XAW flag at all: |
---|
3926 | |
---|
3927 | EOM` |
---|
3928 | |
---|
3929 | dflt="" |
---|
3930 | fn='d~(-)' |
---|
3931 | rp=$g4message |
---|
3932 | . ./getfile |
---|
3933 | |
---|
3934 | cend="no" |
---|
3935 | while test "$cend" = "no" ; do |
---|
3936 | if test -e "$ans/include/X11/Xaw" || [ "X$ans" = "X-" ]; then |
---|
3937 | cend="yes" |
---|
3938 | if test "X$ans" != "X-" ; then |
---|
3939 | |
---|
3940 | g4ui_xawhome=$ans |
---|
3941 | |
---|
3942 | else |
---|
3943 | |
---|
3944 | g4ui_build_xaw_session=n |
---|
3945 | g4ui_use_xaw=n |
---|
3946 | |
---|
3947 | fi |
---|
3948 | else |
---|
3949 | |
---|
3950 | g4message=`cat << EOM |
---|
3951 | |
---|
3952 | You have selected to use XAW based user interfaces. |
---|
3953 | But XAW was not found in $ans. |
---|
3954 | Please specify the correct path where XAW is installed in your system. |
---|
3955 | |
---|
3956 | You can set '-' (without quotation) to CANCEL the XAW flag at all: |
---|
3957 | |
---|
3958 | EOM` |
---|
3959 | |
---|
3960 | dflt="" |
---|
3961 | fn='d~(-)' |
---|
3962 | rp=$g4message |
---|
3963 | . ./getfile |
---|
3964 | fi |
---|
3965 | done |
---|
3966 | fi |
---|
3967 | |
---|
3968 | if test "X$g4osname" = "XLinux"; then |
---|
3969 | |
---|
3970 | if test "X$g4ui_xawhome" = "X/usr" -o "X$g4ui_xawhome" = "X/usr/local" ; then |
---|
3971 | g4ui_xawhome="" |
---|
3972 | fi |
---|
3973 | fi |
---|
3974 | fi # g4vis_build_opheglxm_driver |
---|
3975 | |
---|
3976 | ############################################### |
---|
3977 | # Set XMFLAGS and XMLIBS |
---|
3978 | # |
---|
3979 | |
---|
3980 | if test "X$g4ui_build_xaw_session" = "Xy" ; then |
---|
3981 | |
---|
3982 | if test "X$g4osname" = "XAIX" ; then |
---|
3983 | g4ui_xawflags=" -I$g4ui_xawhome/include " |
---|
3984 | g4ui_xawlibs=" -L$g4ui_xawhome/lib -lXaw -lXmu -lXt -lX11 -lXext " |
---|
3985 | fi |
---|
3986 | |
---|
3987 | if test "X$g4osname" = "XLinux" ; then |
---|
3988 | g4ui_xawflags=" -I$g4ui_xawhome/include " |
---|
3989 | if test "X$g4ui_xawhome" = "X/usr/X11R6" ; then |
---|
3990 | g4ui_xawlibs=" -lXaw " |
---|
3991 | else |
---|
3992 | g4ui_xawlibs=" -L$g4ui_xawhome/lib -lXaw " |
---|
3993 | fi |
---|
3994 | fi |
---|
3995 | |
---|
3996 | if test "X$g4osname" = "XDarwin" ; then |
---|
3997 | g4ui_xawflags=" -I$g4ui_xawhome/include " |
---|
3998 | g4ui_xawlibs=" -L$g4ui_xawhome/lib -lXaw " |
---|
3999 | fi |
---|
4000 | |
---|
4001 | if test "X$g4osname" = "XDEC" ; then |
---|
4002 | g4ui_xawflags=" -I$g4ui_xawhome/include " |
---|
4003 | g4ui_xawlibs=" -L$g4ui_xawhome/lib -lXaw " |
---|
4004 | fi |
---|
4005 | |
---|
4006 | if test "X$g4osname" = "XHP" ; then |
---|
4007 | g4ui_xawflags=" -I$g4ui_xawhome/include " |
---|
4008 | g4ui_xawlibs=" -L$g4ui_xawhome/lib -lXaw " |
---|
4009 | fi |
---|
4010 | |
---|
4011 | if test "X$g4osname" = "XSGI" ; then |
---|
4012 | g4ui_xawflags=" -I$g4ui_xawhome/include " |
---|
4013 | g4ui_xawlibs=" -L$g4ui_xawhome/lib -lXaw " |
---|
4014 | fi |
---|
4015 | |
---|
4016 | if test "X$g4osname" = "XSUN" ; then |
---|
4017 | g4ui_xawflags=" -I$g4ui_xawhome/include " |
---|
4018 | g4ui_xawlibs=" -L$g4ui_xawhome/lib -L/usr/openwin/lib -L/usr/dt/lib -L/usr/ucblib -R/usr/openwin/lib -lXaw -lXmu -lXt -lX11 -lXext " |
---|
4019 | fi |
---|
4020 | |
---|
4021 | fi # end of XM build |
---|
4022 | |
---|
4023 | ############################################### |
---|
4024 | ############################################### |
---|
4025 | |
---|
4026 | g4message=`cat << EOM |
---|
4027 | |
---|
4028 | G4UI_BUILD_XM_SESSION |
---|
4029 | G4UI_USE_XM |
---|
4030 | |
---|
4031 | Specifies to include and use the XM Motif based user interfaces. |
---|
4032 | The XM Motif extensions are required to activate and build this |
---|
4033 | driver. |
---|
4034 | |
---|
4035 | EOM` |
---|
4036 | |
---|
4037 | dflt=$g4ui_use_xm |
---|
4038 | rp=$g4message |
---|
4039 | . ./myread |
---|
4040 | gans=$ans |
---|
4041 | |
---|
4042 | case $gans in |
---|
4043 | |
---|
4044 | n*|N*) |
---|
4045 | g4ui_build_xm_session=n |
---|
4046 | g4ui_use_xm=n |
---|
4047 | ;; |
---|
4048 | y*|Y*) |
---|
4049 | g4ui_build_xm_session=y |
---|
4050 | g4ui_use_xm=y |
---|
4051 | ;; |
---|
4052 | esac |
---|
4053 | |
---|
4054 | |
---|
4055 | ############################################################ |
---|
4056 | ############################################################ |
---|
4057 | |
---|
4058 | if test "X$g4ui_build_xm_session" = "Xy" ; then |
---|
4059 | |
---|
4060 | if test "X$g4vis_xmhome" = "X" ; then |
---|
4061 | xm_dirs=`find $g4vis_xmhome /usr/X11R6/include /usr/local/include /usr/include /sw/include -type d -name Xm 2>/dev/null |xargs echo` |
---|
4062 | #echo ogl_dirs=$ogl_dirs |
---|
4063 | |
---|
4064 | if test "X$xm_dirs" != "X" ; then |
---|
4065 | |
---|
4066 | g4xm_base_dir_found=`echo $xm_dirs|cut -d" " -f1` |
---|
4067 | #echo g4ogl_base_dir_found=$g4ogl_base_dir_found |
---|
4068 | |
---|
4069 | # That's right: should be twice! (e.g./usr/local/lib/libGLU.so -> /usr/local) |
---|
4070 | g4xm_base_dir_found=`dirname $g4xm_base_dir_found` |
---|
4071 | g4xm_base_dir_found=`dirname $g4xm_base_dir_found` |
---|
4072 | |
---|
4073 | g4vis_xmhome=$g4xm_base_dir_found |
---|
4074 | #else |
---|
4075 | #case "$g4vis_xmhome" in |
---|
4076 | #'') |
---|
4077 | # g4vis_xmhome=/usr/X11R6/ |
---|
4078 | # ;; |
---|
4079 | #esac |
---|
4080 | fi |
---|
4081 | fi |
---|
4082 | |
---|
4083 | ########################################################################## |
---|
4084 | |
---|
4085 | #if test "X$g4vis_xmhome" != "X" ; then |
---|
4086 | #xm_dirs=$g4vis_xmhome |
---|
4087 | #fi |
---|
4088 | |
---|
4089 | if test "X$g4vis_xmhome" != "X" ; then |
---|
4090 | |
---|
4091 | g4message=`cat << EOM |
---|
4092 | |
---|
4093 | You have selected to use the XM Motif based user interfaces. |
---|
4094 | Specify the correct path where Xm is installed in your system. |
---|
4095 | It was found in $g4vis_xmhome. Press [Enter] to set this path or type the correct one. |
---|
4096 | |
---|
4097 | You can set '-' (without quotation) to CANCEL the XM flag at all: |
---|
4098 | |
---|
4099 | EOM` |
---|
4100 | |
---|
4101 | dflt=$g4vis_xmhome |
---|
4102 | fn='d~(-)' |
---|
4103 | rp=$g4message |
---|
4104 | . ./getfile |
---|
4105 | |
---|
4106 | cend="no" |
---|
4107 | while test "$cend" = "no" ; do |
---|
4108 | if test -e "$ans/include/Xm" || [ "X$ans" = "X-" ]; then |
---|
4109 | cend="yes" |
---|
4110 | if test "X$ans" != "X-" ; then |
---|
4111 | |
---|
4112 | g4vis_xmhome=$ans |
---|
4113 | |
---|
4114 | else |
---|
4115 | |
---|
4116 | g4ui_build_xm_session=n |
---|
4117 | g4ui_use_xm=n |
---|
4118 | |
---|
4119 | fi |
---|
4120 | else |
---|
4121 | |
---|
4122 | g4message=`cat << EOM |
---|
4123 | |
---|
4124 | You have selected to use XM Motif based user interfaces. |
---|
4125 | But XM Motif was not found in $ans. |
---|
4126 | Please specify the correct path where Xm is installed in your system. |
---|
4127 | |
---|
4128 | You can set '-' (without quotation) to CANCEL the XM flag at all: |
---|
4129 | |
---|
4130 | EOM` |
---|
4131 | |
---|
4132 | dflt="" |
---|
4133 | fn='d~(-)' |
---|
4134 | rp=$g4message |
---|
4135 | . ./getfile |
---|
4136 | fi |
---|
4137 | done |
---|
4138 | |
---|
4139 | else |
---|
4140 | |
---|
4141 | g4message=`cat << EOM |
---|
4142 | |
---|
4143 | You have selected to use XM Motif based user interfaces. |
---|
4144 | But XM Motif was not found in expected place. |
---|
4145 | Please specify the correct path where Xm is installed in your system. |
---|
4146 | |
---|
4147 | You can set '-' (without quotation) to CANCEL the XM flag at all: |
---|
4148 | |
---|
4149 | EOM` |
---|
4150 | |
---|
4151 | dflt="" |
---|
4152 | fn='d~(-)' |
---|
4153 | rp=$g4message |
---|
4154 | . ./getfile |
---|
4155 | |
---|
4156 | cend="no" |
---|
4157 | while test "$cend" = "no" ; do |
---|
4158 | if test -e "$ans/include/Xm" || [ "X$ans" = "X-" ]; then |
---|
4159 | cend="yes" |
---|
4160 | if test "X$ans" != "X-" ; then |
---|
4161 | |
---|
4162 | g4vis_xmhome=$ans |
---|
4163 | |
---|
4164 | else |
---|
4165 | |
---|
4166 | g4ui_build_xm_session=n |
---|
4167 | g4ui_use_xm=n |
---|
4168 | |
---|
4169 | fi |
---|
4170 | else |
---|
4171 | |
---|
4172 | g4message=`cat << EOM |
---|
4173 | |
---|
4174 | You have selected to use XM Motif based user interfaces. |
---|
4175 | But XM Motif was not found in $ans. |
---|
4176 | Please specify the correct path where Xm is installed in your system. |
---|
4177 | |
---|
4178 | You can set '-' (without quotation) to CANCEL the XM flag at all: |
---|
4179 | |
---|
4180 | EOM` |
---|
4181 | |
---|
4182 | dflt="" |
---|
4183 | fn='d~(-)' |
---|
4184 | rp=$g4message |
---|
4185 | . ./getfile |
---|
4186 | fi |
---|
4187 | done |
---|
4188 | fi |
---|
4189 | |
---|
4190 | if test "X$g4osname" = "XLinux"; then |
---|
4191 | |
---|
4192 | if test "X$g4vis_xmhome" = "X/usr" -o "X$g4vis_xmhome" = "X/usr/local" ; then |
---|
4193 | g4vis_xmhome="" |
---|
4194 | fi |
---|
4195 | fi |
---|
4196 | fi # g4vis_build_opheglxm_driver |
---|
4197 | |
---|
4198 | ############################################### |
---|
4199 | # Set XMFLAGS and XMLIBS |
---|
4200 | # |
---|
4201 | |
---|
4202 | if test "X$g4ui_build_xm_session" = "Xy" ; then |
---|
4203 | |
---|
4204 | if test "X$g4osname" = "XAIX" ; then |
---|
4205 | g4vis_xmflags=" -I$g4vis_xmhome/include " |
---|
4206 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm -lXt -lX11 " |
---|
4207 | fi |
---|
4208 | |
---|
4209 | if test "X$g4osname" = "XLinux" ; then |
---|
4210 | g4vis_xmflags=" -I$g4vis_xmhome/include " |
---|
4211 | if test "X$g4vis_xmhome" = "X/usr/X11R6" ; then |
---|
4212 | g4vis_xmlibs=" -lXm -lXpm " |
---|
4213 | else |
---|
4214 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm -lXpm " |
---|
4215 | fi |
---|
4216 | fi |
---|
4217 | |
---|
4218 | if test "X$g4osname" = "XDarwin" ; then |
---|
4219 | g4vis_xmflags=" -I$g4vis_xmhome/include " |
---|
4220 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm -lXpm " |
---|
4221 | fi |
---|
4222 | |
---|
4223 | if test "X$g4osname" = "XDEC" ; then |
---|
4224 | g4vis_xmflags=" -I$g4vis_xmhome/include " |
---|
4225 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm " |
---|
4226 | fi |
---|
4227 | |
---|
4228 | if test "X$g4osname" = "XHP" ; then |
---|
4229 | g4vis_xmflags=" -I$g4vis_xmhome/include/Motif1.2 " |
---|
4230 | g4vis_xmlibs=" -L$g4vis_xmhome/lib/Motif1.2 -lXm " |
---|
4231 | fi |
---|
4232 | |
---|
4233 | if test "X$g4osname" = "XSGI" ; then |
---|
4234 | g4vis_xmflags=" -I$g4vis_xmhome/include " |
---|
4235 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm " |
---|
4236 | fi |
---|
4237 | |
---|
4238 | if test "X$g4osname" = "XSUN" ; then |
---|
4239 | g4vis_xmflags=" -I$g4vis_xmhome/include " |
---|
4240 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -L/usr/openwin/lib -L/usr/dt/lib -L/usr/ucblib -R/usr/openwin/lib -lXt -lXm -lX11 " |
---|
4241 | fi |
---|
4242 | |
---|
4243 | fi # end of XM build |
---|
4244 | |
---|
4245 | ############################################### |
---|
4246 | ############################################### |
---|
4247 | |
---|
4248 | fi # if !WIN |
---|
4249 | |
---|
4250 | if test "X$g4system" = "XWIN32-VC" -o "X$g4system" = "XWIN32-VC7"; then |
---|
4251 | |
---|
4252 | g4message=`cat << EOM |
---|
4253 | |
---|
4254 | G4UI_BUILD_WIN32_SESSION |
---|
4255 | G4UI_USE_WIN32 |
---|
4256 | |
---|
4257 | Specifies to include and use the terminal interface for |
---|
4258 | Windows systems. |
---|
4259 | |
---|
4260 | EOM` |
---|
4261 | |
---|
4262 | dflt=$g4ui_use_win32 |
---|
4263 | rp=$g4message |
---|
4264 | . ./myread |
---|
4265 | gans=$ans |
---|
4266 | |
---|
4267 | case $gans in |
---|
4268 | |
---|
4269 | n*|N*) |
---|
4270 | g4ui_build_win32_session=n |
---|
4271 | g4ui_use_win32=n |
---|
4272 | ;; |
---|
4273 | y*|Y*) |
---|
4274 | g4ui_build_win32_session=y |
---|
4275 | g4ui_use_win32=y |
---|
4276 | ;; |
---|
4277 | esac |
---|
4278 | |
---|
4279 | fi # if WIN |
---|
4280 | |
---|
4281 | g4message=`cat << EOM |
---|
4282 | |
---|
4283 | G4UI_USE_TCSH |
---|
4284 | Specifies to use the tcsh-style terminal in the application |
---|
4285 | to be built. |
---|
4286 | EOM` |
---|
4287 | |
---|
4288 | dflt=$g4ui_use_tcsh |
---|
4289 | rp=$g4message |
---|
4290 | #. ./myread |
---|
4291 | #gans=$ans |
---|
4292 | gans=y |
---|
4293 | |
---|
4294 | case $gans in |
---|
4295 | |
---|
4296 | n*|N*) |
---|
4297 | g4ui_use_tcsh=n |
---|
4298 | ;; |
---|
4299 | y*|Y*) |
---|
4300 | g4ui_use_tcsh=y |
---|
4301 | ;; |
---|
4302 | esac |
---|
4303 | |
---|
4304 | ;; |
---|
4305 | esac |
---|
4306 | |
---|
4307 | # |
---|
4308 | # BEGIN QT/QTUI PROBE |
---|
4309 | # |
---|
4310 | |
---|
4311 | # |
---|
4312 | # We only perform the query/probe for Linux-g++ and Darwin-g++ systems.. |
---|
4313 | # |
---|
4314 | #if test "x$g4system" = "xLinux-g++" -o "x$g4system" = "xDarwin-g++" ; then |
---|
4315 | |
---|
4316 | # Now, IF g4ui_none HAS NOT BEEN SET TO Y, proceed to the query/probe section |
---|
4317 | if test "x$g4ui_none" = "xn" ; then |
---|
4318 | |
---|
4319 | # Query the user to see if they want to build the Qt UI module |
---|
4320 | |
---|
4321 | g4message=`cat << EOM |
---|
4322 | |
---|
4323 | G4UI_BUILD_QT_SESSION |
---|
4324 | G4UI_USE_QT |
---|
4325 | |
---|
4326 | Setting these variables will enable the building of the G4 Qt based |
---|
4327 | user interface module and the use of this module in your applications |
---|
4328 | respectively. |
---|
4329 | The Qt headers, libraries and binaries are required to enable the |
---|
4330 | building of this module. |
---|
4331 | Do you want to enable build and use of this module? |
---|
4332 | EOM` |
---|
4333 | |
---|
4334 | # |
---|
4335 | # read in the user response |
---|
4336 | # |
---|
4337 | dflt=$g4ui_build_qt_session |
---|
4338 | rp=$g4message |
---|
4339 | . ./myread |
---|
4340 | gans=$ans |
---|
4341 | |
---|
4342 | # |
---|
4343 | # Check response |
---|
4344 | # |
---|
4345 | case $gans in |
---|
4346 | n*|N*) |
---|
4347 | g4ui_build_qt_session=n |
---|
4348 | g4ui_use_qt=n |
---|
4349 | ;; |
---|
4350 | y*|Y*) |
---|
4351 | g4ui_build_qt_session=y |
---|
4352 | g4ui_use_qt=y |
---|
4353 | ;; |
---|
4354 | esac |
---|
4355 | |
---|
4356 | |
---|
4357 | ######################################### |
---|
4358 | |
---|
4359 | |
---|
4360 | ##################################################################### |
---|
4361 | # Now, if we want to build/use the Qt UI module, we need to probe for |
---|
4362 | # a Qt4 installation |
---|
4363 | # |
---|
4364 | if test "x$g4ui_build_qt_session" = "xy" ; then |
---|
4365 | |
---|
4366 | echo " " |
---|
4367 | g4_havegoodqt=no |
---|
4368 | |
---|
4369 | # Look for qt4 moc |
---|
4370 | g4_qtmochome=`./loc moc no $QTDIR/bin /usr/lib/qt4/bin /usr/lib/qt/bin /usr/local/qt/bin /usr/local/bin /usr/bin /bin /usr/share/qt4/bin /usr/X11R6/bin /sw/bin` |
---|
4371 | if test "x$g4_qtmochome" = "xno" ; then |
---|
4372 | # Look for qt3 moc |
---|
4373 | g4_qtmochome=`./loc moc no /usr/lib/qt3/bin /usr/share/qt3/bin` |
---|
4374 | fi |
---|
4375 | |
---|
4376 | # if not found |
---|
4377 | if test "x$g4_qtmochome" != "xno" ; then |
---|
4378 | echo "checking Qt moc tool in... $g4_qtmochome" |
---|
4379 | # check Qt version |
---|
4380 | g4_qtver=`$g4_qtmochome 2>&1 -v | $sed 's/.* .Qt \([0-9]\)\..*/\1/' ` |
---|
4381 | echo "checking Qt version... $g4_qtver" |
---|
4382 | if test "x$g4_qtver" = "x3" || test "x$g4_qtver" = "x4" ;then |
---|
4383 | |
---|
4384 | # checking includes first get QTDIR location, then qt$g4_qtver, sw, standard, shared, X11 |
---|
4385 | |
---|
4386 | incQtFiles=" $QTDIR/include /usr/include/qt$g4_qtver /usr/include/qt$g4_qtver/Qt /usr/lib/qt$g4_qtver/include /sw/include/qt /usr/lib/qt/include /usr/local/qt/include /usr/local/include /usr/include /usr/include/qt /usr/share/qt$g4_qtver/include /usr/X11R6/include /usr/X11R6/include/qt$g4_qtver /usr/X11R6/include/qt" |
---|
4387 | |
---|
4388 | if test "X$g4osname" = "XDarwin" && test "X$g4_qtver" = "X4"; then |
---|
4389 | incQtFiles="$incQtFiles /Library/Frameworks/QtCore.framework/Headers/" |
---|
4390 | g4_qtincdir=`./loc qglobal.h no $incQtFiles` |
---|
4391 | if test "x$g4_qtincdir" != "xno" ; then |
---|
4392 | g4_qtincdir="/Library/Frameworks" |
---|
4393 | fi |
---|
4394 | else |
---|
4395 | g4_qtincdir=`./loc qglobal.h no $incQtFiles` |
---|
4396 | fi |
---|
4397 | |
---|
4398 | |
---|
4399 | if test "x$g4_qtincdir" != "xno" ; then |
---|
4400 | if test "x$g4_qtincdir" != "x/Library/Frameworks" ; then |
---|
4401 | g4_qtincdir=`dirname $g4_qtincdir` |
---|
4402 | fi |
---|
4403 | echo "checking Qt includes dir in... $g4_qtincdir" |
---|
4404 | |
---|
4405 | |
---|
4406 | # checking libs, includes first get QTDIR location, then qt$g4_qtver, sw, standard, shared, X11 |
---|
4407 | |
---|
4408 | libQtFiles="$QTDIR/lib $QTDIR/lib64 /usr/lib/qt$g4_qtver/lib /usr/lib/qt$g4_qtver/lib64 /usr/lib/qt$g4_qtver /usr/lib/qt$g4_qtver /sw/lib /sw/lib/qt /sw/lib/qt$g4_qtver /sw/lib/qt$g4_qtver/lib /usr/lib/qt/lib /usr/local/qt/lib /usr/local/lib /usr/lib /usr/lib/qt /usr/share/qt$g4_qtver/lib /usr/X11R6/lib/qt /usr/X11R6/lib/qt$g4_qtver /usr/X11R6/lib /usr/X11R6/lib/qt" |
---|
4409 | |
---|
4410 | if test "X$g4osname" = "XDarwin" && test "X$g4_qtincdir" = "X/Library/Frameworks" ; then |
---|
4411 | g4_qtlibdir=`./loc QtCore no /Library/Frameworks/QtCore.framework/Versions/$g4_qtver/ $libQtFiles` |
---|
4412 | g4_qtlibdir=`dirname $g4_qtlibdir` |
---|
4413 | g4_qtlibdir=`dirname $g4_qtlibdir` |
---|
4414 | g4_qtlibdir=`dirname $g4_qtlibdir` |
---|
4415 | else |
---|
4416 | g4_qtlibdir=`./loc libqt* no $libQtFiles` |
---|
4417 | fi |
---|
4418 | if test "x$g4_qtlibdir" != "xno" ; then |
---|
4419 | g4_qtlibdir=`dirname $g4_qtlibdir` |
---|
4420 | echo "checking Qt lib dir in... $g4_qtlibdir" |
---|
4421 | g4_havegoodqt=yes |
---|
4422 | else |
---|
4423 | echo "Failed to find Qt lib dir in : $libQtFiles" |
---|
4424 | fi |
---|
4425 | else |
---|
4426 | echo "Failed to find Qt includes dir in : $incQtFiles" |
---|
4427 | fi #END CHECK QTLIBS |
---|
4428 | else |
---|
4429 | echo "Qt $g4_qtver is not actually support with this driver" |
---|
4430 | fi #END CHECK QTINC |
---|
4431 | fi #END CHECK QTMOC |
---|
4432 | # |
---|
4433 | # END QT AUTOPROBE |
---|
4434 | #################################################################### |
---|
4435 | |
---|
4436 | |
---|
4437 | #################################################################### |
---|
4438 | # Based on result of Qt autoprobe, we decide if user input is needed to |
---|
4439 | # locate Qt... |
---|
4440 | # |
---|
4441 | if test "x$g4_havegoodqt" = "xno" ; then |
---|
4442 | promptend="no" |
---|
4443 | qthomeloc="the standard locations" |
---|
4444 | |
---|
4445 | g4message=`cat << EOM |
---|
4446 | |
---|
4447 | Autodetection failed to locate Qt on your system. |
---|
4448 | Please enter the path to your Qt install (i.e. if Qt is installed |
---|
4449 | in PATH/include/Qt, or PATH/include $PATH/include/qt, enter PATH), or type '-' to |
---|
4450 | CANCEL the build of the Qt UI module. |
---|
4451 | Qt path: |
---|
4452 | EOM` |
---|
4453 | dflt="/usr" |
---|
4454 | g4_qtmochome="/usr" |
---|
4455 | fn='d~(-)' |
---|
4456 | rp=$g4message |
---|
4457 | . ./getfile |
---|
4458 | |
---|
4459 | #Check for user cancellation |
---|
4460 | if test "x$ans" = "x-" ; then |
---|
4461 | g4ui_build_qt_session=n |
---|
4462 | g4ui_use_qt=n |
---|
4463 | echo "build/use of Qt UI module cancelled..." |
---|
4464 | promptend=yes |
---|
4465 | |
---|
4466 | else |
---|
4467 | #We want to probe for Qt in the user supplied directory |
---|
4468 | echo " " |
---|
4469 | qthomeloc=$ans |
---|
4470 | g4_havegoodqt=no |
---|
4471 | |
---|
4472 | |
---|
4473 | # check for moc |
---|
4474 | |
---|
4475 | g4_qtmochome=`./loc moc no $ans/bin` |
---|
4476 | if test "x$g4_qtmochome" = "xno" ; then |
---|
4477 | while test "x$promptend" = "xno" ; do |
---|
4478 | g4message=`cat << EOM |
---|
4479 | |
---|
4480 | Failed to locate Qt moc tool on your system. |
---|
4481 | Please enter the path to your Qt moc tool install or type '-' to |
---|
4482 | CANCEL the build of the Qt UI module. |
---|
4483 | Qt moc path: |
---|
4484 | EOM` |
---|
4485 | fn='d~(-)' |
---|
4486 | rp=$g4message |
---|
4487 | . ./getfile |
---|
4488 | |
---|
4489 | #Check for user cancellation |
---|
4490 | if test "x$ans" = "x-" ; then |
---|
4491 | g4ui_build_qt_session=n |
---|
4492 | g4ui_use_qt=n |
---|
4493 | echo "build/use of Qt UI module cancelled..." |
---|
4494 | promptend=yes |
---|
4495 | |
---|
4496 | else |
---|
4497 | #We want to probe for Qt in the user supplied directory |
---|
4498 | echo " " |
---|
4499 | # check for moc |
---|
4500 | g4_qtmochome=`./loc moc no $ans/bin` |
---|
4501 | if test "x$g4_qtmochome" != "xno" ; then |
---|
4502 | promptend=yes |
---|
4503 | fi |
---|
4504 | fi |
---|
4505 | done |
---|
4506 | fi # ASK FOR QT MOC |
---|
4507 | if test "x$g4_qtmochome" != "xno" ; then |
---|
4508 | echo "checking Qt moc tool in... $g4_qtmochome" |
---|
4509 | fi |
---|
4510 | |
---|
4511 | # if moc ok, then check for version |
---|
4512 | if test "x$g4_qtmochome" != "xno" ; then |
---|
4513 | g4_qtver=`$g4_qtmochome 2>&1 -v | $sed 's/.* .Qt \([0-9]\)\..*/\1/' ` |
---|
4514 | echo "checking Qt version... $g4_qtver" |
---|
4515 | |
---|
4516 | if test "x$g4_qtver" = "x3" || test "x$g4_qtver" = "x4";then |
---|
4517 | |
---|
4518 | # if version ok check for includes |
---|
4519 | # checking includes in qt$g4_qtver, then standard |
---|
4520 | incQtFiles="$qthomeloc/lib/qt$g4_qtver/include $qthomeloc/include/qt$g4_qtver/Qt $qthomeloc/include/qt$g4_qtver $qthomeloc/include $qthomeloc/include/Qt " |
---|
4521 | |
---|
4522 | if test "X$g4osname" = "XDarwin" && test "X$g4_qtver" = "X4"; then |
---|
4523 | incQtFiles="$incQtFiles /Library/Frameworks/QtCore.framework/Headers/ $qthomeloc/QtCore.framework/Headers/" |
---|
4524 | g4_qtincdir=`./loc qglobal.h no $incQtFiles` |
---|
4525 | if test "x$g4_qtincdir" != "xno" ; then |
---|
4526 | g4_qtincdir=`dirname $g4_qtincdir` |
---|
4527 | g4_qtincdir=`dirname $g4_qtincdir` |
---|
4528 | fi |
---|
4529 | else |
---|
4530 | g4_qtincdir=`./loc qglobal.h no $incQtFiles` |
---|
4531 | fi |
---|
4532 | if test "x$g4_qtincdir" = "xno" ; then |
---|
4533 | while test "x$promptend" = "xno" ; do |
---|
4534 | g4message=`cat << EOM |
---|
4535 | |
---|
4536 | Failed to locate Qt include directory on your system. |
---|
4537 | Please enter the path to your Qt include directory install or type '-' to |
---|
4538 | CANCEL the build of the Qt UI module. |
---|
4539 | Qt include path: |
---|
4540 | EOM` |
---|
4541 | fn='d~(-)' |
---|
4542 | rp=$g4message |
---|
4543 | . ./getfile |
---|
4544 | |
---|
4545 | #Check for user cancellation |
---|
4546 | if test "x$ans" = "x-" ; then |
---|
4547 | g4ui_build_qt_session=n |
---|
4548 | g4ui_use_qt=n |
---|
4549 | echo "build/use of Qt UI module cancelled..." |
---|
4550 | promptend=yes |
---|
4551 | |
---|
4552 | else |
---|
4553 | #We want to probe for Qt in the user supplied directory |
---|
4554 | echo " " |
---|
4555 | # check for include |
---|
4556 | g4_qtincdir=`./loc qglobal.h no $ans` |
---|
4557 | if test "x$g4_qtincdir" != "xno" ; then |
---|
4558 | promptend=yes |
---|
4559 | fi |
---|
4560 | fi |
---|
4561 | done |
---|
4562 | fi # ASK FOR QT INC |
---|
4563 | if test "x$g4_qtincdir" != "xno" ; then |
---|
4564 | g4_qtincdir=`dirname $g4_qtincdir` |
---|
4565 | echo "checking Qt inc dir in... $g4_qtincdir" |
---|
4566 | fi |
---|
4567 | # if qt inc ok, then check for libs |
---|
4568 | if test "x$g4_qtincdir" != "xno" ; then |
---|
4569 | |
---|
4570 | # checking libraries in qt$g4_qtver, then standard |
---|
4571 | libQtFiles="$qthomeloc/lib/qt$g4_qtver/lib $qthomeloc/lib/qt$g4_qtver $qthomeloc/lib/qt$g4_qtver $qthomeloc/lib/qt$g4_qtver/lib64 $qthomeloc/lib $qthomeloc/lib64 $qthomeloc/lib/qt/lib $qthomeloc/lib/qt $qthomeloc/lib64" |
---|
4572 | |
---|
4573 | if test "X$g4osname" = "XDarwin" && test "X$g4_qtincdir" = "X/Library/Frameworks" ; then |
---|
4574 | g4_qtlibdir=`./loc QtCore no /Library/Frameworks/QtCore.framework/Versions/$g4_qtver/ $libQtFiles` |
---|
4575 | g4_qtlibdir=`dirname $g4_qtlibdir` |
---|
4576 | g4_qtlibdir=`dirname $g4_qtlibdir` |
---|
4577 | g4_qtlibdir=`dirname $g4_qtlibdir` |
---|
4578 | else |
---|
4579 | g4_qtlibdir=`./loc libqt* no $libQtFiles` |
---|
4580 | fi |
---|
4581 | if test "x$g4_qtlibdir" = "xno" ; then |
---|
4582 | while test "x$promptend" = "xno" ; do |
---|
4583 | g4message=`cat << EOM |
---|
4584 | |
---|
4585 | Failed to locate Qt lib directory on your system. |
---|
4586 | Please enter the path to your Qt lib directory install or type '-' to |
---|
4587 | CANCEL the build of the Qt UI module. |
---|
4588 | Qt library path: |
---|
4589 | EOM` |
---|
4590 | fn='d~(-)' |
---|
4591 | rp=$g4message |
---|
4592 | . ./getfile |
---|
4593 | |
---|
4594 | #Check for user cancellation |
---|
4595 | if test "x$ans" = "x-" ; then |
---|
4596 | g4ui_build_qt_session=n |
---|
4597 | g4ui_use_qt=n |
---|
4598 | echo "build/use of Qt UI module cancelled..." |
---|
4599 | promptend=yes |
---|
4600 | |
---|
4601 | else |
---|
4602 | #We want to probe for Qt in the user supplied directory |
---|
4603 | echo " " |
---|
4604 | # check for libraries |
---|
4605 | if test "X$g4osname" = "XDarwin" && test "X$g4_qtincdir" = "X/Library/Frameworks" ; then |
---|
4606 | g4_qtlibdir=`./loc QtCore* no $libQtFiles /Library/Frameworks/` |
---|
4607 | else |
---|
4608 | g4_qtlibdir=`./loc libqt* no $libQtFiles` |
---|
4609 | fi |
---|
4610 | if test "x$g4_qtlibdir" != "xno" ; then |
---|
4611 | promptend=yes |
---|
4612 | fi |
---|
4613 | fi |
---|
4614 | done |
---|
4615 | fi # END OF LIB CHECK |
---|
4616 | if test "x$g4_qtlibdir" != "xno" ; then |
---|
4617 | g4_qtlibdir=`dirname $g4_qtlibdir` |
---|
4618 | echo "checking Qt lib dir in... $g4_qtlibdir" |
---|
4619 | promptend=yes |
---|
4620 | g4_havegoodqt=yes |
---|
4621 | fi |
---|
4622 | |
---|
4623 | else # END OF INC CHECK |
---|
4624 | g4_qtincdir=no |
---|
4625 | fi |
---|
4626 | else # END OF VERSION CHECK |
---|
4627 | g4_qtmochome=no |
---|
4628 | fi |
---|
4629 | fi # END OF MOC CHECK |
---|
4630 | |
---|
4631 | fi #END CHECK USER CANCELLATION |
---|
4632 | |
---|
4633 | fi #END USER DIRECTED QT DETECTION |
---|
4634 | |
---|
4635 | # |
---|
4636 | #END QT USER INPUT PROBE |
---|
4637 | #################################################################### |
---|
4638 | |
---|
4639 | fi #END CHECK OF G4UI_BUILD_QT_SESSION=Y |
---|
4640 | ########################################### |
---|
4641 | |
---|
4642 | fi #END TEST G4UI_NONE=N |
---|
4643 | #fi #END TEST G4SYSTEM = Linux-g++ OR Darwin-g++ |
---|
4644 | ######################## |
---|
4645 | echo " " |
---|
4646 | case "$g4vis_none" in |
---|
4647 | '') |
---|
4648 | g4vis_none=n |
---|
4649 | ;; |
---|
4650 | esac |
---|
4651 | |
---|
4652 | |
---|
4653 | case "$g4vis_build_openglwin32_driver" in |
---|
4654 | '') |
---|
4655 | g4vis_build_openglwin32_driver=n |
---|
4656 | ;; |
---|
4657 | esac |
---|
4658 | |
---|
4659 | case "$g4vis_use_openglwin32" in |
---|
4660 | '') |
---|
4661 | g4vis_use_openglwin32=n |
---|
4662 | ;; |
---|
4663 | esac |
---|
4664 | |
---|
4665 | case "$g4vis_build_oiwin32_driver" in |
---|
4666 | '') |
---|
4667 | g4vis_build_oiwin32_driver=n |
---|
4668 | ;; |
---|
4669 | esac |
---|
4670 | |
---|
4671 | case "$g4vis_use_oiwin32" in |
---|
4672 | '') |
---|
4673 | g4vis_use_oiwin32=n |
---|
4674 | ;; |
---|
4675 | esac |
---|
4676 | |
---|
4677 | case "$g4vis_build_dawn_driver" in |
---|
4678 | '') |
---|
4679 | g4vis_build_dawn_driver=n |
---|
4680 | ;; |
---|
4681 | esac |
---|
4682 | |
---|
4683 | case "$g4vis_use_dawn" in |
---|
4684 | '') |
---|
4685 | g4vis_use_dawn=n |
---|
4686 | ;; |
---|
4687 | esac |
---|
4688 | |
---|
4689 | # Set by default! |
---|
4690 | case "$g4vis_build_dawnfile_driver" in |
---|
4691 | '') |
---|
4692 | g4vis_build_dawnfile_driver=y |
---|
4693 | ;; |
---|
4694 | esac |
---|
4695 | |
---|
4696 | # Set by default! |
---|
4697 | case "$g4vis_use_dawnfile" in |
---|
4698 | '') |
---|
4699 | g4vis_use_dawnfile=y |
---|
4700 | ;; |
---|
4701 | esac |
---|
4702 | |
---|
4703 | case "$g4vis_build_openglx_driver" in |
---|
4704 | '') |
---|
4705 | g4vis_build_openglx_driver=n |
---|
4706 | ;; |
---|
4707 | esac |
---|
4708 | |
---|
4709 | case "$g4vis_use_openglx" in |
---|
4710 | '') |
---|
4711 | g4vis_use_openglx=n |
---|
4712 | ;; |
---|
4713 | esac |
---|
4714 | |
---|
4715 | case "$g4vis_build_openglxm_driver" in |
---|
4716 | '') |
---|
4717 | g4vis_build_openglxm_driver=n |
---|
4718 | ;; |
---|
4719 | esac |
---|
4720 | |
---|
4721 | case "$g4vis_use_openglxm" in |
---|
4722 | '') |
---|
4723 | g4vis_use_openglxm=n |
---|
4724 | ;; |
---|
4725 | esac |
---|
4726 | |
---|
4727 | case "$g4vis_build_oix_driver" in |
---|
4728 | '') |
---|
4729 | g4vis_build_oix_driver=n |
---|
4730 | ;; |
---|
4731 | esac |
---|
4732 | |
---|
4733 | case "$g4vis_use_oix" in |
---|
4734 | '') |
---|
4735 | g4vis_use_oix=n |
---|
4736 | ;; |
---|
4737 | esac |
---|
4738 | |
---|
4739 | case "$g4vis_build_raytracerx_driver" in |
---|
4740 | '') |
---|
4741 | g4vis_build_raytracerx_driver=n |
---|
4742 | ;; |
---|
4743 | esac |
---|
4744 | |
---|
4745 | case "$g4vis_use_raytracerx" in |
---|
4746 | '') |
---|
4747 | g4vis_use_raytracerx=n |
---|
4748 | ;; |
---|
4749 | esac |
---|
4750 | |
---|
4751 | # Set by default! |
---|
4752 | case "$g4vis_build_raytracer_driver" in |
---|
4753 | '') |
---|
4754 | g4vis_build_raytracer_driver=y |
---|
4755 | ;; |
---|
4756 | esac |
---|
4757 | |
---|
4758 | # Set by default! |
---|
4759 | case "$g4vis_use_raytracer" in |
---|
4760 | '') |
---|
4761 | g4vis_use_raytracer=y |
---|
4762 | ;; |
---|
4763 | esac |
---|
4764 | |
---|
4765 | case "$g4vis_build_vrml_driver" in |
---|
4766 | '') |
---|
4767 | g4vis_build_vrml_driver=n |
---|
4768 | ;; |
---|
4769 | esac |
---|
4770 | |
---|
4771 | case "$g4vis_use_vrml" in |
---|
4772 | '') |
---|
4773 | g4vis_use_vrml=n |
---|
4774 | ;; |
---|
4775 | esac |
---|
4776 | |
---|
4777 | # Set by default! |
---|
4778 | case "$g4vis_build_asciitree_driver" in |
---|
4779 | '') |
---|
4780 | g4vis_build_asciitree_driver=y |
---|
4781 | ;; |
---|
4782 | esac |
---|
4783 | |
---|
4784 | # Set by default! |
---|
4785 | case "$g4vis_use_asciitree" in |
---|
4786 | '') |
---|
4787 | g4vis_use_asciitree=y |
---|
4788 | ;; |
---|
4789 | esac |
---|
4790 | |
---|
4791 | # Set by default! |
---|
4792 | case "$g4vis_build_gagtree_driver" in |
---|
4793 | '') |
---|
4794 | g4vis_build_gagtree_driver=y |
---|
4795 | ;; |
---|
4796 | esac |
---|
4797 | |
---|
4798 | # Set by default! |
---|
4799 | case "$g4vis_use_gagtree" in |
---|
4800 | '') |
---|
4801 | g4vis_use_gagtree=y |
---|
4802 | ;; |
---|
4803 | esac |
---|
4804 | |
---|
4805 | echo "" |
---|
4806 | |
---|
4807 | g4message=`cat << EOM |
---|
4808 | |
---|
4809 | G4VIS_NONE |
---|
4810 | |
---|
4811 | If this variable is set, no visualization drivers will be built or used. |
---|
4812 | Do you want to set this variable ? |
---|
4813 | |
---|
4814 | EOM` |
---|
4815 | |
---|
4816 | dflt=$g4vis_none |
---|
4817 | rp=$g4message |
---|
4818 | . ./myread |
---|
4819 | gans=$ans |
---|
4820 | |
---|
4821 | case $gans in |
---|
4822 | |
---|
4823 | n*|N*) |
---|
4824 | g4vis_none=n |
---|
4825 | ;; |
---|
4826 | y*|Y*) |
---|
4827 | g4vis_none=y |
---|
4828 | ;; |
---|
4829 | esac |
---|
4830 | |
---|
4831 | case $g4vis_none in |
---|
4832 | |
---|
4833 | n) |
---|
4834 | |
---|
4835 | if test "X$g4system" != "XWIN32-VC" -a "X$g4system" != "XWIN32-VC7"; then |
---|
4836 | |
---|
4837 | g4message=`cat << EOM |
---|
4838 | |
---|
4839 | G4VIS_BUILD_OPENGLX_DRIVER |
---|
4840 | G4VIS_USE_OPENGLX |
---|
4841 | |
---|
4842 | It is an interface to the de facto standard 3D graphics library, |
---|
4843 | OpenGL. It is well suited for real-time fast visualization |
---|
4844 | and prototyping. The X11 version of the OpenGL libraries is |
---|
4845 | required. |
---|
4846 | EOM` |
---|
4847 | |
---|
4848 | dflt=$g4vis_use_openglx |
---|
4849 | rp=$g4message |
---|
4850 | . ./myread |
---|
4851 | gans=$ans |
---|
4852 | |
---|
4853 | case $gans in |
---|
4854 | |
---|
4855 | n*|N*) |
---|
4856 | g4vis_build_openglx_driver=n |
---|
4857 | g4vis_use_openglx=n |
---|
4858 | ;; |
---|
4859 | y*|Y*) |
---|
4860 | g4vis_build_openglx_driver=y |
---|
4861 | g4vis_use_openglx=y |
---|
4862 | ;; |
---|
4863 | esac |
---|
4864 | |
---|
4865 | #############################################3 |
---|
4866 | g4message=`cat << EOM |
---|
4867 | |
---|
4868 | G4VIS_BUILD_OPENGLXM_DRIVER |
---|
4869 | G4VIS_USE_OPENGLXM |
---|
4870 | |
---|
4871 | It is an interface to the de facto standard 3D graphics library, |
---|
4872 | OpenGL. It is well suited for real-time fast visualization |
---|
4873 | and prototyping. The X11 version of the OpenGL libraries and |
---|
4874 | the Motif Xm extension is required. |
---|
4875 | |
---|
4876 | EOM` |
---|
4877 | |
---|
4878 | dflt=$g4vis_use_openglxm |
---|
4879 | rp=$g4message |
---|
4880 | . ./myread |
---|
4881 | gans=$ans |
---|
4882 | |
---|
4883 | case $gans in |
---|
4884 | |
---|
4885 | n*|N*) |
---|
4886 | g4vis_build_openglxm_driver=n |
---|
4887 | g4vis_use_openglxm=n |
---|
4888 | ;; |
---|
4889 | y*|Y*) |
---|
4890 | g4vis_build_openglxm_driver=y |
---|
4891 | g4vis_use_openglxm=y |
---|
4892 | ;; |
---|
4893 | esac |
---|
4894 | |
---|
4895 | ############################################################ |
---|
4896 | #echo xm_dirs=$xm_dirs |
---|
4897 | #echo g4vis_xmhome=$g4vis_xmhome |
---|
4898 | #echo g4ui_build_xm_session=$g4ui_build_xm_session |
---|
4899 | #echo g4vis_build_openglxm_driver=$g4vis_build_openglxm_driver |
---|
4900 | |
---|
4901 | if test "X$g4ui_build_xm_session" = "Xn" ; then |
---|
4902 | |
---|
4903 | #echo PASS1 |
---|
4904 | |
---|
4905 | if test "X$g4vis_build_openglxm_driver" = "Xy" ; then |
---|
4906 | |
---|
4907 | #echo PASS2 |
---|
4908 | |
---|
4909 | if test "X$g4vis_xmhome" = "X" ; then |
---|
4910 | xm_dirs=`find $g4vis_xmhome /usr/X11R6/include /usr/local/include /usr/include /sw/include -type d -name Xm 2>/dev/null |xargs echo` |
---|
4911 | #echo ogl_dirs=$ogl_dirs |
---|
4912 | |
---|
4913 | if test "X$xm_dirs" != "X" ; then |
---|
4914 | |
---|
4915 | g4xm_base_dir_found=`echo $xm_dirs|cut -d" " -f1` |
---|
4916 | #echo g4ogl_base_dir_found=$g4ogl_base_dir_found |
---|
4917 | |
---|
4918 | # That's right: should be twice! (e.g./usr/local/lib/libGLU.so -> /usr/local) |
---|
4919 | g4xm_base_dir_found=`dirname $g4xm_base_dir_found` |
---|
4920 | g4xm_base_dir_found=`dirname $g4xm_base_dir_found` |
---|
4921 | |
---|
4922 | g4vis_xmhome=$g4xm_base_dir_found |
---|
4923 | #else |
---|
4924 | #case "$g4vis_xmhome" in |
---|
4925 | #'') |
---|
4926 | # g4vis_xmhome=/usr/X11R6/ |
---|
4927 | # ;; |
---|
4928 | #esac |
---|
4929 | fi |
---|
4930 | fi |
---|
4931 | |
---|
4932 | ########################################################################## |
---|
4933 | |
---|
4934 | #if test "X$g4vis_xmhome" != "X" ; then |
---|
4935 | #xm_dirs=$g4vis_xmhome |
---|
4936 | #fi |
---|
4937 | |
---|
4938 | if test "X$g4vis_xmhome" != "X" ; then |
---|
4939 | |
---|
4940 | g4message=`cat << EOM |
---|
4941 | |
---|
4942 | You have selected to use OPENGLXM driver. |
---|
4943 | Specify the correct path where Xm is installed in your system. |
---|
4944 | It was found in $g4vis_xmhome. Press [Enter] to set this path or type the correct one. |
---|
4945 | |
---|
4946 | You can set '-' (without quotation) to CANCEL the XM flag at all: |
---|
4947 | |
---|
4948 | EOM` |
---|
4949 | |
---|
4950 | dflt=$g4vis_xmhome |
---|
4951 | fn='d~(-)' |
---|
4952 | rp=$g4message |
---|
4953 | . ./getfile |
---|
4954 | |
---|
4955 | cend="no" |
---|
4956 | while test "$cend" = "no" ; do |
---|
4957 | if test -e "$ans/include/Xm" || [ "X$ans" = "X-" ]; then |
---|
4958 | cend="yes" |
---|
4959 | if test "X$ans" != "X-" ; then |
---|
4960 | |
---|
4961 | g4vis_xmhome=$ans |
---|
4962 | |
---|
4963 | else |
---|
4964 | |
---|
4965 | g4vis_build_openglxm_driver=n |
---|
4966 | g4vis_use_openglxm=n |
---|
4967 | |
---|
4968 | fi |
---|
4969 | else |
---|
4970 | |
---|
4971 | g4message=`cat << EOM |
---|
4972 | |
---|
4973 | You have selected to use OPENGLXM driver. |
---|
4974 | But it was not found in $ans. |
---|
4975 | Please specify the correct path where Xm is installed in your system. |
---|
4976 | |
---|
4977 | You can set '-' (without quotation) to CANCEL the XM flag at all: |
---|
4978 | |
---|
4979 | EOM` |
---|
4980 | |
---|
4981 | dflt="" |
---|
4982 | fn='d~(-)' |
---|
4983 | rp=$g4message |
---|
4984 | . ./getfile |
---|
4985 | fi |
---|
4986 | done |
---|
4987 | |
---|
4988 | else |
---|
4989 | |
---|
4990 | g4message=`cat << EOM |
---|
4991 | |
---|
4992 | You have selected to use OPENGLXM driver. |
---|
4993 | But it was not found in expected place. |
---|
4994 | Please specify the correct path where Xm is installed in your system. |
---|
4995 | |
---|
4996 | You can set '-' (without quotation) to CANCEL the XM flag at all: |
---|
4997 | |
---|
4998 | EOM` |
---|
4999 | |
---|
5000 | dflt="" |
---|
5001 | fn='d~(-)' |
---|
5002 | rp=$g4message |
---|
5003 | . ./getfile |
---|
5004 | |
---|
5005 | cend="no" |
---|
5006 | while test "$cend" = "no" ; do |
---|
5007 | if test -e "$ans/include/Xm" || [ "X$ans" = "X-" ]; then |
---|
5008 | cend="yes" |
---|
5009 | if test "X$ans" != "X-" ; then |
---|
5010 | |
---|
5011 | g4vis_xmhome=$ans |
---|
5012 | |
---|
5013 | else |
---|
5014 | |
---|
5015 | g4vis_build_openglxm_driver=n |
---|
5016 | g4vis_use_openglxm=n |
---|
5017 | |
---|
5018 | fi |
---|
5019 | else |
---|
5020 | |
---|
5021 | g4message=`cat << EOM |
---|
5022 | |
---|
5023 | You have selected to use OPENGLXM driver. |
---|
5024 | But it was not found in $ans. |
---|
5025 | Please specify the correct path where Xm is installed in your system. |
---|
5026 | |
---|
5027 | You can set '-' (without quotation) to CANCEL the XM flag at all: |
---|
5028 | |
---|
5029 | EOM` |
---|
5030 | |
---|
5031 | dflt="" |
---|
5032 | fn='d~(-)' |
---|
5033 | rp=$g4message |
---|
5034 | . ./getfile |
---|
5035 | fi |
---|
5036 | done |
---|
5037 | fi |
---|
5038 | |
---|
5039 | if test "X$g4osname" = "XLinux"; then |
---|
5040 | |
---|
5041 | if test "X$g4vis_xmhome" = "X/usr" -o "X$g4vis_xmhome" = "X/usr/local" ; then |
---|
5042 | g4vis_xmhome="" |
---|
5043 | fi |
---|
5044 | fi |
---|
5045 | fi # g4vis_build_opheglxm_driver |
---|
5046 | |
---|
5047 | ############################################### |
---|
5048 | # Set XMFLAGS and XMLIBS |
---|
5049 | # |
---|
5050 | |
---|
5051 | if test "X$g4vis_build_openglxm_driver" = "Xy" ; then |
---|
5052 | |
---|
5053 | if test "X$g4osname" = "XAIX" ; then |
---|
5054 | g4vis_xmflags=" -I$g4vis_xmhome/include " |
---|
5055 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm -lXt -lX11 " |
---|
5056 | fi |
---|
5057 | |
---|
5058 | if test "X$g4osname" = "XLinux" ; then |
---|
5059 | g4vis_xmflags=" -I$g4vis_xmhome/include " |
---|
5060 | if test "X$g4vis_xmhome" = "X/usr/X11R6" ; then |
---|
5061 | g4vis_xmlibs=" -lXm -lXpm " |
---|
5062 | else |
---|
5063 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm -lXpm " |
---|
5064 | fi |
---|
5065 | fi |
---|
5066 | |
---|
5067 | if test "X$g4osname" = "XDarwin" ; then |
---|
5068 | g4vis_xmflags=" -I$g4vis_xmhome/include " |
---|
5069 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm -lXpm " |
---|
5070 | fi |
---|
5071 | |
---|
5072 | if test "X$g4osname" = "XDEC" ; then |
---|
5073 | g4vis_xmflags=" -I$g4vis_xmhome/include " |
---|
5074 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm " |
---|
5075 | fi |
---|
5076 | |
---|
5077 | if test "X$g4osname" = "XHP" ; then |
---|
5078 | g4vis_xmflags=" -I$g4vis_xmhome/include/Motif1.2 " |
---|
5079 | g4vis_xmlibs=" -L$g4vis_xmhome/lib/Motif1.2 -lXm " |
---|
5080 | fi |
---|
5081 | |
---|
5082 | if test "X$g4osname" = "XSGI" ; then |
---|
5083 | g4vis_xmflags=" -I$g4vis_xmhome/include " |
---|
5084 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm " |
---|
5085 | fi |
---|
5086 | |
---|
5087 | if test "X$g4osname" = "XSUN" ; then |
---|
5088 | g4vis_xmflags=" -I$g4vis_xmhome/include " |
---|
5089 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -L/usr/openwin/lib -L/usr/dt/lib -L/usr/ucblib -R/usr/openwin/lib -lXt -lXm -lX11 " |
---|
5090 | fi |
---|
5091 | |
---|
5092 | fi # end of XM build |
---|
5093 | fi |
---|
5094 | ############################################### |
---|
5095 | |
---|
5096 | fi # if !WIN |
---|
5097 | |
---|
5098 | ###################################################################### |
---|
5099 | if test "X$g4system" = "XWIN32-VC" -o "X$g4system" = "XWIN32-VC7"; then |
---|
5100 | |
---|
5101 | g4message=`cat << EOM |
---|
5102 | |
---|
5103 | G4VIS_BUILD_OPENGLWIN32_DRIVER |
---|
5104 | G4VIS_USE_OPENGLWIN32 |
---|
5105 | |
---|
5106 | It is an interface to the de facto standard 3D graphics library, |
---|
5107 | OpenGL. It is well suited for real-time fast visualization |
---|
5108 | and prototyping. The Windows version of the OpenGL libraries is |
---|
5109 | required. |
---|
5110 | |
---|
5111 | EOM` |
---|
5112 | |
---|
5113 | dflt=$g4vis_use_openglwin32 |
---|
5114 | rp=$g4message |
---|
5115 | . ./myread |
---|
5116 | gans=$ans |
---|
5117 | |
---|
5118 | case $gans in |
---|
5119 | |
---|
5120 | n*|N*) |
---|
5121 | g4vis_build_openglwin32_driver=n |
---|
5122 | g4vis_use_openglwin32=n |
---|
5123 | ;; |
---|
5124 | y*|Y*) |
---|
5125 | g4vis_build_openglwin32_driver=y |
---|
5126 | g4vis_use_openglwin32=y |
---|
5127 | ;; |
---|
5128 | esac |
---|
5129 | |
---|
5130 | fi # if WIN |
---|
5131 | ########################################### |
---|
5132 | |
---|
5133 | if test "X$g4system" != "XWIN32-VC" -a "X$g4system" != "XWIN32-VC7"; then |
---|
5134 | |
---|
5135 | g4message=`cat << EOM |
---|
5136 | |
---|
5137 | G4VIS_BUILD_DAWN_DRIVER |
---|
5138 | G4VIS_USE_DAWN |
---|
5139 | |
---|
5140 | DAWN drivers are interfaces to the Fukui Renderer DAWN. DAWN is |
---|
5141 | a vectorized 3D PostScript processor suited to prepare technical |
---|
5142 | high quality outputs for presentation and/or documentation. |
---|
5143 | |
---|
5144 | EOM` |
---|
5145 | |
---|
5146 | dflt=$g4vis_use_dawn |
---|
5147 | rp=$g4message |
---|
5148 | . ./myread |
---|
5149 | gans=$ans |
---|
5150 | |
---|
5151 | case $gans in |
---|
5152 | |
---|
5153 | n*|N*) |
---|
5154 | g4vis_build_dawn_driver=n |
---|
5155 | g4vis_use_dawn=n |
---|
5156 | ;; |
---|
5157 | y*|Y*) |
---|
5158 | g4vis_build_dawn_driver=y |
---|
5159 | g4vis_use_dawn=y |
---|
5160 | ;; |
---|
5161 | esac |
---|
5162 | |
---|
5163 | |
---|
5164 | ####################################### |
---|
5165 | g4message=`cat << EOM |
---|
5166 | |
---|
5167 | G4VIS_BUILD_OIX_DRIVER |
---|
5168 | G4VIS_USE_OIX |
---|
5169 | |
---|
5170 | The OpenInventor driver is based on OpenInventor technology |
---|
5171 | for scientific visualization. |
---|
5172 | The X11 version of OpenInventor is required. |
---|
5173 | |
---|
5174 | EOM` |
---|
5175 | |
---|
5176 | dflt=$g4vis_use_oix |
---|
5177 | rp=$g4message |
---|
5178 | . ./myread |
---|
5179 | gans=$ans |
---|
5180 | |
---|
5181 | case $gans in |
---|
5182 | |
---|
5183 | n*|N*) |
---|
5184 | g4vis_build_oix_driver=n |
---|
5185 | g4vis_use_oix=n |
---|
5186 | ;; |
---|
5187 | y*|Y*) |
---|
5188 | g4vis_build_oix_driver=y |
---|
5189 | g4vis_use_oix=y |
---|
5190 | ;; |
---|
5191 | esac |
---|
5192 | |
---|
5193 | ############################################################ |
---|
5194 | if test "X$g4vis_build_oix_driver" = "Xy" ; then |
---|
5195 | |
---|
5196 | oiv_dirs=`find $g4vis_oivhome /usr/X11R6/include /usr/local/include /usr/include -type d -name Inventor 2>/dev/null|xargs echo` |
---|
5197 | #echo ogl_dirs=$ogl_dirs |
---|
5198 | |
---|
5199 | if test "X$oiv_dirs" != "X" ; then |
---|
5200 | |
---|
5201 | g4oiv_base_dir_found=`echo $oiv_dirs|cut -d" " -f1` |
---|
5202 | #echo g4ogl_base_dir_found=$g4ogl_base_dir_found |
---|
5203 | |
---|
5204 | # That's right: should be twice! (e.g./usr/local/lib/libGLU.so -> /usr/local) |
---|
5205 | g4oiv_base_dir_found=`dirname $g4oiv_base_dir_found` |
---|
5206 | g4oiv_base_dir_found=`dirname $g4oiv_base_dir_found` |
---|
5207 | |
---|
5208 | g4vis_oivhome=$g4oiv_base_dir_found |
---|
5209 | #else |
---|
5210 | #case "$g4vis_oivhome" in |
---|
5211 | #'') |
---|
5212 | # g4vis_oivhome=/usr |
---|
5213 | # ;; |
---|
5214 | #esac |
---|
5215 | fi |
---|
5216 | |
---|
5217 | ########################################################################## |
---|
5218 | |
---|
5219 | #if test "X$g4vis_oivhome" != "X" ; then |
---|
5220 | #oiv_dirs=$g4vis_oivhome |
---|
5221 | #fi |
---|
5222 | |
---|
5223 | if test "X$g4vis_oivhome" != "X" ; then |
---|
5224 | |
---|
5225 | g4message=`cat << EOM |
---|
5226 | |
---|
5227 | OIVHOME/include |
---|
5228 | OIVHOME/lib |
---|
5229 | |
---|
5230 | You have selected to use OpenInventor driver. |
---|
5231 | Specify the correct path (OIVHOME) where OpenInventor is installed in your system. |
---|
5232 | It was found in $g4vis_oivhome. Press [Enter] to set this path or type the correct one. |
---|
5233 | |
---|
5234 | You can set '-' (without quotation) to CANCEL the OpenInventor flag at all: |
---|
5235 | |
---|
5236 | EOM` |
---|
5237 | |
---|
5238 | dflt=$g4vis_oivhome |
---|
5239 | fn='d~(-)' |
---|
5240 | rp=$g4message |
---|
5241 | . ./getfile |
---|
5242 | |
---|
5243 | cend="no" |
---|
5244 | while test "$cend" = "no" ; do |
---|
5245 | if test -e "$ans/include/Inventor" || [ "X$ans" = "X-" ]; then |
---|
5246 | cend="yes" |
---|
5247 | if test "X$ans" != "X-" ; then |
---|
5248 | |
---|
5249 | g4vis_oivhome=$ans |
---|
5250 | |
---|
5251 | else |
---|
5252 | |
---|
5253 | g4vis_build_oix_driver=n |
---|
5254 | g4vis_use_oix=n |
---|
5255 | |
---|
5256 | fi |
---|
5257 | else |
---|
5258 | |
---|
5259 | g4message=`cat << EOM |
---|
5260 | |
---|
5261 | OIVHOME/include |
---|
5262 | OIVHOME/lib |
---|
5263 | |
---|
5264 | You have selected to use OpenInventor driver. |
---|
5265 | But it was not found in $ans. |
---|
5266 | Please specify the correct path where OpenInventor is installed in your system. |
---|
5267 | |
---|
5268 | You can set '-' (without quotation) to CANCEL the OpenInventor flag at all: |
---|
5269 | |
---|
5270 | EOM` |
---|
5271 | |
---|
5272 | dflt="" |
---|
5273 | fn='d~(-)' |
---|
5274 | rp=$g4message |
---|
5275 | . ./getfile |
---|
5276 | fi |
---|
5277 | done |
---|
5278 | |
---|
5279 | else |
---|
5280 | |
---|
5281 | g4message=`cat << EOM |
---|
5282 | |
---|
5283 | OIVHOME/include |
---|
5284 | OIVHOME/lib |
---|
5285 | |
---|
5286 | You have selected to use OpenInventor driver. |
---|
5287 | But it was not found in expected place. |
---|
5288 | Please specify the correct path where OpenInventor is installed in your system. |
---|
5289 | |
---|
5290 | You can set '-' (without quotation) to CANCEL the OpenInventor flag at all: |
---|
5291 | |
---|
5292 | EOM` |
---|
5293 | |
---|
5294 | dflt="" |
---|
5295 | fn='d~(-)' |
---|
5296 | rp=$g4message |
---|
5297 | . ./getfile |
---|
5298 | |
---|
5299 | cend="no" |
---|
5300 | while test "$cend" = "no" ; do |
---|
5301 | if test -e "$ans/include/Inventor" || [ "X$ans" = "X-" ]; then |
---|
5302 | cend="yes" |
---|
5303 | if test "X$ans" != "X-" ; then |
---|
5304 | |
---|
5305 | g4vis_oivhome=$ans |
---|
5306 | |
---|
5307 | else |
---|
5308 | |
---|
5309 | g4vis_build_oix_driver=n |
---|
5310 | g4vis_use_oix=n |
---|
5311 | |
---|
5312 | fi |
---|
5313 | else |
---|
5314 | |
---|
5315 | g4message=`cat << EOM |
---|
5316 | |
---|
5317 | OIVHOME/include |
---|
5318 | OIVHOME/lib |
---|
5319 | |
---|
5320 | You have selected to use OpenInventor driver. |
---|
5321 | But it was not found in $ans. |
---|
5322 | Please specify the correct path where OpenInventor is installed in your system. |
---|
5323 | |
---|
5324 | You can set '-' (without quotation) to CANCEL the OpenInventor flag at all: |
---|
5325 | |
---|
5326 | EOM` |
---|
5327 | |
---|
5328 | dflt="" |
---|
5329 | fn='d~(-)' |
---|
5330 | rp=$g4message |
---|
5331 | . ./getfile |
---|
5332 | fi |
---|
5333 | done |
---|
5334 | fi |
---|
5335 | |
---|
5336 | if test "X$g4osname" = "XLinux"; then |
---|
5337 | |
---|
5338 | if test "X$g4vis_oivhome" = "X/usr" -o "X$g4vis_oivhome" = "X/usr/local"; then |
---|
5339 | g4vis_oivhome="" |
---|
5340 | fi |
---|
5341 | fi |
---|
5342 | fi # g4vis_build_oix_driver |
---|
5343 | |
---|
5344 | ############################################### |
---|
5345 | |
---|
5346 | g4message=`cat << EOM |
---|
5347 | |
---|
5348 | G4VIS_BUILD_RAYTRACERX_DRIVER |
---|
5349 | G4VIS_USE_RAYTRACERX |
---|
5350 | |
---|
5351 | Allows for interactive ray-tracing graphics through X11. |
---|
5352 | The X11 package is required. |
---|
5353 | |
---|
5354 | EOM` |
---|
5355 | |
---|
5356 | dflt=$g4vis_use_raytracerx |
---|
5357 | rp=$g4message |
---|
5358 | . ./myread |
---|
5359 | gans=$ans |
---|
5360 | |
---|
5361 | case $gans in |
---|
5362 | |
---|
5363 | n*|N*) |
---|
5364 | g4vis_build_raytracerx_driver=n |
---|
5365 | g4vis_use_raytracerx=n |
---|
5366 | ;; |
---|
5367 | y*|Y*) |
---|
5368 | g4vis_build_raytracerx_driver=y |
---|
5369 | g4vis_use_raytracerx=y |
---|
5370 | ;; |
---|
5371 | esac |
---|
5372 | |
---|
5373 | ######################################################## |
---|
5374 | fi # if !WIN |
---|
5375 | |
---|
5376 | ############################################################### |
---|
5377 | if test "X$g4system" = "XWIN32-VC" -o "X$g4system" = "XWIN32-VC7"; then |
---|
5378 | |
---|
5379 | g4message=`cat << EOM |
---|
5380 | |
---|
5381 | G4VIS_BUILD_OIWIN32_DRIVER |
---|
5382 | G4VIS_USE_OIWIN32 |
---|
5383 | |
---|
5384 | Specifies to build and use the driver for the free X11 version of |
---|
5385 | OpenInventor on Windows systems. |
---|
5386 | The Windows version of OpenInventor is required. |
---|
5387 | |
---|
5388 | EOM` |
---|
5389 | |
---|
5390 | dflt=$g4vis_use_oiwin32 |
---|
5391 | rp=$g4message |
---|
5392 | . ./myread |
---|
5393 | gans=$ans |
---|
5394 | |
---|
5395 | case $gans in |
---|
5396 | |
---|
5397 | n*|N*) |
---|
5398 | g4vis_build_oiwin32_driver=n |
---|
5399 | g4vis_use_oiwin32=n |
---|
5400 | ;; |
---|
5401 | y*|Y*) |
---|
5402 | g4vis_build_oiwin32_driver=y |
---|
5403 | g4vis_use_oiwin32=y |
---|
5404 | ;; |
---|
5405 | esac |
---|
5406 | |
---|
5407 | ############################################################ |
---|
5408 | if test "X$g4vis_build_oiwin32_driver" = "Xy" ; then |
---|
5409 | |
---|
5410 | oiv_dirs=`find $g4vis_oivhome /usr/X11R6/include /usr/local/include /usr/include -type d -name Inventor 2>/dev/null|xargs echo` |
---|
5411 | #echo ogl_dirs=$ogl_dirs |
---|
5412 | |
---|
5413 | if test "X$oiv_dirs" != "X" ; then |
---|
5414 | |
---|
5415 | g4oiv_base_dir_found=`echo $oiv_dirs|cut -d" " -f1` |
---|
5416 | #echo g4ogl_base_dir_found=$g4ogl_base_dir_found |
---|
5417 | |
---|
5418 | # That's right: should be twice! (e.g./usr/local/lib/libGLU.so -> /usr/local) |
---|
5419 | g4oiv_base_dir_found=`dirname $g4oiv_base_dir_found` |
---|
5420 | g4oiv_base_dir_found=`dirname $g4oiv_base_dir_found` |
---|
5421 | |
---|
5422 | g4vis_oivhome=$g4oiv_base_dir_found |
---|
5423 | #else |
---|
5424 | #case "$g4vis_oivhome" in |
---|
5425 | #'') |
---|
5426 | # g4vis_oivhome=/usr |
---|
5427 | # ;; |
---|
5428 | #esac |
---|
5429 | fi |
---|
5430 | |
---|
5431 | ########################################################################## |
---|
5432 | |
---|
5433 | #if test "X$g4vis_oivhome" != "X" ; then |
---|
5434 | #oiv_dirs=$g4vis_oivhome |
---|
5435 | #fi |
---|
5436 | |
---|
5437 | if test "X$g4vis_oivhome" != "X" ; then |
---|
5438 | |
---|
5439 | g4message=`cat << EOM |
---|
5440 | |
---|
5441 | OIVHOME/include |
---|
5442 | OIVHOME/lib |
---|
5443 | |
---|
5444 | You have selected to use OpenInventor driver. |
---|
5445 | Specify the correct path (OIVHOME) where OpenInventor is installed in your system. |
---|
5446 | It was found in $g4vis_oivhome. Press [Enter] to set this path or type the correct one. |
---|
5447 | |
---|
5448 | You can set '-' (without quotation) to CANCEL the OpenInventor flag at all: |
---|
5449 | |
---|
5450 | EOM` |
---|
5451 | |
---|
5452 | dflt=$g4vis_oivhome |
---|
5453 | fn='d~(-)' |
---|
5454 | rp=$g4message |
---|
5455 | . ./getfile |
---|
5456 | |
---|
5457 | cend="no" |
---|
5458 | while test "$cend" = "no" ; do |
---|
5459 | if test -e "$ans/include/Inventor" || [ "X$ans" = "X-" ]; then |
---|
5460 | cend="yes" |
---|
5461 | if test "X$ans" != "X-" ; then |
---|
5462 | |
---|
5463 | g4vis_oivhome=$ans |
---|
5464 | |
---|
5465 | else |
---|
5466 | |
---|
5467 | g4vis_build_oiwin32_driver=n |
---|
5468 | g4vis_use_oiwin32=n |
---|
5469 | |
---|
5470 | fi |
---|
5471 | else |
---|
5472 | |
---|
5473 | g4message=`cat << EOM |
---|
5474 | |
---|
5475 | OIVHOME/include |
---|
5476 | OIVHOME/lib |
---|
5477 | |
---|
5478 | You have selected to use OpenInventor driver. |
---|
5479 | But it was not found in $ans. |
---|
5480 | Please specify the correct path where OpenInventor is installed in your system. |
---|
5481 | |
---|
5482 | You can set '-' (without quotation) to CANCEL the OpenInventor flag at all: |
---|
5483 | |
---|
5484 | EOM` |
---|
5485 | |
---|
5486 | dflt="" |
---|
5487 | fn='d~(-)' |
---|
5488 | rp=$g4message |
---|
5489 | . ./getfile |
---|
5490 | fi |
---|
5491 | done |
---|
5492 | |
---|
5493 | else |
---|
5494 | |
---|
5495 | g4message=`cat << EOM |
---|
5496 | |
---|
5497 | OIVHOME/include |
---|
5498 | OIVHOME/lib |
---|
5499 | |
---|
5500 | You have selected to use OpenInventor driver. |
---|
5501 | But it was not found in expected place. |
---|
5502 | Please specify the correct path where OpenInventor is installed in your system. |
---|
5503 | |
---|
5504 | You can set '-' (without quotation) to CANCEL the OpenInventor flag at all: |
---|
5505 | |
---|
5506 | EOM` |
---|
5507 | |
---|
5508 | dflt="" |
---|
5509 | fn='d~(-)' |
---|
5510 | rp=$g4message |
---|
5511 | . ./getfile |
---|
5512 | |
---|
5513 | cend="no" |
---|
5514 | while test "$cend" = "no" ; do |
---|
5515 | if test -e "$ans/include/Inventor" || [ "X$ans" = "X-" ]; then |
---|
5516 | cend="yes" |
---|
5517 | if test "X$ans" != "X-" ; then |
---|
5518 | |
---|
5519 | g4vis_oivhome=$ans |
---|
5520 | |
---|
5521 | else |
---|
5522 | |
---|
5523 | g4vis_build_oiwin32_driver=n |
---|
5524 | g4vis_use_oiwin32=n |
---|
5525 | |
---|
5526 | fi |
---|
5527 | else |
---|
5528 | |
---|
5529 | g4message=`cat << EOM |
---|
5530 | |
---|
5531 | OIVHOME/include |
---|
5532 | OIVHOME/lib |
---|
5533 | |
---|
5534 | You have selected to use OpenInventor driver. |
---|
5535 | But it was not found in $ans. |
---|
5536 | Please specify the correct path where OpenInventor is installed in your system. |
---|
5537 | |
---|
5538 | You can set '-' (without quotation) to CANCEL the OpenInventor flag at all: |
---|
5539 | |
---|
5540 | EOM` |
---|
5541 | |
---|
5542 | dflt="" |
---|
5543 | fn='d~(-)' |
---|
5544 | rp=$g4message |
---|
5545 | . ./getfile |
---|
5546 | fi |
---|
5547 | done |
---|
5548 | fi |
---|
5549 | |
---|
5550 | if test "X$g4osname" = "XLinux"; then |
---|
5551 | |
---|
5552 | if test "X$g4vis_oivhome" = "X/usr" -o "X$g4vis_oivhome" = "X/usr/local"; then |
---|
5553 | g4vis_oivhome="" |
---|
5554 | fi |
---|
5555 | fi |
---|
5556 | fi # g4vis_build_oiwin32_driver |
---|
5557 | |
---|
5558 | ############################################### |
---|
5559 | |
---|
5560 | fi # if WIN |
---|
5561 | ################################################################ |
---|
5562 | |
---|
5563 | if test "X$g4system" != "XWIN32-VC" -a "X$g4system" != "XWIN32-VC7"; then |
---|
5564 | |
---|
5565 | g4message=`cat << EOM |
---|
5566 | |
---|
5567 | G4VIS_BUILD_DAWNFILE_DRIVER |
---|
5568 | G4VIS_USE_DAWNFILE |
---|
5569 | |
---|
5570 | DAWN drivers are interfaces to Fukui Renderer DAWN. It is a vectorized 3D |
---|
5571 | PostScript processor, and so well suited to prepare technical high |
---|
5572 | quality outputs for presentation and/or documentation. |
---|
5573 | The DAWNFILE driver sends 3D data to DAWN via an intermediate file, |
---|
5574 | named g4.prim in the current directory. The file g4.prim is able to |
---|
5575 | be re-visualized later without the help of Geant4. |
---|
5576 | EOM` |
---|
5577 | |
---|
5578 | dflt=$g4vis_use_dawnfile |
---|
5579 | rp=$g4message |
---|
5580 | #. ./myread |
---|
5581 | #gans=$ans |
---|
5582 | gans=y |
---|
5583 | |
---|
5584 | case $gans in |
---|
5585 | |
---|
5586 | n*|N*) |
---|
5587 | g4vis_build_dawnfile_driver=n |
---|
5588 | g4vis_use_dawnfile=n |
---|
5589 | ;; |
---|
5590 | y*|Y*) |
---|
5591 | g4vis_build_dawnfile_driver=y |
---|
5592 | g4vis_use_dawnfile=y |
---|
5593 | ;; |
---|
5594 | esac |
---|
5595 | |
---|
5596 | g4message=`cat << EOM |
---|
5597 | |
---|
5598 | G4VIS_BUILD_RAYTRACER_DRIVER |
---|
5599 | G4VIS_USE_RAYTRACER |
---|
5600 | |
---|
5601 | It performs ray-tracing visualization using the tracking routines of Geant4. |
---|
5602 | It is, therefore, available for debugging tracking routines. |
---|
5603 | It is well suited for photo-realistic high quality output for |
---|
5604 | presentation, and for intuitive debugging of detector geometry. |
---|
5605 | EOM` |
---|
5606 | |
---|
5607 | dflt=$g4vis_use_raytracer |
---|
5608 | rp=$g4message |
---|
5609 | #. ./myread |
---|
5610 | #gans=$ans |
---|
5611 | gans=y |
---|
5612 | |
---|
5613 | case $gans in |
---|
5614 | |
---|
5615 | n*|N*) |
---|
5616 | g4vis_build_raytracer_driver=n |
---|
5617 | g4vis_use_raytracer=n |
---|
5618 | ;; |
---|
5619 | y*|Y*) |
---|
5620 | g4vis_build_raytracer_driver=y |
---|
5621 | g4vis_use_raytracer=y |
---|
5622 | ;; |
---|
5623 | esac |
---|
5624 | |
---|
5625 | g4message=`cat << EOM |
---|
5626 | |
---|
5627 | G4VIS_BUILD_VRML_DRIVER |
---|
5628 | G4VIS_USE_VRML |
---|
5629 | |
---|
5630 | These driver generate VRML files, which describe 3D scenes to be |
---|
5631 | visualized with a proper VRML viewer. |
---|
5632 | |
---|
5633 | EOM` |
---|
5634 | |
---|
5635 | dflt=$g4vis_use_vrml |
---|
5636 | rp=$g4message |
---|
5637 | . ./myread |
---|
5638 | gans=$ans |
---|
5639 | |
---|
5640 | case $gans in |
---|
5641 | |
---|
5642 | n*|N*) |
---|
5643 | g4vis_build_vrml_driver=n |
---|
5644 | g4vis_use_vrml=n |
---|
5645 | ;; |
---|
5646 | y*|Y*) |
---|
5647 | g4vis_build_vrml_driver=y |
---|
5648 | g4vis_use_vrml=y |
---|
5649 | ;; |
---|
5650 | esac |
---|
5651 | |
---|
5652 | g4message=`cat << EOM |
---|
5653 | |
---|
5654 | G4VIS_BUILD_VRMLFILE_DRIVER |
---|
5655 | G4VIS_USE_VRMLFILE |
---|
5656 | |
---|
5657 | This driver generates VRML files, which describe 3D scenes to be |
---|
5658 | visualized with a proper VRML viewer, at either a local or a remote host. |
---|
5659 | The VRMLFILE driver sends 3D data to your VRML viewer, which is running |
---|
5660 | in the same host machine as Geant4, via an intermediate file named |
---|
5661 | g4.wrl created in the current directory. This file is available for |
---|
5662 | re-visualization afterwards. In visualization, you should specify a |
---|
5663 | name of the VRML viewer by setting the environment variable G4VRML_VIEWER |
---|
5664 | beforehand. |
---|
5665 | EOM` |
---|
5666 | |
---|
5667 | dflt=$g4vis_use_vrmlfile |
---|
5668 | rp=$g4message |
---|
5669 | #. ./myread |
---|
5670 | #gans=$ans |
---|
5671 | gans=y |
---|
5672 | |
---|
5673 | case $gans in |
---|
5674 | |
---|
5675 | n*|N*) |
---|
5676 | g4vis_build_vrmlfile_driver=n |
---|
5677 | g4vis_use_vrmlfile=n |
---|
5678 | ;; |
---|
5679 | y*|Y*) |
---|
5680 | g4vis_build_vrmlfile_driver=y |
---|
5681 | g4vis_use_vrmlfile=y |
---|
5682 | ;; |
---|
5683 | esac |
---|
5684 | |
---|
5685 | fi # if !WIN |
---|
5686 | |
---|
5687 | g4message=`cat << EOM |
---|
5688 | |
---|
5689 | G4VIS_BUILD_ASCIITREE_DRIVER |
---|
5690 | G4VIS_USE_ASCIITREE |
---|
5691 | |
---|
5692 | Description???????????????????????? |
---|
5693 | EOM` |
---|
5694 | |
---|
5695 | dflt=$g4vis_use_asciitree |
---|
5696 | rp=$g4message |
---|
5697 | # Don't ask by default and set to 'y'! |
---|
5698 | #. ./myread |
---|
5699 | #gans=$ans |
---|
5700 | gans=y |
---|
5701 | |
---|
5702 | case $gans in |
---|
5703 | |
---|
5704 | n*|N*) |
---|
5705 | g4vis_build_asciitree_driver=n |
---|
5706 | g4vis_use_asciitree=n |
---|
5707 | ;; |
---|
5708 | y*|Y*) |
---|
5709 | g4vis_build_asciitree_driver=y |
---|
5710 | g4vis_use_asciitree=y |
---|
5711 | ;; |
---|
5712 | esac |
---|
5713 | |
---|
5714 | |
---|
5715 | g4message=`cat << EOM |
---|
5716 | |
---|
5717 | G4VIS_BUILD_GAGTREE_DRIVER |
---|
5718 | G4VIS_USE_GAGTREE |
---|
5719 | |
---|
5720 | Description???????????????????????? |
---|
5721 | EOM` |
---|
5722 | |
---|
5723 | dflt=$g4vis_use_gagtree |
---|
5724 | rp=$g4message |
---|
5725 | # Don't ask by default and set to 'y'! |
---|
5726 | #. ./myread |
---|
5727 | #gans=$ans |
---|
5728 | gans=y |
---|
5729 | |
---|
5730 | case $gans in |
---|
5731 | |
---|
5732 | n*|N*) |
---|
5733 | g4vis_build_gagtree_driver=n |
---|
5734 | g4vis_use_gagtree=n |
---|
5735 | ;; |
---|
5736 | y*|Y*) |
---|
5737 | g4vis_build_gagtree_driver=y |
---|
5738 | g4vis_use_gagtree=y |
---|
5739 | ;; |
---|
5740 | esac |
---|
5741 | |
---|
5742 | ;; |
---|
5743 | esac |
---|
5744 | |
---|
5745 | if test "X$g4system" != "XWIN32-VC" -a "X$g4system" != "XWIN32-VC7" -a "X$g4system" != "XDarwin-g++"; then |
---|
5746 | |
---|
5747 | #echo PASS1 |
---|
5748 | |
---|
5749 | if [ X$g4vis_build_openglx_driver = Xy ] || [ X$g4vis_build_openglxm_driver = Xy ] || [ X$g4vis_build_openglwin32_driver = Xy ] ; then |
---|
5750 | |
---|
5751 | #echo PASS2 |
---|
5752 | |
---|
5753 | ##################################################################### |
---|
5754 | ogl_dirs=`find $g4vis_oglhome /usr/X11R6/include /usr/local/include /usr/include -type d -name GL 2>/dev/null|xargs echo` |
---|
5755 | #echo ogl_dirs=$ogl_dirs |
---|
5756 | |
---|
5757 | if test "X$ogl_dirs" != "X" ; then |
---|
5758 | |
---|
5759 | g4ogl_base_dir_found=`echo $ogl_dirs|cut -d" " -f1` |
---|
5760 | #echo g4ogl_base_dir_found=$g4ogl_base_dir_found |
---|
5761 | |
---|
5762 | # That's right: should be twice! (e.g./usr/local/lib/libGLU.so -> /usr/local) |
---|
5763 | g4ogl_base_dir_found=`dirname $g4ogl_base_dir_found` |
---|
5764 | g4ogl_base_dir_found=`dirname $g4ogl_base_dir_found` |
---|
5765 | |
---|
5766 | g4vis_oglhome=$g4ogl_base_dir_found |
---|
5767 | #else |
---|
5768 | #case "$g4vis_oglhome" in |
---|
5769 | #'') |
---|
5770 | # g4vis_oglhome=/usr |
---|
5771 | # ;; |
---|
5772 | #esac |
---|
5773 | fi |
---|
5774 | |
---|
5775 | ########################################################################## |
---|
5776 | if test "X$g4vis_oglhome" != "X" ; then |
---|
5777 | ogl_dirs=$g4vis_oglhome |
---|
5778 | fi |
---|
5779 | |
---|
5780 | if test "X$ogl_dirs" != "X" ; then |
---|
5781 | |
---|
5782 | g4message=`cat << EOM |
---|
5783 | |
---|
5784 | OGLHOME/include |
---|
5785 | OGLHOME/lib |
---|
5786 | |
---|
5787 | You have selected to use OpenGL driver. |
---|
5788 | Specify the correct path (OGLHOME) where OpenGL is installed in your system. |
---|
5789 | It was found in $g4vis_oglhome. Press [Enter] to set this path or type the correct one. |
---|
5790 | |
---|
5791 | You can set '-' (without quotation) to CANCEL the OpenGL flag at all: |
---|
5792 | |
---|
5793 | EOM` |
---|
5794 | |
---|
5795 | dflt=$g4vis_oglhome |
---|
5796 | fn='d~(-)' |
---|
5797 | rp=$g4message |
---|
5798 | . ./getfile |
---|
5799 | |
---|
5800 | cend="no" |
---|
5801 | while test "$cend" = "no" ; do |
---|
5802 | if test -e "$ans/include/GL" || [ "X$ans" = "X-" ]; then |
---|
5803 | cend="yes" |
---|
5804 | |
---|
5805 | if test "X$ans" != "X-" ; then |
---|
5806 | |
---|
5807 | g4vis_oglhome=$ans |
---|
5808 | |
---|
5809 | else |
---|
5810 | |
---|
5811 | g4vis_build_openglx_driver=n |
---|
5812 | g4vis_use_openglx=n |
---|
5813 | |
---|
5814 | g4vis_build_openglxm_driver=n |
---|
5815 | g4vis_use_openglxm=n |
---|
5816 | |
---|
5817 | g4vis_build_openglwin32_driver=n |
---|
5818 | g4vis_use_openglwin32=n |
---|
5819 | |
---|
5820 | fi |
---|
5821 | else |
---|
5822 | |
---|
5823 | g4message=`cat << EOM |
---|
5824 | |
---|
5825 | OGLHOME/include |
---|
5826 | OGLHOME/lib |
---|
5827 | |
---|
5828 | You have selected to use OpenGL driver. |
---|
5829 | But it was not found in $ans. |
---|
5830 | Please specify the correct path where OpenGL is installed in your system. |
---|
5831 | |
---|
5832 | You can set '-' (without quotation) to CANCEL the OpenGL flag at all: |
---|
5833 | |
---|
5834 | EOM` |
---|
5835 | |
---|
5836 | dflt="" |
---|
5837 | fn='d~(-)' |
---|
5838 | rp=$g4message |
---|
5839 | . ./getfile |
---|
5840 | fi |
---|
5841 | done |
---|
5842 | |
---|
5843 | else |
---|
5844 | |
---|
5845 | g4message=`cat << EOM |
---|
5846 | |
---|
5847 | OGLHOME/include |
---|
5848 | OGLHOME/lib |
---|
5849 | |
---|
5850 | You have selected to use OpenGL driver. |
---|
5851 | But it was not found in expected place. |
---|
5852 | Please specify the correct path where OpenGL is installed in your system. |
---|
5853 | |
---|
5854 | You can set '-' (without quotation) to CANCEL the OpenGL flag at all: |
---|
5855 | |
---|
5856 | EOM` |
---|
5857 | |
---|
5858 | dflt="" |
---|
5859 | fn='d~(-)' |
---|
5860 | rp=$g4message |
---|
5861 | . ./getfile |
---|
5862 | |
---|
5863 | cend="no" |
---|
5864 | while test "$cend" = "no" ; do |
---|
5865 | if test -e "$ans/include/GL" || [ "X$ans" = "X-" ]; then |
---|
5866 | cend="yes" |
---|
5867 | |
---|
5868 | if test "X$ans" != "X-" ; then |
---|
5869 | |
---|
5870 | g4vis_oglhome=$ans |
---|
5871 | |
---|
5872 | else |
---|
5873 | |
---|
5874 | g4vis_build_openglx_driver=n |
---|
5875 | g4vis_use_openglx=n |
---|
5876 | |
---|
5877 | g4vis_build_openglxm_driver=n |
---|
5878 | g4vis_use_openglxm=n |
---|
5879 | |
---|
5880 | g4vis_build_openglwin32_driver=n |
---|
5881 | g4vis_use_openglwin32=n |
---|
5882 | |
---|
5883 | fi |
---|
5884 | else |
---|
5885 | |
---|
5886 | g4message=`cat << EOM |
---|
5887 | |
---|
5888 | OGLHOME/include |
---|
5889 | OGLHOME/lib |
---|
5890 | |
---|
5891 | You have selected to use OpenGL driver. |
---|
5892 | But it was not found in $ans. |
---|
5893 | Please specify the correct path where OpenGL is installed in your system. |
---|
5894 | |
---|
5895 | You can set '-' (without quotation) to CANCEL the OpenGL flag at all: |
---|
5896 | |
---|
5897 | EOM` |
---|
5898 | |
---|
5899 | dflt="" |
---|
5900 | fn='d~(-)' |
---|
5901 | rp=$g4message |
---|
5902 | . ./getfile |
---|
5903 | fi |
---|
5904 | done |
---|
5905 | |
---|
5906 | fi |
---|
5907 | |
---|
5908 | if test "X$g4osname" = "XLinux"; then |
---|
5909 | |
---|
5910 | if test "X$g4vis_oglhome" = "X/usr" -o "X$g4vis_oglhome" = "X/usr/local"; then |
---|
5911 | g4vis_oglhome="" |
---|
5912 | fi |
---|
5913 | |
---|
5914 | fi # if platform (Linux vs SUN) |
---|
5915 | |
---|
5916 | fi # if need |
---|
5917 | ########################################### |
---|
5918 | fi # if platform (Unix vs Win) |
---|
5919 | |
---|
5920 | # |
---|
5921 | # BEGIN QTVIS/QT PROBE |
---|
5922 | # |
---|
5923 | |
---|
5924 | # |
---|
5925 | # We only run on a Linux-g++ or Darwin-g++ system |
---|
5926 | # |
---|
5927 | if test "x$g4system" = "xLinux-g++" -o "x$g4system" = "xDarwin-g++" ; then |
---|
5928 | |
---|
5929 | # Only proceed further if g4vis_none is not set |
---|
5930 | if test "x$g4vis_none" = "xn" ; then |
---|
5931 | #Query the user on whether to activate the module |
---|
5932 | g4message=`cat << EOM |
---|
5933 | |
---|
5934 | G4VIS_BUILD_OPENGLQT_DRIVER |
---|
5935 | G4VIS_USE_OPENGLQT |
---|
5936 | |
---|
5937 | Setting these variables will enable the building of the G4 OpenGL Qt based |
---|
5938 | visualisation driver and the use of this driver in your applications |
---|
5939 | respectively. |
---|
5940 | The Qt headers, libraries and binaries are required to enable the |
---|
5941 | building of this module. |
---|
5942 | Do you want to enable build and use of this module? |
---|
5943 | EOM` |
---|
5944 | |
---|
5945 | #Read the user response |
---|
5946 | dflt=$g4vis_build_openglqt_driver |
---|
5947 | rp=$g4message |
---|
5948 | . ./myread |
---|
5949 | gans=$ans |
---|
5950 | |
---|
5951 | # |
---|
5952 | # Check response |
---|
5953 | # |
---|
5954 | case $gans in |
---|
5955 | n*|N*) |
---|
5956 | g4vis_build_openglqt_driver=n |
---|
5957 | g4vis_use_openglqt=n |
---|
5958 | ;; |
---|
5959 | y*|Y*) |
---|
5960 | g4vis_build_openglqt_driver=y |
---|
5961 | g4vis_use_openglqt=y |
---|
5962 | ;; |
---|
5963 | esac |
---|
5964 | |
---|
5965 | ################### |
---|
5966 | |
---|
5967 | |
---|
5968 | |
---|
5969 | #################################################################### |
---|
5970 | # Now, if we have selected to build the driver, we need to check for |
---|
5971 | # a Qt installation, which may have been done for use by the UI |
---|
5972 | # module... |
---|
5973 | # |
---|
5974 | if test "x$g4vis_build_openglqt_driver" = "xy" ; then |
---|
5975 | |
---|
5976 | #Now check whether g4_qthome has been set previously - if it hasn't |
---|
5977 | #proceed to probe for Qt... (assume it's unfiltered, i.e. not |
---|
5978 | #set to '' by earlier probe if it was /usr or /usr/local |
---|
5979 | if test "x$g4_qtmochome" != "x" && test "x$g4_qtlibdir" != "x" && test "x$g4_qtincdir" != "x" ; then |
---|
5980 | echo " " |
---|
5981 | echo "configure: Qt preconfigured, no recheck neccessary" |
---|
5982 | else |
---|
5983 | ################################################################# |
---|
5984 | #We repeat the search used for the UI module |
---|
5985 | |
---|
5986 | echo " " |
---|
5987 | g4_havegoodqt=no |
---|
5988 | |
---|
5989 | # Look for qt4 moc |
---|
5990 | g4_qtmochome=`./loc moc no $QTDIR/bin /usr/lib/qt4/bin /usr/lib/qt/bin /usr/local/qt/bin /usr/local/bin /usr/bin /bin /usr/share/qt4/bin /usr/X11R6/bin /sw/bin` |
---|
5991 | if test "x$g4_qtmochome" = "xno" ; then |
---|
5992 | # Look for qt3 moc |
---|
5993 | g4_qtmochome=`./loc moc no /usr/lib/qt3/bin /usr/share/qt3/bin` |
---|
5994 | fi |
---|
5995 | |
---|
5996 | # if not found |
---|
5997 | if test "x$g4_qtmochome" != "xno" ; then |
---|
5998 | echo "checking Qt moc tool in... $g4_qtmochome" |
---|
5999 | # check Qt version |
---|
6000 | g4_qtver=`$g4_qtmochome 2>&1 -v | $sed 's/.* .Qt \([0-9]\)\..*/\1/' ` |
---|
6001 | echo "checking Qt version... $g4_qtver" |
---|
6002 | if test "x$g4_qtver" = "x3" || test "x$g4_qtver" = "x4" ;then |
---|
6003 | |
---|
6004 | # checking includes first get QTDIR location, then qt$g4_qtver, sw, standard, shared, X11 |
---|
6005 | |
---|
6006 | incQtFiles=" $QTDIR/include /usr/include/qt$g4_qtver /usr/include/qt$g4_qtver/Qt /usr/lib/qt$g4_qtver/include /sw/include/qt /usr/lib/qt/include /usr/local/qt/include /usr/local/include /usr/include /usr/include/qt /usr/share/qt$g4_qtver/include /usr/X11R6/include /usr/X11R6/include/qt$g4_qtver /usr/X11R6/include/qt" |
---|
6007 | |
---|
6008 | if test "X$g4osname" = "XDarwin" && test "X$g4_qtver" = "X4"; then |
---|
6009 | incQtFiles="$incQtFiles /Library/Frameworks/QtCore.framework/Headers/" |
---|
6010 | g4_qtincdir=`./loc qglobal.h no $incQtFiles` |
---|
6011 | if test "x$g4_qtincdir" != "xno" ; then |
---|
6012 | g4_qtincdir="/Library/Frameworks" |
---|
6013 | fi |
---|
6014 | else |
---|
6015 | g4_qtincdir=`./loc qglobal.h no $incQtFiles` |
---|
6016 | fi |
---|
6017 | |
---|
6018 | |
---|
6019 | if test "x$g4_qtincdir" != "xno" ; then |
---|
6020 | if test "x$g4_qtincdir" != "x/Library/Frameworks" ; then |
---|
6021 | g4_qtincdir=`dirname $g4_qtincdir` |
---|
6022 | fi |
---|
6023 | echo "checking Qt includes dir in... $g4_qtincdir" |
---|
6024 | |
---|
6025 | |
---|
6026 | # checking libs, includes first get QTDIR location, then qt$g4_qtver, sw, standard, shared, X11 |
---|
6027 | |
---|
6028 | libQtFiles="$QTDIR/lib $QTDIR/lib64 /usr/lib/qt$g4_qtver/lib /usr/lib/qt$g4_qtver/lib64 /usr/lib/qt$g4_qtver /usr/lib/qt$g4_qtver /sw/lib /sw/lib/qt /sw/lib/qt$g4_qtver /sw/lib/qt$g4_qtver/lib /usr/lib/qt/lib /usr/local/qt/lib /usr/local/lib /usr/lib /usr/lib/qt /usr/share/qt$g4_qtver/lib /usr/X11R6/lib/qt /usr/X11R6/lib/qt$g4_qtver /usr/X11R6/lib /usr/X11R6/lib/qt" |
---|
6029 | |
---|
6030 | if test "X$g4osname" = "XDarwin" && test "X$g4_qtincdir" = "X/Library/Frameworks" ; then |
---|
6031 | g4_qtlibdir=`./loc QtCore no /Library/Frameworks/QtCore.framework/Versions/$g4_qtver/ $libQtFiles` |
---|
6032 | g4_qtlibdir=`dirname $g4_qtlibdir` |
---|
6033 | g4_qtlibdir=`dirname $g4_qtlibdir` |
---|
6034 | g4_qtlibdir=`dirname $g4_qtlibdir` |
---|
6035 | else |
---|
6036 | g4_qtlibdir=`./loc libqt* no $libQtFiles` |
---|
6037 | fi |
---|
6038 | if test "x$g4_qtlibdir" != "xno" ; then |
---|
6039 | g4_qtlibdir=`dirname $g4_qtlibdir` |
---|
6040 | echo "checking Qt lib dir in... $g4_qtlibdir" |
---|
6041 | g4_havegoodqt=yes |
---|
6042 | else |
---|
6043 | echo "Failed to find Qt lib dir in : $libQtFiles" |
---|
6044 | fi |
---|
6045 | else |
---|
6046 | echo "Failed to find Qt includes dir in : $incQtFiles" |
---|
6047 | fi #END CHECK QTLIBS |
---|
6048 | else |
---|
6049 | echo "Qt $g4_qtver is not actually support with this driver" |
---|
6050 | fi #END CHECK QTINC |
---|
6051 | fi #END CHECK QTVER |
---|
6052 | fi # END OF PRECONFIG |
---|
6053 | # |
---|
6054 | # END QT AUTOPROBE |
---|
6055 | #################################################################### |
---|
6056 | |
---|
6057 | |
---|
6058 | |
---|
6059 | |
---|
6060 | |
---|
6061 | |
---|
6062 | #################################################################### |
---|
6063 | # Based on result of Qt autoprobe, we decide if user input is needed to |
---|
6064 | # locate Qt... |
---|
6065 | # |
---|
6066 | if test "x$g4_havegoodqt" = "xno" ; then |
---|
6067 | promptend="no" |
---|
6068 | qthomeloc="the standard locations" |
---|
6069 | |
---|
6070 | g4message=`cat << EOM |
---|
6071 | |
---|
6072 | Autodetection failed to locate Qt on your system. |
---|
6073 | Please enter the path to your Qt install (i.e. if Qt is installed |
---|
6074 | in PATH/include/Qt, or PATH/include $PATH/include/qt, enter PATH), or type '-' to |
---|
6075 | CANCEL the build of the Qt UI module. |
---|
6076 | Qt path: |
---|
6077 | EOM` |
---|
6078 | dflt="/usr" |
---|
6079 | g4_qtmochome="/usr" |
---|
6080 | fn='d~(-)' |
---|
6081 | rp=$g4message |
---|
6082 | . ./getfile |
---|
6083 | |
---|
6084 | #Check for user cancellation |
---|
6085 | if test "x$ans" = "x-" ; then |
---|
6086 | g4ui_build_qt_session=n |
---|
6087 | g4ui_use_qt=n |
---|
6088 | echo "build/use of Qt UI module cancelled..." |
---|
6089 | promptend=yes |
---|
6090 | |
---|
6091 | else |
---|
6092 | #We want to probe for Qt in the user supplied directory |
---|
6093 | echo " " |
---|
6094 | qthomeloc=$ans |
---|
6095 | g4_havegoodqt=no |
---|
6096 | |
---|
6097 | |
---|
6098 | # check for moc |
---|
6099 | |
---|
6100 | g4_qtmochome=`./loc moc no $ans/bin` |
---|
6101 | if test "x$g4_qtmochome" = "xno" ; then |
---|
6102 | while test "x$promptend" = "xno" ; do |
---|
6103 | g4message=`cat << EOM |
---|
6104 | |
---|
6105 | Failed to locate Qt moc tool on your system. |
---|
6106 | Please enter the path to your Qt moc tool install or type '-' to |
---|
6107 | CANCEL the build of the Qt UI module. |
---|
6108 | Qt moc path: |
---|
6109 | EOM` |
---|
6110 | fn='d~(-)' |
---|
6111 | rp=$g4message |
---|
6112 | . ./getfile |
---|
6113 | |
---|
6114 | #Check for user cancellation |
---|
6115 | if test "x$ans" = "x-" ; then |
---|
6116 | g4ui_build_qt_session=n |
---|
6117 | g4ui_use_qt=n |
---|
6118 | echo "build/use of Qt UI module cancelled..." |
---|
6119 | promptend=yes |
---|
6120 | |
---|
6121 | else |
---|
6122 | #We want to probe for Qt in the user supplied directory |
---|
6123 | echo " " |
---|
6124 | # check for moc |
---|
6125 | g4_qtmochome=`./loc moc no $ans/bin` |
---|
6126 | if test "x$g4_qtmochome" != "xno" ; then |
---|
6127 | promptend=yes |
---|
6128 | fi |
---|
6129 | fi |
---|
6130 | done |
---|
6131 | fi # ASK FOR QT MOC |
---|
6132 | if test "x$g4_qtmochome" != "xno" ; then |
---|
6133 | echo "checking Qt moc tool in... $g4_qtmochome" |
---|
6134 | fi |
---|
6135 | |
---|
6136 | # if moc ok, then check for version |
---|
6137 | if test "x$g4_qtmochome" != "xno" ; then |
---|
6138 | g4_qtver=`$g4_qtmochome 2>&1 -v | $sed 's/.* .Qt \([0-9]\)\..*/\1/' ` |
---|
6139 | echo "checking Qt version... $g4_qtver" |
---|
6140 | |
---|
6141 | if test "x$g4_qtver" = "x3" || test "x$g4_qtver" = "x4";then |
---|
6142 | |
---|
6143 | # if version ok check for includes |
---|
6144 | # checking includes in qt$g4_qtver, then standard |
---|
6145 | incQtFiles="$qthomeloc/lib/qt$g4_qtver/include $qthomeloc/include/qt$g4_qtver/Qt $qthomeloc/include/qt$g4_qtver $qthomeloc/include $qthomeloc/include/Qt " |
---|
6146 | |
---|
6147 | if test "X$g4osname" = "XDarwin" && test "X$g4_qtver" = "X4"; then |
---|
6148 | incQtFiles="$incQtFiles /Library/Frameworks/QtCore.framework/Headers/ $qthomeloc/QtCore.framework/Headers/" |
---|
6149 | g4_qtincdir=`./loc qglobal.h no $incQtFiles` |
---|
6150 | if test "x$g4_qtincdir" != "xno" ; then |
---|
6151 | g4_qtincdir=`dirname $g4_qtincdir` |
---|
6152 | g4_qtincdir=`dirname $g4_qtincdir` |
---|
6153 | fi |
---|
6154 | else |
---|
6155 | g4_qtincdir=`./loc qglobal.h no $incQtFiles` |
---|
6156 | fi |
---|
6157 | if test "x$g4_qtincdir" = "xno" ; then |
---|
6158 | while test "x$promptend" = "xno" ; do |
---|
6159 | g4message=`cat << EOM |
---|
6160 | |
---|
6161 | Failed to locate Qt include directory on your system. |
---|
6162 | Please enter the path to your Qt include directory install or type '-' to |
---|
6163 | CANCEL the build of the Qt UI module. |
---|
6164 | Qt include path: |
---|
6165 | EOM` |
---|
6166 | fn='d~(-)' |
---|
6167 | rp=$g4message |
---|
6168 | . ./getfile |
---|
6169 | |
---|
6170 | #Check for user cancellation |
---|
6171 | if test "x$ans" = "x-" ; then |
---|
6172 | g4ui_build_qt_session=n |
---|
6173 | g4ui_use_qt=n |
---|
6174 | echo "build/use of Qt UI module cancelled..." |
---|
6175 | promptend=yes |
---|
6176 | |
---|
6177 | else |
---|
6178 | #We want to probe for Qt in the user supplied directory |
---|
6179 | echo " " |
---|
6180 | # check for include |
---|
6181 | g4_qtincdir=`./loc qglobal.h no $ans` |
---|
6182 | if test "x$g4_qtincdir" != "xno" ; then |
---|
6183 | promptend=yes |
---|
6184 | fi |
---|
6185 | fi |
---|
6186 | done |
---|
6187 | fi # ASK FOR QT INC |
---|
6188 | if test "x$g4_qtincdir" != "xno" ; then |
---|
6189 | g4_qtincdir=`dirname $g4_qtincdir` |
---|
6190 | echo "checking Qt inc dir in... $g4_qtincdir" |
---|
6191 | fi |
---|
6192 | # if qt inc ok, then check for libs |
---|
6193 | if test "x$g4_qtincdir" != "xno" ; then |
---|
6194 | |
---|
6195 | # checking libraries in qt$g4_qtver, then standard |
---|
6196 | libQtFiles="$qthomeloc/lib/qt$g4_qtver/lib $qthomeloc/lib/qt$g4_qtver $qthomeloc/lib/qt$g4_qtver $qthomeloc/lib/qt$g4_qtver/lib64 $qthomeloc/lib $qthomeloc/lib64 $qthomeloc/lib/qt/lib $qthomeloc/lib/qt $qthomeloc/lib64" |
---|
6197 | |
---|
6198 | if test "X$g4osname" = "XDarwin" && test "X$g4_qtincdir" = "X/Library/Frameworks" ; then |
---|
6199 | g4_qtlibdir=`./loc QtCore no /Library/Frameworks/QtCore.framework/Versions/$g4_qtver/ $libQtFiles` |
---|
6200 | g4_qtlibdir=`dirname $g4_qtlibdir` |
---|
6201 | g4_qtlibdir=`dirname $g4_qtlibdir` |
---|
6202 | g4_qtlibdir=`dirname $g4_qtlibdir` |
---|
6203 | else |
---|
6204 | g4_qtlibdir=`./loc libqt* no $libQtFiles` |
---|
6205 | fi |
---|
6206 | if test "x$g4_qtlibdir" = "xno" ; then |
---|
6207 | while test "x$promptend" = "xno" ; do |
---|
6208 | g4message=`cat << EOM |
---|
6209 | |
---|
6210 | Failed to locate Qt lib directory on your system. |
---|
6211 | Please enter the path to your Qt lib directory install or type '-' to |
---|
6212 | CANCEL the build of the Qt UI module. |
---|
6213 | Qt library path: |
---|
6214 | EOM` |
---|
6215 | fn='d~(-)' |
---|
6216 | rp=$g4message |
---|
6217 | . ./getfile |
---|
6218 | |
---|
6219 | #Check for user cancellation |
---|
6220 | if test "x$ans" = "x-" ; then |
---|
6221 | g4ui_build_qt_session=n |
---|
6222 | g4ui_use_qt=n |
---|
6223 | echo "build/use of Qt UI module cancelled..." |
---|
6224 | promptend=yes |
---|
6225 | |
---|
6226 | else |
---|
6227 | #We want to probe for Qt in the user supplied directory |
---|
6228 | echo " " |
---|
6229 | # check for libraries |
---|
6230 | if test "X$g4osname" = "XDarwin" && test "X$g4_qtincdir" = "X/Library/Frameworks" ; then |
---|
6231 | g4_qtlibdir=`./loc QtCore* no $libQtFiles /Library/Frameworks/` |
---|
6232 | else |
---|
6233 | g4_qtlibdir=`./loc libqt* no $libQtFiles` |
---|
6234 | fi |
---|
6235 | if test "x$g4_qtlibdir" != "xno" ; then |
---|
6236 | promptend=yes |
---|
6237 | fi |
---|
6238 | fi |
---|
6239 | done |
---|
6240 | fi # END OF LIB CHECK |
---|
6241 | if test "x$g4_qtlibdir" != "xno" ; then |
---|
6242 | g4_qtlibdir=`dirname $g4_qtlibdir` |
---|
6243 | echo "checking Qt lib dir in... $g4_qtlibdir" |
---|
6244 | promptend=yes |
---|
6245 | g4_havegoodqt=yes |
---|
6246 | fi |
---|
6247 | |
---|
6248 | else # END OF INC CHECK |
---|
6249 | g4_qtincdir=no |
---|
6250 | fi |
---|
6251 | else # END OF VERSION CHECK |
---|
6252 | g4_qtmochome=no |
---|
6253 | fi |
---|
6254 | fi # END OF MOC CHECK |
---|
6255 | |
---|
6256 | fi #END CHECK USER CANCELLATION |
---|
6257 | |
---|
6258 | fi #END USER DIRECTED QT DETECTION |
---|
6259 | # |
---|
6260 | #END QT USER INPUT PROBE |
---|
6261 | #################################################################### |
---|
6262 | |
---|
6263 | fi #END TEST G4VIS_BUILD_OPENGLQT_DRIVER = y |
---|
6264 | |
---|
6265 | |
---|
6266 | # |
---|
6267 | # Put a filter in here on /usr and /usr/local as QTHOME in line |
---|
6268 | # with other paths - done here as this is the last place QT is |
---|
6269 | # checked for |
---|
6270 | #DEACTIVATED AT PRESENT BECAUSE OF USE OF MOC |
---|
6271 | # |
---|
6272 | #if test "x$g4_qthome" = "x/usr" -o "x$g4_qthome" = "x/usr/local" ; then |
---|
6273 | # g4_qthome="" |
---|
6274 | #fi |
---|
6275 | |
---|
6276 | |
---|
6277 | fi #END TEST G4VIS_NONE IS N |
---|
6278 | |
---|
6279 | fi #END TEST G4SYSTEM IS Linux-g++ OR Darwin-g++ |
---|
6280 | |
---|
6281 | # |
---|
6282 | # END OF QTVIS/QT PROBE |
---|
6283 | |
---|
6284 | # |
---|
6285 | # BEGIN GDML/XERCESC PROBE |
---|
6286 | # |
---|
6287 | |
---|
6288 | # Set default build option to no |
---|
6289 | echo " " |
---|
6290 | case "$g4lib_build_gdml" in |
---|
6291 | '') |
---|
6292 | g4lib_build_gdml=n |
---|
6293 | ;; |
---|
6294 | esac |
---|
6295 | |
---|
6296 | |
---|
6297 | # Now query the user to see if they want to build the GDML plugin |
---|
6298 | echo "" |
---|
6299 | |
---|
6300 | g4message=`cat << EOM |
---|
6301 | |
---|
6302 | G4LIB_BUILD_GDML |
---|
6303 | |
---|
6304 | Setting this variable will enable building of the GDML plugin module embedded |
---|
6305 | in Geant4 for detector description persistency. |
---|
6306 | It requires your system to have the XercesC library and headers installed. |
---|
6307 | Do you want to set this variable? |
---|
6308 | |
---|
6309 | EOM` |
---|
6310 | |
---|
6311 | # |
---|
6312 | # read in the users response |
---|
6313 | # |
---|
6314 | dflt=$g4lib_build_gdml |
---|
6315 | rp=$g4message |
---|
6316 | . ./myread |
---|
6317 | gans=$ans |
---|
6318 | |
---|
6319 | # |
---|
6320 | # Check response |
---|
6321 | # |
---|
6322 | case $gans in |
---|
6323 | n*|N*) |
---|
6324 | g4lib_build_gdml=n |
---|
6325 | ;; |
---|
6326 | y*|Y*) |
---|
6327 | g4lib_build_gdml=y |
---|
6328 | ;; |
---|
6329 | esac |
---|
6330 | |
---|
6331 | |
---|
6332 | # |
---|
6333 | # If user does want to build GDML plugin, now try to locate Xerces install |
---|
6334 | # |
---|
6335 | if test "X$g4lib_build_gdml" != "Xn"; then |
---|
6336 | |
---|
6337 | if test "X$g4gdml_xercesc_root" = "X"; then |
---|
6338 | #probe for Xerces, using example from UI and Vis |
---|
6339 | xercesc_root=`find $g4gdml_xercesc_root /usr/include /usr/local/include \ |
---|
6340 | /opt/local/include /sw/include -type d -name xercesc 2>/dev/null | xargs echo` |
---|
6341 | |
---|
6342 | #If we got something, strip off the include/xerces part |
---|
6343 | if test "X$xercesc_root" != "X"; then |
---|
6344 | g4gdml_xercesc_root=`dirname $xercesc_root` |
---|
6345 | g4gdml_xercesc_root=`dirname $g4gdml_xercesc_root` |
---|
6346 | |
---|
6347 | echo " " |
---|
6348 | echo "checking for XercesC install... $g4gdml_xercesc_root" |
---|
6349 | else |
---|
6350 | g4gdml_xercesc_root="" |
---|
6351 | echo " " |
---|
6352 | echo "checking for XercesC install... no" |
---|
6353 | fi |
---|
6354 | fi #END OF XERCES AUTOPROBE |
---|
6355 | |
---|
6356 | # |
---|
6357 | # If the autoprobe failed, prompt the user to enter the path to the Xerces |
---|
6358 | # install |
---|
6359 | # |
---|
6360 | if test "X$g4gdml_xercesc_root" = "X"; then |
---|
6361 | |
---|
6362 | promptend="no" |
---|
6363 | xercesloc="the standard locations" |
---|
6364 | |
---|
6365 | while test "$promptend" = "no"; do |
---|
6366 | g4message=`cat << EOM |
---|
6367 | |
---|
6368 | Autodetection failed to locate XercesC in $xercesloc on your system. |
---|
6369 | Please enter the path to your XercesC install (i.e. if XercesC is installed |
---|
6370 | in PATH/include/xercesc, enter PATH), or type '-' to CANCEL the build of the |
---|
6371 | GDML module. |
---|
6372 | XercesC path: |
---|
6373 | EOM` |
---|
6374 | |
---|
6375 | dflt=$g4gdml_xercesc_root |
---|
6376 | fn='d~(-)' |
---|
6377 | rp=$g4message |
---|
6378 | . ./getfile |
---|
6379 | |
---|
6380 | #check for user cancellation |
---|
6381 | if test "X$ans" = "X-"; then |
---|
6382 | g4lib_build_gdml=n |
---|
6383 | g4gdml_xercesc_root="" |
---|
6384 | echo "G4LIB_BUILD_GDML cancelled..." |
---|
6385 | promptend=yes |
---|
6386 | else |
---|
6387 | if test -r "$ans/include/xercesc"; then |
---|
6388 | g4gdml_xercesc_root=$ans |
---|
6389 | echo "checking for XercesC install... $g4gdml_xercesc_root" |
---|
6390 | promptend=yes |
---|
6391 | else |
---|
6392 | xercesloc=$ans |
---|
6393 | echo "checking for Xercesc install... no" |
---|
6394 | fi |
---|
6395 | fi #END OF USER INPUT CHECKING |
---|
6396 | done #END OF WHILE LOOP OVER USER INPUT |
---|
6397 | fi #END OF USER INPUT SECTION |
---|
6398 | |
---|
6399 | # |
---|
6400 | # If a filter on g4gdml_xerces_root is needed to remove common system paths |
---|
6401 | # then it should be put here... |
---|
6402 | # |
---|
6403 | if test "x$g4gdml_xercesc_root" = "x/usr" -o "x$g4gdml_xercesc_root" = "x/usr/local" ; then |
---|
6404 | g4gdml_xercesc_root="" |
---|
6405 | fi |
---|
6406 | |
---|
6407 | fi #END XERCES PROBE |
---|
6408 | |
---|
6409 | #END OF GDML/XERCES PROBE |
---|
6410 | |
---|
6411 | echo " " |
---|
6412 | |
---|
6413 | case "$g4make" in |
---|
6414 | '') |
---|
6415 | g4make=gmake |
---|
6416 | ;; |
---|
6417 | esac |
---|
6418 | |
---|
6419 | echo "" |
---|
6420 | |
---|
6421 | g4_gmake_version=`(gmake -v) 2>/dev/null` |
---|
6422 | case $g4_gmake_version in |
---|
6423 | GNU*) |
---|
6424 | g4_gmake=y |
---|
6425 | ;; |
---|
6426 | *) |
---|
6427 | g4_gmake=n |
---|
6428 | ;; |
---|
6429 | esac |
---|
6430 | |
---|
6431 | g4_make_version=`(make -v) 2>/dev/null` |
---|
6432 | case $g4_make_version in |
---|
6433 | GNU*) |
---|
6434 | g4_make=y |
---|
6435 | ;; |
---|
6436 | *) |
---|
6437 | g4_make=n |
---|
6438 | ;; |
---|
6439 | esac |
---|
6440 | |
---|
6441 | if [ $g4_gmake = y ] ; then |
---|
6442 | |
---|
6443 | g4make=gmake |
---|
6444 | |
---|
6445 | g4message=`cat << EOM |
---|
6446 | |
---|
6447 | G4MAKE |
---|
6448 | |
---|
6449 | You have GNU make which could be used to build GEANT4. |
---|
6450 | You can select your own 'make' program if you want. |
---|
6451 | EOM` |
---|
6452 | |
---|
6453 | fi |
---|
6454 | |
---|
6455 | if [ $g4_gmake = n ] && [ $g4_make = y ] ; then |
---|
6456 | |
---|
6457 | g4make=make |
---|
6458 | |
---|
6459 | g4message=`cat << EOM |
---|
6460 | |
---|
6461 | G4MAKE |
---|
6462 | |
---|
6463 | You have GNU make which could be used to build GEANT4. |
---|
6464 | You can select your own 'make' program if you want. |
---|
6465 | EOM` |
---|
6466 | |
---|
6467 | fi |
---|
6468 | |
---|
6469 | if [ $g4_gmake = n ] && [ $g4_make = n ] ; then |
---|
6470 | |
---|
6471 | g4make=none |
---|
6472 | |
---|
6473 | g4message=`cat << EOM |
---|
6474 | |
---|
6475 | G4MAKE |
---|
6476 | |
---|
6477 | You have NO GNU make which could be used to build GEANT4. |
---|
6478 | Please select your own 'make' program compatible with GNU make. |
---|
6479 | EOM` |
---|
6480 | |
---|
6481 | dflt=$g4make |
---|
6482 | rp=$g4message |
---|
6483 | |
---|
6484 | |
---|
6485 | . ./myread |
---|
6486 | gans=$ans |
---|
6487 | |
---|
6488 | case $gans in |
---|
6489 | |
---|
6490 | '') |
---|
6491 | g4make=$dflt |
---|
6492 | ;; |
---|
6493 | *) |
---|
6494 | g4make=$gans |
---|
6495 | ;; |
---|
6496 | esac |
---|
6497 | |
---|
6498 | fi |
---|
6499 | |
---|
6500 | |
---|
6501 | |
---|
6502 | |
---|
6503 | echo " " |
---|
6504 | case "$g4wlib_build_g3tog4" in |
---|
6505 | '') |
---|
6506 | g4wlib_build_g3tog4=n |
---|
6507 | ;; |
---|
6508 | esac |
---|
6509 | |
---|
6510 | case "$g4w_use_g3tog4" in |
---|
6511 | '') |
---|
6512 | g4w_use_g3tog4=n |
---|
6513 | ;; |
---|
6514 | esac |
---|
6515 | |
---|
6516 | echo "" |
---|
6517 | |
---|
6518 | g4message=`cat << EOM |
---|
6519 | |
---|
6520 | G4LIB_BUILD_G3TOG4 |
---|
6521 | |
---|
6522 | The utility module 'g3tog4' will be built by setting this |
---|
6523 | variable. NOTE: it requires a valid FORTRAN compiler to be |
---|
6524 | installed on your system and the 'cernlib' command in the |
---|
6525 | path, in order to build the ancillary tools! |
---|
6526 | Do you want to build 'g3tog4' ? |
---|
6527 | |
---|
6528 | EOM` |
---|
6529 | |
---|
6530 | dflt=$g4wlib_build_g3tog4 |
---|
6531 | rp=$g4message |
---|
6532 | . ./myread |
---|
6533 | gans=$ans |
---|
6534 | |
---|
6535 | case $gans in |
---|
6536 | |
---|
6537 | n*|N*) |
---|
6538 | g4wlib_build_g3tog4=n |
---|
6539 | g4w_use_g3tog4=n |
---|
6540 | ;; |
---|
6541 | y*|Y*) |
---|
6542 | g4wlib_build_g3tog4=y |
---|
6543 | g4w_use_g3tog4=y |
---|
6544 | ;; |
---|
6545 | esac |
---|
6546 | |
---|
6547 | |
---|
6548 | echo " " |
---|
6549 | case "$g4wlib_build_zlib" in |
---|
6550 | '') |
---|
6551 | g4wlib_build_zlib=n |
---|
6552 | ;; |
---|
6553 | esac |
---|
6554 | |
---|
6555 | case "$g4w_use_zlib" in |
---|
6556 | '') |
---|
6557 | g4w_use_zlib=n |
---|
6558 | ;; |
---|
6559 | esac |
---|
6560 | |
---|
6561 | echo "" |
---|
6562 | |
---|
6563 | g4message=`cat << EOM |
---|
6564 | |
---|
6565 | G4LIB_BUILD_ZLIB |
---|
6566 | |
---|
6567 | Do you want to activate compression for output files |
---|
6568 | generated by the HepRep visualization driver? |
---|
6569 | |
---|
6570 | EOM` |
---|
6571 | |
---|
6572 | dflt=$g4wlib_build_zlib |
---|
6573 | rp=$g4message |
---|
6574 | . ./myread |
---|
6575 | gans=$ans |
---|
6576 | |
---|
6577 | case $gans in |
---|
6578 | |
---|
6579 | n*|N*) |
---|
6580 | g4wlib_build_zlib=n |
---|
6581 | g4w_use_zlib=n |
---|
6582 | ;; |
---|
6583 | y*|Y*) |
---|
6584 | g4wlib_build_zlib=y |
---|
6585 | g4w_use_zlib=y |
---|
6586 | ;; |
---|
6587 | esac |
---|
6588 | |
---|
6589 | |
---|
6590 | echo " " |
---|
6591 | |
---|
6592 | case "$g4wanalysis_use" in |
---|
6593 | '') |
---|
6594 | g4wanalysis_use=n |
---|
6595 | ;; |
---|
6596 | esac |
---|
6597 | |
---|
6598 | echo "" |
---|
6599 | |
---|
6600 | g4message=`cat << EOM |
---|
6601 | |
---|
6602 | G4ANALYSIS_USE |
---|
6603 | |
---|
6604 | Activates the configuration setup for allowing plugins to |
---|
6605 | analysis tools based on AIDA (Astract Interfaces for Data |
---|
6606 | Analysis). In order to use AIDA features and compliant analysis |
---|
6607 | tools, the proper environment for these tools will have to be |
---|
6608 | set (see documentation for the specific analysis tools). |
---|
6609 | EOM` |
---|
6610 | |
---|
6611 | dflt=$g4wanalysis_use |
---|
6612 | rp=$g4message |
---|
6613 | . ./myread |
---|
6614 | gans=$ans |
---|
6615 | |
---|
6616 | case $gans in |
---|
6617 | |
---|
6618 | n*|N*) |
---|
6619 | g4wanalysis_use=n |
---|
6620 | ;; |
---|
6621 | y*|Y*) |
---|
6622 | g4wanalysis_use=y |
---|
6623 | ;; |
---|
6624 | esac |
---|
6625 | |
---|
6626 | |
---|
6627 | : end of configuration questions |
---|
6628 | echo " " |
---|
6629 | echo "End of configuration phase." |
---|
6630 | echo " " |
---|
6631 | |
---|
6632 | : back to where it started |
---|
6633 | if test -d ../../.config/UU; then |
---|
6634 | cd ../.. |
---|
6635 | fi |
---|
6636 | |
---|
6637 | : configuration may be patched via a 'config.over' file |
---|
6638 | if $test -f config.over; then |
---|
6639 | echo " " |
---|
6640 | dflt=y |
---|
6641 | rp='A config.over file exists. Do you wish to load it?' |
---|
6642 | . .config/UU/myread |
---|
6643 | case "$ans" in |
---|
6644 | n*) echo "OK, I'll ignore it.";; |
---|
6645 | *) . ./config.over |
---|
6646 | echo "Configuration settings have been loaded." |
---|
6647 | ;; |
---|
6648 | esac |
---|
6649 | fi |
---|
6650 | |
---|
6651 | : in case they want portability, strip down executable paths |
---|
6652 | case "$d_portable" in |
---|
6653 | "$define") |
---|
6654 | echo " " |
---|
6655 | echo "Stripping down executable paths..." >&4 |
---|
6656 | for file in $loclist $trylist; do |
---|
6657 | eval $file="\$file" |
---|
6658 | done |
---|
6659 | ;; |
---|
6660 | esac |
---|
6661 | |
---|
6662 | : create config.sh file |
---|
6663 | echo " " |
---|
6664 | echo "Creating configuration setup file..." >&4 |
---|
6665 | mkdir -p $g4conf |
---|
6666 | $spitshell <<EOT > $g4conf/config.sh |
---|
6667 | $startsh |
---|
6668 | # |
---|
6669 | # This file was produced by running the Configure script. It holds all the |
---|
6670 | # definitions figured out by Configure. Should you modify one of these values, |
---|
6671 | # do not forget to propagate your changes by running "Configure -der". You may |
---|
6672 | # instead choose to run each of the .SH files by yourself, or "Configure -S". |
---|
6673 | # |
---|
6674 | |
---|
6675 | # Package name : $package |
---|
6676 | # Source directory : $src |
---|
6677 | # Configuration time: $cf_time |
---|
6678 | # Configured by : $cf_by |
---|
6679 | # Target system : $myuname |
---|
6680 | |
---|
6681 | Author='$Author' |
---|
6682 | Date='$Date' |
---|
6683 | Header='$Header' |
---|
6684 | Id='$Id' |
---|
6685 | Locker='$Locker' |
---|
6686 | Log='$Log' |
---|
6687 | RCSfile='$RCSfile' |
---|
6688 | Revision='$Revision' |
---|
6689 | Source='$Source' |
---|
6690 | State='$State' |
---|
6691 | c='$c' |
---|
6692 | cf_by='$cf_by' |
---|
6693 | cf_time='$cf_time' |
---|
6694 | contains='$contains' |
---|
6695 | d_portable='$d_portable' |
---|
6696 | eunicefix='$eunicefix' |
---|
6697 | g4_gmake='$g4_gmake' |
---|
6698 | g4_gmake_version='$g4_gmake_version' |
---|
6699 | g4_make='$g4_make' |
---|
6700 | g4_make_version='$g4_make_version' |
---|
6701 | g4_qtmochome='$g4_qtmochome' |
---|
6702 | g4_qtincdir='$g4_qtincdir' |
---|
6703 | g4_qtlibdir='$g4_qtlibdir' |
---|
6704 | g4abladata='$g4abladata' |
---|
6705 | g4base='$g4base' |
---|
6706 | g4bin='$g4bin' |
---|
6707 | g4clhep_base_dir='$g4clhep_base_dir' |
---|
6708 | g4clhep_include_dir='$g4clhep_include_dir' |
---|
6709 | g4clhep_lib='$g4clhep_lib' |
---|
6710 | g4clhep_lib_dir='$g4clhep_lib_dir' |
---|
6711 | g4compiler='$g4compiler' |
---|
6712 | g4conf='$g4conf' |
---|
6713 | g4data='$g4data' |
---|
6714 | g4debug='$g4debug' |
---|
6715 | g4elasticdata='$g4elasticdata' |
---|
6716 | g4final_install='$g4final_install' |
---|
6717 | g4gdml_xercesc_root='$g4gdml_xercesc_root' |
---|
6718 | g4global='$g4global' |
---|
6719 | g4granular='$g4granular' |
---|
6720 | g4include='$g4include' |
---|
6721 | g4includes_flag='$g4includes_flag' |
---|
6722 | g4install='$g4install' |
---|
6723 | g4ledata='$g4ledata' |
---|
6724 | g4levelgammadata='$g4levelgammadata' |
---|
6725 | g4lib='$g4lib' |
---|
6726 | g4lib_build_gdml='$g4lib_build_gdml' |
---|
6727 | g4lib_build_shared='$g4lib_build_shared' |
---|
6728 | g4lib_build_static='$g4lib_build_static' |
---|
6729 | g4lib_use_dll='$g4lib_use_dll' |
---|
6730 | g4lib_use_dyn='$g4lib_use_dyn' |
---|
6731 | g4lib_use_granular='$g4lib_use_granular' |
---|
6732 | g4lib_use_shared='$g4lib_use_shared' |
---|
6733 | g4lib_use_static='$g4lib_use_static' |
---|
6734 | g4make='$g4make' |
---|
6735 | g4neutronhpcrosssections='$g4neutronhpcrosssections' |
---|
6736 | g4osname='$g4osname' |
---|
6737 | g4radioactivedata='$g4radioactivedata' |
---|
6738 | g4system='$g4system' |
---|
6739 | g4tmp='$g4tmp' |
---|
6740 | g4ui_build_gag_session='$g4ui_build_gag_session' |
---|
6741 | g4ui_build_qt_session='$g4ui_build_qt_session' |
---|
6742 | g4ui_build_terminal_session='$g4ui_build_terminal_session' |
---|
6743 | g4ui_build_win32_session='$g4ui_build_win32_session' |
---|
6744 | g4ui_build_xaw_session='$g4ui_build_xaw_session' |
---|
6745 | g4ui_build_xm_session='$g4ui_build_xm_session' |
---|
6746 | g4ui_none='$g4ui_none' |
---|
6747 | g4ui_use_gag='$g4ui_use_gag' |
---|
6748 | g4ui_use_qt='$g4ui_use_qt' |
---|
6749 | g4ui_use_tcsh='$g4ui_use_tcsh' |
---|
6750 | g4ui_use_terminal='$g4ui_use_terminal' |
---|
6751 | g4ui_use_win32='$g4ui_use_win32' |
---|
6752 | g4ui_use_xaw='$g4ui_use_xaw' |
---|
6753 | g4ui_use_xm='$g4ui_use_xm' |
---|
6754 | g4ui_xawflags='$g4ui_xawflags' |
---|
6755 | g4ui_xawhome='$g4ui_xawhome' |
---|
6756 | g4ui_xawlibs='$g4ui_xawlibs' |
---|
6757 | g4vis_build_asciitree_driver='$g4vis_build_asciitree_driver' |
---|
6758 | g4vis_build_dawn_driver='$g4vis_build_dawn_driver' |
---|
6759 | g4vis_build_dawnfile_driver='$g4vis_build_dawnfile_driver' |
---|
6760 | g4vis_build_oiwin32_driver='$g4vis_build_oiwin32_driver' |
---|
6761 | g4vis_build_oix_driver='$g4vis_build_oix_driver' |
---|
6762 | g4vis_build_openglqt_driver='$g4vis_build_openglqt_driver' |
---|
6763 | g4vis_build_openglwin32_driver='$g4vis_build_openglwin32_driver' |
---|
6764 | g4vis_build_openglx_driver='$g4vis_build_openglx_driver' |
---|
6765 | g4vis_build_openglxm_driver='$g4vis_build_openglxm_driver' |
---|
6766 | g4vis_build_raytracer_driver='$g4vis_build_raytracer_driver' |
---|
6767 | g4vis_build_raytracerx_driver='$g4vis_build_raytracerx_driver' |
---|
6768 | g4vis_build_vrml_driver='$g4vis_build_vrml_driver' |
---|
6769 | g4vis_build_vrmlfile_driver='$g4vis_build_vrmlfile_driver' |
---|
6770 | g4vis_oglhome='$g4vis_oglhome' |
---|
6771 | g4vis_oivhome='$g4vis_oivhome' |
---|
6772 | g4vis_use_asciitree='$g4vis_use_asciitree' |
---|
6773 | g4vis_use_dawn='$g4vis_use_dawn' |
---|
6774 | g4vis_use_dawnfile='$g4vis_use_dawnfile' |
---|
6775 | g4vis_use_oiwin32='$g4vis_use_oiwin32' |
---|
6776 | g4vis_use_oix='$g4vis_use_oix' |
---|
6777 | g4vis_use_openglqt='$g4vis_use_openglqt' |
---|
6778 | g4vis_use_openglwin32='$g4vis_use_openglwin32' |
---|
6779 | g4vis_use_openglx='$g4vis_use_openglx' |
---|
6780 | g4vis_use_openglxm='$g4vis_use_openglxm' |
---|
6781 | g4vis_use_raytracer='$g4vis_use_raytracer' |
---|
6782 | g4vis_use_raytracerx='$g4vis_use_raytracerx' |
---|
6783 | g4vis_use_vrml='$g4vis_use_vrml' |
---|
6784 | g4vis_use_vrmlfile='$g4vis_use_vrmlfile' |
---|
6785 | g4vis_xmflags='$g4vis_xmflags' |
---|
6786 | g4vis_xmflags='$g4vis_xmflags' |
---|
6787 | g4vis_xmhome='$g4vis_xmhome' |
---|
6788 | g4vis_xmhome='$g4vis_xmhome' |
---|
6789 | g4vis_xmlibs='$g4vis_xmlibs' |
---|
6790 | g4vis_xmlibs='$g4vis_xmlibs' |
---|
6791 | g4w_use_g3tog4='$g4w_use_g3tog4' |
---|
6792 | g4w_use_zlib='$g4w_use_zlib' |
---|
6793 | g4wanalysis_build='$g4wanalysis_build' |
---|
6794 | g4wanalysis_build_jas='$g4wanalysis_build_jas' |
---|
6795 | g4wanalysis_build_lab='$g4wanalysis_build_lab' |
---|
6796 | g4wanalysis_build_lizard='$g4wanalysis_build_lizard' |
---|
6797 | g4wanalysis_use='$g4wanalysis_use' |
---|
6798 | g4wanalysis_use_jas='$g4wanalysis_use_jas' |
---|
6799 | g4wanalysis_use_lab='$g4wanalysis_use_lab' |
---|
6800 | g4wanalysis_use_lizard='$g4wanalysis_use_lizard' |
---|
6801 | g4wlib_build_g3tog4='$g4wlib_build_g3tog4' |
---|
6802 | g4wlib_build_zlib='$g4wlib_build_zlib' |
---|
6803 | g4workdir='$g4workdir' |
---|
6804 | hint='$hint' |
---|
6805 | lns='$lns' |
---|
6806 | myuname='$myuname' |
---|
6807 | n='$n' |
---|
6808 | osname='$osname' |
---|
6809 | osvers='$osvers' |
---|
6810 | package='$package' |
---|
6811 | sh='$sh' |
---|
6812 | sharpbang='$sharpbang' |
---|
6813 | shsharp='$shsharp' |
---|
6814 | spackage='$spackage' |
---|
6815 | spitshell='$spitshell' |
---|
6816 | src='$src' |
---|
6817 | startsh='$startsh' |
---|
6818 | EOT |
---|
6819 | |
---|
6820 | : add special variables |
---|
6821 | mkdir -p $g4conf |
---|
6822 | $test -f $src/patchlevel.h && \ |
---|
6823 | awk '/^#define/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >> $g4conf/config.sh |
---|
6824 | echo "CONFIG=true" >> $g4conf/config.sh |
---|
6825 | |
---|
6826 | : propagate old symbols |
---|
6827 | if $test -f .config/UU/config.sh; then |
---|
6828 | <.config/UU/config.sh sort | uniq >.config/UU/oldconfig.sh |
---|
6829 | sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' $g4conf/config.sh $g4conf/config.sh .config/UU/oldconfig.sh |\ |
---|
6830 | sort | uniq -u >.config/UU/oldsyms |
---|
6831 | set X `cat .config/UU/oldsyms` |
---|
6832 | shift |
---|
6833 | case $# in |
---|
6834 | 0) ;; |
---|
6835 | *) |
---|
6836 | cat <<EOM |
---|
6837 | |
---|
6838 | Hmm...You had some extra variables I don't know about... |
---|
6839 | I'll try to keep 'em... |
---|
6840 | |
---|
6841 | EOM |
---|
6842 | echo "# Variables propagated from previous config.sh file." >>.config/bin/$g4system/config.sh |
---|
6843 | for sym in `cat .config/UU/oldsyms`; do |
---|
6844 | echo " Propagating $hint variable "'$'"$sym..." |
---|
6845 | eval 'tmp="$'"${sym}"'"' |
---|
6846 | echo "$tmp" | \ |
---|
6847 | sed -e "s/'/'\"'\"'/g" -e "s/^/$sym='/" -e "s/$/'/" >>.config/bin/$g4system/config.sh |
---|
6848 | done |
---|
6849 | ;; |
---|
6850 | esac |
---|
6851 | fi |
---|
6852 | |
---|
6853 | : preserve RCS keywords in files with variable substitution, grrr |
---|
6854 | Id='$Id' |
---|
6855 | |
---|
6856 | : Finish up by extracting the .SH files |
---|
6857 | case "$alldone" in |
---|
6858 | exit) |
---|
6859 | $rm -rf .config/UU |
---|
6860 | echo "Done." |
---|
6861 | exit 0 |
---|
6862 | ;; |
---|
6863 | cont) |
---|
6864 | ;; |
---|
6865 | '') |
---|
6866 | dflt='' |
---|
6867 | nostick=true |
---|
6868 | $cat <<EOM |
---|
6869 | |
---|
6870 | WARNING: the generated configuration file |
---|
6871 | can be edited if necessary! |
---|
6872 | You can introduce any change to the configuration file |
---|
6873 | $g4conf/config.sh before the final installation. |
---|
6874 | To do so, use a shell escape now (e.g. !vi $g4conf/config.sh). |
---|
6875 | |
---|
6876 | EOM |
---|
6877 | rp="Press [Enter] to start installation or use a shell escape to edit config.sh:" |
---|
6878 | . .config/UU/myread |
---|
6879 | nostick='' |
---|
6880 | case "$ans" in |
---|
6881 | '') ;; |
---|
6882 | *) : in case they cannot read |
---|
6883 | sh 1>&4 -c "$ans";; |
---|
6884 | esac |
---|
6885 | ;; |
---|
6886 | esac |
---|
6887 | |
---|
6888 | : if this fails, just run all the .SH files by hand |
---|
6889 | . $g4conf/config.sh |
---|
6890 | |
---|
6891 | echo " " |
---|
6892 | exec 1>&4 |
---|
6893 | . ./.config/UU/extract |
---|
6894 | |
---|
6895 | if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then |
---|
6896 | dflt=y |
---|
6897 | case "$silent" in |
---|
6898 | true) ;; |
---|
6899 | *) |
---|
6900 | $cat <<EOM |
---|
6901 | |
---|
6902 | Now you need to generate make dependencies by running "make depend". |
---|
6903 | You might prefer to run it in background: "make depend > makedepend.out &" |
---|
6904 | It can take a while, so you might not want to run it right now. |
---|
6905 | |
---|
6906 | EOM |
---|
6907 | ;; |
---|
6908 | esac |
---|
6909 | rp="Run make depend now?" |
---|
6910 | . .config/UU/myread |
---|
6911 | case "$ans" in |
---|
6912 | y*) |
---|
6913 | make depend && echo "Now you must run a make." |
---|
6914 | ;; |
---|
6915 | *) |
---|
6916 | echo "You must run 'make depend' then 'make'." |
---|
6917 | ;; |
---|
6918 | esac |
---|
6919 | elif test -f [Mm]akefile; then |
---|
6920 | echo " " |
---|
6921 | echo "Now you must run a make." |
---|
6922 | elif [ -f $g4conf/install.sh -a X$g4build = Xyes ] ; then |
---|
6923 | echo " " |
---|
6924 | echo "Now starting Geant4 libraries build..." |
---|
6925 | echo " " |
---|
6926 | . $g4conf/install.sh |
---|
6927 | elif [ -f $g4conf/install.sh -a X$install = Xyes ] ; then |
---|
6928 | echo " " |
---|
6929 | echo "Now starting Geant4 libraries installation..." |
---|
6930 | echo " " |
---|
6931 | . $g4conf/move.sh |
---|
6932 | else |
---|
6933 | echo " " |
---|
6934 | echo "WARNING: Geant4 is NOT installed yet!" |
---|
6935 | echo "You (or the administrator if you have not enough privileges)" |
---|
6936 | echo "should start with \$G4INSTALL/Configure -install" |
---|
6937 | echo "(where \$G4INSTALL is Geant4 install directory)." |
---|
6938 | echo " " |
---|
6939 | fi |
---|
6940 | |
---|
6941 | $rm -f kit*isdone ark*isdone |
---|
6942 | $rm -rf .config/UU |
---|
6943 | |
---|
6944 | : End of Configure |
---|
6945 | |
---|