| 1 | #! /bin/sh
|
|---|
| 2 | #
|
|---|
| 3 | # If these # comments don't work, trim them. Don't worry about any other
|
|---|
| 4 | # shell scripts, Configure will trim # comments from them for you.
|
|---|
| 5 | #
|
|---|
| 6 | # (If you are trying to port this package to a machine without sh,
|
|---|
| 7 | # I would suggest you have a look at the prototypical config_h.SH file
|
|---|
| 8 | # and edit it to reflect your system. Some packages may include samples
|
|---|
| 9 | # of config.h for certain machines, so you might look for one of those.)
|
|---|
| 10 | #
|
|---|
| 11 | # Yes, you may rip this off to use in other distribution packages. This
|
|---|
| 12 | # script belongs to the public domain and cannot be copyrighted.
|
|---|
| 13 | #
|
|---|
| 14 | # (Note: this Configure script was generated automatically. Rather than
|
|---|
| 15 | # working with this copy of Configure, you may wish to get metaconfig.
|
|---|
| 16 | # The dist-3.0 package (which contains metaconfig) was posted in
|
|---|
| 17 | # comp.sources.misc and is available on CPAN under authors/id/RAM so
|
|---|
| 18 | # you may fetch it yourself from your nearest archive site.)
|
|---|
| 19 | #
|
|---|
| 20 |
|
|---|
| 21 | # $Id: Configure,v 1.107 2008/11/14 15:14:46 bmorgan Exp $
|
|---|
| 22 | #
|
|---|
| 23 | # Generated on Fri Nov 14 15:14:32 GMT 2008 [metaconfig 3.0 PL70]
|
|---|
| 24 |
|
|---|
| 25 | cat >/tmp/c1$$ <<EOF
|
|---|
| 26 | WARNING!!!!!
|
|---|
| 27 |
|
|---|
| 28 | SCO csh still thinks true is false! /bin/csh needs to be updated.
|
|---|
| 29 | EOF
|
|---|
| 30 | cat >/tmp/c2$$ <<EOF
|
|---|
| 31 |
|
|---|
| 32 | You didn't run Configure with sh!
|
|---|
| 33 | I'll attempt to run sh for you...
|
|---|
| 34 | EOF
|
|---|
| 35 |
|
|---|
| 36 | true || cat /tmp/c1$$ /tmp/c2$$
|
|---|
| 37 | true || exec sh $0 $argv:q
|
|---|
| 38 |
|
|---|
| 39 | (exit $?0) || cat /tmp/c2$$
|
|---|
| 40 | (exit $?0) || exec sh $0 $argv:q
|
|---|
| 41 | rm -f /tmp/c1$$ /tmp/c2$$
|
|---|
| 42 |
|
|---|
| 43 | : compute my invocation name
|
|---|
| 44 | me=$0
|
|---|
| 45 | case "$0" in
|
|---|
| 46 | */*)
|
|---|
| 47 | me=`echo $0 | sed -e 's!.*/\(.*\)!\1!' 2>/dev/null`
|
|---|
| 48 | test "$me" || me=$0
|
|---|
| 49 | ;;
|
|---|
| 50 | esac
|
|---|
| 51 |
|
|---|
| 52 | : Proper PATH separator
|
|---|
| 53 | p_=:
|
|---|
| 54 | : On OS/2 this directory should exist if this is not floppy only system :-]
|
|---|
| 55 | #if test -d c:/.; then
|
|---|
| 56 | # p_=\;
|
|---|
| 57 | # PATH=`cmd /c "echo %PATH%" | tr '\\\\' / `
|
|---|
| 58 | #?X: That's a bug in ksh5.22
|
|---|
| 59 | # OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'`
|
|---|
| 60 | #fi
|
|---|
| 61 |
|
|---|
| 62 | : Proper PATH setting
|
|---|
| 63 | paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin'
|
|---|
| 64 | paths="$paths /opt/bin /opt/local/bin /opt/local /opt/lbin"
|
|---|
| 65 | paths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin"
|
|---|
| 66 | paths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin"
|
|---|
| 67 | paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb"
|
|---|
| 68 | paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /usr/ccs/bin"
|
|---|
| 69 | paths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib"
|
|---|
| 70 | paths="$paths /sbin /usr/sbin /usr/libexec"
|
|---|
| 71 |
|
|---|
| 72 | for p in $paths
|
|---|
| 73 | do
|
|---|
| 74 | case "$p_$PATH$p_" in
|
|---|
| 75 | *$p_$p$p_*) ;;
|
|---|
| 76 | *) test -d $p && PATH=$PATH$p_$p ;;
|
|---|
| 77 | esac
|
|---|
| 78 | done
|
|---|
| 79 |
|
|---|
| 80 | PATH=.$p_$PATH
|
|---|
| 81 | export PATH
|
|---|
| 82 |
|
|---|
| 83 | : shall we be using ksh?
|
|---|
| 84 | inksh=''
|
|---|
| 85 | needksh=''
|
|---|
| 86 | avoidksh=''
|
|---|
| 87 | newsh=/bin/ksh
|
|---|
| 88 | changesh=''
|
|---|
| 89 | if (PATH=.; alias -x) >/dev/null 2>&1; then
|
|---|
| 90 | inksh=true
|
|---|
| 91 | fi
|
|---|
| 92 | if test -f /hp-ux -a -f /bin/ksh; then
|
|---|
| 93 | needksh='to avoid sh bug in "here document" expansion'
|
|---|
| 94 | fi
|
|---|
| 95 | if test -d /usr/lpp -a -f /usr/bin/bsh -a -f /usr/bin/uname; then
|
|---|
| 96 | if test X`/usr/bin/uname -v` = X4; then
|
|---|
| 97 | avoidksh="to avoid AIX 4's /bin/sh"
|
|---|
| 98 | newsh=/usr/bin/bsh
|
|---|
| 99 | fi
|
|---|
| 100 | fi
|
|---|
| 101 | case "$inksh/$needksh" in
|
|---|
| 102 | /[a-z]*)
|
|---|
| 103 | unset ENV
|
|---|
| 104 | changesh=true
|
|---|
| 105 | reason="$needksh"
|
|---|
| 106 | ;;
|
|---|
| 107 | esac
|
|---|
| 108 | case "$inksh/$avoidksh" in
|
|---|
| 109 | true/[a-z]*)
|
|---|
| 110 | changesh=true
|
|---|
| 111 | reason="$avoidksh"
|
|---|
| 112 | ;;
|
|---|
| 113 | esac
|
|---|
| 114 | case "$inksh/$needksh-$avoidksh-" in
|
|---|
| 115 | true/--)
|
|---|
| 116 | cat <<EOM
|
|---|
| 117 | (I see you are using the Korn shell. In case of problems
|
|---|
| 118 | try the Bourne shell instead.)
|
|---|
| 119 | EOM
|
|---|
| 120 | ;;
|
|---|
| 121 | esac
|
|---|
| 122 | case "$changesh" in
|
|---|
| 123 | true)
|
|---|
| 124 | echo "(Feeding myself to $newsh $reason.)"
|
|---|
| 125 | case "$0" in
|
|---|
| 126 | Configure|*/Configure) exec $newsh $0 "$@";;
|
|---|
| 127 | *) exec $newsh Configure "$@";;
|
|---|
| 128 | esac
|
|---|
| 129 | ;;
|
|---|
| 130 | esac
|
|---|
| 131 |
|
|---|
| 132 | : Configure runs within the UU subdirectory
|
|---|
| 133 | test -d .config/UU || mkdir -p .config/UU
|
|---|
| 134 | unset CDPATH
|
|---|
| 135 | cd .config/UU && rm -f ./*
|
|---|
| 136 |
|
|---|
| 137 | eunicefix=''
|
|---|
| 138 | g4compiler=''
|
|---|
| 139 | g4osname=''
|
|---|
| 140 | g4system=''
|
|---|
| 141 | hint=''
|
|---|
| 142 | myuname=''
|
|---|
| 143 | osname=''
|
|---|
| 144 | osvers=''
|
|---|
| 145 | g4_qt_cxxflags=''
|
|---|
| 146 | g4_qt_gl_cxxflags=''
|
|---|
| 147 | g4_qt_gl_libs=''
|
|---|
| 148 | g4_qt_libs=''
|
|---|
| 149 | g4_qt_moc=''
|
|---|
| 150 | g4_qt_version=''
|
|---|
| 151 | Author=''
|
|---|
| 152 | Date=''
|
|---|
| 153 | Header=''
|
|---|
| 154 | Id=''
|
|---|
| 155 | Locker=''
|
|---|
| 156 | Log=''
|
|---|
| 157 | RCSfile=''
|
|---|
| 158 | Revision=''
|
|---|
| 159 | Source=''
|
|---|
| 160 | State=''
|
|---|
| 161 | cf_by=''
|
|---|
| 162 | cf_time=''
|
|---|
| 163 | contains=''
|
|---|
| 164 | d_portable=''
|
|---|
| 165 | g4base=''
|
|---|
| 166 | g4conf=''
|
|---|
| 167 | g4final_install=''
|
|---|
| 168 | g4include=''
|
|---|
| 169 | g4includes_flag=''
|
|---|
| 170 | g4install=''
|
|---|
| 171 | g4workdir=''
|
|---|
| 172 | g4bin=''
|
|---|
| 173 | g4lib=''
|
|---|
| 174 | g4tmp=''
|
|---|
| 175 | g4abladata=''
|
|---|
| 176 | g4data=''
|
|---|
| 177 | g4elasticdata=''
|
|---|
| 178 | g4ledata=''
|
|---|
| 179 | g4levelgammadata=''
|
|---|
| 180 | g4neutronhpcrosssections=''
|
|---|
| 181 | g4radioactivedata=''
|
|---|
| 182 | g4clhep_base_dir=''
|
|---|
| 183 | g4clhep_include_dir=''
|
|---|
| 184 | g4clhep_lib=''
|
|---|
| 185 | g4clhep_lib_dir=''
|
|---|
| 186 | g4lib_build_shared=''
|
|---|
| 187 | g4lib_build_static=''
|
|---|
| 188 | g4lib_use_dll=''
|
|---|
| 189 | g4lib_use_dyn=''
|
|---|
| 190 | g4lib_use_shared=''
|
|---|
| 191 | g4lib_use_static=''
|
|---|
| 192 | g4global=''
|
|---|
| 193 | g4granular=''
|
|---|
| 194 | g4lib_use_granular=''
|
|---|
| 195 | g4debug=''
|
|---|
| 196 | g4ui_build_gag_session=''
|
|---|
| 197 | g4ui_build_terminal_session=''
|
|---|
| 198 | g4ui_build_win32_session=''
|
|---|
| 199 | g4ui_build_xaw_session=''
|
|---|
| 200 | g4ui_build_xm_session=''
|
|---|
| 201 | g4ui_none=''
|
|---|
| 202 | g4ui_use_gag=''
|
|---|
| 203 | g4ui_use_tcsh=''
|
|---|
| 204 | g4ui_use_terminal=''
|
|---|
| 205 | g4ui_use_win32=''
|
|---|
| 206 | g4ui_use_xaw=''
|
|---|
| 207 | g4ui_use_xm=''
|
|---|
| 208 | g4ui_xawflags=''
|
|---|
| 209 | g4ui_xawhome=''
|
|---|
| 210 | g4ui_xawlibs=''
|
|---|
| 211 | g4vis_xmflags=''
|
|---|
| 212 | g4vis_xmhome=''
|
|---|
| 213 | g4vis_xmlibs=''
|
|---|
| 214 | g4ui_build_qt_session=''
|
|---|
| 215 | g4ui_use_qt=''
|
|---|
| 216 | g4vis_build_asciitree_driver=''
|
|---|
| 217 | g4vis_build_dawn_driver=''
|
|---|
| 218 | g4vis_build_dawnfile_driver=''
|
|---|
| 219 | g4vis_build_oiwin32_driver=''
|
|---|
| 220 | g4vis_build_oix_driver=''
|
|---|
| 221 | g4vis_build_openglwin32_driver=''
|
|---|
| 222 | g4vis_build_openglx_driver=''
|
|---|
| 223 | g4vis_build_openglxm_driver=''
|
|---|
| 224 | g4vis_build_raytracer_driver=''
|
|---|
| 225 | g4vis_build_raytracerx_driver=''
|
|---|
| 226 | g4vis_build_vrml_driver=''
|
|---|
| 227 | g4vis_build_vrmlfile_driver=''
|
|---|
| 228 | g4vis_oglhome=''
|
|---|
| 229 | g4vis_oivhome=''
|
|---|
| 230 | g4vis_use_asciitree=''
|
|---|
| 231 | g4vis_use_dawn=''
|
|---|
| 232 | g4vis_use_dawnfile=''
|
|---|
| 233 | g4vis_use_oiwin32=''
|
|---|
| 234 | g4vis_use_oix=''
|
|---|
| 235 | g4vis_use_openglwin32=''
|
|---|
| 236 | g4vis_use_openglx=''
|
|---|
| 237 | g4vis_use_openglxm=''
|
|---|
| 238 | g4vis_use_raytracer=''
|
|---|
| 239 | g4vis_use_raytracerx=''
|
|---|
| 240 | g4vis_use_vrml=''
|
|---|
| 241 | g4vis_use_vrmlfile=''
|
|---|
| 242 | g4vis_xmflags=''
|
|---|
| 243 | g4vis_xmhome=''
|
|---|
| 244 | g4vis_xmlibs=''
|
|---|
| 245 | g4vis_build_openglqt_driver=''
|
|---|
| 246 | g4vis_use_openglqt=''
|
|---|
| 247 | g4gdml_xercesc_root=''
|
|---|
| 248 | g4lib_build_gdml=''
|
|---|
| 249 | g4wanalysis_build=''
|
|---|
| 250 | g4wanalysis_build_jas=''
|
|---|
| 251 | g4wanalysis_build_lab=''
|
|---|
| 252 | g4wanalysis_build_lizard=''
|
|---|
| 253 | g4wanalysis_use=''
|
|---|
| 254 | g4wanalysis_use_jas=''
|
|---|
| 255 | g4wanalysis_use_lab=''
|
|---|
| 256 | g4wanalysis_use_lizard=''
|
|---|
| 257 | g4_gmake=''
|
|---|
| 258 | g4_gmake_version=''
|
|---|
| 259 | g4_make=''
|
|---|
| 260 | g4_make_version=''
|
|---|
| 261 | g4make=''
|
|---|
| 262 | g4w_use_g3tog4=''
|
|---|
| 263 | g4wlib_build_g3tog4=''
|
|---|
| 264 | g4w_use_zlib=''
|
|---|
| 265 | g4wlib_build_zlib=''
|
|---|
| 266 | lns=''
|
|---|
| 267 | c=''
|
|---|
| 268 | n=''
|
|---|
| 269 | package=''
|
|---|
| 270 | spackage=''
|
|---|
| 271 | sh=''
|
|---|
| 272 | sharpbang=''
|
|---|
| 273 | shsharp=''
|
|---|
| 274 | spitshell=''
|
|---|
| 275 | src=''
|
|---|
| 276 | startsh=''
|
|---|
| 277 | CONFIG=''
|
|---|
| 278 |
|
|---|
| 279 | define='define'
|
|---|
| 280 | undef='undef'
|
|---|
| 281 | smallmach='pdp11 i8086 z8000 i80286 iAPX286'
|
|---|
| 282 | rmlist=''
|
|---|
| 283 |
|
|---|
| 284 | : We must find out about Eunice early
|
|---|
| 285 | eunicefix=':'
|
|---|
| 286 | if test -f /etc/unixtovms; then
|
|---|
| 287 | eunicefix=/etc/unixtovms
|
|---|
| 288 | fi
|
|---|
| 289 | if test -f /etc/unixtovms.exe; then
|
|---|
| 290 | eunicefix=/etc/unixtovms.exe
|
|---|
| 291 | fi
|
|---|
| 292 |
|
|---|
| 293 | #INITIALIZE QT UI OPTIONS
|
|---|
| 294 | g4ui_build_qt_session='n'
|
|---|
| 295 | g4ui_use_qt='n'
|
|---|
| 296 | g4_qthome=''
|
|---|
| 297 | #END QT UI OPTIONS
|
|---|
| 298 | #INITIALIZE QT UI OPTIONS
|
|---|
| 299 | g4ui_build_qt_session='n'
|
|---|
| 300 | g4ui_use_qt='n'
|
|---|
| 301 | #END QT UI OPTIONS
|
|---|
| 302 | #INITIALIZE QT VIS DRIVER OPTIONS
|
|---|
| 303 | g4vis_build_openglqt_driver='n'
|
|---|
| 304 | g4vis_use_openglqt='n'
|
|---|
| 305 | #END QT VIS DRIVER OPTIONS
|
|---|
| 306 |
|
|---|
| 307 | : Find the basic shell for Bourne shell scripts
|
|---|
| 308 | case "$sh" in
|
|---|
| 309 | '')
|
|---|
| 310 | case "$SYSTYPE" in
|
|---|
| 311 | *bsd*|sys5*) xxx="/$SYSTYPE/bin/sh";;
|
|---|
| 312 | *) xxx='/bin/sh';;
|
|---|
| 313 | esac
|
|---|
| 314 | if test -f "$xxx"; then
|
|---|
| 315 | sh="$xxx"
|
|---|
| 316 | else
|
|---|
| 317 | : Build up a list and do a single loop so we can 'break' out.
|
|---|
| 318 | pth=`echo $PATH | sed -e "s/$p_/ /g"`
|
|---|
| 319 | for xxx in sh bash ksh pdksh ash; do
|
|---|
| 320 | for p in $pth; do
|
|---|
| 321 | try="$try ${p}/${xxx}"
|
|---|
| 322 | done
|
|---|
| 323 | done
|
|---|
| 324 | for xxx in $try; do
|
|---|
| 325 | if test -f "$xxx"; then
|
|---|
| 326 | sh="$xxx";
|
|---|
| 327 | break
|
|---|
| 328 | elif test -f "$xxx.exe"; then
|
|---|
| 329 | sh="$xxx";
|
|---|
| 330 | break
|
|---|
| 331 | fi
|
|---|
| 332 | done
|
|---|
| 333 | fi
|
|---|
| 334 | ;;
|
|---|
| 335 | esac
|
|---|
| 336 |
|
|---|
| 337 | case "$sh" in
|
|---|
| 338 | '') cat <<EOM >&2
|
|---|
| 339 | $me: Fatal Error: I can't find a Bourne Shell anywhere.
|
|---|
| 340 |
|
|---|
| 341 | Usually it's in /bin/sh.
|
|---|
| 342 | Please contact Serguei.Sadilov@cern.ch and
|
|---|
| 343 | we'll try to straighten this all out.
|
|---|
| 344 | EOM
|
|---|
| 345 | exit 1
|
|---|
| 346 | ;;
|
|---|
| 347 | esac
|
|---|
| 348 |
|
|---|
| 349 | : see if sh knows # comments
|
|---|
| 350 | if `$sh -c '#' >/dev/null 2>&1`; then
|
|---|
| 351 | shsharp=true
|
|---|
| 352 | spitshell=cat
|
|---|
| 353 | xcat=/bin/cat
|
|---|
| 354 | test -f $xcat || xcat=/usr/bin/cat
|
|---|
| 355 | echo "#!$xcat" >try
|
|---|
| 356 | $eunicefix try
|
|---|
| 357 | chmod +x try
|
|---|
| 358 | #
|
|---|
| 359 | # $xcat is wrong on WIN32: there is no /bin/cat and /usr/bin/cat by default.
|
|---|
| 360 | # But we are sure that sharpbang is to be '#!' and let 'today' will be !=0.
|
|---|
| 361 | #
|
|---|
| 362 | # ./try > today
|
|---|
| 363 | echo "#!$xcat" >today
|
|---|
| 364 |
|
|---|
| 365 | if test -s today; then
|
|---|
| 366 | sharpbang='#!'
|
|---|
| 367 | else
|
|---|
| 368 | echo "#! $xcat" > try
|
|---|
| 369 | $eunicefix try
|
|---|
| 370 | chmod +x try
|
|---|
| 371 | #
|
|---|
| 372 | # $xcat is wrong on WIN32: there is no /bin/cat and /usr/bin/cat by default.
|
|---|
| 373 | # But we are sure that sharpbang is to be '#!' and let 'today' will be !=0.
|
|---|
| 374 | #
|
|---|
| 375 | # ./try > today
|
|---|
| 376 | echo "#!$xcat" >today
|
|---|
| 377 |
|
|---|
| 378 | if test -s today; then
|
|---|
| 379 | sharpbang='#! '
|
|---|
| 380 | else
|
|---|
| 381 | sharpbang=': use '
|
|---|
| 382 | fi
|
|---|
| 383 | fi
|
|---|
| 384 | else
|
|---|
| 385 | echo " "
|
|---|
| 386 | echo "Your $sh doesn't grok # comments--I will strip them later on."
|
|---|
| 387 | shsharp=false
|
|---|
| 388 | cd ..
|
|---|
| 389 | echo "exec grep -v '^[ ]*#'" >spitshell
|
|---|
| 390 | chmod +x spitshell
|
|---|
| 391 | $eunicefix spitshell
|
|---|
| 392 | spitshell=`pwd`/spitshell
|
|---|
| 393 | cd UU
|
|---|
| 394 | echo "I presume that if # doesn't work, #! won't work either!"
|
|---|
| 395 | sharpbang=': use '
|
|---|
| 396 | fi
|
|---|
| 397 | rm -f try today
|
|---|
| 398 |
|
|---|
| 399 | : figure out how to guarantee sh startup
|
|---|
| 400 | case "$startsh" in
|
|---|
| 401 | '') startsh=${sharpbang}${sh} ;;
|
|---|
| 402 | *)
|
|---|
| 403 | esac
|
|---|
| 404 | cat >try <<EOSS
|
|---|
| 405 | $startsh
|
|---|
| 406 | set abc
|
|---|
| 407 | test "$?abc" != 1
|
|---|
| 408 | EOSS
|
|---|
| 409 |
|
|---|
| 410 | chmod +x try
|
|---|
| 411 | $eunicefix try
|
|---|
| 412 | if ./try; then
|
|---|
| 413 | : echo "Yup, it does."
|
|---|
| 414 | else
|
|---|
| 415 | echo "Hmm... '$startsh' does not guarantee sh startup..."
|
|---|
| 416 | echo "You may have to fix up the shell scripts to make sure $sh runs them."
|
|---|
| 417 | fi
|
|---|
| 418 | rm -f try
|
|---|
| 419 |
|
|---|
| 420 | : produce awk script to parse command line options
|
|---|
| 421 | cat >options.awk <<'EOF'
|
|---|
| 422 | BEGIN {
|
|---|
| 423 | optstr = "dD:eEf:hKOrsSU:V"; # getopt-style specification
|
|---|
| 424 |
|
|---|
| 425 | len = length(optstr);
|
|---|
| 426 | for (i = 1; i <= len; i++) {
|
|---|
| 427 | c = substr(optstr, i, 1);
|
|---|
| 428 | if (i < len) a = substr(optstr, i + 1, 1); else a = "";
|
|---|
| 429 | if (a == ":") {
|
|---|
| 430 | arg[c] = 1;
|
|---|
| 431 | i++;
|
|---|
| 432 | }
|
|---|
| 433 | opt[c] = 1;
|
|---|
| 434 | }
|
|---|
| 435 | }
|
|---|
| 436 | {
|
|---|
| 437 | expect = 0;
|
|---|
| 438 | str = $0;
|
|---|
| 439 | if (substr(str, 1, 1) != "-") {
|
|---|
| 440 | printf("'%s'\n", str);
|
|---|
| 441 | next;
|
|---|
| 442 | }
|
|---|
| 443 | len = length($0);
|
|---|
| 444 | for (i = 2; i <= len; i++) {
|
|---|
| 445 | c = substr(str, i, 1);
|
|---|
| 446 | if (!opt[c]) {
|
|---|
| 447 | printf("-%s\n", substr(str, i));
|
|---|
| 448 | next;
|
|---|
| 449 | }
|
|---|
| 450 | printf("-%s\n", c);
|
|---|
| 451 | if (arg[c]) {
|
|---|
| 452 | if (i < len)
|
|---|
| 453 | printf("'%s'\n", substr(str, i + 1));
|
|---|
| 454 | else
|
|---|
| 455 | expect = 1;
|
|---|
| 456 | next;
|
|---|
| 457 | }
|
|---|
| 458 | }
|
|---|
| 459 | }
|
|---|
| 460 | END {
|
|---|
| 461 | if (expect)
|
|---|
| 462 | print "?";
|
|---|
| 463 | }
|
|---|
| 464 | EOF
|
|---|
| 465 |
|
|---|
| 466 | : process the command line options
|
|---|
| 467 | set X `for arg in "$@"; do echo "X$arg"; done |
|
|---|
| 468 | sed -e s/X// | awk -f options.awk`
|
|---|
| 469 | eval "set $*"
|
|---|
| 470 | shift
|
|---|
| 471 | rm -f options.awk
|
|---|
| 472 |
|
|---|
| 473 | : set up default values
|
|---|
| 474 | fastread=''
|
|---|
| 475 | reuseval=false
|
|---|
| 476 | config_sh=''
|
|---|
| 477 | alldone=''
|
|---|
| 478 | error=''
|
|---|
| 479 | silent=''
|
|---|
| 480 | extractsh=''
|
|---|
| 481 | override=''
|
|---|
| 482 | knowitall=''
|
|---|
| 483 | rm -f optdef.sh
|
|---|
| 484 | cat >optdef.sh <<EOS
|
|---|
| 485 | $startsh
|
|---|
| 486 | EOS
|
|---|
| 487 |
|
|---|
| 488 |
|
|---|
| 489 | : option parsing
|
|---|
| 490 | while test $# -gt 0; do
|
|---|
| 491 | case "$1" in
|
|---|
| 492 | -d) shift; fastread=yes;;
|
|---|
| 493 | -e) shift; alldone=cont;;
|
|---|
| 494 | -build) shift; g4build=yes;;
|
|---|
| 495 | -incflags) shift; g4incflags=yes;;
|
|---|
| 496 | -install) shift; install=yes;;
|
|---|
| 497 | -cppflags) shift; g4cppflags=yes;;
|
|---|
| 498 | -cxxflags) shift; g4cxxflags=yes;;
|
|---|
| 499 | -ldlibs) shift; g4ldlibs=yes;;
|
|---|
| 500 | -ldflags) shift; g4ldflags=yes;;
|
|---|
| 501 | -f)
|
|---|
| 502 | shift
|
|---|
| 503 | cd ../..
|
|---|
| 504 | if test -r "$1"; then
|
|---|
| 505 | config_sh="$1"
|
|---|
| 506 | else
|
|---|
| 507 | echo "$me: cannot read config file $1." >&2
|
|---|
| 508 | error=true
|
|---|
| 509 | fi
|
|---|
| 510 | cd .config/UU
|
|---|
| 511 | shift;;
|
|---|
| 512 | -h) shift; error=true;;
|
|---|
| 513 | -r) shift; reuseval=true;;
|
|---|
| 514 | -s) shift; silent=true; realsilent=true;;
|
|---|
| 515 | -E) shift; alldone=exit;;
|
|---|
| 516 | -K) shift; knowitall=true;;
|
|---|
| 517 | -O) shift; override=true;;
|
|---|
| 518 | -S) shift; silent=true; extractsh=true;;
|
|---|
| 519 | -D)
|
|---|
| 520 | shift
|
|---|
| 521 | case "$1" in
|
|---|
| 522 | *=)
|
|---|
| 523 | echo "$me: use '-U symbol=', not '-D symbol='." >&2
|
|---|
| 524 | echo "$me: ignoring -D $1" >&2
|
|---|
| 525 | ;;
|
|---|
| 526 | *=*) echo "$1" | \
|
|---|
| 527 | sed -e "s/'/'\"'\"'/g" -e "s/=\(.*\)/='\1'/" >> optdef.sh;;
|
|---|
| 528 | *) echo "$1='define'" >> optdef.sh;;
|
|---|
| 529 | esac
|
|---|
| 530 | shift
|
|---|
| 531 | ;;
|
|---|
| 532 | -U)
|
|---|
| 533 | shift
|
|---|
| 534 | case "$1" in
|
|---|
| 535 | *=) echo "$1" >> optdef.sh;;
|
|---|
| 536 | *=*)
|
|---|
| 537 | echo "$me: use '-D symbol=val', not '-U symbol=val'." >&2
|
|---|
| 538 | echo "$me: ignoring -U $1" >&2
|
|---|
| 539 | ;;
|
|---|
| 540 | *) echo "$1='undef'" >> optdef.sh;;
|
|---|
| 541 | esac
|
|---|
| 542 | shift
|
|---|
| 543 | ;;
|
|---|
| 544 | -V) echo "$me generated by metaconfig 3.0 PL70." >&2
|
|---|
| 545 | exit 0;;
|
|---|
| 546 | --) break;;
|
|---|
| 547 | -*) echo "$me: unknown option $1" >&2; shift; error=true;;
|
|---|
| 548 | *) break;;
|
|---|
| 549 | esac
|
|---|
| 550 | done
|
|---|
| 551 |
|
|---|
| 552 | case "$error" in
|
|---|
| 553 | true)
|
|---|
| 554 | cat >&2 <<EOM
|
|---|
| 555 | Usage: $me [-dehrsEKOSV] [-install] [-build] [-libs] [-f config.sh] [-D symbol] [-D symbol=value]
|
|---|
| 556 | [-U symbol] [-U symbol=]
|
|---|
| 557 | -d : use defaults for all answers.
|
|---|
| 558 | -e : go on without questioning past the production of config.sh.
|
|---|
| 559 | -build : start configuration AND build of Geant4 libraries.
|
|---|
| 560 | -cppflags : retrieve the list of cppflags
|
|---|
| 561 | -cxxflags : retrieve the list of cxxflags
|
|---|
| 562 | -incflags : retrieve the list of incflags
|
|---|
| 563 | -install : start installation of Geant4 libraries.
|
|---|
| 564 | -ldflags : retrieve the list of directories where libraries are placed
|
|---|
| 565 | -ldlibs : retrieve the list of libraries to link
|
|---|
| 566 | -f : specify an alternate default configuration file.
|
|---|
| 567 | -h : print this help message and exit (with an error status).
|
|---|
| 568 | -r : reuse C symbols value if possible (skips costly nm extraction).
|
|---|
| 569 | -s : silent mode, only echoes questions and essential information.
|
|---|
| 570 | -D : define symbol to have some value:
|
|---|
| 571 | -D symbol symbol gets the value 'define'
|
|---|
| 572 | -D symbol=value symbol gets the value 'value'
|
|---|
| 573 | -E : stop at the end of questions, after having produced config.sh.
|
|---|
| 574 | -K : do not use unless you know what you are doing.
|
|---|
| 575 | -O : let -D and -U override definitions from loaded configuration file.
|
|---|
| 576 | -S : perform variable substitutions on all .SH files (can mix with -f)
|
|---|
| 577 | -U : undefine symbol:
|
|---|
| 578 | -U symbol symbol gets the value 'undef'
|
|---|
| 579 | -U symbol= symbol gets completely empty
|
|---|
| 580 | -V : print version number and exit (with a zero status).
|
|---|
| 581 | EOM
|
|---|
| 582 | exit 1
|
|---|
| 583 | ;;
|
|---|
| 584 | esac
|
|---|
| 585 |
|
|---|
| 586 | : Sanity checks
|
|---|
| 587 | case "$fastread$alldone" in
|
|---|
| 588 | yescont|yesexit) ;;
|
|---|
| 589 | *)
|
|---|
| 590 | if test ! -t 0; then
|
|---|
| 591 | echo "Say 'sh Configure', not 'sh <Configure'"
|
|---|
| 592 | exit 1
|
|---|
| 593 | fi
|
|---|
| 594 | ;;
|
|---|
| 595 | esac
|
|---|
| 596 |
|
|---|
| 597 | exec 4>&1
|
|---|
| 598 | case "$silent" in
|
|---|
| 599 | true) exec 1>/dev/null;;
|
|---|
| 600 | esac
|
|---|
| 601 |
|
|---|
| 602 | : run the defines and the undefines, if any, but leave the file out there...
|
|---|
| 603 | touch optdef.sh
|
|---|
| 604 | . ./optdef.sh
|
|---|
| 605 |
|
|---|
| 606 | : set package name
|
|---|
| 607 | package=g4conf
|
|---|
| 608 |
|
|---|
| 609 | : Some greps do not return status, grrr.
|
|---|
| 610 | echo "grimblepritz" >grimble
|
|---|
| 611 | if grep blurfldyick grimble >/dev/null 2>&1 ; then
|
|---|
| 612 | contains=contains
|
|---|
| 613 | elif grep grimblepritz grimble >/dev/null 2>&1 ; then
|
|---|
| 614 | contains=grep
|
|---|
| 615 | else
|
|---|
| 616 | contains=contains
|
|---|
| 617 | fi
|
|---|
| 618 | rm -f grimble
|
|---|
| 619 | : the following should work in any shell
|
|---|
| 620 | case "$contains" in
|
|---|
| 621 | contains*)
|
|---|
| 622 | echo " "
|
|---|
| 623 | echo "Grep doesn't return a status!! Attempting remedial action."
|
|---|
| 624 | cat >contains <<'EOSS'
|
|---|
| 625 | grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
|
|---|
| 626 | EOSS
|
|---|
| 627 | chmod +x contains
|
|---|
| 628 | esac
|
|---|
| 629 |
|
|---|
| 630 | : first determine how to suppress newline on echo command
|
|---|
| 631 | #echo " "
|
|---|
| 632 | #echo "Checking echo to see how to suppress newlines..."
|
|---|
| 633 | (echo "hi there\c" ; echo " ") >.echotmp
|
|---|
| 634 | if $contains c .echotmp >/dev/null 2>&1 ; then
|
|---|
| 635 | # echo "...using -n."
|
|---|
| 636 | n='-n'
|
|---|
| 637 | c=''
|
|---|
| 638 | else
|
|---|
| 639 | # cat <<'EOM'
|
|---|
| 640 | #...using \c
|
|---|
| 641 | #EOM
|
|---|
| 642 | n=''
|
|---|
| 643 | c='\c'
|
|---|
| 644 | fi
|
|---|
| 645 | #echo $n "The star should be here-->$c"
|
|---|
| 646 | #echo '*'
|
|---|
| 647 | rm -f .echotmp
|
|---|
| 648 |
|
|---|
| 649 | : compute the number of columns on the terminal for proper question formatting
|
|---|
| 650 | case "$COLUMNS" in
|
|---|
| 651 | '') COLUMNS='80';;
|
|---|
| 652 | esac
|
|---|
| 653 |
|
|---|
| 654 | : set up the echo used in my read
|
|---|
| 655 | myecho="case \"\$xxxm\" in
|
|---|
| 656 | '') echo $n \"\$rp $c\" >&4;;
|
|---|
| 657 | *) case \"\$rp\" in
|
|---|
| 658 | '') echo $n \"[\$xxxm] $c\";;
|
|---|
| 659 | *)
|
|---|
| 660 | if test \`echo \"\$rp [\$xxxm] \" | wc -c\` -ge $COLUMNS; then
|
|---|
| 661 | echo \"\$rp\" >&4
|
|---|
| 662 | echo $n \"[\$xxxm] $c\" >&4
|
|---|
| 663 | else
|
|---|
| 664 | echo $n \"\$rp [\$xxxm] $c\" >&4
|
|---|
| 665 | fi
|
|---|
| 666 | ;;
|
|---|
| 667 | esac;;
|
|---|
| 668 | esac"
|
|---|
| 669 |
|
|---|
| 670 | : now set up to do reads with possible shell escape and default assignment
|
|---|
| 671 | cat <<EOSC >myread
|
|---|
| 672 | $startsh
|
|---|
| 673 | xxxm=\$dflt
|
|---|
| 674 | $myecho
|
|---|
| 675 | ans='!'
|
|---|
| 676 | case "\$fastread" in
|
|---|
| 677 | yes) case "\$dflt" in
|
|---|
| 678 | '') ;;
|
|---|
| 679 | *) ans='';
|
|---|
| 680 | case "\$silent-\$rp" in
|
|---|
| 681 | true-) ;;
|
|---|
| 682 | *) echo " " >&4;;
|
|---|
| 683 | esac;;
|
|---|
| 684 | esac;;
|
|---|
| 685 | *) case "\$silent" in
|
|---|
| 686 | true) case "\$rp" in
|
|---|
| 687 | '') ans='';;
|
|---|
| 688 | esac;;
|
|---|
| 689 | esac;;
|
|---|
| 690 | esac
|
|---|
| 691 | while expr "X\$ans" : "X!" >/dev/null; do
|
|---|
| 692 | read answ
|
|---|
| 693 | set x \$xxxm
|
|---|
| 694 | shift
|
|---|
| 695 | aok=''; eval "ans=\\"\$answ\\"" && aok=y
|
|---|
| 696 | case "\$answ" in
|
|---|
| 697 | "!")
|
|---|
| 698 | sh 1>&4
|
|---|
| 699 | echo " "
|
|---|
| 700 | $myecho
|
|---|
| 701 | ;;
|
|---|
| 702 | !*)
|
|---|
| 703 | set x \`expr "X\$ans" : "X!\(.*\)\$"\`
|
|---|
| 704 | shift
|
|---|
| 705 | sh 1>&4 -c "\$*"
|
|---|
| 706 | echo " "
|
|---|
| 707 | $myecho
|
|---|
| 708 | ;;
|
|---|
| 709 | "\$ans")
|
|---|
| 710 | case "\$ans" in
|
|---|
| 711 | \\&*)
|
|---|
| 712 | set x \`expr "X\$ans" : "X&\(.*\)\$"\`
|
|---|
| 713 | shift
|
|---|
| 714 | case "\$1" in
|
|---|
| 715 | -d)
|
|---|
| 716 | fastread=yes
|
|---|
| 717 | echo "(OK, I'll run with -d after this question.)" >&4
|
|---|
| 718 | ;;
|
|---|
| 719 | -*)
|
|---|
| 720 | echo "*** Sorry, \$1 not supported yet." >&4
|
|---|
| 721 | ;;
|
|---|
| 722 | esac
|
|---|
| 723 | $myecho
|
|---|
| 724 | ans=!
|
|---|
| 725 | ;;
|
|---|
| 726 | esac;;
|
|---|
| 727 | *)
|
|---|
| 728 | case "\$aok" in
|
|---|
| 729 | y)
|
|---|
| 730 | echo "*** Substitution done -- please confirm."
|
|---|
| 731 | xxxm="\$ans"
|
|---|
| 732 | ans=\`echo $n "\$ans$c" | tr '\012' ' '\`
|
|---|
| 733 | xxxm="\$ans"
|
|---|
| 734 | ans=!
|
|---|
| 735 | ;;
|
|---|
| 736 | *)
|
|---|
| 737 | echo "*** Error -- try again."
|
|---|
| 738 | ans=!
|
|---|
| 739 | ;;
|
|---|
| 740 | esac
|
|---|
| 741 | $myecho
|
|---|
| 742 | ;;
|
|---|
| 743 | esac
|
|---|
| 744 | case "\$ans\$xxxm\$nostick" in
|
|---|
| 745 | '')
|
|---|
| 746 | ans=!
|
|---|
| 747 | $myecho
|
|---|
| 748 | ;;
|
|---|
| 749 | esac
|
|---|
| 750 | done
|
|---|
| 751 | case "\$ans" in
|
|---|
| 752 | '') ans="\$xxxm";;
|
|---|
| 753 | esac
|
|---|
| 754 | EOSC
|
|---|
| 755 |
|
|---|
| 756 | : Find the path to the source tree
|
|---|
| 757 | case "$src" in
|
|---|
| 758 | '') src=`echo $0 | sed -e 's%/[^/][^/]*$%%'`
|
|---|
| 759 | #echo "src=$src"
|
|---|
| 760 | ;;
|
|---|
| 761 | esac
|
|---|
| 762 | case "$src" in
|
|---|
| 763 | '')
|
|---|
| 764 | src=.
|
|---|
| 765 | rsrc=..
|
|---|
| 766 | ;;
|
|---|
| 767 | /*) rsrc="$src/.."
|
|---|
| 768 | #echo "rsrc=$rsrc"
|
|---|
| 769 | ;;
|
|---|
| 770 | ./*) cur_dir=`pwd`
|
|---|
| 771 | cd ../../$src
|
|---|
| 772 | src=`pwd`
|
|---|
| 773 | cd $cur_dir
|
|---|
| 774 | rsrc="$src/.."
|
|---|
| 775 | rsrc="$src/.."
|
|---|
| 776 | #echo "src=$src"
|
|---|
| 777 | #echo "rsrc=$rsrc"
|
|---|
| 778 | ;;
|
|---|
| 779 | *) rsrc="../../$src"
|
|---|
| 780 | #echo "rsrc=$rsrc"
|
|---|
| 781 | ;;
|
|---|
| 782 | esac
|
|---|
| 783 | #cur_dir=`pwd`
|
|---|
| 784 | #echo "cur_dir=$cur_dir"
|
|---|
| 785 | if test -f $src/Configure && \
|
|---|
| 786 | $contains "^package=$package" $src/Configure >/dev/null 2>&1
|
|---|
| 787 | then
|
|---|
| 788 | : found it, so we are ok.
|
|---|
| 789 | else
|
|---|
| 790 | rsrc=''
|
|---|
| 791 | for src in . .. ../.. ../../.. ../../../..; do
|
|---|
| 792 | if test -f ../../$src/Configure && \
|
|---|
| 793 | $contains "^package=$package" ../../$src/Configure >/dev/null 2>&1
|
|---|
| 794 | then
|
|---|
| 795 | rsrc=../../$src
|
|---|
| 796 | break
|
|---|
| 797 | fi
|
|---|
| 798 | done
|
|---|
| 799 | fi
|
|---|
| 800 | case "$rsrc" in
|
|---|
| 801 | '')
|
|---|
| 802 | echo " "
|
|---|
| 803 | # dflt=
|
|---|
| 804 | # rp="Directory where sources for $package are located?"
|
|---|
| 805 | # . ./myread
|
|---|
| 806 | # src="$ans"
|
|---|
| 807 | rsrc="$src"
|
|---|
| 808 | #echo "src=$src"
|
|---|
| 809 | #echo "rsrc=$rsrc"
|
|---|
| 810 | if test -f $rsrc/Configure && \
|
|---|
| 811 | $contains "^package=$package" $rsrc/Configure >/dev/null 2>&1
|
|---|
| 812 | then
|
|---|
| 813 | echo "Ok, I've found them under $src"
|
|---|
| 814 | else
|
|---|
| 815 | echo "Sorry, I can't seem to be able to locate $package sources." >&4
|
|---|
| 816 | echo "Please, use absolute path or relative with './' to Configure." >&4
|
|---|
| 817 | exit 1
|
|---|
| 818 | fi
|
|---|
| 819 | ;;
|
|---|
| 820 | ../../.) ;;
|
|---|
| 821 | *)
|
|---|
| 822 | # echo " "
|
|---|
| 823 | # echo "Sources for $package found in $src" >&4
|
|---|
| 824 | ;;
|
|---|
| 825 | esac
|
|---|
| 826 |
|
|---|
| 827 | : script used to extract .SH files with variable substitutions
|
|---|
| 828 | cat >extract <<'EOS'
|
|---|
| 829 | CONFIG=true
|
|---|
| 830 | #echo "Doing variable substitutions on .SH files..."
|
|---|
| 831 | if test -f $src/MANIFEST; then
|
|---|
| 832 | set x `awk '{print $1}' <$src/MANIFEST | grep '\.SH'`
|
|---|
| 833 | else
|
|---|
| 834 | # echo "(Looking for .SH files under the source directory.)"
|
|---|
| 835 | set x `(cd $src; find ./config/scripts -name "*.SH" -print)`
|
|---|
| 836 | fi
|
|---|
| 837 | shift
|
|---|
| 838 | case $# in
|
|---|
| 839 | 0) set x `(cd $src; echo *.SH)`; shift;;
|
|---|
| 840 | esac
|
|---|
| 841 | if test ! -f $src/$1; then
|
|---|
| 842 | shift
|
|---|
| 843 | fi
|
|---|
| 844 | mkdir_p='
|
|---|
| 845 | name=$1;
|
|---|
| 846 | create="";
|
|---|
| 847 | while test $name; do
|
|---|
| 848 | if test ! -d "$name"; then
|
|---|
| 849 | create="$name $create";
|
|---|
| 850 | name=`echo $name | sed -e "s|^[^/]*$||"`;
|
|---|
| 851 | name=`echo $name | sed -e "s|\(.*\)/.*|\1|"`;
|
|---|
| 852 | else
|
|---|
| 853 | name="";
|
|---|
| 854 | fi;
|
|---|
| 855 | done;
|
|---|
| 856 | for file in $create; do
|
|---|
| 857 | mkdir $file;
|
|---|
| 858 | done
|
|---|
| 859 | '
|
|---|
| 860 | for file in $*; do
|
|---|
| 861 | case "$src" in
|
|---|
| 862 | ".")
|
|---|
| 863 | case "$file" in
|
|---|
| 864 | */*)
|
|---|
| 865 | dir=`expr X$file : 'X\(.*\)/'`
|
|---|
| 866 | file_SH=`expr X$file : 'X.*/\(.*\)'`
|
|---|
| 867 | file_EX=`expr X$file : 'X.*/\(.*\).SH'`
|
|---|
| 868 | (cd $dir && . ./$file_SH && mkdir -p $abssrc/.config/bin/$g4system && mv $file_EX $abssrc/.config/bin/$g4system)
|
|---|
| 869 | # echo Sergei_1
|
|---|
| 870 | # echo "file_SH=$file_SH"
|
|---|
| 871 | # echo "file_EX=$file_EX"
|
|---|
| 872 | # echo "file=$file"
|
|---|
| 873 | # echo "dir=$dir"
|
|---|
| 874 | # echo "src=$src"
|
|---|
| 875 | # echo "g4system=$g4system"
|
|---|
| 876 | # echo Sergei_1
|
|---|
| 877 | ;;
|
|---|
| 878 | *)
|
|---|
| 879 | file_SH=`expr X$file : 'X.*/\(.*\)'`
|
|---|
| 880 | file_EX=`expr X$file : 'X.*/\(.*\).SH'`
|
|---|
| 881 | (. ./$file && mkdir -p $abssrc/.config/bin/$g4system && mv file-SH $abssrc/.config/bin/$g4system)
|
|---|
| 882 | # echo Sergei_2
|
|---|
| 883 | # echo "file_SH=$file_SH"
|
|---|
| 884 | # echo "file_EX=$file_EX"
|
|---|
| 885 | # echo "file=$file"
|
|---|
| 886 | # echo "dir=$dir"
|
|---|
| 887 | # echo "src=$src"
|
|---|
| 888 | # echo "g4system=$g4system"
|
|---|
| 889 | # echo Sergei_2
|
|---|
| 890 | ;;
|
|---|
| 891 | esac
|
|---|
| 892 | ;;
|
|---|
| 893 | *)
|
|---|
| 894 | case "$file" in
|
|---|
| 895 | */*)
|
|---|
| 896 | dir=`expr X$file : 'X\(.*\)/'`
|
|---|
| 897 | file_SH=`expr X$file : 'X.*/\(.*\)'`
|
|---|
| 898 | file_EX=`expr X$file : 'X.*/\(.*\)\.SH'`
|
|---|
| 899 | (set x $dir; shift; eval $mkdir_p)
|
|---|
| 900 |
|
|---|
| 901 | (sh <$src/$dir/$file_SH && mkdir -p $src/.config/bin/$g4system && mv $file_EX $src/.config/bin/$g4system)
|
|---|
| 902 |
|
|---|
| 903 | # echo Sergei_3
|
|---|
| 904 | # echo "dir=$dir"
|
|---|
| 905 | # echo "file=$file"
|
|---|
| 906 |
|
|---|
| 907 | # echo Sergei_3
|
|---|
| 908 | ;;
|
|---|
| 909 | *)
|
|---|
| 910 | file_SH=`expr X$file : 'X.*/\(.*\)'`
|
|---|
| 911 | file_EX=`expr X$file : 'X.*/\(.*\)\.SH'`
|
|---|
| 912 | (sh <$src/$file && mkdir -p $src/.config/bin/$g4system && mv $file_EX $src/.config/bin/$g4system)
|
|---|
| 913 | echo Sergei_4
|
|---|
| 914 | ;;
|
|---|
| 915 | esac
|
|---|
| 916 | ;;
|
|---|
| 917 | esac
|
|---|
| 918 | done
|
|---|
| 919 | if test -f $src/config_h.SH; then
|
|---|
| 920 | if test ! -f config.h; then
|
|---|
| 921 | : oops, they left it out of MANIFEST, probably, so do it anyway.
|
|---|
| 922 | . $src/config_h.SH
|
|---|
| 923 | fi
|
|---|
| 924 | fi
|
|---|
| 925 | EOS
|
|---|
| 926 |
|
|---|
| 927 | : extract files and exit if asked to do so
|
|---|
| 928 | case "$extractsh" in
|
|---|
| 929 | true)
|
|---|
| 930 | case "$realsilent" in
|
|---|
| 931 | true) ;;
|
|---|
| 932 | *) exec 1>&4;;
|
|---|
| 933 | esac
|
|---|
| 934 | case "$config_sh" in
|
|---|
| 935 | '') config_sh='$g4conf/config.sh'; config="$g4conf/config.sh";;
|
|---|
| 936 | /*) config="$g4conf/$config_sh";;
|
|---|
| 937 | *) config="$g4conf/$config_sh";;
|
|---|
| 938 | esac
|
|---|
| 939 | echo " "
|
|---|
| 940 | echo "Fetching answers from $config_sh..."
|
|---|
| 941 | . $config
|
|---|
| 942 | test "$override" && . ./optdef.sh
|
|---|
| 943 | echo " "
|
|---|
| 944 | cd ../..
|
|---|
| 945 | . .config/UU/extract
|
|---|
| 946 | rm -rf .config/UU
|
|---|
| 947 | echo "Done."
|
|---|
| 948 | exit 0
|
|---|
| 949 | ;;
|
|---|
| 950 | esac
|
|---|
| 951 |
|
|---|
| 952 | : Eunice requires " " instead of "", can you believe it
|
|---|
| 953 | #echo " "
|
|---|
| 954 | : Here we go...
|
|---|
| 955 | #if [ X$install = Xyes ] ; then
|
|---|
| 956 | #echo " "
|
|---|
| 957 | #echo " "
|
|---|
| 958 | #echo " "
|
|---|
| 959 | #echo " --- Geant4 Toolkit Installation ---"
|
|---|
| 960 | #echo " "
|
|---|
| 961 | #echo " "
|
|---|
| 962 | #echo " "
|
|---|
| 963 | #echo " "
|
|---|
| 964 | #else
|
|---|
| 965 | #echo " "
|
|---|
| 966 | #echo " "
|
|---|
| 967 | #echo " "
|
|---|
| 968 | #echo " --- Geant4 Toolkit Installation ---"
|
|---|
| 969 | #echo " (setting environments for USER )"
|
|---|
| 970 | #echo " "
|
|---|
| 971 | #echo " "
|
|---|
| 972 | #echo " "
|
|---|
| 973 | #fi
|
|---|
| 974 |
|
|---|
| 975 | trap 'echo " ";rm -rf ../../.config/UU; test -d ../../.config/UU && rm -rf X $rmlist; exit 1' 1 2 3 15
|
|---|
| 976 |
|
|---|
| 977 | : create .config dir to save info across Configure sessions
|
|---|
| 978 | test -d ../.config || mkdir ../.config
|
|---|
| 979 | cat >../.config/README <<EOF
|
|---|
| 980 | This directory created by Configure to save information that should
|
|---|
| 981 | persist across sessions for $package.
|
|---|
| 982 |
|
|---|
| 983 | You may safely delete it if you wish.
|
|---|
| 984 | EOF
|
|---|
| 985 |
|
|---|
| 986 | : general instructions
|
|---|
| 987 | needman=true
|
|---|
| 988 | firsttime=true
|
|---|
| 989 | user=`(logname) 2>/dev/null`
|
|---|
| 990 | case "$user" in
|
|---|
| 991 | '') user=`whoami 2>&1`;;
|
|---|
| 992 | esac
|
|---|
| 993 |
|
|---|
| 994 | #if [ X$install = Xyes ] ; then
|
|---|
| 995 | #
|
|---|
| 996 | #echo " "
|
|---|
| 997 | #echo " "
|
|---|
| 998 | #echo " "
|
|---|
| 999 | #echo " --- Geant4 Toolkit Installation ---"
|
|---|
| 1000 | #echo " "
|
|---|
| 1001 | #echo " "
|
|---|
| 1002 | #echo " "
|
|---|
| 1003 | #echo " "
|
|---|
| 1004 | #
|
|---|
| 1005 | ##if $contains "^$user\$" ../../.config/instruct >/dev/null 2>&1; then
|
|---|
| 1006 | ## firsttime=false
|
|---|
| 1007 | ## echo " "
|
|---|
| 1008 | ## rp='Would you like to see the instructions?'
|
|---|
| 1009 | ## dflt=n
|
|---|
| 1010 | ## . ./myread
|
|---|
| 1011 | ## case "$ans" in
|
|---|
| 1012 | ## [yY]*) ;;
|
|---|
| 1013 | ## *) needman=false;;
|
|---|
| 1014 | ## esac
|
|---|
| 1015 | ##fi
|
|---|
| 1016 | #fi
|
|---|
| 1017 |
|
|---|
| 1018 | if [ X$g4build = Xyes ] ; then
|
|---|
| 1019 |
|
|---|
| 1020 | echo " "
|
|---|
| 1021 | echo " "
|
|---|
| 1022 | echo " "
|
|---|
| 1023 | echo " --- Geant4 Toolkit Build ---"
|
|---|
| 1024 | echo " "
|
|---|
| 1025 | echo " "
|
|---|
| 1026 | echo " "
|
|---|
| 1027 | echo " "
|
|---|
| 1028 |
|
|---|
| 1029 | if $contains "^$user\$" ../../.config/instruct >/dev/null 2>&1; then
|
|---|
| 1030 | firsttime=false
|
|---|
| 1031 | echo " "
|
|---|
| 1032 | rp='Would you like to see the instructions?'
|
|---|
| 1033 | dflt=n
|
|---|
| 1034 | . ./myread
|
|---|
| 1035 | case "$ans" in
|
|---|
| 1036 | [yY]*) ;;
|
|---|
| 1037 | *) needman=false;;
|
|---|
| 1038 | esac
|
|---|
| 1039 | fi
|
|---|
| 1040 | fi
|
|---|
| 1041 |
|
|---|
| 1042 | if [ X$install = Xyes ] ; then
|
|---|
| 1043 | needman=false
|
|---|
| 1044 | fi
|
|---|
| 1045 |
|
|---|
| 1046 | if [ X$install = X -a X$g4build = X ] ; then
|
|---|
| 1047 | needman=false
|
|---|
| 1048 | fi
|
|---|
| 1049 |
|
|---|
| 1050 | if $needman; then
|
|---|
| 1051 | cat <<EOH
|
|---|
| 1052 |
|
|---|
| 1053 | This installation shell script will examine your system and ask you questions
|
|---|
| 1054 | to determine how the Geant4 Toolkit should be installed. If you get stuck on
|
|---|
| 1055 | a question, you may use a ! shell escape to start a subshell or execute a
|
|---|
| 1056 | command. Many of the questions will have default answers in square brackets;
|
|---|
| 1057 | typing carriage return will set the default.
|
|---|
| 1058 |
|
|---|
| 1059 | On AFS it is allowed to specify either absolute or relative
|
|---|
| 1060 | paths (i.e. starting with the ~username construct).
|
|---|
| 1061 |
|
|---|
| 1062 | EOH
|
|---|
| 1063 | rp=''
|
|---|
| 1064 | dflt='Type carriage return to continue'
|
|---|
| 1065 | . ./myread
|
|---|
| 1066 | cat <<'EOH'
|
|---|
| 1067 |
|
|---|
| 1068 | The prompt used in this script allows you to use shell variables and backticks
|
|---|
| 1069 | in your answers. You may use $1, $2, etc... to refer to the words in the
|
|---|
| 1070 | default answer, as if the default line was a set of arguments given to a
|
|---|
| 1071 | script shell. This means you may also use $* to repeat the whole default line.
|
|---|
| 1072 |
|
|---|
| 1073 | Everytime there is a substitution, you will have to confirm. If there is an
|
|---|
| 1074 | error (e.g. an unmatched backtick), the default answer will remain unchanged
|
|---|
| 1075 | and you will be prompted again.
|
|---|
| 1076 |
|
|---|
| 1077 | Running 'Configure -d' will bypass nearly all the questions and
|
|---|
| 1078 | use the computed defaults (or answers saved in a configuration
|
|---|
| 1079 | previously generated).
|
|---|
| 1080 |
|
|---|
| 1081 | Type 'Configure -h' for a list of options.
|
|---|
| 1082 |
|
|---|
| 1083 | You may also start interactively and then answer '& -d' at any prompt to turn
|
|---|
| 1084 | on the non-interactive behaviour for the rest of the execution.
|
|---|
| 1085 |
|
|---|
| 1086 | EOH
|
|---|
| 1087 | . ./myread
|
|---|
| 1088 | cat <<EOH
|
|---|
| 1089 |
|
|---|
| 1090 | Much effort has been spent to ensure that this shell script will run on any
|
|---|
| 1091 | Unix system. If despite that you can't run Configure for some reason, you'll
|
|---|
| 1092 | have to set the proper environment variables by hand and follow the "manual"
|
|---|
| 1093 | installation as specified in the Geant4 Installation Guide.
|
|---|
| 1094 |
|
|---|
| 1095 | EOH
|
|---|
| 1096 | dflt='Type carriage return to continue'
|
|---|
| 1097 | . ./myread
|
|---|
| 1098 | case "$firsttime" in
|
|---|
| 1099 | true) echo $user >>../../.config/instruct;;
|
|---|
| 1100 | esac
|
|---|
| 1101 | fi
|
|---|
| 1102 |
|
|---|
| 1103 | : find out where common programs are
|
|---|
| 1104 | #echo " "
|
|---|
| 1105 | #echo "Locating common programs..." >&4
|
|---|
| 1106 | cat <<EOSC >loc
|
|---|
| 1107 | $startsh
|
|---|
| 1108 | case \$# in
|
|---|
| 1109 | 0) exit 1;;
|
|---|
| 1110 | esac
|
|---|
| 1111 | thing=\$1
|
|---|
| 1112 | shift
|
|---|
| 1113 | dflt=\$1
|
|---|
| 1114 | shift
|
|---|
| 1115 | for dir in \$*; do
|
|---|
| 1116 | case "\$thing" in
|
|---|
| 1117 | .)
|
|---|
| 1118 | if test -d \$dir/\$thing; then
|
|---|
| 1119 | echo \$dir
|
|---|
| 1120 | exit 0
|
|---|
| 1121 | fi
|
|---|
| 1122 | ;;
|
|---|
| 1123 | *)
|
|---|
| 1124 | for thisthing in \$dir/\$thing; do
|
|---|
| 1125 | : just loop through to pick last item
|
|---|
| 1126 | done
|
|---|
| 1127 | if test -f \$thisthing; then
|
|---|
| 1128 | echo \$thisthing
|
|---|
| 1129 | exit 0
|
|---|
| 1130 | elif test -f \$dir/\$thing.exe; then
|
|---|
| 1131 | : on Eunice apparently
|
|---|
| 1132 | echo \$dir/\$thing
|
|---|
| 1133 | exit 0
|
|---|
| 1134 | fi
|
|---|
| 1135 | ;;
|
|---|
| 1136 | esac
|
|---|
| 1137 | done
|
|---|
| 1138 | echo \$dflt
|
|---|
| 1139 | exit 1
|
|---|
| 1140 | EOSC
|
|---|
| 1141 | chmod +x loc
|
|---|
| 1142 | $eunicefix loc
|
|---|
| 1143 | loclist="
|
|---|
| 1144 | awk
|
|---|
| 1145 | cat
|
|---|
| 1146 | expr
|
|---|
| 1147 | grep
|
|---|
| 1148 | rm
|
|---|
| 1149 | sed
|
|---|
| 1150 | touch
|
|---|
| 1151 | tr
|
|---|
| 1152 | "
|
|---|
| 1153 | trylist="
|
|---|
| 1154 | date
|
|---|
| 1155 | gcc
|
|---|
| 1156 | ln
|
|---|
| 1157 | test
|
|---|
| 1158 | uname
|
|---|
| 1159 | "
|
|---|
| 1160 | pth=`echo $PATH | sed -e "s/$p_/ /g"`
|
|---|
| 1161 | pth="$pth /lib /usr/lib"
|
|---|
| 1162 | for file in $loclist; do
|
|---|
| 1163 | eval xxx=\$$file
|
|---|
| 1164 | case "$xxx" in
|
|---|
| 1165 | /*|?:[\\/]*)
|
|---|
| 1166 | if test -f "$xxx"; then
|
|---|
| 1167 | : ok
|
|---|
| 1168 | else
|
|---|
| 1169 | echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
|
|---|
| 1170 | xxx=`./loc $file $file $pth`
|
|---|
| 1171 | fi
|
|---|
| 1172 | ;;
|
|---|
| 1173 | '') xxx=`./loc $file $file $pth`;;
|
|---|
| 1174 | *) xxx=`./loc $xxx $xxx $pth`;;
|
|---|
| 1175 | esac
|
|---|
| 1176 | eval $file=$xxx
|
|---|
| 1177 | eval _$file=$xxx
|
|---|
| 1178 | case "$xxx" in
|
|---|
| 1179 | /*)
|
|---|
| 1180 | echo "$file is in $xxx." > /dev/null
|
|---|
| 1181 | ;;
|
|---|
| 1182 | ?:[\\/]*)
|
|---|
| 1183 | echo "$file is in $xxx." > /dev/null
|
|---|
| 1184 | ;;
|
|---|
| 1185 | *)
|
|---|
| 1186 | echo "I don't know where '$file' is." >&4
|
|---|
| 1187 | echo "Please, install it or fix your PATH settings!" >&4
|
|---|
| 1188 | exit 1
|
|---|
| 1189 | ;;
|
|---|
| 1190 | esac
|
|---|
| 1191 | done
|
|---|
| 1192 | #echo " "
|
|---|
| 1193 | #echo "Don't worry if any of the following aren't found..."
|
|---|
| 1194 | say=offhand
|
|---|
| 1195 | for file in $trylist; do
|
|---|
| 1196 | eval xxx=\$$file
|
|---|
| 1197 | case "$xxx" in
|
|---|
| 1198 | /*|?:[\\/]*)
|
|---|
| 1199 | if test -f "$xxx"; then
|
|---|
| 1200 | : ok
|
|---|
| 1201 | else
|
|---|
| 1202 | echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
|
|---|
| 1203 | xxx=`./loc $file $file $pth`
|
|---|
| 1204 | fi
|
|---|
| 1205 | ;;
|
|---|
| 1206 | '') xxx=`./loc $file $file $pth`;;
|
|---|
| 1207 | *) xxx=`./loc $xxx $xxx $pth`;;
|
|---|
| 1208 | esac
|
|---|
| 1209 | eval $file=$xxx
|
|---|
| 1210 | eval _$file=$xxx
|
|---|
| 1211 | case "$xxx" in
|
|---|
| 1212 | /*)
|
|---|
| 1213 | echo "$file is in $xxx." > /dev/null
|
|---|
| 1214 | ;;
|
|---|
| 1215 | ?:[\\/]*)
|
|---|
| 1216 | echo "$file is in $xxx." > /dev/null
|
|---|
| 1217 | ;;
|
|---|
| 1218 | *)
|
|---|
| 1219 | echo "I don't see $file out there, $say."
|
|---|
| 1220 | say=either
|
|---|
| 1221 | ;;
|
|---|
| 1222 | esac
|
|---|
| 1223 | done
|
|---|
| 1224 | case "$egrep" in
|
|---|
| 1225 | egrep)
|
|---|
| 1226 | # echo "Substituting grep for egrep."
|
|---|
| 1227 | egrep=$grep
|
|---|
| 1228 | ;;
|
|---|
| 1229 | esac
|
|---|
| 1230 | case "$ln" in
|
|---|
| 1231 | ln)
|
|---|
| 1232 | # echo "Substituting cp for ln."
|
|---|
| 1233 | ln=$cp
|
|---|
| 1234 | ;;
|
|---|
| 1235 | esac
|
|---|
| 1236 | case "$test" in
|
|---|
| 1237 | test)
|
|---|
| 1238 | echo "Hopefully test is built into your sh." > /dev/null
|
|---|
| 1239 | ;;
|
|---|
| 1240 | *)
|
|---|
| 1241 | if `sh -c "PATH= test true" >/dev/null 2>&1`; then
|
|---|
| 1242 | echo "Using the test built into your sh." > /dev/null
|
|---|
| 1243 | test=test
|
|---|
| 1244 | _test=test
|
|---|
| 1245 | fi
|
|---|
| 1246 | ;;
|
|---|
| 1247 | esac
|
|---|
| 1248 | case "$echo" in
|
|---|
| 1249 | echo)
|
|---|
| 1250 | echo "Hopefully echo is built into your sh." > /dev/null
|
|---|
| 1251 | ;;
|
|---|
| 1252 | '') ;;
|
|---|
| 1253 | *)
|
|---|
| 1254 | # echo " "
|
|---|
| 1255 | #echo "Checking compatibility between $echo and builtin echo (if any)..." >&4
|
|---|
| 1256 | $echo $n "hi there$c" >foo1
|
|---|
| 1257 | echo $n "hi there$c" >foo2
|
|---|
| 1258 | if cmp foo1 foo2 >/dev/null 2>&1; then
|
|---|
| 1259 | echo "They are compatible. In fact, they may be identical." > /dev/null
|
|---|
| 1260 | else
|
|---|
| 1261 | case "$n" in
|
|---|
| 1262 | '-n') n='' c='\c';;
|
|---|
| 1263 | *) n='-n' c='';;
|
|---|
| 1264 | esac
|
|---|
| 1265 | cat <<FOO
|
|---|
| 1266 | They are not compatible! You are probably running ksh on a non-USG system.
|
|---|
| 1267 | I'll have to use $echo instead of the builtin, since Bourne shell doesn't
|
|---|
| 1268 | have echo built in and we may have to run some Bourne shell scripts. That
|
|---|
| 1269 | means I'll have to use '$n$c' to suppress newlines now.
|
|---|
| 1270 |
|
|---|
| 1271 | FOO
|
|---|
| 1272 | $echo $n "The star should be here-->$c"
|
|---|
| 1273 | $echo "*"
|
|---|
| 1274 | fi
|
|---|
| 1275 | $rm -f foo1 foo2
|
|---|
| 1276 | ;;
|
|---|
| 1277 | esac
|
|---|
| 1278 |
|
|---|
| 1279 | : determine whether symbolic links are supported
|
|---|
| 1280 | #echo " "
|
|---|
| 1281 | $touch blurfl
|
|---|
| 1282 | if $ln -s blurfl sym > /dev/null 2>&1 ; then
|
|---|
| 1283 | # echo "Symbolic links are supported." >&4
|
|---|
| 1284 | lns="$ln -s"
|
|---|
| 1285 | else
|
|---|
| 1286 | # echo "Symbolic links are NOT supported." >&4
|
|---|
| 1287 | lns="$ln"
|
|---|
| 1288 | fi
|
|---|
| 1289 | $rm -f blurfl sym
|
|---|
| 1290 |
|
|---|
| 1291 | : see whether [:lower:] and [:upper:] are supported character classes
|
|---|
| 1292 | #echo " "
|
|---|
| 1293 | up='[A-Z]'
|
|---|
| 1294 | low='[a-z]'
|
|---|
| 1295 | case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
|
|---|
| 1296 | ABYZ)
|
|---|
| 1297 | # echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4
|
|---|
| 1298 | up='[:upper:]'
|
|---|
| 1299 | low='[:lower:]'
|
|---|
| 1300 | ;;
|
|---|
| 1301 | *)
|
|---|
| 1302 | # echo "Your tr only supports [a-z] and [A-Z] to convert case." >&4
|
|---|
| 1303 | ;;
|
|---|
| 1304 | esac
|
|---|
| 1305 | : set up the translation script tr, must be called with ./tr of course
|
|---|
| 1306 | cat >tr <<EOSC
|
|---|
| 1307 | $startsh
|
|---|
| 1308 | case "\$1\$2" in
|
|---|
| 1309 | '[A-Z][a-z]') exec $tr '$up' '$low';;
|
|---|
| 1310 | '[a-z][A-Z]') exec $tr '$low' '$up';;
|
|---|
| 1311 | esac
|
|---|
| 1312 | exec $tr "\$@"
|
|---|
| 1313 | EOSC
|
|---|
| 1314 | chmod +x tr
|
|---|
| 1315 | $eunicefix tr
|
|---|
| 1316 |
|
|---|
| 1317 | : Try to determine whether config.sh was made on this system
|
|---|
| 1318 | case "$config_sh" in
|
|---|
| 1319 | '')
|
|---|
| 1320 | myuname=`( ($uname -a) 2>/dev/null || hostname) 2>&1`
|
|---|
| 1321 |
|
|---|
| 1322 | mygcc=`( ($g++ -v) 2>/dev/null) 2>&1`
|
|---|
| 1323 | myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \
|
|---|
| 1324 | ./tr '[A-Z]' '[a-z]' | tr '\012' ' '`
|
|---|
| 1325 | newmyuname="$myuname"
|
|---|
| 1326 | dflt=n
|
|---|
| 1327 | case "$knowitall" in
|
|---|
| 1328 | '')
|
|---|
| 1329 | if test -f ../config.sh; then
|
|---|
| 1330 | if $contains myuname= ../config.sh >/dev/null 2>&1; then
|
|---|
| 1331 | eval "`grep myuname= ../config.sh`"
|
|---|
| 1332 | fi
|
|---|
| 1333 | if test "X$myuname" = "X$newmyuname"; then
|
|---|
| 1334 | dflt=y
|
|---|
| 1335 | fi
|
|---|
| 1336 | fi
|
|---|
| 1337 | ;;
|
|---|
| 1338 | *) dflt=y;;
|
|---|
| 1339 | esac
|
|---|
| 1340 |
|
|---|
| 1341 | : Get old answers from old config file if Configure was run on the
|
|---|
| 1342 | : same system, otherwise use the hints.
|
|---|
| 1343 | hint=default
|
|---|
| 1344 | cd ../..
|
|---|
| 1345 |
|
|---|
| 1346 | if $test -d $src/hints ; then
|
|---|
| 1347 | (cd $src/hints; ls -C *.sh 2> /dev/null) | $sed 's/\.sh/ /g' >&4
|
|---|
| 1348 | fi
|
|---|
| 1349 | dflt=''
|
|---|
| 1350 | : Half the following guesses are probably wrong... If you have better
|
|---|
| 1351 | : tests or hints, please send them to Serguei.Sadilov@cern.ch
|
|---|
| 1352 | : The metaconfig authors would also appreciate a copy...
|
|---|
| 1353 | $test -f /irix && osname=irix
|
|---|
| 1354 | $test -f /xenix && osname=sco_xenix
|
|---|
| 1355 | $test -f /dynix && osname=dynix
|
|---|
| 1356 | $test -f /dnix && osname=dnix
|
|---|
| 1357 | $test -f /lynx.os && osname=lynxos
|
|---|
| 1358 | $test -f /unicos && osname=unicos && osvers=`$uname -r`
|
|---|
| 1359 | $test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r`
|
|---|
| 1360 | $test -f /bin/mips && /bin/mips && osname=mips
|
|---|
| 1361 | $test -d /NextApps && set X `hostinfo | grep 'NeXT Mach.*:' | \
|
|---|
| 1362 | $sed -e 's/://' -e 's/\./_/'` && osname=next && osvers=$4
|
|---|
| 1363 | $test -d /usr/apollo/bin && osname=apollo
|
|---|
| 1364 | $test -f /etc/saf/_sactab && osname=svr4
|
|---|
| 1365 | $test -d /usr/include/minix && osname=minix
|
|---|
| 1366 | if $test -d /MachTen; then
|
|---|
| 1367 | osname=machten
|
|---|
| 1368 | if $test -x /sbin/version; then
|
|---|
| 1369 | osvers=`/sbin/version | $awk '{print $2}' |
|
|---|
| 1370 | $sed -e 's/[A-Za-z]$//'`
|
|---|
| 1371 | elif $test -x /usr/etc/version; then
|
|---|
| 1372 | osvers=`/usr/etc/version | $awk '{print $2}' |
|
|---|
| 1373 | $sed -e 's/[A-Za-z]$//'`
|
|---|
| 1374 | else
|
|---|
| 1375 | osvers="$2.$3"
|
|---|
| 1376 | fi
|
|---|
| 1377 | fi
|
|---|
| 1378 | if $test -f $uname; then
|
|---|
| 1379 | set X $myuname
|
|---|
| 1380 | shift
|
|---|
| 1381 |
|
|---|
| 1382 | case "$5" in
|
|---|
| 1383 | fps*) osname=fps ;;
|
|---|
| 1384 | mips*)
|
|---|
| 1385 | case "$4" in
|
|---|
| 1386 | umips) osname=umips ;;
|
|---|
| 1387 | *) osname=mips ;;
|
|---|
| 1388 | esac;;
|
|---|
| 1389 | [23]100) osname=mips ;;
|
|---|
| 1390 | next*) osname=next ;;
|
|---|
| 1391 | news*) osname=news ;;
|
|---|
| 1392 | i386*)
|
|---|
| 1393 | if $test -f /etc/kconfig; then
|
|---|
| 1394 | osname=isc
|
|---|
| 1395 | if test "$lns" = "ln -s"; then
|
|---|
| 1396 | osvers=4
|
|---|
| 1397 | elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then
|
|---|
| 1398 | osvers=3
|
|---|
| 1399 | elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then
|
|---|
| 1400 | osvers=2
|
|---|
| 1401 | fi
|
|---|
| 1402 | fi
|
|---|
| 1403 | ;;
|
|---|
| 1404 | esac
|
|---|
| 1405 |
|
|---|
| 1406 | case "$1" in
|
|---|
| 1407 | aix) osname=aix
|
|---|
| 1408 | tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1`
|
|---|
| 1409 | case "$tmp" in
|
|---|
| 1410 | 'not found') osvers="$4"."$3" ;;
|
|---|
| 1411 | '<3240'|'<>3240') osvers=3.2.0 ;;
|
|---|
| 1412 | '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;;
|
|---|
| 1413 | '=3250'|'>3250') osvers=3.2.5 ;;
|
|---|
| 1414 | *) osvers=$tmp;;
|
|---|
| 1415 | esac
|
|---|
| 1416 | ;;
|
|---|
| 1417 | *dc.osx) osname=dcosx
|
|---|
| 1418 | osvers="$3"
|
|---|
| 1419 | ;;
|
|---|
| 1420 | dnix) osname=dnix
|
|---|
| 1421 | osvers="$3"
|
|---|
| 1422 | ;;
|
|---|
| 1423 | cygwin*) osname=win32
|
|---|
| 1424 | ;;
|
|---|
| 1425 | darwin*) osname=darwin
|
|---|
| 1426 | ;;
|
|---|
| 1427 | domainos) osname=apollo
|
|---|
| 1428 | osvers="$3"
|
|---|
| 1429 | ;;
|
|---|
| 1430 | dgux) osname=dgux
|
|---|
| 1431 | osvers="$3"
|
|---|
| 1432 | ;;
|
|---|
| 1433 | dynixptx*) osname=dynixptx
|
|---|
| 1434 | osvers="$3"
|
|---|
| 1435 | ;;
|
|---|
| 1436 | freebsd) osname=freebsd
|
|---|
| 1437 | osvers="$3" ;;
|
|---|
| 1438 | genix) osname=genix ;;
|
|---|
| 1439 | hp*) osname=hpux
|
|---|
| 1440 | case "$3" in
|
|---|
| 1441 | *.08.*) osvers=9 ;;
|
|---|
| 1442 | *.09.*) osvers=9 ;;
|
|---|
| 1443 | *.10.*) osvers=10 ;;
|
|---|
| 1444 | *) osvers="$3" ;;
|
|---|
| 1445 | esac
|
|---|
| 1446 | ;;
|
|---|
| 1447 | irix*) osname=irix
|
|---|
| 1448 | case "$3" in
|
|---|
| 1449 | 4*) osvers=4 ;;
|
|---|
| 1450 | 5*) osvers=5 ;;
|
|---|
| 1451 | *) osvers="$3" ;;
|
|---|
| 1452 | esac
|
|---|
| 1453 | ;;
|
|---|
| 1454 | linux) osname=linux
|
|---|
| 1455 | case "$3" in
|
|---|
| 1456 | 1*) osvers=1 ;;
|
|---|
| 1457 | *) osvers="$3" ;;
|
|---|
| 1458 | esac
|
|---|
| 1459 | ;;
|
|---|
| 1460 | netbsd*) osname=netbsd
|
|---|
| 1461 | osvers="$3"
|
|---|
| 1462 | ;;
|
|---|
| 1463 | bsd386) osname=bsd386
|
|---|
| 1464 | osvers=`$uname -r`
|
|---|
| 1465 | ;;
|
|---|
| 1466 | next*) osname=next ;;
|
|---|
| 1467 | solaris) osname=solaris
|
|---|
| 1468 | case "$3" in
|
|---|
| 1469 | 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
|
|---|
| 1470 | *) osvers="$3" ;;
|
|---|
| 1471 | esac
|
|---|
| 1472 | ;;
|
|---|
| 1473 | sunos) osname=sunos
|
|---|
| 1474 | case "$3" in
|
|---|
| 1475 | 5*) osname=solaris
|
|---|
| 1476 | osvers=`echo $3 | $sed 's/^5/2/g'` ;;
|
|---|
| 1477 | *) osvers="$3" ;;
|
|---|
| 1478 | esac
|
|---|
| 1479 | ;;
|
|---|
| 1480 | titanos) osname=titanos
|
|---|
| 1481 | case "$3" in
|
|---|
| 1482 | 1*) osvers=1 ;;
|
|---|
| 1483 | 2*) osvers=2 ;;
|
|---|
| 1484 | 3*) osvers=3 ;;
|
|---|
| 1485 | 4*) osvers=4 ;;
|
|---|
| 1486 | *) osvers="$3" ;;
|
|---|
| 1487 | esac
|
|---|
| 1488 | ;;
|
|---|
| 1489 | ultrix) osname=ultrix
|
|---|
| 1490 | osvers="$3"
|
|---|
| 1491 | ;;
|
|---|
| 1492 | osf1|mls+) case "$5" in
|
|---|
| 1493 | alpha)
|
|---|
| 1494 | osname=dec_osf
|
|---|
| 1495 | osvers=`echo "$3" | sed 's/^[vt]//'`
|
|---|
| 1496 | ;;
|
|---|
| 1497 | hp*) osname=hp_osf1 ;;
|
|---|
| 1498 | mips) osname=mips_osf1 ;;
|
|---|
| 1499 | esac
|
|---|
| 1500 | ;;
|
|---|
| 1501 | uts) osname=uts
|
|---|
| 1502 | osvers="$3"
|
|---|
| 1503 | ;;
|
|---|
| 1504 | qnx) osname=qnx
|
|---|
| 1505 | osvers="$4"
|
|---|
| 1506 | ;;
|
|---|
| 1507 | $2) case "$osname" in
|
|---|
| 1508 | *isc*) ;;
|
|---|
| 1509 | *freebsd*) ;;
|
|---|
| 1510 | svr*)
|
|---|
| 1511 | : svr4.x or possibly later
|
|---|
| 1512 | case "svr$3" in
|
|---|
| 1513 | ${osname}*)
|
|---|
| 1514 | osname=svr$3
|
|---|
| 1515 | osvers=$4
|
|---|
| 1516 | ;;
|
|---|
| 1517 | esac
|
|---|
| 1518 | case "$osname" in
|
|---|
| 1519 | svr4.0)
|
|---|
| 1520 | : Check for ESIX
|
|---|
| 1521 | if test -f /stand/boot ; then
|
|---|
| 1522 | eval `grep '^INITPROG=[a-z/0-9]*$' /stand/boot`
|
|---|
| 1523 | if test -n "$INITPROG" -a -f "$INITPROG"; then
|
|---|
| 1524 | isesix=`strings -a $INITPROG|grep 'ESIX SYSTEM V/386 Release 4.0'`
|
|---|
| 1525 | if test -n "$isesix"; then
|
|---|
| 1526 | osname=esix4
|
|---|
| 1527 | fi
|
|---|
| 1528 | fi
|
|---|
| 1529 | fi
|
|---|
| 1530 | ;;
|
|---|
| 1531 | esac
|
|---|
| 1532 | ;;
|
|---|
| 1533 | *) if test -f /etc/systemid; then
|
|---|
| 1534 | osname=sco
|
|---|
| 1535 | set `echo $3 | $sed 's/\./ /g'` $4
|
|---|
| 1536 | if $test -f sco_$1_$2_$3.sh; then
|
|---|
| 1537 | osvers=$1.$2.$3
|
|---|
| 1538 | elif $test -f sco_$1_$2.sh; then
|
|---|
| 1539 | osvers=$1.$2
|
|---|
| 1540 | elif $test -f sco_$1.sh; then
|
|---|
| 1541 | osvers=$1
|
|---|
| 1542 | fi
|
|---|
| 1543 | else
|
|---|
| 1544 | case "$osname" in
|
|---|
| 1545 | '') : Still unknown. Probably a generic Sys V.
|
|---|
| 1546 | osname="sysv"
|
|---|
| 1547 | osvers="$3"
|
|---|
| 1548 | ;;
|
|---|
| 1549 | esac
|
|---|
| 1550 | fi
|
|---|
| 1551 | ;;
|
|---|
| 1552 | esac
|
|---|
| 1553 | ;;
|
|---|
| 1554 | *) case "$osname" in
|
|---|
| 1555 | '') : Still unknown. Probably a generic BSD.
|
|---|
| 1556 | osname="$1"
|
|---|
| 1557 | osvers="$3"
|
|---|
| 1558 | ;;
|
|---|
| 1559 | esac
|
|---|
| 1560 | ;;
|
|---|
| 1561 | esac
|
|---|
| 1562 | else
|
|---|
| 1563 | if test -f /vmunix -a -f $src/hints/news_os.sh; then
|
|---|
| 1564 | (what /vmunix | .config/UU/tr '[A-Z]' '[a-z]') > .config/UU/kernel.what 2>&1
|
|---|
| 1565 | if $contains news-os .config/UU/kernel.what >/dev/null 2>&1; then
|
|---|
| 1566 | osname=news_os
|
|---|
| 1567 | fi
|
|---|
| 1568 | $rm -f .config/UU/kernel.what
|
|---|
| 1569 | elif test -d c:/.; then
|
|---|
| 1570 | set X $myuname
|
|---|
| 1571 | osname=os2
|
|---|
| 1572 | osvers="$5"
|
|---|
| 1573 | fi
|
|---|
| 1574 | fi
|
|---|
| 1575 | : Now look for a hint file osname_osvers, unless one has been
|
|---|
| 1576 | : specified already.
|
|---|
| 1577 | case "$hintfile" in
|
|---|
| 1578 | ''|' ')
|
|---|
| 1579 | file=`echo "${osname}_${osvers}" | $sed -e 's@\.@_@g' -e 's@_$@@'`
|
|---|
| 1580 | : Also try without trailing minor version numbers.
|
|---|
| 1581 | xfile=`echo $file | $sed -e 's@_[^_]*$@@'`
|
|---|
| 1582 | xxfile=`echo $xfile | $sed -e 's@_[^_]*$@@'`
|
|---|
| 1583 | xxxfile=`echo $xxfile | $sed -e 's@_[^_]*$@@'`
|
|---|
| 1584 | xxxxfile=`echo $xxxfile | $sed -e 's@_[^_]*$@@'`
|
|---|
| 1585 | case "$file" in
|
|---|
| 1586 | '') dflt=none ;;
|
|---|
| 1587 | *) case "$osvers" in
|
|---|
| 1588 | '') dflt=$file
|
|---|
| 1589 | ;;
|
|---|
| 1590 | *) if $test -f $src/hints/$file.sh ; then
|
|---|
| 1591 | dflt=$file
|
|---|
| 1592 | elif $test -f $src/hints/$xfile.sh ; then
|
|---|
| 1593 | dflt=$xfile
|
|---|
| 1594 | elif $test -f $src/hints/$xxfile.sh ; then
|
|---|
| 1595 | dflt=$xxfile
|
|---|
| 1596 | elif $test -f $src/hints/$xxxfile.sh ; then
|
|---|
| 1597 | dflt=$xxxfile
|
|---|
| 1598 | elif $test -f $src/hints/$xxxxfile.sh ; then
|
|---|
| 1599 | dflt=$xxxxfile
|
|---|
| 1600 | elif $test -f "$src/hints/${osname}.sh" ; then
|
|---|
| 1601 | dflt="${osname}"
|
|---|
| 1602 | else
|
|---|
| 1603 | dflt=none
|
|---|
| 1604 | fi
|
|---|
| 1605 | ;;
|
|---|
| 1606 | esac
|
|---|
| 1607 | ;;
|
|---|
| 1608 | esac
|
|---|
| 1609 | ;;
|
|---|
| 1610 | *)
|
|---|
| 1611 | dflt=`echo $hintfile | $sed 's/\.sh$//'`
|
|---|
| 1612 | ;;
|
|---|
| 1613 | esac
|
|---|
| 1614 |
|
|---|
| 1615 | if [ X$install = Xnever ] ; then
|
|---|
| 1616 | $cat <<EOM
|
|---|
| 1617 |
|
|---|
| 1618 | You may give one or more space-separated answers, or "none" if appropriate.
|
|---|
| 1619 | If your OS version has no hints, DO NOT give a wrong version -- say "none".
|
|---|
| 1620 |
|
|---|
| 1621 | EOM
|
|---|
| 1622 | rp="Which of these apply, if any?"
|
|---|
| 1623 | . .config/UU/myread
|
|---|
| 1624 | tans=$ans
|
|---|
| 1625 | for file in $tans; do
|
|---|
| 1626 | if $test -f $src/hints/$file.sh; then
|
|---|
| 1627 | . $src/hints/$file.sh
|
|---|
| 1628 | $cat $src/hints/$file.sh >> .config/UU/config.sh
|
|---|
| 1629 | elif $test X$tans = X -o X$tans = Xnone ; then
|
|---|
| 1630 | : nothing
|
|---|
| 1631 | else
|
|---|
| 1632 | : Give one chance to correct a possible typo.
|
|---|
| 1633 | echo "$file.sh does not exist"
|
|---|
| 1634 | dflt=$file
|
|---|
| 1635 | rp="hint to use instead?"
|
|---|
| 1636 | . .config/UU/myread
|
|---|
| 1637 | for file in $ans; do
|
|---|
| 1638 | if $test -f "$src/hints/$file.sh"; then
|
|---|
| 1639 | . $src/hints/$file.sh
|
|---|
| 1640 | $cat $src/hints/$file.sh >> .config/UU/config.sh
|
|---|
| 1641 | elif $test X$ans = X -o X$ans = Xnone ; then
|
|---|
| 1642 | : nothing
|
|---|
| 1643 | else
|
|---|
| 1644 | echo "$file.sh does not exist -- ignored."
|
|---|
| 1645 | fi
|
|---|
| 1646 | done
|
|---|
| 1647 | fi
|
|---|
| 1648 | done
|
|---|
| 1649 | fi
|
|---|
| 1650 |
|
|---|
| 1651 | hint=recommended
|
|---|
| 1652 | : Remember our hint file for later.
|
|---|
| 1653 | if $test -f "$src/hints/$file.sh" ; then
|
|---|
| 1654 | hintfile="$file"
|
|---|
| 1655 | else
|
|---|
| 1656 | hintfile=''
|
|---|
| 1657 | fi
|
|---|
| 1658 | : Sadilov: g4system.U - inserted here.
|
|---|
| 1659 | : 'current' directory is where 'Configure' is started
|
|---|
| 1660 | #echo " "
|
|---|
| 1661 | case "$g4osname" in
|
|---|
| 1662 |
|
|---|
| 1663 | '')
|
|---|
| 1664 | case "$osname" in
|
|---|
| 1665 | 'aix') g4osname=AIX
|
|---|
| 1666 | ;;
|
|---|
| 1667 | 'dec_osf') g4osname=DEC
|
|---|
| 1668 | ;;
|
|---|
| 1669 | 'hpux') g4osname=HP
|
|---|
| 1670 | ;;
|
|---|
| 1671 | 'linux') g4osname=Linux
|
|---|
| 1672 | ;;
|
|---|
| 1673 | 'irix') g4osname=SGI
|
|---|
| 1674 | ;;
|
|---|
| 1675 | 'sunos') g4osname=SUN
|
|---|
| 1676 | ;;
|
|---|
| 1677 | 'solaris') g4osname=SUN
|
|---|
| 1678 | ;;
|
|---|
| 1679 | 'win32') g4osname=WIN32
|
|---|
| 1680 | ;;
|
|---|
| 1681 | 'darwin') g4osname=Darwin
|
|---|
| 1682 | ;;
|
|---|
| 1683 | esac
|
|---|
| 1684 | esac
|
|---|
| 1685 |
|
|---|
| 1686 | #echo " "
|
|---|
| 1687 |
|
|---|
| 1688 | case "$g4compiler" in
|
|---|
| 1689 |
|
|---|
| 1690 | '')
|
|---|
| 1691 | case "$g4osname" in
|
|---|
| 1692 | 'AIX')
|
|---|
| 1693 | g4compiler=xlC
|
|---|
| 1694 | ;;
|
|---|
| 1695 | 'DEC')
|
|---|
| 1696 | g4compiler=cxx
|
|---|
| 1697 | ;;
|
|---|
| 1698 | 'HP')
|
|---|
| 1699 | g4compiler=aCC
|
|---|
| 1700 | ;;
|
|---|
| 1701 | 'Linux')
|
|---|
| 1702 | # g4compiler=g++
|
|---|
| 1703 | # Assume if "gcc" is in place then "g++" is here
|
|---|
| 1704 | gcccompiler=`( ($gcc -v) 1>/dev/null || echo "ERROR: There is no 'gcc' ('g++'?) compiler.") 2>&1`
|
|---|
| 1705 | case $gcccompiler in
|
|---|
| 1706 | *egcs*) g4compiler=egcs
|
|---|
| 1707 | ;;
|
|---|
| 1708 | *2.96*)
|
|---|
| 1709 | echo "WARNING: Found version of 'g++' (2.96.XXX) is known to be buggy!"
|
|---|
| 1710 | g4compiler="g++"
|
|---|
| 1711 | ;;
|
|---|
| 1712 | *) g4compiler="g++"
|
|---|
| 1713 | ;;
|
|---|
| 1714 | esac
|
|---|
| 1715 |
|
|---|
| 1716 | ;;
|
|---|
| 1717 | 'SGI')
|
|---|
| 1718 | g4compiler=CC
|
|---|
| 1719 | ;;
|
|---|
| 1720 | 'SUN')
|
|---|
| 1721 | g4compiler=CC
|
|---|
| 1722 | ;;
|
|---|
| 1723 | 'WIN32')
|
|---|
| 1724 | g4compiler=VC
|
|---|
| 1725 | clcompiler=`( cl 1>/dev/null || echo "ERROR: There is no 'cl' compiler.") 2>&1`
|
|---|
| 1726 | case $clcompiler in
|
|---|
| 1727 | *"Version 12"*) g4compiler=VC6
|
|---|
| 1728 | ;;
|
|---|
| 1729 | *"Version 13"*) g4compiler=VC
|
|---|
| 1730 | ;;
|
|---|
| 1731 | *) g4compiler=VC
|
|---|
| 1732 | ;;
|
|---|
| 1733 | esac
|
|---|
| 1734 | ;;
|
|---|
| 1735 | 'Darwin')
|
|---|
| 1736 | g4compiler=g++
|
|---|
| 1737 | ;;
|
|---|
| 1738 | esac
|
|---|
| 1739 | esac
|
|---|
| 1740 |
|
|---|
| 1741 | if [ X$g4system = X ] ; then
|
|---|
| 1742 |
|
|---|
| 1743 | if [ X$g4build = Xyes ] ; then
|
|---|
| 1744 | while test 1 = 1 ; do
|
|---|
| 1745 |
|
|---|
| 1746 | g4message=`cat << EOM
|
|---|
| 1747 |
|
|---|
| 1748 | Definition of G4SYSTEM variable is $g4osname-$g4compiler.
|
|---|
| 1749 | That stands for:
|
|---|
| 1750 |
|
|---|
| 1751 | 1) OS : $g4osname
|
|---|
| 1752 |
|
|---|
| 1753 | 2) Compiler : $g4compiler
|
|---|
| 1754 |
|
|---|
| 1755 | To modify default settings, select number above (e.g. 2)
|
|---|
| 1756 | EOM`
|
|---|
| 1757 |
|
|---|
| 1758 | dflt="Press [Enter] for default settings"
|
|---|
| 1759 | rp=$g4message
|
|---|
| 1760 | . .config/UU/myread
|
|---|
| 1761 | gans=$ans
|
|---|
| 1762 |
|
|---|
| 1763 | case $gans in
|
|---|
| 1764 |
|
|---|
| 1765 | 1)
|
|---|
| 1766 | case "$osname" in
|
|---|
| 1767 | 'aix')
|
|---|
| 1768 | g4osnamerec=AIX
|
|---|
| 1769 | ;;
|
|---|
| 1770 | 'dec_osf')
|
|---|
| 1771 | g4osnamerec=DEC
|
|---|
| 1772 | ;;
|
|---|
| 1773 | 'hpux')
|
|---|
| 1774 | g4osnamerec=HP
|
|---|
| 1775 | ;;
|
|---|
| 1776 | 'linux')
|
|---|
| 1777 | g4osnamerec=Linux
|
|---|
| 1778 | ;;
|
|---|
| 1779 | 'irix')
|
|---|
| 1780 | g4osnamerec=SGI
|
|---|
| 1781 | ;;
|
|---|
| 1782 | 'sunos')
|
|---|
| 1783 | g4osnamerec=SUN
|
|---|
| 1784 | ;;
|
|---|
| 1785 | 'win32')
|
|---|
| 1786 | g4osnamerec=WIN32
|
|---|
| 1787 | ;;
|
|---|
| 1788 | 'darwin')
|
|---|
| 1789 | g4osnamerec=Darwin
|
|---|
| 1790 | ;;
|
|---|
| 1791 | esac
|
|---|
| 1792 | dflt=$g4osname
|
|---|
| 1793 | rp="What is your OS'?"
|
|---|
| 1794 | . .config/UU/myread
|
|---|
| 1795 | tans=$ans
|
|---|
| 1796 |
|
|---|
| 1797 | if test X$tans != X$g4osnamerec ; then
|
|---|
| 1798 | echo ""
|
|---|
| 1799 |
|
|---|
| 1800 | cat << EOM
|
|---|
| 1801 |
|
|---|
| 1802 | You are running 'Configure' on NOT native platform!
|
|---|
| 1803 | You are on your own way !!!
|
|---|
| 1804 |
|
|---|
| 1805 | EOM
|
|---|
| 1806 |
|
|---|
| 1807 | dflt=$tans
|
|---|
| 1808 | rp="Confirm your selection or set native '$g4osnamerec'!"
|
|---|
| 1809 | . .config/UU/myread
|
|---|
| 1810 | tans=$ans
|
|---|
| 1811 | fi
|
|---|
| 1812 |
|
|---|
| 1813 | g4osname=$tans
|
|---|
| 1814 | ;;
|
|---|
| 1815 | 2)
|
|---|
| 1816 | case "$g4osname" in
|
|---|
| 1817 | 'AIX')
|
|---|
| 1818 | g4compilerrec=xlC
|
|---|
| 1819 | ;;
|
|---|
| 1820 | 'DEC')
|
|---|
| 1821 | g4compilerrec=cxx
|
|---|
| 1822 | ;;
|
|---|
| 1823 | 'HP')
|
|---|
| 1824 | g4compilerrec=aCC
|
|---|
| 1825 | ;;
|
|---|
| 1826 | 'Linux')
|
|---|
| 1827 | g4compilerrec=g++
|
|---|
| 1828 | ;;
|
|---|
| 1829 | 'SGI')
|
|---|
| 1830 | g4compilerrec=CC
|
|---|
| 1831 | ;;
|
|---|
| 1832 | 'SUN')
|
|---|
| 1833 | g4compilerrec=CC
|
|---|
| 1834 | ;;
|
|---|
| 1835 | 'WIN32')
|
|---|
| 1836 | g4compilerrec=VC
|
|---|
| 1837 | ;;
|
|---|
| 1838 | 'Darwin')
|
|---|
| 1839 | g4compilerrec=g++
|
|---|
| 1840 | ;;
|
|---|
| 1841 | esac
|
|---|
| 1842 | dflt=$g4compiler
|
|---|
| 1843 | rp="Which C++ compiler?"
|
|---|
| 1844 | . .config/UU/myread
|
|---|
| 1845 | tans=$ans
|
|---|
| 1846 |
|
|---|
| 1847 | if test X$tans != X$g4compilerrec ; then
|
|---|
| 1848 | echo ""
|
|---|
| 1849 |
|
|---|
| 1850 | cat << EOM
|
|---|
| 1851 |
|
|---|
| 1852 | The recommmended compiler for this platform ($g4osname) is $g4compilerrec.
|
|---|
| 1853 | You are on your own way !!!
|
|---|
| 1854 |
|
|---|
| 1855 | EOM
|
|---|
| 1856 |
|
|---|
| 1857 | dflt=$tans
|
|---|
| 1858 | rp="Confirm your selection or set recommended '$g4compilerrec'!"
|
|---|
| 1859 | . .config/UU/myread
|
|---|
| 1860 | tans=$ans
|
|---|
| 1861 | fi
|
|---|
| 1862 |
|
|---|
| 1863 | g4compiler=$tans
|
|---|
| 1864 | ;;
|
|---|
| 1865 | # [eE])
|
|---|
| 1866 | # break
|
|---|
| 1867 | # ;;
|
|---|
| 1868 | *)
|
|---|
| 1869 | # echo " "
|
|---|
| 1870 | break
|
|---|
| 1871 | ;;
|
|---|
| 1872 | esac
|
|---|
| 1873 | done
|
|---|
| 1874 |
|
|---|
| 1875 | fi
|
|---|
| 1876 |
|
|---|
| 1877 | #
|
|---|
| 1878 | # Ask about compiler used.
|
|---|
| 1879 | #
|
|---|
| 1880 | g4system=$g4osname-$g4compiler
|
|---|
| 1881 |
|
|---|
| 1882 | fi
|
|---|
| 1883 |
|
|---|
| 1884 | #cat << EOM
|
|---|
| 1885 | #
|
|---|
| 1886 | #G4SYSTEM is now set to $g4system.
|
|---|
| 1887 | #
|
|---|
| 1888 | #EOM
|
|---|
| 1889 |
|
|---|
| 1890 | cd .config/UU
|
|---|
| 1891 |
|
|---|
| 1892 | myuname=`( ($uname -a) 2>/dev/null || hostname) 2>&1`
|
|---|
| 1893 | myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \
|
|---|
| 1894 | ./tr '[A-Z]' '[a-z]' | tr '\012' ' '`
|
|---|
| 1895 | newmyuname="$myuname"
|
|---|
| 1896 | dflt=n
|
|---|
| 1897 |
|
|---|
| 1898 | cd ../..
|
|---|
| 1899 |
|
|---|
| 1900 |
|
|---|
| 1901 | if [ X$g4build = X ] ; then
|
|---|
| 1902 |
|
|---|
| 1903 | if test -f $src/.config/bin/$g4system/env.sh; then
|
|---|
| 1904 |
|
|---|
| 1905 | # create not_display flag
|
|---|
| 1906 |
|
|---|
| 1907 | if [ X$g4ldlibs != X -o X$g4ldflags != X -o X$g4cxxflags != X -o X$g4cppflags != X -o X$g4incflags != X ] ; then
|
|---|
| 1908 | g4non_display=yes
|
|---|
| 1909 | # echo g4non_display=$g4non_display
|
|---|
| 1910 | fi
|
|---|
| 1911 |
|
|---|
| 1912 | if [ X$install = Xyes ] ; then
|
|---|
| 1913 |
|
|---|
| 1914 | $rm -rf .config/UU
|
|---|
| 1915 |
|
|---|
| 1916 | . $src/.config/bin/$g4system/move.sh
|
|---|
| 1917 |
|
|---|
| 1918 | exit 1
|
|---|
| 1919 |
|
|---|
| 1920 | fi #end of cppflags
|
|---|
| 1921 |
|
|---|
| 1922 | if [ X$g4cppflags = Xyes ] ; then
|
|---|
| 1923 |
|
|---|
| 1924 | . $src/.config/bin/$g4system/env.sh
|
|---|
| 1925 |
|
|---|
| 1926 | CPPFLAGS=`grep 'CPPFLAGS_FINAL :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\):=//'`
|
|---|
| 1927 |
|
|---|
| 1928 | # echo CPPFLAGS=$CPPFLAGS
|
|---|
| 1929 | echo $CPPFLAGS
|
|---|
| 1930 |
|
|---|
| 1931 | $rm -rf .config/UU
|
|---|
| 1932 | exit 1
|
|---|
| 1933 |
|
|---|
| 1934 | fi #end of cppflags
|
|---|
| 1935 |
|
|---|
| 1936 | if [ X$g4cxxflags = Xyes ] ; then
|
|---|
| 1937 |
|
|---|
| 1938 | . $src/.config/bin/$g4system/env.sh
|
|---|
| 1939 |
|
|---|
| 1940 | CXXFLAGS=`grep 'CXXFLAGS_FINAL :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\):=//'`
|
|---|
| 1941 |
|
|---|
| 1942 | # echo CXXFLAGS=$CXXFLAGS
|
|---|
| 1943 | echo $CXXFLAGS
|
|---|
| 1944 |
|
|---|
| 1945 | $rm -rf .config/UU
|
|---|
| 1946 | exit 1
|
|---|
| 1947 |
|
|---|
| 1948 | fi #end of cxxflags
|
|---|
| 1949 |
|
|---|
| 1950 |
|
|---|
| 1951 |
|
|---|
| 1952 | g4install_lib_AAA=`echo $g4install/lib|sed -e "s/\//AAA/g"`
|
|---|
| 1953 | g4final_install_lib_AAA=`echo $g4final_install/lib/geant4|sed -e "s/\//AAA/g"`
|
|---|
| 1954 |
|
|---|
| 1955 |
|
|---|
| 1956 | #############################################################################
|
|---|
| 1957 | if [ X$g4incflags = Xyes ] ; then
|
|---|
| 1958 |
|
|---|
| 1959 | . $src/.config/bin/$g4system/env.sh
|
|---|
| 1960 |
|
|---|
| 1961 | ### Getting G4FIRST_INSTALL
|
|---|
| 1962 | G4FIRST_INSTALL_AAA=`grep 'G4INSTALL =' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\)= //'|$sed -e 's/\//AAA/g'`
|
|---|
| 1963 | G4INSTALL_AAA=`echo $G4INSTALL|sed -e "s/\//AAA/g"`
|
|---|
| 1964 | ###
|
|---|
| 1965 | INCFLAGS_AAA=`grep 'INCFLAGS_FINAL :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\):=//'|$sed -e 's/\//AAA/g'`
|
|---|
| 1966 |
|
|---|
| 1967 | # echo INCFLAGS_AAA=$INCFLAGS_AAA
|
|---|
| 1968 | # echo G4INSTALL_AAA=$G4INSTALL_AAA
|
|---|
| 1969 | # echo G4FIRST_INSTALL_AAA=$G4FIRST_INSTALL_AAA
|
|---|
| 1970 |
|
|---|
| 1971 | INCFLAGS_AAA_NEW=`echo $INCFLAGS_AAA| $sed -e "s/$G4FIRST_INSTALL_AAA/$G4INSTALL_AAA/g"`
|
|---|
| 1972 |
|
|---|
| 1973 | # echo INCFLAGS_AAA_NEW=$INCFLAGS_AAA_NEW
|
|---|
| 1974 |
|
|---|
| 1975 | INCFLAGS=`echo $INCFLAGS_AAA_NEW| $sed -e "s/AAA/\//g"`
|
|---|
| 1976 |
|
|---|
| 1977 | # echo INCFLAGS=$INCFLAGS
|
|---|
| 1978 |
|
|---|
| 1979 | if [ X$G4INCLUDE = X ] ; then
|
|---|
| 1980 | echo $INCFLAGS
|
|---|
| 1981 | else
|
|---|
| 1982 | echo -I$G4INCLUDE
|
|---|
| 1983 | fi
|
|---|
| 1984 |
|
|---|
| 1985 | $rm -rf .config/UU
|
|---|
| 1986 | exit 1
|
|---|
| 1987 |
|
|---|
| 1988 | fi #end of incflags
|
|---|
| 1989 | #############################################################################
|
|---|
| 1990 |
|
|---|
| 1991 |
|
|---|
| 1992 | #############################################################################
|
|---|
| 1993 | if [ X$g4ldflags = Xyes ] ; then
|
|---|
| 1994 |
|
|---|
| 1995 | . $src/.config/bin/$g4system/env.sh
|
|---|
| 1996 |
|
|---|
| 1997 | ### Getting G4FIRST_INSTALL
|
|---|
| 1998 | G4FIRST_LIB_AAA=`grep 'G4LIB =' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\)= //'|$sed -e 's/\//AAA/g'`
|
|---|
| 1999 | G4LIB_AAA=`echo $G4LIB|sed -e "s/\//AAA/g"`
|
|---|
| 2000 | ###
|
|---|
| 2001 | # G4FIRST_INSTALL_LIB_AAA=${G4FIRST_INSTALL_AAA}AAAlib
|
|---|
| 2002 | # G4INSTALL_LIB_AAA=${G4INSTALL_AAA}AAAlibAAAgeant4
|
|---|
| 2003 |
|
|---|
| 2004 | # echo G4FIRST_INSTALL_LIB_AAA=$G4FIRST_INSTALL_LIB_AAA
|
|---|
| 2005 | # echo G4INSTALL_LIB_AAA=$G4INSTALL_LIB_AAA
|
|---|
| 2006 |
|
|---|
| 2007 | LDFLAGS_AAA=`grep 'LDFLAGS_FINAL :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\):=//'|$sed -e 's/\//AAA/g'`
|
|---|
| 2008 | LDFLAGS_AAA_NEW=`echo $LDFLAGS_AAA| $sed -e "s/$G4FIRST_LIB_AAA/$G4LIB_AAA/g"`
|
|---|
| 2009 | LDFLAGS=`echo $LDFLAGS_AAA_NEW| $sed -e "s/AAA/\//g"`
|
|---|
| 2010 |
|
|---|
| 2011 | # echo LDFLAGS=$LDFLAGS
|
|---|
| 2012 | echo $LDFLAGS
|
|---|
| 2013 |
|
|---|
| 2014 | $rm -rf .config/UU
|
|---|
| 2015 | exit 1
|
|---|
| 2016 |
|
|---|
| 2017 | fi #end of ldflags
|
|---|
| 2018 | #############################################################################
|
|---|
| 2019 |
|
|---|
| 2020 | if [ X$g4ldlibs = Xyes ] ; then
|
|---|
| 2021 |
|
|---|
| 2022 | # cat >&2 <<EOM
|
|---|
| 2023 | #---------------------------------------------------
|
|---|
| 2024 | #LibList mode :)
|
|---|
| 2025 | #---------------------------------------------------
|
|---|
| 2026 | #EOM
|
|---|
| 2027 |
|
|---|
| 2028 | . $src/.config/bin/$g4system/env.sh
|
|---|
| 2029 |
|
|---|
| 2030 | # echo TEST
|
|---|
| 2031 |
|
|---|
| 2032 | # ls -l $G4INSTALL/config/scripts/GNUmakefile
|
|---|
| 2033 | # ls -l $G4LIB/$G4SYSTEM/GNUmakefile.db
|
|---|
| 2034 |
|
|---|
| 2035 | # LDLIBS_1=`grep 'LDLIBS_FINAL :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | awk -F := '{print $2}'`
|
|---|
| 2036 | # LDLIBS_2=`echo $LDLIBS_1 | awk -F -lMarker '{print $2}'`
|
|---|
| 2037 |
|
|---|
| 2038 | # echo LDLIBS_2=$LDLIBS_2
|
|---|
| 2039 | # echo $LDLIBS_2
|
|---|
| 2040 |
|
|---|
| 2041 | if [ X$G4LIB_USE_GRANULAR = X ] ; then
|
|---|
| 2042 |
|
|---|
| 2043 | # Global libs
|
|---|
| 2044 |
|
|---|
| 2045 | ### LDLIBS_1=`grep 'LDLIBS_FINAL :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\):=//'`
|
|---|
| 2046 | ### LDLIBS_2=`echo $LDLIBS_1 | $sed -e 's/^\(.*\)-lMarker//'`
|
|---|
| 2047 | ### echo "$LDLIBS_2 $c"
|
|---|
| 2048 |
|
|---|
| 2049 | LIBLIST_LIST=`$G4LIB/$G4SYSTEM/liblist -m $G4LIB/$G4SYSTEM < $G4LIB/$G4SYSTEM/libname.map`
|
|---|
| 2050 |
|
|---|
| 2051 | LDLIBS3=`grep 'LDLIBS3 :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\):=//'`
|
|---|
| 2052 | LDLIBS4=`grep 'LDLIBS4 :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\):=//'`
|
|---|
| 2053 |
|
|---|
| 2054 | LDLIBS=$LIBLIST_LIST $LDLIBS3 $LDLIBS4
|
|---|
| 2055 |
|
|---|
| 2056 | echo $LDLIBS
|
|---|
| 2057 |
|
|---|
| 2058 | # echo "-L$G4WORKDIR/lib/$G4SYSTEM -lG4persistency -lG4readout -lG4run -lG4event -lG4tracking -lG4parmodels -lG4processes -lG4digits+hits -lG4track -lG4particles -lG4geometry -lG4materials -lG4graphics_reps -lG4intercoms -lG4global $c"
|
|---|
| 2059 |
|
|---|
| 2060 | $rm -rf .config/UU
|
|---|
| 2061 | exit 1
|
|---|
| 2062 |
|
|---|
| 2063 | else
|
|---|
| 2064 |
|
|---|
| 2065 | # Granular libs
|
|---|
| 2066 |
|
|---|
| 2067 | # echo $n "-L$G4WORKDIR/lib/$G4SYSTEM $c" ; $G4WORKDIR/lib/$G4SYSTEM/liblist -m $G4WORKDIR/lib/$G4SYSTEM < $G4WORKDIR/lib/$G4SYSTEM/libname.map
|
|---|
| 2068 |
|
|---|
| 2069 | # echo G4LIB=$G4LIB/$G4SYSTEM
|
|---|
| 2070 |
|
|---|
| 2071 | LIBLIST_LIST=`$G4LIB/$G4SYSTEM/liblist -m $G4LIB/$G4SYSTEM < $G4LIB/$G4SYSTEM/libname.map`
|
|---|
| 2072 |
|
|---|
| 2073 | LDLIBS3=`grep 'LDLIBS3 :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\):=//'`
|
|---|
| 2074 | LDLIBS4=`grep 'LDLIBS4 :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\):=//'`
|
|---|
| 2075 |
|
|---|
| 2076 | LDLIBS=$LIBLIST_LIST $LDLIBS3 $LDLIBS4
|
|---|
| 2077 |
|
|---|
| 2078 | echo $LDLIBS
|
|---|
| 2079 |
|
|---|
| 2080 | $rm -rf .config/UU
|
|---|
| 2081 |
|
|---|
| 2082 | exit 1
|
|---|
| 2083 | fi #end of check for global/granular
|
|---|
| 2084 |
|
|---|
| 2085 | else #if not -lib but user mode
|
|---|
| 2086 |
|
|---|
| 2087 | # header for User
|
|---|
| 2088 | echo " "
|
|---|
| 2089 | echo " "
|
|---|
| 2090 | echo " "
|
|---|
| 2091 | echo " --- Geant4 Toolkit Installation ---"
|
|---|
| 2092 | echo " (setting environments for USER )"
|
|---|
| 2093 | echo " "
|
|---|
| 2094 | echo " "
|
|---|
| 2095 | echo " "
|
|---|
| 2096 |
|
|---|
| 2097 | #cat << EOM
|
|---|
| 2098 | #
|
|---|
| 2099 | #G4SYSTEM is now set to $g4system.
|
|---|
| 2100 | #
|
|---|
| 2101 | #EOM
|
|---|
| 2102 |
|
|---|
| 2103 | cat >&2 <<EOM
|
|---|
| 2104 | ---------------------------------------------------
|
|---|
| 2105 | The Geant4 toolkit installation was found.
|
|---|
| 2106 | The files env.[c]sh will be copied to your current directory.
|
|---|
| 2107 | For setting Geant4 environments you should make:
|
|---|
| 2108 |
|
|---|
| 2109 | source env.csh
|
|---|
| 2110 |
|
|---|
| 2111 | or
|
|---|
| 2112 |
|
|---|
| 2113 | . env.sh
|
|---|
| 2114 |
|
|---|
| 2115 | It will also check G4WORKDIR setting and set it to
|
|---|
| 2116 | your HOME if needed.
|
|---|
| 2117 | You can use these files also for further modifications
|
|---|
| 2118 | (adding your own environments).
|
|---|
| 2119 | ---------------------------------------------------
|
|---|
| 2120 | EOM
|
|---|
| 2121 | $rm -rf .config/UU
|
|---|
| 2122 |
|
|---|
| 2123 | cp -i $src/.config/bin/$g4system/env.csh .
|
|---|
| 2124 | cp -i $src/.config/bin/$g4system/env.sh .
|
|---|
| 2125 |
|
|---|
| 2126 | exit 1
|
|---|
| 2127 | fi #end of -lib or user
|
|---|
| 2128 | else #there is no env.sh
|
|---|
| 2129 |
|
|---|
| 2130 | # header for Installer
|
|---|
| 2131 | echo " "
|
|---|
| 2132 | echo " "
|
|---|
| 2133 | echo " "
|
|---|
| 2134 | echo " --- Geant4 Toolkit Installation ---"
|
|---|
| 2135 | echo " "
|
|---|
| 2136 | echo " "
|
|---|
| 2137 | echo " "
|
|---|
| 2138 | echo " "
|
|---|
| 2139 |
|
|---|
| 2140 | echo " "
|
|---|
| 2141 | echo "WARNING: Geant4 is NOT built yet!"
|
|---|
| 2142 | echo "You (or the administrator if you have not enough privileges)"
|
|---|
| 2143 | echo "should start with \$G4INSTALL/Configure -build."
|
|---|
| 2144 | echo "(where \$G4INSTALL is Geant4 install directory)."
|
|---|
| 2145 | echo " "
|
|---|
| 2146 | $rm -rf .config/UU
|
|---|
| 2147 | exit 1
|
|---|
| 2148 | fi #end of check for existence of env.sh
|
|---|
| 2149 | fi #end of check for "not -install"
|
|---|
| 2150 |
|
|---|
| 2151 | cd .config/UU
|
|---|
| 2152 |
|
|---|
| 2153 | case "$knowitall" in
|
|---|
| 2154 | '')
|
|---|
| 2155 | cd ../..
|
|---|
| 2156 | if test -f $src/.config/bin/$g4system/config.sh; then
|
|---|
| 2157 | if $contains myuname= $src/.config/bin/$g4system/config.sh >/dev/null 2>&1; then
|
|---|
| 2158 | eval "`grep myuname= $src/.config/bin/$g4system/config.sh`"
|
|---|
| 2159 | fi
|
|---|
| 2160 | if test "X$myuname" = "X$newmyuname"; then
|
|---|
| 2161 | dflt=y
|
|---|
| 2162 | fi
|
|---|
| 2163 | fi
|
|---|
| 2164 | cd .config/UU
|
|---|
| 2165 | ;;
|
|---|
| 2166 | *) dflt=y;;
|
|---|
| 2167 | esac
|
|---|
| 2168 |
|
|---|
| 2169 | cd ../..
|
|---|
| 2170 |
|
|---|
| 2171 | if test -f $src/.config/bin/$g4system/config.sh; then
|
|---|
| 2172 | echo " "
|
|---|
| 2173 | rp="There exists a config.sh file. Shall I use it to set the defaults?"
|
|---|
| 2174 | . .config/UU/myread
|
|---|
| 2175 | case "$ans" in
|
|---|
| 2176 | n*|N*) echo "OK, I'll ignore it."; mv $src/.config/bin/$g4system/config.sh $src/.config/bin/$g4system/config.sh.old;;
|
|---|
| 2177 | *) echo "Fetching default answers from your old config.sh file..." >&4
|
|---|
| 2178 | tmp_n="$n"
|
|---|
| 2179 | tmp_c="$c"
|
|---|
| 2180 | tmp_sh="$sh"
|
|---|
| 2181 | . $src/.config/bin/$g4system/config.sh
|
|---|
| 2182 | cp $src/.config/bin/$g4system/config.sh .config/UU
|
|---|
| 2183 | n="$tmp_n"
|
|---|
| 2184 | c="$tmp_c"
|
|---|
| 2185 | : Older versions did not always set $sh. Catch re-use of such
|
|---|
| 2186 | : an old config.sh.
|
|---|
| 2187 | case "$sh" in
|
|---|
| 2188 | '') sh="$tmp_sh" ;;
|
|---|
| 2189 | esac
|
|---|
| 2190 | hint=previous
|
|---|
| 2191 | ;;
|
|---|
| 2192 | esac
|
|---|
| 2193 | fi
|
|---|
| 2194 |
|
|---|
| 2195 | cd .config/UU
|
|---|
| 2196 | ;;
|
|---|
| 2197 | *)
|
|---|
| 2198 | echo " "
|
|---|
| 2199 | echo "Fetching default answers from $config_sh..." >&4
|
|---|
| 2200 | tmp_n="$n"
|
|---|
| 2201 | tmp_c="$c"
|
|---|
| 2202 | cd ../..
|
|---|
| 2203 | cp $config_sh config.sh 2>/dev/null
|
|---|
| 2204 | chmod +w config.sh
|
|---|
| 2205 | . ./config.sh
|
|---|
| 2206 | cd .config/UU
|
|---|
| 2207 | cp ../config.sh .
|
|---|
| 2208 | n="$tmp_n"
|
|---|
| 2209 | c="$tmp_c"
|
|---|
| 2210 | hint=previous
|
|---|
| 2211 | ;;
|
|---|
| 2212 | esac
|
|---|
| 2213 | test "$override" && . ./optdef.sh
|
|---|
| 2214 | myuname="$newmyuname"
|
|---|
| 2215 |
|
|---|
| 2216 | : Restore computed paths
|
|---|
| 2217 | for file in $loclist $trylist; do
|
|---|
| 2218 | eval $file="\$_$file"
|
|---|
| 2219 | done
|
|---|
| 2220 |
|
|---|
| 2221 |
|
|---|
| 2222 | : who configured the system
|
|---|
| 2223 | cf_time=`$date 2>&1`
|
|---|
| 2224 | cf_by=`(logname) 2>/dev/null`
|
|---|
| 2225 | case "$cf_by" in
|
|---|
| 2226 | "")
|
|---|
| 2227 | cf_by=`(whoami) 2>/dev/null`
|
|---|
| 2228 | case "$cf_by" in
|
|---|
| 2229 | "") cf_by=unknown ;;
|
|---|
| 2230 | esac ;;
|
|---|
| 2231 | esac
|
|---|
| 2232 |
|
|---|
| 2233 | cat <<EOSC >qt
|
|---|
| 2234 | $startsh
|
|---|
| 2235 | #
|
|---|
| 2236 | # Autoconf(ish) style check for Qt headers, libraries and moc application
|
|---|
| 2237 | #
|
|---|
| 2238 |
|
|---|
| 2239 | #
|
|---|
| 2240 | # These are variables that the final unit generated script may use
|
|---|
| 2241 | #
|
|---|
| 2242 | with_qt_dir="\$qt_search_dir"
|
|---|
| 2243 |
|
|---|
| 2244 | #
|
|---|
| 2245 | # Only run if we haven't succesfully found Qt already
|
|---|
| 2246 | #
|
|---|
| 2247 | if test "x\$g4_qt_is_configured" = "x" ; then
|
|---|
| 2248 | #
|
|---|
| 2249 | # Flag specifying if we've configured Qt o.k.
|
|---|
| 2250 | #
|
|---|
| 2251 | g4_qt_is_configured="yes" # Optimism
|
|---|
| 2252 |
|
|---|
| 2253 | # Flag to be set if any part of configuration fails
|
|---|
| 2254 | g4_havegoodqt="yes" # Optimism
|
|---|
| 2255 |
|
|---|
| 2256 | # Qt4 flag
|
|---|
| 2257 | g4_is_qt4="no"
|
|---|
| 2258 |
|
|---|
| 2259 | # Variables to be set
|
|---|
| 2260 | g4_qt_include_dir=''
|
|---|
| 2261 | g4_qt_lib_dir=''
|
|---|
| 2262 | g4_qt_moc=''
|
|---|
| 2263 |
|
|---|
| 2264 | g4_qt_version=''
|
|---|
| 2265 | g4_qt_cxxflags=''
|
|---|
| 2266 | g4_qt_gl_cxxflags=''
|
|---|
| 2267 | g4_qt_libs=''
|
|---|
| 2268 | g4_qt_gl_libs=''
|
|---|
| 2269 |
|
|---|
| 2270 | #
|
|---|
| 2271 | # User may supply a value for 'QTDIR' and in that case we ASSUME a
|
|---|
| 2272 | # Trolltech style installation or a Mac Framework
|
|---|
| 2273 | #
|
|---|
| 2274 | if test "x\$with_qt_dir" != "x" ; then
|
|---|
| 2275 | g4_qt_dir="\$with_qt_dir"
|
|---|
| 2276 | g4_qt_possible_qt_include_dirs="\$with_qt_dir/include/QtCore
|
|---|
| 2277 | \$with_qt_dir/include/Qt
|
|---|
| 2278 | \`ls -dr \$with_qt_dir/include/qt*/QtCore 2>/dev/null\`
|
|---|
| 2279 | \`ls -dr \$with_qt_dir/include/qt*/Qt 2>/dev/null\`
|
|---|
| 2280 | \`ls -dr \$with_qt_dir/include/qt* 2>/dev/null\`
|
|---|
| 2281 | \$with_qt_dir/include
|
|---|
| 2282 | \$with_qt_dir/QtCore.framework/Headers"
|
|---|
| 2283 |
|
|---|
| 2284 | # Check for qglobal.h
|
|---|
| 2285 | g4_qglobal_loc=\`./loc qglobal.h no \$g4_qt_possible_qt_include_dirs\`
|
|---|
| 2286 |
|
|---|
| 2287 | if test "x\$g4_qglobal_loc" = "xno" ; then
|
|---|
| 2288 | g4_havegoodqt=no
|
|---|
| 2289 | g4_qt_include_dir=no
|
|---|
| 2290 | fi
|
|---|
| 2291 | echo "checking for qglobal.h... \$g4_qglobal_loc"
|
|---|
| 2292 |
|
|---|
| 2293 | if test "x\$g4_qglobal_loc" != "xno" ; then
|
|---|
| 2294 | g4_qt_include_dir="\`dirname \$g4_qglobal_loc\`"
|
|---|
| 2295 | fi
|
|---|
| 2296 |
|
|---|
| 2297 | else
|
|---|
| 2298 | # We use standard search paths...
|
|---|
| 2299 | qt_direct_test_header="qglobal.h"
|
|---|
| 2300 |
|
|---|
| 2301 | g4_qt_include_path_list="
|
|---|
| 2302 | \`ls -dr /Library/Frameworks/QtCore.framework/Headers 2>/dev/null\`
|
|---|
| 2303 | \`ls -dr /System/Library/Frameworks/QtCore.framework/Headers 2>/dev/null\`
|
|---|
| 2304 | /usr/include/QtCore
|
|---|
| 2305 | \`ls -dr /usr/include/qt*/QtCore 2>/dev/null\`
|
|---|
| 2306 | \`ls -dr /opt/qt*/include/QtCore 2>/dev/null\`
|
|---|
| 2307 | \`ls -dr /usr/qt*/include/QtCore 2>/dev/null\`
|
|---|
| 2308 | \`ls -dr /usr/qt/*/include/QtCore 2>/dev/null\`
|
|---|
| 2309 | \`ls -dr /usr/include/qt/*/QtCore 2>/dev/null\`
|
|---|
| 2310 | \`ls -dr /sw/include/QtCore 2>/dev/null\`
|
|---|
| 2311 | \`ls -dr /sw/qt*/include/QtCore 2>/dev/null\`
|
|---|
| 2312 | \`ls -dr /sw/qt/*/include/QtCore 2>/dev/null\`
|
|---|
| 2313 | /usr/include
|
|---|
| 2314 | \`ls -dr /usr/include/qt* 2>/dev/null\`
|
|---|
| 2315 | \`ls -dr /opt/qt*/include 2>/dev/null\`
|
|---|
| 2316 | \`ls -dr /usr/qt*/include 2>/dev/null\`
|
|---|
| 2317 | \`ls -dr /usr/qt/*/include 2>/dev/null\`
|
|---|
| 2318 | \`ls -dr /usr/include/qt/* 2>/dev/null\`
|
|---|
| 2319 | \`ls -dr /sw/include 2>/dev/null\`
|
|---|
| 2320 | \`ls -dr /sw/qt*/include 2>/dev/null\`
|
|---|
| 2321 | \`ls -dr /sw/qt/*/include 2>/dev/null\`
|
|---|
| 2322 | /usr/include/Qt
|
|---|
| 2323 | \`ls -dr /usr/include/qt*/Qt 2>/dev/null\`
|
|---|
| 2324 | \`ls -dr /opt/qt*/include/Qt 2>/dev/null\`
|
|---|
| 2325 | \`ls -dr /usr/qt*/include/Qt 2>/dev/null\`
|
|---|
| 2326 | \`ls -dr /usr/qt/*/include/Qt 2>/dev/null\`
|
|---|
| 2327 | \`ls -dr /usr/include/qt/*/Qt 2>/dev/null\`
|
|---|
| 2328 | \`ls -dr /sw/include/Qt 2>/dev/null\`
|
|---|
| 2329 | \`ls -dr /sw/qt*/include/Qt 2>/dev/null\`
|
|---|
| 2330 | \`ls -dr /sw/qt/*/include/Qt 2>/dev/null\`
|
|---|
| 2331 | "
|
|---|
| 2332 |
|
|---|
| 2333 | # Find ALL installed versions of qglobal.h
|
|---|
| 2334 | for g4_qt_dir in \$g4_qt_include_path_list ; do
|
|---|
| 2335 | if test -r "\$g4_qt_dir/\$qt_direct_test_header" ; then
|
|---|
| 2336 | g4_qt_found_dirs="\$g4_qt_found_dirs \$g4_qt_dir"
|
|---|
| 2337 | fi
|
|---|
| 2338 | done
|
|---|
| 2339 |
|
|---|
| 2340 | # Which one relates to the newest Qt?
|
|---|
| 2341 | g4_qt_prev_ver=0
|
|---|
| 2342 | for g4_qt_dir in \$g4_qt_found_dirs ; do
|
|---|
| 2343 | g4_qt_this_ver=\`grep -w '#define QT_VERSION' \$g4_qt_dir/\$qt_direct_test_header | sed s/'#define QT_VERSION'//\`
|
|---|
| 2344 |
|
|---|
| 2345 | if expr \$g4_qt_this_ver '>' \$g4_qt_prev_ver > /dev/null ; then
|
|---|
| 2346 | g4_qt_include_dir=\$g4_qt_dir
|
|---|
| 2347 | g4_qt_prev_ver=\$g4_qt_this_ver
|
|---|
| 2348 | fi
|
|---|
| 2349 | done
|
|---|
| 2350 |
|
|---|
| 2351 | if test "x\$g4_qt_include_dir" = "x" ; then
|
|---|
| 2352 | g4_qt_include_dir=no
|
|---|
| 2353 | g4_havegoodqt=no
|
|---|
| 2354 | fi
|
|---|
| 2355 |
|
|---|
| 2356 | echo "checking for qglobal.h... \$g4_qt_include_dir/qglobal.h"
|
|---|
| 2357 | fi # END TEST with_qt_dir is set
|
|---|
| 2358 |
|
|---|
| 2359 | #
|
|---|
| 2360 | # Result of above tests should have given us g4_qt_include_dir
|
|---|
| 2361 | # We can now use this to check other things, taking care to deal with the
|
|---|
| 2362 | # correct paths...
|
|---|
| 2363 | #
|
|---|
| 2364 |
|
|---|
| 2365 | # Immediate and obvious Darwin check...
|
|---|
| 2366 | if test "x\`basename \$g4_qt_include_dir\`" = "xHeaders" ; then
|
|---|
| 2367 | #check for moc
|
|---|
| 2368 | if test -x "/usr/bin/moc" ; then
|
|---|
| 2369 | g4_qt_moc="/usr/bin/moc"
|
|---|
| 2370 | echo "checking for moc... \$g4_qt_moc"
|
|---|
| 2371 |
|
|---|
| 2372 | g4_qt_dir=\`dirname \$g4_qt_include_dir\`
|
|---|
| 2373 | g4_qt_dir=\`dirname \$g4_qt_dir\`
|
|---|
| 2374 |
|
|---|
| 2375 | g4_qt_version="4"
|
|---|
| 2376 | g4_qt_cxxflags="-I\$g4_qt_dir/QtCore.framework/Headers -I\$g4_qt_dir/QtGui.framework/Headers"
|
|---|
| 2377 | g4_qt_gl_cxxflags="-I\$g4_qt_dir/QtOpenGl.framework/Headers"
|
|---|
| 2378 | g4_qt_libs="-F\$g4_qt_dir -framework QtCore -framework QtGui"
|
|---|
| 2379 | g4_qt_gl_libs="-framework QtOpenGL"
|
|---|
| 2380 | else
|
|---|
| 2381 | echo "checking for moc... no"
|
|---|
| 2382 | g4_havegoodqt=no
|
|---|
| 2383 | fi
|
|---|
| 2384 | else
|
|---|
| 2385 | # Probably have Unix-style installation, in which case estimated
|
|---|
| 2386 | # 'QTDIR' equivalent is $with_qt_dir if supplied, or directory
|
|---|
| 2387 | # one level below the 'include' directory in \$g4_qt_include_dir
|
|---|
| 2388 | if test "x\$with_qt_dir" = "x" ; then
|
|---|
| 2389 | # We need to strip g4_qt_include_dir, if it was found
|
|---|
| 2390 | g4_qt_dir=\$g4_qt_include_dir
|
|---|
| 2391 |
|
|---|
| 2392 | # Only do this IF there's an 'include' in the path name!
|
|---|
| 2393 | if test "x\`echo \$g4_qt_dir | grep include\`" != "x" ; then
|
|---|
| 2394 | while test "x\`basename \$g4_qt_dir\`" != "xinclude" ;
|
|---|
| 2395 | do
|
|---|
| 2396 | g4_qt_dir=\`dirname \$g4_qt_dir\`
|
|---|
| 2397 | done
|
|---|
| 2398 | fi
|
|---|
| 2399 |
|
|---|
| 2400 | #Now should be one level above equivalent QTDIR
|
|---|
| 2401 | g4_qt_dir=\`dirname \$g4_qt_dir\`
|
|---|
| 2402 | fi
|
|---|
| 2403 |
|
|---|
| 2404 | # At this point, we need get Qt version of detected qglobal.h because
|
|---|
| 2405 | # Qt3/4 libraries MAY be installed alongside each other...
|
|---|
| 2406 | qt_direct_test_header=qglobal.h
|
|---|
| 2407 | g4_qt_major_ver=\`grep QT_VERSION_STR \$g4_qt_include_dir/\$qt_direct_test_header 2>/dev/null | sed 's/.* \"\([0-9]\)\..*\"/\1/'\`
|
|---|
| 2408 |
|
|---|
| 2409 | #
|
|---|
| 2410 | # We might have an odd install where our found qglobal.h #includes
|
|---|
| 2411 | # the real qglobal...
|
|---|
| 2412 | #
|
|---|
| 2413 | if test "x\$g4_qt_major_ver" = "x" ; then
|
|---|
| 2414 | # check for a #include of qglobal...
|
|---|
| 2415 | possible_actual_qglobal=\`grep '#include.*qglobal' \$g4_qt_include_dir/\$qt_direct_test_header 2>/dev/null\`
|
|---|
| 2416 |
|
|---|
| 2417 | if test "x\$possible_actual_qglobal" != "x" ; then
|
|---|
| 2418 | #We did get something, and it's likely the include
|
|---|
| 2419 | #will give us a relative path (but an ASSUMPTION at present)
|
|---|
| 2420 | relative_path_to_qglobal=\`grep '#include.*qglobal' \$g4_qt_include_dir/\$qt_direct_test_header 2>/dev/null | sed 's/.*\"\(.*\)\"/\1/'\`
|
|---|
| 2421 |
|
|---|
| 2422 | if test -r \$g4_qt_include_dir/\$relative_path_to_qglobal ; then
|
|---|
| 2423 | g4_qt_major_ver=\`grep QT_VERSION_STR \$g4_qt_include_dir/\$relative_path_to_qglobal 2>/dev/null | sed 's/.* \"\([0-9]\)\..*\"/\1/'\`
|
|---|
| 2424 | else
|
|---|
| 2425 | g4_qt_major_ver=no
|
|---|
| 2426 | g4_havegoodqt=no
|
|---|
| 2427 | fi
|
|---|
| 2428 | else
|
|---|
| 2429 | g4_qt_major_ver=no
|
|---|
| 2430 | g4_havegoodqt=no
|
|---|
| 2431 | fi
|
|---|
| 2432 | fi #END TEST odd qglobal includes qglobal behaviour
|
|---|
| 2433 |
|
|---|
| 2434 | if test "x\$g4_qt_major_ver" = "x4" ; then
|
|---|
| 2435 | g4_is_qt4=yes
|
|---|
| 2436 | else
|
|---|
| 2437 | g4_is_qt4=no
|
|---|
| 2438 | fi
|
|---|
| 2439 | echo "checking Qt major version... \$g4_qt_major_ver"
|
|---|
| 2440 |
|
|---|
| 2441 | #
|
|---|
| 2442 | # We also need to check for Qt4 installations with QtCore type
|
|---|
| 2443 | # directory structures. That being the case, make sure we have
|
|---|
| 2444 | # the extra headers..
|
|---|
| 2445 | #
|
|---|
| 2446 | if test "x\`basename \$g4_qt_include_dir\`" = "xQtCore" ; then
|
|---|
| 2447 | g4_qt_extra_headers=""
|
|---|
| 2448 | g4_qt_gl_headers=""
|
|---|
| 2449 | g4_qt_extra_packages="QtGui"
|
|---|
| 2450 | g4_qt_gl_packages="QtOpenGL"
|
|---|
| 2451 |
|
|---|
| 2452 | for i in \$g4_qt_extra_packages ; do
|
|---|
| 2453 | if test -d "\`dirname \$g4_qt_include_dir\`/\$i" ; then
|
|---|
| 2454 | echo "checking for \$i headers... yes"
|
|---|
| 2455 | g4_qt_extra_headers="\$g4_qt_extra_headers \`dirname \$g4_qt_include_dir\`/\$i"
|
|---|
| 2456 | else
|
|---|
| 2457 | echo "checking for \$i headers... no"
|
|---|
| 2458 | g4_havegoodqt=no
|
|---|
| 2459 | fi
|
|---|
| 2460 | done
|
|---|
| 2461 |
|
|---|
| 2462 | for i in \$g4_qt_gl_packages ; do
|
|---|
| 2463 | if test -d "\`dirname \$g4_qt_include_dir\`/\$i" ; then
|
|---|
| 2464 | echo "checking for \$i headers... yes"
|
|---|
| 2465 | g4_qt_gl_headers="\$g4_qt_gl_headers \`dirname \$g4_qt_include_dir\`/\$i"
|
|---|
| 2466 | else
|
|---|
| 2467 | echo "checking for \$i headers... no"
|
|---|
| 2468 | g4_havegoodqt=no
|
|---|
| 2469 | fi
|
|---|
| 2470 | done
|
|---|
| 2471 |
|
|---|
| 2472 | fi #END TEST QtCore style install
|
|---|
| 2473 |
|
|---|
| 2474 |
|
|---|
| 2475 | #
|
|---|
| 2476 | # Now check for appropriate library...
|
|---|
| 2477 | #
|
|---|
| 2478 | if test -d "\$g4_qt_dir/lib64" ; then
|
|---|
| 2479 | g4_qt_lib_dir=\$g4_qt_dir/lib64
|
|---|
| 2480 | else
|
|---|
| 2481 | g4_qt_lib_dir=\$g4_qt_dir/lib
|
|---|
| 2482 | fi
|
|---|
| 2483 |
|
|---|
| 2484 | if test "x\$g4_is_qt4" = "xyes" ; then
|
|---|
| 2485 | g4_qt_lib="\`ls \$g4_qt_lib_dir/libQtCore* 2> /dev/null | sed -n 1p |
|
|---|
| 2486 | sed s@\$g4_qt_lib_dir/lib@@ | sed s@[.].*@@\`"
|
|---|
| 2487 |
|
|---|
| 2488 | if test "x\$g4_qt_lib" = "x" ; then
|
|---|
| 2489 | # We might be on Windows...
|
|---|
| 2490 | g4_qt_lib="\`ls \$g4_qt_lib_dir/QtCore4.lib 2> /dev/null | sed -n 1p | sed s@\$g4_qt_lib_dir/@@\`"
|
|---|
| 2491 | fi
|
|---|
| 2492 |
|
|---|
| 2493 | if test "x\$g4_qt_lib" != "x" ; then
|
|---|
| 2494 | echo "checking for QtCore library... \$g4_qt_lib"
|
|---|
| 2495 | else
|
|---|
| 2496 | echo "checking for QtCore library... no"
|
|---|
| 2497 | g4_havegoodqt=no
|
|---|
| 2498 | fi
|
|---|
| 2499 | else
|
|---|
| 2500 | 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@[.].*@@\`"
|
|---|
| 2501 |
|
|---|
| 2502 | if test "x\$g4_qt_lib" != "x" ; then
|
|---|
| 2503 | echo "checking for qt-mt or qt library... \$g4_qt_lib"
|
|---|
| 2504 |
|
|---|
| 2505 | # On Darwin we also need libqui for Qt3
|
|---|
| 2506 | if test "x\$osname" = "xdarwin" ; then
|
|---|
| 2507 | g4_qt_lib_qui="\`ls \$g4_qt_lib_dir/libqui.* 2> /dev/null |
|
|---|
| 2508 | sed -n 1p | sed s@\$g4_qt_lib_dir/lib@@ |
|
|---|
| 2509 | sed s@[.].*@@\`"
|
|---|
| 2510 | if test "x\$g4_qt_lib_qui" != "x" ; then
|
|---|
| 2511 | echo "checking for qui library... yes"
|
|---|
| 2512 | else
|
|---|
| 2513 | echo "checking for qui library... no"
|
|---|
| 2514 | g4_havegoodqt=no
|
|---|
| 2515 | fi
|
|---|
| 2516 | fi
|
|---|
| 2517 | else
|
|---|
| 2518 | echo "checking for qt-mt or qt library... no"
|
|---|
| 2519 | g4_havegoodqt=no
|
|---|
| 2520 | fi
|
|---|
| 2521 | fi #END TEST for Qt4/3 libraries
|
|---|
| 2522 |
|
|---|
| 2523 | #
|
|---|
| 2524 | # Finally, we need to search for moc
|
|---|
| 2525 | #
|
|---|
| 2526 | g4_qt_bin_dir=\$g4_qt_dir/bin
|
|---|
| 2527 | g4_qtmoc=no
|
|---|
| 2528 | if test -x "\$g4_qt_bin_dir/moc" ; then
|
|---|
| 2529 | g4_qtmoc="\$g4_qt_bin_dir/moc"
|
|---|
| 2530 | elif test -x "\$g4_qt_bin_dir/moc-qt4" ; then
|
|---|
| 2531 | g4_qtmoc="\$g4_qt_bin_dir/moc-qt4"
|
|---|
| 2532 | elif test -x "\$g4_qt_bin_dir/qt4-moc" ; then
|
|---|
| 2533 | g4_qtmoc="\$g4_qt_bin_dir/qt4-moc"
|
|---|
| 2534 | else
|
|---|
| 2535 | g4_havegoodqt=no
|
|---|
| 2536 | fi
|
|---|
| 2537 | echo "checking for moc... \$g4_qtmoc"
|
|---|
| 2538 |
|
|---|
| 2539 | ## THIS IS POINT AT WHICH TO DO FALLBACK TESTS I.E DOES
|
|---|
| 2540 | ## COMPILATION OF SMALL TEST PROGRAM WORK - THEN HEADERS AND
|
|---|
| 2541 | ## LIBS ARE AUTOMATICALLY FOUND BY LINKER
|
|---|
| 2542 |
|
|---|
| 2543 | #
|
|---|
| 2544 | ## Finally, set output variables, raw for now
|
|---|
| 2545 | #
|
|---|
| 2546 | if test "x\$g4_havegoodqt" = "xyes" ; then
|
|---|
| 2547 | g4_qt_version=\$g4_qt_major_ver
|
|---|
| 2548 |
|
|---|
| 2549 | # Take care of Qt4 style header structure...
|
|---|
| 2550 | if test "x\`basename \$g4_qt_include_dir\`" = "xQtCore"; then
|
|---|
| 2551 | g4_qt_cxxflags="-I\`dirname \$g4_qt_include_dir\` -I\$g4_qt_include_dir"
|
|---|
| 2552 | else
|
|---|
| 2553 | g4_qt_cxxflags="-I\$g4_qt_include_dir"
|
|---|
| 2554 | fi
|
|---|
| 2555 | if test "x\$g4_is_qt4" = "xyes" ; then
|
|---|
| 2556 | for i in \$g4_qt_extra_headers ; do
|
|---|
| 2557 | g4_qt_cxxflags="\$g4_qt_cxxflags -I\$i"
|
|---|
| 2558 | done
|
|---|
| 2559 | for i in \$g4_qt_gl_headers ; do
|
|---|
| 2560 | g4_qt_gl_cxxflags="\$g4_qt_gl_cxxflags -I\$i"
|
|---|
| 2561 | done
|
|---|
| 2562 | fi
|
|---|
| 2563 |
|
|---|
| 2564 | g4_qt_libs="-L\$g4_qt_lib_dir"
|
|---|
| 2565 | if test "x\$g4_qt_lib" = "xQtCore4.lib" ; then
|
|---|
| 2566 | #We have Windows...
|
|---|
| 2567 | g4_qt_libs="\$g4_qt_libs QtCore4.lib QtGui4.lib"
|
|---|
| 2568 | g4_qt_gl_libs="QtOpenGL4.lib"
|
|---|
| 2569 | else
|
|---|
| 2570 | g4_qt_libs="\$g4_qt_libs -l\$g4_qt_lib"
|
|---|
| 2571 | if test "x\$g4_is_qt4" = "xyes" ; then
|
|---|
| 2572 | g4_qt_libs="\$g4_qt_libs -lQtGui"
|
|---|
| 2573 | g4_qt_gl_libs="-lQtOpenGL"
|
|---|
| 2574 | fi
|
|---|
| 2575 | fi
|
|---|
| 2576 | if test "x\$g4_qt_lib_qui" != "x" ; then
|
|---|
| 2577 | g4_qt_libs="\$g4_qt_libs -lqui"
|
|---|
| 2578 | fi
|
|---|
| 2579 |
|
|---|
| 2580 |
|
|---|
| 2581 | g4_qt_moc=\$g4_qtmoc
|
|---|
| 2582 |
|
|---|
| 2583 | g4_qt_is_configured=yes
|
|---|
| 2584 | else
|
|---|
| 2585 | g4_qt_is_configured=''
|
|---|
| 2586 | fi
|
|---|
| 2587 | fi #END TEST for Darwin Framework
|
|---|
| 2588 |
|
|---|
| 2589 | else
|
|---|
| 2590 | #Probably also want flags here to reset variables if requested
|
|---|
| 2591 | echo "configure: Qt already configured, no recheck neccessary"
|
|---|
| 2592 | fi #END TEST "x\$g4_qt_is_configured" = "x"
|
|---|
| 2593 |
|
|---|
| 2594 |
|
|---|
| 2595 | echo ""
|
|---|
| 2596 | echo "DEBUG#####"
|
|---|
| 2597 | echo "g4_qt_cxxflags = \$g4_qt_cxxflags"
|
|---|
| 2598 | echo "g4_qt_gl_cxxflags = \$g4_qt_gl_cxxflags"
|
|---|
| 2599 | echo "g4_qt_libs = \$g4_qt_libs"
|
|---|
| 2600 | echo "g4_qt_gl_libs = \$g4_qt_gl_libs"
|
|---|
| 2601 | echo "g4_qt_moc = \$g4_qt_moc"
|
|---|
| 2602 | echo "..."
|
|---|
| 2603 | echo "g4_havegoodqt = \$g4_havegoodqt"
|
|---|
| 2604 | echo "g4_qt_is_configured = \$g4_qt_is_configured"
|
|---|
| 2605 | echo "##########"
|
|---|
| 2606 | EOSC
|
|---|
| 2607 | : decide how portable to be
|
|---|
| 2608 | case "$d_portable" in
|
|---|
| 2609 | "$define") dflt=y;;
|
|---|
| 2610 | *) dflt=n;;
|
|---|
| 2611 | esac
|
|---|
| 2612 | $cat <<'EOH'
|
|---|
| 2613 |
|
|---|
| 2614 | I can set things up so that your shell scripts and binaries are more portable,
|
|---|
| 2615 | at what may be a noticable cost in performance. In particular, if you
|
|---|
| 2616 | ask to be portable, the following happens:
|
|---|
| 2617 |
|
|---|
| 2618 | 1) Shell scripts will rely on the PATH variable rather than using
|
|---|
| 2619 | the paths derived above.
|
|---|
| 2620 | 2) ~username interpretations will be done at run time rather than
|
|---|
| 2621 | by Configure.
|
|---|
| 2622 |
|
|---|
| 2623 | EOH
|
|---|
| 2624 | rp="Do you expect to run these scripts and binaries on multiple machines?"
|
|---|
| 2625 | . ./myread
|
|---|
| 2626 | case "$ans" in
|
|---|
| 2627 | y*) d_portable="$define"
|
|---|
| 2628 | ;;
|
|---|
| 2629 | *) d_portable="$undef" ;;
|
|---|
| 2630 | esac
|
|---|
| 2631 |
|
|---|
| 2632 | : set up shell script to do ~ expansion
|
|---|
| 2633 | cat >filexp <<EOSS
|
|---|
| 2634 | $startsh
|
|---|
| 2635 | : expand filename
|
|---|
| 2636 | case "\$1" in
|
|---|
| 2637 | ~/*|~)
|
|---|
| 2638 | echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
|
|---|
| 2639 | ;;
|
|---|
| 2640 | ~*)
|
|---|
| 2641 | if $test -f /bin/csh; then
|
|---|
| 2642 | /bin/csh -f -c "glob \$1"
|
|---|
| 2643 | failed=\$?
|
|---|
| 2644 | echo ""
|
|---|
| 2645 | exit \$failed
|
|---|
| 2646 | else
|
|---|
| 2647 | name=\`$expr x\$1 : '..\([^/]*\)'\`
|
|---|
| 2648 | dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\`
|
|---|
| 2649 | if $test ! -d "\$dir"; then
|
|---|
| 2650 | me=\`basename \$0\`
|
|---|
| 2651 | echo "\$me: can't locate home directory for: \$name" >&2
|
|---|
| 2652 | exit 1
|
|---|
| 2653 | fi
|
|---|
| 2654 | case "\$1" in
|
|---|
| 2655 | */*)
|
|---|
| 2656 | echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
|
|---|
| 2657 | ;;
|
|---|
| 2658 | *)
|
|---|
| 2659 | echo \$dir
|
|---|
| 2660 | ;;
|
|---|
| 2661 | esac
|
|---|
| 2662 | fi
|
|---|
| 2663 | ;;
|
|---|
| 2664 | *)
|
|---|
| 2665 | echo \$1
|
|---|
| 2666 | ;;
|
|---|
| 2667 | esac
|
|---|
| 2668 | EOSS
|
|---|
| 2669 | chmod +x filexp
|
|---|
| 2670 | $eunicefix filexp
|
|---|
| 2671 |
|
|---|
| 2672 | : now set up to get a file name
|
|---|
| 2673 | cat <<EOS >getfile
|
|---|
| 2674 | $startsh
|
|---|
| 2675 | EOS
|
|---|
| 2676 | cat <<'EOSC' >>getfile
|
|---|
| 2677 | tilde=''
|
|---|
| 2678 | fullpath=''
|
|---|
| 2679 | already=''
|
|---|
| 2680 | skip=''
|
|---|
| 2681 | none_ok=''
|
|---|
| 2682 | exp_file=''
|
|---|
| 2683 | nopath_ok=''
|
|---|
| 2684 | orig_rp="$rp"
|
|---|
| 2685 | orig_dflt="$dflt"
|
|---|
| 2686 |
|
|---|
| 2687 | case "$fn" in
|
|---|
| 2688 | *\(*)
|
|---|
| 2689 | expr $fn : '.*(\(.*\)).*' | tr ',' '\012' >getfile.ok
|
|---|
| 2690 | fn=`echo $fn | sed 's/(.*)//'`
|
|---|
| 2691 | ;;
|
|---|
| 2692 | esac
|
|---|
| 2693 |
|
|---|
| 2694 | case "$fn" in
|
|---|
| 2695 | *:*)
|
|---|
| 2696 | loc_file=`expr $fn : '.*:\(.*\)'`
|
|---|
| 2697 | fn=`expr $fn : '\(.*\):.*'`
|
|---|
| 2698 | ;;
|
|---|
| 2699 | esac
|
|---|
| 2700 |
|
|---|
| 2701 | case "$fn" in
|
|---|
| 2702 | *~*) tilde=true;;
|
|---|
| 2703 | esac
|
|---|
| 2704 | case "$fn" in
|
|---|
| 2705 | */*) fullpath=true;;
|
|---|
| 2706 | esac
|
|---|
| 2707 | case "$fn" in
|
|---|
| 2708 | *+*) skip=true;;
|
|---|
| 2709 | esac
|
|---|
| 2710 | case "$fn" in
|
|---|
| 2711 | *n*) none_ok=true;;
|
|---|
| 2712 | esac
|
|---|
| 2713 | case "$fn" in
|
|---|
| 2714 | *e*) exp_file=true;;
|
|---|
| 2715 | esac
|
|---|
| 2716 | case "$fn" in
|
|---|
| 2717 | *p*) nopath_ok=true;;
|
|---|
| 2718 | esac
|
|---|
| 2719 |
|
|---|
| 2720 | case "$fn" in
|
|---|
| 2721 | *f*) type='File';;
|
|---|
| 2722 | *d*) type='Directory';;
|
|---|
| 2723 | *l*) type='Locate';;
|
|---|
| 2724 | esac
|
|---|
| 2725 |
|
|---|
| 2726 | what="$type"
|
|---|
| 2727 | case "$what" in
|
|---|
| 2728 | Locate) what='File';;
|
|---|
| 2729 | esac
|
|---|
| 2730 |
|
|---|
| 2731 | case "$exp_file" in
|
|---|
| 2732 | '')
|
|---|
| 2733 | case "$d_portable" in
|
|---|
| 2734 | "$define") ;;
|
|---|
| 2735 | *) exp_file=true;;
|
|---|
| 2736 | esac
|
|---|
| 2737 | ;;
|
|---|
| 2738 | esac
|
|---|
| 2739 |
|
|---|
| 2740 | cd ../..
|
|---|
| 2741 | while test "$type"; do
|
|---|
| 2742 | redo=''
|
|---|
| 2743 | rp="$orig_rp"
|
|---|
| 2744 | dflt="$orig_dflt"
|
|---|
| 2745 | case "$tilde" in
|
|---|
| 2746 | true) rp="$rp ";;
|
|---|
| 2747 | esac
|
|---|
| 2748 | . .config/UU/myread
|
|---|
| 2749 | if test -f .config/UU/getfile.ok && \
|
|---|
| 2750 | $contains "^$ans\$" .config/UU/getfile.ok >/dev/null 2>&1
|
|---|
| 2751 | then
|
|---|
| 2752 | value="$ans"
|
|---|
| 2753 | ansexp="$ans"
|
|---|
| 2754 | break
|
|---|
| 2755 | fi
|
|---|
| 2756 | case "$ans" in
|
|---|
| 2757 | none)
|
|---|
| 2758 | value=''
|
|---|
| 2759 | ansexp=''
|
|---|
| 2760 | case "$none_ok" in
|
|---|
| 2761 | true) type='';;
|
|---|
| 2762 | esac
|
|---|
| 2763 | ;;
|
|---|
| 2764 | *)
|
|---|
| 2765 | case "$tilde" in
|
|---|
| 2766 | '') value="$ans"
|
|---|
| 2767 | ansexp="$ans";;
|
|---|
| 2768 | *)
|
|---|
| 2769 | value=`.config/UU/filexp $ans`
|
|---|
| 2770 | case $? in
|
|---|
| 2771 | 0)
|
|---|
| 2772 | if test "$ans" != "$value"; then
|
|---|
| 2773 | echo "(That expands to $value on this system.)"
|
|---|
| 2774 | fi
|
|---|
| 2775 | ;;
|
|---|
| 2776 | *) value="$ans";;
|
|---|
| 2777 | esac
|
|---|
| 2778 | ansexp="$value"
|
|---|
| 2779 | case "$exp_file" in
|
|---|
| 2780 | '') value="$ans";;
|
|---|
| 2781 | esac
|
|---|
| 2782 | ;;
|
|---|
| 2783 | esac
|
|---|
| 2784 | case "$fullpath" in
|
|---|
| 2785 | true)
|
|---|
| 2786 | case "$ansexp" in
|
|---|
| 2787 | /*) value="$ansexp" ;;
|
|---|
| 2788 | *)
|
|---|
| 2789 | redo=true
|
|---|
| 2790 | case "$already" in
|
|---|
| 2791 | true)
|
|---|
| 2792 | echo "I shall only accept a full path name, as in /bin/ls." >&4
|
|---|
| 2793 | echo "Use a ! shell escape if you wish to check pathnames." >&4
|
|---|
| 2794 | ;;
|
|---|
| 2795 | *)
|
|---|
| 2796 | echo "Please give a full path name, starting with slash." >&4
|
|---|
| 2797 | case "$tilde" in
|
|---|
| 2798 | true)
|
|---|
| 2799 | echo "Note that using ~username is ok provided it expands well." >&4
|
|---|
| 2800 | already=true
|
|---|
| 2801 | ;;
|
|---|
| 2802 | esac
|
|---|
| 2803 | esac
|
|---|
| 2804 | ;;
|
|---|
| 2805 | esac
|
|---|
| 2806 | ;;
|
|---|
| 2807 | esac
|
|---|
| 2808 | case "$redo" in
|
|---|
| 2809 | '')
|
|---|
| 2810 | case "$type" in
|
|---|
| 2811 | File)
|
|---|
| 2812 | if test -f "$ansexp"; then
|
|---|
| 2813 | type=''
|
|---|
| 2814 | elif test -r "$ansexp" || (test -h "$ansexp") >/dev/null 2>&1
|
|---|
| 2815 | then
|
|---|
| 2816 | echo "($value is not a plain file, but that's ok.)"
|
|---|
| 2817 | type=''
|
|---|
| 2818 | fi
|
|---|
| 2819 | ;;
|
|---|
| 2820 | Directory)
|
|---|
| 2821 | if test -d "$ansexp"; then
|
|---|
| 2822 | type=''
|
|---|
| 2823 | fi
|
|---|
| 2824 | ;;
|
|---|
| 2825 | Locate)
|
|---|
| 2826 | if test -d "$ansexp"; then
|
|---|
| 2827 | echo "(Looking for $loc_file in directory $value.)"
|
|---|
| 2828 | value="$value/$loc_file"
|
|---|
| 2829 | ansexp="$ansexp/$loc_file"
|
|---|
| 2830 | fi
|
|---|
| 2831 | if test -f "$ansexp"; then
|
|---|
| 2832 | type=''
|
|---|
| 2833 | fi
|
|---|
| 2834 | case "$nopath_ok" in
|
|---|
| 2835 | true) case "$value" in
|
|---|
| 2836 | */*) ;;
|
|---|
| 2837 | *) echo "Assuming $value will be in people's path."
|
|---|
| 2838 | type=''
|
|---|
| 2839 | ;;
|
|---|
| 2840 | esac
|
|---|
| 2841 | ;;
|
|---|
| 2842 | esac
|
|---|
| 2843 | ;;
|
|---|
| 2844 | esac
|
|---|
| 2845 |
|
|---|
| 2846 | case "$skip" in
|
|---|
| 2847 | true) type='';
|
|---|
| 2848 | esac
|
|---|
| 2849 |
|
|---|
| 2850 | case "$type" in
|
|---|
| 2851 | '') ;;
|
|---|
| 2852 | *)
|
|---|
| 2853 | if test "$fastread" = yes; then
|
|---|
| 2854 | dflt=y
|
|---|
| 2855 | else
|
|---|
| 2856 | dflt=n
|
|---|
| 2857 | fi
|
|---|
| 2858 | rp="$what $value doesn't exist. Use that name anyway?"
|
|---|
| 2859 | . .config/UU/myread
|
|---|
| 2860 | dflt=''
|
|---|
| 2861 | case "$ans" in
|
|---|
| 2862 | y*) type='';;
|
|---|
| 2863 | *) echo " ";;
|
|---|
| 2864 | esac
|
|---|
| 2865 | ;;
|
|---|
| 2866 | esac
|
|---|
| 2867 | ;;
|
|---|
| 2868 | esac
|
|---|
| 2869 | ;;
|
|---|
| 2870 | esac
|
|---|
| 2871 | done
|
|---|
| 2872 | cd .config/UU
|
|---|
| 2873 | ans="$value"
|
|---|
| 2874 |
|
|---|
| 2875 | # Check for Windows!
|
|---|
| 2876 | if test "X$g4system" = "XWIN32-VC" -o "X$g4system" = "XWIN32-VC7"; then
|
|---|
| 2877 |
|
|---|
| 2878 | checkdrive=`echo $ans|cut -d"/" -f2`
|
|---|
| 2879 |
|
|---|
| 2880 | if test "X$checkdrive" = "Xcygdrive"; then
|
|---|
| 2881 |
|
|---|
| 2882 | windrive=`echo $ans|cut -d"/" -f3`
|
|---|
| 2883 | winpath=`echo $ans|cut -d"/" -f4-`
|
|---|
| 2884 |
|
|---|
| 2885 | fullwinpath="$windrive:/$winpath"
|
|---|
| 2886 | ans=$fullwinpath
|
|---|
| 2887 |
|
|---|
| 2888 | fi # if cygwin syntax is used
|
|---|
| 2889 | fi # if Win
|
|---|
| 2890 |
|
|---|
| 2891 | rp="$orig_rp"
|
|---|
| 2892 | dflt="$orig_dflt"
|
|---|
| 2893 | rm -f getfile.ok
|
|---|
| 2894 | EOSC
|
|---|
| 2895 |
|
|---|
| 2896 | echo " "
|
|---|
| 2897 |
|
|---|
| 2898 | #echo "SSS"
|
|---|
| 2899 | #echo `pwd`
|
|---|
| 2900 | #echo "SSS"
|
|---|
| 2901 |
|
|---|
| 2902 | if [ X$src = X. ] ; then
|
|---|
| 2903 | cd ../..
|
|---|
| 2904 | abssrc=`pwd`
|
|---|
| 2905 | cd .config/UU
|
|---|
| 2906 | else
|
|---|
| 2907 | abssrc=$src
|
|---|
| 2908 | fi
|
|---|
| 2909 |
|
|---|
| 2910 | case "$g4conf" in
|
|---|
| 2911 | '')
|
|---|
| 2912 | g4conf=$abssrc/.config/bin/$g4system
|
|---|
| 2913 | ;;
|
|---|
| 2914 | esac
|
|---|
| 2915 |
|
|---|
| 2916 | #echo "g4conf=$g4conf"
|
|---|
| 2917 |
|
|---|
| 2918 | case "$g4install" in
|
|---|
| 2919 | '')
|
|---|
| 2920 | if test $g4system = "WIN32-VC" -o $g4system = "WIN32-VC7"; then
|
|---|
| 2921 | # g4install="c:/geant4"
|
|---|
| 2922 | g4install=$abssrc
|
|---|
| 2923 | else
|
|---|
| 2924 | # if [ X"$HOME" = X/ ] ; then
|
|---|
| 2925 | # HOME=""
|
|---|
| 2926 | # fi
|
|---|
| 2927 | # g4install="$HOME"/geant4
|
|---|
| 2928 | g4install=$abssrc
|
|---|
| 2929 |
|
|---|
| 2930 | fi
|
|---|
| 2931 |
|
|---|
| 2932 | # Check for Windows!
|
|---|
| 2933 | if test $g4system = "WIN32-VC" -o $g4system = "WIN32-VC7"; then
|
|---|
| 2934 |
|
|---|
| 2935 | checkdrive=`echo $g4install|cut -d"/" -f2`
|
|---|
| 2936 |
|
|---|
| 2937 | if test $checkdrive = "cygdrive"; then
|
|---|
| 2938 |
|
|---|
| 2939 | windrive=`echo $g4install|cut -d"/" -f3`
|
|---|
| 2940 | winpath=`echo $g4install|cut -d"/" -f4-`
|
|---|
| 2941 |
|
|---|
| 2942 | fullwinpath="$windrive:/$winpath"
|
|---|
| 2943 | g4install=$fullwinpath
|
|---|
| 2944 |
|
|---|
| 2945 | fi
|
|---|
| 2946 | fi
|
|---|
| 2947 | ;;
|
|---|
| 2948 | esac
|
|---|
| 2949 |
|
|---|
| 2950 | case "$g4final_install" in
|
|---|
| 2951 | '')
|
|---|
| 2952 | g4final_install=$g4install
|
|---|
| 2953 | ;;
|
|---|
| 2954 | esac
|
|---|
| 2955 |
|
|---|
| 2956 | case "$g4workdir" in
|
|---|
| 2957 | '')
|
|---|
| 2958 | g4workdir=$g4install
|
|---|
| 2959 | ;;
|
|---|
| 2960 | esac
|
|---|
| 2961 |
|
|---|
| 2962 | case "$g4includes_flag" in
|
|---|
| 2963 | '')
|
|---|
| 2964 | g4includes_flag=n
|
|---|
| 2965 | ;;
|
|---|
| 2966 | esac
|
|---|
| 2967 |
|
|---|
| 2968 |
|
|---|
| 2969 | g4message=`cat << EOM
|
|---|
| 2970 |
|
|---|
| 2971 | Where is Geant4 source installed?
|
|---|
| 2972 | EOM`
|
|---|
| 2973 |
|
|---|
| 2974 | #dflt="NO DEFAULT ANSWER"
|
|---|
| 2975 | dflt=$g4install
|
|---|
| 2976 | fn='d~'
|
|---|
| 2977 | rp=$g4message
|
|---|
| 2978 | . ./getfile
|
|---|
| 2979 | g4install=$ans
|
|---|
| 2980 | g4workdir=$g4install
|
|---|
| 2981 | #################################
|
|---|
| 2982 | g4message=`cat << EOM
|
|---|
| 2983 |
|
|---|
| 2984 | Specify the path where Geant4 libraries and source files should be
|
|---|
| 2985 | installed.
|
|---|
| 2986 | EOM`
|
|---|
| 2987 |
|
|---|
| 2988 | #dflt="NO DEFAULT ANSWER"
|
|---|
| 2989 | dflt=$g4final_install
|
|---|
| 2990 | fn='d~'
|
|---|
| 2991 | rp=$g4message
|
|---|
| 2992 | . ./getfile
|
|---|
| 2993 | g4final_install=$ans
|
|---|
| 2994 | #g4workdir=$g4install
|
|---|
| 2995 |
|
|---|
| 2996 | ##################################
|
|---|
| 2997 | g4message=`cat << EOM
|
|---|
| 2998 |
|
|---|
| 2999 | Do you want to copy all Geant4 headers
|
|---|
| 3000 | in one directory?
|
|---|
| 3001 | EOM`
|
|---|
| 3002 |
|
|---|
| 3003 | #dflt="NO DEFAULT ANSWER"
|
|---|
| 3004 | dflt=$g4includes_flag
|
|---|
| 3005 | #fn='d~'
|
|---|
| 3006 | rp=$g4message
|
|---|
| 3007 | . ./myread
|
|---|
| 3008 | g4includes_flag=$ans
|
|---|
| 3009 |
|
|---|
| 3010 | if [ X$g4includes_flag = Xy ] ; then
|
|---|
| 3011 |
|
|---|
| 3012 | case "$g4include" in
|
|---|
| 3013 | '')
|
|---|
| 3014 | g4include=$g4install/include
|
|---|
| 3015 | # g4include=''
|
|---|
| 3016 | ;;
|
|---|
| 3017 | esac
|
|---|
| 3018 |
|
|---|
| 3019 | #g4message=`cat << EOM
|
|---|
| 3020 | #
|
|---|
| 3021 | #Where will be directory to copy all Geant4 headers?
|
|---|
| 3022 | #EOM`
|
|---|
| 3023 | #
|
|---|
| 3024 | ##dflt="NO DEFAULT ANSWER"
|
|---|
| 3025 | ####dflt=$g4install/include
|
|---|
| 3026 | #dflt=$g4include
|
|---|
| 3027 | #fn='d~+'
|
|---|
| 3028 | #rp=$g4message
|
|---|
| 3029 | #. ./getfile
|
|---|
| 3030 | #g4include=$ans
|
|---|
| 3031 |
|
|---|
| 3032 | # Set constantly!
|
|---|
| 3033 | if [ X$g4install != X$g4final_install ] ; then
|
|---|
| 3034 | g4include=$g4final_install/include/geant4
|
|---|
| 3035 | else
|
|---|
| 3036 | g4include=$g4final_install/include
|
|---|
| 3037 | fi
|
|---|
| 3038 |
|
|---|
| 3039 | fi
|
|---|
| 3040 |
|
|---|
| 3041 | #if test "X$g4include" = "X[NOT DEFINED]" ; then
|
|---|
| 3042 | #g4include=""
|
|---|
| 3043 | #fi
|
|---|
| 3044 |
|
|---|
| 3045 | echo " "
|
|---|
| 3046 |
|
|---|
| 3047 | case "$g4tmp" in
|
|---|
| 3048 | '')
|
|---|
| 3049 | g4tmp=$g4workdir/tmp
|
|---|
| 3050 | ;;
|
|---|
| 3051 | esac
|
|---|
| 3052 |
|
|---|
| 3053 | case "$g4lib" in
|
|---|
| 3054 | '')
|
|---|
| 3055 | g4lib=$g4workdir/lib
|
|---|
| 3056 | ;;
|
|---|
| 3057 | esac
|
|---|
| 3058 |
|
|---|
| 3059 | #case "$g4bin" in
|
|---|
| 3060 | #'')
|
|---|
| 3061 | # g4bin=$g4workdir/bin
|
|---|
| 3062 | # ;;
|
|---|
| 3063 | #esac
|
|---|
| 3064 |
|
|---|
| 3065 | while test 1 = 0 ; do
|
|---|
| 3066 |
|
|---|
| 3067 | g4message=`cat << EOM
|
|---|
| 3068 |
|
|---|
| 3069 | (OPTIONAL) You can now customise installation directories:
|
|---|
| 3070 | G4TMP - tmp/ containing temporary dependency (.d) and object (.o) files;
|
|---|
| 3071 | G4LIB - lib/ containing final static (.a) or shared (.so) libraries;
|
|---|
| 3072 |
|
|---|
| 3073 | 1) G4TMP: $g4tmp
|
|---|
| 3074 |
|
|---|
| 3075 | 2) G4LIB: $g4lib
|
|---|
| 3076 |
|
|---|
| 3077 | To modify default settings, select number above (e.g. 2)
|
|---|
| 3078 | EOM`
|
|---|
| 3079 |
|
|---|
| 3080 | #dflt="NO DEFAULT ANSWER"
|
|---|
| 3081 | dflt="Press [Enter] for default settings"
|
|---|
| 3082 | #fn='d~'
|
|---|
| 3083 | rp=$g4message
|
|---|
| 3084 | . ./myread
|
|---|
| 3085 | gans=$ans
|
|---|
| 3086 |
|
|---|
| 3087 |
|
|---|
| 3088 | case $gans in
|
|---|
| 3089 |
|
|---|
| 3090 | 1)
|
|---|
| 3091 | dflt=$g4tmp
|
|---|
| 3092 | fn='d~+'
|
|---|
| 3093 | rp="Where will be your Geant4 tmp directory?"
|
|---|
| 3094 | . ./getfile
|
|---|
| 3095 | g4tmp=$ans
|
|---|
| 3096 | ;;
|
|---|
| 3097 | 2)
|
|---|
| 3098 | dflt=$g4lib
|
|---|
| 3099 | fn='d~+'
|
|---|
| 3100 | rp="Where will be your Geant4 lib directory?"
|
|---|
| 3101 | . ./getfile
|
|---|
| 3102 | g4lib=$ans
|
|---|
| 3103 | ;;
|
|---|
| 3104 | # 3)
|
|---|
| 3105 | # dflt=$g4bin
|
|---|
| 3106 | # fn='d~+'
|
|---|
| 3107 | # rp="Where will be your Geant4 bin directory?"
|
|---|
| 3108 | # . ./getfile
|
|---|
| 3109 | # g4bin=$ans
|
|---|
| 3110 | # ;;
|
|---|
| 3111 |
|
|---|
| 3112 | # [eE])
|
|---|
| 3113 | # break
|
|---|
| 3114 | # ;;
|
|---|
| 3115 | *)
|
|---|
| 3116 | break
|
|---|
| 3117 | # echo " "
|
|---|
| 3118 | ;;
|
|---|
| 3119 | esac
|
|---|
| 3120 | done
|
|---|
| 3121 |
|
|---|
| 3122 | echo " "
|
|---|
| 3123 |
|
|---|
| 3124 | case "$g4data" in
|
|---|
| 3125 | '')
|
|---|
| 3126 | g4data=$g4install/data
|
|---|
| 3127 | ;;
|
|---|
| 3128 | esac
|
|---|
| 3129 |
|
|---|
| 3130 | case "$g4levelgammadata" in
|
|---|
| 3131 | '')
|
|---|
| 3132 | g4levelgammadata=$g4data/PhotonEvaporation2.0
|
|---|
| 3133 | ;;
|
|---|
| 3134 | esac
|
|---|
| 3135 |
|
|---|
| 3136 | case "$g4radioactivedata" in
|
|---|
| 3137 | '')
|
|---|
| 3138 | g4radioactivedata=$g4data/RadioactiveDecay3.2
|
|---|
| 3139 | ;;
|
|---|
| 3140 | esac
|
|---|
| 3141 |
|
|---|
| 3142 | case "$g4ledata" in
|
|---|
| 3143 | '')
|
|---|
| 3144 | g4ledata=$g4data/G4EMLOW6.1
|
|---|
| 3145 | ;;
|
|---|
| 3146 | esac
|
|---|
| 3147 |
|
|---|
| 3148 | case "$g4neutronhpcrosssections" in
|
|---|
| 3149 | '')
|
|---|
| 3150 | g4neutronhpcrosssections=$g4data/G4NDL3.12
|
|---|
| 3151 | ;;
|
|---|
| 3152 | esac
|
|---|
| 3153 |
|
|---|
| 3154 | case "$g4abladata" in
|
|---|
| 3155 | '')
|
|---|
| 3156 | g4abladata=$g4data/G4ABLA3.0
|
|---|
| 3157 | ;;
|
|---|
| 3158 | esac
|
|---|
| 3159 |
|
|---|
| 3160 |
|
|---|
| 3161 | #case "$g4elasticdata" in
|
|---|
| 3162 | #'')
|
|---|
| 3163 | # g4elasticdata=$g4data/G4ELASTIC1.1
|
|---|
| 3164 | # ;;
|
|---|
| 3165 | #esac
|
|---|
| 3166 |
|
|---|
| 3167 | #########################################################################
|
|---|
| 3168 |
|
|---|
| 3169 | # while test 1 = 1 ; do
|
|---|
| 3170 |
|
|---|
| 3171 | g4message=`cat << EOM
|
|---|
| 3172 |
|
|---|
| 3173 | Please, specify default directory where ALL the Geant4 data is installed:
|
|---|
| 3174 |
|
|---|
| 3175 | G4LEVELGAMMADATA: $g4levelgammadata
|
|---|
| 3176 |
|
|---|
| 3177 | G4RADIOACTIVEDATA: $g4radioactivedata
|
|---|
| 3178 |
|
|---|
| 3179 | G4LEDATA: $g4ledata
|
|---|
| 3180 |
|
|---|
| 3181 | G4NEUTRONHPDATA: $g4neutronhpcrosssections
|
|---|
| 3182 |
|
|---|
| 3183 | G4ABLADATA: $g4abladata
|
|---|
| 3184 |
|
|---|
| 3185 | You will be asked about customizing these next.
|
|---|
| 3186 |
|
|---|
| 3187 | EOM`
|
|---|
| 3188 |
|
|---|
| 3189 | #dflt="NO DEFAULT ANSWER"
|
|---|
| 3190 | dflt=$g4data
|
|---|
| 3191 | #fn='d~'
|
|---|
| 3192 | rp=$g4message
|
|---|
| 3193 | #. ./myread
|
|---|
| 3194 | gans=$ans
|
|---|
| 3195 |
|
|---|
| 3196 | dflt=$g4data
|
|---|
| 3197 | fn='d~'
|
|---|
| 3198 | . ./getfile
|
|---|
| 3199 |
|
|---|
| 3200 | if [ X$g4data != X$ans ] ; then
|
|---|
| 3201 | g4data=$ans
|
|---|
| 3202 |
|
|---|
| 3203 | g4levelgammadata=$g4data/PhotonEvaporation2.0
|
|---|
| 3204 | g4radioactivedata=$g4data/RadioactiveDecay3.2
|
|---|
| 3205 | g4ledata=$g4data/G4EMLOW6.1
|
|---|
| 3206 | g4neutronhpcrosssections=$g4data/G4NDL3.12
|
|---|
| 3207 | g4abladata=$g4data/G4ABLA3.0
|
|---|
| 3208 | # g4elasticdata=$g4data/G4ELASTIC1.1
|
|---|
| 3209 | fi
|
|---|
| 3210 | # done
|
|---|
| 3211 |
|
|---|
| 3212 | ###################################################################
|
|---|
| 3213 |
|
|---|
| 3214 | while test 1 = 1 ; do
|
|---|
| 3215 |
|
|---|
| 3216 | g4message=`cat << EOM
|
|---|
| 3217 |
|
|---|
| 3218 | Please, specify default directory where the Geant4 data is installed:
|
|---|
| 3219 |
|
|---|
| 3220 | 1) G4LEVELGAMMADATA: $g4levelgammadata
|
|---|
| 3221 |
|
|---|
| 3222 | 2) G4RADIOACTIVEDATA: $g4radioactivedata
|
|---|
| 3223 |
|
|---|
| 3224 | 3) G4LEDATA: $g4ledata
|
|---|
| 3225 |
|
|---|
| 3226 | 4) G4NEUTRONHPDATA: $g4neutronhpcrosssections
|
|---|
| 3227 |
|
|---|
| 3228 | 5) G4ABLADATA: $g4abladata
|
|---|
| 3229 |
|
|---|
| 3230 | To modify default settings, select number above (e.g. 2)
|
|---|
| 3231 | EOM`
|
|---|
| 3232 |
|
|---|
| 3233 | #dflt="NO DEFAULT ANSWER"
|
|---|
| 3234 | dflt="Press [Enter] for default settings"
|
|---|
| 3235 | #fn='d~'
|
|---|
| 3236 | rp=$g4message
|
|---|
| 3237 | . ./myread
|
|---|
| 3238 | gans=$ans
|
|---|
| 3239 |
|
|---|
| 3240 |
|
|---|
| 3241 | case $gans in
|
|---|
| 3242 |
|
|---|
| 3243 | 1)
|
|---|
| 3244 | dflt=$g4levelgammadata
|
|---|
| 3245 | fn='d~'
|
|---|
| 3246 | rp="Where is Geant4 PhotonEvaporation2.0 data installed?"
|
|---|
| 3247 | . ./getfile
|
|---|
| 3248 | g4levelgammadata=$ans
|
|---|
| 3249 | ;;
|
|---|
| 3250 | 2)
|
|---|
| 3251 | dflt=$g4radioactivedata
|
|---|
| 3252 | fn='d~'
|
|---|
| 3253 | rp="Where is Geant4 RadioactiveDecay3.2 data installed?"
|
|---|
| 3254 | . ./getfile
|
|---|
| 3255 | g4radioactivedata=$ans
|
|---|
| 3256 | ;;
|
|---|
| 3257 | 3)
|
|---|
| 3258 | dflt=$g4ledata
|
|---|
| 3259 | fn='d~'
|
|---|
| 3260 | rp="Where is G4EMLOW6.1 data installed ?"
|
|---|
| 3261 | . ./getfile
|
|---|
| 3262 | g4ledata=$ans
|
|---|
| 3263 | ;;
|
|---|
| 3264 | 4)
|
|---|
| 3265 | dflt=$g4neutronhpcrosssections
|
|---|
| 3266 | fn='d~'
|
|---|
| 3267 | rp="Where is G4NDL3.12 data installed?"
|
|---|
| 3268 | . ./getfile
|
|---|
| 3269 | g4neutronhpcrosssections=$ans
|
|---|
| 3270 | ;;
|
|---|
| 3271 |
|
|---|
| 3272 | 5)
|
|---|
| 3273 | dflt=$g4abladata
|
|---|
| 3274 | fn='d~'
|
|---|
| 3275 | rp="Where is G4ABLA3.0 data installed?"
|
|---|
| 3276 | . ./getfile
|
|---|
| 3277 | g4abladata=$ans
|
|---|
| 3278 | ;;
|
|---|
| 3279 |
|
|---|
| 3280 | # 5)
|
|---|
| 3281 | # dflt=$g4elasticdata
|
|---|
| 3282 | # fn='d~'
|
|---|
| 3283 | # rp="Where is G4ELASTIC1.1 data installed?"
|
|---|
| 3284 | # . ./getfile
|
|---|
| 3285 | # g4elasticdata=$ans
|
|---|
| 3286 | # ;;
|
|---|
| 3287 |
|
|---|
| 3288 | # [eE])
|
|---|
| 3289 | # break
|
|---|
| 3290 | # ;;
|
|---|
| 3291 | *)
|
|---|
| 3292 | break
|
|---|
| 3293 | # echo " "
|
|---|
| 3294 | ;;
|
|---|
| 3295 | esac
|
|---|
| 3296 | done
|
|---|
| 3297 |
|
|---|
| 3298 |
|
|---|
| 3299 | if test "X$g4clhep_base_dir" = "X" ; then
|
|---|
| 3300 |
|
|---|
| 3301 | clhep_dirs=`find $g4clhep_base_dir /usr/local/include /usr/include -type d -name CLHEP 2>/dev/null |xargs echo`
|
|---|
| 3302 | #echo clhep_dirs=$clhep_dirs
|
|---|
| 3303 |
|
|---|
| 3304 | fi
|
|---|
| 3305 |
|
|---|
| 3306 | if test "X$clhep_dirs" != "X" ; then
|
|---|
| 3307 |
|
|---|
| 3308 | g4clhep_base_dir_found=`echo $clhep_dirs|cut -d" " -f1`
|
|---|
| 3309 | #echo g4clhep_base_dir_found=$g4clhep_base_dir_found
|
|---|
| 3310 |
|
|---|
| 3311 |
|
|---|
| 3312 | #g4clhep_base_dir_n=`echo $g4clhep_base_dir_found |awk -F"/" '{print NF}'`
|
|---|
| 3313 | #echo g4clhep_base_dir_n=$g4clhep_base_dir_n
|
|---|
| 3314 | g4clhep_base_dir_found=`dirname $g4clhep_base_dir_found`
|
|---|
| 3315 | g4clhep_base_dir_found=`dirname $g4clhep_base_dir_found`
|
|---|
| 3316 |
|
|---|
| 3317 | g4clhep_base_dir=$g4clhep_base_dir_found
|
|---|
| 3318 |
|
|---|
| 3319 | #else
|
|---|
| 3320 | #case "$g4clhep_base_dir" in
|
|---|
| 3321 | #'')
|
|---|
| 3322 | # if test "X$g4system" = "XWIN32-VC" -o "X$g4system" = "XWIN32-VC7"; then
|
|---|
| 3323 | # g4clhep_base_dir="c:/usr/local"
|
|---|
| 3324 | # else
|
|---|
| 3325 | # g4clhep_base_dir=/usr/local
|
|---|
| 3326 | # fi
|
|---|
| 3327 | # ;;
|
|---|
| 3328 | #esac
|
|---|
| 3329 | fi
|
|---|
| 3330 |
|
|---|
| 3331 |
|
|---|
| 3332 | #while test 1 = 1 ; do
|
|---|
| 3333 |
|
|---|
| 3334 | #if test "X$g4clhep_base_dir" != "X" ; then
|
|---|
| 3335 | #clhep_dirs=$g4clhep_base_dir
|
|---|
| 3336 | #echo 1 g4clhep_base_dir=$g4clhep_base_dir
|
|---|
| 3337 | #fi
|
|---|
| 3338 |
|
|---|
| 3339 | if test "X$g4clhep_base_dir" != "X" ; then
|
|---|
| 3340 |
|
|---|
| 3341 | g4message=`cat << EOM
|
|---|
| 3342 |
|
|---|
| 3343 | Please, specify where CLHEP is installed. It was found in:
|
|---|
| 3344 |
|
|---|
| 3345 | CLHEP_BASE_DIR: $g4clhep_base_dir
|
|---|
| 3346 |
|
|---|
| 3347 | EOM`
|
|---|
| 3348 |
|
|---|
| 3349 | dflt=$g4clhep_base_dir
|
|---|
| 3350 | fn='d~'
|
|---|
| 3351 | rp=$g4message
|
|---|
| 3352 | . ./getfile
|
|---|
| 3353 |
|
|---|
| 3354 | cend="no"
|
|---|
| 3355 | while test "$cend" = "no" ; do
|
|---|
| 3356 | if test -e "$ans/include/CLHEP" ; then
|
|---|
| 3357 | cend="yes"
|
|---|
| 3358 |
|
|---|
| 3359 | g4clhep_base_dir=$ans
|
|---|
| 3360 |
|
|---|
| 3361 | else
|
|---|
| 3362 |
|
|---|
| 3363 | g4message=`cat << EOM
|
|---|
| 3364 |
|
|---|
| 3365 | Could not find CLHEP installed in $ans!
|
|---|
| 3366 | Please, specify where CLHEP is installed:
|
|---|
| 3367 |
|
|---|
| 3368 | CLHEP_BASE_DIR:
|
|---|
| 3369 |
|
|---|
| 3370 | EOM`
|
|---|
| 3371 |
|
|---|
| 3372 | dflt=""
|
|---|
| 3373 | fn='d~'
|
|---|
| 3374 | rp=$g4message
|
|---|
| 3375 | . ./getfile
|
|---|
| 3376 | fi
|
|---|
| 3377 | done
|
|---|
| 3378 |
|
|---|
| 3379 | else
|
|---|
| 3380 |
|
|---|
| 3381 | g4message=`cat << EOM
|
|---|
| 3382 |
|
|---|
| 3383 | Could not find CLHEP installed on this system!
|
|---|
| 3384 | Please, specify where CLHEP is installed:
|
|---|
| 3385 |
|
|---|
| 3386 | CLHEP_BASE_DIR:
|
|---|
| 3387 |
|
|---|
| 3388 | EOM`
|
|---|
| 3389 |
|
|---|
| 3390 | dflt=""
|
|---|
| 3391 | fn='d~'
|
|---|
| 3392 | rp=$g4message
|
|---|
| 3393 | . ./getfile
|
|---|
| 3394 |
|
|---|
| 3395 | cend="no"
|
|---|
| 3396 | while test "$cend" = "no" ; do
|
|---|
| 3397 | if test -e "$ans/include/CLHEP" ; then
|
|---|
| 3398 | cend="yes"
|
|---|
| 3399 |
|
|---|
| 3400 | g4clhep_base_dir=$ans
|
|---|
| 3401 |
|
|---|
| 3402 | else
|
|---|
| 3403 |
|
|---|
| 3404 | g4message=`cat << EOM
|
|---|
| 3405 |
|
|---|
| 3406 | Could not find CLHEP installed in $ans!
|
|---|
| 3407 | Please, specify where CLHEP is installed:
|
|---|
| 3408 |
|
|---|
| 3409 | CLHEP_BASE_DIR:
|
|---|
| 3410 |
|
|---|
| 3411 | EOM`
|
|---|
| 3412 |
|
|---|
| 3413 | dflt=""
|
|---|
| 3414 | fn='d~'
|
|---|
| 3415 | rp=$g4message
|
|---|
| 3416 | . ./getfile
|
|---|
| 3417 | fi
|
|---|
| 3418 | done
|
|---|
| 3419 |
|
|---|
| 3420 | fi
|
|---|
| 3421 |
|
|---|
| 3422 | #dflt="Press [Enter] for default settings"
|
|---|
| 3423 | #fn='d~'
|
|---|
| 3424 | #####rp=$g4message
|
|---|
| 3425 | #. ./myread
|
|---|
| 3426 | #gans=$ans
|
|---|
| 3427 |
|
|---|
| 3428 | # case $gans in
|
|---|
| 3429 |
|
|---|
| 3430 | # 1)
|
|---|
| 3431 | ## dflt=""
|
|---|
| 3432 | ## fn='d~'
|
|---|
| 3433 | # rp="Where is CLHEP installed?"
|
|---|
| 3434 | ## . ./getfile
|
|---|
| 3435 | ## g4clhep_base_dir=$ans
|
|---|
| 3436 |
|
|---|
| 3437 | ##### g4clhep_include_dir=$ans/include
|
|---|
| 3438 | ##### g4clhep_lib_dir=$ans/lib
|
|---|
| 3439 | # ;;
|
|---|
| 3440 | # 2)
|
|---|
| 3441 | # dflt=$g4clhep_include_dir
|
|---|
| 3442 | # fn='d~'
|
|---|
| 3443 | # rp="Where is CLHEP include directory?"
|
|---|
| 3444 | # . ./getfile
|
|---|
| 3445 | # g4clhep_include_dir=$ans
|
|---|
| 3446 | # ;;
|
|---|
| 3447 | # 3)
|
|---|
| 3448 | # dflt=$g4clhep_lib_dir
|
|---|
| 3449 | # fn='d~'
|
|---|
| 3450 | # rp="Where is CLHEP lib directory?"
|
|---|
| 3451 | # . ./getfile
|
|---|
| 3452 | # g4clhep_lib_dir=$ans
|
|---|
| 3453 | # ;;
|
|---|
| 3454 | # 4)
|
|---|
| 3455 | # dflt=$g4clhep_lib
|
|---|
| 3456 | # rp="What is CLHEP lib title?"
|
|---|
| 3457 | # . ./myread
|
|---|
| 3458 | # g4clhep_lib=$ans
|
|---|
| 3459 | # ;;
|
|---|
| 3460 | ## [eE])
|
|---|
| 3461 | ## break
|
|---|
| 3462 | ## ;;
|
|---|
| 3463 | # *)
|
|---|
| 3464 | # echo " "
|
|---|
| 3465 | # break
|
|---|
| 3466 | # ;;
|
|---|
| 3467 | # esac
|
|---|
| 3468 | #done
|
|---|
| 3469 |
|
|---|
| 3470 | case "$g4clhep_include_dir" in
|
|---|
| 3471 | '')
|
|---|
| 3472 | g4clhep_include_dir=$g4clhep_base_dir/include
|
|---|
| 3473 | ;;
|
|---|
| 3474 | esac
|
|---|
| 3475 |
|
|---|
| 3476 | case "$g4clhep_lib_dir" in
|
|---|
| 3477 | '')
|
|---|
| 3478 | g4clhep_lib_dir=$g4clhep_base_dir/lib
|
|---|
| 3479 | ;;
|
|---|
| 3480 | esac
|
|---|
| 3481 |
|
|---|
| 3482 | case "$g4clhep_lib" in
|
|---|
| 3483 | '')
|
|---|
| 3484 | if test "X$g4system" = "XWIN32-VC" -o "X$g4system" = "XWIN32-VC7"; then
|
|---|
| 3485 | g4clhep_lib="CLHEP.lib"
|
|---|
| 3486 | else
|
|---|
| 3487 | g4clhep_lib=CLHEP
|
|---|
| 3488 | fi
|
|---|
| 3489 | ;;
|
|---|
| 3490 | esac
|
|---|
| 3491 |
|
|---|
| 3492 | while test 1 = 1 ; do
|
|---|
| 3493 |
|
|---|
| 3494 | g4message_1=`cat << You
|
|---|
| 3495 |
|
|---|
| 3496 | You can customize paths and library name of you CLHEP installation:
|
|---|
| 3497 |
|
|---|
| 3498 | 1) CLHEP_INCLUDE_DIR: $g4clhep_include_dir
|
|---|
| 3499 | 2) CLHEP_LIB_DIR: $g4clhep_lib_dir
|
|---|
| 3500 | 3) CLHEP_LIB: $g4clhep_lib
|
|---|
| 3501 |
|
|---|
| 3502 | You`
|
|---|
| 3503 |
|
|---|
| 3504 | g4message_2=" need to use full library name with its extension (e.g. libCLHEP.lib)."
|
|---|
| 3505 |
|
|---|
| 3506 | g4message_3=`cat << EOM
|
|---|
| 3507 |
|
|---|
| 3508 | To modify default settings, select number above (e.g. 2)
|
|---|
| 3509 | EOM`
|
|---|
| 3510 |
|
|---|
| 3511 |
|
|---|
| 3512 | if test "X$g4system" != "XWIN32-VC" -a "X$g4system" != "XWIN32-VC7"; then
|
|---|
| 3513 | rp=$g4message_1$g4message_3
|
|---|
| 3514 | else
|
|---|
| 3515 | rp=$g4message_1$g4message_2$g4message_3
|
|---|
| 3516 | fi
|
|---|
| 3517 |
|
|---|
| 3518 | dflt="Press [Enter] for default settings"
|
|---|
| 3519 | #fn='d~'
|
|---|
| 3520 | . ./myread
|
|---|
| 3521 | gans=$ans
|
|---|
| 3522 |
|
|---|
| 3523 | case $gans in
|
|---|
| 3524 |
|
|---|
| 3525 | 1)
|
|---|
| 3526 | dflt=$g4clhep_include_dir
|
|---|
| 3527 | fn='d~'
|
|---|
| 3528 | rp="Where is CLHEP include directory?"
|
|---|
| 3529 | . ./getfile
|
|---|
| 3530 | g4clhep_include_dir=$ans
|
|---|
| 3531 | ;;
|
|---|
| 3532 | 2)
|
|---|
| 3533 | dflt=$g4clhep_lib_dir
|
|---|
| 3534 | fn='d~'
|
|---|
| 3535 | rp="Where is CLHEP lib directory?"
|
|---|
| 3536 | . ./getfile
|
|---|
| 3537 | g4clhep_lib_dir=$ans
|
|---|
| 3538 | ;;
|
|---|
| 3539 | 3)
|
|---|
| 3540 | dflt=$g4clhep_lib
|
|---|
| 3541 | rp="What is CLHEP lib title?"
|
|---|
| 3542 | . ./myread
|
|---|
| 3543 | g4clhep_lib=$ans
|
|---|
| 3544 | ;;
|
|---|
| 3545 | # [eE])
|
|---|
| 3546 | ## break
|
|---|
| 3547 | ## ;;
|
|---|
| 3548 | *)
|
|---|
| 3549 | # echo " "
|
|---|
| 3550 | break
|
|---|
| 3551 | ;;
|
|---|
| 3552 | esac
|
|---|
| 3553 | done
|
|---|
| 3554 |
|
|---|
| 3555 | #if test "X$g4clhep_base_dir" = "X/usr" -o "X$g4clhep_base_dir" = "X/usr/local"; then
|
|---|
| 3556 | #g4clhep_base_dir=""
|
|---|
| 3557 | #fi
|
|---|
| 3558 | #
|
|---|
| 3559 | #if test "X$g4clhep_include_dir" = "X/usr/include" -o "X$g4clhep_include_dir" = "X/usr/local/include"; then
|
|---|
| 3560 | #g4clhep_include_dir=""
|
|---|
| 3561 | #fi
|
|---|
| 3562 | #
|
|---|
| 3563 | #if test "X$g4clhep_lib_dir" = "X/usr/lib" -o "X$g4clhep_lib_dir" = "X/usr/local/lib"; then
|
|---|
| 3564 | #g4clhep_lib_dir=""
|
|---|
| 3565 | #fi
|
|---|
| 3566 |
|
|---|
| 3567 | echo " "
|
|---|
| 3568 |
|
|---|
| 3569 | case "$g4lib_build_shared" in
|
|---|
| 3570 | '')
|
|---|
| 3571 | g4lib_build_shared=n
|
|---|
| 3572 | ;;
|
|---|
| 3573 | esac
|
|---|
| 3574 |
|
|---|
| 3575 | echo " "
|
|---|
| 3576 |
|
|---|
| 3577 | case "$g4lib_build_static" in
|
|---|
| 3578 | '')
|
|---|
| 3579 | g4lib_build_static=n
|
|---|
| 3580 | ;;
|
|---|
| 3581 | esac
|
|---|
| 3582 |
|
|---|
| 3583 | echo " "
|
|---|
| 3584 |
|
|---|
| 3585 | case "$g4lib_use_shared" in
|
|---|
| 3586 | '')
|
|---|
| 3587 | g4lib_use_shared=n
|
|---|
| 3588 | ;;
|
|---|
| 3589 | esac
|
|---|
| 3590 |
|
|---|
| 3591 | echo " "
|
|---|
| 3592 |
|
|---|
| 3593 | case "$g4lib_use_static" in
|
|---|
| 3594 | '')
|
|---|
| 3595 | g4lib_use_static=n
|
|---|
| 3596 | ;;
|
|---|
| 3597 | esac
|
|---|
| 3598 |
|
|---|
| 3599 | case "$g4lib_build_dll" in
|
|---|
| 3600 | '')
|
|---|
| 3601 | g4lib_build_dll=n
|
|---|
| 3602 | ;;
|
|---|
| 3603 | esac
|
|---|
| 3604 |
|
|---|
| 3605 | case "$g4lib_build_dyn" in
|
|---|
| 3606 | '')
|
|---|
| 3607 | g4lib_build_dyn=n
|
|---|
| 3608 | ;;
|
|---|
| 3609 | esac
|
|---|
| 3610 |
|
|---|
| 3611 | #
|
|---|
| 3612 | # Ask about building of SHARED|STATIC libraries - default STATIC.
|
|---|
| 3613 | #
|
|---|
| 3614 | echo ""
|
|---|
| 3615 |
|
|---|
| 3616 | if test "X$g4system" = "XWIN32-VC" -o "X$g4system" = "XWIN32-VC7"; then
|
|---|
| 3617 |
|
|---|
| 3618 | while test 1 = 1 ; do
|
|---|
| 3619 |
|
|---|
| 3620 | g4message=`cat << EOM
|
|---|
| 3621 |
|
|---|
| 3622 | By default 'static' libraries are built.
|
|---|
| 3623 |
|
|---|
| 3624 | Do you want to build DLL (.dll) libraries?
|
|---|
| 3625 | EOM`
|
|---|
| 3626 |
|
|---|
| 3627 | dflt=$g4lib_build_dll
|
|---|
| 3628 | rp=$g4message
|
|---|
| 3629 | . ./myread
|
|---|
| 3630 | gans=$ans
|
|---|
| 3631 |
|
|---|
| 3632 | case $gans in
|
|---|
| 3633 |
|
|---|
| 3634 | n*|N*)
|
|---|
| 3635 | g4lib_build_dll=n
|
|---|
| 3636 | g4lib_build_shared=n
|
|---|
| 3637 | g4lib_build_static=y
|
|---|
| 3638 | break
|
|---|
| 3639 | ;;
|
|---|
| 3640 | y*|Y*)
|
|---|
| 3641 | g4lib_build_dll=y
|
|---|
| 3642 | g4lib_build_shared=n
|
|---|
| 3643 | g4lib_build_static=n
|
|---|
| 3644 |
|
|---|
| 3645 | # g4lib_build_static=""
|
|---|
| 3646 | # g4lib_use_shared=1
|
|---|
| 3647 | # g4lib_use_static=""
|
|---|
| 3648 | break
|
|---|
| 3649 | ;;
|
|---|
| 3650 | # [eE])
|
|---|
| 3651 | # break
|
|---|
| 3652 | # ;;
|
|---|
| 3653 | # *)
|
|---|
| 3654 | # echo " "
|
|---|
| 3655 | # break
|
|---|
| 3656 | # ;;
|
|---|
| 3657 | esac
|
|---|
| 3658 | done
|
|---|
| 3659 |
|
|---|
| 3660 | fi
|
|---|
| 3661 |
|
|---|
| 3662 | if test "X$g4system" != "XWIN32-VC" -a "X$g4system" != "XWIN32-VC7" ; then
|
|---|
| 3663 |
|
|---|
| 3664 | while test 1 = 1 ; do
|
|---|
| 3665 |
|
|---|
| 3666 | g4message=`cat << EOM
|
|---|
| 3667 |
|
|---|
| 3668 | By default 'static' (.a) libraries are built.
|
|---|
| 3669 |
|
|---|
| 3670 | Do you want to build 'shared' (.so) libraries?
|
|---|
| 3671 | EOM`
|
|---|
| 3672 |
|
|---|
| 3673 | dflt=$g4lib_build_shared
|
|---|
| 3674 | rp=$g4message
|
|---|
| 3675 | . ./myread
|
|---|
| 3676 | gans=$ans
|
|---|
| 3677 |
|
|---|
| 3678 | case $gans in
|
|---|
| 3679 |
|
|---|
| 3680 | n*|N*)
|
|---|
| 3681 | g4lib_build_shared=n
|
|---|
| 3682 | g4lib_build_static=y
|
|---|
| 3683 | break
|
|---|
| 3684 | ;;
|
|---|
| 3685 | y*|Y*)
|
|---|
| 3686 | g4lib_build_shared=y
|
|---|
| 3687 | # g4lib_build_static=""
|
|---|
| 3688 | # g4lib_use_shared=1
|
|---|
| 3689 | # g4lib_use_static=""
|
|---|
| 3690 | break
|
|---|
| 3691 | ;;
|
|---|
| 3692 | # [eE])
|
|---|
| 3693 | # break
|
|---|
| 3694 | # ;;
|
|---|
| 3695 | # *)
|
|---|
| 3696 | # echo " "
|
|---|
| 3697 | # break
|
|---|
| 3698 | # ;;
|
|---|
| 3699 | esac
|
|---|
| 3700 | done
|
|---|
| 3701 |
|
|---|
| 3702 | if [ X$g4lib_build_shared = Xy ] ; then
|
|---|
| 3703 | #
|
|---|
| 3704 | # Ask about g4lib_build_static - default "n".
|
|---|
| 3705 | #
|
|---|
| 3706 | echo ""
|
|---|
| 3707 |
|
|---|
| 3708 | while test 1 = 1 ; do
|
|---|
| 3709 |
|
|---|
| 3710 | g4message=`cat << EOM
|
|---|
| 3711 |
|
|---|
| 3712 | You selected to build 'shared' (.so) libraries.
|
|---|
| 3713 | Do you want to build 'static' (.a) libraries too?
|
|---|
| 3714 | EOM`
|
|---|
| 3715 |
|
|---|
| 3716 | #dflt=$g4lib_build_static
|
|---|
| 3717 | dflt=n
|
|---|
| 3718 | rp=$g4message
|
|---|
| 3719 | . ./myread
|
|---|
| 3720 | gans=$ans
|
|---|
| 3721 |
|
|---|
| 3722 | case $gans in
|
|---|
| 3723 |
|
|---|
| 3724 | n*|N*)
|
|---|
| 3725 | g4lib_build_static=n
|
|---|
| 3726 | break
|
|---|
| 3727 | ;;
|
|---|
| 3728 | y*|Y*)
|
|---|
| 3729 | # g4lib_build_shared=1
|
|---|
| 3730 | g4lib_build_static=y
|
|---|
| 3731 | # g4lib_use_shared=1
|
|---|
| 3732 | # g4lib_use_static=""
|
|---|
| 3733 | break
|
|---|
| 3734 | ;;
|
|---|
| 3735 | # [eE])
|
|---|
| 3736 | # break
|
|---|
| 3737 | # ;;
|
|---|
| 3738 | # *)
|
|---|
| 3739 | # echo " "
|
|---|
| 3740 | # break
|
|---|
| 3741 | # ;;
|
|---|
| 3742 | esac
|
|---|
| 3743 | done
|
|---|
| 3744 |
|
|---|
| 3745 | ## Comment out in waiting G4LIB_USE_STATIC and G4LIB_USE_SHARED.
|
|---|
| 3746 | #
|
|---|
| 3747 | #if [ X$g4lib_build_static = Xy ] ; then
|
|---|
| 3748 | ##
|
|---|
| 3749 | ## Ask about g4lib_use_static - default "n".
|
|---|
| 3750 | ##
|
|---|
| 3751 | #echo ""
|
|---|
| 3752 | #
|
|---|
| 3753 | #while test 1 = 1 ; do
|
|---|
| 3754 | #
|
|---|
| 3755 | #g4message=`cat << EOM
|
|---|
| 3756 | #
|
|---|
| 3757 | #You selected to build 'shared' (.so) and 'static' (.a) libraries.
|
|---|
| 3758 | #Do you want to use 'static' (.a) libraries?
|
|---|
| 3759 | #EOM`
|
|---|
| 3760 | #
|
|---|
| 3761 | #dflt=$g4lib_use_static
|
|---|
| 3762 | #rp=$g4message
|
|---|
| 3763 | #. ./myread
|
|---|
| 3764 | #gans=$ans
|
|---|
| 3765 | #
|
|---|
| 3766 | # case $gans in
|
|---|
| 3767 | #
|
|---|
| 3768 | # n*|N*)
|
|---|
| 3769 | # break
|
|---|
| 3770 | # ;;
|
|---|
| 3771 | # y*|Y*)
|
|---|
| 3772 | ## g4lib_build_shared=1
|
|---|
| 3773 | ## g4lib_build_static=1
|
|---|
| 3774 | ## g4lib_use_shared=1
|
|---|
| 3775 | # g4lib_use_static=y
|
|---|
| 3776 | # break
|
|---|
| 3777 | # ;;
|
|---|
| 3778 | ## [eE])
|
|---|
| 3779 | ## break
|
|---|
| 3780 | ## ;;
|
|---|
| 3781 | ## *)
|
|---|
| 3782 | ## echo " "
|
|---|
| 3783 | ## break
|
|---|
| 3784 | ## ;;
|
|---|
| 3785 | # esac
|
|---|
| 3786 | #done
|
|---|
| 3787 | #fi
|
|---|
| 3788 |
|
|---|
| 3789 | fi
|
|---|
| 3790 |
|
|---|
| 3791 | fi # if !Win
|
|---|
| 3792 |
|
|---|
| 3793 | echo " "
|
|---|
| 3794 | case "$g4global" in
|
|---|
| 3795 | '')
|
|---|
| 3796 | g4global=n
|
|---|
| 3797 | ;;
|
|---|
| 3798 | esac
|
|---|
| 3799 |
|
|---|
| 3800 | echo " "
|
|---|
| 3801 | # By default it's 'grabular'!
|
|---|
| 3802 | case "$g4granular" in
|
|---|
| 3803 | '')
|
|---|
| 3804 | g4granular=y
|
|---|
| 3805 | ;;
|
|---|
| 3806 | esac
|
|---|
| 3807 |
|
|---|
| 3808 | echo " "
|
|---|
| 3809 | # Will be set (if needed) in GNUmakefile!
|
|---|
| 3810 | case "$g4lib_use_granular" in
|
|---|
| 3811 | '')
|
|---|
| 3812 | g4lib_use_granular=y
|
|---|
| 3813 | ;;
|
|---|
| 3814 | esac
|
|---|
| 3815 |
|
|---|
| 3816 | 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
|
|---|
| 3817 |
|
|---|
| 3818 | g4global=n
|
|---|
| 3819 | g4granular=n
|
|---|
| 3820 | g4lib_use_granular=n
|
|---|
| 3821 |
|
|---|
| 3822 | fi
|
|---|
| 3823 |
|
|---|
| 3824 | 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
|
|---|
| 3825 |
|
|---|
| 3826 | #
|
|---|
| 3827 | # Ask about g4global - default "(empty)".
|
|---|
| 3828 | #
|
|---|
| 3829 | echo ""
|
|---|
| 3830 |
|
|---|
| 3831 | while test 1 = 1 ; do
|
|---|
| 3832 |
|
|---|
| 3833 | g4message=`cat << EOM
|
|---|
| 3834 |
|
|---|
| 3835 | Do you want to build 'global' compound libraries?
|
|---|
| 3836 | EOM`
|
|---|
| 3837 |
|
|---|
| 3838 | dflt=$g4global
|
|---|
| 3839 | rp=$g4message
|
|---|
| 3840 | . ./myread
|
|---|
| 3841 | gans=$ans
|
|---|
| 3842 |
|
|---|
| 3843 | case $gans in
|
|---|
| 3844 |
|
|---|
| 3845 | n*|N*)
|
|---|
| 3846 | g4global=n
|
|---|
| 3847 | g4granular=y
|
|---|
| 3848 | g4lib_use_granular=y
|
|---|
| 3849 | break
|
|---|
| 3850 | ;;
|
|---|
| 3851 | y*|Y*)
|
|---|
| 3852 | g4global=y
|
|---|
| 3853 | # Shoud be comment out to keep settings from config.sh - not now to keep as in release
|
|---|
| 3854 | g4granular=n
|
|---|
| 3855 | # Shoud be comment out to keep settings from config.sh - not now to keep as in release
|
|---|
| 3856 | g4lib_use_granular=n
|
|---|
| 3857 | break
|
|---|
| 3858 | ;;
|
|---|
| 3859 | # [eE])
|
|---|
| 3860 | # break
|
|---|
| 3861 | # ;;
|
|---|
| 3862 | # *)
|
|---|
| 3863 | # echo " "
|
|---|
| 3864 | # break
|
|---|
| 3865 | # ;;
|
|---|
| 3866 | esac
|
|---|
| 3867 | done
|
|---|
| 3868 |
|
|---|
| 3869 | if [ X$g4global = Xy ] ; then
|
|---|
| 3870 | #
|
|---|
| 3871 | # Ask about g4granular - default "n".
|
|---|
| 3872 | #
|
|---|
| 3873 | echo ""
|
|---|
| 3874 |
|
|---|
| 3875 | while test 1 = 1 ; do
|
|---|
| 3876 |
|
|---|
| 3877 | g4message=`cat << EOM
|
|---|
| 3878 |
|
|---|
| 3879 | Granular libraries are used by defaults, you asked to build global
|
|---|
| 3880 | compound libraries. Do you want to build 'granular' libraries too?
|
|---|
| 3881 | EOM`
|
|---|
| 3882 |
|
|---|
| 3883 | dflt=$g4granular
|
|---|
| 3884 | rp=$g4message
|
|---|
| 3885 | . ./myread
|
|---|
| 3886 | gans=$ans
|
|---|
| 3887 |
|
|---|
| 3888 | case $gans in
|
|---|
| 3889 |
|
|---|
| 3890 | n*|N*)
|
|---|
| 3891 | g4granular=n
|
|---|
| 3892 | break
|
|---|
| 3893 | ;;
|
|---|
| 3894 | y*|Y*)
|
|---|
| 3895 | g4granular=y
|
|---|
| 3896 | break
|
|---|
| 3897 | ;;
|
|---|
| 3898 | # [eE])
|
|---|
| 3899 | # break
|
|---|
| 3900 | # ;;
|
|---|
| 3901 | # *)
|
|---|
| 3902 | # echo " "
|
|---|
| 3903 | # break
|
|---|
| 3904 | # ;;
|
|---|
| 3905 | esac
|
|---|
| 3906 | done
|
|---|
| 3907 |
|
|---|
| 3908 | if [ X$g4granular = Xy ] ; then
|
|---|
| 3909 | #
|
|---|
| 3910 | # Ask about g4lib_use_granular - default "n".
|
|---|
| 3911 | #
|
|---|
| 3912 | echo ""
|
|---|
| 3913 |
|
|---|
| 3914 | while test 1 = 1 ; do
|
|---|
| 3915 |
|
|---|
| 3916 | g4message=`cat << EOM
|
|---|
| 3917 |
|
|---|
| 3918 | Global libraries are used by defaults, you asked to build global
|
|---|
| 3919 | compound libraries and granular libraries.
|
|---|
| 3920 | Do you want to use 'granular' libraries instead?
|
|---|
| 3921 | EOM`
|
|---|
| 3922 |
|
|---|
| 3923 | dflt=$g4lib_use_granular
|
|---|
| 3924 | rp=$g4message
|
|---|
| 3925 | . ./myread
|
|---|
| 3926 | gans=$ans
|
|---|
| 3927 |
|
|---|
| 3928 | case $gans in
|
|---|
| 3929 |
|
|---|
| 3930 | n*|N*)
|
|---|
| 3931 | g4lib_use_granular=n
|
|---|
| 3932 | break
|
|---|
| 3933 | ;;
|
|---|
| 3934 | y*|Y*)
|
|---|
| 3935 | g4lib_use_granular=y
|
|---|
| 3936 | break
|
|---|
| 3937 | ;;
|
|---|
| 3938 | # [eE])
|
|---|
| 3939 | # break
|
|---|
| 3940 | # ;;
|
|---|
| 3941 | # *)
|
|---|
| 3942 | # echo " "
|
|---|
| 3943 | # break
|
|---|
| 3944 | # ;;
|
|---|
| 3945 | esac
|
|---|
| 3946 | done
|
|---|
| 3947 | fi
|
|---|
| 3948 | fi
|
|---|
| 3949 |
|
|---|
| 3950 | fi # !Win
|
|---|
| 3951 |
|
|---|
| 3952 | ### End file - without will be problem! Check in others...
|
|---|
| 3953 |
|
|---|
| 3954 |
|
|---|
| 3955 | echo " "
|
|---|
| 3956 | case "$g4debug" in
|
|---|
| 3957 | '')
|
|---|
| 3958 | g4debug=n
|
|---|
| 3959 | ;;
|
|---|
| 3960 | esac
|
|---|
| 3961 |
|
|---|
| 3962 | #
|
|---|
| 3963 | # Ask about g4debug - default "(empty)".
|
|---|
| 3964 | #
|
|---|
| 3965 | echo ""
|
|---|
| 3966 |
|
|---|
| 3967 | while test 1 = 1 ; do
|
|---|
| 3968 |
|
|---|
| 3969 | g4message=`cat << EOM
|
|---|
| 3970 |
|
|---|
| 3971 | Do you want to compile libraries in DEBUG mode (-g)?
|
|---|
| 3972 | EOM`
|
|---|
| 3973 |
|
|---|
| 3974 | dflt=$g4debug
|
|---|
| 3975 | rp=$g4message
|
|---|
| 3976 | . ./myread
|
|---|
| 3977 | gans=$ans
|
|---|
| 3978 |
|
|---|
| 3979 | case $gans in
|
|---|
| 3980 |
|
|---|
| 3981 | n*|N*)
|
|---|
| 3982 | break
|
|---|
| 3983 | ;;
|
|---|
| 3984 | y*|Y*)
|
|---|
| 3985 | g4debug=y
|
|---|
| 3986 | break
|
|---|
| 3987 | ;;
|
|---|
| 3988 | # [eE])
|
|---|
| 3989 | # break
|
|---|
| 3990 | # ;;
|
|---|
| 3991 | # *)
|
|---|
| 3992 | # echo " "
|
|---|
| 3993 | # break
|
|---|
| 3994 | # ;;
|
|---|
| 3995 | esac
|
|---|
| 3996 | done
|
|---|
| 3997 |
|
|---|
| 3998 |
|
|---|
| 3999 | echo " "
|
|---|
| 4000 |
|
|---|
| 4001 | case "$g4ui_none" in
|
|---|
| 4002 | '')
|
|---|
| 4003 | g4ui_none=n
|
|---|
| 4004 | ;;
|
|---|
| 4005 | esac
|
|---|
| 4006 |
|
|---|
| 4007 | # Set by default!
|
|---|
| 4008 | case "$g4ui_build_terminal_session" in
|
|---|
| 4009 | '')
|
|---|
| 4010 | g4ui_build_terminal_session=y
|
|---|
| 4011 | ;;
|
|---|
| 4012 | esac
|
|---|
| 4013 |
|
|---|
| 4014 | # Set by default!
|
|---|
| 4015 | case "$g4ui_use_terminal" in
|
|---|
| 4016 | '')
|
|---|
| 4017 | g4ui_use_terminal=y
|
|---|
| 4018 | ;;
|
|---|
| 4019 | esac
|
|---|
| 4020 |
|
|---|
| 4021 | # Set by default!
|
|---|
| 4022 | case "$g4ui_build_gag_session" in
|
|---|
| 4023 | '')
|
|---|
| 4024 | g4ui_build_gag_session=y
|
|---|
| 4025 | ;;
|
|---|
| 4026 | esac
|
|---|
| 4027 |
|
|---|
| 4028 | # Set by default!
|
|---|
| 4029 | case "$g4ui_use_gag" in
|
|---|
| 4030 | '')
|
|---|
| 4031 | g4ui_use_gag=y
|
|---|
| 4032 | ;;
|
|---|
| 4033 | esac
|
|---|
| 4034 |
|
|---|
| 4035 | case "$g4ui_build_xm_session" in
|
|---|
| 4036 | '')
|
|---|
| 4037 | g4ui_build_xm_session=n
|
|---|
| 4038 | ;;
|
|---|
| 4039 | esac
|
|---|
| 4040 |
|
|---|
| 4041 | case "$g4ui_use_xm" in
|
|---|
| 4042 | '')
|
|---|
| 4043 | g4ui_use_xm=n
|
|---|
| 4044 | ;;
|
|---|
| 4045 | esac
|
|---|
| 4046 |
|
|---|
| 4047 | case "$g4ui_build_xaw_session" in
|
|---|
| 4048 | '')
|
|---|
| 4049 | g4ui_build_xaw_session=n
|
|---|
| 4050 | ;;
|
|---|
| 4051 | esac
|
|---|
| 4052 |
|
|---|
| 4053 | case "$g4ui_use_xaw" in
|
|---|
| 4054 | '')
|
|---|
| 4055 | g4ui_use_xaw=n
|
|---|
| 4056 | ;;
|
|---|
| 4057 | esac
|
|---|
| 4058 |
|
|---|
| 4059 | case "$g4ui_build_win32_session" in
|
|---|
| 4060 | '')
|
|---|
| 4061 | g4ui_build_win32_session=n
|
|---|
| 4062 | ;;
|
|---|
| 4063 | esac
|
|---|
| 4064 |
|
|---|
| 4065 | case "$g4ui_use_win32" in
|
|---|
| 4066 | '')
|
|---|
| 4067 | g4ui_use_win32=n
|
|---|
| 4068 | ;;
|
|---|
| 4069 | esac
|
|---|
| 4070 |
|
|---|
| 4071 | # Set by default!
|
|---|
| 4072 | case "$g4ui_use_tcsh" in
|
|---|
| 4073 | '')
|
|---|
| 4074 | g4ui_use_tcsh=y
|
|---|
| 4075 | ;;
|
|---|
| 4076 | esac
|
|---|
| 4077 |
|
|---|
| 4078 |
|
|---|
| 4079 |
|
|---|
| 4080 |
|
|---|
| 4081 | echo ""
|
|---|
| 4082 |
|
|---|
| 4083 | g4message=`cat << EOM
|
|---|
| 4084 |
|
|---|
| 4085 | G4UI_NONE
|
|---|
| 4086 |
|
|---|
| 4087 | If this variable is set, no UI sessions nor any UI libraries are built.
|
|---|
| 4088 | This can be useful when running a pure batch job or in a user framework
|
|---|
| 4089 | having its own UI system.
|
|---|
| 4090 | Do you want to set this variable ?
|
|---|
| 4091 |
|
|---|
| 4092 | EOM`
|
|---|
| 4093 |
|
|---|
| 4094 | dflt=$g4ui_none
|
|---|
| 4095 | rp=$g4message
|
|---|
| 4096 | . ./myread
|
|---|
| 4097 | gans=$ans
|
|---|
| 4098 |
|
|---|
| 4099 | case $gans in
|
|---|
| 4100 |
|
|---|
| 4101 | n*|N*)
|
|---|
| 4102 | g4ui_none=n
|
|---|
| 4103 | ;;
|
|---|
| 4104 | y*|Y*)
|
|---|
| 4105 | g4ui_none=y
|
|---|
| 4106 | ;;
|
|---|
| 4107 | esac
|
|---|
| 4108 |
|
|---|
| 4109 | case $g4ui_none in
|
|---|
| 4110 |
|
|---|
| 4111 | n)
|
|---|
| 4112 |
|
|---|
| 4113 | g4message=`cat << EOM
|
|---|
| 4114 |
|
|---|
| 4115 | G4UI_BUILD_TERMINAL_SESSION
|
|---|
| 4116 | Specifies to include in kernel library a basic dumb terminal
|
|---|
| 4117 | user interface (default).
|
|---|
| 4118 |
|
|---|
| 4119 | G4UI_USE_TERMINAL
|
|---|
| 4120 | Specifies to use dumb terminal interface in the application to be
|
|---|
| 4121 | built (default).
|
|---|
| 4122 | EOM`
|
|---|
| 4123 |
|
|---|
| 4124 | dflt=$g4ui_use_terminal
|
|---|
| 4125 | rp=$g4message
|
|---|
| 4126 | #. ./myread
|
|---|
| 4127 | #gans=$ans
|
|---|
| 4128 | gans=y
|
|---|
| 4129 |
|
|---|
| 4130 | case $gans in
|
|---|
| 4131 |
|
|---|
| 4132 | n*|N*)
|
|---|
| 4133 | g4ui_build_terminal_session=n
|
|---|
| 4134 | g4ui_use_terminal=n
|
|---|
| 4135 | ;;
|
|---|
| 4136 | y*|Y*)
|
|---|
| 4137 | g4ui_build_terminal_session=y
|
|---|
| 4138 | g4ui_use_terminal=y
|
|---|
| 4139 | ;;
|
|---|
| 4140 | esac
|
|---|
| 4141 |
|
|---|
| 4142 | g4message=`cat << EOM
|
|---|
| 4143 |
|
|---|
| 4144 | G4UI_BUILD_GAG_SESSION
|
|---|
| 4145 | Specifies to include in kernel library the GAG based
|
|---|
| 4146 | user interface.
|
|---|
| 4147 |
|
|---|
| 4148 | G4UI_USE_GAG
|
|---|
| 4149 | Specifies to use the GAG interface in the application to be
|
|---|
| 4150 | built.
|
|---|
| 4151 | EOM`
|
|---|
| 4152 |
|
|---|
| 4153 | dflt=$g4ui_use_gag
|
|---|
| 4154 | rp=$g4message
|
|---|
| 4155 | #. ./myread
|
|---|
| 4156 | #gans=$ans
|
|---|
| 4157 | gans=y
|
|---|
| 4158 |
|
|---|
| 4159 | case $gans in
|
|---|
| 4160 |
|
|---|
| 4161 | n*|N*)
|
|---|
| 4162 | g4ui_build_gag_session=n
|
|---|
| 4163 | g4ui_use_gag=n
|
|---|
| 4164 | ;;
|
|---|
| 4165 | y*|Y*)
|
|---|
| 4166 | g4ui_build_gag_session=y
|
|---|
| 4167 | g4ui_use_gag=y
|
|---|
| 4168 | ;;
|
|---|
| 4169 | esac
|
|---|
| 4170 |
|
|---|
| 4171 | if test "X$g4system" != "XWIN32-VC" -a "X$g4system" != "XWIN32-VC7"; then
|
|---|
| 4172 |
|
|---|
| 4173 | g4message=`cat << EOM
|
|---|
| 4174 |
|
|---|
| 4175 | G4UI_BUILD_XAW_SESSION
|
|---|
| 4176 | G4UI_USE_XAW
|
|---|
| 4177 |
|
|---|
| 4178 | Specifies to include and use the XAW interfaces in the
|
|---|
| 4179 | application to be built.
|
|---|
| 4180 | The XAW (X11 Athena Widget set) extensions are required to activate
|
|---|
| 4181 | and build this driver.
|
|---|
| 4182 | EOM`
|
|---|
| 4183 |
|
|---|
| 4184 | dflt=$g4ui_use_xaw
|
|---|
| 4185 | rp=$g4message
|
|---|
| 4186 | . ./myread
|
|---|
| 4187 | gans=$ans
|
|---|
| 4188 |
|
|---|
| 4189 | case $gans in
|
|---|
| 4190 |
|
|---|
| 4191 | n*|N*)
|
|---|
| 4192 | g4ui_build_xaw_session=n
|
|---|
| 4193 | g4ui_use_xaw=n
|
|---|
| 4194 | ;;
|
|---|
| 4195 | y*|Y*)
|
|---|
| 4196 | g4ui_build_xaw_session=y
|
|---|
| 4197 | g4ui_use_xaw=y
|
|---|
| 4198 | ;;
|
|---|
| 4199 | esac
|
|---|
| 4200 |
|
|---|
| 4201 | ############################################################
|
|---|
| 4202 | ############################################################
|
|---|
| 4203 |
|
|---|
| 4204 | if test "X$g4ui_build_xaw_session" = "Xy" ; then
|
|---|
| 4205 |
|
|---|
| 4206 | if test "X$g4ui_xawhome" = "X" ; then
|
|---|
| 4207 | xaw_dirs=`find $g4ui_xawhome /usr/X11R6/include /usr/local/include /usr/include /sw/include -type d -name Xaw 2>/dev/null |xargs echo`
|
|---|
| 4208 | #echo ogl_dirs=$ogl_dirs
|
|---|
| 4209 |
|
|---|
| 4210 | if test "X$xaw_dirs" != "X" ; then
|
|---|
| 4211 |
|
|---|
| 4212 | g4xaw_base_dir_found=`echo $xaw_dirs|cut -d" " -f1`
|
|---|
| 4213 | #echo g4ogl_base_dir_found=$g4ogl_base_dir_found
|
|---|
| 4214 |
|
|---|
| 4215 | # That's right: should be 3 times! (e.g./usr/local/lib/libGLU.so -> /usr/local)
|
|---|
| 4216 | g4xaw_base_dir_found=`dirname $g4xaw_base_dir_found`
|
|---|
| 4217 | g4xaw_base_dir_found=`dirname $g4xaw_base_dir_found`
|
|---|
| 4218 | g4xaw_base_dir_found=`dirname $g4xaw_base_dir_found`
|
|---|
| 4219 |
|
|---|
| 4220 | g4ui_xawhome=$g4xaw_base_dir_found
|
|---|
| 4221 | #else
|
|---|
| 4222 | #case "$g4ui_xawhome" in
|
|---|
| 4223 | #'')
|
|---|
| 4224 | # g4ui_xawhome=/usr/X11R6/
|
|---|
| 4225 | # ;;
|
|---|
| 4226 | #esac
|
|---|
| 4227 | fi
|
|---|
| 4228 | fi
|
|---|
| 4229 |
|
|---|
| 4230 | ##########################################################################
|
|---|
| 4231 |
|
|---|
| 4232 | #if test "X$g4ui_xawhome" != "X" ; then
|
|---|
| 4233 | #xaw_dirs=$g4ui_xawhome
|
|---|
| 4234 | #fi
|
|---|
| 4235 |
|
|---|
| 4236 | if test "X$g4ui_xawhome" != "X" ; then
|
|---|
| 4237 |
|
|---|
| 4238 | g4message=`cat << EOM
|
|---|
| 4239 |
|
|---|
| 4240 | You have selected to use the XAW based user interfaces.
|
|---|
| 4241 | Specify the correct path where XAW is installed in your system.
|
|---|
| 4242 | It was found in $g4ui_xawhome. Press [Enter] to set this path or type the correct one.
|
|---|
| 4243 |
|
|---|
| 4244 | You can set '-' (without quotation) to CANCEL the XAW flag at all:
|
|---|
| 4245 |
|
|---|
| 4246 | EOM`
|
|---|
| 4247 |
|
|---|
| 4248 | dflt=$g4ui_xawhome
|
|---|
| 4249 | fn='d~(-)'
|
|---|
| 4250 | rp=$g4message
|
|---|
| 4251 | . ./getfile
|
|---|
| 4252 |
|
|---|
| 4253 | cend="no"
|
|---|
| 4254 | while test "$cend" = "no" ; do
|
|---|
| 4255 | if test -e "$ans/include/X11/Xaw" || [ "X$ans" = "X-" ]; then
|
|---|
| 4256 | cend="yes"
|
|---|
| 4257 | if test "X$ans" != "X-" ; then
|
|---|
| 4258 |
|
|---|
| 4259 | g4ui_xawhome=$ans
|
|---|
| 4260 |
|
|---|
| 4261 | else
|
|---|
| 4262 |
|
|---|
| 4263 | g4ui_build_xaw_session=n
|
|---|
| 4264 | g4ui_use_xaw=n
|
|---|
| 4265 |
|
|---|
| 4266 | fi
|
|---|
| 4267 | else
|
|---|
| 4268 |
|
|---|
| 4269 | g4message=`cat << EOM
|
|---|
| 4270 |
|
|---|
| 4271 | You have selected to use XAW based user interfaces.
|
|---|
| 4272 | But XAW was not found in $ans.
|
|---|
| 4273 | Please specify the correct path where XAW is installed in your system.
|
|---|
| 4274 |
|
|---|
| 4275 | You can set '-' (without quotation) to CANCEL the XAW flag at all:
|
|---|
| 4276 |
|
|---|
| 4277 | EOM`
|
|---|
| 4278 |
|
|---|
| 4279 | dflt=""
|
|---|
| 4280 | fn='d~(-)'
|
|---|
| 4281 | rp=$g4message
|
|---|
| 4282 | . ./getfile
|
|---|
| 4283 | fi
|
|---|
| 4284 | done
|
|---|
| 4285 |
|
|---|
| 4286 | else
|
|---|
| 4287 |
|
|---|
| 4288 | g4message=`cat << EOM
|
|---|
| 4289 |
|
|---|
| 4290 | You have selected to use XAW based user interfaces.
|
|---|
| 4291 | But XAW was not found in expected place.
|
|---|
| 4292 | Please specify the correct path where XAW is installed in your system.
|
|---|
| 4293 |
|
|---|
| 4294 | You can set '-' (without quotation) to CANCEL the XAW flag at all:
|
|---|
| 4295 |
|
|---|
| 4296 | EOM`
|
|---|
| 4297 |
|
|---|
| 4298 | dflt=""
|
|---|
| 4299 | fn='d~(-)'
|
|---|
| 4300 | rp=$g4message
|
|---|
| 4301 | . ./getfile
|
|---|
| 4302 |
|
|---|
| 4303 | cend="no"
|
|---|
| 4304 | while test "$cend" = "no" ; do
|
|---|
| 4305 | if test -e "$ans/include/X11/Xaw" || [ "X$ans" = "X-" ]; then
|
|---|
| 4306 | cend="yes"
|
|---|
| 4307 | if test "X$ans" != "X-" ; then
|
|---|
| 4308 |
|
|---|
| 4309 | g4ui_xawhome=$ans
|
|---|
| 4310 |
|
|---|
| 4311 | else
|
|---|
| 4312 |
|
|---|
| 4313 | g4ui_build_xaw_session=n
|
|---|
| 4314 | g4ui_use_xaw=n
|
|---|
| 4315 |
|
|---|
| 4316 | fi
|
|---|
| 4317 | else
|
|---|
| 4318 |
|
|---|
| 4319 | g4message=`cat << EOM
|
|---|
| 4320 |
|
|---|
| 4321 | You have selected to use XAW based user interfaces.
|
|---|
| 4322 | But XAW was not found in $ans.
|
|---|
| 4323 | Please specify the correct path where XAW is installed in your system.
|
|---|
| 4324 |
|
|---|
| 4325 | You can set '-' (without quotation) to CANCEL the XAW flag at all:
|
|---|
| 4326 |
|
|---|
| 4327 | EOM`
|
|---|
| 4328 |
|
|---|
| 4329 | dflt=""
|
|---|
| 4330 | fn='d~(-)'
|
|---|
| 4331 | rp=$g4message
|
|---|
| 4332 | . ./getfile
|
|---|
| 4333 | fi
|
|---|
| 4334 | done
|
|---|
| 4335 | fi
|
|---|
| 4336 |
|
|---|
| 4337 | if test "X$g4osname" = "XLinux"; then
|
|---|
| 4338 |
|
|---|
| 4339 | if test "X$g4ui_xawhome" = "X/usr" -o "X$g4ui_xawhome" = "X/usr/local" ; then
|
|---|
| 4340 | g4ui_xawhome=""
|
|---|
| 4341 | fi
|
|---|
| 4342 | fi
|
|---|
| 4343 | fi # g4vis_build_opheglxm_driver
|
|---|
| 4344 |
|
|---|
| 4345 | ###############################################
|
|---|
| 4346 | # Set XMFLAGS and XMLIBS
|
|---|
| 4347 | #
|
|---|
| 4348 |
|
|---|
| 4349 | if test "X$g4ui_build_xaw_session" = "Xy" ; then
|
|---|
| 4350 |
|
|---|
| 4351 | if test "X$g4osname" = "XAIX" ; then
|
|---|
| 4352 | g4ui_xawflags=" -I$g4ui_xawhome/include "
|
|---|
| 4353 | g4ui_xawlibs=" -L$g4ui_xawhome/lib -lXaw -lXmu -lXt -lX11 -lXext "
|
|---|
| 4354 | fi
|
|---|
| 4355 |
|
|---|
| 4356 | if test "X$g4osname" = "XLinux" ; then
|
|---|
| 4357 | g4ui_xawflags=" -I$g4ui_xawhome/include "
|
|---|
| 4358 | if test "X$g4ui_xawhome" = "X/usr/X11R6" ; then
|
|---|
| 4359 | g4ui_xawlibs=" -lXaw "
|
|---|
| 4360 | else
|
|---|
| 4361 | g4ui_xawlibs=" -L$g4ui_xawhome/lib -lXaw "
|
|---|
| 4362 | fi
|
|---|
| 4363 | fi
|
|---|
| 4364 |
|
|---|
| 4365 | if test "X$g4osname" = "XDarwin" ; then
|
|---|
| 4366 | g4ui_xawflags=" -I$g4ui_xawhome/include "
|
|---|
| 4367 | g4ui_xawlibs=" -L$g4ui_xawhome/lib -lXaw "
|
|---|
| 4368 | fi
|
|---|
| 4369 |
|
|---|
| 4370 | if test "X$g4osname" = "XDEC" ; then
|
|---|
| 4371 | g4ui_xawflags=" -I$g4ui_xawhome/include "
|
|---|
| 4372 | g4ui_xawlibs=" -L$g4ui_xawhome/lib -lXaw "
|
|---|
| 4373 | fi
|
|---|
| 4374 |
|
|---|
| 4375 | if test "X$g4osname" = "XHP" ; then
|
|---|
| 4376 | g4ui_xawflags=" -I$g4ui_xawhome/include "
|
|---|
| 4377 | g4ui_xawlibs=" -L$g4ui_xawhome/lib -lXaw "
|
|---|
| 4378 | fi
|
|---|
| 4379 |
|
|---|
| 4380 | if test "X$g4osname" = "XSGI" ; then
|
|---|
| 4381 | g4ui_xawflags=" -I$g4ui_xawhome/include "
|
|---|
| 4382 | g4ui_xawlibs=" -L$g4ui_xawhome/lib -lXaw "
|
|---|
| 4383 | fi
|
|---|
| 4384 |
|
|---|
| 4385 | if test "X$g4osname" = "XSUN" ; then
|
|---|
| 4386 | g4ui_xawflags=" -I$g4ui_xawhome/include "
|
|---|
| 4387 | 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 "
|
|---|
| 4388 | fi
|
|---|
| 4389 |
|
|---|
| 4390 | fi # end of XM build
|
|---|
| 4391 |
|
|---|
| 4392 | ###############################################
|
|---|
| 4393 | ###############################################
|
|---|
| 4394 |
|
|---|
| 4395 | g4message=`cat << EOM
|
|---|
| 4396 |
|
|---|
| 4397 | G4UI_BUILD_XM_SESSION
|
|---|
| 4398 | G4UI_USE_XM
|
|---|
| 4399 |
|
|---|
| 4400 | Specifies to include and use the XM Motif based user interfaces.
|
|---|
| 4401 | The XM Motif extensions are required to activate and build this
|
|---|
| 4402 | driver.
|
|---|
| 4403 |
|
|---|
| 4404 | EOM`
|
|---|
| 4405 |
|
|---|
| 4406 | dflt=$g4ui_use_xm
|
|---|
| 4407 | rp=$g4message
|
|---|
| 4408 | . ./myread
|
|---|
| 4409 | gans=$ans
|
|---|
| 4410 |
|
|---|
| 4411 | case $gans in
|
|---|
| 4412 |
|
|---|
| 4413 | n*|N*)
|
|---|
| 4414 | g4ui_build_xm_session=n
|
|---|
| 4415 | g4ui_use_xm=n
|
|---|
| 4416 | ;;
|
|---|
| 4417 | y*|Y*)
|
|---|
| 4418 | g4ui_build_xm_session=y
|
|---|
| 4419 | g4ui_use_xm=y
|
|---|
| 4420 | ;;
|
|---|
| 4421 | esac
|
|---|
| 4422 |
|
|---|
| 4423 |
|
|---|
| 4424 | ############################################################
|
|---|
| 4425 | ############################################################
|
|---|
| 4426 |
|
|---|
| 4427 | if test "X$g4ui_build_xm_session" = "Xy" ; then
|
|---|
| 4428 |
|
|---|
| 4429 | if test "X$g4vis_xmhome" = "X" ; then
|
|---|
| 4430 | xm_dirs=`find $g4vis_xmhome /usr/X11R6/include /usr/local/include /usr/include /sw/include -type d -name Xm 2>/dev/null |xargs echo`
|
|---|
| 4431 | #echo ogl_dirs=$ogl_dirs
|
|---|
| 4432 |
|
|---|
| 4433 | if test "X$xm_dirs" != "X" ; then
|
|---|
| 4434 |
|
|---|
| 4435 | g4xm_base_dir_found=`echo $xm_dirs|cut -d" " -f1`
|
|---|
| 4436 | #echo g4ogl_base_dir_found=$g4ogl_base_dir_found
|
|---|
| 4437 |
|
|---|
| 4438 | # That's right: should be twice! (e.g./usr/local/lib/libGLU.so -> /usr/local)
|
|---|
| 4439 | g4xm_base_dir_found=`dirname $g4xm_base_dir_found`
|
|---|
| 4440 | g4xm_base_dir_found=`dirname $g4xm_base_dir_found`
|
|---|
| 4441 |
|
|---|
| 4442 | g4vis_xmhome=$g4xm_base_dir_found
|
|---|
| 4443 | #else
|
|---|
| 4444 | #case "$g4vis_xmhome" in
|
|---|
| 4445 | #'')
|
|---|
| 4446 | # g4vis_xmhome=/usr/X11R6/
|
|---|
| 4447 | # ;;
|
|---|
| 4448 | #esac
|
|---|
| 4449 | fi
|
|---|
| 4450 | fi
|
|---|
| 4451 |
|
|---|
| 4452 | ##########################################################################
|
|---|
| 4453 |
|
|---|
| 4454 | #if test "X$g4vis_xmhome" != "X" ; then
|
|---|
| 4455 | #xm_dirs=$g4vis_xmhome
|
|---|
| 4456 | #fi
|
|---|
| 4457 |
|
|---|
| 4458 | if test "X$g4vis_xmhome" != "X" ; then
|
|---|
| 4459 |
|
|---|
| 4460 | g4message=`cat << EOM
|
|---|
| 4461 |
|
|---|
| 4462 | You have selected to use the XM Motif based user interfaces.
|
|---|
| 4463 | Specify the correct path where Xm is installed in your system.
|
|---|
| 4464 | It was found in $g4vis_xmhome. Press [Enter] to set this path or type the correct one.
|
|---|
| 4465 |
|
|---|
| 4466 | You can set '-' (without quotation) to CANCEL the XM flag at all:
|
|---|
| 4467 |
|
|---|
| 4468 | EOM`
|
|---|
| 4469 |
|
|---|
| 4470 | dflt=$g4vis_xmhome
|
|---|
| 4471 | fn='d~(-)'
|
|---|
| 4472 | rp=$g4message
|
|---|
| 4473 | . ./getfile
|
|---|
| 4474 |
|
|---|
| 4475 | cend="no"
|
|---|
| 4476 | while test "$cend" = "no" ; do
|
|---|
| 4477 | if test -e "$ans/include/Xm" || [ "X$ans" = "X-" ]; then
|
|---|
| 4478 | cend="yes"
|
|---|
| 4479 | if test "X$ans" != "X-" ; then
|
|---|
| 4480 |
|
|---|
| 4481 | g4vis_xmhome=$ans
|
|---|
| 4482 |
|
|---|
| 4483 | else
|
|---|
| 4484 |
|
|---|
| 4485 | g4ui_build_xm_session=n
|
|---|
| 4486 | g4ui_use_xm=n
|
|---|
| 4487 |
|
|---|
| 4488 | fi
|
|---|
| 4489 | else
|
|---|
| 4490 |
|
|---|
| 4491 | g4message=`cat << EOM
|
|---|
| 4492 |
|
|---|
| 4493 | You have selected to use XM Motif based user interfaces.
|
|---|
| 4494 | But XM Motif was not found in $ans.
|
|---|
| 4495 | Please specify the correct path where Xm is installed in your system.
|
|---|
| 4496 |
|
|---|
| 4497 | You can set '-' (without quotation) to CANCEL the XM flag at all:
|
|---|
| 4498 |
|
|---|
| 4499 | EOM`
|
|---|
| 4500 |
|
|---|
| 4501 | dflt=""
|
|---|
| 4502 | fn='d~(-)'
|
|---|
| 4503 | rp=$g4message
|
|---|
| 4504 | . ./getfile
|
|---|
| 4505 | fi
|
|---|
| 4506 | done
|
|---|
| 4507 |
|
|---|
| 4508 | else
|
|---|
| 4509 |
|
|---|
| 4510 | g4message=`cat << EOM
|
|---|
| 4511 |
|
|---|
| 4512 | You have selected to use XM Motif based user interfaces.
|
|---|
| 4513 | But XM Motif was not found in expected place.
|
|---|
| 4514 | Please specify the correct path where Xm is installed in your system.
|
|---|
| 4515 |
|
|---|
| 4516 | You can set '-' (without quotation) to CANCEL the XM flag at all:
|
|---|
| 4517 |
|
|---|
| 4518 | EOM`
|
|---|
| 4519 |
|
|---|
| 4520 | dflt=""
|
|---|
| 4521 | fn='d~(-)'
|
|---|
| 4522 | rp=$g4message
|
|---|
| 4523 | . ./getfile
|
|---|
| 4524 |
|
|---|
| 4525 | cend="no"
|
|---|
| 4526 | while test "$cend" = "no" ; do
|
|---|
| 4527 | if test -e "$ans/include/Xm" || [ "X$ans" = "X-" ]; then
|
|---|
| 4528 | cend="yes"
|
|---|
| 4529 | if test "X$ans" != "X-" ; then
|
|---|
| 4530 |
|
|---|
| 4531 | g4vis_xmhome=$ans
|
|---|
| 4532 |
|
|---|
| 4533 | else
|
|---|
| 4534 |
|
|---|
| 4535 | g4ui_build_xm_session=n
|
|---|
| 4536 | g4ui_use_xm=n
|
|---|
| 4537 |
|
|---|
| 4538 | fi
|
|---|
| 4539 | else
|
|---|
| 4540 |
|
|---|
| 4541 | g4message=`cat << EOM
|
|---|
| 4542 |
|
|---|
| 4543 | You have selected to use XM Motif based user interfaces.
|
|---|
| 4544 | But XM Motif was not found in $ans.
|
|---|
| 4545 | Please specify the correct path where Xm is installed in your system.
|
|---|
| 4546 |
|
|---|
| 4547 | You can set '-' (without quotation) to CANCEL the XM flag at all:
|
|---|
| 4548 |
|
|---|
| 4549 | EOM`
|
|---|
| 4550 |
|
|---|
| 4551 | dflt=""
|
|---|
| 4552 | fn='d~(-)'
|
|---|
| 4553 | rp=$g4message
|
|---|
| 4554 | . ./getfile
|
|---|
| 4555 | fi
|
|---|
| 4556 | done
|
|---|
| 4557 | fi
|
|---|
| 4558 |
|
|---|
| 4559 | if test "X$g4osname" = "XLinux"; then
|
|---|
| 4560 |
|
|---|
| 4561 | if test "X$g4vis_xmhome" = "X/usr" -o "X$g4vis_xmhome" = "X/usr/local" ; then
|
|---|
| 4562 | g4vis_xmhome=""
|
|---|
| 4563 | fi
|
|---|
| 4564 | fi
|
|---|
| 4565 | fi # g4vis_build_opheglxm_driver
|
|---|
| 4566 |
|
|---|
| 4567 | ###############################################
|
|---|
| 4568 | # Set XMFLAGS and XMLIBS
|
|---|
| 4569 | #
|
|---|
| 4570 |
|
|---|
| 4571 | if test "X$g4ui_build_xm_session" = "Xy" ; then
|
|---|
| 4572 |
|
|---|
| 4573 | if test "X$g4osname" = "XAIX" ; then
|
|---|
| 4574 | g4vis_xmflags=" -I$g4vis_xmhome/include "
|
|---|
| 4575 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm -lXt -lX11 "
|
|---|
| 4576 | fi
|
|---|
| 4577 |
|
|---|
| 4578 | if test "X$g4osname" = "XLinux" ; then
|
|---|
| 4579 | g4vis_xmflags=" -I$g4vis_xmhome/include "
|
|---|
| 4580 | if test "X$g4vis_xmhome" = "X/usr/X11R6" ; then
|
|---|
| 4581 | g4vis_xmlibs=" -lXm -lXpm "
|
|---|
| 4582 | else
|
|---|
| 4583 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm -lXpm "
|
|---|
| 4584 | fi
|
|---|
| 4585 | fi
|
|---|
| 4586 |
|
|---|
| 4587 | if test "X$g4osname" = "XDarwin" ; then
|
|---|
| 4588 | g4vis_xmflags=" -I$g4vis_xmhome/include "
|
|---|
| 4589 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm -lXpm "
|
|---|
| 4590 | fi
|
|---|
| 4591 |
|
|---|
| 4592 | if test "X$g4osname" = "XDEC" ; then
|
|---|
| 4593 | g4vis_xmflags=" -I$g4vis_xmhome/include "
|
|---|
| 4594 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm "
|
|---|
| 4595 | fi
|
|---|
| 4596 |
|
|---|
| 4597 | if test "X$g4osname" = "XHP" ; then
|
|---|
| 4598 | g4vis_xmflags=" -I$g4vis_xmhome/include/Motif1.2 "
|
|---|
| 4599 | g4vis_xmlibs=" -L$g4vis_xmhome/lib/Motif1.2 -lXm "
|
|---|
| 4600 | fi
|
|---|
| 4601 |
|
|---|
| 4602 | if test "X$g4osname" = "XSGI" ; then
|
|---|
| 4603 | g4vis_xmflags=" -I$g4vis_xmhome/include "
|
|---|
| 4604 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm "
|
|---|
| 4605 | fi
|
|---|
| 4606 |
|
|---|
| 4607 | if test "X$g4osname" = "XSUN" ; then
|
|---|
| 4608 | g4vis_xmflags=" -I$g4vis_xmhome/include "
|
|---|
| 4609 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -L/usr/openwin/lib -L/usr/dt/lib -L/usr/ucblib -R/usr/openwin/lib -lXt -lXm -lX11 "
|
|---|
| 4610 | fi
|
|---|
| 4611 |
|
|---|
| 4612 | fi # end of XM build
|
|---|
| 4613 |
|
|---|
| 4614 | ###############################################
|
|---|
| 4615 | ###############################################
|
|---|
| 4616 |
|
|---|
| 4617 | fi # if !WIN
|
|---|
| 4618 |
|
|---|
| 4619 | if test "X$g4system" = "XWIN32-VC" -o "X$g4system" = "XWIN32-VC7"; then
|
|---|
| 4620 |
|
|---|
| 4621 | g4message=`cat << EOM
|
|---|
| 4622 |
|
|---|
| 4623 | G4UI_BUILD_WIN32_SESSION
|
|---|
| 4624 | G4UI_USE_WIN32
|
|---|
| 4625 |
|
|---|
| 4626 | Specifies to include and use the terminal interface for
|
|---|
| 4627 | Windows systems.
|
|---|
| 4628 |
|
|---|
| 4629 | EOM`
|
|---|
| 4630 |
|
|---|
| 4631 | dflt=$g4ui_use_win32
|
|---|
| 4632 | rp=$g4message
|
|---|
| 4633 | . ./myread
|
|---|
| 4634 | gans=$ans
|
|---|
| 4635 |
|
|---|
| 4636 | case $gans in
|
|---|
| 4637 |
|
|---|
| 4638 | n*|N*)
|
|---|
| 4639 | g4ui_build_win32_session=n
|
|---|
| 4640 | g4ui_use_win32=n
|
|---|
| 4641 | ;;
|
|---|
| 4642 | y*|Y*)
|
|---|
| 4643 | g4ui_build_win32_session=y
|
|---|
| 4644 | g4ui_use_win32=y
|
|---|
| 4645 | ;;
|
|---|
| 4646 | esac
|
|---|
| 4647 |
|
|---|
| 4648 | fi # if WIN
|
|---|
| 4649 |
|
|---|
| 4650 | g4message=`cat << EOM
|
|---|
| 4651 |
|
|---|
| 4652 | G4UI_USE_TCSH
|
|---|
| 4653 | Specifies to use the tcsh-style terminal in the application
|
|---|
| 4654 | to be built.
|
|---|
| 4655 | EOM`
|
|---|
| 4656 |
|
|---|
| 4657 | dflt=$g4ui_use_tcsh
|
|---|
| 4658 | rp=$g4message
|
|---|
| 4659 | #. ./myread
|
|---|
| 4660 | #gans=$ans
|
|---|
| 4661 | gans=y
|
|---|
| 4662 |
|
|---|
| 4663 | case $gans in
|
|---|
| 4664 |
|
|---|
| 4665 | n*|N*)
|
|---|
| 4666 | g4ui_use_tcsh=n
|
|---|
| 4667 | ;;
|
|---|
| 4668 | y*|Y*)
|
|---|
| 4669 | g4ui_use_tcsh=y
|
|---|
| 4670 | ;;
|
|---|
| 4671 | esac
|
|---|
| 4672 |
|
|---|
| 4673 | ;;
|
|---|
| 4674 | esac
|
|---|
| 4675 |
|
|---|
| 4676 | #
|
|---|
| 4677 | # BEGIN QT/QTUI PROBE
|
|---|
| 4678 | #
|
|---|
| 4679 |
|
|---|
| 4680 | # Checks applied for all systems ONLY IF g4ui_none HAS NOT BEEN SET TO y
|
|---|
| 4681 | if test "x$g4ui_none" = "xn" ; then
|
|---|
| 4682 | # Query the user to see if build of Qt UI module is needed
|
|---|
| 4683 | g4message=`cat <<EOM
|
|---|
| 4684 |
|
|---|
| 4685 | G4UI_BUILD_QT_SESSION
|
|---|
| 4686 | G4UI_USE_QT
|
|---|
| 4687 |
|
|---|
| 4688 | Setting these variables will enable the building of the G4 Qt based
|
|---|
| 4689 | user interface module and the use of this module in your applications
|
|---|
| 4690 | respectively.
|
|---|
| 4691 | The Qt3 or Qt4 headers, libraries and moc application are required to enable
|
|---|
| 4692 | the building of this module.
|
|---|
| 4693 | Do you want to enable build and use of this module?
|
|---|
| 4694 | EOM`
|
|---|
| 4695 |
|
|---|
| 4696 | # Read in the user response
|
|---|
| 4697 | dflt=$g4ui_build_qt_session
|
|---|
| 4698 | rp=$g4message
|
|---|
| 4699 | . ./myread
|
|---|
| 4700 | gans=$ans
|
|---|
| 4701 |
|
|---|
| 4702 | # Check response and take set variables as needed.
|
|---|
| 4703 | case $gans in
|
|---|
| 4704 | n*|N*)
|
|---|
| 4705 | g4ui_build_qt_session=n
|
|---|
| 4706 | g4ui_use_qt=n
|
|---|
| 4707 | ;;
|
|---|
| 4708 | y*|Y*)
|
|---|
| 4709 | g4ui_build_qt_session=y
|
|---|
| 4710 | g4ui_use_qt=y
|
|---|
| 4711 | ;;
|
|---|
| 4712 | esac
|
|---|
| 4713 |
|
|---|
| 4714 | ##########
|
|---|
| 4715 |
|
|---|
| 4716 | ##########
|
|---|
| 4717 | # Now, if user chose to build module, we need to check for a Qt
|
|---|
| 4718 | # installation
|
|---|
| 4719 | #
|
|---|
| 4720 | if test "x$g4ui_build_qt_session" = "xy" ; then
|
|---|
| 4721 | echo " "
|
|---|
| 4722 | # NB Have to supply arg to qt script, just blank in this case!
|
|---|
| 4723 | qt_search_dir=""
|
|---|
| 4724 | . ./qt
|
|---|
| 4725 |
|
|---|
| 4726 | # If we didn't find Qt automatically, then ask user if they know
|
|---|
| 4727 | # where it's installed...
|
|---|
| 4728 | if test "x$g4_havegoodqt" = "xno" ; then
|
|---|
| 4729 | promptend="no"
|
|---|
| 4730 | user_qthome="the standard locations"
|
|---|
| 4731 |
|
|---|
| 4732 | while test "x$promptend" = "xno" ; do
|
|---|
| 4733 | g4message=`cat << EOM
|
|---|
| 4734 |
|
|---|
| 4735 | Autodetection failed to locate Qt3 or Qt4 in $qthomeloc on your system.
|
|---|
| 4736 | Please enter the path to your Qt3 OR Qt4 install (i.e. if Qt4 is installed
|
|---|
| 4737 | in PATH/include/QT, PATH/include or PATH/include/qt4, enter PATH),
|
|---|
| 4738 | or type '-' to CANCEL the build of the Qt UI module.
|
|---|
| 4739 | Qt path:
|
|---|
| 4740 | EOM`
|
|---|
| 4741 | dflt=""
|
|---|
| 4742 | fn='d~(-)'
|
|---|
| 4743 | rp=$g4message
|
|---|
| 4744 | . ./getfile
|
|---|
| 4745 | user_qthome=$ans
|
|---|
| 4746 |
|
|---|
| 4747 | if test "x$user_qthome" = "x-" ; then
|
|---|
| 4748 | # Cancel build...
|
|---|
| 4749 | g4ui_build_qt_session=n
|
|---|
| 4750 | g4ui_use_qt=n
|
|---|
| 4751 | echo "configure: build/use of Qt UI module cancelled"
|
|---|
| 4752 | promptend=yes
|
|---|
| 4753 | else
|
|---|
| 4754 | # Check for installation in user directory
|
|---|
| 4755 | echo " "
|
|---|
| 4756 | qt_search_dir=$user_qthome
|
|---|
| 4757 | . ./qt
|
|---|
| 4758 |
|
|---|
| 4759 | if test "x$g4_havegoodqt" = "xyes" ; then
|
|---|
| 4760 | promptend=yes
|
|---|
| 4761 | fi
|
|---|
| 4762 | fi #END TEST user_qthome = -
|
|---|
| 4763 | done #END while promptend=no (for user input of Qt install)
|
|---|
| 4764 | fi #END TEST g4_havegoodqt = no (for user prompt)
|
|---|
| 4765 | fi #END TEST g4ui_build_qt_session (whether to build at all)
|
|---|
| 4766 | fi #END TEST g4ui_none = n
|
|---|
| 4767 |
|
|---|
| 4768 | echo " "
|
|---|
| 4769 | case "$g4vis_none" in
|
|---|
| 4770 | '')
|
|---|
| 4771 | g4vis_none=n
|
|---|
| 4772 | ;;
|
|---|
| 4773 | esac
|
|---|
| 4774 |
|
|---|
| 4775 |
|
|---|
| 4776 | case "$g4vis_build_openglwin32_driver" in
|
|---|
| 4777 | '')
|
|---|
| 4778 | g4vis_build_openglwin32_driver=n
|
|---|
| 4779 | ;;
|
|---|
| 4780 | esac
|
|---|
| 4781 |
|
|---|
| 4782 | case "$g4vis_use_openglwin32" in
|
|---|
| 4783 | '')
|
|---|
| 4784 | g4vis_use_openglwin32=n
|
|---|
| 4785 | ;;
|
|---|
| 4786 | esac
|
|---|
| 4787 |
|
|---|
| 4788 | case "$g4vis_build_oiwin32_driver" in
|
|---|
| 4789 | '')
|
|---|
| 4790 | g4vis_build_oiwin32_driver=n
|
|---|
| 4791 | ;;
|
|---|
| 4792 | esac
|
|---|
| 4793 |
|
|---|
| 4794 | case "$g4vis_use_oiwin32" in
|
|---|
| 4795 | '')
|
|---|
| 4796 | g4vis_use_oiwin32=n
|
|---|
| 4797 | ;;
|
|---|
| 4798 | esac
|
|---|
| 4799 |
|
|---|
| 4800 | case "$g4vis_build_dawn_driver" in
|
|---|
| 4801 | '')
|
|---|
| 4802 | g4vis_build_dawn_driver=n
|
|---|
| 4803 | ;;
|
|---|
| 4804 | esac
|
|---|
| 4805 |
|
|---|
| 4806 | case "$g4vis_use_dawn" in
|
|---|
| 4807 | '')
|
|---|
| 4808 | g4vis_use_dawn=n
|
|---|
| 4809 | ;;
|
|---|
| 4810 | esac
|
|---|
| 4811 |
|
|---|
| 4812 | # Set by default!
|
|---|
| 4813 | case "$g4vis_build_dawnfile_driver" in
|
|---|
| 4814 | '')
|
|---|
| 4815 | g4vis_build_dawnfile_driver=y
|
|---|
| 4816 | ;;
|
|---|
| 4817 | esac
|
|---|
| 4818 |
|
|---|
| 4819 | # Set by default!
|
|---|
| 4820 | case "$g4vis_use_dawnfile" in
|
|---|
| 4821 | '')
|
|---|
| 4822 | g4vis_use_dawnfile=y
|
|---|
| 4823 | ;;
|
|---|
| 4824 | esac
|
|---|
| 4825 |
|
|---|
| 4826 | case "$g4vis_build_openglx_driver" in
|
|---|
| 4827 | '')
|
|---|
| 4828 | g4vis_build_openglx_driver=n
|
|---|
| 4829 | ;;
|
|---|
| 4830 | esac
|
|---|
| 4831 |
|
|---|
| 4832 | case "$g4vis_use_openglx" in
|
|---|
| 4833 | '')
|
|---|
| 4834 | g4vis_use_openglx=n
|
|---|
| 4835 | ;;
|
|---|
| 4836 | esac
|
|---|
| 4837 |
|
|---|
| 4838 | case "$g4vis_build_openglxm_driver" in
|
|---|
| 4839 | '')
|
|---|
| 4840 | g4vis_build_openglxm_driver=n
|
|---|
| 4841 | ;;
|
|---|
| 4842 | esac
|
|---|
| 4843 |
|
|---|
| 4844 | case "$g4vis_use_openglxm" in
|
|---|
| 4845 | '')
|
|---|
| 4846 | g4vis_use_openglxm=n
|
|---|
| 4847 | ;;
|
|---|
| 4848 | esac
|
|---|
| 4849 |
|
|---|
| 4850 | case "$g4vis_build_oix_driver" in
|
|---|
| 4851 | '')
|
|---|
| 4852 | g4vis_build_oix_driver=n
|
|---|
| 4853 | ;;
|
|---|
| 4854 | esac
|
|---|
| 4855 |
|
|---|
| 4856 | case "$g4vis_use_oix" in
|
|---|
| 4857 | '')
|
|---|
| 4858 | g4vis_use_oix=n
|
|---|
| 4859 | ;;
|
|---|
| 4860 | esac
|
|---|
| 4861 |
|
|---|
| 4862 | case "$g4vis_build_raytracerx_driver" in
|
|---|
| 4863 | '')
|
|---|
| 4864 | g4vis_build_raytracerx_driver=n
|
|---|
| 4865 | ;;
|
|---|
| 4866 | esac
|
|---|
| 4867 |
|
|---|
| 4868 | case "$g4vis_use_raytracerx" in
|
|---|
| 4869 | '')
|
|---|
| 4870 | g4vis_use_raytracerx=n
|
|---|
| 4871 | ;;
|
|---|
| 4872 | esac
|
|---|
| 4873 |
|
|---|
| 4874 | # Set by default!
|
|---|
| 4875 | case "$g4vis_build_raytracer_driver" in
|
|---|
| 4876 | '')
|
|---|
| 4877 | g4vis_build_raytracer_driver=y
|
|---|
| 4878 | ;;
|
|---|
| 4879 | esac
|
|---|
| 4880 |
|
|---|
| 4881 | # Set by default!
|
|---|
| 4882 | case "$g4vis_use_raytracer" in
|
|---|
| 4883 | '')
|
|---|
| 4884 | g4vis_use_raytracer=y
|
|---|
| 4885 | ;;
|
|---|
| 4886 | esac
|
|---|
| 4887 |
|
|---|
| 4888 | case "$g4vis_build_vrml_driver" in
|
|---|
| 4889 | '')
|
|---|
| 4890 | g4vis_build_vrml_driver=n
|
|---|
| 4891 | ;;
|
|---|
| 4892 | esac
|
|---|
| 4893 |
|
|---|
| 4894 | case "$g4vis_use_vrml" in
|
|---|
| 4895 | '')
|
|---|
| 4896 | g4vis_use_vrml=n
|
|---|
| 4897 | ;;
|
|---|
| 4898 | esac
|
|---|
| 4899 |
|
|---|
| 4900 | # Set by default!
|
|---|
| 4901 | case "$g4vis_build_asciitree_driver" in
|
|---|
| 4902 | '')
|
|---|
| 4903 | g4vis_build_asciitree_driver=y
|
|---|
| 4904 | ;;
|
|---|
| 4905 | esac
|
|---|
| 4906 |
|
|---|
| 4907 | # Set by default!
|
|---|
| 4908 | case "$g4vis_use_asciitree" in
|
|---|
| 4909 | '')
|
|---|
| 4910 | g4vis_use_asciitree=y
|
|---|
| 4911 | ;;
|
|---|
| 4912 | esac
|
|---|
| 4913 |
|
|---|
| 4914 | # Set by default!
|
|---|
| 4915 | case "$g4vis_build_gagtree_driver" in
|
|---|
| 4916 | '')
|
|---|
| 4917 | g4vis_build_gagtree_driver=y
|
|---|
| 4918 | ;;
|
|---|
| 4919 | esac
|
|---|
| 4920 |
|
|---|
| 4921 | # Set by default!
|
|---|
| 4922 | case "$g4vis_use_gagtree" in
|
|---|
| 4923 | '')
|
|---|
| 4924 | g4vis_use_gagtree=y
|
|---|
| 4925 | ;;
|
|---|
| 4926 | esac
|
|---|
| 4927 |
|
|---|
| 4928 | echo ""
|
|---|
| 4929 |
|
|---|
| 4930 | g4message=`cat << EOM
|
|---|
| 4931 |
|
|---|
| 4932 | G4VIS_NONE
|
|---|
| 4933 |
|
|---|
| 4934 | If this variable is set, no visualization drivers will be built or used.
|
|---|
| 4935 | Do you want to set this variable ?
|
|---|
| 4936 |
|
|---|
| 4937 | EOM`
|
|---|
| 4938 |
|
|---|
| 4939 | dflt=$g4vis_none
|
|---|
| 4940 | rp=$g4message
|
|---|
| 4941 | . ./myread
|
|---|
| 4942 | gans=$ans
|
|---|
| 4943 |
|
|---|
| 4944 | case $gans in
|
|---|
| 4945 |
|
|---|
| 4946 | n*|N*)
|
|---|
| 4947 | g4vis_none=n
|
|---|
| 4948 | ;;
|
|---|
| 4949 | y*|Y*)
|
|---|
| 4950 | g4vis_none=y
|
|---|
| 4951 | ;;
|
|---|
| 4952 | esac
|
|---|
| 4953 |
|
|---|
| 4954 | case $g4vis_none in
|
|---|
| 4955 |
|
|---|
| 4956 | n)
|
|---|
| 4957 |
|
|---|
| 4958 | if test "X$g4system" != "XWIN32-VC" -a "X$g4system" != "XWIN32-VC7"; then
|
|---|
| 4959 |
|
|---|
| 4960 | g4message=`cat << EOM
|
|---|
| 4961 |
|
|---|
| 4962 | G4VIS_BUILD_OPENGLX_DRIVER
|
|---|
| 4963 | G4VIS_USE_OPENGLX
|
|---|
| 4964 |
|
|---|
| 4965 | It is an interface to the de facto standard 3D graphics library,
|
|---|
| 4966 | OpenGL. It is well suited for real-time fast visualization
|
|---|
| 4967 | and prototyping. The X11 version of the OpenGL libraries is
|
|---|
| 4968 | required.
|
|---|
| 4969 | EOM`
|
|---|
| 4970 |
|
|---|
| 4971 | dflt=$g4vis_use_openglx
|
|---|
| 4972 | rp=$g4message
|
|---|
| 4973 | . ./myread
|
|---|
| 4974 | gans=$ans
|
|---|
| 4975 |
|
|---|
| 4976 | case $gans in
|
|---|
| 4977 |
|
|---|
| 4978 | n*|N*)
|
|---|
| 4979 | g4vis_build_openglx_driver=n
|
|---|
| 4980 | g4vis_use_openglx=n
|
|---|
| 4981 | ;;
|
|---|
| 4982 | y*|Y*)
|
|---|
| 4983 | g4vis_build_openglx_driver=y
|
|---|
| 4984 | g4vis_use_openglx=y
|
|---|
| 4985 | ;;
|
|---|
| 4986 | esac
|
|---|
| 4987 |
|
|---|
| 4988 | #############################################3
|
|---|
| 4989 | g4message=`cat << EOM
|
|---|
| 4990 |
|
|---|
| 4991 | G4VIS_BUILD_OPENGLXM_DRIVER
|
|---|
| 4992 | G4VIS_USE_OPENGLXM
|
|---|
| 4993 |
|
|---|
| 4994 | It is an interface to the de facto standard 3D graphics library,
|
|---|
| 4995 | OpenGL. It is well suited for real-time fast visualization
|
|---|
| 4996 | and prototyping. The X11 version of the OpenGL libraries and
|
|---|
| 4997 | the Motif Xm extension is required.
|
|---|
| 4998 |
|
|---|
| 4999 | EOM`
|
|---|
| 5000 |
|
|---|
| 5001 | dflt=$g4vis_use_openglxm
|
|---|
| 5002 | rp=$g4message
|
|---|
| 5003 | . ./myread
|
|---|
| 5004 | gans=$ans
|
|---|
| 5005 |
|
|---|
| 5006 | case $gans in
|
|---|
| 5007 |
|
|---|
| 5008 | n*|N*)
|
|---|
| 5009 | g4vis_build_openglxm_driver=n
|
|---|
| 5010 | g4vis_use_openglxm=n
|
|---|
| 5011 | ;;
|
|---|
| 5012 | y*|Y*)
|
|---|
| 5013 | g4vis_build_openglxm_driver=y
|
|---|
| 5014 | g4vis_use_openglxm=y
|
|---|
| 5015 | ;;
|
|---|
| 5016 | esac
|
|---|
| 5017 |
|
|---|
| 5018 | ############################################################
|
|---|
| 5019 | #echo xm_dirs=$xm_dirs
|
|---|
| 5020 | #echo g4vis_xmhome=$g4vis_xmhome
|
|---|
| 5021 | #echo g4ui_build_xm_session=$g4ui_build_xm_session
|
|---|
| 5022 | #echo g4vis_build_openglxm_driver=$g4vis_build_openglxm_driver
|
|---|
| 5023 |
|
|---|
| 5024 | if test "X$g4ui_build_xm_session" = "Xn" ; then
|
|---|
| 5025 |
|
|---|
| 5026 | #echo PASS1
|
|---|
| 5027 |
|
|---|
| 5028 | if test "X$g4vis_build_openglxm_driver" = "Xy" ; then
|
|---|
| 5029 |
|
|---|
| 5030 | #echo PASS2
|
|---|
| 5031 |
|
|---|
| 5032 | if test "X$g4vis_xmhome" = "X" ; then
|
|---|
| 5033 | xm_dirs=`find $g4vis_xmhome /usr/X11R6/include /usr/local/include /usr/include /sw/include -type d -name Xm 2>/dev/null |xargs echo`
|
|---|
| 5034 | #echo ogl_dirs=$ogl_dirs
|
|---|
| 5035 |
|
|---|
| 5036 | if test "X$xm_dirs" != "X" ; then
|
|---|
| 5037 |
|
|---|
| 5038 | g4xm_base_dir_found=`echo $xm_dirs|cut -d" " -f1`
|
|---|
| 5039 | #echo g4ogl_base_dir_found=$g4ogl_base_dir_found
|
|---|
| 5040 |
|
|---|
| 5041 | # That's right: should be twice! (e.g./usr/local/lib/libGLU.so -> /usr/local)
|
|---|
| 5042 | g4xm_base_dir_found=`dirname $g4xm_base_dir_found`
|
|---|
| 5043 | g4xm_base_dir_found=`dirname $g4xm_base_dir_found`
|
|---|
| 5044 |
|
|---|
| 5045 | g4vis_xmhome=$g4xm_base_dir_found
|
|---|
| 5046 | #else
|
|---|
| 5047 | #case "$g4vis_xmhome" in
|
|---|
| 5048 | #'')
|
|---|
| 5049 | # g4vis_xmhome=/usr/X11R6/
|
|---|
| 5050 | # ;;
|
|---|
| 5051 | #esac
|
|---|
| 5052 | fi
|
|---|
| 5053 | fi
|
|---|
| 5054 |
|
|---|
| 5055 | ##########################################################################
|
|---|
| 5056 |
|
|---|
| 5057 | #if test "X$g4vis_xmhome" != "X" ; then
|
|---|
| 5058 | #xm_dirs=$g4vis_xmhome
|
|---|
| 5059 | #fi
|
|---|
| 5060 |
|
|---|
| 5061 | if test "X$g4vis_xmhome" != "X" ; then
|
|---|
| 5062 |
|
|---|
| 5063 | g4message=`cat << EOM
|
|---|
| 5064 |
|
|---|
| 5065 | You have selected to use OPENGLXM driver.
|
|---|
| 5066 | Specify the correct path where Xm is installed in your system.
|
|---|
| 5067 | It was found in $g4vis_xmhome. Press [Enter] to set this path or type the correct one.
|
|---|
| 5068 |
|
|---|
| 5069 | You can set '-' (without quotation) to CANCEL the XM flag at all:
|
|---|
| 5070 |
|
|---|
| 5071 | EOM`
|
|---|
| 5072 |
|
|---|
| 5073 | dflt=$g4vis_xmhome
|
|---|
| 5074 | fn='d~(-)'
|
|---|
| 5075 | rp=$g4message
|
|---|
| 5076 | . ./getfile
|
|---|
| 5077 |
|
|---|
| 5078 | cend="no"
|
|---|
| 5079 | while test "$cend" = "no" ; do
|
|---|
| 5080 | if test -e "$ans/include/Xm" || [ "X$ans" = "X-" ]; then
|
|---|
| 5081 | cend="yes"
|
|---|
| 5082 | if test "X$ans" != "X-" ; then
|
|---|
| 5083 |
|
|---|
| 5084 | g4vis_xmhome=$ans
|
|---|
| 5085 |
|
|---|
| 5086 | else
|
|---|
| 5087 |
|
|---|
| 5088 | g4vis_build_openglxm_driver=n
|
|---|
| 5089 | g4vis_use_openglxm=n
|
|---|
| 5090 |
|
|---|
| 5091 | fi
|
|---|
| 5092 | else
|
|---|
| 5093 |
|
|---|
| 5094 | g4message=`cat << EOM
|
|---|
| 5095 |
|
|---|
| 5096 | You have selected to use OPENGLXM driver.
|
|---|
| 5097 | But it was not found in $ans.
|
|---|
| 5098 | Please specify the correct path where Xm is installed in your system.
|
|---|
| 5099 |
|
|---|
| 5100 | You can set '-' (without quotation) to CANCEL the XM flag at all:
|
|---|
| 5101 |
|
|---|
| 5102 | EOM`
|
|---|
| 5103 |
|
|---|
| 5104 | dflt=""
|
|---|
| 5105 | fn='d~(-)'
|
|---|
| 5106 | rp=$g4message
|
|---|
| 5107 | . ./getfile
|
|---|
| 5108 | fi
|
|---|
| 5109 | done
|
|---|
| 5110 |
|
|---|
| 5111 | else
|
|---|
| 5112 |
|
|---|
| 5113 | g4message=`cat << EOM
|
|---|
| 5114 |
|
|---|
| 5115 | You have selected to use OPENGLXM driver.
|
|---|
| 5116 | But it was not found in expected place.
|
|---|
| 5117 | Please specify the correct path where Xm is installed in your system.
|
|---|
| 5118 |
|
|---|
| 5119 | You can set '-' (without quotation) to CANCEL the XM flag at all:
|
|---|
| 5120 |
|
|---|
| 5121 | EOM`
|
|---|
| 5122 |
|
|---|
| 5123 | dflt=""
|
|---|
| 5124 | fn='d~(-)'
|
|---|
| 5125 | rp=$g4message
|
|---|
| 5126 | . ./getfile
|
|---|
| 5127 |
|
|---|
| 5128 | cend="no"
|
|---|
| 5129 | while test "$cend" = "no" ; do
|
|---|
| 5130 | if test -e "$ans/include/Xm" || [ "X$ans" = "X-" ]; then
|
|---|
| 5131 | cend="yes"
|
|---|
| 5132 | if test "X$ans" != "X-" ; then
|
|---|
| 5133 |
|
|---|
| 5134 | g4vis_xmhome=$ans
|
|---|
| 5135 |
|
|---|
| 5136 | else
|
|---|
| 5137 |
|
|---|
| 5138 | g4vis_build_openglxm_driver=n
|
|---|
| 5139 | g4vis_use_openglxm=n
|
|---|
| 5140 |
|
|---|
| 5141 | fi
|
|---|
| 5142 | else
|
|---|
| 5143 |
|
|---|
| 5144 | g4message=`cat << EOM
|
|---|
| 5145 |
|
|---|
| 5146 | You have selected to use OPENGLXM driver.
|
|---|
| 5147 | But it was not found in $ans.
|
|---|
| 5148 | Please specify the correct path where Xm is installed in your system.
|
|---|
| 5149 |
|
|---|
| 5150 | You can set '-' (without quotation) to CANCEL the XM flag at all:
|
|---|
| 5151 |
|
|---|
| 5152 | EOM`
|
|---|
| 5153 |
|
|---|
| 5154 | dflt=""
|
|---|
| 5155 | fn='d~(-)'
|
|---|
| 5156 | rp=$g4message
|
|---|
| 5157 | . ./getfile
|
|---|
| 5158 | fi
|
|---|
| 5159 | done
|
|---|
| 5160 | fi
|
|---|
| 5161 |
|
|---|
| 5162 | if test "X$g4osname" = "XLinux"; then
|
|---|
| 5163 |
|
|---|
| 5164 | if test "X$g4vis_xmhome" = "X/usr" -o "X$g4vis_xmhome" = "X/usr/local" ; then
|
|---|
| 5165 | g4vis_xmhome=""
|
|---|
| 5166 | fi
|
|---|
| 5167 | fi
|
|---|
| 5168 | fi # g4vis_build_opheglxm_driver
|
|---|
| 5169 |
|
|---|
| 5170 | ###############################################
|
|---|
| 5171 | # Set XMFLAGS and XMLIBS
|
|---|
| 5172 | #
|
|---|
| 5173 |
|
|---|
| 5174 | if test "X$g4vis_build_openglxm_driver" = "Xy" ; then
|
|---|
| 5175 |
|
|---|
| 5176 | if test "X$g4osname" = "XAIX" ; then
|
|---|
| 5177 | g4vis_xmflags=" -I$g4vis_xmhome/include "
|
|---|
| 5178 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm -lXt -lX11 "
|
|---|
| 5179 | fi
|
|---|
| 5180 |
|
|---|
| 5181 | if test "X$g4osname" = "XLinux" ; then
|
|---|
| 5182 | g4vis_xmflags=" -I$g4vis_xmhome/include "
|
|---|
| 5183 | if test "X$g4vis_xmhome" = "X/usr/X11R6" ; then
|
|---|
| 5184 | g4vis_xmlibs=" -lXm -lXpm "
|
|---|
| 5185 | else
|
|---|
| 5186 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm -lXpm "
|
|---|
| 5187 | fi
|
|---|
| 5188 | fi
|
|---|
| 5189 |
|
|---|
| 5190 | if test "X$g4osname" = "XDarwin" ; then
|
|---|
| 5191 | g4vis_xmflags=" -I$g4vis_xmhome/include "
|
|---|
| 5192 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm -lXpm "
|
|---|
| 5193 | fi
|
|---|
| 5194 |
|
|---|
| 5195 | if test "X$g4osname" = "XDEC" ; then
|
|---|
| 5196 | g4vis_xmflags=" -I$g4vis_xmhome/include "
|
|---|
| 5197 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm "
|
|---|
| 5198 | fi
|
|---|
| 5199 |
|
|---|
| 5200 | if test "X$g4osname" = "XHP" ; then
|
|---|
| 5201 | g4vis_xmflags=" -I$g4vis_xmhome/include/Motif1.2 "
|
|---|
| 5202 | g4vis_xmlibs=" -L$g4vis_xmhome/lib/Motif1.2 -lXm "
|
|---|
| 5203 | fi
|
|---|
| 5204 |
|
|---|
| 5205 | if test "X$g4osname" = "XSGI" ; then
|
|---|
| 5206 | g4vis_xmflags=" -I$g4vis_xmhome/include "
|
|---|
| 5207 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm "
|
|---|
| 5208 | fi
|
|---|
| 5209 |
|
|---|
| 5210 | if test "X$g4osname" = "XSUN" ; then
|
|---|
| 5211 | g4vis_xmflags=" -I$g4vis_xmhome/include "
|
|---|
| 5212 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -L/usr/openwin/lib -L/usr/dt/lib -L/usr/ucblib -R/usr/openwin/lib -lXt -lXm -lX11 "
|
|---|
| 5213 | fi
|
|---|
| 5214 |
|
|---|
| 5215 | fi # end of XM build
|
|---|
| 5216 | fi
|
|---|
| 5217 | ###############################################
|
|---|
| 5218 |
|
|---|
| 5219 | fi # if !WIN
|
|---|
| 5220 |
|
|---|
| 5221 | ######################################################################
|
|---|
| 5222 | if test "X$g4system" = "XWIN32-VC" -o "X$g4system" = "XWIN32-VC7"; then
|
|---|
| 5223 |
|
|---|
| 5224 | g4message=`cat << EOM
|
|---|
| 5225 |
|
|---|
| 5226 | G4VIS_BUILD_OPENGLWIN32_DRIVER
|
|---|
| 5227 | G4VIS_USE_OPENGLWIN32
|
|---|
| 5228 |
|
|---|
| 5229 | It is an interface to the de facto standard 3D graphics library,
|
|---|
| 5230 | OpenGL. It is well suited for real-time fast visualization
|
|---|
| 5231 | and prototyping. The Windows version of the OpenGL libraries is
|
|---|
| 5232 | required.
|
|---|
| 5233 |
|
|---|
| 5234 | EOM`
|
|---|
| 5235 |
|
|---|
| 5236 | dflt=$g4vis_use_openglwin32
|
|---|
| 5237 | rp=$g4message
|
|---|
| 5238 | . ./myread
|
|---|
| 5239 | gans=$ans
|
|---|
| 5240 |
|
|---|
| 5241 | case $gans in
|
|---|
| 5242 |
|
|---|
| 5243 | n*|N*)
|
|---|
| 5244 | g4vis_build_openglwin32_driver=n
|
|---|
| 5245 | g4vis_use_openglwin32=n
|
|---|
| 5246 | ;;
|
|---|
| 5247 | y*|Y*)
|
|---|
| 5248 | g4vis_build_openglwin32_driver=y
|
|---|
| 5249 | g4vis_use_openglwin32=y
|
|---|
| 5250 | ;;
|
|---|
| 5251 | esac
|
|---|
| 5252 |
|
|---|
| 5253 | fi # if WIN
|
|---|
| 5254 | ###########################################
|
|---|
| 5255 |
|
|---|
| 5256 | if test "X$g4system" != "XWIN32-VC" -a "X$g4system" != "XWIN32-VC7"; then
|
|---|
| 5257 |
|
|---|
| 5258 | g4message=`cat << EOM
|
|---|
| 5259 |
|
|---|
| 5260 | G4VIS_BUILD_DAWN_DRIVER
|
|---|
| 5261 | G4VIS_USE_DAWN
|
|---|
| 5262 |
|
|---|
| 5263 | DAWN drivers are interfaces to the Fukui Renderer DAWN. DAWN is
|
|---|
| 5264 | a vectorized 3D PostScript processor suited to prepare technical
|
|---|
| 5265 | high quality outputs for presentation and/or documentation.
|
|---|
| 5266 |
|
|---|
| 5267 | EOM`
|
|---|
| 5268 |
|
|---|
| 5269 | dflt=$g4vis_use_dawn
|
|---|
| 5270 | rp=$g4message
|
|---|
| 5271 | . ./myread
|
|---|
| 5272 | gans=$ans
|
|---|
| 5273 |
|
|---|
| 5274 | case $gans in
|
|---|
| 5275 |
|
|---|
| 5276 | n*|N*)
|
|---|
| 5277 | g4vis_build_dawn_driver=n
|
|---|
| 5278 | g4vis_use_dawn=n
|
|---|
| 5279 | ;;
|
|---|
| 5280 | y*|Y*)
|
|---|
| 5281 | g4vis_build_dawn_driver=y
|
|---|
| 5282 | g4vis_use_dawn=y
|
|---|
| 5283 | ;;
|
|---|
| 5284 | esac
|
|---|
| 5285 |
|
|---|
| 5286 |
|
|---|
| 5287 | #######################################
|
|---|
| 5288 | g4message=`cat << EOM
|
|---|
| 5289 |
|
|---|
| 5290 | G4VIS_BUILD_OIX_DRIVER
|
|---|
| 5291 | G4VIS_USE_OIX
|
|---|
| 5292 |
|
|---|
| 5293 | The OpenInventor driver is based on OpenInventor technology
|
|---|
| 5294 | for scientific visualization.
|
|---|
| 5295 | The X11 version of OpenInventor is required.
|
|---|
| 5296 |
|
|---|
| 5297 | EOM`
|
|---|
| 5298 |
|
|---|
| 5299 | dflt=$g4vis_use_oix
|
|---|
| 5300 | rp=$g4message
|
|---|
| 5301 | . ./myread
|
|---|
| 5302 | gans=$ans
|
|---|
| 5303 |
|
|---|
| 5304 | case $gans in
|
|---|
| 5305 |
|
|---|
| 5306 | n*|N*)
|
|---|
| 5307 | g4vis_build_oix_driver=n
|
|---|
| 5308 | g4vis_use_oix=n
|
|---|
| 5309 | ;;
|
|---|
| 5310 | y*|Y*)
|
|---|
| 5311 | g4vis_build_oix_driver=y
|
|---|
| 5312 | g4vis_use_oix=y
|
|---|
| 5313 | ;;
|
|---|
| 5314 | esac
|
|---|
| 5315 |
|
|---|
| 5316 | ############################################################
|
|---|
| 5317 | if test "X$g4vis_build_oix_driver" = "Xy" ; then
|
|---|
| 5318 |
|
|---|
| 5319 | oiv_dirs=`find $g4vis_oivhome /usr/X11R6/include /usr/local/include /usr/include -type d -name Inventor 2>/dev/null|xargs echo`
|
|---|
| 5320 | #echo ogl_dirs=$ogl_dirs
|
|---|
| 5321 |
|
|---|
| 5322 | if test "X$oiv_dirs" != "X" ; then
|
|---|
| 5323 |
|
|---|
| 5324 | g4oiv_base_dir_found=`echo $oiv_dirs|cut -d" " -f1`
|
|---|
| 5325 | #echo g4ogl_base_dir_found=$g4ogl_base_dir_found
|
|---|
| 5326 |
|
|---|
| 5327 | # That's right: should be twice! (e.g./usr/local/lib/libGLU.so -> /usr/local)
|
|---|
| 5328 | g4oiv_base_dir_found=`dirname $g4oiv_base_dir_found`
|
|---|
| 5329 | g4oiv_base_dir_found=`dirname $g4oiv_base_dir_found`
|
|---|
| 5330 |
|
|---|
| 5331 | g4vis_oivhome=$g4oiv_base_dir_found
|
|---|
| 5332 | #else
|
|---|
| 5333 | #case "$g4vis_oivhome" in
|
|---|
| 5334 | #'')
|
|---|
| 5335 | # g4vis_oivhome=/usr
|
|---|
| 5336 | # ;;
|
|---|
| 5337 | #esac
|
|---|
| 5338 | fi
|
|---|
| 5339 |
|
|---|
| 5340 | ##########################################################################
|
|---|
| 5341 |
|
|---|
| 5342 | #if test "X$g4vis_oivhome" != "X" ; then
|
|---|
| 5343 | #oiv_dirs=$g4vis_oivhome
|
|---|
| 5344 | #fi
|
|---|
| 5345 |
|
|---|
| 5346 | if test "X$g4vis_oivhome" != "X" ; then
|
|---|
| 5347 |
|
|---|
| 5348 | g4message=`cat << EOM
|
|---|
| 5349 |
|
|---|
| 5350 | OIVHOME/include
|
|---|
| 5351 | OIVHOME/lib
|
|---|
| 5352 |
|
|---|
| 5353 | You have selected to use OpenInventor driver.
|
|---|
| 5354 | Specify the correct path (OIVHOME) where OpenInventor is installed in your system.
|
|---|
| 5355 | It was found in $g4vis_oivhome. Press [Enter] to set this path or type the correct one.
|
|---|
| 5356 |
|
|---|
| 5357 | You can set '-' (without quotation) to CANCEL the OpenInventor flag at all:
|
|---|
| 5358 |
|
|---|
| 5359 | EOM`
|
|---|
| 5360 |
|
|---|
| 5361 | dflt=$g4vis_oivhome
|
|---|
| 5362 | fn='d~(-)'
|
|---|
| 5363 | rp=$g4message
|
|---|
| 5364 | . ./getfile
|
|---|
| 5365 |
|
|---|
| 5366 | cend="no"
|
|---|
| 5367 | while test "$cend" = "no" ; do
|
|---|
| 5368 | if test -e "$ans/include/Inventor" || [ "X$ans" = "X-" ]; then
|
|---|
| 5369 | cend="yes"
|
|---|
| 5370 | if test "X$ans" != "X-" ; then
|
|---|
| 5371 |
|
|---|
| 5372 | g4vis_oivhome=$ans
|
|---|
| 5373 |
|
|---|
| 5374 | else
|
|---|
| 5375 |
|
|---|
| 5376 | g4vis_build_oix_driver=n
|
|---|
| 5377 | g4vis_use_oix=n
|
|---|
| 5378 |
|
|---|
| 5379 | fi
|
|---|
| 5380 | else
|
|---|
| 5381 |
|
|---|
| 5382 | g4message=`cat << EOM
|
|---|
| 5383 |
|
|---|
| 5384 | OIVHOME/include
|
|---|
| 5385 | OIVHOME/lib
|
|---|
| 5386 |
|
|---|
| 5387 | You have selected to use OpenInventor driver.
|
|---|
| 5388 | But it was not found in $ans.
|
|---|
| 5389 | Please specify the correct path where OpenInventor is installed in your system.
|
|---|
| 5390 |
|
|---|
| 5391 | You can set '-' (without quotation) to CANCEL the OpenInventor flag at all:
|
|---|
| 5392 |
|
|---|
| 5393 | EOM`
|
|---|
| 5394 |
|
|---|
| 5395 | dflt=""
|
|---|
| 5396 | fn='d~(-)'
|
|---|
| 5397 | rp=$g4message
|
|---|
| 5398 | . ./getfile
|
|---|
| 5399 | fi
|
|---|
| 5400 | done
|
|---|
| 5401 |
|
|---|
| 5402 | else
|
|---|
| 5403 |
|
|---|
| 5404 | g4message=`cat << EOM
|
|---|
| 5405 |
|
|---|
| 5406 | OIVHOME/include
|
|---|
| 5407 | OIVHOME/lib
|
|---|
| 5408 |
|
|---|
| 5409 | You have selected to use OpenInventor driver.
|
|---|
| 5410 | But it was not found in expected place.
|
|---|
| 5411 | Please specify the correct path where OpenInventor is installed in your system.
|
|---|
| 5412 |
|
|---|
| 5413 | You can set '-' (without quotation) to CANCEL the OpenInventor flag at all:
|
|---|
| 5414 |
|
|---|
| 5415 | EOM`
|
|---|
| 5416 |
|
|---|
| 5417 | dflt=""
|
|---|
| 5418 | fn='d~(-)'
|
|---|
| 5419 | rp=$g4message
|
|---|
| 5420 | . ./getfile
|
|---|
| 5421 |
|
|---|
| 5422 | cend="no"
|
|---|
| 5423 | while test "$cend" = "no" ; do
|
|---|
| 5424 | if test -e "$ans/include/Inventor" || [ "X$ans" = "X-" ]; then
|
|---|
| 5425 | cend="yes"
|
|---|
| 5426 | if test "X$ans" != "X-" ; then
|
|---|
| 5427 |
|
|---|
| 5428 | g4vis_oivhome=$ans
|
|---|
| 5429 |
|
|---|
| 5430 | else
|
|---|
| 5431 |
|
|---|
| 5432 | g4vis_build_oix_driver=n
|
|---|
| 5433 | g4vis_use_oix=n
|
|---|
| 5434 |
|
|---|
| 5435 | fi
|
|---|
| 5436 | else
|
|---|
| 5437 |
|
|---|
| 5438 | g4message=`cat << EOM
|
|---|
| 5439 |
|
|---|
| 5440 | OIVHOME/include
|
|---|
| 5441 | OIVHOME/lib
|
|---|
| 5442 |
|
|---|
| 5443 | You have selected to use OpenInventor driver.
|
|---|
| 5444 | But it was not found in $ans.
|
|---|
| 5445 | Please specify the correct path where OpenInventor is installed in your system.
|
|---|
| 5446 |
|
|---|
| 5447 | You can set '-' (without quotation) to CANCEL the OpenInventor flag at all:
|
|---|
| 5448 |
|
|---|
| 5449 | EOM`
|
|---|
| 5450 |
|
|---|
| 5451 | dflt=""
|
|---|
| 5452 | fn='d~(-)'
|
|---|
| 5453 | rp=$g4message
|
|---|
| 5454 | . ./getfile
|
|---|
| 5455 | fi
|
|---|
| 5456 | done
|
|---|
| 5457 | fi
|
|---|
| 5458 |
|
|---|
| 5459 | if test "X$g4osname" = "XLinux"; then
|
|---|
| 5460 |
|
|---|
| 5461 | if test "X$g4vis_oivhome" = "X/usr" -o "X$g4vis_oivhome" = "X/usr/local"; then
|
|---|
| 5462 | g4vis_oivhome=""
|
|---|
| 5463 | fi
|
|---|
| 5464 | fi
|
|---|
| 5465 | fi # g4vis_build_oix_driver
|
|---|
| 5466 |
|
|---|
| 5467 | ###############################################
|
|---|
| 5468 |
|
|---|
| 5469 | g4message=`cat << EOM
|
|---|
| 5470 |
|
|---|
| 5471 | G4VIS_BUILD_RAYTRACERX_DRIVER
|
|---|
| 5472 | G4VIS_USE_RAYTRACERX
|
|---|
| 5473 |
|
|---|
| 5474 | Allows for interactive ray-tracing graphics through X11.
|
|---|
| 5475 | The X11 package is required.
|
|---|
| 5476 |
|
|---|
| 5477 | EOM`
|
|---|
| 5478 |
|
|---|
| 5479 | dflt=$g4vis_use_raytracerx
|
|---|
| 5480 | rp=$g4message
|
|---|
| 5481 | . ./myread
|
|---|
| 5482 | gans=$ans
|
|---|
| 5483 |
|
|---|
| 5484 | case $gans in
|
|---|
| 5485 |
|
|---|
| 5486 | n*|N*)
|
|---|
| 5487 | g4vis_build_raytracerx_driver=n
|
|---|
| 5488 | g4vis_use_raytracerx=n
|
|---|
| 5489 | ;;
|
|---|
| 5490 | y*|Y*)
|
|---|
| 5491 | g4vis_build_raytracerx_driver=y
|
|---|
| 5492 | g4vis_use_raytracerx=y
|
|---|
| 5493 | ;;
|
|---|
| 5494 | esac
|
|---|
| 5495 |
|
|---|
| 5496 | ########################################################
|
|---|
| 5497 | fi # if !WIN
|
|---|
| 5498 |
|
|---|
| 5499 | ###############################################################
|
|---|
| 5500 | if test "X$g4system" = "XWIN32-VC" -o "X$g4system" = "XWIN32-VC7"; then
|
|---|
| 5501 |
|
|---|
| 5502 | g4message=`cat << EOM
|
|---|
| 5503 |
|
|---|
| 5504 | G4VIS_BUILD_OIWIN32_DRIVER
|
|---|
| 5505 | G4VIS_USE_OIWIN32
|
|---|
| 5506 |
|
|---|
| 5507 | Specifies to build and use the driver for the free X11 version of
|
|---|
| 5508 | OpenInventor on Windows systems.
|
|---|
| 5509 | The Windows version of OpenInventor is required.
|
|---|
| 5510 |
|
|---|
| 5511 | EOM`
|
|---|
| 5512 |
|
|---|
| 5513 | dflt=$g4vis_use_oiwin32
|
|---|
| 5514 | rp=$g4message
|
|---|
| 5515 | . ./myread
|
|---|
| 5516 | gans=$ans
|
|---|
| 5517 |
|
|---|
| 5518 | case $gans in
|
|---|
| 5519 |
|
|---|
| 5520 | n*|N*)
|
|---|
| 5521 | g4vis_build_oiwin32_driver=n
|
|---|
| 5522 | g4vis_use_oiwin32=n
|
|---|
| 5523 | ;;
|
|---|
| 5524 | y*|Y*)
|
|---|
| 5525 | g4vis_build_oiwin32_driver=y
|
|---|
| 5526 | g4vis_use_oiwin32=y
|
|---|
| 5527 | ;;
|
|---|
| 5528 | esac
|
|---|
| 5529 |
|
|---|
| 5530 | ############################################################
|
|---|
| 5531 | if test "X$g4vis_build_oiwin32_driver" = "Xy" ; then
|
|---|
| 5532 |
|
|---|
| 5533 | oiv_dirs=`find $g4vis_oivhome /usr/X11R6/include /usr/local/include /usr/include -type d -name Inventor 2>/dev/null|xargs echo`
|
|---|
| 5534 | #echo ogl_dirs=$ogl_dirs
|
|---|
| 5535 |
|
|---|
| 5536 | if test "X$oiv_dirs" != "X" ; then
|
|---|
| 5537 |
|
|---|
| 5538 | g4oiv_base_dir_found=`echo $oiv_dirs|cut -d" " -f1`
|
|---|
| 5539 | #echo g4ogl_base_dir_found=$g4ogl_base_dir_found
|
|---|
| 5540 |
|
|---|
| 5541 | # That's right: should be twice! (e.g./usr/local/lib/libGLU.so -> /usr/local)
|
|---|
| 5542 | g4oiv_base_dir_found=`dirname $g4oiv_base_dir_found`
|
|---|
| 5543 | g4oiv_base_dir_found=`dirname $g4oiv_base_dir_found`
|
|---|
| 5544 |
|
|---|
| 5545 | g4vis_oivhome=$g4oiv_base_dir_found
|
|---|
| 5546 | #else
|
|---|
| 5547 | #case "$g4vis_oivhome" in
|
|---|
| 5548 | #'')
|
|---|
| 5549 | # g4vis_oivhome=/usr
|
|---|
| 5550 | # ;;
|
|---|
| 5551 | #esac
|
|---|
| 5552 | fi
|
|---|
| 5553 |
|
|---|
| 5554 | ##########################################################################
|
|---|
| 5555 |
|
|---|
| 5556 | #if test "X$g4vis_oivhome" != "X" ; then
|
|---|
| 5557 | #oiv_dirs=$g4vis_oivhome
|
|---|
| 5558 | #fi
|
|---|
| 5559 |
|
|---|
| 5560 | if test "X$g4vis_oivhome" != "X" ; then
|
|---|
| 5561 |
|
|---|
| 5562 | g4message=`cat << EOM
|
|---|
| 5563 |
|
|---|
| 5564 | OIVHOME/include
|
|---|
| 5565 | OIVHOME/lib
|
|---|
| 5566 |
|
|---|
| 5567 | You have selected to use OpenInventor driver.
|
|---|
| 5568 | Specify the correct path (OIVHOME) where OpenInventor is installed in your system.
|
|---|
| 5569 | It was found in $g4vis_oivhome. Press [Enter] to set this path or type the correct one.
|
|---|
| 5570 |
|
|---|
| 5571 | You can set '-' (without quotation) to CANCEL the OpenInventor flag at all:
|
|---|
| 5572 |
|
|---|
| 5573 | EOM`
|
|---|
| 5574 |
|
|---|
| 5575 | dflt=$g4vis_oivhome
|
|---|
| 5576 | fn='d~(-)'
|
|---|
| 5577 | rp=$g4message
|
|---|
| 5578 | . ./getfile
|
|---|
| 5579 |
|
|---|
| 5580 | cend="no"
|
|---|
| 5581 | while test "$cend" = "no" ; do
|
|---|
| 5582 | if test -e "$ans/include/Inventor" || [ "X$ans" = "X-" ]; then
|
|---|
| 5583 | cend="yes"
|
|---|
| 5584 | if test "X$ans" != "X-" ; then
|
|---|
| 5585 |
|
|---|
| 5586 | g4vis_oivhome=$ans
|
|---|
| 5587 |
|
|---|
| 5588 | else
|
|---|
| 5589 |
|
|---|
| 5590 | g4vis_build_oiwin32_driver=n
|
|---|
| 5591 | g4vis_use_oiwin32=n
|
|---|
| 5592 |
|
|---|
| 5593 | fi
|
|---|
| 5594 | else
|
|---|
| 5595 |
|
|---|
| 5596 | g4message=`cat << EOM
|
|---|
| 5597 |
|
|---|
| 5598 | OIVHOME/include
|
|---|
| 5599 | OIVHOME/lib
|
|---|
| 5600 |
|
|---|
| 5601 | You have selected to use OpenInventor driver.
|
|---|
| 5602 | But it was not found in $ans.
|
|---|
| 5603 | Please specify the correct path where OpenInventor is installed in your system.
|
|---|
| 5604 |
|
|---|
| 5605 | You can set '-' (without quotation) to CANCEL the OpenInventor flag at all:
|
|---|
| 5606 |
|
|---|
| 5607 | EOM`
|
|---|
| 5608 |
|
|---|
| 5609 | dflt=""
|
|---|
| 5610 | fn='d~(-)'
|
|---|
| 5611 | rp=$g4message
|
|---|
| 5612 | . ./getfile
|
|---|
| 5613 | fi
|
|---|
| 5614 | done
|
|---|
| 5615 |
|
|---|
| 5616 | else
|
|---|
| 5617 |
|
|---|
| 5618 | g4message=`cat << EOM
|
|---|
| 5619 |
|
|---|
| 5620 | OIVHOME/include
|
|---|
| 5621 | OIVHOME/lib
|
|---|
| 5622 |
|
|---|
| 5623 | You have selected to use OpenInventor driver.
|
|---|
| 5624 | But it was not found in expected place.
|
|---|
| 5625 | Please specify the correct path where OpenInventor is installed in your system.
|
|---|
| 5626 |
|
|---|
| 5627 | You can set '-' (without quotation) to CANCEL the OpenInventor flag at all:
|
|---|
| 5628 |
|
|---|
| 5629 | EOM`
|
|---|
| 5630 |
|
|---|
| 5631 | dflt=""
|
|---|
| 5632 | fn='d~(-)'
|
|---|
| 5633 | rp=$g4message
|
|---|
| 5634 | . ./getfile
|
|---|
| 5635 |
|
|---|
| 5636 | cend="no"
|
|---|
| 5637 | while test "$cend" = "no" ; do
|
|---|
| 5638 | if test -e "$ans/include/Inventor" || [ "X$ans" = "X-" ]; then
|
|---|
| 5639 | cend="yes"
|
|---|
| 5640 | if test "X$ans" != "X-" ; then
|
|---|
| 5641 |
|
|---|
| 5642 | g4vis_oivhome=$ans
|
|---|
| 5643 |
|
|---|
| 5644 | else
|
|---|
| 5645 |
|
|---|
| 5646 | g4vis_build_oiwin32_driver=n
|
|---|
| 5647 | g4vis_use_oiwin32=n
|
|---|
| 5648 |
|
|---|
| 5649 | fi
|
|---|
| 5650 | else
|
|---|
| 5651 |
|
|---|
| 5652 | g4message=`cat << EOM
|
|---|
| 5653 |
|
|---|
| 5654 | OIVHOME/include
|
|---|
| 5655 | OIVHOME/lib
|
|---|
| 5656 |
|
|---|
| 5657 | You have selected to use OpenInventor driver.
|
|---|
| 5658 | But it was not found in $ans.
|
|---|
| 5659 | Please specify the correct path where OpenInventor is installed in your system.
|
|---|
| 5660 |
|
|---|
| 5661 | You can set '-' (without quotation) to CANCEL the OpenInventor flag at all:
|
|---|
| 5662 |
|
|---|
| 5663 | EOM`
|
|---|
| 5664 |
|
|---|
| 5665 | dflt=""
|
|---|
| 5666 | fn='d~(-)'
|
|---|
| 5667 | rp=$g4message
|
|---|
| 5668 | . ./getfile
|
|---|
| 5669 | fi
|
|---|
| 5670 | done
|
|---|
| 5671 | fi
|
|---|
| 5672 |
|
|---|
| 5673 | if test "X$g4osname" = "XLinux"; then
|
|---|
| 5674 |
|
|---|
| 5675 | if test "X$g4vis_oivhome" = "X/usr" -o "X$g4vis_oivhome" = "X/usr/local"; then
|
|---|
| 5676 | g4vis_oivhome=""
|
|---|
| 5677 | fi
|
|---|
| 5678 | fi
|
|---|
| 5679 | fi # g4vis_build_oiwin32_driver
|
|---|
| 5680 |
|
|---|
| 5681 | ###############################################
|
|---|
| 5682 |
|
|---|
| 5683 | fi # if WIN
|
|---|
| 5684 | ################################################################
|
|---|
| 5685 |
|
|---|
| 5686 | if test "X$g4system" != "XWIN32-VC" -a "X$g4system" != "XWIN32-VC7"; then
|
|---|
| 5687 |
|
|---|
| 5688 | g4message=`cat << EOM
|
|---|
| 5689 |
|
|---|
| 5690 | G4VIS_BUILD_DAWNFILE_DRIVER
|
|---|
| 5691 | G4VIS_USE_DAWNFILE
|
|---|
| 5692 |
|
|---|
| 5693 | DAWN drivers are interfaces to Fukui Renderer DAWN. It is a vectorized 3D
|
|---|
| 5694 | PostScript processor, and so well suited to prepare technical high
|
|---|
| 5695 | quality outputs for presentation and/or documentation.
|
|---|
| 5696 | The DAWNFILE driver sends 3D data to DAWN via an intermediate file,
|
|---|
| 5697 | named g4.prim in the current directory. The file g4.prim is able to
|
|---|
| 5698 | be re-visualized later without the help of Geant4.
|
|---|
| 5699 | EOM`
|
|---|
| 5700 |
|
|---|
| 5701 | dflt=$g4vis_use_dawnfile
|
|---|
| 5702 | rp=$g4message
|
|---|
| 5703 | #. ./myread
|
|---|
| 5704 | #gans=$ans
|
|---|
| 5705 | gans=y
|
|---|
| 5706 |
|
|---|
| 5707 | case $gans in
|
|---|
| 5708 |
|
|---|
| 5709 | n*|N*)
|
|---|
| 5710 | g4vis_build_dawnfile_driver=n
|
|---|
| 5711 | g4vis_use_dawnfile=n
|
|---|
| 5712 | ;;
|
|---|
| 5713 | y*|Y*)
|
|---|
| 5714 | g4vis_build_dawnfile_driver=y
|
|---|
| 5715 | g4vis_use_dawnfile=y
|
|---|
| 5716 | ;;
|
|---|
| 5717 | esac
|
|---|
| 5718 |
|
|---|
| 5719 | g4message=`cat << EOM
|
|---|
| 5720 |
|
|---|
| 5721 | G4VIS_BUILD_RAYTRACER_DRIVER
|
|---|
| 5722 | G4VIS_USE_RAYTRACER
|
|---|
| 5723 |
|
|---|
| 5724 | It performs ray-tracing visualization using the tracking routines of Geant4.
|
|---|
| 5725 | It is, therefore, available for debugging tracking routines.
|
|---|
| 5726 | It is well suited for photo-realistic high quality output for
|
|---|
| 5727 | presentation, and for intuitive debugging of detector geometry.
|
|---|
| 5728 | EOM`
|
|---|
| 5729 |
|
|---|
| 5730 | dflt=$g4vis_use_raytracer
|
|---|
| 5731 | rp=$g4message
|
|---|
| 5732 | #. ./myread
|
|---|
| 5733 | #gans=$ans
|
|---|
| 5734 | gans=y
|
|---|
| 5735 |
|
|---|
| 5736 | case $gans in
|
|---|
| 5737 |
|
|---|
| 5738 | n*|N*)
|
|---|
| 5739 | g4vis_build_raytracer_driver=n
|
|---|
| 5740 | g4vis_use_raytracer=n
|
|---|
| 5741 | ;;
|
|---|
| 5742 | y*|Y*)
|
|---|
| 5743 | g4vis_build_raytracer_driver=y
|
|---|
| 5744 | g4vis_use_raytracer=y
|
|---|
| 5745 | ;;
|
|---|
| 5746 | esac
|
|---|
| 5747 |
|
|---|
| 5748 | g4message=`cat << EOM
|
|---|
| 5749 |
|
|---|
| 5750 | G4VIS_BUILD_VRML_DRIVER
|
|---|
| 5751 | G4VIS_USE_VRML
|
|---|
| 5752 |
|
|---|
| 5753 | These driver generate VRML files, which describe 3D scenes to be
|
|---|
| 5754 | visualized with a proper VRML viewer.
|
|---|
| 5755 |
|
|---|
| 5756 | EOM`
|
|---|
| 5757 |
|
|---|
| 5758 | dflt=$g4vis_use_vrml
|
|---|
| 5759 | rp=$g4message
|
|---|
| 5760 | . ./myread
|
|---|
| 5761 | gans=$ans
|
|---|
| 5762 |
|
|---|
| 5763 | case $gans in
|
|---|
| 5764 |
|
|---|
| 5765 | n*|N*)
|
|---|
| 5766 | g4vis_build_vrml_driver=n
|
|---|
| 5767 | g4vis_use_vrml=n
|
|---|
| 5768 | ;;
|
|---|
| 5769 | y*|Y*)
|
|---|
| 5770 | g4vis_build_vrml_driver=y
|
|---|
| 5771 | g4vis_use_vrml=y
|
|---|
| 5772 | ;;
|
|---|
| 5773 | esac
|
|---|
| 5774 |
|
|---|
| 5775 | g4message=`cat << EOM
|
|---|
| 5776 |
|
|---|
| 5777 | G4VIS_BUILD_VRMLFILE_DRIVER
|
|---|
| 5778 | G4VIS_USE_VRMLFILE
|
|---|
| 5779 |
|
|---|
| 5780 | This driver generates VRML files, which describe 3D scenes to be
|
|---|
| 5781 | visualized with a proper VRML viewer, at either a local or a remote host.
|
|---|
| 5782 | The VRMLFILE driver sends 3D data to your VRML viewer, which is running
|
|---|
| 5783 | in the same host machine as Geant4, via an intermediate file named
|
|---|
| 5784 | g4.wrl created in the current directory. This file is available for
|
|---|
| 5785 | re-visualization afterwards. In visualization, you should specify a
|
|---|
| 5786 | name of the VRML viewer by setting the environment variable G4VRML_VIEWER
|
|---|
| 5787 | beforehand.
|
|---|
| 5788 | EOM`
|
|---|
| 5789 |
|
|---|
| 5790 | dflt=$g4vis_use_vrmlfile
|
|---|
| 5791 | rp=$g4message
|
|---|
| 5792 | #. ./myread
|
|---|
| 5793 | #gans=$ans
|
|---|
| 5794 | gans=y
|
|---|
| 5795 |
|
|---|
| 5796 | case $gans in
|
|---|
| 5797 |
|
|---|
| 5798 | n*|N*)
|
|---|
| 5799 | g4vis_build_vrmlfile_driver=n
|
|---|
| 5800 | g4vis_use_vrmlfile=n
|
|---|
| 5801 | ;;
|
|---|
| 5802 | y*|Y*)
|
|---|
| 5803 | g4vis_build_vrmlfile_driver=y
|
|---|
| 5804 | g4vis_use_vrmlfile=y
|
|---|
| 5805 | ;;
|
|---|
| 5806 | esac
|
|---|
| 5807 |
|
|---|
| 5808 | fi # if !WIN
|
|---|
| 5809 |
|
|---|
| 5810 | g4message=`cat << EOM
|
|---|
| 5811 |
|
|---|
| 5812 | G4VIS_BUILD_ASCIITREE_DRIVER
|
|---|
| 5813 | G4VIS_USE_ASCIITREE
|
|---|
| 5814 |
|
|---|
| 5815 | Description????????????????????????
|
|---|
| 5816 | EOM`
|
|---|
| 5817 |
|
|---|
| 5818 | dflt=$g4vis_use_asciitree
|
|---|
| 5819 | rp=$g4message
|
|---|
| 5820 | # Don't ask by default and set to 'y'!
|
|---|
| 5821 | #. ./myread
|
|---|
| 5822 | #gans=$ans
|
|---|
| 5823 | gans=y
|
|---|
| 5824 |
|
|---|
| 5825 | case $gans in
|
|---|
| 5826 |
|
|---|
| 5827 | n*|N*)
|
|---|
| 5828 | g4vis_build_asciitree_driver=n
|
|---|
| 5829 | g4vis_use_asciitree=n
|
|---|
| 5830 | ;;
|
|---|
| 5831 | y*|Y*)
|
|---|
| 5832 | g4vis_build_asciitree_driver=y
|
|---|
| 5833 | g4vis_use_asciitree=y
|
|---|
| 5834 | ;;
|
|---|
| 5835 | esac
|
|---|
| 5836 |
|
|---|
| 5837 |
|
|---|
| 5838 | g4message=`cat << EOM
|
|---|
| 5839 |
|
|---|
| 5840 | G4VIS_BUILD_GAGTREE_DRIVER
|
|---|
| 5841 | G4VIS_USE_GAGTREE
|
|---|
| 5842 |
|
|---|
| 5843 | Description????????????????????????
|
|---|
| 5844 | EOM`
|
|---|
| 5845 |
|
|---|
| 5846 | dflt=$g4vis_use_gagtree
|
|---|
| 5847 | rp=$g4message
|
|---|
| 5848 | # Don't ask by default and set to 'y'!
|
|---|
| 5849 | #. ./myread
|
|---|
| 5850 | #gans=$ans
|
|---|
| 5851 | gans=y
|
|---|
| 5852 |
|
|---|
| 5853 | case $gans in
|
|---|
| 5854 |
|
|---|
| 5855 | n*|N*)
|
|---|
| 5856 | g4vis_build_gagtree_driver=n
|
|---|
| 5857 | g4vis_use_gagtree=n
|
|---|
| 5858 | ;;
|
|---|
| 5859 | y*|Y*)
|
|---|
| 5860 | g4vis_build_gagtree_driver=y
|
|---|
| 5861 | g4vis_use_gagtree=y
|
|---|
| 5862 | ;;
|
|---|
| 5863 | esac
|
|---|
| 5864 |
|
|---|
| 5865 | ;;
|
|---|
| 5866 | esac
|
|---|
| 5867 |
|
|---|
| 5868 | if test "X$g4system" != "XWIN32-VC" -a "X$g4system" != "XWIN32-VC7" -a "X$g4system" != "XDarwin-g++"; then
|
|---|
| 5869 |
|
|---|
| 5870 | #echo PASS1
|
|---|
| 5871 |
|
|---|
| 5872 | if [ X$g4vis_build_openglx_driver = Xy ] || [ X$g4vis_build_openglxm_driver = Xy ] || [ X$g4vis_build_openglwin32_driver = Xy ] ; then
|
|---|
| 5873 |
|
|---|
| 5874 | #echo PASS2
|
|---|
| 5875 |
|
|---|
| 5876 | #####################################################################
|
|---|
| 5877 | ogl_dirs=`find $g4vis_oglhome /usr/X11R6/include /usr/local/include /usr/include -type d -name GL 2>/dev/null|xargs echo`
|
|---|
| 5878 | #echo ogl_dirs=$ogl_dirs
|
|---|
| 5879 |
|
|---|
| 5880 | if test "X$ogl_dirs" != "X" ; then
|
|---|
| 5881 |
|
|---|
| 5882 | g4ogl_base_dir_found=`echo $ogl_dirs|cut -d" " -f1`
|
|---|
| 5883 | #echo g4ogl_base_dir_found=$g4ogl_base_dir_found
|
|---|
| 5884 |
|
|---|
| 5885 | # That's right: should be twice! (e.g./usr/local/lib/libGLU.so -> /usr/local)
|
|---|
| 5886 | g4ogl_base_dir_found=`dirname $g4ogl_base_dir_found`
|
|---|
| 5887 | g4ogl_base_dir_found=`dirname $g4ogl_base_dir_found`
|
|---|
| 5888 |
|
|---|
| 5889 | g4vis_oglhome=$g4ogl_base_dir_found
|
|---|
| 5890 | #else
|
|---|
| 5891 | #case "$g4vis_oglhome" in
|
|---|
| 5892 | #'')
|
|---|
| 5893 | # g4vis_oglhome=/usr
|
|---|
| 5894 | # ;;
|
|---|
| 5895 | #esac
|
|---|
| 5896 | fi
|
|---|
| 5897 |
|
|---|
| 5898 | ##########################################################################
|
|---|
| 5899 | if test "X$g4vis_oglhome" != "X" ; then
|
|---|
| 5900 | ogl_dirs=$g4vis_oglhome
|
|---|
| 5901 | fi
|
|---|
| 5902 |
|
|---|
| 5903 | if test "X$ogl_dirs" != "X" ; then
|
|---|
| 5904 |
|
|---|
| 5905 | g4message=`cat << EOM
|
|---|
| 5906 |
|
|---|
| 5907 | OGLHOME/include
|
|---|
| 5908 | OGLHOME/lib
|
|---|
| 5909 |
|
|---|
| 5910 | You have selected to use OpenGL driver.
|
|---|
| 5911 | Specify the correct path (OGLHOME) where OpenGL is installed in your system.
|
|---|
| 5912 | It was found in $g4vis_oglhome. Press [Enter] to set this path or type the correct one.
|
|---|
| 5913 |
|
|---|
| 5914 | You can set '-' (without quotation) to CANCEL the OpenGL flag at all:
|
|---|
| 5915 |
|
|---|
| 5916 | EOM`
|
|---|
| 5917 |
|
|---|
| 5918 | dflt=$g4vis_oglhome
|
|---|
| 5919 | fn='d~(-)'
|
|---|
| 5920 | rp=$g4message
|
|---|
| 5921 | . ./getfile
|
|---|
| 5922 |
|
|---|
| 5923 | cend="no"
|
|---|
| 5924 | while test "$cend" = "no" ; do
|
|---|
| 5925 | if test -e "$ans/include/GL" || [ "X$ans" = "X-" ]; then
|
|---|
| 5926 | cend="yes"
|
|---|
| 5927 |
|
|---|
| 5928 | if test "X$ans" != "X-" ; then
|
|---|
| 5929 |
|
|---|
| 5930 | g4vis_oglhome=$ans
|
|---|
| 5931 |
|
|---|
| 5932 | else
|
|---|
| 5933 |
|
|---|
| 5934 | g4vis_build_openglx_driver=n
|
|---|
| 5935 | g4vis_use_openglx=n
|
|---|
| 5936 |
|
|---|
| 5937 | g4vis_build_openglxm_driver=n
|
|---|
| 5938 | g4vis_use_openglxm=n
|
|---|
| 5939 |
|
|---|
| 5940 | g4vis_build_openglwin32_driver=n
|
|---|
| 5941 | g4vis_use_openglwin32=n
|
|---|
| 5942 |
|
|---|
| 5943 | fi
|
|---|
| 5944 | else
|
|---|
| 5945 |
|
|---|
| 5946 | g4message=`cat << EOM
|
|---|
| 5947 |
|
|---|
| 5948 | OGLHOME/include
|
|---|
| 5949 | OGLHOME/lib
|
|---|
| 5950 |
|
|---|
| 5951 | You have selected to use OpenGL driver.
|
|---|
| 5952 | But it was not found in $ans.
|
|---|
| 5953 | Please specify the correct path where OpenGL is installed in your system.
|
|---|
| 5954 |
|
|---|
| 5955 | You can set '-' (without quotation) to CANCEL the OpenGL flag at all:
|
|---|
| 5956 |
|
|---|
| 5957 | EOM`
|
|---|
| 5958 |
|
|---|
| 5959 | dflt=""
|
|---|
| 5960 | fn='d~(-)'
|
|---|
| 5961 | rp=$g4message
|
|---|
| 5962 | . ./getfile
|
|---|
| 5963 | fi
|
|---|
| 5964 | done
|
|---|
| 5965 |
|
|---|
| 5966 | else
|
|---|
| 5967 |
|
|---|
| 5968 | g4message=`cat << EOM
|
|---|
| 5969 |
|
|---|
| 5970 | OGLHOME/include
|
|---|
| 5971 | OGLHOME/lib
|
|---|
| 5972 |
|
|---|
| 5973 | You have selected to use OpenGL driver.
|
|---|
| 5974 | But it was not found in expected place.
|
|---|
| 5975 | Please specify the correct path where OpenGL is installed in your system.
|
|---|
| 5976 |
|
|---|
| 5977 | You can set '-' (without quotation) to CANCEL the OpenGL flag at all:
|
|---|
| 5978 |
|
|---|
| 5979 | EOM`
|
|---|
| 5980 |
|
|---|
| 5981 | dflt=""
|
|---|
| 5982 | fn='d~(-)'
|
|---|
| 5983 | rp=$g4message
|
|---|
| 5984 | . ./getfile
|
|---|
| 5985 |
|
|---|
| 5986 | cend="no"
|
|---|
| 5987 | while test "$cend" = "no" ; do
|
|---|
| 5988 | if test -e "$ans/include/GL" || [ "X$ans" = "X-" ]; then
|
|---|
| 5989 | cend="yes"
|
|---|
| 5990 |
|
|---|
| 5991 | if test "X$ans" != "X-" ; then
|
|---|
| 5992 |
|
|---|
| 5993 | g4vis_oglhome=$ans
|
|---|
| 5994 |
|
|---|
| 5995 | else
|
|---|
| 5996 |
|
|---|
| 5997 | g4vis_build_openglx_driver=n
|
|---|
| 5998 | g4vis_use_openglx=n
|
|---|
| 5999 |
|
|---|
| 6000 | g4vis_build_openglxm_driver=n
|
|---|
| 6001 | g4vis_use_openglxm=n
|
|---|
| 6002 |
|
|---|
| 6003 | g4vis_build_openglwin32_driver=n
|
|---|
| 6004 | g4vis_use_openglwin32=n
|
|---|
| 6005 |
|
|---|
| 6006 | fi
|
|---|
| 6007 | else
|
|---|
| 6008 |
|
|---|
| 6009 | g4message=`cat << EOM
|
|---|
| 6010 |
|
|---|
| 6011 | OGLHOME/include
|
|---|
| 6012 | OGLHOME/lib
|
|---|
| 6013 |
|
|---|
| 6014 | You have selected to use OpenGL driver.
|
|---|
| 6015 | But it was not found in $ans.
|
|---|
| 6016 | Please specify the correct path where OpenGL is installed in your system.
|
|---|
| 6017 |
|
|---|
| 6018 | You can set '-' (without quotation) to CANCEL the OpenGL flag at all:
|
|---|
| 6019 |
|
|---|
| 6020 | EOM`
|
|---|
| 6021 |
|
|---|
| 6022 | dflt=""
|
|---|
| 6023 | fn='d~(-)'
|
|---|
| 6024 | rp=$g4message
|
|---|
| 6025 | . ./getfile
|
|---|
| 6026 | fi
|
|---|
| 6027 | done
|
|---|
| 6028 |
|
|---|
| 6029 | fi
|
|---|
| 6030 |
|
|---|
| 6031 | if test "X$g4osname" = "XLinux"; then
|
|---|
| 6032 |
|
|---|
| 6033 | if test "X$g4vis_oglhome" = "X/usr" -o "X$g4vis_oglhome" = "X/usr/local"; then
|
|---|
| 6034 | g4vis_oglhome=""
|
|---|
| 6035 | fi
|
|---|
| 6036 |
|
|---|
| 6037 | fi # if platform (Linux vs SUN)
|
|---|
| 6038 |
|
|---|
| 6039 | fi # if need
|
|---|
| 6040 | ###########################################
|
|---|
| 6041 | fi # if platform (Unix vs Win)
|
|---|
| 6042 |
|
|---|
| 6043 | #
|
|---|
| 6044 | # BEGIN QTVIS/QT PROBE
|
|---|
| 6045 | #
|
|---|
| 6046 | # Because the vis driver only works with UI, only probe if g4ui_none is
|
|---|
| 6047 | # NOT set AND also that g4vis_none is NOT set
|
|---|
| 6048 | #
|
|---|
| 6049 | if test "x$g4ui_none" = "xn" -a "x$g4vis_none" = "xn" ; then
|
|---|
| 6050 | # Query the user to see if build of Qt UI module is needed
|
|---|
| 6051 | g4message=`cat <<EOM
|
|---|
| 6052 |
|
|---|
| 6053 | G4UI_BUILD_OPENGLQT_DRIVER
|
|---|
| 6054 | G4UI_USE_OPENGLQT
|
|---|
| 6055 |
|
|---|
| 6056 | Setting these variables will enable the building of the G4 OpenGL Qt based
|
|---|
| 6057 | visualisation driver and the use of this driver in your applications
|
|---|
| 6058 | respectively.
|
|---|
| 6059 | The Qt3 or Qt4 headers, libraries and moc application are required to enable
|
|---|
| 6060 | the building of this module.
|
|---|
| 6061 | Do you want to enable build and use of this module?
|
|---|
| 6062 | EOM`
|
|---|
| 6063 |
|
|---|
| 6064 | # Read in the user response
|
|---|
| 6065 | dflt=$g4vis_build_openglqt_driver
|
|---|
| 6066 | rp=$g4message
|
|---|
| 6067 | . ./myread
|
|---|
| 6068 | gans=$ans
|
|---|
| 6069 |
|
|---|
| 6070 | # Check response and take set variables as needed.
|
|---|
| 6071 | case $gans in
|
|---|
| 6072 | n*|N*)
|
|---|
| 6073 | g4vis_build_openglqt_driver=n
|
|---|
| 6074 | g4vis_use_openglqt=n
|
|---|
| 6075 | ;;
|
|---|
| 6076 | y*|Y*)
|
|---|
| 6077 | g4vis_build_openglqt_driver=y
|
|---|
| 6078 | g4vis_use_openglqt=y
|
|---|
| 6079 | ;;
|
|---|
| 6080 | esac
|
|---|
| 6081 |
|
|---|
| 6082 | ##########
|
|---|
| 6083 |
|
|---|
| 6084 | ##########
|
|---|
| 6085 | # Now, if user chose to build module, we need to check for a Qt
|
|---|
| 6086 | # installation
|
|---|
| 6087 | #
|
|---|
| 6088 | if test "x$g4vis_build_openglqt_driver" = "xy" ; then
|
|---|
| 6089 | echo " "
|
|---|
| 6090 | # NB Have to supply arg to qt script, just blank in this case!
|
|---|
| 6091 | qt_search_dir=""
|
|---|
| 6092 | . ./qt
|
|---|
| 6093 |
|
|---|
| 6094 | # If we didn't find Qt automatically, then ask user if they know
|
|---|
| 6095 | # where it's installed...
|
|---|
| 6096 | if test "x$g4_havegoodqt" = "xno" ; then
|
|---|
| 6097 | promptend="no"
|
|---|
| 6098 | user_qthome="the standard locations"
|
|---|
| 6099 |
|
|---|
| 6100 | while test "x$promptend" = "xno" ; do
|
|---|
| 6101 | g4message=`cat << EOM
|
|---|
| 6102 |
|
|---|
| 6103 | Autodetection failed to locate Qt3 or Qt4 in $qthomeloc on your system.
|
|---|
| 6104 | Please enter the path to your Qt3 OR Qt4 install (i.e. if Qt4 is installed
|
|---|
| 6105 | in PATH/include/QT, PATH/include or PATH/include/qt4, enter PATH),
|
|---|
| 6106 | or type '-' to CANCEL the build of the Qt UI module.
|
|---|
| 6107 | Qt path:
|
|---|
| 6108 | EOM`
|
|---|
| 6109 | dflt=""
|
|---|
| 6110 | fn='d~(-)'
|
|---|
| 6111 | rp=$g4message
|
|---|
| 6112 | . ./getfile
|
|---|
| 6113 | user_qthome=$ans
|
|---|
| 6114 |
|
|---|
| 6115 | if test "x$user_qthome" = "x-" ; then
|
|---|
| 6116 | # Cancel build...
|
|---|
| 6117 | g4vis_build_openglqt_driver=n
|
|---|
| 6118 | g4vis_use_openglqt=n
|
|---|
| 6119 | echo "configure: build/use of Qt OpenGl driver cancelled"
|
|---|
| 6120 | promptend=yes
|
|---|
| 6121 | else
|
|---|
| 6122 | # Check for installation in user directory
|
|---|
| 6123 | echo " "
|
|---|
| 6124 | qt_search_dir=$user_qthome
|
|---|
| 6125 | . ./qt
|
|---|
| 6126 |
|
|---|
| 6127 | if test "x$g4_havegoodqt" = "xyes" ; then
|
|---|
| 6128 | promptend=yes
|
|---|
| 6129 | fi
|
|---|
| 6130 | fi #END TEST user_qthome = -
|
|---|
| 6131 | done #END while promptend=no (for user input of Qt install)
|
|---|
| 6132 | fi #END TEST g4_havegoodqt = no (for user prompt)
|
|---|
| 6133 | fi #END TEST g4vis_build_openglqt_driver (whether to build at all)
|
|---|
| 6134 | fi #END TEST g4ui_none = n AND g4vis_none=n
|
|---|
| 6135 |
|
|---|
| 6136 | #
|
|---|
| 6137 | # BEGIN GDML/XERCESC PROBE
|
|---|
| 6138 | #
|
|---|
| 6139 |
|
|---|
| 6140 | # Set default build option to no
|
|---|
| 6141 | echo " "
|
|---|
| 6142 | case "$g4lib_build_gdml" in
|
|---|
| 6143 | '')
|
|---|
| 6144 | g4lib_build_gdml=n
|
|---|
| 6145 | ;;
|
|---|
| 6146 | esac
|
|---|
| 6147 |
|
|---|
| 6148 |
|
|---|
| 6149 | # Now query the user to see if they want to build the GDML plugin
|
|---|
| 6150 | echo ""
|
|---|
| 6151 |
|
|---|
| 6152 | g4message=`cat << EOM
|
|---|
| 6153 |
|
|---|
| 6154 | G4LIB_BUILD_GDML
|
|---|
| 6155 |
|
|---|
| 6156 | Setting this variable will enable building of the GDML plugin module embedded
|
|---|
| 6157 | in Geant4 for detector description persistency.
|
|---|
| 6158 | It requires your system to have the XercesC library and headers installed.
|
|---|
| 6159 | Do you want to set this variable?
|
|---|
| 6160 |
|
|---|
| 6161 | EOM`
|
|---|
| 6162 |
|
|---|
| 6163 | #
|
|---|
| 6164 | # read in the users response
|
|---|
| 6165 | #
|
|---|
| 6166 | dflt=$g4lib_build_gdml
|
|---|
| 6167 | rp=$g4message
|
|---|
| 6168 | . ./myread
|
|---|
| 6169 | gans=$ans
|
|---|
| 6170 |
|
|---|
| 6171 | #
|
|---|
| 6172 | # Check response
|
|---|
| 6173 | #
|
|---|
| 6174 | case $gans in
|
|---|
| 6175 | n*|N*)
|
|---|
| 6176 | g4lib_build_gdml=n
|
|---|
| 6177 | ;;
|
|---|
| 6178 | y*|Y*)
|
|---|
| 6179 | g4lib_build_gdml=y
|
|---|
| 6180 | ;;
|
|---|
| 6181 | esac
|
|---|
| 6182 |
|
|---|
| 6183 |
|
|---|
| 6184 | #
|
|---|
| 6185 | # If user does want to build GDML plugin, now try to locate Xerces install
|
|---|
| 6186 | #
|
|---|
| 6187 | if test "X$g4lib_build_gdml" != "Xn"; then
|
|---|
| 6188 |
|
|---|
| 6189 | if test "X$g4gdml_xercesc_root" = "X"; then
|
|---|
| 6190 | #probe for Xerces, using example from UI and Vis
|
|---|
| 6191 | xercesc_root=`find $g4gdml_xercesc_root /usr/include /usr/local/include \
|
|---|
| 6192 | /opt/local/include /sw/include -type d -name xercesc 2>/dev/null | xargs echo`
|
|---|
| 6193 |
|
|---|
| 6194 | #If we got something, strip off the include/xerces part
|
|---|
| 6195 | if test "X$xercesc_root" != "X"; then
|
|---|
| 6196 | g4gdml_xercesc_root=`dirname $xercesc_root`
|
|---|
| 6197 | g4gdml_xercesc_root=`dirname $g4gdml_xercesc_root`
|
|---|
| 6198 |
|
|---|
| 6199 | echo " "
|
|---|
| 6200 | echo "checking for XercesC install... $g4gdml_xercesc_root"
|
|---|
| 6201 | else
|
|---|
| 6202 | g4gdml_xercesc_root=""
|
|---|
| 6203 | echo " "
|
|---|
| 6204 | echo "checking for XercesC install... no"
|
|---|
| 6205 | fi
|
|---|
| 6206 | fi #END OF XERCES AUTOPROBE
|
|---|
| 6207 |
|
|---|
| 6208 | #
|
|---|
| 6209 | # If the autoprobe failed, prompt the user to enter the path to the Xerces
|
|---|
| 6210 | # install
|
|---|
| 6211 | #
|
|---|
| 6212 | if test "X$g4gdml_xercesc_root" = "X"; then
|
|---|
| 6213 |
|
|---|
| 6214 | promptend="no"
|
|---|
| 6215 | xercesloc="the standard locations"
|
|---|
| 6216 |
|
|---|
| 6217 | while test "$promptend" = "no"; do
|
|---|
| 6218 | g4message=`cat << EOM
|
|---|
| 6219 |
|
|---|
| 6220 | Autodetection failed to locate XercesC in $xercesloc on your system.
|
|---|
| 6221 | Please enter the path to your XercesC install (i.e. if XercesC is installed
|
|---|
| 6222 | in PATH/include/xercesc, enter PATH), or type '-' to CANCEL the build of the
|
|---|
| 6223 | GDML module.
|
|---|
| 6224 | XercesC path:
|
|---|
| 6225 | EOM`
|
|---|
| 6226 |
|
|---|
| 6227 | dflt=$g4gdml_xercesc_root
|
|---|
| 6228 | fn='d~(-)'
|
|---|
| 6229 | rp=$g4message
|
|---|
| 6230 | . ./getfile
|
|---|
| 6231 |
|
|---|
| 6232 | #check for user cancellation
|
|---|
| 6233 | if test "X$ans" = "X-"; then
|
|---|
| 6234 | g4lib_build_gdml=n
|
|---|
| 6235 | g4gdml_xercesc_root=""
|
|---|
| 6236 | echo "G4LIB_BUILD_GDML cancelled..."
|
|---|
| 6237 | promptend=yes
|
|---|
| 6238 | else
|
|---|
| 6239 | if test -r "$ans/include/xercesc"; then
|
|---|
| 6240 | g4gdml_xercesc_root=$ans
|
|---|
| 6241 | echo "checking for XercesC install... $g4gdml_xercesc_root"
|
|---|
| 6242 | promptend=yes
|
|---|
| 6243 | else
|
|---|
| 6244 | xercesloc=$ans
|
|---|
| 6245 | echo "checking for Xercesc install... no"
|
|---|
| 6246 | fi
|
|---|
| 6247 | fi #END OF USER INPUT CHECKING
|
|---|
| 6248 | done #END OF WHILE LOOP OVER USER INPUT
|
|---|
| 6249 | fi #END OF USER INPUT SECTION
|
|---|
| 6250 |
|
|---|
| 6251 | #
|
|---|
| 6252 | # If a filter on g4gdml_xerces_root is needed to remove common system paths
|
|---|
| 6253 | # then it should be put here...
|
|---|
| 6254 | #
|
|---|
| 6255 | if test "x$g4gdml_xercesc_root" = "x/usr" -o "x$g4gdml_xercesc_root" = "x/usr/local" ; then
|
|---|
| 6256 | g4gdml_xercesc_root=""
|
|---|
| 6257 | fi
|
|---|
| 6258 |
|
|---|
| 6259 | fi #END XERCES PROBE
|
|---|
| 6260 |
|
|---|
| 6261 | #END OF GDML/XERCES PROBE
|
|---|
| 6262 |
|
|---|
| 6263 | echo " "
|
|---|
| 6264 |
|
|---|
| 6265 | case "$g4make" in
|
|---|
| 6266 | '')
|
|---|
| 6267 | g4make=gmake
|
|---|
| 6268 | ;;
|
|---|
| 6269 | esac
|
|---|
| 6270 |
|
|---|
| 6271 | echo ""
|
|---|
| 6272 |
|
|---|
| 6273 | g4_gmake_version=`(gmake -v) 2>/dev/null`
|
|---|
| 6274 | case $g4_gmake_version in
|
|---|
| 6275 | GNU*)
|
|---|
| 6276 | g4_gmake=y
|
|---|
| 6277 | ;;
|
|---|
| 6278 | *)
|
|---|
| 6279 | g4_gmake=n
|
|---|
| 6280 | ;;
|
|---|
| 6281 | esac
|
|---|
| 6282 |
|
|---|
| 6283 | g4_make_version=`(make -v) 2>/dev/null`
|
|---|
| 6284 | case $g4_make_version in
|
|---|
| 6285 | GNU*)
|
|---|
| 6286 | g4_make=y
|
|---|
| 6287 | ;;
|
|---|
| 6288 | *)
|
|---|
| 6289 | g4_make=n
|
|---|
| 6290 | ;;
|
|---|
| 6291 | esac
|
|---|
| 6292 |
|
|---|
| 6293 | if [ $g4_gmake = y ] ; then
|
|---|
| 6294 |
|
|---|
| 6295 | g4make=gmake
|
|---|
| 6296 |
|
|---|
| 6297 | g4message=`cat << EOM
|
|---|
| 6298 |
|
|---|
| 6299 | G4MAKE
|
|---|
| 6300 |
|
|---|
| 6301 | You have GNU make which could be used to build GEANT4.
|
|---|
| 6302 | You can select your own 'make' program if you want.
|
|---|
| 6303 | EOM`
|
|---|
| 6304 |
|
|---|
| 6305 | fi
|
|---|
| 6306 |
|
|---|
| 6307 | if [ $g4_gmake = n ] && [ $g4_make = y ] ; then
|
|---|
| 6308 |
|
|---|
| 6309 | g4make=make
|
|---|
| 6310 |
|
|---|
| 6311 | g4message=`cat << EOM
|
|---|
| 6312 |
|
|---|
| 6313 | G4MAKE
|
|---|
| 6314 |
|
|---|
| 6315 | You have GNU make which could be used to build GEANT4.
|
|---|
| 6316 | You can select your own 'make' program if you want.
|
|---|
| 6317 | EOM`
|
|---|
| 6318 |
|
|---|
| 6319 | fi
|
|---|
| 6320 |
|
|---|
| 6321 | if [ $g4_gmake = n ] && [ $g4_make = n ] ; then
|
|---|
| 6322 |
|
|---|
| 6323 | g4make=none
|
|---|
| 6324 |
|
|---|
| 6325 | g4message=`cat << EOM
|
|---|
| 6326 |
|
|---|
| 6327 | G4MAKE
|
|---|
| 6328 |
|
|---|
| 6329 | You have NO GNU make which could be used to build GEANT4.
|
|---|
| 6330 | Please select your own 'make' program compatible with GNU make.
|
|---|
| 6331 | EOM`
|
|---|
| 6332 |
|
|---|
| 6333 | dflt=$g4make
|
|---|
| 6334 | rp=$g4message
|
|---|
| 6335 |
|
|---|
| 6336 |
|
|---|
| 6337 | . ./myread
|
|---|
| 6338 | gans=$ans
|
|---|
| 6339 |
|
|---|
| 6340 | case $gans in
|
|---|
| 6341 |
|
|---|
| 6342 | '')
|
|---|
| 6343 | g4make=$dflt
|
|---|
| 6344 | ;;
|
|---|
| 6345 | *)
|
|---|
| 6346 | g4make=$gans
|
|---|
| 6347 | ;;
|
|---|
| 6348 | esac
|
|---|
| 6349 |
|
|---|
| 6350 | fi
|
|---|
| 6351 |
|
|---|
| 6352 |
|
|---|
| 6353 |
|
|---|
| 6354 |
|
|---|
| 6355 | echo " "
|
|---|
| 6356 | case "$g4wlib_build_g3tog4" in
|
|---|
| 6357 | '')
|
|---|
| 6358 | g4wlib_build_g3tog4=n
|
|---|
| 6359 | ;;
|
|---|
| 6360 | esac
|
|---|
| 6361 |
|
|---|
| 6362 | case "$g4w_use_g3tog4" in
|
|---|
| 6363 | '')
|
|---|
| 6364 | g4w_use_g3tog4=n
|
|---|
| 6365 | ;;
|
|---|
| 6366 | esac
|
|---|
| 6367 |
|
|---|
| 6368 | echo ""
|
|---|
| 6369 |
|
|---|
| 6370 | g4message=`cat << EOM
|
|---|
| 6371 |
|
|---|
| 6372 | G4LIB_BUILD_G3TOG4
|
|---|
| 6373 |
|
|---|
| 6374 | The utility module 'g3tog4' will be built by setting this
|
|---|
| 6375 | variable. NOTE: it requires a valid FORTRAN compiler to be
|
|---|
| 6376 | installed on your system and the 'cernlib' command in the
|
|---|
| 6377 | path, in order to build the ancillary tools!
|
|---|
| 6378 | Do you want to build 'g3tog4' ?
|
|---|
| 6379 |
|
|---|
| 6380 | EOM`
|
|---|
| 6381 |
|
|---|
| 6382 | dflt=$g4wlib_build_g3tog4
|
|---|
| 6383 | rp=$g4message
|
|---|
| 6384 | . ./myread
|
|---|
| 6385 | gans=$ans
|
|---|
| 6386 |
|
|---|
| 6387 | case $gans in
|
|---|
| 6388 |
|
|---|
| 6389 | n*|N*)
|
|---|
| 6390 | g4wlib_build_g3tog4=n
|
|---|
| 6391 | g4w_use_g3tog4=n
|
|---|
| 6392 | ;;
|
|---|
| 6393 | y*|Y*)
|
|---|
| 6394 | g4wlib_build_g3tog4=y
|
|---|
| 6395 | g4w_use_g3tog4=y
|
|---|
| 6396 | ;;
|
|---|
| 6397 | esac
|
|---|
| 6398 |
|
|---|
| 6399 |
|
|---|
| 6400 | echo " "
|
|---|
| 6401 | case "$g4wlib_build_zlib" in
|
|---|
| 6402 | '')
|
|---|
| 6403 | g4wlib_build_zlib=n
|
|---|
| 6404 | ;;
|
|---|
| 6405 | esac
|
|---|
| 6406 |
|
|---|
| 6407 | case "$g4w_use_zlib" in
|
|---|
| 6408 | '')
|
|---|
| 6409 | g4w_use_zlib=n
|
|---|
| 6410 | ;;
|
|---|
| 6411 | esac
|
|---|
| 6412 |
|
|---|
| 6413 | echo ""
|
|---|
| 6414 |
|
|---|
| 6415 | g4message=`cat << EOM
|
|---|
| 6416 |
|
|---|
| 6417 | G4LIB_BUILD_ZLIB
|
|---|
| 6418 |
|
|---|
| 6419 | Do you want to activate compression for output files
|
|---|
| 6420 | generated by the HepRep visualization driver?
|
|---|
| 6421 |
|
|---|
| 6422 | EOM`
|
|---|
| 6423 |
|
|---|
| 6424 | dflt=$g4wlib_build_zlib
|
|---|
| 6425 | rp=$g4message
|
|---|
| 6426 | . ./myread
|
|---|
| 6427 | gans=$ans
|
|---|
| 6428 |
|
|---|
| 6429 | case $gans in
|
|---|
| 6430 |
|
|---|
| 6431 | n*|N*)
|
|---|
| 6432 | g4wlib_build_zlib=n
|
|---|
| 6433 | g4w_use_zlib=n
|
|---|
| 6434 | ;;
|
|---|
| 6435 | y*|Y*)
|
|---|
| 6436 | g4wlib_build_zlib=y
|
|---|
| 6437 | g4w_use_zlib=y
|
|---|
| 6438 | ;;
|
|---|
| 6439 | esac
|
|---|
| 6440 |
|
|---|
| 6441 |
|
|---|
| 6442 | echo " "
|
|---|
| 6443 |
|
|---|
| 6444 | case "$g4wanalysis_use" in
|
|---|
| 6445 | '')
|
|---|
| 6446 | g4wanalysis_use=n
|
|---|
| 6447 | ;;
|
|---|
| 6448 | esac
|
|---|
| 6449 |
|
|---|
| 6450 | echo ""
|
|---|
| 6451 |
|
|---|
| 6452 | g4message=`cat << EOM
|
|---|
| 6453 |
|
|---|
| 6454 | G4ANALYSIS_USE
|
|---|
| 6455 |
|
|---|
| 6456 | Activates the configuration setup for allowing plugins to
|
|---|
| 6457 | analysis tools based on AIDA (Astract Interfaces for Data
|
|---|
| 6458 | Analysis). In order to use AIDA features and compliant analysis
|
|---|
| 6459 | tools, the proper environment for these tools will have to be
|
|---|
| 6460 | set (see documentation for the specific analysis tools).
|
|---|
| 6461 | EOM`
|
|---|
| 6462 |
|
|---|
| 6463 | dflt=$g4wanalysis_use
|
|---|
| 6464 | rp=$g4message
|
|---|
| 6465 | . ./myread
|
|---|
| 6466 | gans=$ans
|
|---|
| 6467 |
|
|---|
| 6468 | case $gans in
|
|---|
| 6469 |
|
|---|
| 6470 | n*|N*)
|
|---|
| 6471 | g4wanalysis_use=n
|
|---|
| 6472 | ;;
|
|---|
| 6473 | y*|Y*)
|
|---|
| 6474 | g4wanalysis_use=y
|
|---|
| 6475 | ;;
|
|---|
| 6476 | esac
|
|---|
| 6477 |
|
|---|
| 6478 |
|
|---|
| 6479 | : end of configuration questions
|
|---|
| 6480 | echo " "
|
|---|
| 6481 | echo "End of configuration phase."
|
|---|
| 6482 | echo " "
|
|---|
| 6483 |
|
|---|
| 6484 | : back to where it started
|
|---|
| 6485 | if test -d ../../.config/UU; then
|
|---|
| 6486 | cd ../..
|
|---|
| 6487 | fi
|
|---|
| 6488 |
|
|---|
| 6489 | : configuration may be patched via a 'config.over' file
|
|---|
| 6490 | if $test -f config.over; then
|
|---|
| 6491 | echo " "
|
|---|
| 6492 | dflt=y
|
|---|
| 6493 | rp='A config.over file exists. Do you wish to load it?'
|
|---|
| 6494 | . .config/UU/myread
|
|---|
| 6495 | case "$ans" in
|
|---|
| 6496 | n*) echo "OK, I'll ignore it.";;
|
|---|
| 6497 | *) . ./config.over
|
|---|
| 6498 | echo "Configuration settings have been loaded."
|
|---|
| 6499 | ;;
|
|---|
| 6500 | esac
|
|---|
| 6501 | fi
|
|---|
| 6502 |
|
|---|
| 6503 | : in case they want portability, strip down executable paths
|
|---|
| 6504 | case "$d_portable" in
|
|---|
| 6505 | "$define")
|
|---|
| 6506 | echo " "
|
|---|
| 6507 | echo "Stripping down executable paths..." >&4
|
|---|
| 6508 | for file in $loclist $trylist; do
|
|---|
| 6509 | eval $file="\$file"
|
|---|
| 6510 | done
|
|---|
| 6511 | ;;
|
|---|
| 6512 | esac
|
|---|
| 6513 |
|
|---|
| 6514 | : create config.sh file
|
|---|
| 6515 | echo " "
|
|---|
| 6516 | echo "Creating configuration setup file..." >&4
|
|---|
| 6517 | mkdir -p $g4conf
|
|---|
| 6518 | $spitshell <<EOT > $g4conf/config.sh
|
|---|
| 6519 | $startsh
|
|---|
| 6520 | #
|
|---|
| 6521 | # This file was produced by running the Configure script. It holds all the
|
|---|
| 6522 | # definitions figured out by Configure. Should you modify one of these values,
|
|---|
| 6523 | # do not forget to propagate your changes by running "Configure -der". You may
|
|---|
| 6524 | # instead choose to run each of the .SH files by yourself, or "Configure -S".
|
|---|
| 6525 | #
|
|---|
| 6526 |
|
|---|
| 6527 | # Package name : $package
|
|---|
| 6528 | # Source directory : $src
|
|---|
| 6529 | # Configuration time: $cf_time
|
|---|
| 6530 | # Configured by : $cf_by
|
|---|
| 6531 | # Target system : $myuname
|
|---|
| 6532 |
|
|---|
| 6533 | Author='$Author'
|
|---|
| 6534 | Date='$Date'
|
|---|
| 6535 | Header='$Header'
|
|---|
| 6536 | Id='$Id'
|
|---|
| 6537 | Locker='$Locker'
|
|---|
| 6538 | Log='$Log'
|
|---|
| 6539 | RCSfile='$RCSfile'
|
|---|
| 6540 | Revision='$Revision'
|
|---|
| 6541 | Source='$Source'
|
|---|
| 6542 | State='$State'
|
|---|
| 6543 | c='$c'
|
|---|
| 6544 | cf_by='$cf_by'
|
|---|
| 6545 | cf_time='$cf_time'
|
|---|
| 6546 | contains='$contains'
|
|---|
| 6547 | d_portable='$d_portable'
|
|---|
| 6548 | eunicefix='$eunicefix'
|
|---|
| 6549 | g4_gmake='$g4_gmake'
|
|---|
| 6550 | g4_gmake_version='$g4_gmake_version'
|
|---|
| 6551 | g4_make='$g4_make'
|
|---|
| 6552 | g4_make_version='$g4_make_version'
|
|---|
| 6553 | g4_qt_cxxflags='$g4_qt_cxxflags'
|
|---|
| 6554 | g4_qt_gl_cxxflags='$g4_qt_gl_cxxflags'
|
|---|
| 6555 | g4_qt_gl_libs='$g4_qt_gl_libs'
|
|---|
| 6556 | g4_qt_libs='$g4_qt_libs'
|
|---|
| 6557 | g4_qt_moc='$g4_qt_moc'
|
|---|
| 6558 | g4_qt_version='$g4_qt_version'
|
|---|
| 6559 | g4abladata='$g4abladata'
|
|---|
| 6560 | g4base='$g4base'
|
|---|
| 6561 | g4bin='$g4bin'
|
|---|
| 6562 | g4clhep_base_dir='$g4clhep_base_dir'
|
|---|
| 6563 | g4clhep_include_dir='$g4clhep_include_dir'
|
|---|
| 6564 | g4clhep_lib='$g4clhep_lib'
|
|---|
| 6565 | g4clhep_lib_dir='$g4clhep_lib_dir'
|
|---|
| 6566 | g4compiler='$g4compiler'
|
|---|
| 6567 | g4conf='$g4conf'
|
|---|
| 6568 | g4data='$g4data'
|
|---|
| 6569 | g4debug='$g4debug'
|
|---|
| 6570 | g4elasticdata='$g4elasticdata'
|
|---|
| 6571 | g4final_install='$g4final_install'
|
|---|
| 6572 | g4gdml_xercesc_root='$g4gdml_xercesc_root'
|
|---|
| 6573 | g4global='$g4global'
|
|---|
| 6574 | g4granular='$g4granular'
|
|---|
| 6575 | g4include='$g4include'
|
|---|
| 6576 | g4includes_flag='$g4includes_flag'
|
|---|
| 6577 | g4install='$g4install'
|
|---|
| 6578 | g4ledata='$g4ledata'
|
|---|
| 6579 | g4levelgammadata='$g4levelgammadata'
|
|---|
| 6580 | g4lib='$g4lib'
|
|---|
| 6581 | g4lib_build_gdml='$g4lib_build_gdml'
|
|---|
| 6582 | g4lib_build_shared='$g4lib_build_shared'
|
|---|
| 6583 | g4lib_build_static='$g4lib_build_static'
|
|---|
| 6584 | g4lib_use_dll='$g4lib_use_dll'
|
|---|
| 6585 | g4lib_use_dyn='$g4lib_use_dyn'
|
|---|
| 6586 | g4lib_use_granular='$g4lib_use_granular'
|
|---|
| 6587 | g4lib_use_shared='$g4lib_use_shared'
|
|---|
| 6588 | g4lib_use_static='$g4lib_use_static'
|
|---|
| 6589 | g4make='$g4make'
|
|---|
| 6590 | g4neutronhpcrosssections='$g4neutronhpcrosssections'
|
|---|
| 6591 | g4osname='$g4osname'
|
|---|
| 6592 | g4radioactivedata='$g4radioactivedata'
|
|---|
| 6593 | g4system='$g4system'
|
|---|
| 6594 | g4tmp='$g4tmp'
|
|---|
| 6595 | g4ui_build_gag_session='$g4ui_build_gag_session'
|
|---|
| 6596 | g4ui_build_qt_session='$g4ui_build_qt_session'
|
|---|
| 6597 | g4ui_build_terminal_session='$g4ui_build_terminal_session'
|
|---|
| 6598 | g4ui_build_win32_session='$g4ui_build_win32_session'
|
|---|
| 6599 | g4ui_build_xaw_session='$g4ui_build_xaw_session'
|
|---|
| 6600 | g4ui_build_xm_session='$g4ui_build_xm_session'
|
|---|
| 6601 | g4ui_none='$g4ui_none'
|
|---|
| 6602 | g4ui_use_gag='$g4ui_use_gag'
|
|---|
| 6603 | g4ui_use_qt='$g4ui_use_qt'
|
|---|
| 6604 | g4ui_use_tcsh='$g4ui_use_tcsh'
|
|---|
| 6605 | g4ui_use_terminal='$g4ui_use_terminal'
|
|---|
| 6606 | g4ui_use_win32='$g4ui_use_win32'
|
|---|
| 6607 | g4ui_use_xaw='$g4ui_use_xaw'
|
|---|
| 6608 | g4ui_use_xm='$g4ui_use_xm'
|
|---|
| 6609 | g4ui_xawflags='$g4ui_xawflags'
|
|---|
| 6610 | g4ui_xawhome='$g4ui_xawhome'
|
|---|
| 6611 | g4ui_xawlibs='$g4ui_xawlibs'
|
|---|
| 6612 | g4vis_build_asciitree_driver='$g4vis_build_asciitree_driver'
|
|---|
| 6613 | g4vis_build_dawn_driver='$g4vis_build_dawn_driver'
|
|---|
| 6614 | g4vis_build_dawnfile_driver='$g4vis_build_dawnfile_driver'
|
|---|
| 6615 | g4vis_build_oiwin32_driver='$g4vis_build_oiwin32_driver'
|
|---|
| 6616 | g4vis_build_oix_driver='$g4vis_build_oix_driver'
|
|---|
| 6617 | g4vis_build_openglqt_driver='$g4vis_build_openglqt_driver'
|
|---|
| 6618 | g4vis_build_openglwin32_driver='$g4vis_build_openglwin32_driver'
|
|---|
| 6619 | g4vis_build_openglx_driver='$g4vis_build_openglx_driver'
|
|---|
| 6620 | g4vis_build_openglxm_driver='$g4vis_build_openglxm_driver'
|
|---|
| 6621 | g4vis_build_raytracer_driver='$g4vis_build_raytracer_driver'
|
|---|
| 6622 | g4vis_build_raytracerx_driver='$g4vis_build_raytracerx_driver'
|
|---|
| 6623 | g4vis_build_vrml_driver='$g4vis_build_vrml_driver'
|
|---|
| 6624 | g4vis_build_vrmlfile_driver='$g4vis_build_vrmlfile_driver'
|
|---|
| 6625 | g4vis_oglhome='$g4vis_oglhome'
|
|---|
| 6626 | g4vis_oivhome='$g4vis_oivhome'
|
|---|
| 6627 | g4vis_use_asciitree='$g4vis_use_asciitree'
|
|---|
| 6628 | g4vis_use_dawn='$g4vis_use_dawn'
|
|---|
| 6629 | g4vis_use_dawnfile='$g4vis_use_dawnfile'
|
|---|
| 6630 | g4vis_use_oiwin32='$g4vis_use_oiwin32'
|
|---|
| 6631 | g4vis_use_oix='$g4vis_use_oix'
|
|---|
| 6632 | g4vis_use_openglqt='$g4vis_use_openglqt'
|
|---|
| 6633 | g4vis_use_openglwin32='$g4vis_use_openglwin32'
|
|---|
| 6634 | g4vis_use_openglx='$g4vis_use_openglx'
|
|---|
| 6635 | g4vis_use_openglxm='$g4vis_use_openglxm'
|
|---|
| 6636 | g4vis_use_raytracer='$g4vis_use_raytracer'
|
|---|
| 6637 | g4vis_use_raytracerx='$g4vis_use_raytracerx'
|
|---|
| 6638 | g4vis_use_vrml='$g4vis_use_vrml'
|
|---|
| 6639 | g4vis_use_vrmlfile='$g4vis_use_vrmlfile'
|
|---|
| 6640 | g4vis_xmflags='$g4vis_xmflags'
|
|---|
| 6641 | g4vis_xmflags='$g4vis_xmflags'
|
|---|
| 6642 | g4vis_xmhome='$g4vis_xmhome'
|
|---|
| 6643 | g4vis_xmhome='$g4vis_xmhome'
|
|---|
| 6644 | g4vis_xmlibs='$g4vis_xmlibs'
|
|---|
| 6645 | g4vis_xmlibs='$g4vis_xmlibs'
|
|---|
| 6646 | g4w_use_g3tog4='$g4w_use_g3tog4'
|
|---|
| 6647 | g4w_use_zlib='$g4w_use_zlib'
|
|---|
| 6648 | g4wanalysis_build='$g4wanalysis_build'
|
|---|
| 6649 | g4wanalysis_build_jas='$g4wanalysis_build_jas'
|
|---|
| 6650 | g4wanalysis_build_lab='$g4wanalysis_build_lab'
|
|---|
| 6651 | g4wanalysis_build_lizard='$g4wanalysis_build_lizard'
|
|---|
| 6652 | g4wanalysis_use='$g4wanalysis_use'
|
|---|
| 6653 | g4wanalysis_use_jas='$g4wanalysis_use_jas'
|
|---|
| 6654 | g4wanalysis_use_lab='$g4wanalysis_use_lab'
|
|---|
| 6655 | g4wanalysis_use_lizard='$g4wanalysis_use_lizard'
|
|---|
| 6656 | g4wlib_build_g3tog4='$g4wlib_build_g3tog4'
|
|---|
| 6657 | g4wlib_build_zlib='$g4wlib_build_zlib'
|
|---|
| 6658 | g4workdir='$g4workdir'
|
|---|
| 6659 | hint='$hint'
|
|---|
| 6660 | lns='$lns'
|
|---|
| 6661 | myuname='$myuname'
|
|---|
| 6662 | n='$n'
|
|---|
| 6663 | osname='$osname'
|
|---|
| 6664 | osvers='$osvers'
|
|---|
| 6665 | package='$package'
|
|---|
| 6666 | sh='$sh'
|
|---|
| 6667 | sharpbang='$sharpbang'
|
|---|
| 6668 | shsharp='$shsharp'
|
|---|
| 6669 | spackage='$spackage'
|
|---|
| 6670 | spitshell='$spitshell'
|
|---|
| 6671 | src='$src'
|
|---|
| 6672 | startsh='$startsh'
|
|---|
| 6673 | EOT
|
|---|
| 6674 |
|
|---|
| 6675 | : add special variables
|
|---|
| 6676 | mkdir -p $g4conf
|
|---|
| 6677 | $test -f $src/patchlevel.h && \
|
|---|
| 6678 | awk '/^#define/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >> $g4conf/config.sh
|
|---|
| 6679 | echo "CONFIG=true" >> $g4conf/config.sh
|
|---|
| 6680 |
|
|---|
| 6681 | : propagate old symbols
|
|---|
| 6682 | if $test -f .config/UU/config.sh; then
|
|---|
| 6683 | <.config/UU/config.sh sort | uniq >.config/UU/oldconfig.sh
|
|---|
| 6684 | sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' $g4conf/config.sh $g4conf/config.sh .config/UU/oldconfig.sh |\
|
|---|
| 6685 | sort | uniq -u >.config/UU/oldsyms
|
|---|
| 6686 | set X `cat .config/UU/oldsyms`
|
|---|
| 6687 | shift
|
|---|
| 6688 | case $# in
|
|---|
| 6689 | 0) ;;
|
|---|
| 6690 | *)
|
|---|
| 6691 | cat <<EOM
|
|---|
| 6692 |
|
|---|
| 6693 | Hmm...You had some extra variables I don't know about...
|
|---|
| 6694 | I'll try to keep 'em...
|
|---|
| 6695 |
|
|---|
| 6696 | EOM
|
|---|
| 6697 | echo "# Variables propagated from previous config.sh file." >>.config/bin/$g4system/config.sh
|
|---|
| 6698 | for sym in `cat .config/UU/oldsyms`; do
|
|---|
| 6699 | echo " Propagating $hint variable "'$'"$sym..."
|
|---|
| 6700 | eval 'tmp="$'"${sym}"'"'
|
|---|
| 6701 | echo "$tmp" | \
|
|---|
| 6702 | sed -e "s/'/'\"'\"'/g" -e "s/^/$sym='/" -e "s/$/'/" >>.config/bin/$g4system/config.sh
|
|---|
| 6703 | done
|
|---|
| 6704 | ;;
|
|---|
| 6705 | esac
|
|---|
| 6706 | fi
|
|---|
| 6707 |
|
|---|
| 6708 | : preserve RCS keywords in files with variable substitution, grrr
|
|---|
| 6709 | Id='$Id'
|
|---|
| 6710 |
|
|---|
| 6711 | : Finish up by extracting the .SH files
|
|---|
| 6712 | case "$alldone" in
|
|---|
| 6713 | exit)
|
|---|
| 6714 | $rm -rf .config/UU
|
|---|
| 6715 | echo "Done."
|
|---|
| 6716 | exit 0
|
|---|
| 6717 | ;;
|
|---|
| 6718 | cont)
|
|---|
| 6719 | ;;
|
|---|
| 6720 | '')
|
|---|
| 6721 | dflt=''
|
|---|
| 6722 | nostick=true
|
|---|
| 6723 | $cat <<EOM
|
|---|
| 6724 |
|
|---|
| 6725 | WARNING: the generated configuration file
|
|---|
| 6726 | can be edited if necessary!
|
|---|
| 6727 | You can introduce any change to the configuration file
|
|---|
| 6728 | $g4conf/config.sh before the final installation.
|
|---|
| 6729 | To do so, use a shell escape now (e.g. !vi $g4conf/config.sh).
|
|---|
| 6730 |
|
|---|
| 6731 | EOM
|
|---|
| 6732 | rp="Press [Enter] to start installation or use a shell escape to edit config.sh:"
|
|---|
| 6733 | . .config/UU/myread
|
|---|
| 6734 | nostick=''
|
|---|
| 6735 | case "$ans" in
|
|---|
| 6736 | '') ;;
|
|---|
| 6737 | *) : in case they cannot read
|
|---|
| 6738 | sh 1>&4 -c "$ans";;
|
|---|
| 6739 | esac
|
|---|
| 6740 | ;;
|
|---|
| 6741 | esac
|
|---|
| 6742 |
|
|---|
| 6743 | : if this fails, just run all the .SH files by hand
|
|---|
| 6744 | . $g4conf/config.sh
|
|---|
| 6745 |
|
|---|
| 6746 | echo " "
|
|---|
| 6747 | exec 1>&4
|
|---|
| 6748 | . ./.config/UU/extract
|
|---|
| 6749 |
|
|---|
| 6750 | if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then
|
|---|
| 6751 | dflt=y
|
|---|
| 6752 | case "$silent" in
|
|---|
| 6753 | true) ;;
|
|---|
| 6754 | *)
|
|---|
| 6755 | $cat <<EOM
|
|---|
| 6756 |
|
|---|
| 6757 | Now you need to generate make dependencies by running "make depend".
|
|---|
| 6758 | You might prefer to run it in background: "make depend > makedepend.out &"
|
|---|
| 6759 | It can take a while, so you might not want to run it right now.
|
|---|
| 6760 |
|
|---|
| 6761 | EOM
|
|---|
| 6762 | ;;
|
|---|
| 6763 | esac
|
|---|
| 6764 | rp="Run make depend now?"
|
|---|
| 6765 | . .config/UU/myread
|
|---|
| 6766 | case "$ans" in
|
|---|
| 6767 | y*)
|
|---|
| 6768 | make depend && echo "Now you must run a make."
|
|---|
| 6769 | ;;
|
|---|
| 6770 | *)
|
|---|
| 6771 | echo "You must run 'make depend' then 'make'."
|
|---|
| 6772 | ;;
|
|---|
| 6773 | esac
|
|---|
| 6774 | elif test -f [Mm]akefile; then
|
|---|
| 6775 | echo " "
|
|---|
| 6776 | echo "Now you must run a make."
|
|---|
| 6777 | elif [ -f $g4conf/install.sh -a X$g4build = Xyes ] ; then
|
|---|
| 6778 | echo " "
|
|---|
| 6779 | echo "Now starting Geant4 libraries build..."
|
|---|
| 6780 | echo " "
|
|---|
| 6781 | . $g4conf/install.sh
|
|---|
| 6782 | elif [ -f $g4conf/install.sh -a X$install = Xyes ] ; then
|
|---|
| 6783 | echo " "
|
|---|
| 6784 | echo "Now starting Geant4 libraries installation..."
|
|---|
| 6785 | echo " "
|
|---|
| 6786 | . $g4conf/move.sh
|
|---|
| 6787 | else
|
|---|
| 6788 | echo " "
|
|---|
| 6789 | echo "WARNING: Geant4 is NOT installed yet!"
|
|---|
| 6790 | echo "You (or the administrator if you have not enough privileges)"
|
|---|
| 6791 | echo "should start with \$G4INSTALL/Configure -install"
|
|---|
| 6792 | echo "(where \$G4INSTALL is Geant4 install directory)."
|
|---|
| 6793 | echo " "
|
|---|
| 6794 | fi
|
|---|
| 6795 |
|
|---|
| 6796 | $rm -f kit*isdone ark*isdone
|
|---|
| 6797 | $rm -rf .config/UU
|
|---|
| 6798 |
|
|---|
| 6799 | : End of Configure
|
|---|
| 6800 |
|
|---|