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