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