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