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