| 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.104 2008/07/03 14:17:16 bmorgan Exp $
|
|---|
| 22 | #
|
|---|
| 23 | # Generated on Thu Jul 3 14:50:17 BST 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 | Author=''
|
|---|
| 146 | Date=''
|
|---|
| 147 | Header=''
|
|---|
| 148 | Id=''
|
|---|
| 149 | Locker=''
|
|---|
| 150 | Log=''
|
|---|
| 151 | RCSfile=''
|
|---|
| 152 | Revision=''
|
|---|
| 153 | Source=''
|
|---|
| 154 | State=''
|
|---|
| 155 | cf_by=''
|
|---|
| 156 | cf_time=''
|
|---|
| 157 | contains=''
|
|---|
| 158 | d_portable=''
|
|---|
| 159 | g4base=''
|
|---|
| 160 | g4conf=''
|
|---|
| 161 | g4final_install=''
|
|---|
| 162 | g4include=''
|
|---|
| 163 | g4includes_flag=''
|
|---|
| 164 | g4install=''
|
|---|
| 165 | g4workdir=''
|
|---|
| 166 | g4bin=''
|
|---|
| 167 | g4lib=''
|
|---|
| 168 | g4tmp=''
|
|---|
| 169 | g4abladata=''
|
|---|
| 170 | g4data=''
|
|---|
| 171 | g4elasticdata=''
|
|---|
| 172 | g4ledata=''
|
|---|
| 173 | g4levelgammadata=''
|
|---|
| 174 | g4neutronhpcrosssections=''
|
|---|
| 175 | g4radioactivedata=''
|
|---|
| 176 | g4clhep_base_dir=''
|
|---|
| 177 | g4clhep_include_dir=''
|
|---|
| 178 | g4clhep_lib=''
|
|---|
| 179 | g4clhep_lib_dir=''
|
|---|
| 180 | g4lib_build_shared=''
|
|---|
| 181 | g4lib_build_static=''
|
|---|
| 182 | g4lib_use_dll=''
|
|---|
| 183 | g4lib_use_dyn=''
|
|---|
| 184 | g4lib_use_shared=''
|
|---|
| 185 | g4lib_use_static=''
|
|---|
| 186 | g4global=''
|
|---|
| 187 | g4granular=''
|
|---|
| 188 | g4lib_use_granular=''
|
|---|
| 189 | g4debug=''
|
|---|
| 190 | g4ui_build_gag_session=''
|
|---|
| 191 | g4ui_build_terminal_session=''
|
|---|
| 192 | g4ui_build_win32_session=''
|
|---|
| 193 | g4ui_build_xaw_session=''
|
|---|
| 194 | g4ui_build_xm_session=''
|
|---|
| 195 | g4ui_none=''
|
|---|
| 196 | g4ui_use_gag=''
|
|---|
| 197 | g4ui_use_tcsh=''
|
|---|
| 198 | g4ui_use_terminal=''
|
|---|
| 199 | g4ui_use_win32=''
|
|---|
| 200 | g4ui_use_xaw=''
|
|---|
| 201 | g4ui_use_xm=''
|
|---|
| 202 | g4ui_xawflags=''
|
|---|
| 203 | g4ui_xawhome=''
|
|---|
| 204 | g4ui_xawlibs=''
|
|---|
| 205 | g4vis_xmflags=''
|
|---|
| 206 | g4vis_xmhome=''
|
|---|
| 207 | g4vis_xmlibs=''
|
|---|
| 208 | g4_qtmochome=''
|
|---|
| 209 | g4_qtincdir=''
|
|---|
| 210 | g4_qtlibdir=''
|
|---|
| 211 | g4ui_build_qt_session=''
|
|---|
| 212 | g4ui_use_qt=''
|
|---|
| 213 | g4vis_build_asciitree_driver=''
|
|---|
| 214 | g4vis_build_dawn_driver=''
|
|---|
| 215 | g4vis_build_dawnfile_driver=''
|
|---|
| 216 | g4vis_build_oiwin32_driver=''
|
|---|
| 217 | g4vis_build_oix_driver=''
|
|---|
| 218 | g4vis_build_openglwin32_driver=''
|
|---|
| 219 | g4vis_build_openglx_driver=''
|
|---|
| 220 | g4vis_build_openglxm_driver=''
|
|---|
| 221 | g4vis_build_raytracer_driver=''
|
|---|
| 222 | g4vis_build_raytracerx_driver=''
|
|---|
| 223 | g4vis_build_vrml_driver=''
|
|---|
| 224 | g4vis_build_vrmlfile_driver=''
|
|---|
| 225 | g4vis_oglhome=''
|
|---|
| 226 | g4vis_oivhome=''
|
|---|
| 227 | g4vis_use_asciitree=''
|
|---|
| 228 | g4vis_use_dawn=''
|
|---|
| 229 | g4vis_use_dawnfile=''
|
|---|
| 230 | g4vis_use_oiwin32=''
|
|---|
| 231 | g4vis_use_oix=''
|
|---|
| 232 | g4vis_use_openglwin32=''
|
|---|
| 233 | g4vis_use_openglx=''
|
|---|
| 234 | g4vis_use_openglxm=''
|
|---|
| 235 | g4vis_use_raytracer=''
|
|---|
| 236 | g4vis_use_raytracerx=''
|
|---|
| 237 | g4vis_use_vrml=''
|
|---|
| 238 | g4vis_use_vrmlfile=''
|
|---|
| 239 | g4vis_xmflags=''
|
|---|
| 240 | g4vis_xmhome=''
|
|---|
| 241 | g4vis_xmlibs=''
|
|---|
| 242 | g4vis_build_openglqt_driver=''
|
|---|
| 243 | g4vis_use_openglqt=''
|
|---|
| 244 | g4gdml_xercesc_root=''
|
|---|
| 245 | g4lib_build_gdml=''
|
|---|
| 246 | g4wanalysis_build=''
|
|---|
| 247 | g4wanalysis_build_jas=''
|
|---|
| 248 | g4wanalysis_build_lab=''
|
|---|
| 249 | g4wanalysis_build_lizard=''
|
|---|
| 250 | g4wanalysis_use=''
|
|---|
| 251 | g4wanalysis_use_jas=''
|
|---|
| 252 | g4wanalysis_use_lab=''
|
|---|
| 253 | g4wanalysis_use_lizard=''
|
|---|
| 254 | g4_gmake=''
|
|---|
| 255 | g4_gmake_version=''
|
|---|
| 256 | g4_make=''
|
|---|
| 257 | g4_make_version=''
|
|---|
| 258 | g4make=''
|
|---|
| 259 | g4w_use_g3tog4=''
|
|---|
| 260 | g4wlib_build_g3tog4=''
|
|---|
| 261 | g4w_use_zlib=''
|
|---|
| 262 | g4wlib_build_zlib=''
|
|---|
| 263 | lns=''
|
|---|
| 264 | c=''
|
|---|
| 265 | n=''
|
|---|
| 266 | package=''
|
|---|
| 267 | spackage=''
|
|---|
| 268 | sh=''
|
|---|
| 269 | sharpbang=''
|
|---|
| 270 | shsharp=''
|
|---|
| 271 | spitshell=''
|
|---|
| 272 | src=''
|
|---|
| 273 | startsh=''
|
|---|
| 274 | CONFIG=''
|
|---|
| 275 |
|
|---|
| 276 | define='define'
|
|---|
| 277 | undef='undef'
|
|---|
| 278 | smallmach='pdp11 i8086 z8000 i80286 iAPX286'
|
|---|
| 279 | rmlist=''
|
|---|
| 280 |
|
|---|
| 281 | : We must find out about Eunice early
|
|---|
| 282 | eunicefix=':'
|
|---|
| 283 | if test -f /etc/unixtovms; then
|
|---|
| 284 | eunicefix=/etc/unixtovms
|
|---|
| 285 | fi
|
|---|
| 286 | if test -f /etc/unixtovms.exe; then
|
|---|
| 287 | eunicefix=/etc/unixtovms.exe
|
|---|
| 288 | fi
|
|---|
| 289 |
|
|---|
| 290 | #INITIALIZE QT UI OPTIONS
|
|---|
| 291 | g4ui_build_qt_session='n'
|
|---|
| 292 | g4ui_use_qt='n'
|
|---|
| 293 | g4_qtmochome=''
|
|---|
| 294 | g4_qtincdir=''
|
|---|
| 295 | g4_qtlibdir=''
|
|---|
| 296 | #END QT UI OPTIONS
|
|---|
| 297 | #INITIALIZE QT UI OPTIONS
|
|---|
| 298 | g4ui_build_qt_session='n'
|
|---|
| 299 | g4ui_use_qt='n'
|
|---|
| 300 | g4_qtmochome=''
|
|---|
| 301 | g4_qtincdir=''
|
|---|
| 302 | g4_qtlibdir=''
|
|---|
| 303 | #END QT UI OPTIONS
|
|---|
| 304 | #INITIALIZE QT VIS DRIVER OPTIONS
|
|---|
| 305 | g4vis_build_openglqt_driver='n'
|
|---|
| 306 | g4ui_use_openglqt='n'
|
|---|
| 307 | #END QT VIS DRIVER OPTIONS
|
|---|
| 308 |
|
|---|
| 309 | : Find the basic shell for Bourne shell scripts
|
|---|
| 310 | case "$sh" in
|
|---|
| 311 | '')
|
|---|
| 312 | case "$SYSTYPE" in
|
|---|
| 313 | *bsd*|sys5*) xxx="/$SYSTYPE/bin/sh";;
|
|---|
| 314 | *) xxx='/bin/sh';;
|
|---|
| 315 | esac
|
|---|
| 316 | if test -f "$xxx"; then
|
|---|
| 317 | sh="$xxx"
|
|---|
| 318 | else
|
|---|
| 319 | : Build up a list and do a single loop so we can 'break' out.
|
|---|
| 320 | pth=`echo $PATH | sed -e "s/$p_/ /g"`
|
|---|
| 321 | for xxx in sh bash ksh pdksh ash; do
|
|---|
| 322 | for p in $pth; do
|
|---|
| 323 | try="$try ${p}/${xxx}"
|
|---|
| 324 | done
|
|---|
| 325 | done
|
|---|
| 326 | for xxx in $try; do
|
|---|
| 327 | if test -f "$xxx"; then
|
|---|
| 328 | sh="$xxx";
|
|---|
| 329 | break
|
|---|
| 330 | elif test -f "$xxx.exe"; then
|
|---|
| 331 | sh="$xxx";
|
|---|
| 332 | break
|
|---|
| 333 | fi
|
|---|
| 334 | done
|
|---|
| 335 | fi
|
|---|
| 336 | ;;
|
|---|
| 337 | esac
|
|---|
| 338 |
|
|---|
| 339 | case "$sh" in
|
|---|
| 340 | '') cat <<EOM >&2
|
|---|
| 341 | $me: Fatal Error: I can't find a Bourne Shell anywhere.
|
|---|
| 342 |
|
|---|
| 343 | Usually it's in /bin/sh.
|
|---|
| 344 | Please contact Serguei.Sadilov@cern.ch and
|
|---|
| 345 | we'll try to straighten this all out.
|
|---|
| 346 | EOM
|
|---|
| 347 | exit 1
|
|---|
| 348 | ;;
|
|---|
| 349 | esac
|
|---|
| 350 |
|
|---|
| 351 | : see if sh knows # comments
|
|---|
| 352 | if `$sh -c '#' >/dev/null 2>&1`; then
|
|---|
| 353 | shsharp=true
|
|---|
| 354 | spitshell=cat
|
|---|
| 355 | xcat=/bin/cat
|
|---|
| 356 | test -f $xcat || xcat=/usr/bin/cat
|
|---|
| 357 | echo "#!$xcat" >try
|
|---|
| 358 | $eunicefix try
|
|---|
| 359 | chmod +x try
|
|---|
| 360 | #
|
|---|
| 361 | # $xcat is wrong on WIN32: there is no /bin/cat and /usr/bin/cat by default.
|
|---|
| 362 | # But we are sure that sharpbang is to be '#!' and let 'today' will be !=0.
|
|---|
| 363 | #
|
|---|
| 364 | # ./try > today
|
|---|
| 365 | echo "#!$xcat" >today
|
|---|
| 366 |
|
|---|
| 367 | if test -s today; then
|
|---|
| 368 | sharpbang='#!'
|
|---|
| 369 | else
|
|---|
| 370 | echo "#! $xcat" > try
|
|---|
| 371 | $eunicefix try
|
|---|
| 372 | chmod +x try
|
|---|
| 373 | #
|
|---|
| 374 | # $xcat is wrong on WIN32: there is no /bin/cat and /usr/bin/cat by default.
|
|---|
| 375 | # But we are sure that sharpbang is to be '#!' and let 'today' will be !=0.
|
|---|
| 376 | #
|
|---|
| 377 | # ./try > today
|
|---|
| 378 | echo "#!$xcat" >today
|
|---|
| 379 |
|
|---|
| 380 | if test -s today; then
|
|---|
| 381 | sharpbang='#! '
|
|---|
| 382 | else
|
|---|
| 383 | sharpbang=': use '
|
|---|
| 384 | fi
|
|---|
| 385 | fi
|
|---|
| 386 | else
|
|---|
| 387 | echo " "
|
|---|
| 388 | echo "Your $sh doesn't grok # comments--I will strip them later on."
|
|---|
| 389 | shsharp=false
|
|---|
| 390 | cd ..
|
|---|
| 391 | echo "exec grep -v '^[ ]*#'" >spitshell
|
|---|
| 392 | chmod +x spitshell
|
|---|
| 393 | $eunicefix spitshell
|
|---|
| 394 | spitshell=`pwd`/spitshell
|
|---|
| 395 | cd UU
|
|---|
| 396 | echo "I presume that if # doesn't work, #! won't work either!"
|
|---|
| 397 | sharpbang=': use '
|
|---|
| 398 | fi
|
|---|
| 399 | rm -f try today
|
|---|
| 400 |
|
|---|
| 401 | : figure out how to guarantee sh startup
|
|---|
| 402 | case "$startsh" in
|
|---|
| 403 | '') startsh=${sharpbang}${sh} ;;
|
|---|
| 404 | *)
|
|---|
| 405 | esac
|
|---|
| 406 | cat >try <<EOSS
|
|---|
| 407 | $startsh
|
|---|
| 408 | set abc
|
|---|
| 409 | test "$?abc" != 1
|
|---|
| 410 | EOSS
|
|---|
| 411 |
|
|---|
| 412 | chmod +x try
|
|---|
| 413 | $eunicefix try
|
|---|
| 414 | if ./try; then
|
|---|
| 415 | : echo "Yup, it does."
|
|---|
| 416 | else
|
|---|
| 417 | echo "Hmm... '$startsh' does not guarantee sh startup..."
|
|---|
| 418 | echo "You may have to fix up the shell scripts to make sure $sh runs them."
|
|---|
| 419 | fi
|
|---|
| 420 | rm -f try
|
|---|
| 421 |
|
|---|
| 422 | : produce awk script to parse command line options
|
|---|
| 423 | cat >options.awk <<'EOF'
|
|---|
| 424 | BEGIN {
|
|---|
| 425 | optstr = "dD:eEf:hKOrsSU:V"; # getopt-style specification
|
|---|
| 426 |
|
|---|
| 427 | len = length(optstr);
|
|---|
| 428 | for (i = 1; i <= len; i++) {
|
|---|
| 429 | c = substr(optstr, i, 1);
|
|---|
| 430 | if (i < len) a = substr(optstr, i + 1, 1); else a = "";
|
|---|
| 431 | if (a == ":") {
|
|---|
| 432 | arg[c] = 1;
|
|---|
| 433 | i++;
|
|---|
| 434 | }
|
|---|
| 435 | opt[c] = 1;
|
|---|
| 436 | }
|
|---|
| 437 | }
|
|---|
| 438 | {
|
|---|
| 439 | expect = 0;
|
|---|
| 440 | str = $0;
|
|---|
| 441 | if (substr(str, 1, 1) != "-") {
|
|---|
| 442 | printf("'%s'\n", str);
|
|---|
| 443 | next;
|
|---|
| 444 | }
|
|---|
| 445 | len = length($0);
|
|---|
| 446 | for (i = 2; i <= len; i++) {
|
|---|
| 447 | c = substr(str, i, 1);
|
|---|
| 448 | if (!opt[c]) {
|
|---|
| 449 | printf("-%s\n", substr(str, i));
|
|---|
| 450 | next;
|
|---|
| 451 | }
|
|---|
| 452 | printf("-%s\n", c);
|
|---|
| 453 | if (arg[c]) {
|
|---|
| 454 | if (i < len)
|
|---|
| 455 | printf("'%s'\n", substr(str, i + 1));
|
|---|
| 456 | else
|
|---|
| 457 | expect = 1;
|
|---|
| 458 | next;
|
|---|
| 459 | }
|
|---|
| 460 | }
|
|---|
| 461 | }
|
|---|
| 462 | END {
|
|---|
| 463 | if (expect)
|
|---|
| 464 | print "?";
|
|---|
| 465 | }
|
|---|
| 466 | EOF
|
|---|
| 467 |
|
|---|
| 468 | : process the command line options
|
|---|
| 469 | set X `for arg in "$@"; do echo "X$arg"; done |
|
|---|
| 470 | sed -e s/X// | awk -f options.awk`
|
|---|
| 471 | eval "set $*"
|
|---|
| 472 | shift
|
|---|
| 473 | rm -f options.awk
|
|---|
| 474 |
|
|---|
| 475 | : set up default values
|
|---|
| 476 | fastread=''
|
|---|
| 477 | reuseval=false
|
|---|
| 478 | config_sh=''
|
|---|
| 479 | alldone=''
|
|---|
| 480 | error=''
|
|---|
| 481 | silent=''
|
|---|
| 482 | extractsh=''
|
|---|
| 483 | override=''
|
|---|
| 484 | knowitall=''
|
|---|
| 485 | echo "*********"
|
|---|
| 486 | echo `pwd`
|
|---|
| 487 | echo "*********"
|
|---|
| 488 | rm -f optdef.sh
|
|---|
| 489 | cat >optdef.sh <<EOS
|
|---|
| 490 | $startsh
|
|---|
| 491 | EOS
|
|---|
| 492 |
|
|---|
| 493 |
|
|---|
| 494 | : option parsing
|
|---|
| 495 | while test $# -gt 0; do
|
|---|
| 496 | case "$1" in
|
|---|
| 497 | -d) shift; fastread=yes;;
|
|---|
| 498 | -e) shift; alldone=cont;;
|
|---|
| 499 | -build) shift; g4build=yes;;
|
|---|
| 500 | -incflags) shift; g4incflags=yes;;
|
|---|
| 501 | -install) shift; install=yes;;
|
|---|
| 502 | -cppflags) shift; g4cppflags=yes;;
|
|---|
| 503 | -cxxflags) shift; g4cxxflags=yes;;
|
|---|
| 504 | -ldlibs) shift; g4ldlibs=yes;;
|
|---|
| 505 | -ldflags) shift; g4ldflags=yes;;
|
|---|
| 506 | -f)
|
|---|
| 507 | shift
|
|---|
| 508 | cd ../..
|
|---|
| 509 | if test -r "$1"; then
|
|---|
| 510 | config_sh="$1"
|
|---|
| 511 | else
|
|---|
| 512 | echo "$me: cannot read config file $1." >&2
|
|---|
| 513 | error=true
|
|---|
| 514 | fi
|
|---|
| 515 | cd .config/UU
|
|---|
| 516 | shift;;
|
|---|
| 517 | -h) shift; error=true;;
|
|---|
| 518 | -r) shift; reuseval=true;;
|
|---|
| 519 | -s) shift; silent=true; realsilent=true;;
|
|---|
| 520 | -E) shift; alldone=exit;;
|
|---|
| 521 | -K) shift; knowitall=true;;
|
|---|
| 522 | -O) shift; override=true;;
|
|---|
| 523 | -S) shift; silent=true; extractsh=true;;
|
|---|
| 524 | -D)
|
|---|
| 525 | shift
|
|---|
| 526 | case "$1" in
|
|---|
| 527 | *=)
|
|---|
| 528 | echo "$me: use '-U symbol=', not '-D symbol='." >&2
|
|---|
| 529 | echo "$me: ignoring -D $1" >&2
|
|---|
| 530 | ;;
|
|---|
| 531 | *=*) echo "$1" | \
|
|---|
| 532 | sed -e "s/'/'\"'\"'/g" -e "s/=\(.*\)/='\1'/" >> optdef.sh;;
|
|---|
| 533 | *) echo "$1='define'" >> optdef.sh;;
|
|---|
| 534 | esac
|
|---|
| 535 | shift
|
|---|
| 536 | ;;
|
|---|
| 537 | -U)
|
|---|
| 538 | shift
|
|---|
| 539 | case "$1" in
|
|---|
| 540 | *=) echo "$1" >> optdef.sh;;
|
|---|
| 541 | *=*)
|
|---|
| 542 | echo "$me: use '-D symbol=val', not '-U symbol=val'." >&2
|
|---|
| 543 | echo "$me: ignoring -U $1" >&2
|
|---|
| 544 | ;;
|
|---|
| 545 | *) echo "$1='undef'" >> optdef.sh;;
|
|---|
| 546 | esac
|
|---|
| 547 | shift
|
|---|
| 548 | ;;
|
|---|
| 549 | -V) echo "$me generated by metaconfig 3.0 PL70." >&2
|
|---|
| 550 | exit 0;;
|
|---|
| 551 | --) break;;
|
|---|
| 552 | -*) echo "$me: unknown option $1" >&2; shift; error=true;;
|
|---|
| 553 | *) break;;
|
|---|
| 554 | esac
|
|---|
| 555 | done
|
|---|
| 556 |
|
|---|
| 557 | case "$error" in
|
|---|
| 558 | true)
|
|---|
| 559 | cat >&2 <<EOM
|
|---|
| 560 | Usage: $me [-dehrsEKOSV] [-install] [-build] [-libs] [-f config.sh] [-D symbol] [-D symbol=value]
|
|---|
| 561 | [-U symbol] [-U symbol=]
|
|---|
| 562 | -d : use defaults for all answers.
|
|---|
| 563 | -e : go on without questioning past the production of config.sh.
|
|---|
| 564 | -build : start configuration AND build of Geant4 libraries.
|
|---|
| 565 | -cppflags : retrieve the list of cppflags
|
|---|
| 566 | -cxxflags : retrieve the list of cxxflags
|
|---|
| 567 | -incflags : retrieve the list of incflags
|
|---|
| 568 | -install : start installation of Geant4 libraries.
|
|---|
| 569 | -ldflags : retrieve the list of directories where libraries are placed
|
|---|
| 570 | -ldlibs : retrieve the list of libraries to link
|
|---|
| 571 | -f : specify an alternate default configuration file.
|
|---|
| 572 | -h : print this help message and exit (with an error status).
|
|---|
| 573 | -r : reuse C symbols value if possible (skips costly nm extraction).
|
|---|
| 574 | -s : silent mode, only echoes questions and essential information.
|
|---|
| 575 | -D : define symbol to have some value:
|
|---|
| 576 | -D symbol symbol gets the value 'define'
|
|---|
| 577 | -D symbol=value symbol gets the value 'value'
|
|---|
| 578 | -E : stop at the end of questions, after having produced config.sh.
|
|---|
| 579 | -K : do not use unless you know what you are doing.
|
|---|
| 580 | -O : let -D and -U override definitions from loaded configuration file.
|
|---|
| 581 | -S : perform variable substitutions on all .SH files (can mix with -f)
|
|---|
| 582 | -U : undefine symbol:
|
|---|
| 583 | -U symbol symbol gets the value 'undef'
|
|---|
| 584 | -U symbol= symbol gets completely empty
|
|---|
| 585 | -V : print version number and exit (with a zero status).
|
|---|
| 586 | EOM
|
|---|
| 587 | exit 1
|
|---|
| 588 | ;;
|
|---|
| 589 | esac
|
|---|
| 590 |
|
|---|
| 591 | : Sanity checks
|
|---|
| 592 | case "$fastread$alldone" in
|
|---|
| 593 | yescont|yesexit) ;;
|
|---|
| 594 | *)
|
|---|
| 595 | if test ! -t 0; then
|
|---|
| 596 | echo "Say 'sh Configure', not 'sh <Configure'"
|
|---|
| 597 | exit 1
|
|---|
| 598 | fi
|
|---|
| 599 | ;;
|
|---|
| 600 | esac
|
|---|
| 601 |
|
|---|
| 602 | exec 4>&1
|
|---|
| 603 | case "$silent" in
|
|---|
| 604 | true) exec 1>/dev/null;;
|
|---|
| 605 | esac
|
|---|
| 606 |
|
|---|
| 607 | : run the defines and the undefines, if any, but leave the file out there...
|
|---|
| 608 | touch optdef.sh
|
|---|
| 609 | . ./optdef.sh
|
|---|
| 610 |
|
|---|
| 611 | : set package name
|
|---|
| 612 | package=g4conf
|
|---|
| 613 |
|
|---|
| 614 | : Some greps do not return status, grrr.
|
|---|
| 615 | echo "grimblepritz" >grimble
|
|---|
| 616 | if grep blurfldyick grimble >/dev/null 2>&1 ; then
|
|---|
| 617 | contains=contains
|
|---|
| 618 | elif grep grimblepritz grimble >/dev/null 2>&1 ; then
|
|---|
| 619 | contains=grep
|
|---|
| 620 | else
|
|---|
| 621 | contains=contains
|
|---|
| 622 | fi
|
|---|
| 623 | rm -f grimble
|
|---|
| 624 | : the following should work in any shell
|
|---|
| 625 | case "$contains" in
|
|---|
| 626 | contains*)
|
|---|
| 627 | echo " "
|
|---|
| 628 | echo "Grep doesn't return a status!! Attempting remedial action."
|
|---|
| 629 | cat >contains <<'EOSS'
|
|---|
| 630 | grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
|
|---|
| 631 | EOSS
|
|---|
| 632 | chmod +x contains
|
|---|
| 633 | esac
|
|---|
| 634 |
|
|---|
| 635 | : first determine how to suppress newline on echo command
|
|---|
| 636 | #echo " "
|
|---|
| 637 | #echo "Checking echo to see how to suppress newlines..."
|
|---|
| 638 | (echo "hi there\c" ; echo " ") >.echotmp
|
|---|
| 639 | if $contains c .echotmp >/dev/null 2>&1 ; then
|
|---|
| 640 | # echo "...using -n."
|
|---|
| 641 | n='-n'
|
|---|
| 642 | c=''
|
|---|
| 643 | else
|
|---|
| 644 | # cat <<'EOM'
|
|---|
| 645 | #...using \c
|
|---|
| 646 | #EOM
|
|---|
| 647 | n=''
|
|---|
| 648 | c='\c'
|
|---|
| 649 | fi
|
|---|
| 650 | #echo $n "The star should be here-->$c"
|
|---|
| 651 | #echo '*'
|
|---|
| 652 | rm -f .echotmp
|
|---|
| 653 |
|
|---|
| 654 | : compute the number of columns on the terminal for proper question formatting
|
|---|
| 655 | case "$COLUMNS" in
|
|---|
| 656 | '') COLUMNS='80';;
|
|---|
| 657 | esac
|
|---|
| 658 |
|
|---|
| 659 | : set up the echo used in my read
|
|---|
| 660 | myecho="case \"\$xxxm\" in
|
|---|
| 661 | '') echo $n \"\$rp $c\" >&4;;
|
|---|
| 662 | *) case \"\$rp\" in
|
|---|
| 663 | '') echo $n \"[\$xxxm] $c\";;
|
|---|
| 664 | *)
|
|---|
| 665 | if test \`echo \"\$rp [\$xxxm] \" | wc -c\` -ge $COLUMNS; then
|
|---|
| 666 | echo \"\$rp\" >&4
|
|---|
| 667 | echo $n \"[\$xxxm] $c\" >&4
|
|---|
| 668 | else
|
|---|
| 669 | echo $n \"\$rp [\$xxxm] $c\" >&4
|
|---|
| 670 | fi
|
|---|
| 671 | ;;
|
|---|
| 672 | esac;;
|
|---|
| 673 | esac"
|
|---|
| 674 |
|
|---|
| 675 | : now set up to do reads with possible shell escape and default assignment
|
|---|
| 676 | cat <<EOSC >myread
|
|---|
| 677 | $startsh
|
|---|
| 678 | xxxm=\$dflt
|
|---|
| 679 | $myecho
|
|---|
| 680 | ans='!'
|
|---|
| 681 | case "\$fastread" in
|
|---|
| 682 | yes) case "\$dflt" in
|
|---|
| 683 | '') ;;
|
|---|
| 684 | *) ans='';
|
|---|
| 685 | case "\$silent-\$rp" in
|
|---|
| 686 | true-) ;;
|
|---|
| 687 | *) echo " " >&4;;
|
|---|
| 688 | esac;;
|
|---|
| 689 | esac;;
|
|---|
| 690 | *) case "\$silent" in
|
|---|
| 691 | true) case "\$rp" in
|
|---|
| 692 | '') ans='';;
|
|---|
| 693 | esac;;
|
|---|
| 694 | esac;;
|
|---|
| 695 | esac
|
|---|
| 696 | while expr "X\$ans" : "X!" >/dev/null; do
|
|---|
| 697 | read answ
|
|---|
| 698 | set x \$xxxm
|
|---|
| 699 | shift
|
|---|
| 700 | aok=''; eval "ans=\\"\$answ\\"" && aok=y
|
|---|
| 701 | case "\$answ" in
|
|---|
| 702 | "!")
|
|---|
| 703 | sh 1>&4
|
|---|
| 704 | echo " "
|
|---|
| 705 | $myecho
|
|---|
| 706 | ;;
|
|---|
| 707 | !*)
|
|---|
| 708 | set x \`expr "X\$ans" : "X!\(.*\)\$"\`
|
|---|
| 709 | shift
|
|---|
| 710 | sh 1>&4 -c "\$*"
|
|---|
| 711 | echo " "
|
|---|
| 712 | $myecho
|
|---|
| 713 | ;;
|
|---|
| 714 | "\$ans")
|
|---|
| 715 | case "\$ans" in
|
|---|
| 716 | \\&*)
|
|---|
| 717 | set x \`expr "X\$ans" : "X&\(.*\)\$"\`
|
|---|
| 718 | shift
|
|---|
| 719 | case "\$1" in
|
|---|
| 720 | -d)
|
|---|
| 721 | fastread=yes
|
|---|
| 722 | echo "(OK, I'll run with -d after this question.)" >&4
|
|---|
| 723 | ;;
|
|---|
| 724 | -*)
|
|---|
| 725 | echo "*** Sorry, \$1 not supported yet." >&4
|
|---|
| 726 | ;;
|
|---|
| 727 | esac
|
|---|
| 728 | $myecho
|
|---|
| 729 | ans=!
|
|---|
| 730 | ;;
|
|---|
| 731 | esac;;
|
|---|
| 732 | *)
|
|---|
| 733 | case "\$aok" in
|
|---|
| 734 | y)
|
|---|
| 735 | echo "*** Substitution done -- please confirm."
|
|---|
| 736 | xxxm="\$ans"
|
|---|
| 737 | ans=\`echo $n "\$ans$c" | tr '\012' ' '\`
|
|---|
| 738 | xxxm="\$ans"
|
|---|
| 739 | ans=!
|
|---|
| 740 | ;;
|
|---|
| 741 | *)
|
|---|
| 742 | echo "*** Error -- try again."
|
|---|
| 743 | ans=!
|
|---|
| 744 | ;;
|
|---|
| 745 | esac
|
|---|
| 746 | $myecho
|
|---|
| 747 | ;;
|
|---|
| 748 | esac
|
|---|
| 749 | case "\$ans\$xxxm\$nostick" in
|
|---|
| 750 | '')
|
|---|
| 751 | ans=!
|
|---|
| 752 | $myecho
|
|---|
| 753 | ;;
|
|---|
| 754 | esac
|
|---|
| 755 | done
|
|---|
| 756 | case "\$ans" in
|
|---|
| 757 | '') ans="\$xxxm";;
|
|---|
| 758 | esac
|
|---|
| 759 | EOSC
|
|---|
| 760 |
|
|---|
| 761 | : Find the path to the source tree
|
|---|
| 762 | case "$src" in
|
|---|
| 763 | '') src=`echo $0 | sed -e 's%/[^/][^/]*$%%'`
|
|---|
| 764 | #echo "src=$src"
|
|---|
| 765 | ;;
|
|---|
| 766 | esac
|
|---|
| 767 | case "$src" in
|
|---|
| 768 | '')
|
|---|
| 769 | src=.
|
|---|
| 770 | rsrc=..
|
|---|
| 771 | ;;
|
|---|
| 772 | /*) rsrc="$src/.."
|
|---|
| 773 | #echo "rsrc=$rsrc"
|
|---|
| 774 | ;;
|
|---|
| 775 | ./*) cur_dir=`pwd`
|
|---|
| 776 | cd ../../$src
|
|---|
| 777 | src=`pwd`
|
|---|
| 778 | cd $cur_dir
|
|---|
| 779 | rsrc="$src/.."
|
|---|
| 780 | rsrc="$src/.."
|
|---|
| 781 | #echo "src=$src"
|
|---|
| 782 | #echo "rsrc=$rsrc"
|
|---|
| 783 | ;;
|
|---|
| 784 | *) rsrc="../../$src"
|
|---|
| 785 | #echo "rsrc=$rsrc"
|
|---|
| 786 | ;;
|
|---|
| 787 | esac
|
|---|
| 788 | #cur_dir=`pwd`
|
|---|
| 789 | #echo "cur_dir=$cur_dir"
|
|---|
| 790 | if test -f $src/Configure && \
|
|---|
| 791 | $contains "^package=$package" $src/Configure >/dev/null 2>&1
|
|---|
| 792 | then
|
|---|
| 793 | : found it, so we are ok.
|
|---|
| 794 | else
|
|---|
| 795 | rsrc=''
|
|---|
| 796 | for src in . .. ../.. ../../.. ../../../..; do
|
|---|
| 797 | if test -f ../../$src/Configure && \
|
|---|
| 798 | $contains "^package=$package" ../../$src/Configure >/dev/null 2>&1
|
|---|
| 799 | then
|
|---|
| 800 | rsrc=../../$src
|
|---|
| 801 | break
|
|---|
| 802 | fi
|
|---|
| 803 | done
|
|---|
| 804 | fi
|
|---|
| 805 | case "$rsrc" in
|
|---|
| 806 | '')
|
|---|
| 807 | echo " "
|
|---|
| 808 | # dflt=
|
|---|
| 809 | # rp="Directory where sources for $package are located?"
|
|---|
| 810 | # . ./myread
|
|---|
| 811 | # src="$ans"
|
|---|
| 812 | rsrc="$src"
|
|---|
| 813 | #echo "src=$src"
|
|---|
| 814 | #echo "rsrc=$rsrc"
|
|---|
| 815 | if test -f $rsrc/Configure && \
|
|---|
| 816 | $contains "^package=$package" $rsrc/Configure >/dev/null 2>&1
|
|---|
| 817 | then
|
|---|
| 818 | echo "Ok, I've found them under $src"
|
|---|
| 819 | else
|
|---|
| 820 | echo "Sorry, I can't seem to be able to locate $package sources." >&4
|
|---|
| 821 | echo "Please, use absolute path or relative with './' to Configure." >&4
|
|---|
| 822 | exit 1
|
|---|
| 823 | fi
|
|---|
| 824 | ;;
|
|---|
| 825 | ../../.) ;;
|
|---|
| 826 | *)
|
|---|
| 827 | # echo " "
|
|---|
| 828 | # echo "Sources for $package found in $src" >&4
|
|---|
| 829 | ;;
|
|---|
| 830 | esac
|
|---|
| 831 |
|
|---|
| 832 | : script used to extract .SH files with variable substitutions
|
|---|
| 833 | cat >extract <<'EOS'
|
|---|
| 834 | CONFIG=true
|
|---|
| 835 | #echo "Doing variable substitutions on .SH files..."
|
|---|
| 836 | if test -f $src/MANIFEST; then
|
|---|
| 837 | set x `awk '{print $1}' <$src/MANIFEST | grep '\.SH'`
|
|---|
| 838 | else
|
|---|
| 839 | # echo "(Looking for .SH files under the source directory.)"
|
|---|
| 840 | set x `(cd $src; find ./config/scripts -name "*.SH" -print)`
|
|---|
| 841 | fi
|
|---|
| 842 | shift
|
|---|
| 843 | case $# in
|
|---|
| 844 | 0) set x `(cd $src; echo *.SH)`; shift;;
|
|---|
| 845 | esac
|
|---|
| 846 | if test ! -f $src/$1; then
|
|---|
| 847 | shift
|
|---|
| 848 | fi
|
|---|
| 849 | mkdir_p='
|
|---|
| 850 | name=$1;
|
|---|
| 851 | create="";
|
|---|
| 852 | while test $name; do
|
|---|
| 853 | if test ! -d "$name"; then
|
|---|
| 854 | create="$name $create";
|
|---|
| 855 | name=`echo $name | sed -e "s|^[^/]*$||"`;
|
|---|
| 856 | name=`echo $name | sed -e "s|\(.*\)/.*|\1|"`;
|
|---|
| 857 | else
|
|---|
| 858 | name="";
|
|---|
| 859 | fi;
|
|---|
| 860 | done;
|
|---|
| 861 | for file in $create; do
|
|---|
| 862 | mkdir $file;
|
|---|
| 863 | done
|
|---|
| 864 | '
|
|---|
| 865 | for file in $*; do
|
|---|
| 866 | case "$src" in
|
|---|
| 867 | ".")
|
|---|
| 868 | case "$file" in
|
|---|
| 869 | */*)
|
|---|
| 870 | dir=`expr X$file : 'X\(.*\)/'`
|
|---|
| 871 | file_SH=`expr X$file : 'X.*/\(.*\)'`
|
|---|
| 872 | file_EX=`expr X$file : 'X.*/\(.*\).SH'`
|
|---|
| 873 | (cd $dir && . ./$file_SH && mkdir -p $abssrc/.config/bin/$g4system && mv $file_EX $abssrc/.config/bin/$g4system)
|
|---|
| 874 | # echo Sergei_1
|
|---|
| 875 | # echo "file_SH=$file_SH"
|
|---|
| 876 | # echo "file_EX=$file_EX"
|
|---|
| 877 | # echo "file=$file"
|
|---|
| 878 | # echo "dir=$dir"
|
|---|
| 879 | # echo "src=$src"
|
|---|
| 880 | # echo "g4system=$g4system"
|
|---|
| 881 | # echo Sergei_1
|
|---|
| 882 | ;;
|
|---|
| 883 | *)
|
|---|
| 884 | file_SH=`expr X$file : 'X.*/\(.*\)'`
|
|---|
| 885 | file_EX=`expr X$file : 'X.*/\(.*\).SH'`
|
|---|
| 886 | (. ./$file && mkdir -p $abssrc/.config/bin/$g4system && mv file-SH $abssrc/.config/bin/$g4system)
|
|---|
| 887 | # echo Sergei_2
|
|---|
| 888 | # echo "file_SH=$file_SH"
|
|---|
| 889 | # echo "file_EX=$file_EX"
|
|---|
| 890 | # echo "file=$file"
|
|---|
| 891 | # echo "dir=$dir"
|
|---|
| 892 | # echo "src=$src"
|
|---|
| 893 | # echo "g4system=$g4system"
|
|---|
| 894 | # echo Sergei_2
|
|---|
| 895 | ;;
|
|---|
| 896 | esac
|
|---|
| 897 | ;;
|
|---|
| 898 | *)
|
|---|
| 899 | case "$file" in
|
|---|
| 900 | */*)
|
|---|
| 901 | dir=`expr X$file : 'X\(.*\)/'`
|
|---|
| 902 | file_SH=`expr X$file : 'X.*/\(.*\)'`
|
|---|
| 903 | file_EX=`expr X$file : 'X.*/\(.*\)\.SH'`
|
|---|
| 904 | (set x $dir; shift; eval $mkdir_p)
|
|---|
| 905 |
|
|---|
| 906 | (sh <$src/$dir/$file_SH && mkdir -p $src/.config/bin/$g4system && mv $file_EX $src/.config/bin/$g4system)
|
|---|
| 907 |
|
|---|
| 908 | # echo Sergei_3
|
|---|
| 909 | # echo "dir=$dir"
|
|---|
| 910 | # echo "file=$file"
|
|---|
| 911 |
|
|---|
| 912 | # echo Sergei_3
|
|---|
| 913 | ;;
|
|---|
| 914 | *)
|
|---|
| 915 | file_SH=`expr X$file : 'X.*/\(.*\)'`
|
|---|
| 916 | file_EX=`expr X$file : 'X.*/\(.*\)\.SH'`
|
|---|
| 917 | (sh <$src/$file && mkdir -p $src/.config/bin/$g4system && mv $file_EX $src/.config/bin/$g4system)
|
|---|
| 918 | echo Sergei_4
|
|---|
| 919 | ;;
|
|---|
| 920 | esac
|
|---|
| 921 | ;;
|
|---|
| 922 | esac
|
|---|
| 923 | done
|
|---|
| 924 | if test -f $src/config_h.SH; then
|
|---|
| 925 | if test ! -f config.h; then
|
|---|
| 926 | : oops, they left it out of MANIFEST, probably, so do it anyway.
|
|---|
| 927 | . $src/config_h.SH
|
|---|
| 928 | fi
|
|---|
| 929 | fi
|
|---|
| 930 | EOS
|
|---|
| 931 |
|
|---|
| 932 | : extract files and exit if asked to do so
|
|---|
| 933 | case "$extractsh" in
|
|---|
| 934 | true)
|
|---|
| 935 | case "$realsilent" in
|
|---|
| 936 | true) ;;
|
|---|
| 937 | *) exec 1>&4;;
|
|---|
| 938 | esac
|
|---|
| 939 | case "$config_sh" in
|
|---|
| 940 | '') config_sh='$g4conf/config.sh'; config="$g4conf/config.sh";;
|
|---|
| 941 | /*) config="$g4conf/$config_sh";;
|
|---|
| 942 | *) config="$g4conf/$config_sh";;
|
|---|
| 943 | esac
|
|---|
| 944 | echo " "
|
|---|
| 945 | echo "Fetching answers from $config_sh..."
|
|---|
| 946 | . $config
|
|---|
| 947 | test "$override" && . ./optdef.sh
|
|---|
| 948 | echo " "
|
|---|
| 949 | cd ../..
|
|---|
| 950 | . .config/UU/extract
|
|---|
| 951 | rm -rf .config/UU
|
|---|
| 952 | echo "Done."
|
|---|
| 953 | exit 0
|
|---|
| 954 | ;;
|
|---|
| 955 | esac
|
|---|
| 956 |
|
|---|
| 957 | : Eunice requires " " instead of "", can you believe it
|
|---|
| 958 | #echo " "
|
|---|
| 959 | : Here we go...
|
|---|
| 960 | #if [ X$install = Xyes ] ; then
|
|---|
| 961 | #echo " "
|
|---|
| 962 | #echo " "
|
|---|
| 963 | #echo " "
|
|---|
| 964 | #echo " --- Geant4 Toolkit Installation ---"
|
|---|
| 965 | #echo " "
|
|---|
| 966 | #echo " "
|
|---|
| 967 | #echo " "
|
|---|
| 968 | #echo " "
|
|---|
| 969 | #else
|
|---|
| 970 | #echo " "
|
|---|
| 971 | #echo " "
|
|---|
| 972 | #echo " "
|
|---|
| 973 | #echo " --- Geant4 Toolkit Installation ---"
|
|---|
| 974 | #echo " (setting environments for USER )"
|
|---|
| 975 | #echo " "
|
|---|
| 976 | #echo " "
|
|---|
| 977 | #echo " "
|
|---|
| 978 | #fi
|
|---|
| 979 |
|
|---|
| 980 | trap 'echo " ";rm -rf ../../.config/UU; test -d ../../.config/UU && rm -rf X $rmlist; exit 1' 1 2 3 15
|
|---|
| 981 |
|
|---|
| 982 | : create .config dir to save info across Configure sessions
|
|---|
| 983 | test -d ../.config || mkdir ../.config
|
|---|
| 984 | cat >../.config/README <<EOF
|
|---|
| 985 | This directory created by Configure to save information that should
|
|---|
| 986 | persist across sessions for $package.
|
|---|
| 987 |
|
|---|
| 988 | You may safely delete it if you wish.
|
|---|
| 989 | EOF
|
|---|
| 990 |
|
|---|
| 991 | : general instructions
|
|---|
| 992 | needman=true
|
|---|
| 993 | firsttime=true
|
|---|
| 994 | user=`(logname) 2>/dev/null`
|
|---|
| 995 | case "$user" in
|
|---|
| 996 | '') user=`whoami 2>&1`;;
|
|---|
| 997 | esac
|
|---|
| 998 |
|
|---|
| 999 | #if [ X$install = Xyes ] ; then
|
|---|
| 1000 | #
|
|---|
| 1001 | #echo " "
|
|---|
| 1002 | #echo " "
|
|---|
| 1003 | #echo " "
|
|---|
| 1004 | #echo " --- Geant4 Toolkit Installation ---"
|
|---|
| 1005 | #echo " "
|
|---|
| 1006 | #echo " "
|
|---|
| 1007 | #echo " "
|
|---|
| 1008 | #echo " "
|
|---|
| 1009 | #
|
|---|
| 1010 | ##if $contains "^$user\$" ../../.config/instruct >/dev/null 2>&1; then
|
|---|
| 1011 | ## firsttime=false
|
|---|
| 1012 | ## echo " "
|
|---|
| 1013 | ## rp='Would you like to see the instructions?'
|
|---|
| 1014 | ## dflt=n
|
|---|
| 1015 | ## . ./myread
|
|---|
| 1016 | ## case "$ans" in
|
|---|
| 1017 | ## [yY]*) ;;
|
|---|
| 1018 | ## *) needman=false;;
|
|---|
| 1019 | ## esac
|
|---|
| 1020 | ##fi
|
|---|
| 1021 | #fi
|
|---|
| 1022 |
|
|---|
| 1023 | if [ X$g4build = Xyes ] ; then
|
|---|
| 1024 |
|
|---|
| 1025 | echo " "
|
|---|
| 1026 | echo " "
|
|---|
| 1027 | echo " "
|
|---|
| 1028 | echo " --- Geant4 Toolkit Build ---"
|
|---|
| 1029 | echo " "
|
|---|
| 1030 | echo " "
|
|---|
| 1031 | echo " "
|
|---|
| 1032 | echo " "
|
|---|
| 1033 |
|
|---|
| 1034 | if $contains "^$user\$" ../../.config/instruct >/dev/null 2>&1; then
|
|---|
| 1035 | firsttime=false
|
|---|
| 1036 | echo " "
|
|---|
| 1037 | rp='Would you like to see the instructions?'
|
|---|
| 1038 | dflt=n
|
|---|
| 1039 | . ./myread
|
|---|
| 1040 | case "$ans" in
|
|---|
| 1041 | [yY]*) ;;
|
|---|
| 1042 | *) needman=false;;
|
|---|
| 1043 | esac
|
|---|
| 1044 | fi
|
|---|
| 1045 | fi
|
|---|
| 1046 |
|
|---|
| 1047 | if [ X$install = Xyes ] ; then
|
|---|
| 1048 | needman=false
|
|---|
| 1049 | fi
|
|---|
| 1050 |
|
|---|
| 1051 | if [ X$install = X -a X$g4build = X ] ; then
|
|---|
| 1052 | needman=false
|
|---|
| 1053 | fi
|
|---|
| 1054 |
|
|---|
| 1055 | if $needman; then
|
|---|
| 1056 | cat <<EOH
|
|---|
| 1057 |
|
|---|
| 1058 | This installation shell script will examine your system and ask you questions
|
|---|
| 1059 | to determine how the Geant4 Toolkit should be installed. If you get stuck on
|
|---|
| 1060 | a question, you may use a ! shell escape to start a subshell or execute a
|
|---|
| 1061 | command. Many of the questions will have default answers in square brackets;
|
|---|
| 1062 | typing carriage return will set the default.
|
|---|
| 1063 |
|
|---|
| 1064 | On AFS it is allowed to specify either absolute or relative
|
|---|
| 1065 | paths (i.e. starting with the ~username construct).
|
|---|
| 1066 |
|
|---|
| 1067 | EOH
|
|---|
| 1068 | rp=''
|
|---|
| 1069 | dflt='Type carriage return to continue'
|
|---|
| 1070 | . ./myread
|
|---|
| 1071 | cat <<'EOH'
|
|---|
| 1072 |
|
|---|
| 1073 | The prompt used in this script allows you to use shell variables and backticks
|
|---|
| 1074 | in your answers. You may use $1, $2, etc... to refer to the words in the
|
|---|
| 1075 | default answer, as if the default line was a set of arguments given to a
|
|---|
| 1076 | script shell. This means you may also use $* to repeat the whole default line.
|
|---|
| 1077 |
|
|---|
| 1078 | Everytime there is a substitution, you will have to confirm. If there is an
|
|---|
| 1079 | error (e.g. an unmatched backtick), the default answer will remain unchanged
|
|---|
| 1080 | and you will be prompted again.
|
|---|
| 1081 |
|
|---|
| 1082 | Running 'Configure -d' will bypass nearly all the questions and
|
|---|
| 1083 | use the computed defaults (or answers saved in a configuration
|
|---|
| 1084 | previously generated).
|
|---|
| 1085 |
|
|---|
| 1086 | Type 'Configure -h' for a list of options.
|
|---|
| 1087 |
|
|---|
| 1088 | You may also start interactively and then answer '& -d' at any prompt to turn
|
|---|
| 1089 | on the non-interactive behaviour for the rest of the execution.
|
|---|
| 1090 |
|
|---|
| 1091 | EOH
|
|---|
| 1092 | . ./myread
|
|---|
| 1093 | cat <<EOH
|
|---|
| 1094 |
|
|---|
| 1095 | Much effort has been spent to ensure that this shell script will run on any
|
|---|
| 1096 | Unix system. If despite that you can't run Configure for some reason, you'll
|
|---|
| 1097 | have to set the proper environment variables by hand and follow the "manual"
|
|---|
| 1098 | installation as specified in the Geant4 Installation Guide.
|
|---|
| 1099 |
|
|---|
| 1100 | EOH
|
|---|
| 1101 | dflt='Type carriage return to continue'
|
|---|
| 1102 | . ./myread
|
|---|
| 1103 | case "$firsttime" in
|
|---|
| 1104 | true) echo $user >>../../.config/instruct;;
|
|---|
| 1105 | esac
|
|---|
| 1106 | fi
|
|---|
| 1107 |
|
|---|
| 1108 | : find out where common programs are
|
|---|
| 1109 | #echo " "
|
|---|
| 1110 | #echo "Locating common programs..." >&4
|
|---|
| 1111 | cat <<EOSC >loc
|
|---|
| 1112 | $startsh
|
|---|
| 1113 | case \$# in
|
|---|
| 1114 | 0) exit 1;;
|
|---|
| 1115 | esac
|
|---|
| 1116 | thing=\$1
|
|---|
| 1117 | shift
|
|---|
| 1118 | dflt=\$1
|
|---|
| 1119 | shift
|
|---|
| 1120 | for dir in \$*; do
|
|---|
| 1121 | case "\$thing" in
|
|---|
| 1122 | .)
|
|---|
| 1123 | if test -d \$dir/\$thing; then
|
|---|
| 1124 | echo \$dir
|
|---|
| 1125 | exit 0
|
|---|
| 1126 | fi
|
|---|
| 1127 | ;;
|
|---|
| 1128 | *)
|
|---|
| 1129 | for thisthing in \$dir/\$thing; do
|
|---|
| 1130 | : just loop through to pick last item
|
|---|
| 1131 | done
|
|---|
| 1132 | if test -f \$thisthing; then
|
|---|
| 1133 | echo \$thisthing
|
|---|
| 1134 | exit 0
|
|---|
| 1135 | elif test -f \$dir/\$thing.exe; then
|
|---|
| 1136 | : on Eunice apparently
|
|---|
| 1137 | echo \$dir/\$thing
|
|---|
| 1138 | exit 0
|
|---|
| 1139 | fi
|
|---|
| 1140 | ;;
|
|---|
| 1141 | esac
|
|---|
| 1142 | done
|
|---|
| 1143 | echo \$dflt
|
|---|
| 1144 | exit 1
|
|---|
| 1145 | EOSC
|
|---|
| 1146 | chmod +x loc
|
|---|
| 1147 | $eunicefix loc
|
|---|
| 1148 | loclist="
|
|---|
| 1149 | awk
|
|---|
| 1150 | cat
|
|---|
| 1151 | expr
|
|---|
| 1152 | grep
|
|---|
| 1153 | rm
|
|---|
| 1154 | sed
|
|---|
| 1155 | touch
|
|---|
| 1156 | tr
|
|---|
| 1157 | "
|
|---|
| 1158 | trylist="
|
|---|
| 1159 | date
|
|---|
| 1160 | gcc
|
|---|
| 1161 | ln
|
|---|
| 1162 | test
|
|---|
| 1163 | uname
|
|---|
| 1164 | "
|
|---|
| 1165 | pth=`echo $PATH | sed -e "s/$p_/ /g"`
|
|---|
| 1166 | pth="$pth /lib /usr/lib"
|
|---|
| 1167 | for file in $loclist; do
|
|---|
| 1168 | eval xxx=\$$file
|
|---|
| 1169 | case "$xxx" in
|
|---|
| 1170 | /*|?:[\\/]*)
|
|---|
| 1171 | if test -f "$xxx"; then
|
|---|
| 1172 | : ok
|
|---|
| 1173 | else
|
|---|
| 1174 | echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
|
|---|
| 1175 | xxx=`./loc $file $file $pth`
|
|---|
| 1176 | fi
|
|---|
| 1177 | ;;
|
|---|
| 1178 | '') xxx=`./loc $file $file $pth`;;
|
|---|
| 1179 | *) xxx=`./loc $xxx $xxx $pth`;;
|
|---|
| 1180 | esac
|
|---|
| 1181 | eval $file=$xxx
|
|---|
| 1182 | eval _$file=$xxx
|
|---|
| 1183 | case "$xxx" in
|
|---|
| 1184 | /*)
|
|---|
| 1185 | echo "$file is in $xxx." > /dev/null
|
|---|
| 1186 | ;;
|
|---|
| 1187 | ?:[\\/]*)
|
|---|
| 1188 | echo "$file is in $xxx." > /dev/null
|
|---|
| 1189 | ;;
|
|---|
| 1190 | *)
|
|---|
| 1191 | echo "I don't know where '$file' is." >&4
|
|---|
| 1192 | echo "Please, install it or fix your PATH settings!" >&4
|
|---|
| 1193 | exit 1
|
|---|
| 1194 | ;;
|
|---|
| 1195 | esac
|
|---|
| 1196 | done
|
|---|
| 1197 | #echo " "
|
|---|
| 1198 | #echo "Don't worry if any of the following aren't found..."
|
|---|
| 1199 | say=offhand
|
|---|
| 1200 | for file in $trylist; do
|
|---|
| 1201 | eval xxx=\$$file
|
|---|
| 1202 | case "$xxx" in
|
|---|
| 1203 | /*|?:[\\/]*)
|
|---|
| 1204 | if test -f "$xxx"; then
|
|---|
| 1205 | : ok
|
|---|
| 1206 | else
|
|---|
| 1207 | echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
|
|---|
| 1208 | xxx=`./loc $file $file $pth`
|
|---|
| 1209 | fi
|
|---|
| 1210 | ;;
|
|---|
| 1211 | '') xxx=`./loc $file $file $pth`;;
|
|---|
| 1212 | *) xxx=`./loc $xxx $xxx $pth`;;
|
|---|
| 1213 | esac
|
|---|
| 1214 | eval $file=$xxx
|
|---|
| 1215 | eval _$file=$xxx
|
|---|
| 1216 | case "$xxx" in
|
|---|
| 1217 | /*)
|
|---|
| 1218 | echo "$file is in $xxx." > /dev/null
|
|---|
| 1219 | ;;
|
|---|
| 1220 | ?:[\\/]*)
|
|---|
| 1221 | echo "$file is in $xxx." > /dev/null
|
|---|
| 1222 | ;;
|
|---|
| 1223 | *)
|
|---|
| 1224 | echo "I don't see $file out there, $say."
|
|---|
| 1225 | say=either
|
|---|
| 1226 | ;;
|
|---|
| 1227 | esac
|
|---|
| 1228 | done
|
|---|
| 1229 | case "$egrep" in
|
|---|
| 1230 | egrep)
|
|---|
| 1231 | # echo "Substituting grep for egrep."
|
|---|
| 1232 | egrep=$grep
|
|---|
| 1233 | ;;
|
|---|
| 1234 | esac
|
|---|
| 1235 | case "$ln" in
|
|---|
| 1236 | ln)
|
|---|
| 1237 | # echo "Substituting cp for ln."
|
|---|
| 1238 | ln=$cp
|
|---|
| 1239 | ;;
|
|---|
| 1240 | esac
|
|---|
| 1241 | case "$test" in
|
|---|
| 1242 | test)
|
|---|
| 1243 | echo "Hopefully test is built into your sh." > /dev/null
|
|---|
| 1244 | ;;
|
|---|
| 1245 | *)
|
|---|
| 1246 | if `sh -c "PATH= test true" >/dev/null 2>&1`; then
|
|---|
| 1247 | echo "Using the test built into your sh." > /dev/null
|
|---|
| 1248 | test=test
|
|---|
| 1249 | _test=test
|
|---|
| 1250 | fi
|
|---|
| 1251 | ;;
|
|---|
| 1252 | esac
|
|---|
| 1253 | case "$echo" in
|
|---|
| 1254 | echo)
|
|---|
| 1255 | echo "Hopefully echo is built into your sh." > /dev/null
|
|---|
| 1256 | ;;
|
|---|
| 1257 | '') ;;
|
|---|
| 1258 | *)
|
|---|
| 1259 | # echo " "
|
|---|
| 1260 | #echo "Checking compatibility between $echo and builtin echo (if any)..." >&4
|
|---|
| 1261 | $echo $n "hi there$c" >foo1
|
|---|
| 1262 | echo $n "hi there$c" >foo2
|
|---|
| 1263 | if cmp foo1 foo2 >/dev/null 2>&1; then
|
|---|
| 1264 | echo "They are compatible. In fact, they may be identical." > /dev/null
|
|---|
| 1265 | else
|
|---|
| 1266 | case "$n" in
|
|---|
| 1267 | '-n') n='' c='\c';;
|
|---|
| 1268 | *) n='-n' c='';;
|
|---|
| 1269 | esac
|
|---|
| 1270 | cat <<FOO
|
|---|
| 1271 | They are not compatible! You are probably running ksh on a non-USG system.
|
|---|
| 1272 | I'll have to use $echo instead of the builtin, since Bourne shell doesn't
|
|---|
| 1273 | have echo built in and we may have to run some Bourne shell scripts. That
|
|---|
| 1274 | means I'll have to use '$n$c' to suppress newlines now.
|
|---|
| 1275 |
|
|---|
| 1276 | FOO
|
|---|
| 1277 | $echo $n "The star should be here-->$c"
|
|---|
| 1278 | $echo "*"
|
|---|
| 1279 | fi
|
|---|
| 1280 | $rm -f foo1 foo2
|
|---|
| 1281 | ;;
|
|---|
| 1282 | esac
|
|---|
| 1283 |
|
|---|
| 1284 | : determine whether symbolic links are supported
|
|---|
| 1285 | #echo " "
|
|---|
| 1286 | $touch blurfl
|
|---|
| 1287 | if $ln -s blurfl sym > /dev/null 2>&1 ; then
|
|---|
| 1288 | # echo "Symbolic links are supported." >&4
|
|---|
| 1289 | lns="$ln -s"
|
|---|
| 1290 | else
|
|---|
| 1291 | # echo "Symbolic links are NOT supported." >&4
|
|---|
| 1292 | lns="$ln"
|
|---|
| 1293 | fi
|
|---|
| 1294 | $rm -f blurfl sym
|
|---|
| 1295 |
|
|---|
| 1296 | : see whether [:lower:] and [:upper:] are supported character classes
|
|---|
| 1297 | #echo " "
|
|---|
| 1298 | up='[A-Z]'
|
|---|
| 1299 | low='[a-z]'
|
|---|
| 1300 | case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
|
|---|
| 1301 | ABYZ)
|
|---|
| 1302 | # echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4
|
|---|
| 1303 | up='[:upper:]'
|
|---|
| 1304 | low='[:lower:]'
|
|---|
| 1305 | ;;
|
|---|
| 1306 | *)
|
|---|
| 1307 | # echo "Your tr only supports [a-z] and [A-Z] to convert case." >&4
|
|---|
| 1308 | ;;
|
|---|
| 1309 | esac
|
|---|
| 1310 | : set up the translation script tr, must be called with ./tr of course
|
|---|
| 1311 | cat >tr <<EOSC
|
|---|
| 1312 | $startsh
|
|---|
| 1313 | case "\$1\$2" in
|
|---|
| 1314 | '[A-Z][a-z]') exec $tr '$up' '$low';;
|
|---|
| 1315 | '[a-z][A-Z]') exec $tr '$low' '$up';;
|
|---|
| 1316 | esac
|
|---|
| 1317 | exec $tr "\$@"
|
|---|
| 1318 | EOSC
|
|---|
| 1319 | chmod +x tr
|
|---|
| 1320 | $eunicefix tr
|
|---|
| 1321 |
|
|---|
| 1322 | : Try to determine whether config.sh was made on this system
|
|---|
| 1323 | case "$config_sh" in
|
|---|
| 1324 | '')
|
|---|
| 1325 | myuname=`( ($uname -a) 2>/dev/null || hostname) 2>&1`
|
|---|
| 1326 |
|
|---|
| 1327 | mygcc=`( ($g++ -v) 2>/dev/null) 2>&1`
|
|---|
| 1328 | myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \
|
|---|
| 1329 | ./tr '[A-Z]' '[a-z]' | tr '\012' ' '`
|
|---|
| 1330 | newmyuname="$myuname"
|
|---|
| 1331 | dflt=n
|
|---|
| 1332 | case "$knowitall" in
|
|---|
| 1333 | '')
|
|---|
| 1334 | if test -f ../config.sh; then
|
|---|
| 1335 | if $contains myuname= ../config.sh >/dev/null 2>&1; then
|
|---|
| 1336 | eval "`grep myuname= ../config.sh`"
|
|---|
| 1337 | fi
|
|---|
| 1338 | if test "X$myuname" = "X$newmyuname"; then
|
|---|
| 1339 | dflt=y
|
|---|
| 1340 | fi
|
|---|
| 1341 | fi
|
|---|
| 1342 | ;;
|
|---|
| 1343 | *) dflt=y;;
|
|---|
| 1344 | esac
|
|---|
| 1345 |
|
|---|
| 1346 | : Get old answers from old config file if Configure was run on the
|
|---|
| 1347 | : same system, otherwise use the hints.
|
|---|
| 1348 | hint=default
|
|---|
| 1349 | cd ../..
|
|---|
| 1350 |
|
|---|
| 1351 | if $test -d $src/hints ; then
|
|---|
| 1352 | (cd $src/hints; ls -C *.sh 2> /dev/null) | $sed 's/\.sh/ /g' >&4
|
|---|
| 1353 | fi
|
|---|
| 1354 | dflt=''
|
|---|
| 1355 | : Half the following guesses are probably wrong... If you have better
|
|---|
| 1356 | : tests or hints, please send them to Serguei.Sadilov@cern.ch
|
|---|
| 1357 | : The metaconfig authors would also appreciate a copy...
|
|---|
| 1358 | $test -f /irix && osname=irix
|
|---|
| 1359 | $test -f /xenix && osname=sco_xenix
|
|---|
| 1360 | $test -f /dynix && osname=dynix
|
|---|
| 1361 | $test -f /dnix && osname=dnix
|
|---|
| 1362 | $test -f /lynx.os && osname=lynxos
|
|---|
| 1363 | $test -f /unicos && osname=unicos && osvers=`$uname -r`
|
|---|
| 1364 | $test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r`
|
|---|
| 1365 | $test -f /bin/mips && /bin/mips && osname=mips
|
|---|
| 1366 | $test -d /NextApps && set X `hostinfo | grep 'NeXT Mach.*:' | \
|
|---|
| 1367 | $sed -e 's/://' -e 's/\./_/'` && osname=next && osvers=$4
|
|---|
| 1368 | $test -d /usr/apollo/bin && osname=apollo
|
|---|
| 1369 | $test -f /etc/saf/_sactab && osname=svr4
|
|---|
| 1370 | $test -d /usr/include/minix && osname=minix
|
|---|
| 1371 | if $test -d /MachTen; then
|
|---|
| 1372 | osname=machten
|
|---|
| 1373 | if $test -x /sbin/version; then
|
|---|
| 1374 | osvers=`/sbin/version | $awk '{print $2}' |
|
|---|
| 1375 | $sed -e 's/[A-Za-z]$//'`
|
|---|
| 1376 | elif $test -x /usr/etc/version; then
|
|---|
| 1377 | osvers=`/usr/etc/version | $awk '{print $2}' |
|
|---|
| 1378 | $sed -e 's/[A-Za-z]$//'`
|
|---|
| 1379 | else
|
|---|
| 1380 | osvers="$2.$3"
|
|---|
| 1381 | fi
|
|---|
| 1382 | fi
|
|---|
| 1383 | if $test -f $uname; then
|
|---|
| 1384 | set X $myuname
|
|---|
| 1385 | shift
|
|---|
| 1386 |
|
|---|
| 1387 | case "$5" in
|
|---|
| 1388 | fps*) osname=fps ;;
|
|---|
| 1389 | mips*)
|
|---|
| 1390 | case "$4" in
|
|---|
| 1391 | umips) osname=umips ;;
|
|---|
| 1392 | *) osname=mips ;;
|
|---|
| 1393 | esac;;
|
|---|
| 1394 | [23]100) osname=mips ;;
|
|---|
| 1395 | next*) osname=next ;;
|
|---|
| 1396 | news*) osname=news ;;
|
|---|
| 1397 | i386*)
|
|---|
| 1398 | if $test -f /etc/kconfig; then
|
|---|
| 1399 | osname=isc
|
|---|
| 1400 | if test "$lns" = "ln -s"; then
|
|---|
| 1401 | osvers=4
|
|---|
| 1402 | elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then
|
|---|
| 1403 | osvers=3
|
|---|
| 1404 | elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then
|
|---|
| 1405 | osvers=2
|
|---|
| 1406 | fi
|
|---|
| 1407 | fi
|
|---|
| 1408 | ;;
|
|---|
| 1409 | esac
|
|---|
| 1410 |
|
|---|
| 1411 | case "$1" in
|
|---|
| 1412 | aix) osname=aix
|
|---|
| 1413 | tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1`
|
|---|
| 1414 | case "$tmp" in
|
|---|
| 1415 | 'not found') osvers="$4"."$3" ;;
|
|---|
| 1416 | '<3240'|'<>3240') osvers=3.2.0 ;;
|
|---|
| 1417 | '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;;
|
|---|
| 1418 | '=3250'|'>3250') osvers=3.2.5 ;;
|
|---|
| 1419 | *) osvers=$tmp;;
|
|---|
| 1420 | esac
|
|---|
| 1421 | ;;
|
|---|
| 1422 | *dc.osx) osname=dcosx
|
|---|
| 1423 | osvers="$3"
|
|---|
| 1424 | ;;
|
|---|
| 1425 | dnix) osname=dnix
|
|---|
| 1426 | osvers="$3"
|
|---|
| 1427 | ;;
|
|---|
| 1428 | cygwin*) osname=win32
|
|---|
| 1429 | ;;
|
|---|
| 1430 | darwin*) osname=darwin
|
|---|
| 1431 | ;;
|
|---|
| 1432 | domainos) osname=apollo
|
|---|
| 1433 | osvers="$3"
|
|---|
| 1434 | ;;
|
|---|
| 1435 | dgux) osname=dgux
|
|---|
| 1436 | osvers="$3"
|
|---|
| 1437 | ;;
|
|---|
| 1438 | dynixptx*) osname=dynixptx
|
|---|
| 1439 | osvers="$3"
|
|---|
| 1440 | ;;
|
|---|
| 1441 | freebsd) osname=freebsd
|
|---|
| 1442 | osvers="$3" ;;
|
|---|
| 1443 | genix) osname=genix ;;
|
|---|
| 1444 | hp*) osname=hpux
|
|---|
| 1445 | case "$3" in
|
|---|
| 1446 | *.08.*) osvers=9 ;;
|
|---|
| 1447 | *.09.*) osvers=9 ;;
|
|---|
| 1448 | *.10.*) osvers=10 ;;
|
|---|
| 1449 | *) osvers="$3" ;;
|
|---|
| 1450 | esac
|
|---|
| 1451 | ;;
|
|---|
| 1452 | irix*) osname=irix
|
|---|
| 1453 | case "$3" in
|
|---|
| 1454 | 4*) osvers=4 ;;
|
|---|
| 1455 | 5*) osvers=5 ;;
|
|---|
| 1456 | *) osvers="$3" ;;
|
|---|
| 1457 | esac
|
|---|
| 1458 | ;;
|
|---|
| 1459 | linux) osname=linux
|
|---|
| 1460 | case "$3" in
|
|---|
| 1461 | 1*) osvers=1 ;;
|
|---|
| 1462 | *) osvers="$3" ;;
|
|---|
| 1463 | esac
|
|---|
| 1464 | ;;
|
|---|
| 1465 | netbsd*) osname=netbsd
|
|---|
| 1466 | osvers="$3"
|
|---|
| 1467 | ;;
|
|---|
| 1468 | bsd386) osname=bsd386
|
|---|
| 1469 | osvers=`$uname -r`
|
|---|
| 1470 | ;;
|
|---|
| 1471 | next*) osname=next ;;
|
|---|
| 1472 | solaris) osname=solaris
|
|---|
| 1473 | case "$3" in
|
|---|
| 1474 | 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
|
|---|
| 1475 | *) osvers="$3" ;;
|
|---|
| 1476 | esac
|
|---|
| 1477 | ;;
|
|---|
| 1478 | sunos) osname=sunos
|
|---|
| 1479 | case "$3" in
|
|---|
| 1480 | 5*) osname=solaris
|
|---|
| 1481 | osvers=`echo $3 | $sed 's/^5/2/g'` ;;
|
|---|
| 1482 | *) osvers="$3" ;;
|
|---|
| 1483 | esac
|
|---|
| 1484 | ;;
|
|---|
| 1485 | titanos) osname=titanos
|
|---|
| 1486 | case "$3" in
|
|---|
| 1487 | 1*) osvers=1 ;;
|
|---|
| 1488 | 2*) osvers=2 ;;
|
|---|
| 1489 | 3*) osvers=3 ;;
|
|---|
| 1490 | 4*) osvers=4 ;;
|
|---|
| 1491 | *) osvers="$3" ;;
|
|---|
| 1492 | esac
|
|---|
| 1493 | ;;
|
|---|
| 1494 | ultrix) osname=ultrix
|
|---|
| 1495 | osvers="$3"
|
|---|
| 1496 | ;;
|
|---|
| 1497 | osf1|mls+) case "$5" in
|
|---|
| 1498 | alpha)
|
|---|
| 1499 | osname=dec_osf
|
|---|
| 1500 | osvers=`echo "$3" | sed 's/^[vt]//'`
|
|---|
| 1501 | ;;
|
|---|
| 1502 | hp*) osname=hp_osf1 ;;
|
|---|
| 1503 | mips) osname=mips_osf1 ;;
|
|---|
| 1504 | esac
|
|---|
| 1505 | ;;
|
|---|
| 1506 | uts) osname=uts
|
|---|
| 1507 | osvers="$3"
|
|---|
| 1508 | ;;
|
|---|
| 1509 | qnx) osname=qnx
|
|---|
| 1510 | osvers="$4"
|
|---|
| 1511 | ;;
|
|---|
| 1512 | $2) case "$osname" in
|
|---|
| 1513 | *isc*) ;;
|
|---|
| 1514 | *freebsd*) ;;
|
|---|
| 1515 | svr*)
|
|---|
| 1516 | : svr4.x or possibly later
|
|---|
| 1517 | case "svr$3" in
|
|---|
| 1518 | ${osname}*)
|
|---|
| 1519 | osname=svr$3
|
|---|
| 1520 | osvers=$4
|
|---|
| 1521 | ;;
|
|---|
| 1522 | esac
|
|---|
| 1523 | case "$osname" in
|
|---|
| 1524 | svr4.0)
|
|---|
| 1525 | : Check for ESIX
|
|---|
| 1526 | if test -f /stand/boot ; then
|
|---|
| 1527 | eval `grep '^INITPROG=[a-z/0-9]*$' /stand/boot`
|
|---|
| 1528 | if test -n "$INITPROG" -a -f "$INITPROG"; then
|
|---|
| 1529 | isesix=`strings -a $INITPROG|grep 'ESIX SYSTEM V/386 Release 4.0'`
|
|---|
| 1530 | if test -n "$isesix"; then
|
|---|
| 1531 | osname=esix4
|
|---|
| 1532 | fi
|
|---|
| 1533 | fi
|
|---|
| 1534 | fi
|
|---|
| 1535 | ;;
|
|---|
| 1536 | esac
|
|---|
| 1537 | ;;
|
|---|
| 1538 | *) if test -f /etc/systemid; then
|
|---|
| 1539 | osname=sco
|
|---|
| 1540 | set `echo $3 | $sed 's/\./ /g'` $4
|
|---|
| 1541 | if $test -f sco_$1_$2_$3.sh; then
|
|---|
| 1542 | osvers=$1.$2.$3
|
|---|
| 1543 | elif $test -f sco_$1_$2.sh; then
|
|---|
| 1544 | osvers=$1.$2
|
|---|
| 1545 | elif $test -f sco_$1.sh; then
|
|---|
| 1546 | osvers=$1
|
|---|
| 1547 | fi
|
|---|
| 1548 | else
|
|---|
| 1549 | case "$osname" in
|
|---|
| 1550 | '') : Still unknown. Probably a generic Sys V.
|
|---|
| 1551 | osname="sysv"
|
|---|
| 1552 | osvers="$3"
|
|---|
| 1553 | ;;
|
|---|
| 1554 | esac
|
|---|
| 1555 | fi
|
|---|
| 1556 | ;;
|
|---|
| 1557 | esac
|
|---|
| 1558 | ;;
|
|---|
| 1559 | *) case "$osname" in
|
|---|
| 1560 | '') : Still unknown. Probably a generic BSD.
|
|---|
| 1561 | osname="$1"
|
|---|
| 1562 | osvers="$3"
|
|---|
| 1563 | ;;
|
|---|
| 1564 | esac
|
|---|
| 1565 | ;;
|
|---|
| 1566 | esac
|
|---|
| 1567 | else
|
|---|
| 1568 | if test -f /vmunix -a -f $src/hints/news_os.sh; then
|
|---|
| 1569 | (what /vmunix | .config/UU/tr '[A-Z]' '[a-z]') > .config/UU/kernel.what 2>&1
|
|---|
| 1570 | if $contains news-os .config/UU/kernel.what >/dev/null 2>&1; then
|
|---|
| 1571 | osname=news_os
|
|---|
| 1572 | fi
|
|---|
| 1573 | $rm -f .config/UU/kernel.what
|
|---|
| 1574 | elif test -d c:/.; then
|
|---|
| 1575 | set X $myuname
|
|---|
| 1576 | osname=os2
|
|---|
| 1577 | osvers="$5"
|
|---|
| 1578 | fi
|
|---|
| 1579 | fi
|
|---|
| 1580 | : Now look for a hint file osname_osvers, unless one has been
|
|---|
| 1581 | : specified already.
|
|---|
| 1582 | case "$hintfile" in
|
|---|
| 1583 | ''|' ')
|
|---|
| 1584 | file=`echo "${osname}_${osvers}" | $sed -e 's@\.@_@g' -e 's@_$@@'`
|
|---|
| 1585 | : Also try without trailing minor version numbers.
|
|---|
| 1586 | xfile=`echo $file | $sed -e 's@_[^_]*$@@'`
|
|---|
| 1587 | xxfile=`echo $xfile | $sed -e 's@_[^_]*$@@'`
|
|---|
| 1588 | xxxfile=`echo $xxfile | $sed -e 's@_[^_]*$@@'`
|
|---|
| 1589 | xxxxfile=`echo $xxxfile | $sed -e 's@_[^_]*$@@'`
|
|---|
| 1590 | case "$file" in
|
|---|
| 1591 | '') dflt=none ;;
|
|---|
| 1592 | *) case "$osvers" in
|
|---|
| 1593 | '') dflt=$file
|
|---|
| 1594 | ;;
|
|---|
| 1595 | *) if $test -f $src/hints/$file.sh ; then
|
|---|
| 1596 | dflt=$file
|
|---|
| 1597 | elif $test -f $src/hints/$xfile.sh ; then
|
|---|
| 1598 | dflt=$xfile
|
|---|
| 1599 | elif $test -f $src/hints/$xxfile.sh ; then
|
|---|
| 1600 | dflt=$xxfile
|
|---|
| 1601 | elif $test -f $src/hints/$xxxfile.sh ; then
|
|---|
| 1602 | dflt=$xxxfile
|
|---|
| 1603 | elif $test -f $src/hints/$xxxxfile.sh ; then
|
|---|
| 1604 | dflt=$xxxxfile
|
|---|
| 1605 | elif $test -f "$src/hints/${osname}.sh" ; then
|
|---|
| 1606 | dflt="${osname}"
|
|---|
| 1607 | else
|
|---|
| 1608 | dflt=none
|
|---|
| 1609 | fi
|
|---|
| 1610 | ;;
|
|---|
| 1611 | esac
|
|---|
| 1612 | ;;
|
|---|
| 1613 | esac
|
|---|
| 1614 | ;;
|
|---|
| 1615 | *)
|
|---|
| 1616 | dflt=`echo $hintfile | $sed 's/\.sh$//'`
|
|---|
| 1617 | ;;
|
|---|
| 1618 | esac
|
|---|
| 1619 |
|
|---|
| 1620 | if [ X$install = Xnever ] ; then
|
|---|
| 1621 | $cat <<EOM
|
|---|
| 1622 |
|
|---|
| 1623 | You may give one or more space-separated answers, or "none" if appropriate.
|
|---|
| 1624 | If your OS version has no hints, DO NOT give a wrong version -- say "none".
|
|---|
| 1625 |
|
|---|
| 1626 | EOM
|
|---|
| 1627 | rp="Which of these apply, if any?"
|
|---|
| 1628 | . .config/UU/myread
|
|---|
| 1629 | tans=$ans
|
|---|
| 1630 | for file in $tans; do
|
|---|
| 1631 | if $test -f $src/hints/$file.sh; then
|
|---|
| 1632 | . $src/hints/$file.sh
|
|---|
| 1633 | $cat $src/hints/$file.sh >> .config/UU/config.sh
|
|---|
| 1634 | elif $test X$tans = X -o X$tans = Xnone ; then
|
|---|
| 1635 | : nothing
|
|---|
| 1636 | else
|
|---|
| 1637 | : Give one chance to correct a possible typo.
|
|---|
| 1638 | echo "$file.sh does not exist"
|
|---|
| 1639 | dflt=$file
|
|---|
| 1640 | rp="hint to use instead?"
|
|---|
| 1641 | . .config/UU/myread
|
|---|
| 1642 | for file in $ans; do
|
|---|
| 1643 | if $test -f "$src/hints/$file.sh"; then
|
|---|
| 1644 | . $src/hints/$file.sh
|
|---|
| 1645 | $cat $src/hints/$file.sh >> .config/UU/config.sh
|
|---|
| 1646 | elif $test X$ans = X -o X$ans = Xnone ; then
|
|---|
| 1647 | : nothing
|
|---|
| 1648 | else
|
|---|
| 1649 | echo "$file.sh does not exist -- ignored."
|
|---|
| 1650 | fi
|
|---|
| 1651 | done
|
|---|
| 1652 | fi
|
|---|
| 1653 | done
|
|---|
| 1654 | fi
|
|---|
| 1655 |
|
|---|
| 1656 | hint=recommended
|
|---|
| 1657 | : Remember our hint file for later.
|
|---|
| 1658 | if $test -f "$src/hints/$file.sh" ; then
|
|---|
| 1659 | hintfile="$file"
|
|---|
| 1660 | else
|
|---|
| 1661 | hintfile=''
|
|---|
| 1662 | fi
|
|---|
| 1663 | : Sadilov: g4system.U - inserted here.
|
|---|
| 1664 | : 'current' directory is where 'Configure' is started
|
|---|
| 1665 | #echo " "
|
|---|
| 1666 | case "$g4osname" in
|
|---|
| 1667 |
|
|---|
| 1668 | '')
|
|---|
| 1669 | case "$osname" in
|
|---|
| 1670 | 'aix') g4osname=AIX
|
|---|
| 1671 | ;;
|
|---|
| 1672 | 'dec_osf') g4osname=DEC
|
|---|
| 1673 | ;;
|
|---|
| 1674 | 'hpux') g4osname=HP
|
|---|
| 1675 | ;;
|
|---|
| 1676 | 'linux') g4osname=Linux
|
|---|
| 1677 | ;;
|
|---|
| 1678 | 'irix') g4osname=SGI
|
|---|
| 1679 | ;;
|
|---|
| 1680 | 'sunos') g4osname=SUN
|
|---|
| 1681 | ;;
|
|---|
| 1682 | 'solaris') g4osname=SUN
|
|---|
| 1683 | ;;
|
|---|
| 1684 | 'win32') g4osname=WIN32
|
|---|
| 1685 | ;;
|
|---|
| 1686 | 'darwin') g4osname=Darwin
|
|---|
| 1687 | ;;
|
|---|
| 1688 | esac
|
|---|
| 1689 | esac
|
|---|
| 1690 |
|
|---|
| 1691 | #echo " "
|
|---|
| 1692 |
|
|---|
| 1693 | case "$g4compiler" in
|
|---|
| 1694 |
|
|---|
| 1695 | '')
|
|---|
| 1696 | case "$g4osname" in
|
|---|
| 1697 | 'AIX')
|
|---|
| 1698 | g4compiler=xlC
|
|---|
| 1699 | ;;
|
|---|
| 1700 | 'DEC')
|
|---|
| 1701 | g4compiler=cxx
|
|---|
| 1702 | ;;
|
|---|
| 1703 | 'HP')
|
|---|
| 1704 | g4compiler=aCC
|
|---|
| 1705 | ;;
|
|---|
| 1706 | 'Linux')
|
|---|
| 1707 | # g4compiler=g++
|
|---|
| 1708 | # Assume if "gcc" is in place then "g++" is here
|
|---|
| 1709 | gcccompiler=`( ($gcc -v) 1>/dev/null || echo "ERROR: There is no 'gcc' ('g++'?) compiler.") 2>&1`
|
|---|
| 1710 | case $gcccompiler in
|
|---|
| 1711 | *egcs*) g4compiler=egcs
|
|---|
| 1712 | ;;
|
|---|
| 1713 | *2.96*)
|
|---|
| 1714 | echo "WARNING: Found version of 'g++' (2.96.XXX) is known to be buggy!"
|
|---|
| 1715 | g4compiler="g++"
|
|---|
| 1716 | ;;
|
|---|
| 1717 | *) g4compiler="g++"
|
|---|
| 1718 | ;;
|
|---|
| 1719 | esac
|
|---|
| 1720 |
|
|---|
| 1721 | ;;
|
|---|
| 1722 | 'SGI')
|
|---|
| 1723 | g4compiler=CC
|
|---|
| 1724 | ;;
|
|---|
| 1725 | 'SUN')
|
|---|
| 1726 | g4compiler=CC
|
|---|
| 1727 | ;;
|
|---|
| 1728 | 'WIN32')
|
|---|
| 1729 | g4compiler=VC
|
|---|
| 1730 | clcompiler=`( cl 1>/dev/null || echo "ERROR: There is no 'cl' compiler.") 2>&1`
|
|---|
| 1731 | case $clcompiler in
|
|---|
| 1732 | *"Version 12"*) g4compiler=VC6
|
|---|
| 1733 | ;;
|
|---|
| 1734 | *"Version 13"*) g4compiler=VC
|
|---|
| 1735 | ;;
|
|---|
| 1736 | *) g4compiler=VC
|
|---|
| 1737 | ;;
|
|---|
| 1738 | esac
|
|---|
| 1739 | ;;
|
|---|
| 1740 | 'Darwin')
|
|---|
| 1741 | g4compiler=g++
|
|---|
| 1742 | ;;
|
|---|
| 1743 | esac
|
|---|
| 1744 | esac
|
|---|
| 1745 |
|
|---|
| 1746 | if [ X$g4system = X ] ; then
|
|---|
| 1747 |
|
|---|
| 1748 | if [ X$g4build = Xyes ] ; then
|
|---|
| 1749 | while test 1 = 1 ; do
|
|---|
| 1750 |
|
|---|
| 1751 | g4message=`cat << EOM
|
|---|
| 1752 |
|
|---|
| 1753 | Definition of G4SYSTEM variable is $g4osname-$g4compiler.
|
|---|
| 1754 | That stands for:
|
|---|
| 1755 |
|
|---|
| 1756 | 1) OS : $g4osname
|
|---|
| 1757 |
|
|---|
| 1758 | 2) Compiler : $g4compiler
|
|---|
| 1759 |
|
|---|
| 1760 | To modify default settings, select number above (e.g. 2)
|
|---|
| 1761 | EOM`
|
|---|
| 1762 |
|
|---|
| 1763 | dflt="Press [Enter] for default settings"
|
|---|
| 1764 | rp=$g4message
|
|---|
| 1765 | . .config/UU/myread
|
|---|
| 1766 | gans=$ans
|
|---|
| 1767 |
|
|---|
| 1768 | case $gans in
|
|---|
| 1769 |
|
|---|
| 1770 | 1)
|
|---|
| 1771 | case "$osname" in
|
|---|
| 1772 | 'aix')
|
|---|
| 1773 | g4osnamerec=AIX
|
|---|
| 1774 | ;;
|
|---|
| 1775 | 'dec_osf')
|
|---|
| 1776 | g4osnamerec=DEC
|
|---|
| 1777 | ;;
|
|---|
| 1778 | 'hpux')
|
|---|
| 1779 | g4osnamerec=HP
|
|---|
| 1780 | ;;
|
|---|
| 1781 | 'linux')
|
|---|
| 1782 | g4osnamerec=Linux
|
|---|
| 1783 | ;;
|
|---|
| 1784 | 'irix')
|
|---|
| 1785 | g4osnamerec=SGI
|
|---|
| 1786 | ;;
|
|---|
| 1787 | 'sunos')
|
|---|
| 1788 | g4osnamerec=SUN
|
|---|
| 1789 | ;;
|
|---|
| 1790 | 'win32')
|
|---|
| 1791 | g4osnamerec=WIN32
|
|---|
| 1792 | ;;
|
|---|
| 1793 | 'darwin')
|
|---|
| 1794 | g4osnamerec=Darwin
|
|---|
| 1795 | ;;
|
|---|
| 1796 | esac
|
|---|
| 1797 | dflt=$g4osname
|
|---|
| 1798 | rp="What is your OS'?"
|
|---|
| 1799 | . .config/UU/myread
|
|---|
| 1800 | tans=$ans
|
|---|
| 1801 |
|
|---|
| 1802 | if test X$tans != X$g4osnamerec ; then
|
|---|
| 1803 | echo ""
|
|---|
| 1804 |
|
|---|
| 1805 | cat << EOM
|
|---|
| 1806 |
|
|---|
| 1807 | You are running 'Configure' on NOT native platform!
|
|---|
| 1808 | You are on your own way !!!
|
|---|
| 1809 |
|
|---|
| 1810 | EOM
|
|---|
| 1811 |
|
|---|
| 1812 | dflt=$tans
|
|---|
| 1813 | rp="Confirm your selection or set native '$g4osnamerec'!"
|
|---|
| 1814 | . .config/UU/myread
|
|---|
| 1815 | tans=$ans
|
|---|
| 1816 | fi
|
|---|
| 1817 |
|
|---|
| 1818 | g4osname=$tans
|
|---|
| 1819 | ;;
|
|---|
| 1820 | 2)
|
|---|
| 1821 | case "$g4osname" in
|
|---|
| 1822 | 'AIX')
|
|---|
| 1823 | g4compilerrec=xlC
|
|---|
| 1824 | ;;
|
|---|
| 1825 | 'DEC')
|
|---|
| 1826 | g4compilerrec=cxx
|
|---|
| 1827 | ;;
|
|---|
| 1828 | 'HP')
|
|---|
| 1829 | g4compilerrec=aCC
|
|---|
| 1830 | ;;
|
|---|
| 1831 | 'Linux')
|
|---|
| 1832 | g4compilerrec=g++
|
|---|
| 1833 | ;;
|
|---|
| 1834 | 'SGI')
|
|---|
| 1835 | g4compilerrec=CC
|
|---|
| 1836 | ;;
|
|---|
| 1837 | 'SUN')
|
|---|
| 1838 | g4compilerrec=CC
|
|---|
| 1839 | ;;
|
|---|
| 1840 | 'WIN32')
|
|---|
| 1841 | g4compilerrec=VC
|
|---|
| 1842 | ;;
|
|---|
| 1843 | 'Darwin')
|
|---|
| 1844 | g4compilerrec=g++
|
|---|
| 1845 | ;;
|
|---|
| 1846 | esac
|
|---|
| 1847 | dflt=$g4compiler
|
|---|
| 1848 | rp="Which C++ compiler?"
|
|---|
| 1849 | . .config/UU/myread
|
|---|
| 1850 | tans=$ans
|
|---|
| 1851 |
|
|---|
| 1852 | if test X$tans != X$g4compilerrec ; then
|
|---|
| 1853 | echo ""
|
|---|
| 1854 |
|
|---|
| 1855 | cat << EOM
|
|---|
| 1856 |
|
|---|
| 1857 | The recommmended compiler for this platform ($g4osname) is $g4compilerrec.
|
|---|
| 1858 | You are on your own way !!!
|
|---|
| 1859 |
|
|---|
| 1860 | EOM
|
|---|
| 1861 |
|
|---|
| 1862 | dflt=$tans
|
|---|
| 1863 | rp="Confirm your selection or set recommended '$g4compilerrec'!"
|
|---|
| 1864 | . .config/UU/myread
|
|---|
| 1865 | tans=$ans
|
|---|
| 1866 | fi
|
|---|
| 1867 |
|
|---|
| 1868 | g4compiler=$tans
|
|---|
| 1869 | ;;
|
|---|
| 1870 | # [eE])
|
|---|
| 1871 | # break
|
|---|
| 1872 | # ;;
|
|---|
| 1873 | *)
|
|---|
| 1874 | # echo " "
|
|---|
| 1875 | break
|
|---|
| 1876 | ;;
|
|---|
| 1877 | esac
|
|---|
| 1878 | done
|
|---|
| 1879 |
|
|---|
| 1880 | fi
|
|---|
| 1881 |
|
|---|
| 1882 | #
|
|---|
| 1883 | # Ask about compiler used.
|
|---|
| 1884 | #
|
|---|
| 1885 | g4system=$g4osname-$g4compiler
|
|---|
| 1886 |
|
|---|
| 1887 | fi
|
|---|
| 1888 |
|
|---|
| 1889 | #cat << EOM
|
|---|
| 1890 | #
|
|---|
| 1891 | #G4SYSTEM is now set to $g4system.
|
|---|
| 1892 | #
|
|---|
| 1893 | #EOM
|
|---|
| 1894 |
|
|---|
| 1895 | cd .config/UU
|
|---|
| 1896 |
|
|---|
| 1897 | myuname=`( ($uname -a) 2>/dev/null || hostname) 2>&1`
|
|---|
| 1898 | myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \
|
|---|
| 1899 | ./tr '[A-Z]' '[a-z]' | tr '\012' ' '`
|
|---|
| 1900 | newmyuname="$myuname"
|
|---|
| 1901 | dflt=n
|
|---|
| 1902 |
|
|---|
| 1903 | cd ../..
|
|---|
| 1904 |
|
|---|
| 1905 |
|
|---|
| 1906 | if [ X$g4build = X ] ; then
|
|---|
| 1907 |
|
|---|
| 1908 | if test -f $src/.config/bin/$g4system/env.sh; then
|
|---|
| 1909 |
|
|---|
| 1910 | # create not_display flag
|
|---|
| 1911 |
|
|---|
| 1912 | if [ X$g4ldlibs != X -o X$g4ldflags != X -o X$g4cxxflags != X -o X$g4cppflags != X -o X$g4incflags != X ] ; then
|
|---|
| 1913 | g4non_display=yes
|
|---|
| 1914 | # echo g4non_display=$g4non_display
|
|---|
| 1915 | fi
|
|---|
| 1916 |
|
|---|
| 1917 | if [ X$install = Xyes ] ; then
|
|---|
| 1918 |
|
|---|
| 1919 | $rm -rf .config/UU
|
|---|
| 1920 |
|
|---|
| 1921 | . $src/.config/bin/$g4system/move.sh
|
|---|
| 1922 |
|
|---|
| 1923 | exit 1
|
|---|
| 1924 |
|
|---|
| 1925 | fi #end of cppflags
|
|---|
| 1926 |
|
|---|
| 1927 | if [ X$g4cppflags = Xyes ] ; then
|
|---|
| 1928 |
|
|---|
| 1929 | . $src/.config/bin/$g4system/env.sh
|
|---|
| 1930 |
|
|---|
| 1931 | CPPFLAGS=`grep 'CPPFLAGS_FINAL :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\):=//'`
|
|---|
| 1932 |
|
|---|
| 1933 | # echo CPPFLAGS=$CPPFLAGS
|
|---|
| 1934 | echo $CPPFLAGS
|
|---|
| 1935 |
|
|---|
| 1936 | $rm -rf .config/UU
|
|---|
| 1937 | exit 1
|
|---|
| 1938 |
|
|---|
| 1939 | fi #end of cppflags
|
|---|
| 1940 |
|
|---|
| 1941 | if [ X$g4cxxflags = Xyes ] ; then
|
|---|
| 1942 |
|
|---|
| 1943 | . $src/.config/bin/$g4system/env.sh
|
|---|
| 1944 |
|
|---|
| 1945 | CXXFLAGS=`grep 'CXXFLAGS_FINAL :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\):=//'`
|
|---|
| 1946 |
|
|---|
| 1947 | # echo CXXFLAGS=$CXXFLAGS
|
|---|
| 1948 | echo $CXXFLAGS
|
|---|
| 1949 |
|
|---|
| 1950 | $rm -rf .config/UU
|
|---|
| 1951 | exit 1
|
|---|
| 1952 |
|
|---|
| 1953 | fi #end of cxxflags
|
|---|
| 1954 |
|
|---|
| 1955 |
|
|---|
| 1956 |
|
|---|
| 1957 | g4install_lib_AAA=`echo $g4install/lib|sed -e "s/\//AAA/g"`
|
|---|
| 1958 | g4final_install_lib_AAA=`echo $g4final_install/lib/geant4|sed -e "s/\//AAA/g"`
|
|---|
| 1959 |
|
|---|
| 1960 |
|
|---|
| 1961 | #############################################################################
|
|---|
| 1962 | if [ X$g4incflags = Xyes ] ; then
|
|---|
| 1963 |
|
|---|
| 1964 | . $src/.config/bin/$g4system/env.sh
|
|---|
| 1965 |
|
|---|
| 1966 | ### Getting G4FIRST_INSTALL
|
|---|
| 1967 | G4FIRST_INSTALL_AAA=`grep 'G4INSTALL =' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\)= //'|$sed -e 's/\//AAA/g'`
|
|---|
| 1968 | G4INSTALL_AAA=`echo $G4INSTALL|sed -e "s/\//AAA/g"`
|
|---|
| 1969 | ###
|
|---|
| 1970 | INCFLAGS_AAA=`grep 'INCFLAGS_FINAL :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\):=//'|$sed -e 's/\//AAA/g'`
|
|---|
| 1971 |
|
|---|
| 1972 | # echo INCFLAGS_AAA=$INCFLAGS_AAA
|
|---|
| 1973 | # echo G4INSTALL_AAA=$G4INSTALL_AAA
|
|---|
| 1974 | # echo G4FIRST_INSTALL_AAA=$G4FIRST_INSTALL_AAA
|
|---|
| 1975 |
|
|---|
| 1976 | INCFLAGS_AAA_NEW=`echo $INCFLAGS_AAA| $sed -e "s/$G4FIRST_INSTALL_AAA/$G4INSTALL_AAA/g"`
|
|---|
| 1977 |
|
|---|
| 1978 | # echo INCFLAGS_AAA_NEW=$INCFLAGS_AAA_NEW
|
|---|
| 1979 |
|
|---|
| 1980 | INCFLAGS=`echo $INCFLAGS_AAA_NEW| $sed -e "s/AAA/\//g"`
|
|---|
| 1981 |
|
|---|
| 1982 | # echo INCFLAGS=$INCFLAGS
|
|---|
| 1983 |
|
|---|
| 1984 | if [ X$G4INCLUDE = X ] ; then
|
|---|
| 1985 | echo $INCFLAGS
|
|---|
| 1986 | else
|
|---|
| 1987 | echo -I$G4INCLUDE
|
|---|
| 1988 | fi
|
|---|
| 1989 |
|
|---|
| 1990 | $rm -rf .config/UU
|
|---|
| 1991 | exit 1
|
|---|
| 1992 |
|
|---|
| 1993 | fi #end of incflags
|
|---|
| 1994 | #############################################################################
|
|---|
| 1995 |
|
|---|
| 1996 |
|
|---|
| 1997 | #############################################################################
|
|---|
| 1998 | if [ X$g4ldflags = Xyes ] ; then
|
|---|
| 1999 |
|
|---|
| 2000 | . $src/.config/bin/$g4system/env.sh
|
|---|
| 2001 |
|
|---|
| 2002 | ### Getting G4FIRST_INSTALL
|
|---|
| 2003 | G4FIRST_LIB_AAA=`grep 'G4LIB =' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\)= //'|$sed -e 's/\//AAA/g'`
|
|---|
| 2004 | G4LIB_AAA=`echo $G4LIB|sed -e "s/\//AAA/g"`
|
|---|
| 2005 | ###
|
|---|
| 2006 | # G4FIRST_INSTALL_LIB_AAA=${G4FIRST_INSTALL_AAA}AAAlib
|
|---|
| 2007 | # G4INSTALL_LIB_AAA=${G4INSTALL_AAA}AAAlibAAAgeant4
|
|---|
| 2008 |
|
|---|
| 2009 | # echo G4FIRST_INSTALL_LIB_AAA=$G4FIRST_INSTALL_LIB_AAA
|
|---|
| 2010 | # echo G4INSTALL_LIB_AAA=$G4INSTALL_LIB_AAA
|
|---|
| 2011 |
|
|---|
| 2012 | LDFLAGS_AAA=`grep 'LDFLAGS_FINAL :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\):=//'|$sed -e 's/\//AAA/g'`
|
|---|
| 2013 | LDFLAGS_AAA_NEW=`echo $LDFLAGS_AAA| $sed -e "s/$G4FIRST_LIB_AAA/$G4LIB_AAA/g"`
|
|---|
| 2014 | LDFLAGS=`echo $LDFLAGS_AAA_NEW| $sed -e "s/AAA/\//g"`
|
|---|
| 2015 |
|
|---|
| 2016 | # echo LDFLAGS=$LDFLAGS
|
|---|
| 2017 | echo $LDFLAGS
|
|---|
| 2018 |
|
|---|
| 2019 | $rm -rf .config/UU
|
|---|
| 2020 | exit 1
|
|---|
| 2021 |
|
|---|
| 2022 | fi #end of ldflags
|
|---|
| 2023 | #############################################################################
|
|---|
| 2024 |
|
|---|
| 2025 | if [ X$g4ldlibs = Xyes ] ; then
|
|---|
| 2026 |
|
|---|
| 2027 | # cat >&2 <<EOM
|
|---|
| 2028 | #---------------------------------------------------
|
|---|
| 2029 | #LibList mode :)
|
|---|
| 2030 | #---------------------------------------------------
|
|---|
| 2031 | #EOM
|
|---|
| 2032 |
|
|---|
| 2033 | . $src/.config/bin/$g4system/env.sh
|
|---|
| 2034 |
|
|---|
| 2035 | # echo TEST
|
|---|
| 2036 |
|
|---|
| 2037 | # ls -l $G4INSTALL/config/scripts/GNUmakefile
|
|---|
| 2038 | # ls -l $G4LIB/$G4SYSTEM/GNUmakefile.db
|
|---|
| 2039 |
|
|---|
| 2040 | # LDLIBS_1=`grep 'LDLIBS_FINAL :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | awk -F := '{print $2}'`
|
|---|
| 2041 | # LDLIBS_2=`echo $LDLIBS_1 | awk -F -lMarker '{print $2}'`
|
|---|
| 2042 |
|
|---|
| 2043 | # echo LDLIBS_2=$LDLIBS_2
|
|---|
| 2044 | # echo $LDLIBS_2
|
|---|
| 2045 |
|
|---|
| 2046 | if [ X$G4LIB_USE_GRANULAR = X ] ; then
|
|---|
| 2047 |
|
|---|
| 2048 | # Global libs
|
|---|
| 2049 |
|
|---|
| 2050 | ### LDLIBS_1=`grep 'LDLIBS_FINAL :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\):=//'`
|
|---|
| 2051 | ### LDLIBS_2=`echo $LDLIBS_1 | $sed -e 's/^\(.*\)-lMarker//'`
|
|---|
| 2052 | ### echo "$LDLIBS_2 $c"
|
|---|
| 2053 |
|
|---|
| 2054 | LIBLIST_LIST=`$G4LIB/$G4SYSTEM/liblist -m $G4LIB/$G4SYSTEM < $G4LIB/$G4SYSTEM/libname.map`
|
|---|
| 2055 |
|
|---|
| 2056 | LDLIBS3=`grep 'LDLIBS3 :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\):=//'`
|
|---|
| 2057 | LDLIBS4=`grep 'LDLIBS4 :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\):=//'`
|
|---|
| 2058 |
|
|---|
| 2059 | LDLIBS=$LIBLIST_LIST $LDLIBS3 $LDLIBS4
|
|---|
| 2060 |
|
|---|
| 2061 | echo $LDLIBS
|
|---|
| 2062 |
|
|---|
| 2063 | # echo "-L$G4WORKDIR/lib/$G4SYSTEM -lG4persistency -lG4readout -lG4run -lG4event -lG4tracking -lG4parmodels -lG4processes -lG4digits+hits -lG4track -lG4particles -lG4geometry -lG4materials -lG4graphics_reps -lG4intercoms -lG4global $c"
|
|---|
| 2064 |
|
|---|
| 2065 | $rm -rf .config/UU
|
|---|
| 2066 | exit 1
|
|---|
| 2067 |
|
|---|
| 2068 | else
|
|---|
| 2069 |
|
|---|
| 2070 | # Granular libs
|
|---|
| 2071 |
|
|---|
| 2072 | # echo $n "-L$G4WORKDIR/lib/$G4SYSTEM $c" ; $G4WORKDIR/lib/$G4SYSTEM/liblist -m $G4WORKDIR/lib/$G4SYSTEM < $G4WORKDIR/lib/$G4SYSTEM/libname.map
|
|---|
| 2073 |
|
|---|
| 2074 | # echo G4LIB=$G4LIB/$G4SYSTEM
|
|---|
| 2075 |
|
|---|
| 2076 | LIBLIST_LIST=`$G4LIB/$G4SYSTEM/liblist -m $G4LIB/$G4SYSTEM < $G4LIB/$G4SYSTEM/libname.map`
|
|---|
| 2077 |
|
|---|
| 2078 | LDLIBS3=`grep 'LDLIBS3 :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\):=//'`
|
|---|
| 2079 | LDLIBS4=`grep 'LDLIBS4 :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\):=//'`
|
|---|
| 2080 |
|
|---|
| 2081 | LDLIBS=$LIBLIST_LIST $LDLIBS3 $LDLIBS4
|
|---|
| 2082 |
|
|---|
| 2083 | echo $LDLIBS
|
|---|
| 2084 |
|
|---|
| 2085 | $rm -rf .config/UU
|
|---|
| 2086 |
|
|---|
| 2087 | exit 1
|
|---|
| 2088 | fi #end of check for global/granular
|
|---|
| 2089 |
|
|---|
| 2090 | else #if not -lib but user mode
|
|---|
| 2091 |
|
|---|
| 2092 | # header for User
|
|---|
| 2093 | echo " "
|
|---|
| 2094 | echo " "
|
|---|
| 2095 | echo " "
|
|---|
| 2096 | echo " --- Geant4 Toolkit Installation ---"
|
|---|
| 2097 | echo " (setting environments for USER )"
|
|---|
| 2098 | echo " "
|
|---|
| 2099 | echo " "
|
|---|
| 2100 | echo " "
|
|---|
| 2101 |
|
|---|
| 2102 | #cat << EOM
|
|---|
| 2103 | #
|
|---|
| 2104 | #G4SYSTEM is now set to $g4system.
|
|---|
| 2105 | #
|
|---|
| 2106 | #EOM
|
|---|
| 2107 |
|
|---|
| 2108 | cat >&2 <<EOM
|
|---|
| 2109 | ---------------------------------------------------
|
|---|
| 2110 | The Geant4 toolkit installation was found.
|
|---|
| 2111 | The files env.[c]sh will be copied to your current directory.
|
|---|
| 2112 | For setting Geant4 environments you should make:
|
|---|
| 2113 |
|
|---|
| 2114 | source env.csh
|
|---|
| 2115 |
|
|---|
| 2116 | or
|
|---|
| 2117 |
|
|---|
| 2118 | . env.sh
|
|---|
| 2119 |
|
|---|
| 2120 | It will also check G4WORKDIR setting and set it to
|
|---|
| 2121 | your HOME if needed.
|
|---|
| 2122 | You can use these files also for further modifications
|
|---|
| 2123 | (adding your own environments).
|
|---|
| 2124 | ---------------------------------------------------
|
|---|
| 2125 | EOM
|
|---|
| 2126 | $rm -rf .config/UU
|
|---|
| 2127 |
|
|---|
| 2128 | cp -i $src/.config/bin/$g4system/env.csh .
|
|---|
| 2129 | cp -i $src/.config/bin/$g4system/env.sh .
|
|---|
| 2130 |
|
|---|
| 2131 | exit 1
|
|---|
| 2132 | fi #end of -lib or user
|
|---|
| 2133 | else #there is no env.sh
|
|---|
| 2134 |
|
|---|
| 2135 | # header for Installer
|
|---|
| 2136 | echo " "
|
|---|
| 2137 | echo " "
|
|---|
| 2138 | echo " "
|
|---|
| 2139 | echo " --- Geant4 Toolkit Installation ---"
|
|---|
| 2140 | echo " "
|
|---|
| 2141 | echo " "
|
|---|
| 2142 | echo " "
|
|---|
| 2143 | echo " "
|
|---|
| 2144 |
|
|---|
| 2145 | echo " "
|
|---|
| 2146 | echo "WARNING: Geant4 is NOT built yet!"
|
|---|
| 2147 | echo "You (or the administrator if you have not enough privileges)"
|
|---|
| 2148 | echo "should start with \$G4INSTALL/Configure -build."
|
|---|
| 2149 | echo "(where \$G4INSTALL is Geant4 install directory)."
|
|---|
| 2150 | echo " "
|
|---|
| 2151 | $rm -rf .config/UU
|
|---|
| 2152 | exit 1
|
|---|
| 2153 | fi #end of check for existence of env.sh
|
|---|
| 2154 | fi #end of check for "not -install"
|
|---|
| 2155 |
|
|---|
| 2156 | cd .config/UU
|
|---|
| 2157 |
|
|---|
| 2158 | case "$knowitall" in
|
|---|
| 2159 | '')
|
|---|
| 2160 | cd ../..
|
|---|
| 2161 | if test -f $src/.config/bin/$g4system/config.sh; then
|
|---|
| 2162 | if $contains myuname= $src/.config/bin/$g4system/config.sh >/dev/null 2>&1; then
|
|---|
| 2163 | eval "`grep myuname= $src/.config/bin/$g4system/config.sh`"
|
|---|
| 2164 | fi
|
|---|
| 2165 | if test "X$myuname" = "X$newmyuname"; then
|
|---|
| 2166 | dflt=y
|
|---|
| 2167 | fi
|
|---|
| 2168 | fi
|
|---|
| 2169 | cd .config/UU
|
|---|
| 2170 | ;;
|
|---|
| 2171 | *) dflt=y;;
|
|---|
| 2172 | esac
|
|---|
| 2173 |
|
|---|
| 2174 | cd ../..
|
|---|
| 2175 |
|
|---|
| 2176 | if test -f $src/.config/bin/$g4system/config.sh; then
|
|---|
| 2177 | echo " "
|
|---|
| 2178 | rp="There exists a config.sh file. Shall I use it to set the defaults?"
|
|---|
| 2179 | . .config/UU/myread
|
|---|
| 2180 | case "$ans" in
|
|---|
| 2181 | n*|N*) echo "OK, I'll ignore it."; mv $src/.config/bin/$g4system/config.sh $src/.config/bin/$g4system/config.sh.old;;
|
|---|
| 2182 | *) echo "Fetching default answers from your old config.sh file..." >&4
|
|---|
| 2183 | tmp_n="$n"
|
|---|
| 2184 | tmp_c="$c"
|
|---|
| 2185 | tmp_sh="$sh"
|
|---|
| 2186 | . $src/.config/bin/$g4system/config.sh
|
|---|
| 2187 | cp $src/.config/bin/$g4system/config.sh .config/UU
|
|---|
| 2188 | n="$tmp_n"
|
|---|
| 2189 | c="$tmp_c"
|
|---|
| 2190 | : Older versions did not always set $sh. Catch re-use of such
|
|---|
| 2191 | : an old config.sh.
|
|---|
| 2192 | case "$sh" in
|
|---|
| 2193 | '') sh="$tmp_sh" ;;
|
|---|
| 2194 | esac
|
|---|
| 2195 | hint=previous
|
|---|
| 2196 | ;;
|
|---|
| 2197 | esac
|
|---|
| 2198 | fi
|
|---|
| 2199 |
|
|---|
| 2200 | cd .config/UU
|
|---|
| 2201 | ;;
|
|---|
| 2202 | *)
|
|---|
| 2203 | echo " "
|
|---|
| 2204 | echo "Fetching default answers from $config_sh..." >&4
|
|---|
| 2205 | tmp_n="$n"
|
|---|
| 2206 | tmp_c="$c"
|
|---|
| 2207 | cd ../..
|
|---|
| 2208 | cp $config_sh config.sh 2>/dev/null
|
|---|
| 2209 | chmod +w config.sh
|
|---|
| 2210 | . ./config.sh
|
|---|
| 2211 | cd .config/UU
|
|---|
| 2212 | cp ../config.sh .
|
|---|
| 2213 | n="$tmp_n"
|
|---|
| 2214 | c="$tmp_c"
|
|---|
| 2215 | hint=previous
|
|---|
| 2216 | ;;
|
|---|
| 2217 | esac
|
|---|
| 2218 | test "$override" && . ./optdef.sh
|
|---|
| 2219 | myuname="$newmyuname"
|
|---|
| 2220 |
|
|---|
| 2221 | : Restore computed paths
|
|---|
| 2222 | for file in $loclist $trylist; do
|
|---|
| 2223 | eval $file="\$_$file"
|
|---|
| 2224 | done
|
|---|
| 2225 |
|
|---|
| 2226 |
|
|---|
| 2227 | : who configured the system
|
|---|
| 2228 | cf_time=`$date 2>&1`
|
|---|
| 2229 | cf_by=`(logname) 2>/dev/null`
|
|---|
| 2230 | case "$cf_by" in
|
|---|
| 2231 | "")
|
|---|
| 2232 | cf_by=`(whoami) 2>/dev/null`
|
|---|
| 2233 | case "$cf_by" in
|
|---|
| 2234 | "") cf_by=unknown ;;
|
|---|
| 2235 | esac ;;
|
|---|
| 2236 | esac
|
|---|
| 2237 |
|
|---|
| 2238 | : decide how portable to be
|
|---|
| 2239 | case "$d_portable" in
|
|---|
| 2240 | "$define") dflt=y;;
|
|---|
| 2241 | *) dflt=n;;
|
|---|
| 2242 | esac
|
|---|
| 2243 | $cat <<'EOH'
|
|---|
| 2244 |
|
|---|
| 2245 | I can set things up so that your shell scripts and binaries are more portable,
|
|---|
| 2246 | at what may be a noticable cost in performance. In particular, if you
|
|---|
| 2247 | ask to be portable, the following happens:
|
|---|
| 2248 |
|
|---|
| 2249 | 1) Shell scripts will rely on the PATH variable rather than using
|
|---|
| 2250 | the paths derived above.
|
|---|
| 2251 | 2) ~username interpretations will be done at run time rather than
|
|---|
| 2252 | by Configure.
|
|---|
| 2253 |
|
|---|
| 2254 | EOH
|
|---|
| 2255 | rp="Do you expect to run these scripts and binaries on multiple machines?"
|
|---|
| 2256 | . ./myread
|
|---|
| 2257 | case "$ans" in
|
|---|
| 2258 | y*) d_portable="$define"
|
|---|
| 2259 | ;;
|
|---|
| 2260 | *) d_portable="$undef" ;;
|
|---|
| 2261 | esac
|
|---|
| 2262 |
|
|---|
| 2263 | : set up shell script to do ~ expansion
|
|---|
| 2264 | cat >filexp <<EOSS
|
|---|
| 2265 | $startsh
|
|---|
| 2266 | : expand filename
|
|---|
| 2267 | case "\$1" in
|
|---|
| 2268 | ~/*|~)
|
|---|
| 2269 | echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
|
|---|
| 2270 | ;;
|
|---|
| 2271 | ~*)
|
|---|
| 2272 | if $test -f /bin/csh; then
|
|---|
| 2273 | /bin/csh -f -c "glob \$1"
|
|---|
| 2274 | failed=\$?
|
|---|
| 2275 | echo ""
|
|---|
| 2276 | exit \$failed
|
|---|
| 2277 | else
|
|---|
| 2278 | name=\`$expr x\$1 : '..\([^/]*\)'\`
|
|---|
| 2279 | dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\`
|
|---|
| 2280 | if $test ! -d "\$dir"; then
|
|---|
| 2281 | me=\`basename \$0\`
|
|---|
| 2282 | echo "\$me: can't locate home directory for: \$name" >&2
|
|---|
| 2283 | exit 1
|
|---|
| 2284 | fi
|
|---|
| 2285 | case "\$1" in
|
|---|
| 2286 | */*)
|
|---|
| 2287 | echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
|
|---|
| 2288 | ;;
|
|---|
| 2289 | *)
|
|---|
| 2290 | echo \$dir
|
|---|
| 2291 | ;;
|
|---|
| 2292 | esac
|
|---|
| 2293 | fi
|
|---|
| 2294 | ;;
|
|---|
| 2295 | *)
|
|---|
| 2296 | echo \$1
|
|---|
| 2297 | ;;
|
|---|
| 2298 | esac
|
|---|
| 2299 | EOSS
|
|---|
| 2300 | chmod +x filexp
|
|---|
| 2301 | $eunicefix filexp
|
|---|
| 2302 |
|
|---|
| 2303 | : now set up to get a file name
|
|---|
| 2304 | cat <<EOS >getfile
|
|---|
| 2305 | $startsh
|
|---|
| 2306 | EOS
|
|---|
| 2307 | cat <<'EOSC' >>getfile
|
|---|
| 2308 | tilde=''
|
|---|
| 2309 | fullpath=''
|
|---|
| 2310 | already=''
|
|---|
| 2311 | skip=''
|
|---|
| 2312 | none_ok=''
|
|---|
| 2313 | exp_file=''
|
|---|
| 2314 | nopath_ok=''
|
|---|
| 2315 | orig_rp="$rp"
|
|---|
| 2316 | orig_dflt="$dflt"
|
|---|
| 2317 |
|
|---|
| 2318 | case "$fn" in
|
|---|
| 2319 | *\(*)
|
|---|
| 2320 | expr $fn : '.*(\(.*\)).*' | tr ',' '\012' >getfile.ok
|
|---|
| 2321 | fn=`echo $fn | sed 's/(.*)//'`
|
|---|
| 2322 | ;;
|
|---|
| 2323 | esac
|
|---|
| 2324 |
|
|---|
| 2325 | case "$fn" in
|
|---|
| 2326 | *:*)
|
|---|
| 2327 | loc_file=`expr $fn : '.*:\(.*\)'`
|
|---|
| 2328 | fn=`expr $fn : '\(.*\):.*'`
|
|---|
| 2329 | ;;
|
|---|
| 2330 | esac
|
|---|
| 2331 |
|
|---|
| 2332 | case "$fn" in
|
|---|
| 2333 | *~*) tilde=true;;
|
|---|
| 2334 | esac
|
|---|
| 2335 | case "$fn" in
|
|---|
| 2336 | */*) fullpath=true;;
|
|---|
| 2337 | esac
|
|---|
| 2338 | case "$fn" in
|
|---|
| 2339 | *+*) skip=true;;
|
|---|
| 2340 | esac
|
|---|
| 2341 | case "$fn" in
|
|---|
| 2342 | *n*) none_ok=true;;
|
|---|
| 2343 | esac
|
|---|
| 2344 | case "$fn" in
|
|---|
| 2345 | *e*) exp_file=true;;
|
|---|
| 2346 | esac
|
|---|
| 2347 | case "$fn" in
|
|---|
| 2348 | *p*) nopath_ok=true;;
|
|---|
| 2349 | esac
|
|---|
| 2350 |
|
|---|
| 2351 | case "$fn" in
|
|---|
| 2352 | *f*) type='File';;
|
|---|
| 2353 | *d*) type='Directory';;
|
|---|
| 2354 | *l*) type='Locate';;
|
|---|
| 2355 | esac
|
|---|
| 2356 |
|
|---|
| 2357 | what="$type"
|
|---|
| 2358 | case "$what" in
|
|---|
| 2359 | Locate) what='File';;
|
|---|
| 2360 | esac
|
|---|
| 2361 |
|
|---|
| 2362 | case "$exp_file" in
|
|---|
| 2363 | '')
|
|---|
| 2364 | case "$d_portable" in
|
|---|
| 2365 | "$define") ;;
|
|---|
| 2366 | *) exp_file=true;;
|
|---|
| 2367 | esac
|
|---|
| 2368 | ;;
|
|---|
| 2369 | esac
|
|---|
| 2370 |
|
|---|
| 2371 | cd ../..
|
|---|
| 2372 | while test "$type"; do
|
|---|
| 2373 | redo=''
|
|---|
| 2374 | rp="$orig_rp"
|
|---|
| 2375 | dflt="$orig_dflt"
|
|---|
| 2376 | case "$tilde" in
|
|---|
| 2377 | true) rp="$rp ";;
|
|---|
| 2378 | esac
|
|---|
| 2379 | . .config/UU/myread
|
|---|
| 2380 | if test -f .config/UU/getfile.ok && \
|
|---|
| 2381 | $contains "^$ans\$" .config/UU/getfile.ok >/dev/null 2>&1
|
|---|
| 2382 | then
|
|---|
| 2383 | value="$ans"
|
|---|
| 2384 | ansexp="$ans"
|
|---|
| 2385 | break
|
|---|
| 2386 | fi
|
|---|
| 2387 | case "$ans" in
|
|---|
| 2388 | none)
|
|---|
| 2389 | value=''
|
|---|
| 2390 | ansexp=''
|
|---|
| 2391 | case "$none_ok" in
|
|---|
| 2392 | true) type='';;
|
|---|
| 2393 | esac
|
|---|
| 2394 | ;;
|
|---|
| 2395 | *)
|
|---|
| 2396 | case "$tilde" in
|
|---|
| 2397 | '') value="$ans"
|
|---|
| 2398 | ansexp="$ans";;
|
|---|
| 2399 | *)
|
|---|
| 2400 | value=`.config/UU/filexp $ans`
|
|---|
| 2401 | case $? in
|
|---|
| 2402 | 0)
|
|---|
| 2403 | if test "$ans" != "$value"; then
|
|---|
| 2404 | echo "(That expands to $value on this system.)"
|
|---|
| 2405 | fi
|
|---|
| 2406 | ;;
|
|---|
| 2407 | *) value="$ans";;
|
|---|
| 2408 | esac
|
|---|
| 2409 | ansexp="$value"
|
|---|
| 2410 | case "$exp_file" in
|
|---|
| 2411 | '') value="$ans";;
|
|---|
| 2412 | esac
|
|---|
| 2413 | ;;
|
|---|
| 2414 | esac
|
|---|
| 2415 | case "$fullpath" in
|
|---|
| 2416 | true)
|
|---|
| 2417 | case "$ansexp" in
|
|---|
| 2418 | /*) value="$ansexp" ;;
|
|---|
| 2419 | *)
|
|---|
| 2420 | redo=true
|
|---|
| 2421 | case "$already" in
|
|---|
| 2422 | true)
|
|---|
| 2423 | echo "I shall only accept a full path name, as in /bin/ls." >&4
|
|---|
| 2424 | echo "Use a ! shell escape if you wish to check pathnames." >&4
|
|---|
| 2425 | ;;
|
|---|
| 2426 | *)
|
|---|
| 2427 | echo "Please give a full path name, starting with slash." >&4
|
|---|
| 2428 | case "$tilde" in
|
|---|
| 2429 | true)
|
|---|
| 2430 | echo "Note that using ~username is ok provided it expands well." >&4
|
|---|
| 2431 | already=true
|
|---|
| 2432 | ;;
|
|---|
| 2433 | esac
|
|---|
| 2434 | esac
|
|---|
| 2435 | ;;
|
|---|
| 2436 | esac
|
|---|
| 2437 | ;;
|
|---|
| 2438 | esac
|
|---|
| 2439 | case "$redo" in
|
|---|
| 2440 | '')
|
|---|
| 2441 | case "$type" in
|
|---|
| 2442 | File)
|
|---|
| 2443 | if test -f "$ansexp"; then
|
|---|
| 2444 | type=''
|
|---|
| 2445 | elif test -r "$ansexp" || (test -h "$ansexp") >/dev/null 2>&1
|
|---|
| 2446 | then
|
|---|
| 2447 | echo "($value is not a plain file, but that's ok.)"
|
|---|
| 2448 | type=''
|
|---|
| 2449 | fi
|
|---|
| 2450 | ;;
|
|---|
| 2451 | Directory)
|
|---|
| 2452 | if test -d "$ansexp"; then
|
|---|
| 2453 | type=''
|
|---|
| 2454 | fi
|
|---|
| 2455 | ;;
|
|---|
| 2456 | Locate)
|
|---|
| 2457 | if test -d "$ansexp"; then
|
|---|
| 2458 | echo "(Looking for $loc_file in directory $value.)"
|
|---|
| 2459 | value="$value/$loc_file"
|
|---|
| 2460 | ansexp="$ansexp/$loc_file"
|
|---|
| 2461 | fi
|
|---|
| 2462 | if test -f "$ansexp"; then
|
|---|
| 2463 | type=''
|
|---|
| 2464 | fi
|
|---|
| 2465 | case "$nopath_ok" in
|
|---|
| 2466 | true) case "$value" in
|
|---|
| 2467 | */*) ;;
|
|---|
| 2468 | *) echo "Assuming $value will be in people's path."
|
|---|
| 2469 | type=''
|
|---|
| 2470 | ;;
|
|---|
| 2471 | esac
|
|---|
| 2472 | ;;
|
|---|
| 2473 | esac
|
|---|
| 2474 | ;;
|
|---|
| 2475 | esac
|
|---|
| 2476 |
|
|---|
| 2477 | case "$skip" in
|
|---|
| 2478 | true) type='';
|
|---|
| 2479 | esac
|
|---|
| 2480 |
|
|---|
| 2481 | case "$type" in
|
|---|
| 2482 | '') ;;
|
|---|
| 2483 | *)
|
|---|
| 2484 | if test "$fastread" = yes; then
|
|---|
| 2485 | dflt=y
|
|---|
| 2486 | else
|
|---|
| 2487 | dflt=n
|
|---|
| 2488 | fi
|
|---|
| 2489 | rp="$what $value doesn't exist. Use that name anyway?"
|
|---|
| 2490 | . .config/UU/myread
|
|---|
| 2491 | dflt=''
|
|---|
| 2492 | case "$ans" in
|
|---|
| 2493 | y*) type='';;
|
|---|
| 2494 | *) echo " ";;
|
|---|
| 2495 | esac
|
|---|
| 2496 | ;;
|
|---|
| 2497 | esac
|
|---|
| 2498 | ;;
|
|---|
| 2499 | esac
|
|---|
| 2500 | ;;
|
|---|
| 2501 | esac
|
|---|
| 2502 | done
|
|---|
| 2503 | cd .config/UU
|
|---|
| 2504 | ans="$value"
|
|---|
| 2505 |
|
|---|
| 2506 | # Check for Windows!
|
|---|
| 2507 | if test "X$g4system" = "XWIN32-VC" -o "X$g4system" = "XWIN32-VC7"; then
|
|---|
| 2508 |
|
|---|
| 2509 | checkdrive=`echo $ans|cut -d"/" -f2`
|
|---|
| 2510 |
|
|---|
| 2511 | if test "X$checkdrive" = "Xcygdrive"; then
|
|---|
| 2512 |
|
|---|
| 2513 | windrive=`echo $ans|cut -d"/" -f3`
|
|---|
| 2514 | winpath=`echo $ans|cut -d"/" -f4-`
|
|---|
| 2515 |
|
|---|
| 2516 | fullwinpath="$windrive:/$winpath"
|
|---|
| 2517 | ans=$fullwinpath
|
|---|
| 2518 |
|
|---|
| 2519 | fi # if cygwin syntax is used
|
|---|
| 2520 | fi # if Win
|
|---|
| 2521 |
|
|---|
| 2522 | rp="$orig_rp"
|
|---|
| 2523 | dflt="$orig_dflt"
|
|---|
| 2524 | rm -f getfile.ok
|
|---|
| 2525 | EOSC
|
|---|
| 2526 |
|
|---|
| 2527 | echo " "
|
|---|
| 2528 |
|
|---|
| 2529 | #echo "SSS"
|
|---|
| 2530 | #echo `pwd`
|
|---|
| 2531 | #echo "SSS"
|
|---|
| 2532 |
|
|---|
| 2533 | if [ X$src = X. ] ; then
|
|---|
| 2534 | cd ../..
|
|---|
| 2535 | abssrc=`pwd`
|
|---|
| 2536 | cd .config/UU
|
|---|
| 2537 | else
|
|---|
| 2538 | abssrc=$src
|
|---|
| 2539 | fi
|
|---|
| 2540 |
|
|---|
| 2541 | case "$g4conf" in
|
|---|
| 2542 | '')
|
|---|
| 2543 | g4conf=$abssrc/.config/bin/$g4system
|
|---|
| 2544 | ;;
|
|---|
| 2545 | esac
|
|---|
| 2546 |
|
|---|
| 2547 | #echo "g4conf=$g4conf"
|
|---|
| 2548 |
|
|---|
| 2549 | case "$g4install" in
|
|---|
| 2550 | '')
|
|---|
| 2551 | if test $g4system = "WIN32-VC" -o $g4system = "WIN32-VC7"; then
|
|---|
| 2552 | # g4install="c:/geant4"
|
|---|
| 2553 | g4install=$abssrc
|
|---|
| 2554 | else
|
|---|
| 2555 | # if [ X"$HOME" = X/ ] ; then
|
|---|
| 2556 | # HOME=""
|
|---|
| 2557 | # fi
|
|---|
| 2558 | # g4install="$HOME"/geant4
|
|---|
| 2559 | g4install=$abssrc
|
|---|
| 2560 |
|
|---|
| 2561 | fi
|
|---|
| 2562 |
|
|---|
| 2563 | # Check for Windows!
|
|---|
| 2564 | if test $g4system = "WIN32-VC" -o $g4system = "WIN32-VC7"; then
|
|---|
| 2565 |
|
|---|
| 2566 | checkdrive=`echo $g4install|cut -d"/" -f2`
|
|---|
| 2567 |
|
|---|
| 2568 | if test $checkdrive = "cygdrive"; then
|
|---|
| 2569 |
|
|---|
| 2570 | windrive=`echo $g4install|cut -d"/" -f3`
|
|---|
| 2571 | winpath=`echo $g4install|cut -d"/" -f4-`
|
|---|
| 2572 |
|
|---|
| 2573 | fullwinpath="$windrive:/$winpath"
|
|---|
| 2574 | g4install=$fullwinpath
|
|---|
| 2575 |
|
|---|
| 2576 | fi
|
|---|
| 2577 | fi
|
|---|
| 2578 | ;;
|
|---|
| 2579 | esac
|
|---|
| 2580 |
|
|---|
| 2581 | case "$g4final_install" in
|
|---|
| 2582 | '')
|
|---|
| 2583 | g4final_install=$g4install
|
|---|
| 2584 | ;;
|
|---|
| 2585 | esac
|
|---|
| 2586 |
|
|---|
| 2587 | case "$g4workdir" in
|
|---|
| 2588 | '')
|
|---|
| 2589 | g4workdir=$g4install
|
|---|
| 2590 | ;;
|
|---|
| 2591 | esac
|
|---|
| 2592 |
|
|---|
| 2593 | case "$g4includes_flag" in
|
|---|
| 2594 | '')
|
|---|
| 2595 | g4includes_flag=n
|
|---|
| 2596 | ;;
|
|---|
| 2597 | esac
|
|---|
| 2598 |
|
|---|
| 2599 |
|
|---|
| 2600 | g4message=`cat << EOM
|
|---|
| 2601 |
|
|---|
| 2602 | Where is Geant4 source installed?
|
|---|
| 2603 | EOM`
|
|---|
| 2604 |
|
|---|
| 2605 | #dflt="NO DEFAULT ANSWER"
|
|---|
| 2606 | dflt=$g4install
|
|---|
| 2607 | fn='d~'
|
|---|
| 2608 | rp=$g4message
|
|---|
| 2609 | . ./getfile
|
|---|
| 2610 | g4install=$ans
|
|---|
| 2611 | g4workdir=$g4install
|
|---|
| 2612 | #################################
|
|---|
| 2613 | g4message=`cat << EOM
|
|---|
| 2614 |
|
|---|
| 2615 | Specify the path where Geant4 libraries and source files should be
|
|---|
| 2616 | installed.
|
|---|
| 2617 | EOM`
|
|---|
| 2618 |
|
|---|
| 2619 | #dflt="NO DEFAULT ANSWER"
|
|---|
| 2620 | dflt=$g4final_install
|
|---|
| 2621 | fn='d~'
|
|---|
| 2622 | rp=$g4message
|
|---|
| 2623 | . ./getfile
|
|---|
| 2624 | g4final_install=$ans
|
|---|
| 2625 | #g4workdir=$g4install
|
|---|
| 2626 |
|
|---|
| 2627 | ##################################
|
|---|
| 2628 | g4message=`cat << EOM
|
|---|
| 2629 |
|
|---|
| 2630 | Do you want to copy all Geant4 headers
|
|---|
| 2631 | in one directory?
|
|---|
| 2632 | EOM`
|
|---|
| 2633 |
|
|---|
| 2634 | #dflt="NO DEFAULT ANSWER"
|
|---|
| 2635 | dflt=$g4includes_flag
|
|---|
| 2636 | #fn='d~'
|
|---|
| 2637 | rp=$g4message
|
|---|
| 2638 | . ./myread
|
|---|
| 2639 | g4includes_flag=$ans
|
|---|
| 2640 |
|
|---|
| 2641 | if [ X$g4includes_flag = Xy ] ; then
|
|---|
| 2642 |
|
|---|
| 2643 | case "$g4include" in
|
|---|
| 2644 | '')
|
|---|
| 2645 | g4include=$g4install/include
|
|---|
| 2646 | # g4include=''
|
|---|
| 2647 | ;;
|
|---|
| 2648 | esac
|
|---|
| 2649 |
|
|---|
| 2650 | #g4message=`cat << EOM
|
|---|
| 2651 | #
|
|---|
| 2652 | #Where will be directory to copy all Geant4 headers?
|
|---|
| 2653 | #EOM`
|
|---|
| 2654 | #
|
|---|
| 2655 | ##dflt="NO DEFAULT ANSWER"
|
|---|
| 2656 | ####dflt=$g4install/include
|
|---|
| 2657 | #dflt=$g4include
|
|---|
| 2658 | #fn='d~+'
|
|---|
| 2659 | #rp=$g4message
|
|---|
| 2660 | #. ./getfile
|
|---|
| 2661 | #g4include=$ans
|
|---|
| 2662 |
|
|---|
| 2663 | # Set constantly!
|
|---|
| 2664 | if [ X$g4install != X$g4final_install ] ; then
|
|---|
| 2665 | g4include=$g4final_install/include/geant4
|
|---|
| 2666 | else
|
|---|
| 2667 | g4include=$g4final_install/include
|
|---|
| 2668 | fi
|
|---|
| 2669 |
|
|---|
| 2670 | fi
|
|---|
| 2671 |
|
|---|
| 2672 | #if test "X$g4include" = "X[NOT DEFINED]" ; then
|
|---|
| 2673 | #g4include=""
|
|---|
| 2674 | #fi
|
|---|
| 2675 |
|
|---|
| 2676 | echo " "
|
|---|
| 2677 |
|
|---|
| 2678 | case "$g4tmp" in
|
|---|
| 2679 | '')
|
|---|
| 2680 | g4tmp=$g4workdir/tmp
|
|---|
| 2681 | ;;
|
|---|
| 2682 | esac
|
|---|
| 2683 |
|
|---|
| 2684 | case "$g4lib" in
|
|---|
| 2685 | '')
|
|---|
| 2686 | g4lib=$g4workdir/lib
|
|---|
| 2687 | ;;
|
|---|
| 2688 | esac
|
|---|
| 2689 |
|
|---|
| 2690 | #case "$g4bin" in
|
|---|
| 2691 | #'')
|
|---|
| 2692 | # g4bin=$g4workdir/bin
|
|---|
| 2693 | # ;;
|
|---|
| 2694 | #esac
|
|---|
| 2695 |
|
|---|
| 2696 | while test 1 = 0 ; do
|
|---|
| 2697 |
|
|---|
| 2698 | g4message=`cat << EOM
|
|---|
| 2699 |
|
|---|
| 2700 | (OPTIONAL) You can now customise installation directories:
|
|---|
| 2701 | G4TMP - tmp/ containing temporary dependency (.d) and object (.o) files;
|
|---|
| 2702 | G4LIB - lib/ containing final static (.a) or shared (.so) libraries;
|
|---|
| 2703 |
|
|---|
| 2704 | 1) G4TMP: $g4tmp
|
|---|
| 2705 |
|
|---|
| 2706 | 2) G4LIB: $g4lib
|
|---|
| 2707 |
|
|---|
| 2708 | To modify default settings, select number above (e.g. 2)
|
|---|
| 2709 | EOM`
|
|---|
| 2710 |
|
|---|
| 2711 | #dflt="NO DEFAULT ANSWER"
|
|---|
| 2712 | dflt="Press [Enter] for default settings"
|
|---|
| 2713 | #fn='d~'
|
|---|
| 2714 | rp=$g4message
|
|---|
| 2715 | . ./myread
|
|---|
| 2716 | gans=$ans
|
|---|
| 2717 |
|
|---|
| 2718 |
|
|---|
| 2719 | case $gans in
|
|---|
| 2720 |
|
|---|
| 2721 | 1)
|
|---|
| 2722 | dflt=$g4tmp
|
|---|
| 2723 | fn='d~+'
|
|---|
| 2724 | rp="Where will be your Geant4 tmp directory?"
|
|---|
| 2725 | . ./getfile
|
|---|
| 2726 | g4tmp=$ans
|
|---|
| 2727 | ;;
|
|---|
| 2728 | 2)
|
|---|
| 2729 | dflt=$g4lib
|
|---|
| 2730 | fn='d~+'
|
|---|
| 2731 | rp="Where will be your Geant4 lib directory?"
|
|---|
| 2732 | . ./getfile
|
|---|
| 2733 | g4lib=$ans
|
|---|
| 2734 | ;;
|
|---|
| 2735 | # 3)
|
|---|
| 2736 | # dflt=$g4bin
|
|---|
| 2737 | # fn='d~+'
|
|---|
| 2738 | # rp="Where will be your Geant4 bin directory?"
|
|---|
| 2739 | # . ./getfile
|
|---|
| 2740 | # g4bin=$ans
|
|---|
| 2741 | # ;;
|
|---|
| 2742 |
|
|---|
| 2743 | # [eE])
|
|---|
| 2744 | # break
|
|---|
| 2745 | # ;;
|
|---|
| 2746 | *)
|
|---|
| 2747 | break
|
|---|
| 2748 | # echo " "
|
|---|
| 2749 | ;;
|
|---|
| 2750 | esac
|
|---|
| 2751 | done
|
|---|
| 2752 |
|
|---|
| 2753 | echo " "
|
|---|
| 2754 |
|
|---|
| 2755 | case "$g4data" in
|
|---|
| 2756 | '')
|
|---|
| 2757 | g4data=$g4install/data
|
|---|
| 2758 | ;;
|
|---|
| 2759 | esac
|
|---|
| 2760 |
|
|---|
| 2761 | case "$g4levelgammadata" in
|
|---|
| 2762 | '')
|
|---|
| 2763 | g4levelgammadata=$g4data/PhotonEvaporation2.0
|
|---|
| 2764 | ;;
|
|---|
| 2765 | esac
|
|---|
| 2766 |
|
|---|
| 2767 | case "$g4radioactivedata" in
|
|---|
| 2768 | '')
|
|---|
| 2769 | g4radioactivedata=$g4data/RadioactiveDecay3.2
|
|---|
| 2770 | ;;
|
|---|
| 2771 | esac
|
|---|
| 2772 |
|
|---|
| 2773 | case "$g4ledata" in
|
|---|
| 2774 | '')
|
|---|
| 2775 | g4ledata=$g4data/G4EMLOW6.1
|
|---|
| 2776 | ;;
|
|---|
| 2777 | esac
|
|---|
| 2778 |
|
|---|
| 2779 | case "$g4neutronhpcrosssections" in
|
|---|
| 2780 | '')
|
|---|
| 2781 | g4neutronhpcrosssections=$g4data/G4NDL3.12
|
|---|
| 2782 | ;;
|
|---|
| 2783 | esac
|
|---|
| 2784 |
|
|---|
| 2785 | case "$g4abladata" in
|
|---|
| 2786 | '')
|
|---|
| 2787 | g4abladata=$g4data/G4ABLA3.0
|
|---|
| 2788 | ;;
|
|---|
| 2789 | esac
|
|---|
| 2790 |
|
|---|
| 2791 |
|
|---|
| 2792 | #case "$g4elasticdata" in
|
|---|
| 2793 | #'')
|
|---|
| 2794 | # g4elasticdata=$g4data/G4ELASTIC1.1
|
|---|
| 2795 | # ;;
|
|---|
| 2796 | #esac
|
|---|
| 2797 |
|
|---|
| 2798 | #########################################################################
|
|---|
| 2799 |
|
|---|
| 2800 | # while test 1 = 1 ; do
|
|---|
| 2801 |
|
|---|
| 2802 | g4message=`cat << EOM
|
|---|
| 2803 |
|
|---|
| 2804 | Please, specify default directory where ALL the Geant4 data is installed:
|
|---|
| 2805 |
|
|---|
| 2806 | G4LEVELGAMMADATA: $g4levelgammadata
|
|---|
| 2807 |
|
|---|
| 2808 | G4RADIOACTIVEDATA: $g4radioactivedata
|
|---|
| 2809 |
|
|---|
| 2810 | G4LEDATA: $g4ledata
|
|---|
| 2811 |
|
|---|
| 2812 | G4NEUTRONHPDATA: $g4neutronhpcrosssections
|
|---|
| 2813 |
|
|---|
| 2814 | G4ABLADATA: $g4abladata
|
|---|
| 2815 |
|
|---|
| 2816 | You will be asked about customizing these next.
|
|---|
| 2817 |
|
|---|
| 2818 | EOM`
|
|---|
| 2819 |
|
|---|
| 2820 | #dflt="NO DEFAULT ANSWER"
|
|---|
| 2821 | dflt=$g4data
|
|---|
| 2822 | #fn='d~'
|
|---|
| 2823 | rp=$g4message
|
|---|
| 2824 | #. ./myread
|
|---|
| 2825 | gans=$ans
|
|---|
| 2826 |
|
|---|
| 2827 | dflt=$g4data
|
|---|
| 2828 | fn='d~'
|
|---|
| 2829 | . ./getfile
|
|---|
| 2830 |
|
|---|
| 2831 | if [ X$g4data != X$ans ] ; then
|
|---|
| 2832 | g4data=$ans
|
|---|
| 2833 |
|
|---|
| 2834 | g4levelgammadata=$g4data/PhotonEvaporation2.0
|
|---|
| 2835 | g4radioactivedata=$g4data/RadioactiveDecay3.2
|
|---|
| 2836 | g4ledata=$g4data/G4EMLOW6.1
|
|---|
| 2837 | g4neutronhpcrosssections=$g4data/G4NDL3.12
|
|---|
| 2838 | g4abladata=$g4data/G4ABLA3.0
|
|---|
| 2839 | # g4elasticdata=$g4data/G4ELASTIC1.1
|
|---|
| 2840 | fi
|
|---|
| 2841 | # done
|
|---|
| 2842 |
|
|---|
| 2843 | ###################################################################
|
|---|
| 2844 |
|
|---|
| 2845 | while test 1 = 1 ; do
|
|---|
| 2846 |
|
|---|
| 2847 | g4message=`cat << EOM
|
|---|
| 2848 |
|
|---|
| 2849 | Please, specify default directory where the Geant4 data is installed:
|
|---|
| 2850 |
|
|---|
| 2851 | 1) G4LEVELGAMMADATA: $g4levelgammadata
|
|---|
| 2852 |
|
|---|
| 2853 | 2) G4RADIOACTIVEDATA: $g4radioactivedata
|
|---|
| 2854 |
|
|---|
| 2855 | 3) G4LEDATA: $g4ledata
|
|---|
| 2856 |
|
|---|
| 2857 | 4) G4NEUTRONHPDATA: $g4neutronhpcrosssections
|
|---|
| 2858 |
|
|---|
| 2859 | 5) G4ABLADATA: $g4abladata
|
|---|
| 2860 |
|
|---|
| 2861 | To modify default settings, select number above (e.g. 2)
|
|---|
| 2862 | EOM`
|
|---|
| 2863 |
|
|---|
| 2864 | #dflt="NO DEFAULT ANSWER"
|
|---|
| 2865 | dflt="Press [Enter] for default settings"
|
|---|
| 2866 | #fn='d~'
|
|---|
| 2867 | rp=$g4message
|
|---|
| 2868 | . ./myread
|
|---|
| 2869 | gans=$ans
|
|---|
| 2870 |
|
|---|
| 2871 |
|
|---|
| 2872 | case $gans in
|
|---|
| 2873 |
|
|---|
| 2874 | 1)
|
|---|
| 2875 | dflt=$g4levelgammadata
|
|---|
| 2876 | fn='d~'
|
|---|
| 2877 | rp="Where is Geant4 PhotonEvaporation2.0 data installed?"
|
|---|
| 2878 | . ./getfile
|
|---|
| 2879 | g4levelgammadata=$ans
|
|---|
| 2880 | ;;
|
|---|
| 2881 | 2)
|
|---|
| 2882 | dflt=$g4radioactivedata
|
|---|
| 2883 | fn='d~'
|
|---|
| 2884 | rp="Where is Geant4 RadioactiveDecay3.2 data installed?"
|
|---|
| 2885 | . ./getfile
|
|---|
| 2886 | g4radioactivedata=$ans
|
|---|
| 2887 | ;;
|
|---|
| 2888 | 3)
|
|---|
| 2889 | dflt=$g4ledata
|
|---|
| 2890 | fn='d~'
|
|---|
| 2891 | rp="Where is G4EMLOW6.1 data installed ?"
|
|---|
| 2892 | . ./getfile
|
|---|
| 2893 | g4ledata=$ans
|
|---|
| 2894 | ;;
|
|---|
| 2895 | 4)
|
|---|
| 2896 | dflt=$g4neutronhpcrosssections
|
|---|
| 2897 | fn='d~'
|
|---|
| 2898 | rp="Where is G4NDL3.12 data installed?"
|
|---|
| 2899 | . ./getfile
|
|---|
| 2900 | g4neutronhpcrosssections=$ans
|
|---|
| 2901 | ;;
|
|---|
| 2902 |
|
|---|
| 2903 | 5)
|
|---|
| 2904 | dflt=$g4abladata
|
|---|
| 2905 | fn='d~'
|
|---|
| 2906 | rp="Where is G4ABLA3.0 data installed?"
|
|---|
| 2907 | . ./getfile
|
|---|
| 2908 | g4abladata=$ans
|
|---|
| 2909 | ;;
|
|---|
| 2910 |
|
|---|
| 2911 | # 5)
|
|---|
| 2912 | # dflt=$g4elasticdata
|
|---|
| 2913 | # fn='d~'
|
|---|
| 2914 | # rp="Where is G4ELASTIC1.1 data installed?"
|
|---|
| 2915 | # . ./getfile
|
|---|
| 2916 | # g4elasticdata=$ans
|
|---|
| 2917 | # ;;
|
|---|
| 2918 |
|
|---|
| 2919 | # [eE])
|
|---|
| 2920 | # break
|
|---|
| 2921 | # ;;
|
|---|
| 2922 | *)
|
|---|
| 2923 | break
|
|---|
| 2924 | # echo " "
|
|---|
| 2925 | ;;
|
|---|
| 2926 | esac
|
|---|
| 2927 | done
|
|---|
| 2928 |
|
|---|
| 2929 |
|
|---|
| 2930 | if test "X$g4clhep_base_dir" = "X" ; then
|
|---|
| 2931 |
|
|---|
| 2932 | clhep_dirs=`find $g4clhep_base_dir /usr/local/include /usr/include -type d -name CLHEP 2>/dev/null |xargs echo`
|
|---|
| 2933 | #echo clhep_dirs=$clhep_dirs
|
|---|
| 2934 |
|
|---|
| 2935 | fi
|
|---|
| 2936 |
|
|---|
| 2937 | if test "X$clhep_dirs" != "X" ; then
|
|---|
| 2938 |
|
|---|
| 2939 | g4clhep_base_dir_found=`echo $clhep_dirs|cut -d" " -f1`
|
|---|
| 2940 | #echo g4clhep_base_dir_found=$g4clhep_base_dir_found
|
|---|
| 2941 |
|
|---|
| 2942 |
|
|---|
| 2943 | #g4clhep_base_dir_n=`echo $g4clhep_base_dir_found |awk -F"/" '{print NF}'`
|
|---|
| 2944 | #echo g4clhep_base_dir_n=$g4clhep_base_dir_n
|
|---|
| 2945 | g4clhep_base_dir_found=`dirname $g4clhep_base_dir_found`
|
|---|
| 2946 | g4clhep_base_dir_found=`dirname $g4clhep_base_dir_found`
|
|---|
| 2947 |
|
|---|
| 2948 | g4clhep_base_dir=$g4clhep_base_dir_found
|
|---|
| 2949 |
|
|---|
| 2950 | #else
|
|---|
| 2951 | #case "$g4clhep_base_dir" in
|
|---|
| 2952 | #'')
|
|---|
| 2953 | # if test "X$g4system" = "XWIN32-VC" -o "X$g4system" = "XWIN32-VC7"; then
|
|---|
| 2954 | # g4clhep_base_dir="c:/usr/local"
|
|---|
| 2955 | # else
|
|---|
| 2956 | # g4clhep_base_dir=/usr/local
|
|---|
| 2957 | # fi
|
|---|
| 2958 | # ;;
|
|---|
| 2959 | #esac
|
|---|
| 2960 | fi
|
|---|
| 2961 |
|
|---|
| 2962 |
|
|---|
| 2963 | #while test 1 = 1 ; do
|
|---|
| 2964 |
|
|---|
| 2965 | #if test "X$g4clhep_base_dir" != "X" ; then
|
|---|
| 2966 | #clhep_dirs=$g4clhep_base_dir
|
|---|
| 2967 | #echo 1 g4clhep_base_dir=$g4clhep_base_dir
|
|---|
| 2968 | #fi
|
|---|
| 2969 |
|
|---|
| 2970 | if test "X$g4clhep_base_dir" != "X" ; then
|
|---|
| 2971 |
|
|---|
| 2972 | g4message=`cat << EOM
|
|---|
| 2973 |
|
|---|
| 2974 | Please, specify where CLHEP is installed. It was found in:
|
|---|
| 2975 |
|
|---|
| 2976 | CLHEP_BASE_DIR: $g4clhep_base_dir
|
|---|
| 2977 |
|
|---|
| 2978 | EOM`
|
|---|
| 2979 |
|
|---|
| 2980 | dflt=$g4clhep_base_dir
|
|---|
| 2981 | fn='d~'
|
|---|
| 2982 | rp=$g4message
|
|---|
| 2983 | . ./getfile
|
|---|
| 2984 |
|
|---|
| 2985 | cend="no"
|
|---|
| 2986 | while test "$cend" = "no" ; do
|
|---|
| 2987 | if test -e "$ans/include/CLHEP" ; then
|
|---|
| 2988 | cend="yes"
|
|---|
| 2989 |
|
|---|
| 2990 | g4clhep_base_dir=$ans
|
|---|
| 2991 |
|
|---|
| 2992 | else
|
|---|
| 2993 |
|
|---|
| 2994 | g4message=`cat << EOM
|
|---|
| 2995 |
|
|---|
| 2996 | Could not find CLHEP installed in $ans!
|
|---|
| 2997 | Please, specify where CLHEP is installed:
|
|---|
| 2998 |
|
|---|
| 2999 | CLHEP_BASE_DIR:
|
|---|
| 3000 |
|
|---|
| 3001 | EOM`
|
|---|
| 3002 |
|
|---|
| 3003 | dflt=""
|
|---|
| 3004 | fn='d~'
|
|---|
| 3005 | rp=$g4message
|
|---|
| 3006 | . ./getfile
|
|---|
| 3007 | fi
|
|---|
| 3008 | done
|
|---|
| 3009 |
|
|---|
| 3010 | else
|
|---|
| 3011 |
|
|---|
| 3012 | g4message=`cat << EOM
|
|---|
| 3013 |
|
|---|
| 3014 | Could not find CLHEP installed on this system!
|
|---|
| 3015 | Please, specify where CLHEP is installed:
|
|---|
| 3016 |
|
|---|
| 3017 | CLHEP_BASE_DIR:
|
|---|
| 3018 |
|
|---|
| 3019 | EOM`
|
|---|
| 3020 |
|
|---|
| 3021 | dflt=""
|
|---|
| 3022 | fn='d~'
|
|---|
| 3023 | rp=$g4message
|
|---|
| 3024 | . ./getfile
|
|---|
| 3025 |
|
|---|
| 3026 | cend="no"
|
|---|
| 3027 | while test "$cend" = "no" ; do
|
|---|
| 3028 | if test -e "$ans/include/CLHEP" ; then
|
|---|
| 3029 | cend="yes"
|
|---|
| 3030 |
|
|---|
| 3031 | g4clhep_base_dir=$ans
|
|---|
| 3032 |
|
|---|
| 3033 | else
|
|---|
| 3034 |
|
|---|
| 3035 | g4message=`cat << EOM
|
|---|
| 3036 |
|
|---|
| 3037 | Could not find CLHEP installed in $ans!
|
|---|
| 3038 | Please, specify where CLHEP is installed:
|
|---|
| 3039 |
|
|---|
| 3040 | CLHEP_BASE_DIR:
|
|---|
| 3041 |
|
|---|
| 3042 | EOM`
|
|---|
| 3043 |
|
|---|
| 3044 | dflt=""
|
|---|
| 3045 | fn='d~'
|
|---|
| 3046 | rp=$g4message
|
|---|
| 3047 | . ./getfile
|
|---|
| 3048 | fi
|
|---|
| 3049 | done
|
|---|
| 3050 |
|
|---|
| 3051 | fi
|
|---|
| 3052 |
|
|---|
| 3053 | #dflt="Press [Enter] for default settings"
|
|---|
| 3054 | #fn='d~'
|
|---|
| 3055 | #####rp=$g4message
|
|---|
| 3056 | #. ./myread
|
|---|
| 3057 | #gans=$ans
|
|---|
| 3058 |
|
|---|
| 3059 | # case $gans in
|
|---|
| 3060 |
|
|---|
| 3061 | # 1)
|
|---|
| 3062 | ## dflt=""
|
|---|
| 3063 | ## fn='d~'
|
|---|
| 3064 | # rp="Where is CLHEP installed?"
|
|---|
| 3065 | ## . ./getfile
|
|---|
| 3066 | ## g4clhep_base_dir=$ans
|
|---|
| 3067 |
|
|---|
| 3068 | ##### g4clhep_include_dir=$ans/include
|
|---|
| 3069 | ##### g4clhep_lib_dir=$ans/lib
|
|---|
| 3070 | # ;;
|
|---|
| 3071 | # 2)
|
|---|
| 3072 | # dflt=$g4clhep_include_dir
|
|---|
| 3073 | # fn='d~'
|
|---|
| 3074 | # rp="Where is CLHEP include directory?"
|
|---|
| 3075 | # . ./getfile
|
|---|
| 3076 | # g4clhep_include_dir=$ans
|
|---|
| 3077 | # ;;
|
|---|
| 3078 | # 3)
|
|---|
| 3079 | # dflt=$g4clhep_lib_dir
|
|---|
| 3080 | # fn='d~'
|
|---|
| 3081 | # rp="Where is CLHEP lib directory?"
|
|---|
| 3082 | # . ./getfile
|
|---|
| 3083 | # g4clhep_lib_dir=$ans
|
|---|
| 3084 | # ;;
|
|---|
| 3085 | # 4)
|
|---|
| 3086 | # dflt=$g4clhep_lib
|
|---|
| 3087 | # rp="What is CLHEP lib title?"
|
|---|
| 3088 | # . ./myread
|
|---|
| 3089 | # g4clhep_lib=$ans
|
|---|
| 3090 | # ;;
|
|---|
| 3091 | ## [eE])
|
|---|
| 3092 | ## break
|
|---|
| 3093 | ## ;;
|
|---|
| 3094 | # *)
|
|---|
| 3095 | # echo " "
|
|---|
| 3096 | # break
|
|---|
| 3097 | # ;;
|
|---|
| 3098 | # esac
|
|---|
| 3099 | #done
|
|---|
| 3100 |
|
|---|
| 3101 | case "$g4clhep_include_dir" in
|
|---|
| 3102 | '')
|
|---|
| 3103 | g4clhep_include_dir=$g4clhep_base_dir/include
|
|---|
| 3104 | ;;
|
|---|
| 3105 | esac
|
|---|
| 3106 |
|
|---|
| 3107 | case "$g4clhep_lib_dir" in
|
|---|
| 3108 | '')
|
|---|
| 3109 | g4clhep_lib_dir=$g4clhep_base_dir/lib
|
|---|
| 3110 | ;;
|
|---|
| 3111 | esac
|
|---|
| 3112 |
|
|---|
| 3113 | case "$g4clhep_lib" in
|
|---|
| 3114 | '')
|
|---|
| 3115 | if test "X$g4system" = "XWIN32-VC" -o "X$g4system" = "XWIN32-VC7"; then
|
|---|
| 3116 | g4clhep_lib="CLHEP.lib"
|
|---|
| 3117 | else
|
|---|
| 3118 | g4clhep_lib=CLHEP
|
|---|
| 3119 | fi
|
|---|
| 3120 | ;;
|
|---|
| 3121 | esac
|
|---|
| 3122 |
|
|---|
| 3123 | while test 1 = 1 ; do
|
|---|
| 3124 |
|
|---|
| 3125 | g4message_1=`cat << You
|
|---|
| 3126 |
|
|---|
| 3127 | You can customize paths and library name of you CLHEP installation:
|
|---|
| 3128 |
|
|---|
| 3129 | 1) CLHEP_INCLUDE_DIR: $g4clhep_include_dir
|
|---|
| 3130 | 2) CLHEP_LIB_DIR: $g4clhep_lib_dir
|
|---|
| 3131 | 3) CLHEP_LIB: $g4clhep_lib
|
|---|
| 3132 |
|
|---|
| 3133 | You`
|
|---|
| 3134 |
|
|---|
| 3135 | g4message_2=" need to use full library name with its extension (e.g. libCLHEP.lib)."
|
|---|
| 3136 |
|
|---|
| 3137 | g4message_3=`cat << EOM
|
|---|
| 3138 |
|
|---|
| 3139 | To modify default settings, select number above (e.g. 2)
|
|---|
| 3140 | EOM`
|
|---|
| 3141 |
|
|---|
| 3142 |
|
|---|
| 3143 | if test "X$g4system" != "XWIN32-VC" -a "X$g4system" != "XWIN32-VC7"; then
|
|---|
| 3144 | rp=$g4message_1$g4message_3
|
|---|
| 3145 | else
|
|---|
| 3146 | rp=$g4message_1$g4message_2$g4message_3
|
|---|
| 3147 | fi
|
|---|
| 3148 |
|
|---|
| 3149 | dflt="Press [Enter] for default settings"
|
|---|
| 3150 | #fn='d~'
|
|---|
| 3151 | . ./myread
|
|---|
| 3152 | gans=$ans
|
|---|
| 3153 |
|
|---|
| 3154 | case $gans in
|
|---|
| 3155 |
|
|---|
| 3156 | 1)
|
|---|
| 3157 | dflt=$g4clhep_include_dir
|
|---|
| 3158 | fn='d~'
|
|---|
| 3159 | rp="Where is CLHEP include directory?"
|
|---|
| 3160 | . ./getfile
|
|---|
| 3161 | g4clhep_include_dir=$ans
|
|---|
| 3162 | ;;
|
|---|
| 3163 | 2)
|
|---|
| 3164 | dflt=$g4clhep_lib_dir
|
|---|
| 3165 | fn='d~'
|
|---|
| 3166 | rp="Where is CLHEP lib directory?"
|
|---|
| 3167 | . ./getfile
|
|---|
| 3168 | g4clhep_lib_dir=$ans
|
|---|
| 3169 | ;;
|
|---|
| 3170 | 3)
|
|---|
| 3171 | dflt=$g4clhep_lib
|
|---|
| 3172 | rp="What is CLHEP lib title?"
|
|---|
| 3173 | . ./myread
|
|---|
| 3174 | g4clhep_lib=$ans
|
|---|
| 3175 | ;;
|
|---|
| 3176 | # [eE])
|
|---|
| 3177 | ## break
|
|---|
| 3178 | ## ;;
|
|---|
| 3179 | *)
|
|---|
| 3180 | # echo " "
|
|---|
| 3181 | break
|
|---|
| 3182 | ;;
|
|---|
| 3183 | esac
|
|---|
| 3184 | done
|
|---|
| 3185 |
|
|---|
| 3186 | #if test "X$g4clhep_base_dir" = "X/usr" -o "X$g4clhep_base_dir" = "X/usr/local"; then
|
|---|
| 3187 | #g4clhep_base_dir=""
|
|---|
| 3188 | #fi
|
|---|
| 3189 | #
|
|---|
| 3190 | #if test "X$g4clhep_include_dir" = "X/usr/include" -o "X$g4clhep_include_dir" = "X/usr/local/include"; then
|
|---|
| 3191 | #g4clhep_include_dir=""
|
|---|
| 3192 | #fi
|
|---|
| 3193 | #
|
|---|
| 3194 | #if test "X$g4clhep_lib_dir" = "X/usr/lib" -o "X$g4clhep_lib_dir" = "X/usr/local/lib"; then
|
|---|
| 3195 | #g4clhep_lib_dir=""
|
|---|
| 3196 | #fi
|
|---|
| 3197 |
|
|---|
| 3198 | echo " "
|
|---|
| 3199 |
|
|---|
| 3200 | case "$g4lib_build_shared" in
|
|---|
| 3201 | '')
|
|---|
| 3202 | g4lib_build_shared=n
|
|---|
| 3203 | ;;
|
|---|
| 3204 | esac
|
|---|
| 3205 |
|
|---|
| 3206 | echo " "
|
|---|
| 3207 |
|
|---|
| 3208 | case "$g4lib_build_static" in
|
|---|
| 3209 | '')
|
|---|
| 3210 | g4lib_build_static=n
|
|---|
| 3211 | ;;
|
|---|
| 3212 | esac
|
|---|
| 3213 |
|
|---|
| 3214 | echo " "
|
|---|
| 3215 |
|
|---|
| 3216 | case "$g4lib_use_shared" in
|
|---|
| 3217 | '')
|
|---|
| 3218 | g4lib_use_shared=n
|
|---|
| 3219 | ;;
|
|---|
| 3220 | esac
|
|---|
| 3221 |
|
|---|
| 3222 | echo " "
|
|---|
| 3223 |
|
|---|
| 3224 | case "$g4lib_use_static" in
|
|---|
| 3225 | '')
|
|---|
| 3226 | g4lib_use_static=n
|
|---|
| 3227 | ;;
|
|---|
| 3228 | esac
|
|---|
| 3229 |
|
|---|
| 3230 | case "$g4lib_build_dll" in
|
|---|
| 3231 | '')
|
|---|
| 3232 | g4lib_build_dll=n
|
|---|
| 3233 | ;;
|
|---|
| 3234 | esac
|
|---|
| 3235 |
|
|---|
| 3236 | case "$g4lib_build_dyn" in
|
|---|
| 3237 | '')
|
|---|
| 3238 | g4lib_build_dyn=n
|
|---|
| 3239 | ;;
|
|---|
| 3240 | esac
|
|---|
| 3241 |
|
|---|
| 3242 | #
|
|---|
| 3243 | # Ask about building of SHARED|STATIC libraries - default STATIC.
|
|---|
| 3244 | #
|
|---|
| 3245 | echo ""
|
|---|
| 3246 |
|
|---|
| 3247 | if test "X$g4system" = "XWIN32-VC" -o "X$g4system" = "XWIN32-VC7"; then
|
|---|
| 3248 |
|
|---|
| 3249 | while test 1 = 1 ; do
|
|---|
| 3250 |
|
|---|
| 3251 | g4message=`cat << EOM
|
|---|
| 3252 |
|
|---|
| 3253 | By default 'static' libraries are built.
|
|---|
| 3254 |
|
|---|
| 3255 | Do you want to build DLL (.dll) libraries?
|
|---|
| 3256 | EOM`
|
|---|
| 3257 |
|
|---|
| 3258 | dflt=$g4lib_build_dll
|
|---|
| 3259 | rp=$g4message
|
|---|
| 3260 | . ./myread
|
|---|
| 3261 | gans=$ans
|
|---|
| 3262 |
|
|---|
| 3263 | case $gans in
|
|---|
| 3264 |
|
|---|
| 3265 | n*|N*)
|
|---|
| 3266 | g4lib_build_dll=n
|
|---|
| 3267 | g4lib_build_shared=n
|
|---|
| 3268 | g4lib_build_static=y
|
|---|
| 3269 | break
|
|---|
| 3270 | ;;
|
|---|
| 3271 | y*|Y*)
|
|---|
| 3272 | g4lib_build_dll=y
|
|---|
| 3273 | g4lib_build_shared=n
|
|---|
| 3274 | g4lib_build_static=n
|
|---|
| 3275 |
|
|---|
| 3276 | # g4lib_build_static=""
|
|---|
| 3277 | # g4lib_use_shared=1
|
|---|
| 3278 | # g4lib_use_static=""
|
|---|
| 3279 | break
|
|---|
| 3280 | ;;
|
|---|
| 3281 | # [eE])
|
|---|
| 3282 | # break
|
|---|
| 3283 | # ;;
|
|---|
| 3284 | # *)
|
|---|
| 3285 | # echo " "
|
|---|
| 3286 | # break
|
|---|
| 3287 | # ;;
|
|---|
| 3288 | esac
|
|---|
| 3289 | done
|
|---|
| 3290 |
|
|---|
| 3291 | fi
|
|---|
| 3292 |
|
|---|
| 3293 | if test "X$g4system" != "XWIN32-VC" -a "X$g4system" != "XWIN32-VC7" ; then
|
|---|
| 3294 |
|
|---|
| 3295 | while test 1 = 1 ; do
|
|---|
| 3296 |
|
|---|
| 3297 | g4message=`cat << EOM
|
|---|
| 3298 |
|
|---|
| 3299 | By default 'static' (.a) libraries are built.
|
|---|
| 3300 |
|
|---|
| 3301 | Do you want to build 'shared' (.so) libraries?
|
|---|
| 3302 | EOM`
|
|---|
| 3303 |
|
|---|
| 3304 | dflt=$g4lib_build_shared
|
|---|
| 3305 | rp=$g4message
|
|---|
| 3306 | . ./myread
|
|---|
| 3307 | gans=$ans
|
|---|
| 3308 |
|
|---|
| 3309 | case $gans in
|
|---|
| 3310 |
|
|---|
| 3311 | n*|N*)
|
|---|
| 3312 | g4lib_build_shared=n
|
|---|
| 3313 | g4lib_build_static=y
|
|---|
| 3314 | break
|
|---|
| 3315 | ;;
|
|---|
| 3316 | y*|Y*)
|
|---|
| 3317 | g4lib_build_shared=y
|
|---|
| 3318 | # g4lib_build_static=""
|
|---|
| 3319 | # g4lib_use_shared=1
|
|---|
| 3320 | # g4lib_use_static=""
|
|---|
| 3321 | break
|
|---|
| 3322 | ;;
|
|---|
| 3323 | # [eE])
|
|---|
| 3324 | # break
|
|---|
| 3325 | # ;;
|
|---|
| 3326 | # *)
|
|---|
| 3327 | # echo " "
|
|---|
| 3328 | # break
|
|---|
| 3329 | # ;;
|
|---|
| 3330 | esac
|
|---|
| 3331 | done
|
|---|
| 3332 |
|
|---|
| 3333 | if [ X$g4lib_build_shared = Xy ] ; then
|
|---|
| 3334 | #
|
|---|
| 3335 | # Ask about g4lib_build_static - default "n".
|
|---|
| 3336 | #
|
|---|
| 3337 | echo ""
|
|---|
| 3338 |
|
|---|
| 3339 | while test 1 = 1 ; do
|
|---|
| 3340 |
|
|---|
| 3341 | g4message=`cat << EOM
|
|---|
| 3342 |
|
|---|
| 3343 | You selected to build 'shared' (.so) libraries.
|
|---|
| 3344 | Do you want to build 'static' (.a) libraries too?
|
|---|
| 3345 | EOM`
|
|---|
| 3346 |
|
|---|
| 3347 | #dflt=$g4lib_build_static
|
|---|
| 3348 | dflt=n
|
|---|
| 3349 | rp=$g4message
|
|---|
| 3350 | . ./myread
|
|---|
| 3351 | gans=$ans
|
|---|
| 3352 |
|
|---|
| 3353 | case $gans in
|
|---|
| 3354 |
|
|---|
| 3355 | n*|N*)
|
|---|
| 3356 | g4lib_build_static=n
|
|---|
| 3357 | break
|
|---|
| 3358 | ;;
|
|---|
| 3359 | y*|Y*)
|
|---|
| 3360 | # g4lib_build_shared=1
|
|---|
| 3361 | g4lib_build_static=y
|
|---|
| 3362 | # g4lib_use_shared=1
|
|---|
| 3363 | # g4lib_use_static=""
|
|---|
| 3364 | break
|
|---|
| 3365 | ;;
|
|---|
| 3366 | # [eE])
|
|---|
| 3367 | # break
|
|---|
| 3368 | # ;;
|
|---|
| 3369 | # *)
|
|---|
| 3370 | # echo " "
|
|---|
| 3371 | # break
|
|---|
| 3372 | # ;;
|
|---|
| 3373 | esac
|
|---|
| 3374 | done
|
|---|
| 3375 |
|
|---|
| 3376 | ## Comment out in waiting G4LIB_USE_STATIC and G4LIB_USE_SHARED.
|
|---|
| 3377 | #
|
|---|
| 3378 | #if [ X$g4lib_build_static = Xy ] ; then
|
|---|
| 3379 | ##
|
|---|
| 3380 | ## Ask about g4lib_use_static - default "n".
|
|---|
| 3381 | ##
|
|---|
| 3382 | #echo ""
|
|---|
| 3383 | #
|
|---|
| 3384 | #while test 1 = 1 ; do
|
|---|
| 3385 | #
|
|---|
| 3386 | #g4message=`cat << EOM
|
|---|
| 3387 | #
|
|---|
| 3388 | #You selected to build 'shared' (.so) and 'static' (.a) libraries.
|
|---|
| 3389 | #Do you want to use 'static' (.a) libraries?
|
|---|
| 3390 | #EOM`
|
|---|
| 3391 | #
|
|---|
| 3392 | #dflt=$g4lib_use_static
|
|---|
| 3393 | #rp=$g4message
|
|---|
| 3394 | #. ./myread
|
|---|
| 3395 | #gans=$ans
|
|---|
| 3396 | #
|
|---|
| 3397 | # case $gans in
|
|---|
| 3398 | #
|
|---|
| 3399 | # n*|N*)
|
|---|
| 3400 | # break
|
|---|
| 3401 | # ;;
|
|---|
| 3402 | # y*|Y*)
|
|---|
| 3403 | ## g4lib_build_shared=1
|
|---|
| 3404 | ## g4lib_build_static=1
|
|---|
| 3405 | ## g4lib_use_shared=1
|
|---|
| 3406 | # g4lib_use_static=y
|
|---|
| 3407 | # break
|
|---|
| 3408 | # ;;
|
|---|
| 3409 | ## [eE])
|
|---|
| 3410 | ## break
|
|---|
| 3411 | ## ;;
|
|---|
| 3412 | ## *)
|
|---|
| 3413 | ## echo " "
|
|---|
| 3414 | ## break
|
|---|
| 3415 | ## ;;
|
|---|
| 3416 | # esac
|
|---|
| 3417 | #done
|
|---|
| 3418 | #fi
|
|---|
| 3419 |
|
|---|
| 3420 | fi
|
|---|
| 3421 |
|
|---|
| 3422 | fi # if !Win
|
|---|
| 3423 |
|
|---|
| 3424 | echo " "
|
|---|
| 3425 | case "$g4global" in
|
|---|
| 3426 | '')
|
|---|
| 3427 | g4global=n
|
|---|
| 3428 | ;;
|
|---|
| 3429 | esac
|
|---|
| 3430 |
|
|---|
| 3431 | echo " "
|
|---|
| 3432 | # By default it's 'grabular'!
|
|---|
| 3433 | case "$g4granular" in
|
|---|
| 3434 | '')
|
|---|
| 3435 | g4granular=y
|
|---|
| 3436 | ;;
|
|---|
| 3437 | esac
|
|---|
| 3438 |
|
|---|
| 3439 | echo " "
|
|---|
| 3440 | # Will be set (if needed) in GNUmakefile!
|
|---|
| 3441 | case "$g4lib_use_granular" in
|
|---|
| 3442 | '')
|
|---|
| 3443 | g4lib_use_granular=y
|
|---|
| 3444 | ;;
|
|---|
| 3445 | esac
|
|---|
| 3446 |
|
|---|
| 3447 | 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
|
|---|
| 3448 |
|
|---|
| 3449 | g4global=n
|
|---|
| 3450 | g4granular=n
|
|---|
| 3451 | g4lib_use_granular=n
|
|---|
| 3452 |
|
|---|
| 3453 | fi
|
|---|
| 3454 |
|
|---|
| 3455 | 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
|
|---|
| 3456 |
|
|---|
| 3457 | #
|
|---|
| 3458 | # Ask about g4global - default "(empty)".
|
|---|
| 3459 | #
|
|---|
| 3460 | echo ""
|
|---|
| 3461 |
|
|---|
| 3462 | while test 1 = 1 ; do
|
|---|
| 3463 |
|
|---|
| 3464 | g4message=`cat << EOM
|
|---|
| 3465 |
|
|---|
| 3466 | Do you want to build 'global' compound libraries?
|
|---|
| 3467 | EOM`
|
|---|
| 3468 |
|
|---|
| 3469 | dflt=$g4global
|
|---|
| 3470 | rp=$g4message
|
|---|
| 3471 | . ./myread
|
|---|
| 3472 | gans=$ans
|
|---|
| 3473 |
|
|---|
| 3474 | case $gans in
|
|---|
| 3475 |
|
|---|
| 3476 | n*|N*)
|
|---|
| 3477 | g4global=n
|
|---|
| 3478 | g4granular=y
|
|---|
| 3479 | g4lib_use_granular=y
|
|---|
| 3480 | break
|
|---|
| 3481 | ;;
|
|---|
| 3482 | y*|Y*)
|
|---|
| 3483 | g4global=y
|
|---|
| 3484 | # Shoud be comment out to keep settings from config.sh - not now to keep as in release
|
|---|
| 3485 | g4granular=n
|
|---|
| 3486 | # Shoud be comment out to keep settings from config.sh - not now to keep as in release
|
|---|
| 3487 | g4lib_use_granular=n
|
|---|
| 3488 | break
|
|---|
| 3489 | ;;
|
|---|
| 3490 | # [eE])
|
|---|
| 3491 | # break
|
|---|
| 3492 | # ;;
|
|---|
| 3493 | # *)
|
|---|
| 3494 | # echo " "
|
|---|
| 3495 | # break
|
|---|
| 3496 | # ;;
|
|---|
| 3497 | esac
|
|---|
| 3498 | done
|
|---|
| 3499 |
|
|---|
| 3500 | if [ X$g4global = Xy ] ; then
|
|---|
| 3501 | #
|
|---|
| 3502 | # Ask about g4granular - default "n".
|
|---|
| 3503 | #
|
|---|
| 3504 | echo ""
|
|---|
| 3505 |
|
|---|
| 3506 | while test 1 = 1 ; do
|
|---|
| 3507 |
|
|---|
| 3508 | g4message=`cat << EOM
|
|---|
| 3509 |
|
|---|
| 3510 | Granular libraries are used by defaults, you asked to build global
|
|---|
| 3511 | compound libraries. Do you want to build 'granular' libraries too?
|
|---|
| 3512 | EOM`
|
|---|
| 3513 |
|
|---|
| 3514 | dflt=$g4granular
|
|---|
| 3515 | rp=$g4message
|
|---|
| 3516 | . ./myread
|
|---|
| 3517 | gans=$ans
|
|---|
| 3518 |
|
|---|
| 3519 | case $gans in
|
|---|
| 3520 |
|
|---|
| 3521 | n*|N*)
|
|---|
| 3522 | g4granular=n
|
|---|
| 3523 | break
|
|---|
| 3524 | ;;
|
|---|
| 3525 | y*|Y*)
|
|---|
| 3526 | g4granular=y
|
|---|
| 3527 | break
|
|---|
| 3528 | ;;
|
|---|
| 3529 | # [eE])
|
|---|
| 3530 | # break
|
|---|
| 3531 | # ;;
|
|---|
| 3532 | # *)
|
|---|
| 3533 | # echo " "
|
|---|
| 3534 | # break
|
|---|
| 3535 | # ;;
|
|---|
| 3536 | esac
|
|---|
| 3537 | done
|
|---|
| 3538 |
|
|---|
| 3539 | if [ X$g4granular = Xy ] ; then
|
|---|
| 3540 | #
|
|---|
| 3541 | # Ask about g4lib_use_granular - default "n".
|
|---|
| 3542 | #
|
|---|
| 3543 | echo ""
|
|---|
| 3544 |
|
|---|
| 3545 | while test 1 = 1 ; do
|
|---|
| 3546 |
|
|---|
| 3547 | g4message=`cat << EOM
|
|---|
| 3548 |
|
|---|
| 3549 | Global libraries are used by defaults, you asked to build global
|
|---|
| 3550 | compound libraries and granular libraries.
|
|---|
| 3551 | Do you want to use 'granular' libraries instead?
|
|---|
| 3552 | EOM`
|
|---|
| 3553 |
|
|---|
| 3554 | dflt=$g4lib_use_granular
|
|---|
| 3555 | rp=$g4message
|
|---|
| 3556 | . ./myread
|
|---|
| 3557 | gans=$ans
|
|---|
| 3558 |
|
|---|
| 3559 | case $gans in
|
|---|
| 3560 |
|
|---|
| 3561 | n*|N*)
|
|---|
| 3562 | g4lib_use_granular=n
|
|---|
| 3563 | break
|
|---|
| 3564 | ;;
|
|---|
| 3565 | y*|Y*)
|
|---|
| 3566 | g4lib_use_granular=y
|
|---|
| 3567 | break
|
|---|
| 3568 | ;;
|
|---|
| 3569 | # [eE])
|
|---|
| 3570 | # break
|
|---|
| 3571 | # ;;
|
|---|
| 3572 | # *)
|
|---|
| 3573 | # echo " "
|
|---|
| 3574 | # break
|
|---|
| 3575 | # ;;
|
|---|
| 3576 | esac
|
|---|
| 3577 | done
|
|---|
| 3578 | fi
|
|---|
| 3579 | fi
|
|---|
| 3580 |
|
|---|
| 3581 | fi # !Win
|
|---|
| 3582 |
|
|---|
| 3583 | ### End file - without will be problem! Check in others...
|
|---|
| 3584 |
|
|---|
| 3585 |
|
|---|
| 3586 | echo " "
|
|---|
| 3587 | case "$g4debug" in
|
|---|
| 3588 | '')
|
|---|
| 3589 | g4debug=n
|
|---|
| 3590 | ;;
|
|---|
| 3591 | esac
|
|---|
| 3592 |
|
|---|
| 3593 | #
|
|---|
| 3594 | # Ask about g4debug - default "(empty)".
|
|---|
| 3595 | #
|
|---|
| 3596 | echo ""
|
|---|
| 3597 |
|
|---|
| 3598 | while test 1 = 1 ; do
|
|---|
| 3599 |
|
|---|
| 3600 | g4message=`cat << EOM
|
|---|
| 3601 |
|
|---|
| 3602 | Do you want to compile libraries in DEBUG mode (-g)?
|
|---|
| 3603 | EOM`
|
|---|
| 3604 |
|
|---|
| 3605 | dflt=$g4debug
|
|---|
| 3606 | rp=$g4message
|
|---|
| 3607 | . ./myread
|
|---|
| 3608 | gans=$ans
|
|---|
| 3609 |
|
|---|
| 3610 | case $gans in
|
|---|
| 3611 |
|
|---|
| 3612 | n*|N*)
|
|---|
| 3613 | break
|
|---|
| 3614 | ;;
|
|---|
| 3615 | y*|Y*)
|
|---|
| 3616 | g4debug=y
|
|---|
| 3617 | break
|
|---|
| 3618 | ;;
|
|---|
| 3619 | # [eE])
|
|---|
| 3620 | # break
|
|---|
| 3621 | # ;;
|
|---|
| 3622 | # *)
|
|---|
| 3623 | # echo " "
|
|---|
| 3624 | # break
|
|---|
| 3625 | # ;;
|
|---|
| 3626 | esac
|
|---|
| 3627 | done
|
|---|
| 3628 |
|
|---|
| 3629 |
|
|---|
| 3630 | echo " "
|
|---|
| 3631 |
|
|---|
| 3632 | case "$g4ui_none" in
|
|---|
| 3633 | '')
|
|---|
| 3634 | g4ui_none=n
|
|---|
| 3635 | ;;
|
|---|
| 3636 | esac
|
|---|
| 3637 |
|
|---|
| 3638 | # Set by default!
|
|---|
| 3639 | case "$g4ui_build_terminal_session" in
|
|---|
| 3640 | '')
|
|---|
| 3641 | g4ui_build_terminal_session=y
|
|---|
| 3642 | ;;
|
|---|
| 3643 | esac
|
|---|
| 3644 |
|
|---|
| 3645 | # Set by default!
|
|---|
| 3646 | case "$g4ui_use_terminal" in
|
|---|
| 3647 | '')
|
|---|
| 3648 | g4ui_use_terminal=y
|
|---|
| 3649 | ;;
|
|---|
| 3650 | esac
|
|---|
| 3651 |
|
|---|
| 3652 | # Set by default!
|
|---|
| 3653 | case "$g4ui_build_gag_session" in
|
|---|
| 3654 | '')
|
|---|
| 3655 | g4ui_build_gag_session=y
|
|---|
| 3656 | ;;
|
|---|
| 3657 | esac
|
|---|
| 3658 |
|
|---|
| 3659 | # Set by default!
|
|---|
| 3660 | case "$g4ui_use_gag" in
|
|---|
| 3661 | '')
|
|---|
| 3662 | g4ui_use_gag=y
|
|---|
| 3663 | ;;
|
|---|
| 3664 | esac
|
|---|
| 3665 |
|
|---|
| 3666 | case "$g4ui_build_xm_session" in
|
|---|
| 3667 | '')
|
|---|
| 3668 | g4ui_build_xm_session=n
|
|---|
| 3669 | ;;
|
|---|
| 3670 | esac
|
|---|
| 3671 |
|
|---|
| 3672 | case "$g4ui_use_xm" in
|
|---|
| 3673 | '')
|
|---|
| 3674 | g4ui_use_xm=n
|
|---|
| 3675 | ;;
|
|---|
| 3676 | esac
|
|---|
| 3677 |
|
|---|
| 3678 | case "$g4ui_build_xaw_session" in
|
|---|
| 3679 | '')
|
|---|
| 3680 | g4ui_build_xaw_session=n
|
|---|
| 3681 | ;;
|
|---|
| 3682 | esac
|
|---|
| 3683 |
|
|---|
| 3684 | case "$g4ui_use_xaw" in
|
|---|
| 3685 | '')
|
|---|
| 3686 | g4ui_use_xaw=n
|
|---|
| 3687 | ;;
|
|---|
| 3688 | esac
|
|---|
| 3689 |
|
|---|
| 3690 | case "$g4ui_build_win32_session" in
|
|---|
| 3691 | '')
|
|---|
| 3692 | g4ui_build_win32_session=n
|
|---|
| 3693 | ;;
|
|---|
| 3694 | esac
|
|---|
| 3695 |
|
|---|
| 3696 | case "$g4ui_use_win32" in
|
|---|
| 3697 | '')
|
|---|
| 3698 | g4ui_use_win32=n
|
|---|
| 3699 | ;;
|
|---|
| 3700 | esac
|
|---|
| 3701 |
|
|---|
| 3702 | # Set by default!
|
|---|
| 3703 | case "$g4ui_use_tcsh" in
|
|---|
| 3704 | '')
|
|---|
| 3705 | g4ui_use_tcsh=y
|
|---|
| 3706 | ;;
|
|---|
| 3707 | esac
|
|---|
| 3708 |
|
|---|
| 3709 |
|
|---|
| 3710 |
|
|---|
| 3711 |
|
|---|
| 3712 | echo ""
|
|---|
| 3713 |
|
|---|
| 3714 | g4message=`cat << EOM
|
|---|
| 3715 |
|
|---|
| 3716 | G4UI_NONE
|
|---|
| 3717 |
|
|---|
| 3718 | If this variable is set, no UI sessions nor any UI libraries are built.
|
|---|
| 3719 | This can be useful when running a pure batch job or in a user framework
|
|---|
| 3720 | having its own UI system.
|
|---|
| 3721 | Do you want to set this variable ?
|
|---|
| 3722 |
|
|---|
| 3723 | EOM`
|
|---|
| 3724 |
|
|---|
| 3725 | dflt=$g4ui_none
|
|---|
| 3726 | rp=$g4message
|
|---|
| 3727 | . ./myread
|
|---|
| 3728 | gans=$ans
|
|---|
| 3729 |
|
|---|
| 3730 | case $gans in
|
|---|
| 3731 |
|
|---|
| 3732 | n*|N*)
|
|---|
| 3733 | g4ui_none=n
|
|---|
| 3734 | ;;
|
|---|
| 3735 | y*|Y*)
|
|---|
| 3736 | g4ui_none=y
|
|---|
| 3737 | ;;
|
|---|
| 3738 | esac
|
|---|
| 3739 |
|
|---|
| 3740 | case $g4ui_none in
|
|---|
| 3741 |
|
|---|
| 3742 | n)
|
|---|
| 3743 |
|
|---|
| 3744 | g4message=`cat << EOM
|
|---|
| 3745 |
|
|---|
| 3746 | G4UI_BUILD_TERMINAL_SESSION
|
|---|
| 3747 | Specifies to include in kernel library a basic dumb terminal
|
|---|
| 3748 | user interface (default).
|
|---|
| 3749 |
|
|---|
| 3750 | G4UI_USE_TERMINAL
|
|---|
| 3751 | Specifies to use dumb terminal interface in the application to be
|
|---|
| 3752 | built (default).
|
|---|
| 3753 | EOM`
|
|---|
| 3754 |
|
|---|
| 3755 | dflt=$g4ui_use_terminal
|
|---|
| 3756 | rp=$g4message
|
|---|
| 3757 | #. ./myread
|
|---|
| 3758 | #gans=$ans
|
|---|
| 3759 | gans=y
|
|---|
| 3760 |
|
|---|
| 3761 | case $gans in
|
|---|
| 3762 |
|
|---|
| 3763 | n*|N*)
|
|---|
| 3764 | g4ui_build_terminal_session=n
|
|---|
| 3765 | g4ui_use_terminal=n
|
|---|
| 3766 | ;;
|
|---|
| 3767 | y*|Y*)
|
|---|
| 3768 | g4ui_build_terminal_session=y
|
|---|
| 3769 | g4ui_use_terminal=y
|
|---|
| 3770 | ;;
|
|---|
| 3771 | esac
|
|---|
| 3772 |
|
|---|
| 3773 | g4message=`cat << EOM
|
|---|
| 3774 |
|
|---|
| 3775 | G4UI_BUILD_GAG_SESSION
|
|---|
| 3776 | Specifies to include in kernel library the GAG based
|
|---|
| 3777 | user interface.
|
|---|
| 3778 |
|
|---|
| 3779 | G4UI_USE_GAG
|
|---|
| 3780 | Specifies to use the GAG interface in the application to be
|
|---|
| 3781 | built.
|
|---|
| 3782 | EOM`
|
|---|
| 3783 |
|
|---|
| 3784 | dflt=$g4ui_use_gag
|
|---|
| 3785 | rp=$g4message
|
|---|
| 3786 | #. ./myread
|
|---|
| 3787 | #gans=$ans
|
|---|
| 3788 | gans=y
|
|---|
| 3789 |
|
|---|
| 3790 | case $gans in
|
|---|
| 3791 |
|
|---|
| 3792 | n*|N*)
|
|---|
| 3793 | g4ui_build_gag_session=n
|
|---|
| 3794 | g4ui_use_gag=n
|
|---|
| 3795 | ;;
|
|---|
| 3796 | y*|Y*)
|
|---|
| 3797 | g4ui_build_gag_session=y
|
|---|
| 3798 | g4ui_use_gag=y
|
|---|
| 3799 | ;;
|
|---|
| 3800 | esac
|
|---|
| 3801 |
|
|---|
| 3802 | if test "X$g4system" != "XWIN32-VC" -a "X$g4system" != "XWIN32-VC7"; then
|
|---|
| 3803 |
|
|---|
| 3804 | g4message=`cat << EOM
|
|---|
| 3805 |
|
|---|
| 3806 | G4UI_BUILD_XAW_SESSION
|
|---|
| 3807 | G4UI_USE_XAW
|
|---|
| 3808 |
|
|---|
| 3809 | Specifies to include and use the XAW interfaces in the
|
|---|
| 3810 | application to be built.
|
|---|
| 3811 | The XAW (X11 Athena Widget set) extensions are required to activate
|
|---|
| 3812 | and build this driver.
|
|---|
| 3813 | EOM`
|
|---|
| 3814 |
|
|---|
| 3815 | dflt=$g4ui_use_xaw
|
|---|
| 3816 | rp=$g4message
|
|---|
| 3817 | . ./myread
|
|---|
| 3818 | gans=$ans
|
|---|
| 3819 |
|
|---|
| 3820 | case $gans in
|
|---|
| 3821 |
|
|---|
| 3822 | n*|N*)
|
|---|
| 3823 | g4ui_build_xaw_session=n
|
|---|
| 3824 | g4ui_use_xaw=n
|
|---|
| 3825 | ;;
|
|---|
| 3826 | y*|Y*)
|
|---|
| 3827 | g4ui_build_xaw_session=y
|
|---|
| 3828 | g4ui_use_xaw=y
|
|---|
| 3829 | ;;
|
|---|
| 3830 | esac
|
|---|
| 3831 |
|
|---|
| 3832 | ############################################################
|
|---|
| 3833 | ############################################################
|
|---|
| 3834 |
|
|---|
| 3835 | if test "X$g4ui_build_xaw_session" = "Xy" ; then
|
|---|
| 3836 |
|
|---|
| 3837 | if test "X$g4ui_xawhome" = "X" ; then
|
|---|
| 3838 | xaw_dirs=`find $g4ui_xawhome /usr/X11R6/include /usr/local/include /usr/include /sw/include -type d -name Xaw 2>/dev/null |xargs echo`
|
|---|
| 3839 | #echo ogl_dirs=$ogl_dirs
|
|---|
| 3840 |
|
|---|
| 3841 | if test "X$xaw_dirs" != "X" ; then
|
|---|
| 3842 |
|
|---|
| 3843 | g4xaw_base_dir_found=`echo $xaw_dirs|cut -d" " -f1`
|
|---|
| 3844 | #echo g4ogl_base_dir_found=$g4ogl_base_dir_found
|
|---|
| 3845 |
|
|---|
| 3846 | # That's right: should be 3 times! (e.g./usr/local/lib/libGLU.so -> /usr/local)
|
|---|
| 3847 | g4xaw_base_dir_found=`dirname $g4xaw_base_dir_found`
|
|---|
| 3848 | g4xaw_base_dir_found=`dirname $g4xaw_base_dir_found`
|
|---|
| 3849 | g4xaw_base_dir_found=`dirname $g4xaw_base_dir_found`
|
|---|
| 3850 |
|
|---|
| 3851 | g4ui_xawhome=$g4xaw_base_dir_found
|
|---|
| 3852 | #else
|
|---|
| 3853 | #case "$g4ui_xawhome" in
|
|---|
| 3854 | #'')
|
|---|
| 3855 | # g4ui_xawhome=/usr/X11R6/
|
|---|
| 3856 | # ;;
|
|---|
| 3857 | #esac
|
|---|
| 3858 | fi
|
|---|
| 3859 | fi
|
|---|
| 3860 |
|
|---|
| 3861 | ##########################################################################
|
|---|
| 3862 |
|
|---|
| 3863 | #if test "X$g4ui_xawhome" != "X" ; then
|
|---|
| 3864 | #xaw_dirs=$g4ui_xawhome
|
|---|
| 3865 | #fi
|
|---|
| 3866 |
|
|---|
| 3867 | if test "X$g4ui_xawhome" != "X" ; then
|
|---|
| 3868 |
|
|---|
| 3869 | g4message=`cat << EOM
|
|---|
| 3870 |
|
|---|
| 3871 | You have selected to use the XAW based user interfaces.
|
|---|
| 3872 | Specify the correct path where XAW is installed in your system.
|
|---|
| 3873 | It was found in $g4ui_xawhome. Press [Enter] to set this path or type the correct one.
|
|---|
| 3874 |
|
|---|
| 3875 | You can set '-' (without quotation) to CANCEL the XAW flag at all:
|
|---|
| 3876 |
|
|---|
| 3877 | EOM`
|
|---|
| 3878 |
|
|---|
| 3879 | dflt=$g4ui_xawhome
|
|---|
| 3880 | fn='d~(-)'
|
|---|
| 3881 | rp=$g4message
|
|---|
| 3882 | . ./getfile
|
|---|
| 3883 |
|
|---|
| 3884 | cend="no"
|
|---|
| 3885 | while test "$cend" = "no" ; do
|
|---|
| 3886 | if test -e "$ans/include/X11/Xaw" || [ "X$ans" = "X-" ]; then
|
|---|
| 3887 | cend="yes"
|
|---|
| 3888 | if test "X$ans" != "X-" ; then
|
|---|
| 3889 |
|
|---|
| 3890 | g4ui_xawhome=$ans
|
|---|
| 3891 |
|
|---|
| 3892 | else
|
|---|
| 3893 |
|
|---|
| 3894 | g4ui_build_xaw_session=n
|
|---|
| 3895 | g4ui_use_xaw=n
|
|---|
| 3896 |
|
|---|
| 3897 | fi
|
|---|
| 3898 | else
|
|---|
| 3899 |
|
|---|
| 3900 | g4message=`cat << EOM
|
|---|
| 3901 |
|
|---|
| 3902 | You have selected to use XAW based user interfaces.
|
|---|
| 3903 | But XAW was not found in $ans.
|
|---|
| 3904 | Please specify the correct path where XAW is installed in your system.
|
|---|
| 3905 |
|
|---|
| 3906 | You can set '-' (without quotation) to CANCEL the XAW flag at all:
|
|---|
| 3907 |
|
|---|
| 3908 | EOM`
|
|---|
| 3909 |
|
|---|
| 3910 | dflt=""
|
|---|
| 3911 | fn='d~(-)'
|
|---|
| 3912 | rp=$g4message
|
|---|
| 3913 | . ./getfile
|
|---|
| 3914 | fi
|
|---|
| 3915 | done
|
|---|
| 3916 |
|
|---|
| 3917 | else
|
|---|
| 3918 |
|
|---|
| 3919 | g4message=`cat << EOM
|
|---|
| 3920 |
|
|---|
| 3921 | You have selected to use XAW based user interfaces.
|
|---|
| 3922 | But XAW was not found in expected place.
|
|---|
| 3923 | Please specify the correct path where XAW is installed in your system.
|
|---|
| 3924 |
|
|---|
| 3925 | You can set '-' (without quotation) to CANCEL the XAW flag at all:
|
|---|
| 3926 |
|
|---|
| 3927 | EOM`
|
|---|
| 3928 |
|
|---|
| 3929 | dflt=""
|
|---|
| 3930 | fn='d~(-)'
|
|---|
| 3931 | rp=$g4message
|
|---|
| 3932 | . ./getfile
|
|---|
| 3933 |
|
|---|
| 3934 | cend="no"
|
|---|
| 3935 | while test "$cend" = "no" ; do
|
|---|
| 3936 | if test -e "$ans/include/X11/Xaw" || [ "X$ans" = "X-" ]; then
|
|---|
| 3937 | cend="yes"
|
|---|
| 3938 | if test "X$ans" != "X-" ; then
|
|---|
| 3939 |
|
|---|
| 3940 | g4ui_xawhome=$ans
|
|---|
| 3941 |
|
|---|
| 3942 | else
|
|---|
| 3943 |
|
|---|
| 3944 | g4ui_build_xaw_session=n
|
|---|
| 3945 | g4ui_use_xaw=n
|
|---|
| 3946 |
|
|---|
| 3947 | fi
|
|---|
| 3948 | else
|
|---|
| 3949 |
|
|---|
| 3950 | g4message=`cat << EOM
|
|---|
| 3951 |
|
|---|
| 3952 | You have selected to use XAW based user interfaces.
|
|---|
| 3953 | But XAW was not found in $ans.
|
|---|
| 3954 | Please specify the correct path where XAW is installed in your system.
|
|---|
| 3955 |
|
|---|
| 3956 | You can set '-' (without quotation) to CANCEL the XAW flag at all:
|
|---|
| 3957 |
|
|---|
| 3958 | EOM`
|
|---|
| 3959 |
|
|---|
| 3960 | dflt=""
|
|---|
| 3961 | fn='d~(-)'
|
|---|
| 3962 | rp=$g4message
|
|---|
| 3963 | . ./getfile
|
|---|
| 3964 | fi
|
|---|
| 3965 | done
|
|---|
| 3966 | fi
|
|---|
| 3967 |
|
|---|
| 3968 | if test "X$g4osname" = "XLinux"; then
|
|---|
| 3969 |
|
|---|
| 3970 | if test "X$g4ui_xawhome" = "X/usr" -o "X$g4ui_xawhome" = "X/usr/local" ; then
|
|---|
| 3971 | g4ui_xawhome=""
|
|---|
| 3972 | fi
|
|---|
| 3973 | fi
|
|---|
| 3974 | fi # g4vis_build_opheglxm_driver
|
|---|
| 3975 |
|
|---|
| 3976 | ###############################################
|
|---|
| 3977 | # Set XMFLAGS and XMLIBS
|
|---|
| 3978 | #
|
|---|
| 3979 |
|
|---|
| 3980 | if test "X$g4ui_build_xaw_session" = "Xy" ; then
|
|---|
| 3981 |
|
|---|
| 3982 | if test "X$g4osname" = "XAIX" ; then
|
|---|
| 3983 | g4ui_xawflags=" -I$g4ui_xawhome/include "
|
|---|
| 3984 | g4ui_xawlibs=" -L$g4ui_xawhome/lib -lXaw -lXmu -lXt -lX11 -lXext "
|
|---|
| 3985 | fi
|
|---|
| 3986 |
|
|---|
| 3987 | if test "X$g4osname" = "XLinux" ; then
|
|---|
| 3988 | g4ui_xawflags=" -I$g4ui_xawhome/include "
|
|---|
| 3989 | if test "X$g4ui_xawhome" = "X/usr/X11R6" ; then
|
|---|
| 3990 | g4ui_xawlibs=" -lXaw "
|
|---|
| 3991 | else
|
|---|
| 3992 | g4ui_xawlibs=" -L$g4ui_xawhome/lib -lXaw "
|
|---|
| 3993 | fi
|
|---|
| 3994 | fi
|
|---|
| 3995 |
|
|---|
| 3996 | if test "X$g4osname" = "XDarwin" ; then
|
|---|
| 3997 | g4ui_xawflags=" -I$g4ui_xawhome/include "
|
|---|
| 3998 | g4ui_xawlibs=" -L$g4ui_xawhome/lib -lXaw "
|
|---|
| 3999 | fi
|
|---|
| 4000 |
|
|---|
| 4001 | if test "X$g4osname" = "XDEC" ; then
|
|---|
| 4002 | g4ui_xawflags=" -I$g4ui_xawhome/include "
|
|---|
| 4003 | g4ui_xawlibs=" -L$g4ui_xawhome/lib -lXaw "
|
|---|
| 4004 | fi
|
|---|
| 4005 |
|
|---|
| 4006 | if test "X$g4osname" = "XHP" ; then
|
|---|
| 4007 | g4ui_xawflags=" -I$g4ui_xawhome/include "
|
|---|
| 4008 | g4ui_xawlibs=" -L$g4ui_xawhome/lib -lXaw "
|
|---|
| 4009 | fi
|
|---|
| 4010 |
|
|---|
| 4011 | if test "X$g4osname" = "XSGI" ; then
|
|---|
| 4012 | g4ui_xawflags=" -I$g4ui_xawhome/include "
|
|---|
| 4013 | g4ui_xawlibs=" -L$g4ui_xawhome/lib -lXaw "
|
|---|
| 4014 | fi
|
|---|
| 4015 |
|
|---|
| 4016 | if test "X$g4osname" = "XSUN" ; then
|
|---|
| 4017 | g4ui_xawflags=" -I$g4ui_xawhome/include "
|
|---|
| 4018 | 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 "
|
|---|
| 4019 | fi
|
|---|
| 4020 |
|
|---|
| 4021 | fi # end of XM build
|
|---|
| 4022 |
|
|---|
| 4023 | ###############################################
|
|---|
| 4024 | ###############################################
|
|---|
| 4025 |
|
|---|
| 4026 | g4message=`cat << EOM
|
|---|
| 4027 |
|
|---|
| 4028 | G4UI_BUILD_XM_SESSION
|
|---|
| 4029 | G4UI_USE_XM
|
|---|
| 4030 |
|
|---|
| 4031 | Specifies to include and use the XM Motif based user interfaces.
|
|---|
| 4032 | The XM Motif extensions are required to activate and build this
|
|---|
| 4033 | driver.
|
|---|
| 4034 |
|
|---|
| 4035 | EOM`
|
|---|
| 4036 |
|
|---|
| 4037 | dflt=$g4ui_use_xm
|
|---|
| 4038 | rp=$g4message
|
|---|
| 4039 | . ./myread
|
|---|
| 4040 | gans=$ans
|
|---|
| 4041 |
|
|---|
| 4042 | case $gans in
|
|---|
| 4043 |
|
|---|
| 4044 | n*|N*)
|
|---|
| 4045 | g4ui_build_xm_session=n
|
|---|
| 4046 | g4ui_use_xm=n
|
|---|
| 4047 | ;;
|
|---|
| 4048 | y*|Y*)
|
|---|
| 4049 | g4ui_build_xm_session=y
|
|---|
| 4050 | g4ui_use_xm=y
|
|---|
| 4051 | ;;
|
|---|
| 4052 | esac
|
|---|
| 4053 |
|
|---|
| 4054 |
|
|---|
| 4055 | ############################################################
|
|---|
| 4056 | ############################################################
|
|---|
| 4057 |
|
|---|
| 4058 | if test "X$g4ui_build_xm_session" = "Xy" ; then
|
|---|
| 4059 |
|
|---|
| 4060 | if test "X$g4vis_xmhome" = "X" ; then
|
|---|
| 4061 | xm_dirs=`find $g4vis_xmhome /usr/X11R6/include /usr/local/include /usr/include /sw/include -type d -name Xm 2>/dev/null |xargs echo`
|
|---|
| 4062 | #echo ogl_dirs=$ogl_dirs
|
|---|
| 4063 |
|
|---|
| 4064 | if test "X$xm_dirs" != "X" ; then
|
|---|
| 4065 |
|
|---|
| 4066 | g4xm_base_dir_found=`echo $xm_dirs|cut -d" " -f1`
|
|---|
| 4067 | #echo g4ogl_base_dir_found=$g4ogl_base_dir_found
|
|---|
| 4068 |
|
|---|
| 4069 | # That's right: should be twice! (e.g./usr/local/lib/libGLU.so -> /usr/local)
|
|---|
| 4070 | g4xm_base_dir_found=`dirname $g4xm_base_dir_found`
|
|---|
| 4071 | g4xm_base_dir_found=`dirname $g4xm_base_dir_found`
|
|---|
| 4072 |
|
|---|
| 4073 | g4vis_xmhome=$g4xm_base_dir_found
|
|---|
| 4074 | #else
|
|---|
| 4075 | #case "$g4vis_xmhome" in
|
|---|
| 4076 | #'')
|
|---|
| 4077 | # g4vis_xmhome=/usr/X11R6/
|
|---|
| 4078 | # ;;
|
|---|
| 4079 | #esac
|
|---|
| 4080 | fi
|
|---|
| 4081 | fi
|
|---|
| 4082 |
|
|---|
| 4083 | ##########################################################################
|
|---|
| 4084 |
|
|---|
| 4085 | #if test "X$g4vis_xmhome" != "X" ; then
|
|---|
| 4086 | #xm_dirs=$g4vis_xmhome
|
|---|
| 4087 | #fi
|
|---|
| 4088 |
|
|---|
| 4089 | if test "X$g4vis_xmhome" != "X" ; then
|
|---|
| 4090 |
|
|---|
| 4091 | g4message=`cat << EOM
|
|---|
| 4092 |
|
|---|
| 4093 | You have selected to use the XM Motif based user interfaces.
|
|---|
| 4094 | Specify the correct path where Xm is installed in your system.
|
|---|
| 4095 | It was found in $g4vis_xmhome. Press [Enter] to set this path or type the correct one.
|
|---|
| 4096 |
|
|---|
| 4097 | You can set '-' (without quotation) to CANCEL the XM flag at all:
|
|---|
| 4098 |
|
|---|
| 4099 | EOM`
|
|---|
| 4100 |
|
|---|
| 4101 | dflt=$g4vis_xmhome
|
|---|
| 4102 | fn='d~(-)'
|
|---|
| 4103 | rp=$g4message
|
|---|
| 4104 | . ./getfile
|
|---|
| 4105 |
|
|---|
| 4106 | cend="no"
|
|---|
| 4107 | while test "$cend" = "no" ; do
|
|---|
| 4108 | if test -e "$ans/include/Xm" || [ "X$ans" = "X-" ]; then
|
|---|
| 4109 | cend="yes"
|
|---|
| 4110 | if test "X$ans" != "X-" ; then
|
|---|
| 4111 |
|
|---|
| 4112 | g4vis_xmhome=$ans
|
|---|
| 4113 |
|
|---|
| 4114 | else
|
|---|
| 4115 |
|
|---|
| 4116 | g4ui_build_xm_session=n
|
|---|
| 4117 | g4ui_use_xm=n
|
|---|
| 4118 |
|
|---|
| 4119 | fi
|
|---|
| 4120 | else
|
|---|
| 4121 |
|
|---|
| 4122 | g4message=`cat << EOM
|
|---|
| 4123 |
|
|---|
| 4124 | You have selected to use XM Motif based user interfaces.
|
|---|
| 4125 | But XM Motif was not found in $ans.
|
|---|
| 4126 | Please specify the correct path where Xm is installed in your system.
|
|---|
| 4127 |
|
|---|
| 4128 | You can set '-' (without quotation) to CANCEL the XM flag at all:
|
|---|
| 4129 |
|
|---|
| 4130 | EOM`
|
|---|
| 4131 |
|
|---|
| 4132 | dflt=""
|
|---|
| 4133 | fn='d~(-)'
|
|---|
| 4134 | rp=$g4message
|
|---|
| 4135 | . ./getfile
|
|---|
| 4136 | fi
|
|---|
| 4137 | done
|
|---|
| 4138 |
|
|---|
| 4139 | else
|
|---|
| 4140 |
|
|---|
| 4141 | g4message=`cat << EOM
|
|---|
| 4142 |
|
|---|
| 4143 | You have selected to use XM Motif based user interfaces.
|
|---|
| 4144 | But XM Motif was not found in expected place.
|
|---|
| 4145 | Please specify the correct path where Xm is installed in your system.
|
|---|
| 4146 |
|
|---|
| 4147 | You can set '-' (without quotation) to CANCEL the XM flag at all:
|
|---|
| 4148 |
|
|---|
| 4149 | EOM`
|
|---|
| 4150 |
|
|---|
| 4151 | dflt=""
|
|---|
| 4152 | fn='d~(-)'
|
|---|
| 4153 | rp=$g4message
|
|---|
| 4154 | . ./getfile
|
|---|
| 4155 |
|
|---|
| 4156 | cend="no"
|
|---|
| 4157 | while test "$cend" = "no" ; do
|
|---|
| 4158 | if test -e "$ans/include/Xm" || [ "X$ans" = "X-" ]; then
|
|---|
| 4159 | cend="yes"
|
|---|
| 4160 | if test "X$ans" != "X-" ; then
|
|---|
| 4161 |
|
|---|
| 4162 | g4vis_xmhome=$ans
|
|---|
| 4163 |
|
|---|
| 4164 | else
|
|---|
| 4165 |
|
|---|
| 4166 | g4ui_build_xm_session=n
|
|---|
| 4167 | g4ui_use_xm=n
|
|---|
| 4168 |
|
|---|
| 4169 | fi
|
|---|
| 4170 | else
|
|---|
| 4171 |
|
|---|
| 4172 | g4message=`cat << EOM
|
|---|
| 4173 |
|
|---|
| 4174 | You have selected to use XM Motif based user interfaces.
|
|---|
| 4175 | But XM Motif was not found in $ans.
|
|---|
| 4176 | Please specify the correct path where Xm is installed in your system.
|
|---|
| 4177 |
|
|---|
| 4178 | You can set '-' (without quotation) to CANCEL the XM flag at all:
|
|---|
| 4179 |
|
|---|
| 4180 | EOM`
|
|---|
| 4181 |
|
|---|
| 4182 | dflt=""
|
|---|
| 4183 | fn='d~(-)'
|
|---|
| 4184 | rp=$g4message
|
|---|
| 4185 | . ./getfile
|
|---|
| 4186 | fi
|
|---|
| 4187 | done
|
|---|
| 4188 | fi
|
|---|
| 4189 |
|
|---|
| 4190 | if test "X$g4osname" = "XLinux"; then
|
|---|
| 4191 |
|
|---|
| 4192 | if test "X$g4vis_xmhome" = "X/usr" -o "X$g4vis_xmhome" = "X/usr/local" ; then
|
|---|
| 4193 | g4vis_xmhome=""
|
|---|
| 4194 | fi
|
|---|
| 4195 | fi
|
|---|
| 4196 | fi # g4vis_build_opheglxm_driver
|
|---|
| 4197 |
|
|---|
| 4198 | ###############################################
|
|---|
| 4199 | # Set XMFLAGS and XMLIBS
|
|---|
| 4200 | #
|
|---|
| 4201 |
|
|---|
| 4202 | if test "X$g4ui_build_xm_session" = "Xy" ; then
|
|---|
| 4203 |
|
|---|
| 4204 | if test "X$g4osname" = "XAIX" ; then
|
|---|
| 4205 | g4vis_xmflags=" -I$g4vis_xmhome/include "
|
|---|
| 4206 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm -lXt -lX11 "
|
|---|
| 4207 | fi
|
|---|
| 4208 |
|
|---|
| 4209 | if test "X$g4osname" = "XLinux" ; then
|
|---|
| 4210 | g4vis_xmflags=" -I$g4vis_xmhome/include "
|
|---|
| 4211 | if test "X$g4vis_xmhome" = "X/usr/X11R6" ; then
|
|---|
| 4212 | g4vis_xmlibs=" -lXm -lXpm "
|
|---|
| 4213 | else
|
|---|
| 4214 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm -lXpm "
|
|---|
| 4215 | fi
|
|---|
| 4216 | fi
|
|---|
| 4217 |
|
|---|
| 4218 | if test "X$g4osname" = "XDarwin" ; then
|
|---|
| 4219 | g4vis_xmflags=" -I$g4vis_xmhome/include "
|
|---|
| 4220 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm -lXpm "
|
|---|
| 4221 | fi
|
|---|
| 4222 |
|
|---|
| 4223 | if test "X$g4osname" = "XDEC" ; then
|
|---|
| 4224 | g4vis_xmflags=" -I$g4vis_xmhome/include "
|
|---|
| 4225 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm "
|
|---|
| 4226 | fi
|
|---|
| 4227 |
|
|---|
| 4228 | if test "X$g4osname" = "XHP" ; then
|
|---|
| 4229 | g4vis_xmflags=" -I$g4vis_xmhome/include/Motif1.2 "
|
|---|
| 4230 | g4vis_xmlibs=" -L$g4vis_xmhome/lib/Motif1.2 -lXm "
|
|---|
| 4231 | fi
|
|---|
| 4232 |
|
|---|
| 4233 | if test "X$g4osname" = "XSGI" ; then
|
|---|
| 4234 | g4vis_xmflags=" -I$g4vis_xmhome/include "
|
|---|
| 4235 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm "
|
|---|
| 4236 | fi
|
|---|
| 4237 |
|
|---|
| 4238 | if test "X$g4osname" = "XSUN" ; then
|
|---|
| 4239 | g4vis_xmflags=" -I$g4vis_xmhome/include "
|
|---|
| 4240 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -L/usr/openwin/lib -L/usr/dt/lib -L/usr/ucblib -R/usr/openwin/lib -lXt -lXm -lX11 "
|
|---|
| 4241 | fi
|
|---|
| 4242 |
|
|---|
| 4243 | fi # end of XM build
|
|---|
| 4244 |
|
|---|
| 4245 | ###############################################
|
|---|
| 4246 | ###############################################
|
|---|
| 4247 |
|
|---|
| 4248 | fi # if !WIN
|
|---|
| 4249 |
|
|---|
| 4250 | if test "X$g4system" = "XWIN32-VC" -o "X$g4system" = "XWIN32-VC7"; then
|
|---|
| 4251 |
|
|---|
| 4252 | g4message=`cat << EOM
|
|---|
| 4253 |
|
|---|
| 4254 | G4UI_BUILD_WIN32_SESSION
|
|---|
| 4255 | G4UI_USE_WIN32
|
|---|
| 4256 |
|
|---|
| 4257 | Specifies to include and use the terminal interface for
|
|---|
| 4258 | Windows systems.
|
|---|
| 4259 |
|
|---|
| 4260 | EOM`
|
|---|
| 4261 |
|
|---|
| 4262 | dflt=$g4ui_use_win32
|
|---|
| 4263 | rp=$g4message
|
|---|
| 4264 | . ./myread
|
|---|
| 4265 | gans=$ans
|
|---|
| 4266 |
|
|---|
| 4267 | case $gans in
|
|---|
| 4268 |
|
|---|
| 4269 | n*|N*)
|
|---|
| 4270 | g4ui_build_win32_session=n
|
|---|
| 4271 | g4ui_use_win32=n
|
|---|
| 4272 | ;;
|
|---|
| 4273 | y*|Y*)
|
|---|
| 4274 | g4ui_build_win32_session=y
|
|---|
| 4275 | g4ui_use_win32=y
|
|---|
| 4276 | ;;
|
|---|
| 4277 | esac
|
|---|
| 4278 |
|
|---|
| 4279 | fi # if WIN
|
|---|
| 4280 |
|
|---|
| 4281 | g4message=`cat << EOM
|
|---|
| 4282 |
|
|---|
| 4283 | G4UI_USE_TCSH
|
|---|
| 4284 | Specifies to use the tcsh-style terminal in the application
|
|---|
| 4285 | to be built.
|
|---|
| 4286 | EOM`
|
|---|
| 4287 |
|
|---|
| 4288 | dflt=$g4ui_use_tcsh
|
|---|
| 4289 | rp=$g4message
|
|---|
| 4290 | #. ./myread
|
|---|
| 4291 | #gans=$ans
|
|---|
| 4292 | gans=y
|
|---|
| 4293 |
|
|---|
| 4294 | case $gans in
|
|---|
| 4295 |
|
|---|
| 4296 | n*|N*)
|
|---|
| 4297 | g4ui_use_tcsh=n
|
|---|
| 4298 | ;;
|
|---|
| 4299 | y*|Y*)
|
|---|
| 4300 | g4ui_use_tcsh=y
|
|---|
| 4301 | ;;
|
|---|
| 4302 | esac
|
|---|
| 4303 |
|
|---|
| 4304 | ;;
|
|---|
| 4305 | esac
|
|---|
| 4306 |
|
|---|
| 4307 | #
|
|---|
| 4308 | # BEGIN QT/QTUI PROBE
|
|---|
| 4309 | #
|
|---|
| 4310 |
|
|---|
| 4311 | #
|
|---|
| 4312 | # We only perform the query/probe for Linux-g++ and Darwin-g++ systems..
|
|---|
| 4313 | #
|
|---|
| 4314 | #if test "x$g4system" = "xLinux-g++" -o "x$g4system" = "xDarwin-g++" ; then
|
|---|
| 4315 |
|
|---|
| 4316 | # Now, IF g4ui_none HAS NOT BEEN SET TO Y, proceed to the query/probe section
|
|---|
| 4317 | if test "x$g4ui_none" = "xn" ; then
|
|---|
| 4318 |
|
|---|
| 4319 | # Query the user to see if they want to build the Qt UI module
|
|---|
| 4320 |
|
|---|
| 4321 | g4message=`cat << EOM
|
|---|
| 4322 |
|
|---|
| 4323 | G4UI_BUILD_QT_SESSION
|
|---|
| 4324 | G4UI_USE_QT
|
|---|
| 4325 |
|
|---|
| 4326 | Setting these variables will enable the building of the G4 Qt based
|
|---|
| 4327 | user interface module and the use of this module in your applications
|
|---|
| 4328 | respectively.
|
|---|
| 4329 | The Qt headers, libraries and binaries are required to enable the
|
|---|
| 4330 | building of this module.
|
|---|
| 4331 | Do you want to enable build and use of this module?
|
|---|
| 4332 | EOM`
|
|---|
| 4333 |
|
|---|
| 4334 | #
|
|---|
| 4335 | # read in the user response
|
|---|
| 4336 | #
|
|---|
| 4337 | dflt=$g4ui_build_qt_session
|
|---|
| 4338 | rp=$g4message
|
|---|
| 4339 | . ./myread
|
|---|
| 4340 | gans=$ans
|
|---|
| 4341 |
|
|---|
| 4342 | #
|
|---|
| 4343 | # Check response
|
|---|
| 4344 | #
|
|---|
| 4345 | case $gans in
|
|---|
| 4346 | n*|N*)
|
|---|
| 4347 | g4ui_build_qt_session=n
|
|---|
| 4348 | g4ui_use_qt=n
|
|---|
| 4349 | ;;
|
|---|
| 4350 | y*|Y*)
|
|---|
| 4351 | g4ui_build_qt_session=y
|
|---|
| 4352 | g4ui_use_qt=y
|
|---|
| 4353 | ;;
|
|---|
| 4354 | esac
|
|---|
| 4355 |
|
|---|
| 4356 |
|
|---|
| 4357 | #########################################
|
|---|
| 4358 |
|
|---|
| 4359 |
|
|---|
| 4360 | #####################################################################
|
|---|
| 4361 | # Now, if we want to build/use the Qt UI module, we need to probe for
|
|---|
| 4362 | # a Qt4 installation
|
|---|
| 4363 | #
|
|---|
| 4364 | if test "x$g4ui_build_qt_session" = "xy" ; then
|
|---|
| 4365 |
|
|---|
| 4366 | echo " "
|
|---|
| 4367 | g4_havegoodqt=no
|
|---|
| 4368 |
|
|---|
| 4369 | # Look for qt4 moc
|
|---|
| 4370 | g4_qtmochome=`./loc moc no $QTDIR/bin /usr/lib/qt4/bin /usr/lib/qt/bin /usr/local/qt/bin /usr/local/bin /usr/bin /bin /usr/share/qt4/bin /usr/X11R6/bin /sw/bin`
|
|---|
| 4371 | if test "x$g4_qtmochome" = "xno" ; then
|
|---|
| 4372 | # Look for qt3 moc
|
|---|
| 4373 | g4_qtmochome=`./loc moc no /usr/lib/qt3/bin /usr/share/qt3/bin`
|
|---|
| 4374 | fi
|
|---|
| 4375 |
|
|---|
| 4376 | # if not found
|
|---|
| 4377 | if test "x$g4_qtmochome" != "xno" ; then
|
|---|
| 4378 | echo "checking Qt moc tool in... $g4_qtmochome"
|
|---|
| 4379 | # check Qt version
|
|---|
| 4380 | g4_qtver=`$g4_qtmochome 2>&1 -v | $sed 's/.* .Qt \([0-9]\)\..*/\1/' `
|
|---|
| 4381 | echo "checking Qt version... $g4_qtver"
|
|---|
| 4382 | if test "x$g4_qtver" = "x3" || test "x$g4_qtver" = "x4" ;then
|
|---|
| 4383 |
|
|---|
| 4384 | # checking includes first get QTDIR location, then qt$g4_qtver, sw, standard, shared, X11
|
|---|
| 4385 |
|
|---|
| 4386 | incQtFiles=" $QTDIR/include /usr/include/qt$g4_qtver /usr/include/qt$g4_qtver/Qt /usr/lib/qt$g4_qtver/include /sw/include/qt /usr/lib/qt/include /usr/local/qt/include /usr/local/include /usr/include /usr/include/qt /usr/share/qt$g4_qtver/include /usr/X11R6/include /usr/X11R6/include/qt$g4_qtver /usr/X11R6/include/qt"
|
|---|
| 4387 |
|
|---|
| 4388 | if test "X$g4osname" = "XDarwin" && test "X$g4_qtver" = "X4"; then
|
|---|
| 4389 | incQtFiles="$incQtFiles /Library/Frameworks/QtCore.framework/Headers/"
|
|---|
| 4390 | g4_qtincdir=`./loc qglobal.h no $incQtFiles`
|
|---|
| 4391 | if test "x$g4_qtincdir" != "xno" ; then
|
|---|
| 4392 | g4_qtincdir="/Library/Frameworks"
|
|---|
| 4393 | fi
|
|---|
| 4394 | else
|
|---|
| 4395 | g4_qtincdir=`./loc qglobal.h no $incQtFiles`
|
|---|
| 4396 | fi
|
|---|
| 4397 |
|
|---|
| 4398 |
|
|---|
| 4399 | if test "x$g4_qtincdir" != "xno" ; then
|
|---|
| 4400 | if test "x$g4_qtincdir" != "x/Library/Frameworks" ; then
|
|---|
| 4401 | g4_qtincdir=`dirname $g4_qtincdir`
|
|---|
| 4402 | fi
|
|---|
| 4403 | echo "checking Qt includes dir in... $g4_qtincdir"
|
|---|
| 4404 |
|
|---|
| 4405 |
|
|---|
| 4406 | # checking libs, includes first get QTDIR location, then qt$g4_qtver, sw, standard, shared, X11
|
|---|
| 4407 |
|
|---|
| 4408 | libQtFiles="$QTDIR/lib $QTDIR/lib64 /usr/lib/qt$g4_qtver/lib /usr/lib/qt$g4_qtver/lib64 /usr/lib/qt$g4_qtver /usr/lib/qt$g4_qtver /sw/lib /sw/lib/qt /sw/lib/qt$g4_qtver /sw/lib/qt$g4_qtver/lib /usr/lib/qt/lib /usr/local/qt/lib /usr/local/lib /usr/lib /usr/lib/qt /usr/share/qt$g4_qtver/lib /usr/X11R6/lib/qt /usr/X11R6/lib/qt$g4_qtver /usr/X11R6/lib /usr/X11R6/lib/qt"
|
|---|
| 4409 |
|
|---|
| 4410 | if test "X$g4osname" = "XDarwin" && test "X$g4_qtincdir" = "X/Library/Frameworks" ; then
|
|---|
| 4411 | g4_qtlibdir=`./loc QtCore no /Library/Frameworks/QtCore.framework/Versions/$g4_qtver/ $libQtFiles`
|
|---|
| 4412 | g4_qtlibdir=`dirname $g4_qtlibdir`
|
|---|
| 4413 | g4_qtlibdir=`dirname $g4_qtlibdir`
|
|---|
| 4414 | g4_qtlibdir=`dirname $g4_qtlibdir`
|
|---|
| 4415 | else
|
|---|
| 4416 | g4_qtlibdir=`./loc libqt* no $libQtFiles`
|
|---|
| 4417 | fi
|
|---|
| 4418 | if test "x$g4_qtlibdir" != "xno" ; then
|
|---|
| 4419 | g4_qtlibdir=`dirname $g4_qtlibdir`
|
|---|
| 4420 | echo "checking Qt lib dir in... $g4_qtlibdir"
|
|---|
| 4421 | g4_havegoodqt=yes
|
|---|
| 4422 | else
|
|---|
| 4423 | echo "Failed to find Qt lib dir in : $libQtFiles"
|
|---|
| 4424 | fi
|
|---|
| 4425 | else
|
|---|
| 4426 | echo "Failed to find Qt includes dir in : $incQtFiles"
|
|---|
| 4427 | fi #END CHECK QTLIBS
|
|---|
| 4428 | else
|
|---|
| 4429 | echo "Qt $g4_qtver is not actually support with this driver"
|
|---|
| 4430 | fi #END CHECK QTINC
|
|---|
| 4431 | fi #END CHECK QTVER
|
|---|
| 4432 | #
|
|---|
| 4433 | # END QT AUTOPROBE
|
|---|
| 4434 | ####################################################################
|
|---|
| 4435 |
|
|---|
| 4436 |
|
|---|
| 4437 | ####################################################################
|
|---|
| 4438 | # Based on result of Qt autoprobe, we decide if user input is needed to
|
|---|
| 4439 | # locate Qt...
|
|---|
| 4440 | #
|
|---|
| 4441 | if test "x$g4_havegoodqt" = "xno" ; then
|
|---|
| 4442 | promptend="no"
|
|---|
| 4443 | qthomeloc="the standard locations"
|
|---|
| 4444 |
|
|---|
| 4445 | while test "x$promptend" = "xno" ; do
|
|---|
| 4446 | g4message=`cat << EOM
|
|---|
| 4447 |
|
|---|
| 4448 | Autodetection failed to locate Qt on your system.
|
|---|
| 4449 | Please enter the path to your Qt install (i.e. if Qt is installed
|
|---|
| 4450 | in PATH/include/Qt, or PATH/include $PATH/include/qt, enter PATH), or type '-' to
|
|---|
| 4451 | CANCEL the build of the Qt UI module.
|
|---|
| 4452 | Qt path:
|
|---|
| 4453 | EOM`
|
|---|
| 4454 | dflt="/usr"
|
|---|
| 4455 | g4_qtmochome="/usr"
|
|---|
| 4456 | fn='d~(-)'
|
|---|
| 4457 | rp=$g4message
|
|---|
| 4458 | . ./getfile
|
|---|
| 4459 |
|
|---|
| 4460 | #Check for user cancellation
|
|---|
| 4461 | if test "x$ans" = "x-" ; then
|
|---|
| 4462 | g4ui_build_qt_session=n
|
|---|
| 4463 | g4ui_use_qt=n
|
|---|
| 4464 | echo "build/use of Qt UI module cancelled..."
|
|---|
| 4465 | promptend=yes
|
|---|
| 4466 |
|
|---|
| 4467 | else
|
|---|
| 4468 | #We want to probe for Qt in the user supplied directory
|
|---|
| 4469 | echo " "
|
|---|
| 4470 | qthomeloc=$ans
|
|---|
| 4471 | g4_havegoodqt=no
|
|---|
| 4472 |
|
|---|
| 4473 |
|
|---|
| 4474 | # check for moc
|
|---|
| 4475 |
|
|---|
| 4476 | g4_qtmochome=`./loc moc no $ans/bin`
|
|---|
| 4477 | if test "x$g4_qtmochome" = "xno" ; then
|
|---|
| 4478 | while test "x$promptend" = "xno" ; do
|
|---|
| 4479 | g4message=`cat << EOM
|
|---|
| 4480 |
|
|---|
| 4481 | Failed to locate Qt moc tool on your system.
|
|---|
| 4482 | Please enter the path to your Qt moc tool install or type '-' to
|
|---|
| 4483 | CANCEL the build of the Qt UI module.
|
|---|
| 4484 | Qt moc path:
|
|---|
| 4485 | EOM`
|
|---|
| 4486 | fn='d~(-)'
|
|---|
| 4487 | rp=$g4message
|
|---|
| 4488 | . ./getfile
|
|---|
| 4489 |
|
|---|
| 4490 | #Check for user cancellation
|
|---|
| 4491 | if test "x$ans" = "x-" ; then
|
|---|
| 4492 | g4ui_build_qt_session=n
|
|---|
| 4493 | g4ui_use_qt=n
|
|---|
| 4494 | echo "build/use of Qt UI module cancelled..."
|
|---|
| 4495 | promptend=yes
|
|---|
| 4496 |
|
|---|
| 4497 | else
|
|---|
| 4498 | #We want to probe for Qt in the user supplied directory
|
|---|
| 4499 | echo " "
|
|---|
| 4500 | # check for moc
|
|---|
| 4501 | g4_qtmochome=`./loc moc no $ans/bin`
|
|---|
| 4502 | if test "x$g4_qtmochome" != "xno" ; then
|
|---|
| 4503 | promptend=yes
|
|---|
| 4504 | fi
|
|---|
| 4505 | fi
|
|---|
| 4506 | done
|
|---|
| 4507 | fi # ASK FOR QT MOC
|
|---|
| 4508 | if test "x$g4_qtmochome" != "xno" ; then
|
|---|
| 4509 | echo "checking Qt moc tool in... $g4_qtmochome"
|
|---|
| 4510 | fi
|
|---|
| 4511 |
|
|---|
| 4512 | # if moc ok, then check for version
|
|---|
| 4513 | if test "x$g4_qtmochome" != "xno" ; then
|
|---|
| 4514 | g4_qtver=`$g4_qtmochome 2>&1 -v | $sed 's/.* .Qt \([0-9]\)\..*/\1/' `
|
|---|
| 4515 | echo "checking Qt version... $g4_qtver"
|
|---|
| 4516 |
|
|---|
| 4517 | if test "x$g4_qtver" = "x3" || test "x$g4_qtver" = "x4";then
|
|---|
| 4518 |
|
|---|
| 4519 | # if version ok check for includes
|
|---|
| 4520 | # checking includes in qt$g4_qtver, then standard
|
|---|
| 4521 | incQtFiles="$qthomeloc/lib/qt$g4_qtver/include $qthomeloc/include/qt$g4_qtver/Qt $qthomeloc/include/qt$g4_qtver $qthomeloc/include $qthomeloc/include/Qt "
|
|---|
| 4522 |
|
|---|
| 4523 | if test "X$g4osname" = "XDarwin" && test "X$g4_qtver" = "X4"; then
|
|---|
| 4524 | incQtFiles="$incQtFiles /Library/Frameworks/QtCore.framework/Headers/ $qthomeloc/QtCore.framework/Headers/"
|
|---|
| 4525 | g4_qtincdir=`./loc qglobal.h no $incQtFiles`
|
|---|
| 4526 | if test "x$g4_qtincdir" != "xno" ; then
|
|---|
| 4527 | g4_qtincdir=`dirname $g4_qtincdir`
|
|---|
| 4528 | g4_qtincdir=`dirname $g4_qtincdir`
|
|---|
| 4529 | fi
|
|---|
| 4530 | else
|
|---|
| 4531 | g4_qtincdir=`./loc qglobal.h no $incQtFiles`
|
|---|
| 4532 | fi
|
|---|
| 4533 | if test "x$g4_qtincdir" = "xno" ; then
|
|---|
| 4534 | while test "x$promptend" = "xno" ; do
|
|---|
| 4535 | g4message=`cat << EOM
|
|---|
| 4536 |
|
|---|
| 4537 | Failed to locate Qt include directory on your system.
|
|---|
| 4538 | Please enter the path to your Qt include directory install or type '-' to
|
|---|
| 4539 | CANCEL the build of the Qt UI module.
|
|---|
| 4540 | Qt include path:
|
|---|
| 4541 | EOM`
|
|---|
| 4542 | fn='d~(-)'
|
|---|
| 4543 | rp=$g4message
|
|---|
| 4544 | . ./getfile
|
|---|
| 4545 |
|
|---|
| 4546 | #Check for user cancellation
|
|---|
| 4547 | if test "x$ans" = "x-" ; then
|
|---|
| 4548 | g4ui_build_qt_session=n
|
|---|
| 4549 | g4ui_use_qt=n
|
|---|
| 4550 | echo "build/use of Qt UI module cancelled..."
|
|---|
| 4551 | promptend=yes
|
|---|
| 4552 |
|
|---|
| 4553 | else
|
|---|
| 4554 | #We want to probe for Qt in the user supplied directory
|
|---|
| 4555 | echo " "
|
|---|
| 4556 | # check for include
|
|---|
| 4557 | g4_qtincdir=`./loc qglobal.h no $ans`
|
|---|
| 4558 | if test "x$g4_qtincdir" != "xno" ; then
|
|---|
| 4559 | promptend=yes
|
|---|
| 4560 | fi
|
|---|
| 4561 | fi
|
|---|
| 4562 | done
|
|---|
| 4563 | fi # ASK FOR QT INC
|
|---|
| 4564 | if test "x$g4_qtincdir" != "xno" ; then
|
|---|
| 4565 | g4_qtincdir=`dirname $g4_qtincdir`
|
|---|
| 4566 | echo "checking Qt inc dir in... $g4_qtincdir"
|
|---|
| 4567 | fi
|
|---|
| 4568 | # if qt inc ok, then check for libs
|
|---|
| 4569 | if test "x$g4_qtincdir" != "xno" ; then
|
|---|
| 4570 |
|
|---|
| 4571 | # checking libraries in qt$g4_qtver, then standard
|
|---|
| 4572 | libQtFiles="$qthomeloc/lib/qt$g4_qtver/lib $qthomeloc/lib/qt$g4_qtver $qthomeloc/lib/qt$g4_qtver $qthomeloc/lib/qt$g4_qtver/lib64 $qthomeloc/lib $qthomeloc/lib64 $qthomeloc/lib/qt/lib $qthomeloc/lib/qt $qthomeloc/lib64"
|
|---|
| 4573 |
|
|---|
| 4574 | if test "X$g4osname" = "XDarwin" && test "X$g4_qtincdir" = "X/Library/Frameworks" ; then
|
|---|
| 4575 | g4_qtlibdir=`./loc QtCore no /Library/Frameworks/QtCore.framework/Versions/$g4_qtver/ $libQtFiles`
|
|---|
| 4576 | g4_qtlibdir=`dirname $g4_qtlibdir`
|
|---|
| 4577 | g4_qtlibdir=`dirname $g4_qtlibdir`
|
|---|
| 4578 | g4_qtlibdir=`dirname $g4_qtlibdir`
|
|---|
| 4579 | else
|
|---|
| 4580 | g4_qtlibdir=`./loc libqt* no $libQtFiles`
|
|---|
| 4581 | fi
|
|---|
| 4582 | if test "x$g4_qtlibdir" = "xno" ; then
|
|---|
| 4583 | while test "x$promptend" = "xno" ; do
|
|---|
| 4584 | g4message=`cat << EOM
|
|---|
| 4585 |
|
|---|
| 4586 | Failed to locate Qt lib directory on your system.
|
|---|
| 4587 | Please enter the path to your Qt lib directory install or type '-' to
|
|---|
| 4588 | CANCEL the build of the Qt UI module.
|
|---|
| 4589 | Qt library path:
|
|---|
| 4590 | EOM`
|
|---|
| 4591 | fn='d~(-)'
|
|---|
| 4592 | rp=$g4message
|
|---|
| 4593 | . ./getfile
|
|---|
| 4594 |
|
|---|
| 4595 | #Check for user cancellation
|
|---|
| 4596 | if test "x$ans" = "x-" ; then
|
|---|
| 4597 | g4ui_build_qt_session=n
|
|---|
| 4598 | g4ui_use_qt=n
|
|---|
| 4599 | echo "build/use of Qt UI module cancelled..."
|
|---|
| 4600 | promptend=yes
|
|---|
| 4601 |
|
|---|
| 4602 | else
|
|---|
| 4603 | #We want to probe for Qt in the user supplied directory
|
|---|
| 4604 | echo " "
|
|---|
| 4605 | # check for libraries
|
|---|
| 4606 | if test "X$g4osname" = "XDarwin" && test "X$g4_qtincdir" = "X/Library/Frameworks" ; then
|
|---|
| 4607 | g4_qtlibdir=`./loc QtCore* no $libQtFiles /Library/Frameworks/`
|
|---|
| 4608 | else
|
|---|
| 4609 | g4_qtlibdir=`./loc libqt* no $libQtFiles`
|
|---|
| 4610 | fi
|
|---|
| 4611 | if test "x$g4_qtlibdir" != "xno" ; then
|
|---|
| 4612 | promptend=yes
|
|---|
| 4613 | fi
|
|---|
| 4614 | fi
|
|---|
| 4615 | done
|
|---|
| 4616 | fi # END OF LIB CHECK
|
|---|
| 4617 | if test "x$g4_qtlibdir" != "xno" ; then
|
|---|
| 4618 | g4_qtlibdir=`dirname $g4_qtlibdir`
|
|---|
| 4619 | echo "checking Qt lib dir in... $g4_qtlibdir"
|
|---|
| 4620 | promptend=yes
|
|---|
| 4621 | g4_havegoodqt=yes
|
|---|
| 4622 | fi
|
|---|
| 4623 |
|
|---|
| 4624 | else # END OF INC CHECK
|
|---|
| 4625 | g4_qtincdir=no
|
|---|
| 4626 | fi
|
|---|
| 4627 | else # END OF VERSION CHECK
|
|---|
| 4628 | g4_qtmochome=no
|
|---|
| 4629 | fi
|
|---|
| 4630 | fi # END OF MOC CHECK
|
|---|
| 4631 |
|
|---|
| 4632 | fi #END CHECK USER CANCELLATION
|
|---|
| 4633 | done #END USER PROMPT FOR QT DETECTION
|
|---|
| 4634 |
|
|---|
| 4635 | fi #END USER DIRECTED QT DETECTION
|
|---|
| 4636 | #
|
|---|
| 4637 | #END QT USER INPUT PROBE
|
|---|
| 4638 | ####################################################################
|
|---|
| 4639 |
|
|---|
| 4640 | fi #END CHECK OF G4UI_BUILD_QT_SESSION=Y
|
|---|
| 4641 | ###########################################
|
|---|
| 4642 |
|
|---|
| 4643 | fi #END TEST G4UI_NONE=N
|
|---|
| 4644 | #fi #END TEST G4SYSTEM = Linux-g++ OR Darwin-g++
|
|---|
| 4645 | ########################
|
|---|
| 4646 | echo " "
|
|---|
| 4647 | case "$g4vis_none" in
|
|---|
| 4648 | '')
|
|---|
| 4649 | g4vis_none=n
|
|---|
| 4650 | ;;
|
|---|
| 4651 | esac
|
|---|
| 4652 |
|
|---|
| 4653 |
|
|---|
| 4654 | case "$g4vis_build_openglwin32_driver" in
|
|---|
| 4655 | '')
|
|---|
| 4656 | g4vis_build_openglwin32_driver=n
|
|---|
| 4657 | ;;
|
|---|
| 4658 | esac
|
|---|
| 4659 |
|
|---|
| 4660 | case "$g4vis_use_openglwin32" in
|
|---|
| 4661 | '')
|
|---|
| 4662 | g4vis_use_openglwin32=n
|
|---|
| 4663 | ;;
|
|---|
| 4664 | esac
|
|---|
| 4665 |
|
|---|
| 4666 | case "$g4vis_build_oiwin32_driver" in
|
|---|
| 4667 | '')
|
|---|
| 4668 | g4vis_build_oiwin32_driver=n
|
|---|
| 4669 | ;;
|
|---|
| 4670 | esac
|
|---|
| 4671 |
|
|---|
| 4672 | case "$g4vis_use_oiwin32" in
|
|---|
| 4673 | '')
|
|---|
| 4674 | g4vis_use_oiwin32=n
|
|---|
| 4675 | ;;
|
|---|
| 4676 | esac
|
|---|
| 4677 |
|
|---|
| 4678 | case "$g4vis_build_dawn_driver" in
|
|---|
| 4679 | '')
|
|---|
| 4680 | g4vis_build_dawn_driver=n
|
|---|
| 4681 | ;;
|
|---|
| 4682 | esac
|
|---|
| 4683 |
|
|---|
| 4684 | case "$g4vis_use_dawn" in
|
|---|
| 4685 | '')
|
|---|
| 4686 | g4vis_use_dawn=n
|
|---|
| 4687 | ;;
|
|---|
| 4688 | esac
|
|---|
| 4689 |
|
|---|
| 4690 | # Set by default!
|
|---|
| 4691 | case "$g4vis_build_dawnfile_driver" in
|
|---|
| 4692 | '')
|
|---|
| 4693 | g4vis_build_dawnfile_driver=y
|
|---|
| 4694 | ;;
|
|---|
| 4695 | esac
|
|---|
| 4696 |
|
|---|
| 4697 | # Set by default!
|
|---|
| 4698 | case "$g4vis_use_dawnfile" in
|
|---|
| 4699 | '')
|
|---|
| 4700 | g4vis_use_dawnfile=y
|
|---|
| 4701 | ;;
|
|---|
| 4702 | esac
|
|---|
| 4703 |
|
|---|
| 4704 | case "$g4vis_build_openglx_driver" in
|
|---|
| 4705 | '')
|
|---|
| 4706 | g4vis_build_openglx_driver=n
|
|---|
| 4707 | ;;
|
|---|
| 4708 | esac
|
|---|
| 4709 |
|
|---|
| 4710 | case "$g4vis_use_openglx" in
|
|---|
| 4711 | '')
|
|---|
| 4712 | g4vis_use_openglx=n
|
|---|
| 4713 | ;;
|
|---|
| 4714 | esac
|
|---|
| 4715 |
|
|---|
| 4716 | case "$g4vis_build_openglxm_driver" in
|
|---|
| 4717 | '')
|
|---|
| 4718 | g4vis_build_openglxm_driver=n
|
|---|
| 4719 | ;;
|
|---|
| 4720 | esac
|
|---|
| 4721 |
|
|---|
| 4722 | case "$g4vis_use_openglxm" in
|
|---|
| 4723 | '')
|
|---|
| 4724 | g4vis_use_openglxm=n
|
|---|
| 4725 | ;;
|
|---|
| 4726 | esac
|
|---|
| 4727 |
|
|---|
| 4728 | case "$g4vis_build_oix_driver" in
|
|---|
| 4729 | '')
|
|---|
| 4730 | g4vis_build_oix_driver=n
|
|---|
| 4731 | ;;
|
|---|
| 4732 | esac
|
|---|
| 4733 |
|
|---|
| 4734 | case "$g4vis_use_oix" in
|
|---|
| 4735 | '')
|
|---|
| 4736 | g4vis_use_oix=n
|
|---|
| 4737 | ;;
|
|---|
| 4738 | esac
|
|---|
| 4739 |
|
|---|
| 4740 | case "$g4vis_build_raytracerx_driver" in
|
|---|
| 4741 | '')
|
|---|
| 4742 | g4vis_build_raytracerx_driver=n
|
|---|
| 4743 | ;;
|
|---|
| 4744 | esac
|
|---|
| 4745 |
|
|---|
| 4746 | case "$g4vis_use_raytracerx" in
|
|---|
| 4747 | '')
|
|---|
| 4748 | g4vis_use_raytracerx=n
|
|---|
| 4749 | ;;
|
|---|
| 4750 | esac
|
|---|
| 4751 |
|
|---|
| 4752 | # Set by default!
|
|---|
| 4753 | case "$g4vis_build_raytracer_driver" in
|
|---|
| 4754 | '')
|
|---|
| 4755 | g4vis_build_raytracer_driver=y
|
|---|
| 4756 | ;;
|
|---|
| 4757 | esac
|
|---|
| 4758 |
|
|---|
| 4759 | # Set by default!
|
|---|
| 4760 | case "$g4vis_use_raytracer" in
|
|---|
| 4761 | '')
|
|---|
| 4762 | g4vis_use_raytracer=y
|
|---|
| 4763 | ;;
|
|---|
| 4764 | esac
|
|---|
| 4765 |
|
|---|
| 4766 | case "$g4vis_build_vrml_driver" in
|
|---|
| 4767 | '')
|
|---|
| 4768 | g4vis_build_vrml_driver=n
|
|---|
| 4769 | ;;
|
|---|
| 4770 | esac
|
|---|
| 4771 |
|
|---|
| 4772 | case "$g4vis_use_vrml" in
|
|---|
| 4773 | '')
|
|---|
| 4774 | g4vis_use_vrml=n
|
|---|
| 4775 | ;;
|
|---|
| 4776 | esac
|
|---|
| 4777 |
|
|---|
| 4778 | # Set by default!
|
|---|
| 4779 | case "$g4vis_build_asciitree_driver" in
|
|---|
| 4780 | '')
|
|---|
| 4781 | g4vis_build_asciitree_driver=y
|
|---|
| 4782 | ;;
|
|---|
| 4783 | esac
|
|---|
| 4784 |
|
|---|
| 4785 | # Set by default!
|
|---|
| 4786 | case "$g4vis_use_asciitree" in
|
|---|
| 4787 | '')
|
|---|
| 4788 | g4vis_use_asciitree=y
|
|---|
| 4789 | ;;
|
|---|
| 4790 | esac
|
|---|
| 4791 |
|
|---|
| 4792 | # Set by default!
|
|---|
| 4793 | case "$g4vis_build_gagtree_driver" in
|
|---|
| 4794 | '')
|
|---|
| 4795 | g4vis_build_gagtree_driver=y
|
|---|
| 4796 | ;;
|
|---|
| 4797 | esac
|
|---|
| 4798 |
|
|---|
| 4799 | # Set by default!
|
|---|
| 4800 | case "$g4vis_use_gagtree" in
|
|---|
| 4801 | '')
|
|---|
| 4802 | g4vis_use_gagtree=y
|
|---|
| 4803 | ;;
|
|---|
| 4804 | esac
|
|---|
| 4805 |
|
|---|
| 4806 | echo ""
|
|---|
| 4807 |
|
|---|
| 4808 | g4message=`cat << EOM
|
|---|
| 4809 |
|
|---|
| 4810 | G4VIS_NONE
|
|---|
| 4811 |
|
|---|
| 4812 | If this variable is set, no visualization drivers will be built or used.
|
|---|
| 4813 | Do you want to set this variable ?
|
|---|
| 4814 |
|
|---|
| 4815 | EOM`
|
|---|
| 4816 |
|
|---|
| 4817 | dflt=$g4vis_none
|
|---|
| 4818 | rp=$g4message
|
|---|
| 4819 | . ./myread
|
|---|
| 4820 | gans=$ans
|
|---|
| 4821 |
|
|---|
| 4822 | case $gans in
|
|---|
| 4823 |
|
|---|
| 4824 | n*|N*)
|
|---|
| 4825 | g4vis_none=n
|
|---|
| 4826 | ;;
|
|---|
| 4827 | y*|Y*)
|
|---|
| 4828 | g4vis_none=y
|
|---|
| 4829 | ;;
|
|---|
| 4830 | esac
|
|---|
| 4831 |
|
|---|
| 4832 | case $g4vis_none in
|
|---|
| 4833 |
|
|---|
| 4834 | n)
|
|---|
| 4835 |
|
|---|
| 4836 | if test "X$g4system" != "XWIN32-VC" -a "X$g4system" != "XWIN32-VC7"; then
|
|---|
| 4837 |
|
|---|
| 4838 | g4message=`cat << EOM
|
|---|
| 4839 |
|
|---|
| 4840 | G4VIS_BUILD_OPENGLX_DRIVER
|
|---|
| 4841 | G4VIS_USE_OPENGLX
|
|---|
| 4842 |
|
|---|
| 4843 | It is an interface to the de facto standard 3D graphics library,
|
|---|
| 4844 | OpenGL. It is well suited for real-time fast visualization
|
|---|
| 4845 | and prototyping. The X11 version of the OpenGL libraries is
|
|---|
| 4846 | required.
|
|---|
| 4847 | EOM`
|
|---|
| 4848 |
|
|---|
| 4849 | dflt=$g4vis_use_openglx
|
|---|
| 4850 | rp=$g4message
|
|---|
| 4851 | . ./myread
|
|---|
| 4852 | gans=$ans
|
|---|
| 4853 |
|
|---|
| 4854 | case $gans in
|
|---|
| 4855 |
|
|---|
| 4856 | n*|N*)
|
|---|
| 4857 | g4vis_build_openglx_driver=n
|
|---|
| 4858 | g4vis_use_openglx=n
|
|---|
| 4859 | ;;
|
|---|
| 4860 | y*|Y*)
|
|---|
| 4861 | g4vis_build_openglx_driver=y
|
|---|
| 4862 | g4vis_use_openglx=y
|
|---|
| 4863 | ;;
|
|---|
| 4864 | esac
|
|---|
| 4865 |
|
|---|
| 4866 | #############################################3
|
|---|
| 4867 | g4message=`cat << EOM
|
|---|
| 4868 |
|
|---|
| 4869 | G4VIS_BUILD_OPENGLXM_DRIVER
|
|---|
| 4870 | G4VIS_USE_OPENGLXM
|
|---|
| 4871 |
|
|---|
| 4872 | It is an interface to the de facto standard 3D graphics library,
|
|---|
| 4873 | OpenGL. It is well suited for real-time fast visualization
|
|---|
| 4874 | and prototyping. The X11 version of the OpenGL libraries and
|
|---|
| 4875 | the Motif Xm extension is required.
|
|---|
| 4876 |
|
|---|
| 4877 | EOM`
|
|---|
| 4878 |
|
|---|
| 4879 | dflt=$g4vis_use_openglxm
|
|---|
| 4880 | rp=$g4message
|
|---|
| 4881 | . ./myread
|
|---|
| 4882 | gans=$ans
|
|---|
| 4883 |
|
|---|
| 4884 | case $gans in
|
|---|
| 4885 |
|
|---|
| 4886 | n*|N*)
|
|---|
| 4887 | g4vis_build_openglxm_driver=n
|
|---|
| 4888 | g4vis_use_openglxm=n
|
|---|
| 4889 | ;;
|
|---|
| 4890 | y*|Y*)
|
|---|
| 4891 | g4vis_build_openglxm_driver=y
|
|---|
| 4892 | g4vis_use_openglxm=y
|
|---|
| 4893 | ;;
|
|---|
| 4894 | esac
|
|---|
| 4895 |
|
|---|
| 4896 | ############################################################
|
|---|
| 4897 | #echo xm_dirs=$xm_dirs
|
|---|
| 4898 | #echo g4vis_xmhome=$g4vis_xmhome
|
|---|
| 4899 | #echo g4ui_build_xm_session=$g4ui_build_xm_session
|
|---|
| 4900 | #echo g4vis_build_openglxm_driver=$g4vis_build_openglxm_driver
|
|---|
| 4901 |
|
|---|
| 4902 | if test "X$g4ui_build_xm_session" = "Xn" ; then
|
|---|
| 4903 |
|
|---|
| 4904 | #echo PASS1
|
|---|
| 4905 |
|
|---|
| 4906 | if test "X$g4vis_build_openglxm_driver" = "Xy" ; then
|
|---|
| 4907 |
|
|---|
| 4908 | #echo PASS2
|
|---|
| 4909 |
|
|---|
| 4910 | if test "X$g4vis_xmhome" = "X" ; then
|
|---|
| 4911 | xm_dirs=`find $g4vis_xmhome /usr/X11R6/include /usr/local/include /usr/include /sw/include -type d -name Xm 2>/dev/null |xargs echo`
|
|---|
| 4912 | #echo ogl_dirs=$ogl_dirs
|
|---|
| 4913 |
|
|---|
| 4914 | if test "X$xm_dirs" != "X" ; then
|
|---|
| 4915 |
|
|---|
| 4916 | g4xm_base_dir_found=`echo $xm_dirs|cut -d" " -f1`
|
|---|
| 4917 | #echo g4ogl_base_dir_found=$g4ogl_base_dir_found
|
|---|
| 4918 |
|
|---|
| 4919 | # That's right: should be twice! (e.g./usr/local/lib/libGLU.so -> /usr/local)
|
|---|
| 4920 | g4xm_base_dir_found=`dirname $g4xm_base_dir_found`
|
|---|
| 4921 | g4xm_base_dir_found=`dirname $g4xm_base_dir_found`
|
|---|
| 4922 |
|
|---|
| 4923 | g4vis_xmhome=$g4xm_base_dir_found
|
|---|
| 4924 | #else
|
|---|
| 4925 | #case "$g4vis_xmhome" in
|
|---|
| 4926 | #'')
|
|---|
| 4927 | # g4vis_xmhome=/usr/X11R6/
|
|---|
| 4928 | # ;;
|
|---|
| 4929 | #esac
|
|---|
| 4930 | fi
|
|---|
| 4931 | fi
|
|---|
| 4932 |
|
|---|
| 4933 | ##########################################################################
|
|---|
| 4934 |
|
|---|
| 4935 | #if test "X$g4vis_xmhome" != "X" ; then
|
|---|
| 4936 | #xm_dirs=$g4vis_xmhome
|
|---|
| 4937 | #fi
|
|---|
| 4938 |
|
|---|
| 4939 | if test "X$g4vis_xmhome" != "X" ; then
|
|---|
| 4940 |
|
|---|
| 4941 | g4message=`cat << EOM
|
|---|
| 4942 |
|
|---|
| 4943 | You have selected to use OPENGLXM driver.
|
|---|
| 4944 | Specify the correct path where Xm is installed in your system.
|
|---|
| 4945 | It was found in $g4vis_xmhome. Press [Enter] to set this path or type the correct one.
|
|---|
| 4946 |
|
|---|
| 4947 | You can set '-' (without quotation) to CANCEL the XM flag at all:
|
|---|
| 4948 |
|
|---|
| 4949 | EOM`
|
|---|
| 4950 |
|
|---|
| 4951 | dflt=$g4vis_xmhome
|
|---|
| 4952 | fn='d~(-)'
|
|---|
| 4953 | rp=$g4message
|
|---|
| 4954 | . ./getfile
|
|---|
| 4955 |
|
|---|
| 4956 | cend="no"
|
|---|
| 4957 | while test "$cend" = "no" ; do
|
|---|
| 4958 | if test -e "$ans/include/Xm" || [ "X$ans" = "X-" ]; then
|
|---|
| 4959 | cend="yes"
|
|---|
| 4960 | if test "X$ans" != "X-" ; then
|
|---|
| 4961 |
|
|---|
| 4962 | g4vis_xmhome=$ans
|
|---|
| 4963 |
|
|---|
| 4964 | else
|
|---|
| 4965 |
|
|---|
| 4966 | g4vis_build_openglxm_driver=n
|
|---|
| 4967 | g4vis_use_openglxm=n
|
|---|
| 4968 |
|
|---|
| 4969 | fi
|
|---|
| 4970 | else
|
|---|
| 4971 |
|
|---|
| 4972 | g4message=`cat << EOM
|
|---|
| 4973 |
|
|---|
| 4974 | You have selected to use OPENGLXM driver.
|
|---|
| 4975 | But it was not found in $ans.
|
|---|
| 4976 | Please specify the correct path where Xm is installed in your system.
|
|---|
| 4977 |
|
|---|
| 4978 | You can set '-' (without quotation) to CANCEL the XM flag at all:
|
|---|
| 4979 |
|
|---|
| 4980 | EOM`
|
|---|
| 4981 |
|
|---|
| 4982 | dflt=""
|
|---|
| 4983 | fn='d~(-)'
|
|---|
| 4984 | rp=$g4message
|
|---|
| 4985 | . ./getfile
|
|---|
| 4986 | fi
|
|---|
| 4987 | done
|
|---|
| 4988 |
|
|---|
| 4989 | else
|
|---|
| 4990 |
|
|---|
| 4991 | g4message=`cat << EOM
|
|---|
| 4992 |
|
|---|
| 4993 | You have selected to use OPENGLXM driver.
|
|---|
| 4994 | But it was not found in expected place.
|
|---|
| 4995 | Please specify the correct path where Xm is installed in your system.
|
|---|
| 4996 |
|
|---|
| 4997 | You can set '-' (without quotation) to CANCEL the XM flag at all:
|
|---|
| 4998 |
|
|---|
| 4999 | EOM`
|
|---|
| 5000 |
|
|---|
| 5001 | dflt=""
|
|---|
| 5002 | fn='d~(-)'
|
|---|
| 5003 | rp=$g4message
|
|---|
| 5004 | . ./getfile
|
|---|
| 5005 |
|
|---|
| 5006 | cend="no"
|
|---|
| 5007 | while test "$cend" = "no" ; do
|
|---|
| 5008 | if test -e "$ans/include/Xm" || [ "X$ans" = "X-" ]; then
|
|---|
| 5009 | cend="yes"
|
|---|
| 5010 | if test "X$ans" != "X-" ; then
|
|---|
| 5011 |
|
|---|
| 5012 | g4vis_xmhome=$ans
|
|---|
| 5013 |
|
|---|
| 5014 | else
|
|---|
| 5015 |
|
|---|
| 5016 | g4vis_build_openglxm_driver=n
|
|---|
| 5017 | g4vis_use_openglxm=n
|
|---|
| 5018 |
|
|---|
| 5019 | fi
|
|---|
| 5020 | else
|
|---|
| 5021 |
|
|---|
| 5022 | g4message=`cat << EOM
|
|---|
| 5023 |
|
|---|
| 5024 | You have selected to use OPENGLXM driver.
|
|---|
| 5025 | But it was not found in $ans.
|
|---|
| 5026 | Please specify the correct path where Xm is installed in your system.
|
|---|
| 5027 |
|
|---|
| 5028 | You can set '-' (without quotation) to CANCEL the XM flag at all:
|
|---|
| 5029 |
|
|---|
| 5030 | EOM`
|
|---|
| 5031 |
|
|---|
| 5032 | dflt=""
|
|---|
| 5033 | fn='d~(-)'
|
|---|
| 5034 | rp=$g4message
|
|---|
| 5035 | . ./getfile
|
|---|
| 5036 | fi
|
|---|
| 5037 | done
|
|---|
| 5038 | fi
|
|---|
| 5039 |
|
|---|
| 5040 | if test "X$g4osname" = "XLinux"; then
|
|---|
| 5041 |
|
|---|
| 5042 | if test "X$g4vis_xmhome" = "X/usr" -o "X$g4vis_xmhome" = "X/usr/local" ; then
|
|---|
| 5043 | g4vis_xmhome=""
|
|---|
| 5044 | fi
|
|---|
| 5045 | fi
|
|---|
| 5046 | fi # g4vis_build_opheglxm_driver
|
|---|
| 5047 |
|
|---|
| 5048 | ###############################################
|
|---|
| 5049 | # Set XMFLAGS and XMLIBS
|
|---|
| 5050 | #
|
|---|
| 5051 |
|
|---|
| 5052 | if test "X$g4vis_build_openglxm_driver" = "Xy" ; then
|
|---|
| 5053 |
|
|---|
| 5054 | if test "X$g4osname" = "XAIX" ; then
|
|---|
| 5055 | g4vis_xmflags=" -I$g4vis_xmhome/include "
|
|---|
| 5056 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm -lXt -lX11 "
|
|---|
| 5057 | fi
|
|---|
| 5058 |
|
|---|
| 5059 | if test "X$g4osname" = "XLinux" ; then
|
|---|
| 5060 | g4vis_xmflags=" -I$g4vis_xmhome/include "
|
|---|
| 5061 | if test "X$g4vis_xmhome" = "X/usr/X11R6" ; then
|
|---|
| 5062 | g4vis_xmlibs=" -lXm -lXpm "
|
|---|
| 5063 | else
|
|---|
| 5064 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm -lXpm "
|
|---|
| 5065 | fi
|
|---|
| 5066 | fi
|
|---|
| 5067 |
|
|---|
| 5068 | if test "X$g4osname" = "XDarwin" ; then
|
|---|
| 5069 | g4vis_xmflags=" -I$g4vis_xmhome/include "
|
|---|
| 5070 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm -lXpm "
|
|---|
| 5071 | fi
|
|---|
| 5072 |
|
|---|
| 5073 | if test "X$g4osname" = "XDEC" ; then
|
|---|
| 5074 | g4vis_xmflags=" -I$g4vis_xmhome/include "
|
|---|
| 5075 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm "
|
|---|
| 5076 | fi
|
|---|
| 5077 |
|
|---|
| 5078 | if test "X$g4osname" = "XHP" ; then
|
|---|
| 5079 | g4vis_xmflags=" -I$g4vis_xmhome/include/Motif1.2 "
|
|---|
| 5080 | g4vis_xmlibs=" -L$g4vis_xmhome/lib/Motif1.2 -lXm "
|
|---|
| 5081 | fi
|
|---|
| 5082 |
|
|---|
| 5083 | if test "X$g4osname" = "XSGI" ; then
|
|---|
| 5084 | g4vis_xmflags=" -I$g4vis_xmhome/include "
|
|---|
| 5085 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm "
|
|---|
| 5086 | fi
|
|---|
| 5087 |
|
|---|
| 5088 | if test "X$g4osname" = "XSUN" ; then
|
|---|
| 5089 | g4vis_xmflags=" -I$g4vis_xmhome/include "
|
|---|
| 5090 | g4vis_xmlibs=" -L$g4vis_xmhome/lib -L/usr/openwin/lib -L/usr/dt/lib -L/usr/ucblib -R/usr/openwin/lib -lXt -lXm -lX11 "
|
|---|
| 5091 | fi
|
|---|
| 5092 |
|
|---|
| 5093 | fi # end of XM build
|
|---|
| 5094 | fi
|
|---|
| 5095 | ###############################################
|
|---|
| 5096 |
|
|---|
| 5097 | fi # if !WIN
|
|---|
| 5098 |
|
|---|
| 5099 | ######################################################################
|
|---|
| 5100 | if test "X$g4system" = "XWIN32-VC" -o "X$g4system" = "XWIN32-VC7"; then
|
|---|
| 5101 |
|
|---|
| 5102 | g4message=`cat << EOM
|
|---|
| 5103 |
|
|---|
| 5104 | G4VIS_BUILD_OPENGLWIN32_DRIVER
|
|---|
| 5105 | G4VIS_USE_OPENGLWIN32
|
|---|
| 5106 |
|
|---|
| 5107 | It is an interface to the de facto standard 3D graphics library,
|
|---|
| 5108 | OpenGL. It is well suited for real-time fast visualization
|
|---|
| 5109 | and prototyping. The Windows version of the OpenGL libraries is
|
|---|
| 5110 | required.
|
|---|
| 5111 |
|
|---|
| 5112 | EOM`
|
|---|
| 5113 |
|
|---|
| 5114 | dflt=$g4vis_use_openglwin32
|
|---|
| 5115 | rp=$g4message
|
|---|
| 5116 | . ./myread
|
|---|
| 5117 | gans=$ans
|
|---|
| 5118 |
|
|---|
| 5119 | case $gans in
|
|---|
| 5120 |
|
|---|
| 5121 | n*|N*)
|
|---|
| 5122 | g4vis_build_openglwin32_driver=n
|
|---|
| 5123 | g4vis_use_openglwin32=n
|
|---|
| 5124 | ;;
|
|---|
| 5125 | y*|Y*)
|
|---|
| 5126 | g4vis_build_openglwin32_driver=y
|
|---|
| 5127 | g4vis_use_openglwin32=y
|
|---|
| 5128 | ;;
|
|---|
| 5129 | esac
|
|---|
| 5130 |
|
|---|
| 5131 | fi # if WIN
|
|---|
| 5132 | ###########################################
|
|---|
| 5133 |
|
|---|
| 5134 | if test "X$g4system" != "XWIN32-VC" -a "X$g4system" != "XWIN32-VC7"; then
|
|---|
| 5135 |
|
|---|
| 5136 | g4message=`cat << EOM
|
|---|
| 5137 |
|
|---|
| 5138 | G4VIS_BUILD_DAWN_DRIVER
|
|---|
| 5139 | G4VIS_USE_DAWN
|
|---|
| 5140 |
|
|---|
| 5141 | DAWN drivers are interfaces to the Fukui Renderer DAWN. DAWN is
|
|---|
| 5142 | a vectorized 3D PostScript processor suited to prepare technical
|
|---|
| 5143 | high quality outputs for presentation and/or documentation.
|
|---|
| 5144 |
|
|---|
| 5145 | EOM`
|
|---|
| 5146 |
|
|---|
| 5147 | dflt=$g4vis_use_dawn
|
|---|
| 5148 | rp=$g4message
|
|---|
| 5149 | . ./myread
|
|---|
| 5150 | gans=$ans
|
|---|
| 5151 |
|
|---|
| 5152 | case $gans in
|
|---|
| 5153 |
|
|---|
| 5154 | n*|N*)
|
|---|
| 5155 | g4vis_build_dawn_driver=n
|
|---|
| 5156 | g4vis_use_dawn=n
|
|---|
| 5157 | ;;
|
|---|
| 5158 | y*|Y*)
|
|---|
| 5159 | g4vis_build_dawn_driver=y
|
|---|
| 5160 | g4vis_use_dawn=y
|
|---|
| 5161 | ;;
|
|---|
| 5162 | esac
|
|---|
| 5163 |
|
|---|
| 5164 |
|
|---|
| 5165 | #######################################
|
|---|
| 5166 | g4message=`cat << EOM
|
|---|
| 5167 |
|
|---|
| 5168 | G4VIS_BUILD_OIX_DRIVER
|
|---|
| 5169 | G4VIS_USE_OIX
|
|---|
| 5170 |
|
|---|
| 5171 | The OpenInventor driver is based on OpenInventor technology
|
|---|
| 5172 | for scientific visualization.
|
|---|
| 5173 | The X11 version of OpenInventor is required.
|
|---|
| 5174 |
|
|---|
| 5175 | EOM`
|
|---|
| 5176 |
|
|---|
| 5177 | dflt=$g4vis_use_oix
|
|---|
| 5178 | rp=$g4message
|
|---|
| 5179 | . ./myread
|
|---|
| 5180 | gans=$ans
|
|---|
| 5181 |
|
|---|
| 5182 | case $gans in
|
|---|
| 5183 |
|
|---|
| 5184 | n*|N*)
|
|---|
| 5185 | g4vis_build_oix_driver=n
|
|---|
| 5186 | g4vis_use_oix=n
|
|---|
| 5187 | ;;
|
|---|
| 5188 | y*|Y*)
|
|---|
| 5189 | g4vis_build_oix_driver=y
|
|---|
| 5190 | g4vis_use_oix=y
|
|---|
| 5191 | ;;
|
|---|
| 5192 | esac
|
|---|
| 5193 |
|
|---|
| 5194 | ############################################################
|
|---|
| 5195 | if test "X$g4vis_build_oix_driver" = "Xy" ; then
|
|---|
| 5196 |
|
|---|
| 5197 | oiv_dirs=`find $g4vis_oivhome /usr/X11R6/include /usr/local/include /usr/include -type d -name Inventor 2>/dev/null|xargs echo`
|
|---|
| 5198 | #echo ogl_dirs=$ogl_dirs
|
|---|
| 5199 |
|
|---|
| 5200 | if test "X$oiv_dirs" != "X" ; then
|
|---|
| 5201 |
|
|---|
| 5202 | g4oiv_base_dir_found=`echo $oiv_dirs|cut -d" " -f1`
|
|---|
| 5203 | #echo g4ogl_base_dir_found=$g4ogl_base_dir_found
|
|---|
| 5204 |
|
|---|
| 5205 | # That's right: should be twice! (e.g./usr/local/lib/libGLU.so -> /usr/local)
|
|---|
| 5206 | g4oiv_base_dir_found=`dirname $g4oiv_base_dir_found`
|
|---|
| 5207 | g4oiv_base_dir_found=`dirname $g4oiv_base_dir_found`
|
|---|
| 5208 |
|
|---|
| 5209 | g4vis_oivhome=$g4oiv_base_dir_found
|
|---|
| 5210 | #else
|
|---|
| 5211 | #case "$g4vis_oivhome" in
|
|---|
| 5212 | #'')
|
|---|
| 5213 | # g4vis_oivhome=/usr
|
|---|
| 5214 | # ;;
|
|---|
| 5215 | #esac
|
|---|
| 5216 | fi
|
|---|
| 5217 |
|
|---|
| 5218 | ##########################################################################
|
|---|
| 5219 |
|
|---|
| 5220 | #if test "X$g4vis_oivhome" != "X" ; then
|
|---|
| 5221 | #oiv_dirs=$g4vis_oivhome
|
|---|
| 5222 | #fi
|
|---|
| 5223 |
|
|---|
| 5224 | if test "X$g4vis_oivhome" != "X" ; then
|
|---|
| 5225 |
|
|---|
| 5226 | g4message=`cat << EOM
|
|---|
| 5227 |
|
|---|
| 5228 | OIVHOME/include
|
|---|
| 5229 | OIVHOME/lib
|
|---|
| 5230 |
|
|---|
| 5231 | You have selected to use OpenInventor driver.
|
|---|
| 5232 | Specify the correct path (OIVHOME) where OpenInventor is installed in your system.
|
|---|
| 5233 | It was found in $g4vis_oivhome. Press [Enter] to set this path or type the correct one.
|
|---|
| 5234 |
|
|---|
| 5235 | You can set '-' (without quotation) to CANCEL the OpenInventor flag at all:
|
|---|
| 5236 |
|
|---|
| 5237 | EOM`
|
|---|
| 5238 |
|
|---|
| 5239 | dflt=$g4vis_oivhome
|
|---|
| 5240 | fn='d~(-)'
|
|---|
| 5241 | rp=$g4message
|
|---|
| 5242 | . ./getfile
|
|---|
| 5243 |
|
|---|
| 5244 | cend="no"
|
|---|
| 5245 | while test "$cend" = "no" ; do
|
|---|
| 5246 | if test -e "$ans/include/Inventor" || [ "X$ans" = "X-" ]; then
|
|---|
| 5247 | cend="yes"
|
|---|
| 5248 | if test "X$ans" != "X-" ; then
|
|---|
| 5249 |
|
|---|
| 5250 | g4vis_oivhome=$ans
|
|---|
| 5251 |
|
|---|
| 5252 | else
|
|---|
| 5253 |
|
|---|
| 5254 | g4vis_build_oix_driver=n
|
|---|
| 5255 | g4vis_use_oix=n
|
|---|
| 5256 |
|
|---|
| 5257 | fi
|
|---|
| 5258 | else
|
|---|
| 5259 |
|
|---|
| 5260 | g4message=`cat << EOM
|
|---|
| 5261 |
|
|---|
| 5262 | OIVHOME/include
|
|---|
| 5263 | OIVHOME/lib
|
|---|
| 5264 |
|
|---|
| 5265 | You have selected to use OpenInventor driver.
|
|---|
| 5266 | But it was not found in $ans.
|
|---|
| 5267 | Please specify the correct path where OpenInventor is installed in your system.
|
|---|
| 5268 |
|
|---|
| 5269 | You can set '-' (without quotation) to CANCEL the OpenInventor flag at all:
|
|---|
| 5270 |
|
|---|
| 5271 | EOM`
|
|---|
| 5272 |
|
|---|
| 5273 | dflt=""
|
|---|
| 5274 | fn='d~(-)'
|
|---|
| 5275 | rp=$g4message
|
|---|
| 5276 | . ./getfile
|
|---|
| 5277 | fi
|
|---|
| 5278 | done
|
|---|
| 5279 |
|
|---|
| 5280 | else
|
|---|
| 5281 |
|
|---|
| 5282 | g4message=`cat << EOM
|
|---|
| 5283 |
|
|---|
| 5284 | OIVHOME/include
|
|---|
| 5285 | OIVHOME/lib
|
|---|
| 5286 |
|
|---|
| 5287 | You have selected to use OpenInventor driver.
|
|---|
| 5288 | But it was not found in expected place.
|
|---|
| 5289 | Please specify the correct path where OpenInventor is installed in your system.
|
|---|
| 5290 |
|
|---|
| 5291 | You can set '-' (without quotation) to CANCEL the OpenInventor flag at all:
|
|---|
| 5292 |
|
|---|
| 5293 | EOM`
|
|---|
| 5294 |
|
|---|
| 5295 | dflt=""
|
|---|
| 5296 | fn='d~(-)'
|
|---|
| 5297 | rp=$g4message
|
|---|
| 5298 | . ./getfile
|
|---|
| 5299 |
|
|---|
| 5300 | cend="no"
|
|---|
| 5301 | while test "$cend" = "no" ; do
|
|---|
| 5302 | if test -e "$ans/include/Inventor" || [ "X$ans" = "X-" ]; then
|
|---|
| 5303 | cend="yes"
|
|---|
| 5304 | if test "X$ans" != "X-" ; then
|
|---|
| 5305 |
|
|---|
| 5306 | g4vis_oivhome=$ans
|
|---|
| 5307 |
|
|---|
| 5308 | else
|
|---|
| 5309 |
|
|---|
| 5310 | g4vis_build_oix_driver=n
|
|---|
| 5311 | g4vis_use_oix=n
|
|---|
| 5312 |
|
|---|
| 5313 | fi
|
|---|
| 5314 | else
|
|---|
| 5315 |
|
|---|
| 5316 | g4message=`cat << EOM
|
|---|
| 5317 |
|
|---|
| 5318 | OIVHOME/include
|
|---|
| 5319 | OIVHOME/lib
|
|---|
| 5320 |
|
|---|
| 5321 | You have selected to use OpenInventor driver.
|
|---|
| 5322 | But it was not found in $ans.
|
|---|
| 5323 | Please specify the correct path where OpenInventor is installed in your system.
|
|---|
| 5324 |
|
|---|
| 5325 | You can set '-' (without quotation) to CANCEL the OpenInventor flag at all:
|
|---|
| 5326 |
|
|---|
| 5327 | EOM`
|
|---|
| 5328 |
|
|---|
| 5329 | dflt=""
|
|---|
| 5330 | fn='d~(-)'
|
|---|
| 5331 | rp=$g4message
|
|---|
| 5332 | . ./getfile
|
|---|
| 5333 | fi
|
|---|
| 5334 | done
|
|---|
| 5335 | fi
|
|---|
| 5336 |
|
|---|
| 5337 | if test "X$g4osname" = "XLinux"; then
|
|---|
| 5338 |
|
|---|
| 5339 | if test "X$g4vis_oivhome" = "X/usr" -o "X$g4vis_oivhome" = "X/usr/local"; then
|
|---|
| 5340 | g4vis_oivhome=""
|
|---|
| 5341 | fi
|
|---|
| 5342 | fi
|
|---|
| 5343 | fi # g4vis_build_oix_driver
|
|---|
| 5344 |
|
|---|
| 5345 | ###############################################
|
|---|
| 5346 |
|
|---|
| 5347 | g4message=`cat << EOM
|
|---|
| 5348 |
|
|---|
| 5349 | G4VIS_BUILD_RAYTRACERX_DRIVER
|
|---|
| 5350 | G4VIS_USE_RAYTRACERX
|
|---|
| 5351 |
|
|---|
| 5352 | Allows for interactive ray-tracing graphics through X11.
|
|---|
| 5353 | The X11 package is required.
|
|---|
| 5354 |
|
|---|
| 5355 | EOM`
|
|---|
| 5356 |
|
|---|
| 5357 | dflt=$g4vis_use_raytracerx
|
|---|
| 5358 | rp=$g4message
|
|---|
| 5359 | . ./myread
|
|---|
| 5360 | gans=$ans
|
|---|
| 5361 |
|
|---|
| 5362 | case $gans in
|
|---|
| 5363 |
|
|---|
| 5364 | n*|N*)
|
|---|
| 5365 | g4vis_build_raytracerx_driver=n
|
|---|
| 5366 | g4vis_use_raytracerx=n
|
|---|
| 5367 | ;;
|
|---|
| 5368 | y*|Y*)
|
|---|
| 5369 | g4vis_build_raytracerx_driver=y
|
|---|
| 5370 | g4vis_use_raytracerx=y
|
|---|
| 5371 | ;;
|
|---|
| 5372 | esac
|
|---|
| 5373 |
|
|---|
| 5374 | ########################################################
|
|---|
| 5375 | fi # if !WIN
|
|---|
| 5376 |
|
|---|
| 5377 | ###############################################################
|
|---|
| 5378 | if test "X$g4system" = "XWIN32-VC" -o "X$g4system" = "XWIN32-VC7"; then
|
|---|
| 5379 |
|
|---|
| 5380 | g4message=`cat << EOM
|
|---|
| 5381 |
|
|---|
| 5382 | G4VIS_BUILD_OIWIN32_DRIVER
|
|---|
| 5383 | G4VIS_USE_OIWIN32
|
|---|
| 5384 |
|
|---|
| 5385 | Specifies to build and use the driver for the free X11 version of
|
|---|
| 5386 | OpenInventor on Windows systems.
|
|---|
| 5387 | The Windows version of OpenInventor is required.
|
|---|
| 5388 |
|
|---|
| 5389 | EOM`
|
|---|
| 5390 |
|
|---|
| 5391 | dflt=$g4vis_use_oiwin32
|
|---|
| 5392 | rp=$g4message
|
|---|
| 5393 | . ./myread
|
|---|
| 5394 | gans=$ans
|
|---|
| 5395 |
|
|---|
| 5396 | case $gans in
|
|---|
| 5397 |
|
|---|
| 5398 | n*|N*)
|
|---|
| 5399 | g4vis_build_oiwin32_driver=n
|
|---|
| 5400 | g4vis_use_oiwin32=n
|
|---|
| 5401 | ;;
|
|---|
| 5402 | y*|Y*)
|
|---|
| 5403 | g4vis_build_oiwin32_driver=y
|
|---|
| 5404 | g4vis_use_oiwin32=y
|
|---|
| 5405 | ;;
|
|---|
| 5406 | esac
|
|---|
| 5407 |
|
|---|
| 5408 | ############################################################
|
|---|
| 5409 | if test "X$g4vis_build_oiwin32_driver" = "Xy" ; then
|
|---|
| 5410 |
|
|---|
| 5411 | oiv_dirs=`find $g4vis_oivhome /usr/X11R6/include /usr/local/include /usr/include -type d -name Inventor 2>/dev/null|xargs echo`
|
|---|
| 5412 | #echo ogl_dirs=$ogl_dirs
|
|---|
| 5413 |
|
|---|
| 5414 | if test "X$oiv_dirs" != "X" ; then
|
|---|
| 5415 |
|
|---|
| 5416 | g4oiv_base_dir_found=`echo $oiv_dirs|cut -d" " -f1`
|
|---|
| 5417 | #echo g4ogl_base_dir_found=$g4ogl_base_dir_found
|
|---|
| 5418 |
|
|---|
| 5419 | # That's right: should be twice! (e.g./usr/local/lib/libGLU.so -> /usr/local)
|
|---|
| 5420 | g4oiv_base_dir_found=`dirname $g4oiv_base_dir_found`
|
|---|
| 5421 | g4oiv_base_dir_found=`dirname $g4oiv_base_dir_found`
|
|---|
| 5422 |
|
|---|
| 5423 | g4vis_oivhome=$g4oiv_base_dir_found
|
|---|
| 5424 | #else
|
|---|
| 5425 | #case "$g4vis_oivhome" in
|
|---|
| 5426 | #'')
|
|---|
| 5427 | # g4vis_oivhome=/usr
|
|---|
| 5428 | # ;;
|
|---|
| 5429 | #esac
|
|---|
| 5430 | fi
|
|---|
| 5431 |
|
|---|
| 5432 | ##########################################################################
|
|---|
| 5433 |
|
|---|
| 5434 | #if test "X$g4vis_oivhome" != "X" ; then
|
|---|
| 5435 | #oiv_dirs=$g4vis_oivhome
|
|---|
| 5436 | #fi
|
|---|
| 5437 |
|
|---|
| 5438 | if test "X$g4vis_oivhome" != "X" ; then
|
|---|
| 5439 |
|
|---|
| 5440 | g4message=`cat << EOM
|
|---|
| 5441 |
|
|---|
| 5442 | OIVHOME/include
|
|---|
| 5443 | OIVHOME/lib
|
|---|
| 5444 |
|
|---|
| 5445 | You have selected to use OpenInventor driver.
|
|---|
| 5446 | Specify the correct path (OIVHOME) where OpenInventor is installed in your system.
|
|---|
| 5447 | It was found in $g4vis_oivhome. Press [Enter] to set this path or type the correct one.
|
|---|
| 5448 |
|
|---|
| 5449 | You can set '-' (without quotation) to CANCEL the OpenInventor flag at all:
|
|---|
| 5450 |
|
|---|
| 5451 | EOM`
|
|---|
| 5452 |
|
|---|
| 5453 | dflt=$g4vis_oivhome
|
|---|
| 5454 | fn='d~(-)'
|
|---|
| 5455 | rp=$g4message
|
|---|
| 5456 | . ./getfile
|
|---|
| 5457 |
|
|---|
| 5458 | cend="no"
|
|---|
| 5459 | while test "$cend" = "no" ; do
|
|---|
| 5460 | if test -e "$ans/include/Inventor" || [ "X$ans" = "X-" ]; then
|
|---|
| 5461 | cend="yes"
|
|---|
| 5462 | if test "X$ans" != "X-" ; then
|
|---|
| 5463 |
|
|---|
| 5464 | g4vis_oivhome=$ans
|
|---|
| 5465 |
|
|---|
| 5466 | else
|
|---|
| 5467 |
|
|---|
| 5468 | g4vis_build_oiwin32_driver=n
|
|---|
| 5469 | g4vis_use_oiwin32=n
|
|---|
| 5470 |
|
|---|
| 5471 | fi
|
|---|
| 5472 | else
|
|---|
| 5473 |
|
|---|
| 5474 | g4message=`cat << EOM
|
|---|
| 5475 |
|
|---|
| 5476 | OIVHOME/include
|
|---|
| 5477 | OIVHOME/lib
|
|---|
| 5478 |
|
|---|
| 5479 | You have selected to use OpenInventor driver.
|
|---|
| 5480 | But it was not found in $ans.
|
|---|
| 5481 | Please specify the correct path where OpenInventor is installed in your system.
|
|---|
| 5482 |
|
|---|
| 5483 | You can set '-' (without quotation) to CANCEL the OpenInventor flag at all:
|
|---|
| 5484 |
|
|---|
| 5485 | EOM`
|
|---|
| 5486 |
|
|---|
| 5487 | dflt=""
|
|---|
| 5488 | fn='d~(-)'
|
|---|
| 5489 | rp=$g4message
|
|---|
| 5490 | . ./getfile
|
|---|
| 5491 | fi
|
|---|
| 5492 | done
|
|---|
| 5493 |
|
|---|
| 5494 | else
|
|---|
| 5495 |
|
|---|
| 5496 | g4message=`cat << EOM
|
|---|
| 5497 |
|
|---|
| 5498 | OIVHOME/include
|
|---|
| 5499 | OIVHOME/lib
|
|---|
| 5500 |
|
|---|
| 5501 | You have selected to use OpenInventor driver.
|
|---|
| 5502 | But it was not found in expected place.
|
|---|
| 5503 | Please specify the correct path where OpenInventor is installed in your system.
|
|---|
| 5504 |
|
|---|
| 5505 | You can set '-' (without quotation) to CANCEL the OpenInventor flag at all:
|
|---|
| 5506 |
|
|---|
| 5507 | EOM`
|
|---|
| 5508 |
|
|---|
| 5509 | dflt=""
|
|---|
| 5510 | fn='d~(-)'
|
|---|
| 5511 | rp=$g4message
|
|---|
| 5512 | . ./getfile
|
|---|
| 5513 |
|
|---|
| 5514 | cend="no"
|
|---|
| 5515 | while test "$cend" = "no" ; do
|
|---|
| 5516 | if test -e "$ans/include/Inventor" || [ "X$ans" = "X-" ]; then
|
|---|
| 5517 | cend="yes"
|
|---|
| 5518 | if test "X$ans" != "X-" ; then
|
|---|
| 5519 |
|
|---|
| 5520 | g4vis_oivhome=$ans
|
|---|
| 5521 |
|
|---|
| 5522 | else
|
|---|
| 5523 |
|
|---|
| 5524 | g4vis_build_oiwin32_driver=n
|
|---|
| 5525 | g4vis_use_oiwin32=n
|
|---|
| 5526 |
|
|---|
| 5527 | fi
|
|---|
| 5528 | else
|
|---|
| 5529 |
|
|---|
| 5530 | g4message=`cat << EOM
|
|---|
| 5531 |
|
|---|
| 5532 | OIVHOME/include
|
|---|
| 5533 | OIVHOME/lib
|
|---|
| 5534 |
|
|---|
| 5535 | You have selected to use OpenInventor driver.
|
|---|
| 5536 | But it was not found in $ans.
|
|---|
| 5537 | Please specify the correct path where OpenInventor is installed in your system.
|
|---|
| 5538 |
|
|---|
| 5539 | You can set '-' (without quotation) to CANCEL the OpenInventor flag at all:
|
|---|
| 5540 |
|
|---|
| 5541 | EOM`
|
|---|
| 5542 |
|
|---|
| 5543 | dflt=""
|
|---|
| 5544 | fn='d~(-)'
|
|---|
| 5545 | rp=$g4message
|
|---|
| 5546 | . ./getfile
|
|---|
| 5547 | fi
|
|---|
| 5548 | done
|
|---|
| 5549 | fi
|
|---|
| 5550 |
|
|---|
| 5551 | if test "X$g4osname" = "XLinux"; then
|
|---|
| 5552 |
|
|---|
| 5553 | if test "X$g4vis_oivhome" = "X/usr" -o "X$g4vis_oivhome" = "X/usr/local"; then
|
|---|
| 5554 | g4vis_oivhome=""
|
|---|
| 5555 | fi
|
|---|
| 5556 | fi
|
|---|
| 5557 | fi # g4vis_build_oiwin32_driver
|
|---|
| 5558 |
|
|---|
| 5559 | ###############################################
|
|---|
| 5560 |
|
|---|
| 5561 | fi # if WIN
|
|---|
| 5562 | ################################################################
|
|---|
| 5563 |
|
|---|
| 5564 | if test "X$g4system" != "XWIN32-VC" -a "X$g4system" != "XWIN32-VC7"; then
|
|---|
| 5565 |
|
|---|
| 5566 | g4message=`cat << EOM
|
|---|
| 5567 |
|
|---|
| 5568 | G4VIS_BUILD_DAWNFILE_DRIVER
|
|---|
| 5569 | G4VIS_USE_DAWNFILE
|
|---|
| 5570 |
|
|---|
| 5571 | DAWN drivers are interfaces to Fukui Renderer DAWN. It is a vectorized 3D
|
|---|
| 5572 | PostScript processor, and so well suited to prepare technical high
|
|---|
| 5573 | quality outputs for presentation and/or documentation.
|
|---|
| 5574 | The DAWNFILE driver sends 3D data to DAWN via an intermediate file,
|
|---|
| 5575 | named g4.prim in the current directory. The file g4.prim is able to
|
|---|
| 5576 | be re-visualized later without the help of Geant4.
|
|---|
| 5577 | EOM`
|
|---|
| 5578 |
|
|---|
| 5579 | dflt=$g4vis_use_dawnfile
|
|---|
| 5580 | rp=$g4message
|
|---|
| 5581 | #. ./myread
|
|---|
| 5582 | #gans=$ans
|
|---|
| 5583 | gans=y
|
|---|
| 5584 |
|
|---|
| 5585 | case $gans in
|
|---|
| 5586 |
|
|---|
| 5587 | n*|N*)
|
|---|
| 5588 | g4vis_build_dawnfile_driver=n
|
|---|
| 5589 | g4vis_use_dawnfile=n
|
|---|
| 5590 | ;;
|
|---|
| 5591 | y*|Y*)
|
|---|
| 5592 | g4vis_build_dawnfile_driver=y
|
|---|
| 5593 | g4vis_use_dawnfile=y
|
|---|
| 5594 | ;;
|
|---|
| 5595 | esac
|
|---|
| 5596 |
|
|---|
| 5597 | g4message=`cat << EOM
|
|---|
| 5598 |
|
|---|
| 5599 | G4VIS_BUILD_RAYTRACER_DRIVER
|
|---|
| 5600 | G4VIS_USE_RAYTRACER
|
|---|
| 5601 |
|
|---|
| 5602 | It performs ray-tracing visualization using the tracking routines of Geant4.
|
|---|
| 5603 | It is, therefore, available for debugging tracking routines.
|
|---|
| 5604 | It is well suited for photo-realistic high quality output for
|
|---|
| 5605 | presentation, and for intuitive debugging of detector geometry.
|
|---|
| 5606 | EOM`
|
|---|
| 5607 |
|
|---|
| 5608 | dflt=$g4vis_use_raytracer
|
|---|
| 5609 | rp=$g4message
|
|---|
| 5610 | #. ./myread
|
|---|
| 5611 | #gans=$ans
|
|---|
| 5612 | gans=y
|
|---|
| 5613 |
|
|---|
| 5614 | case $gans in
|
|---|
| 5615 |
|
|---|
| 5616 | n*|N*)
|
|---|
| 5617 | g4vis_build_raytracer_driver=n
|
|---|
| 5618 | g4vis_use_raytracer=n
|
|---|
| 5619 | ;;
|
|---|
| 5620 | y*|Y*)
|
|---|
| 5621 | g4vis_build_raytracer_driver=y
|
|---|
| 5622 | g4vis_use_raytracer=y
|
|---|
| 5623 | ;;
|
|---|
| 5624 | esac
|
|---|
| 5625 |
|
|---|
| 5626 | g4message=`cat << EOM
|
|---|
| 5627 |
|
|---|
| 5628 | G4VIS_BUILD_VRML_DRIVER
|
|---|
| 5629 | G4VIS_USE_VRML
|
|---|
| 5630 |
|
|---|
| 5631 | These driver generate VRML files, which describe 3D scenes to be
|
|---|
| 5632 | visualized with a proper VRML viewer.
|
|---|
| 5633 |
|
|---|
| 5634 | EOM`
|
|---|
| 5635 |
|
|---|
| 5636 | dflt=$g4vis_use_vrml
|
|---|
| 5637 | rp=$g4message
|
|---|
| 5638 | . ./myread
|
|---|
| 5639 | gans=$ans
|
|---|
| 5640 |
|
|---|
| 5641 | case $gans in
|
|---|
| 5642 |
|
|---|
| 5643 | n*|N*)
|
|---|
| 5644 | g4vis_build_vrml_driver=n
|
|---|
| 5645 | g4vis_use_vrml=n
|
|---|
| 5646 | ;;
|
|---|
| 5647 | y*|Y*)
|
|---|
| 5648 | g4vis_build_vrml_driver=y
|
|---|
| 5649 | g4vis_use_vrml=y
|
|---|
| 5650 | ;;
|
|---|
| 5651 | esac
|
|---|
| 5652 |
|
|---|
| 5653 | g4message=`cat << EOM
|
|---|
| 5654 |
|
|---|
| 5655 | G4VIS_BUILD_VRMLFILE_DRIVER
|
|---|
| 5656 | G4VIS_USE_VRMLFILE
|
|---|
| 5657 |
|
|---|
| 5658 | This driver generates VRML files, which describe 3D scenes to be
|
|---|
| 5659 | visualized with a proper VRML viewer, at either a local or a remote host.
|
|---|
| 5660 | The VRMLFILE driver sends 3D data to your VRML viewer, which is running
|
|---|
| 5661 | in the same host machine as Geant4, via an intermediate file named
|
|---|
| 5662 | g4.wrl created in the current directory. This file is available for
|
|---|
| 5663 | re-visualization afterwards. In visualization, you should specify a
|
|---|
| 5664 | name of the VRML viewer by setting the environment variable G4VRML_VIEWER
|
|---|
| 5665 | beforehand.
|
|---|
| 5666 | EOM`
|
|---|
| 5667 |
|
|---|
| 5668 | dflt=$g4vis_use_vrmlfile
|
|---|
| 5669 | rp=$g4message
|
|---|
| 5670 | #. ./myread
|
|---|
| 5671 | #gans=$ans
|
|---|
| 5672 | gans=y
|
|---|
| 5673 |
|
|---|
| 5674 | case $gans in
|
|---|
| 5675 |
|
|---|
| 5676 | n*|N*)
|
|---|
| 5677 | g4vis_build_vrmlfile_driver=n
|
|---|
| 5678 | g4vis_use_vrmlfile=n
|
|---|
| 5679 | ;;
|
|---|
| 5680 | y*|Y*)
|
|---|
| 5681 | g4vis_build_vrmlfile_driver=y
|
|---|
| 5682 | g4vis_use_vrmlfile=y
|
|---|
| 5683 | ;;
|
|---|
| 5684 | esac
|
|---|
| 5685 |
|
|---|
| 5686 | fi # if !WIN
|
|---|
| 5687 |
|
|---|
| 5688 | g4message=`cat << EOM
|
|---|
| 5689 |
|
|---|
| 5690 | G4VIS_BUILD_ASCIITREE_DRIVER
|
|---|
| 5691 | G4VIS_USE_ASCIITREE
|
|---|
| 5692 |
|
|---|
| 5693 | Description????????????????????????
|
|---|
| 5694 | EOM`
|
|---|
| 5695 |
|
|---|
| 5696 | dflt=$g4vis_use_asciitree
|
|---|
| 5697 | rp=$g4message
|
|---|
| 5698 | # Don't ask by default and set to 'y'!
|
|---|
| 5699 | #. ./myread
|
|---|
| 5700 | #gans=$ans
|
|---|
| 5701 | gans=y
|
|---|
| 5702 |
|
|---|
| 5703 | case $gans in
|
|---|
| 5704 |
|
|---|
| 5705 | n*|N*)
|
|---|
| 5706 | g4vis_build_asciitree_driver=n
|
|---|
| 5707 | g4vis_use_asciitree=n
|
|---|
| 5708 | ;;
|
|---|
| 5709 | y*|Y*)
|
|---|
| 5710 | g4vis_build_asciitree_driver=y
|
|---|
| 5711 | g4vis_use_asciitree=y
|
|---|
| 5712 | ;;
|
|---|
| 5713 | esac
|
|---|
| 5714 |
|
|---|
| 5715 |
|
|---|
| 5716 | g4message=`cat << EOM
|
|---|
| 5717 |
|
|---|
| 5718 | G4VIS_BUILD_GAGTREE_DRIVER
|
|---|
| 5719 | G4VIS_USE_GAGTREE
|
|---|
| 5720 |
|
|---|
| 5721 | Description????????????????????????
|
|---|
| 5722 | EOM`
|
|---|
| 5723 |
|
|---|
| 5724 | dflt=$g4vis_use_gagtree
|
|---|
| 5725 | rp=$g4message
|
|---|
| 5726 | # Don't ask by default and set to 'y'!
|
|---|
| 5727 | #. ./myread
|
|---|
| 5728 | #gans=$ans
|
|---|
| 5729 | gans=y
|
|---|
| 5730 |
|
|---|
| 5731 | case $gans in
|
|---|
| 5732 |
|
|---|
| 5733 | n*|N*)
|
|---|
| 5734 | g4vis_build_gagtree_driver=n
|
|---|
| 5735 | g4vis_use_gagtree=n
|
|---|
| 5736 | ;;
|
|---|
| 5737 | y*|Y*)
|
|---|
| 5738 | g4vis_build_gagtree_driver=y
|
|---|
| 5739 | g4vis_use_gagtree=y
|
|---|
| 5740 | ;;
|
|---|
| 5741 | esac
|
|---|
| 5742 |
|
|---|
| 5743 | ;;
|
|---|
| 5744 | esac
|
|---|
| 5745 |
|
|---|
| 5746 | if test "X$g4system" != "XWIN32-VC" -a "X$g4system" != "XWIN32-VC7" -a "X$g4system" != "XDarwin-g++"; then
|
|---|
| 5747 |
|
|---|
| 5748 | #echo PASS1
|
|---|
| 5749 |
|
|---|
| 5750 | if [ X$g4vis_build_openglx_driver = Xy ] || [ X$g4vis_build_openglxm_driver = Xy ] || [ X$g4vis_build_openglwin32_driver = Xy ] ; then
|
|---|
| 5751 |
|
|---|
| 5752 | #echo PASS2
|
|---|
| 5753 |
|
|---|
| 5754 | #####################################################################
|
|---|
| 5755 | ogl_dirs=`find $g4vis_oglhome /usr/X11R6/include /usr/local/include /usr/include -type d -name GL 2>/dev/null|xargs echo`
|
|---|
| 5756 | #echo ogl_dirs=$ogl_dirs
|
|---|
| 5757 |
|
|---|
| 5758 | if test "X$ogl_dirs" != "X" ; then
|
|---|
| 5759 |
|
|---|
| 5760 | g4ogl_base_dir_found=`echo $ogl_dirs|cut -d" " -f1`
|
|---|
| 5761 | #echo g4ogl_base_dir_found=$g4ogl_base_dir_found
|
|---|
| 5762 |
|
|---|
| 5763 | # That's right: should be twice! (e.g./usr/local/lib/libGLU.so -> /usr/local)
|
|---|
| 5764 | g4ogl_base_dir_found=`dirname $g4ogl_base_dir_found`
|
|---|
| 5765 | g4ogl_base_dir_found=`dirname $g4ogl_base_dir_found`
|
|---|
| 5766 |
|
|---|
| 5767 | g4vis_oglhome=$g4ogl_base_dir_found
|
|---|
| 5768 | #else
|
|---|
| 5769 | #case "$g4vis_oglhome" in
|
|---|
| 5770 | #'')
|
|---|
| 5771 | # g4vis_oglhome=/usr
|
|---|
| 5772 | # ;;
|
|---|
| 5773 | #esac
|
|---|
| 5774 | fi
|
|---|
| 5775 |
|
|---|
| 5776 | ##########################################################################
|
|---|
| 5777 | if test "X$g4vis_oglhome" != "X" ; then
|
|---|
| 5778 | ogl_dirs=$g4vis_oglhome
|
|---|
| 5779 | fi
|
|---|
| 5780 |
|
|---|
| 5781 | if test "X$ogl_dirs" != "X" ; then
|
|---|
| 5782 |
|
|---|
| 5783 | g4message=`cat << EOM
|
|---|
| 5784 |
|
|---|
| 5785 | OGLHOME/include
|
|---|
| 5786 | OGLHOME/lib
|
|---|
| 5787 |
|
|---|
| 5788 | You have selected to use OpenGL driver.
|
|---|
| 5789 | Specify the correct path (OGLHOME) where OpenGL is installed in your system.
|
|---|
| 5790 | It was found in $g4vis_oglhome. Press [Enter] to set this path or type the correct one.
|
|---|
| 5791 |
|
|---|
| 5792 | You can set '-' (without quotation) to CANCEL the OpenGL flag at all:
|
|---|
| 5793 |
|
|---|
| 5794 | EOM`
|
|---|
| 5795 |
|
|---|
| 5796 | dflt=$g4vis_oglhome
|
|---|
| 5797 | fn='d~(-)'
|
|---|
| 5798 | rp=$g4message
|
|---|
| 5799 | . ./getfile
|
|---|
| 5800 |
|
|---|
| 5801 | cend="no"
|
|---|
| 5802 | while test "$cend" = "no" ; do
|
|---|
| 5803 | if test -e "$ans/include/GL" || [ "X$ans" = "X-" ]; then
|
|---|
| 5804 | cend="yes"
|
|---|
| 5805 |
|
|---|
| 5806 | if test "X$ans" != "X-" ; then
|
|---|
| 5807 |
|
|---|
| 5808 | g4vis_oglhome=$ans
|
|---|
| 5809 |
|
|---|
| 5810 | else
|
|---|
| 5811 |
|
|---|
| 5812 | g4vis_build_openglx_driver=n
|
|---|
| 5813 | g4vis_use_openglx=n
|
|---|
| 5814 |
|
|---|
| 5815 | g4vis_build_openglxm_driver=n
|
|---|
| 5816 | g4vis_use_openglxm=n
|
|---|
| 5817 |
|
|---|
| 5818 | g4vis_build_openglwin32_driver=n
|
|---|
| 5819 | g4vis_use_openglwin32=n
|
|---|
| 5820 |
|
|---|
| 5821 | fi
|
|---|
| 5822 | else
|
|---|
| 5823 |
|
|---|
| 5824 | g4message=`cat << EOM
|
|---|
| 5825 |
|
|---|
| 5826 | OGLHOME/include
|
|---|
| 5827 | OGLHOME/lib
|
|---|
| 5828 |
|
|---|
| 5829 | You have selected to use OpenGL driver.
|
|---|
| 5830 | But it was not found in $ans.
|
|---|
| 5831 | Please specify the correct path where OpenGL is installed in your system.
|
|---|
| 5832 |
|
|---|
| 5833 | You can set '-' (without quotation) to CANCEL the OpenGL flag at all:
|
|---|
| 5834 |
|
|---|
| 5835 | EOM`
|
|---|
| 5836 |
|
|---|
| 5837 | dflt=""
|
|---|
| 5838 | fn='d~(-)'
|
|---|
| 5839 | rp=$g4message
|
|---|
| 5840 | . ./getfile
|
|---|
| 5841 | fi
|
|---|
| 5842 | done
|
|---|
| 5843 |
|
|---|
| 5844 | else
|
|---|
| 5845 |
|
|---|
| 5846 | g4message=`cat << EOM
|
|---|
| 5847 |
|
|---|
| 5848 | OGLHOME/include
|
|---|
| 5849 | OGLHOME/lib
|
|---|
| 5850 |
|
|---|
| 5851 | You have selected to use OpenGL driver.
|
|---|
| 5852 | But it was not found in expected place.
|
|---|
| 5853 | Please specify the correct path where OpenGL is installed in your system.
|
|---|
| 5854 |
|
|---|
| 5855 | You can set '-' (without quotation) to CANCEL the OpenGL flag at all:
|
|---|
| 5856 |
|
|---|
| 5857 | EOM`
|
|---|
| 5858 |
|
|---|
| 5859 | dflt=""
|
|---|
| 5860 | fn='d~(-)'
|
|---|
| 5861 | rp=$g4message
|
|---|
| 5862 | . ./getfile
|
|---|
| 5863 |
|
|---|
| 5864 | cend="no"
|
|---|
| 5865 | while test "$cend" = "no" ; do
|
|---|
| 5866 | if test -e "$ans/include/GL" || [ "X$ans" = "X-" ]; then
|
|---|
| 5867 | cend="yes"
|
|---|
| 5868 |
|
|---|
| 5869 | if test "X$ans" != "X-" ; then
|
|---|
| 5870 |
|
|---|
| 5871 | g4vis_oglhome=$ans
|
|---|
| 5872 |
|
|---|
| 5873 | else
|
|---|
| 5874 |
|
|---|
| 5875 | g4vis_build_openglx_driver=n
|
|---|
| 5876 | g4vis_use_openglx=n
|
|---|
| 5877 |
|
|---|
| 5878 | g4vis_build_openglxm_driver=n
|
|---|
| 5879 | g4vis_use_openglxm=n
|
|---|
| 5880 |
|
|---|
| 5881 | g4vis_build_openglwin32_driver=n
|
|---|
| 5882 | g4vis_use_openglwin32=n
|
|---|
| 5883 |
|
|---|
| 5884 | fi
|
|---|
| 5885 | else
|
|---|
| 5886 |
|
|---|
| 5887 | g4message=`cat << EOM
|
|---|
| 5888 |
|
|---|
| 5889 | OGLHOME/include
|
|---|
| 5890 | OGLHOME/lib
|
|---|
| 5891 |
|
|---|
| 5892 | You have selected to use OpenGL driver.
|
|---|
| 5893 | But it was not found in $ans.
|
|---|
| 5894 | Please specify the correct path where OpenGL is installed in your system.
|
|---|
| 5895 |
|
|---|
| 5896 | You can set '-' (without quotation) to CANCEL the OpenGL flag at all:
|
|---|
| 5897 |
|
|---|
| 5898 | EOM`
|
|---|
| 5899 |
|
|---|
| 5900 | dflt=""
|
|---|
| 5901 | fn='d~(-)'
|
|---|
| 5902 | rp=$g4message
|
|---|
| 5903 | . ./getfile
|
|---|
| 5904 | fi
|
|---|
| 5905 | done
|
|---|
| 5906 |
|
|---|
| 5907 | fi
|
|---|
| 5908 |
|
|---|
| 5909 | if test "X$g4osname" = "XLinux"; then
|
|---|
| 5910 |
|
|---|
| 5911 | if test "X$g4vis_oglhome" = "X/usr" -o "X$g4vis_oglhome" = "X/usr/local"; then
|
|---|
| 5912 | g4vis_oglhome=""
|
|---|
| 5913 | fi
|
|---|
| 5914 |
|
|---|
| 5915 | fi # if platform (Linux vs SUN)
|
|---|
| 5916 |
|
|---|
| 5917 | fi # if need
|
|---|
| 5918 | ###########################################
|
|---|
| 5919 | fi # if platform (Unix vs Win)
|
|---|
| 5920 |
|
|---|
| 5921 | #
|
|---|
| 5922 | # BEGIN QTVIS/QT PROBE
|
|---|
| 5923 | #
|
|---|
| 5924 |
|
|---|
| 5925 | #
|
|---|
| 5926 | # We only run on a Linux-g++ or Darwin-g++ system
|
|---|
| 5927 | #
|
|---|
| 5928 | if test "x$g4system" = "xLinux-g++" -o "x$g4system" = "xDarwin-g++" ; then
|
|---|
| 5929 |
|
|---|
| 5930 | # Only proceed further if g4vis_none is not set
|
|---|
| 5931 | if test "x$g4vis_none" = "xn" ; then
|
|---|
| 5932 | #Query the user on whether to activate the module
|
|---|
| 5933 | g4message=`cat << EOM
|
|---|
| 5934 |
|
|---|
| 5935 | G4VIS_BUILD_OPENGLQT_DRIVER
|
|---|
| 5936 | G4VIS_USE_OPENGLQT
|
|---|
| 5937 |
|
|---|
| 5938 | Setting these variables will enable the building of the G4 OpenGL Qt based
|
|---|
| 5939 | visualisation driver and the use of this driver in your applications
|
|---|
| 5940 | respectively.
|
|---|
| 5941 | The Qt headers, libraries and binaries are required to enable the
|
|---|
| 5942 | building of this module.
|
|---|
| 5943 | Do you want to enable build and use of this module?
|
|---|
| 5944 | EOM`
|
|---|
| 5945 |
|
|---|
| 5946 | #Read the user response
|
|---|
| 5947 | dflt=$g4vis_build_openglqt_driver
|
|---|
| 5948 | rp=$g4message
|
|---|
| 5949 | . ./myread
|
|---|
| 5950 | gans=$ans
|
|---|
| 5951 |
|
|---|
| 5952 | #
|
|---|
| 5953 | # Check response
|
|---|
| 5954 | #
|
|---|
| 5955 | case $gans in
|
|---|
| 5956 | n*|N*)
|
|---|
| 5957 | g4vis_build_openglqt_driver=n
|
|---|
| 5958 | g4vis_use_openglqt=n
|
|---|
| 5959 | ;;
|
|---|
| 5960 | y*|Y*)
|
|---|
| 5961 | g4vis_build_openglqt_driver=y
|
|---|
| 5962 | g4vis_use_openglqt=y
|
|---|
| 5963 | ;;
|
|---|
| 5964 | esac
|
|---|
| 5965 |
|
|---|
| 5966 | ###################
|
|---|
| 5967 |
|
|---|
| 5968 |
|
|---|
| 5969 |
|
|---|
| 5970 | ####################################################################
|
|---|
| 5971 | # Now, if we have selected to build the driver, we need to check for
|
|---|
| 5972 | # a Qt installation, which may have been done for use by the UI
|
|---|
| 5973 | # module...
|
|---|
| 5974 | #
|
|---|
| 5975 | if test "x$g4vis_build_openglqt_driver" = "xy" ; then
|
|---|
| 5976 |
|
|---|
| 5977 | #Now check whether g4_qthome has been set previously - if it hasn't
|
|---|
| 5978 | #proceed to probe for Qt... (assume it's unfiltered, i.e. not
|
|---|
| 5979 | #set to '' by earlier probe if it was /usr or /usr/local
|
|---|
| 5980 | if test "x$g4_qtmochome" != "x" && test "x$g4_qtlibdir" != "x" && test "x$g4_qtincdir" != "x" ; then
|
|---|
| 5981 | echo " "
|
|---|
| 5982 | echo "configure: Qt preconfigured, no recheck neccessary"
|
|---|
| 5983 | else
|
|---|
| 5984 | #################################################################
|
|---|
| 5985 | #We repeat the search used for the UI module
|
|---|
| 5986 |
|
|---|
| 5987 | echo " "
|
|---|
| 5988 | g4_havegoodqt=no
|
|---|
| 5989 |
|
|---|
| 5990 | # Look for qt4 moc
|
|---|
| 5991 | g4_qtmochome=`./loc moc no $QTDIR/bin /usr/lib/qt4/bin /usr/lib/qt/bin /usr/local/qt/bin /usr/local/bin /usr/bin /bin /usr/share/qt4/bin /usr/X11R6/bin /sw/bin`
|
|---|
| 5992 | if test "x$g4_qtmochome" = "xno" ; then
|
|---|
| 5993 | # Look for qt3 moc
|
|---|
| 5994 | g4_qtmochome=`./loc moc no /usr/lib/qt3/bin /usr/share/qt3/bin`
|
|---|
| 5995 | fi
|
|---|
| 5996 |
|
|---|
| 5997 | # if not found
|
|---|
| 5998 | if test "x$g4_qtmochome" = "xno" ; then
|
|---|
| 5999 | g4_havegoodqt=no
|
|---|
| 6000 | else
|
|---|
| 6001 | # check Qt version
|
|---|
| 6002 | g4_qtver=`$g4_qtmochome 2>&1 -v | $sed 's/.* .Qt \([0-9]\)\..*/\1/' `
|
|---|
| 6003 | echo "checking Qt version... $g4_qtver"
|
|---|
| 6004 | if test "x$g4_qtver" = "x2";then
|
|---|
| 6005 | echo "Qt $g4_qtver is too old to work with this driver"
|
|---|
| 6006 | g4_havegoodqt=no
|
|---|
| 6007 | fi
|
|---|
| 6008 | if test "x$g4_qtver" = "x5";then
|
|---|
| 6009 | echo "Qt $g4_qtver is not actually support with this driver"
|
|---|
| 6010 | g4_havegoodqt=no
|
|---|
| 6011 | else
|
|---|
| 6012 |
|
|---|
| 6013 |
|
|---|
| 6014 | # checking includes
|
|---|
| 6015 |
|
|---|
| 6016 | incQtFiles=" $QTDIR/include /usr/lib/qt$g4_qtver/include /usr/include/qt$g4_qtver /usr/X11R6/include /sw/include/qt /usr/include/qt$g4_qtver /usr/share/qt$g4_qtver/include /usr/X11R6/include/qt$g4_qtver /usr/lib/qt/include /usr/local/qt/include /usr/local/include /usr/include /usr/include/qt /usr/X11R6/include/qt"
|
|---|
| 6017 |
|
|---|
| 6018 | if test "X$g4osname" = "XDarwin" ; then
|
|---|
| 6019 | if test "X$g4_qtver" = "X3" ; then
|
|---|
| 6020 | g4_qtincdir=`./loc qglobal.h no $incQtFiles`
|
|---|
| 6021 | else
|
|---|
| 6022 | g4_qtincdir=`./loc qglobal.h no /Library/Frameworks/QtCore.framework/Headers/ $incFiles`
|
|---|
| 6023 | if test "x$g4_qtincdir" != "xno" ; then
|
|---|
| 6024 | g4_qtincdir="/Library/Frameworks/"
|
|---|
| 6025 | fi
|
|---|
| 6026 | fi
|
|---|
| 6027 | else
|
|---|
| 6028 | g4_qtincdir=`./loc qglobal.h no $incFiles`
|
|---|
| 6029 | fi #END CHECK QTLIBS
|
|---|
| 6030 |
|
|---|
| 6031 |
|
|---|
| 6032 | if test "x$g4_qtincdir" != "xno" ; then
|
|---|
| 6033 | if test "x$g4_qtincdir" != "x/Library/Frameworks/" ; then
|
|---|
| 6034 | g4_qtincdir=`dirname $g4_qtincdir`
|
|---|
| 6035 | fi
|
|---|
| 6036 | echo "checking Qt includes dir in... $g4_qtincdir"
|
|---|
| 6037 |
|
|---|
| 6038 |
|
|---|
| 6039 | # checking libs
|
|---|
| 6040 |
|
|---|
| 6041 | libQtFiles="$QTDIR/lib /usr/lib/qt$g4_qtver/lib /usr/lib/qt$g4_qtver /usr/lib/qt$g4_qtver /sw/lib/qt$g4_qtver /sw/lib/qt$g4_qtver/lib /usr/share/qt$g4_qtver/lib /usr/X11R6/lib/qt /usr/X11R6/lib/qt$g4_qtver /usr/lib/qt$g4_qtver/lib64 $QTDIR/lib64 /usr/lib/qt/lib /usr/local/qt/lib /usr/local/lib /usr/lib /usr/lib/qt /usr/X11R6/lib /usr/X11R6/lib/qt $QTDIR/lib64"
|
|---|
| 6042 |
|
|---|
| 6043 | if test "X$g4osname" = "XDarwin" ; then
|
|---|
| 6044 | if test "X$g4_qtincdir" = "X/Library/Frameworks/" ; then
|
|---|
| 6045 | g4_qtlibdir="/Library/Frameworks/"
|
|---|
| 6046 | else
|
|---|
| 6047 | g4_qtlibdir=`./loc libqt* no $libQtFiles /sw/lib /sw/lib/qt`
|
|---|
| 6048 | fi
|
|---|
| 6049 | else
|
|---|
| 6050 | g4_qtlibdir=`./loc libqt* no $libQtFiles`
|
|---|
| 6051 | fi
|
|---|
| 6052 | if test "x$g4_qtlibdir" != "xno" ; then
|
|---|
| 6053 | if test "x$g4_qtlibdir" != "x/Library/Frameworks/" ; then
|
|---|
| 6054 | g4_qtlibdir=`dirname $g4_qtlibdir`
|
|---|
| 6055 | fi
|
|---|
| 6056 | echo "checking Qt lib dir in... $g4_qtlibdir"
|
|---|
| 6057 | g4_havegoodqt=yes
|
|---|
| 6058 | fi
|
|---|
| 6059 | fi #END CHECK QTLIBS
|
|---|
| 6060 | fi #END CHECK QTINC
|
|---|
| 6061 | fi #END CHECK QTVER
|
|---|
| 6062 | #
|
|---|
| 6063 | # END QT AUTOPROBE
|
|---|
| 6064 | ####################################################################
|
|---|
| 6065 |
|
|---|
| 6066 |
|
|---|
| 6067 | # Based on result of Qt autoprobe, we decide if user input is
|
|---|
| 6068 | # needed to locate Qt...
|
|---|
| 6069 | #
|
|---|
| 6070 | if test "x$g4_havegoodqt" = "xno" ; then
|
|---|
| 6071 | promptend="no"
|
|---|
| 6072 | qthomeloc="the standard locations"
|
|---|
| 6073 |
|
|---|
| 6074 | while test "x$promptend" = "xno" ; do
|
|---|
| 6075 | g4message=`cat << EOM
|
|---|
| 6076 |
|
|---|
| 6077 | Autodetection failed to locate Qt in $qthomeloc on your system.
|
|---|
| 6078 | Please enter the path to your Qt install (i.e. if Qt is installed
|
|---|
| 6079 | in PATH/include/Qt, or PATH/include, enter PATH), or type '-' to
|
|---|
| 6080 | CANCEL the build of the Qt UI module.
|
|---|
| 6081 | Qt path:
|
|---|
| 6082 | EOM`
|
|---|
| 6083 | dflt="/usr"
|
|---|
| 6084 | fn='d~(-)'
|
|---|
| 6085 | rp=$g4message
|
|---|
| 6086 | . ./getfile
|
|---|
| 6087 |
|
|---|
| 6088 | #Check for user cancellation
|
|---|
| 6089 | if test "x$ans" = "x-" ; then
|
|---|
| 6090 | g4ui_build_qt_session=n
|
|---|
| 6091 | g4ui_use_qt=n
|
|---|
| 6092 | g4_qthome=""
|
|---|
| 6093 | echo "build/use of OpenGl Qt driver cancelled..."
|
|---|
| 6094 | promptend=yes
|
|---|
| 6095 |
|
|---|
| 6096 | else
|
|---|
| 6097 | #We want to probe for Qt in the user supplied directory
|
|---|
| 6098 | echo " "
|
|---|
| 6099 | qthomeloc=$ans
|
|---|
| 6100 | g4_havegoodqt=no
|
|---|
| 6101 | g4_qthome=`./loc qglobal.h no $ans/include/Qt $ans/include`
|
|---|
| 6102 |
|
|---|
| 6103 | echo "checking for Qt installation... $g4_qthome"
|
|---|
| 6104 |
|
|---|
| 6105 | #If we found an installation, proceed to other tests.
|
|---|
| 6106 | if test "x$g4_qthome" != "xno" ; then
|
|---|
| 6107 | #Set Qt installation to good at this point
|
|---|
| 6108 | g4_havegoodqt=yes
|
|---|
| 6109 |
|
|---|
| 6110 | #Check that this is Qt...
|
|---|
| 6111 | g4_qtver=`$grep QT_VERSION_STR $g4_qthome | $sed 's/.* \"\([0-9]\)\..*\"/\1/'`
|
|---|
| 6112 |
|
|---|
| 6113 | echo "checking Qt version... $g4_qtver"
|
|---|
| 6114 |
|
|---|
| 6115 | #Now strip qthome back so we can check for moc...
|
|---|
| 6116 | g4_qthome=`dirname $g4_qthome`
|
|---|
| 6117 |
|
|---|
| 6118 | #At this point we could have include/Qt
|
|---|
| 6119 | #or include
|
|---|
| 6120 | if test `basename $g4_qthome` = "Qt" ; then
|
|---|
| 6121 | g4_qthome=`dirname $g4_qthome`
|
|---|
| 6122 | g4_qthome=`dirname $g4_qthome`
|
|---|
| 6123 | else
|
|---|
| 6124 | g4_qthome=`dirname $g4_qthome`
|
|---|
| 6125 | fi
|
|---|
| 6126 |
|
|---|
| 6127 | #If version is o.k, check for moc
|
|---|
| 6128 | if test "x$g4_qtver" = "x4" ; then
|
|---|
| 6129 | #Check for moc
|
|---|
| 6130 | g4_qthavemoc=`./loc moc no $g4_qthome/bin`
|
|---|
| 6131 |
|
|---|
| 6132 | echo "checking for moc... $g4_qthavemoc"
|
|---|
| 6133 |
|
|---|
| 6134 | if test "x$g4_qthavemoc" = "xno" ; then
|
|---|
| 6135 | g4_havegoodqt=no
|
|---|
| 6136 | fi
|
|---|
| 6137 | else
|
|---|
| 6138 | g4_havegoodqt=no
|
|---|
| 6139 | fi #END CHECK Qt VERSION
|
|---|
| 6140 | fi #END CHECK QTHOME
|
|---|
| 6141 |
|
|---|
| 6142 | #If we have a good Qt, end prompt
|
|---|
| 6143 | if test "x$g4_havegoodqt" = "xyes" ; then
|
|---|
| 6144 | promptend=yes
|
|---|
| 6145 | fi
|
|---|
| 6146 | fi #END CHECK USER CANCELLATION
|
|---|
| 6147 | done #END USER PROMPT FOR QT DETECTION
|
|---|
| 6148 |
|
|---|
| 6149 | fi #END USER DIRECTED QT DETECTION
|
|---|
| 6150 | #
|
|---|
| 6151 | #END QT USER INPUT PROBE
|
|---|
| 6152 | #################################################################
|
|---|
| 6153 | fi #END TEST G4_QTHOME IS SET
|
|---|
| 6154 |
|
|---|
| 6155 |
|
|---|
| 6156 | fi #END TEST G4VIS_BUILD_OPENGLQT_DRIVER = y
|
|---|
| 6157 |
|
|---|
| 6158 |
|
|---|
| 6159 | #
|
|---|
| 6160 | # Put a filter in here on /usr and /usr/local as QTHOME in line
|
|---|
| 6161 | # with other paths - done here as this is the last place QT is
|
|---|
| 6162 | # checked for
|
|---|
| 6163 | #DEACTIVATED AT PRESENT BECAUSE OF USE OF MOC
|
|---|
| 6164 | #
|
|---|
| 6165 | #if test "x$g4_qthome" = "x/usr" -o "x$g4_qthome" = "x/usr/local" ; then
|
|---|
| 6166 | # g4_qthome=""
|
|---|
| 6167 | #fi
|
|---|
| 6168 |
|
|---|
| 6169 |
|
|---|
| 6170 | fi #END TEST G4VIS_NONE IS N
|
|---|
| 6171 |
|
|---|
| 6172 | fi #END TEST G4SYSTEM IS Linux-g++ OR Darwin-g++
|
|---|
| 6173 |
|
|---|
| 6174 | #
|
|---|
| 6175 | # END OF QTVIS/QT PROBE
|
|---|
| 6176 |
|
|---|
| 6177 | #
|
|---|
| 6178 | # BEGIN GDML/XERCESC PROBE
|
|---|
| 6179 | #
|
|---|
| 6180 |
|
|---|
| 6181 | # Set default build option to no
|
|---|
| 6182 | echo " "
|
|---|
| 6183 | case "$g4lib_build_gdml" in
|
|---|
| 6184 | '')
|
|---|
| 6185 | g4lib_build_gdml=n
|
|---|
| 6186 | ;;
|
|---|
| 6187 | esac
|
|---|
| 6188 |
|
|---|
| 6189 |
|
|---|
| 6190 | # Now query the user to see if they want to build the GDML plugin
|
|---|
| 6191 | echo ""
|
|---|
| 6192 |
|
|---|
| 6193 | g4message=`cat << EOM
|
|---|
| 6194 |
|
|---|
| 6195 | G4LIB_BUILD_GDML
|
|---|
| 6196 |
|
|---|
| 6197 | Setting this variable will enable building of the GDML plugin module embedded
|
|---|
| 6198 | in Geant4 for detector description persistency.
|
|---|
| 6199 | It requires your system to have the XercesC library and headers installed.
|
|---|
| 6200 | Do you want to set this variable?
|
|---|
| 6201 |
|
|---|
| 6202 | EOM`
|
|---|
| 6203 |
|
|---|
| 6204 | #
|
|---|
| 6205 | # read in the users response
|
|---|
| 6206 | #
|
|---|
| 6207 | dflt=$g4lib_build_gdml
|
|---|
| 6208 | rp=$g4message
|
|---|
| 6209 | . ./myread
|
|---|
| 6210 | gans=$ans
|
|---|
| 6211 |
|
|---|
| 6212 | #
|
|---|
| 6213 | # Check response
|
|---|
| 6214 | #
|
|---|
| 6215 | case $gans in
|
|---|
| 6216 | n*|N*)
|
|---|
| 6217 | g4lib_build_gdml=n
|
|---|
| 6218 | ;;
|
|---|
| 6219 | y*|Y*)
|
|---|
| 6220 | g4lib_build_gdml=y
|
|---|
| 6221 | ;;
|
|---|
| 6222 | esac
|
|---|
| 6223 |
|
|---|
| 6224 |
|
|---|
| 6225 | #
|
|---|
| 6226 | # If user does want to build GDML plugin, now try to locate Xerces install
|
|---|
| 6227 | #
|
|---|
| 6228 | if test "X$g4lib_build_gdml" != "Xn"; then
|
|---|
| 6229 |
|
|---|
| 6230 | if test "X$g4gdml_xercesc_root" = "X"; then
|
|---|
| 6231 | #probe for Xerces, using example from UI and Vis
|
|---|
| 6232 | xercesc_root=`find $g4gdml_xercesc_root /usr/include /usr/local/include \
|
|---|
| 6233 | /opt/local/include /sw/include -type d -name xercesc 2>/dev/null | xargs echo`
|
|---|
| 6234 |
|
|---|
| 6235 | #If we got something, strip off the include/xerces part
|
|---|
| 6236 | if test "X$xercesc_root" != "X"; then
|
|---|
| 6237 | g4gdml_xercesc_root=`dirname $xercesc_root`
|
|---|
| 6238 | g4gdml_xercesc_root=`dirname $g4gdml_xercesc_root`
|
|---|
| 6239 |
|
|---|
| 6240 | echo " "
|
|---|
| 6241 | echo "checking for XercesC install... $g4gdml_xercesc_root"
|
|---|
| 6242 | else
|
|---|
| 6243 | g4gdml_xercesc_root=""
|
|---|
| 6244 | echo " "
|
|---|
| 6245 | echo "checking for XercesC install... no"
|
|---|
| 6246 | fi
|
|---|
| 6247 | fi #END OF XERCES AUTOPROBE
|
|---|
| 6248 |
|
|---|
| 6249 | #
|
|---|
| 6250 | # If the autoprobe failed, prompt the user to enter the path to the Xerces
|
|---|
| 6251 | # install
|
|---|
| 6252 | #
|
|---|
| 6253 | if test "X$g4gdml_xercesc_root" = "X"; then
|
|---|
| 6254 |
|
|---|
| 6255 | promptend="no"
|
|---|
| 6256 | xercesloc="the standard locations"
|
|---|
| 6257 |
|
|---|
| 6258 | while test "$promptend" = "no"; do
|
|---|
| 6259 | g4message=`cat << EOM
|
|---|
| 6260 |
|
|---|
| 6261 | Autodetection failed to locate XercesC in $xercesloc on your system.
|
|---|
| 6262 | Please enter the path to your XercesC install (i.e. if XercesC is installed
|
|---|
| 6263 | in PATH/include/xercesc, enter PATH), or type '-' to CANCEL the build of the
|
|---|
| 6264 | GDML module.
|
|---|
| 6265 | XercesC path:
|
|---|
| 6266 | EOM`
|
|---|
| 6267 |
|
|---|
| 6268 | dflt=$g4gdml_xercesc_root
|
|---|
| 6269 | fn='d~(-)'
|
|---|
| 6270 | rp=$g4message
|
|---|
| 6271 | . ./getfile
|
|---|
| 6272 |
|
|---|
| 6273 | #check for user cancellation
|
|---|
| 6274 | if test "X$ans" = "X-"; then
|
|---|
| 6275 | g4lib_build_gdml=n
|
|---|
| 6276 | g4gdml_xercesc_root=""
|
|---|
| 6277 | echo "G4LIB_BUILD_GDML cancelled..."
|
|---|
| 6278 | promptend=yes
|
|---|
| 6279 | else
|
|---|
| 6280 | if test -r "$ans/include/xercesc"; then
|
|---|
| 6281 | g4gdml_xercesc_root=$ans
|
|---|
| 6282 | echo "checking for XercesC install... $g4gdml_xercesc_root"
|
|---|
| 6283 | promptend=yes
|
|---|
| 6284 | else
|
|---|
| 6285 | xercesloc=$ans
|
|---|
| 6286 | echo "checking for Xercesc install... no"
|
|---|
| 6287 | fi
|
|---|
| 6288 | fi #END OF USER INPUT CHECKING
|
|---|
| 6289 | done #END OF WHILE LOOP OVER USER INPUT
|
|---|
| 6290 | fi #END OF USER INPUT SECTION
|
|---|
| 6291 |
|
|---|
| 6292 | #
|
|---|
| 6293 | # If a filter on g4gdml_xerces_root is needed to remove common system paths
|
|---|
| 6294 | # then it should be put here...
|
|---|
| 6295 | #
|
|---|
| 6296 | if test "x$g4gdml_xercesc_root" = "x/usr" -o "x$g4gdml_xercesc_root" = "x/usr/local" ; then
|
|---|
| 6297 | g4gdml_xercesc_root=""
|
|---|
| 6298 | fi
|
|---|
| 6299 |
|
|---|
| 6300 | fi #END XERCES PROBE
|
|---|
| 6301 |
|
|---|
| 6302 | #END OF GDML/XERCES PROBE
|
|---|
| 6303 |
|
|---|
| 6304 | echo " "
|
|---|
| 6305 |
|
|---|
| 6306 | case "$g4make" in
|
|---|
| 6307 | '')
|
|---|
| 6308 | g4make=gmake
|
|---|
| 6309 | ;;
|
|---|
| 6310 | esac
|
|---|
| 6311 |
|
|---|
| 6312 | echo ""
|
|---|
| 6313 |
|
|---|
| 6314 | g4_gmake_version=`(gmake -v) 2>/dev/null`
|
|---|
| 6315 | case $g4_gmake_version in
|
|---|
| 6316 | GNU*)
|
|---|
| 6317 | g4_gmake=y
|
|---|
| 6318 | ;;
|
|---|
| 6319 | *)
|
|---|
| 6320 | g4_gmake=n
|
|---|
| 6321 | ;;
|
|---|
| 6322 | esac
|
|---|
| 6323 |
|
|---|
| 6324 | g4_make_version=`(make -v) 2>/dev/null`
|
|---|
| 6325 | case $g4_make_version in
|
|---|
| 6326 | GNU*)
|
|---|
| 6327 | g4_make=y
|
|---|
| 6328 | ;;
|
|---|
| 6329 | *)
|
|---|
| 6330 | g4_make=n
|
|---|
| 6331 | ;;
|
|---|
| 6332 | esac
|
|---|
| 6333 |
|
|---|
| 6334 | if [ $g4_gmake = y ] ; then
|
|---|
| 6335 |
|
|---|
| 6336 | g4make=gmake
|
|---|
| 6337 |
|
|---|
| 6338 | g4message=`cat << EOM
|
|---|
| 6339 |
|
|---|
| 6340 | G4MAKE
|
|---|
| 6341 |
|
|---|
| 6342 | You have GNU make which could be used to build GEANT4.
|
|---|
| 6343 | You can select your own 'make' program if you want.
|
|---|
| 6344 | EOM`
|
|---|
| 6345 |
|
|---|
| 6346 | fi
|
|---|
| 6347 |
|
|---|
| 6348 | if [ $g4_gmake = n ] && [ $g4_make = y ] ; then
|
|---|
| 6349 |
|
|---|
| 6350 | g4make=make
|
|---|
| 6351 |
|
|---|
| 6352 | g4message=`cat << EOM
|
|---|
| 6353 |
|
|---|
| 6354 | G4MAKE
|
|---|
| 6355 |
|
|---|
| 6356 | You have GNU make which could be used to build GEANT4.
|
|---|
| 6357 | You can select your own 'make' program if you want.
|
|---|
| 6358 | EOM`
|
|---|
| 6359 |
|
|---|
| 6360 | fi
|
|---|
| 6361 |
|
|---|
| 6362 | if [ $g4_gmake = n ] && [ $g4_make = n ] ; then
|
|---|
| 6363 |
|
|---|
| 6364 | g4make=none
|
|---|
| 6365 |
|
|---|
| 6366 | g4message=`cat << EOM
|
|---|
| 6367 |
|
|---|
| 6368 | G4MAKE
|
|---|
| 6369 |
|
|---|
| 6370 | You have NO GNU make which could be used to build GEANT4.
|
|---|
| 6371 | Please select your own 'make' program compatible with GNU make.
|
|---|
| 6372 | EOM`
|
|---|
| 6373 |
|
|---|
| 6374 | dflt=$g4make
|
|---|
| 6375 | rp=$g4message
|
|---|
| 6376 |
|
|---|
| 6377 |
|
|---|
| 6378 | . ./myread
|
|---|
| 6379 | gans=$ans
|
|---|
| 6380 |
|
|---|
| 6381 | case $gans in
|
|---|
| 6382 |
|
|---|
| 6383 | '')
|
|---|
| 6384 | g4make=$dflt
|
|---|
| 6385 | ;;
|
|---|
| 6386 | *)
|
|---|
| 6387 | g4make=$gans
|
|---|
| 6388 | ;;
|
|---|
| 6389 | esac
|
|---|
| 6390 |
|
|---|
| 6391 | fi
|
|---|
| 6392 |
|
|---|
| 6393 |
|
|---|
| 6394 |
|
|---|
| 6395 |
|
|---|
| 6396 | echo " "
|
|---|
| 6397 | case "$g4wlib_build_g3tog4" in
|
|---|
| 6398 | '')
|
|---|
| 6399 | g4wlib_build_g3tog4=n
|
|---|
| 6400 | ;;
|
|---|
| 6401 | esac
|
|---|
| 6402 |
|
|---|
| 6403 | case "$g4w_use_g3tog4" in
|
|---|
| 6404 | '')
|
|---|
| 6405 | g4w_use_g3tog4=n
|
|---|
| 6406 | ;;
|
|---|
| 6407 | esac
|
|---|
| 6408 |
|
|---|
| 6409 | echo ""
|
|---|
| 6410 |
|
|---|
| 6411 | g4message=`cat << EOM
|
|---|
| 6412 |
|
|---|
| 6413 | G4LIB_BUILD_G3TOG4
|
|---|
| 6414 |
|
|---|
| 6415 | The utility module 'g3tog4' will be built by setting this
|
|---|
| 6416 | variable. NOTE: it requires a valid FORTRAN compiler to be
|
|---|
| 6417 | installed on your system and the 'cernlib' command in the
|
|---|
| 6418 | path, in order to build the ancillary tools!
|
|---|
| 6419 | Do you want to build 'g3tog4' ?
|
|---|
| 6420 |
|
|---|
| 6421 | EOM`
|
|---|
| 6422 |
|
|---|
| 6423 | dflt=$g4wlib_build_g3tog4
|
|---|
| 6424 | rp=$g4message
|
|---|
| 6425 | . ./myread
|
|---|
| 6426 | gans=$ans
|
|---|
| 6427 |
|
|---|
| 6428 | case $gans in
|
|---|
| 6429 |
|
|---|
| 6430 | n*|N*)
|
|---|
| 6431 | g4wlib_build_g3tog4=n
|
|---|
| 6432 | g4w_use_g3tog4=n
|
|---|
| 6433 | ;;
|
|---|
| 6434 | y*|Y*)
|
|---|
| 6435 | g4wlib_build_g3tog4=y
|
|---|
| 6436 | g4w_use_g3tog4=y
|
|---|
| 6437 | ;;
|
|---|
| 6438 | esac
|
|---|
| 6439 |
|
|---|
| 6440 |
|
|---|
| 6441 | echo " "
|
|---|
| 6442 | case "$g4wlib_build_zlib" in
|
|---|
| 6443 | '')
|
|---|
| 6444 | g4wlib_build_zlib=n
|
|---|
| 6445 | ;;
|
|---|
| 6446 | esac
|
|---|
| 6447 |
|
|---|
| 6448 | case "$g4w_use_zlib" in
|
|---|
| 6449 | '')
|
|---|
| 6450 | g4w_use_zlib=n
|
|---|
| 6451 | ;;
|
|---|
| 6452 | esac
|
|---|
| 6453 |
|
|---|
| 6454 | echo ""
|
|---|
| 6455 |
|
|---|
| 6456 | g4message=`cat << EOM
|
|---|
| 6457 |
|
|---|
| 6458 | G4LIB_BUILD_ZLIB
|
|---|
| 6459 |
|
|---|
| 6460 | Do you want to activate compression for output files
|
|---|
| 6461 | generated by the HepRep visualization driver?
|
|---|
| 6462 |
|
|---|
| 6463 | EOM`
|
|---|
| 6464 |
|
|---|
| 6465 | dflt=$g4wlib_build_zlib
|
|---|
| 6466 | rp=$g4message
|
|---|
| 6467 | . ./myread
|
|---|
| 6468 | gans=$ans
|
|---|
| 6469 |
|
|---|
| 6470 | case $gans in
|
|---|
| 6471 |
|
|---|
| 6472 | n*|N*)
|
|---|
| 6473 | g4wlib_build_zlib=n
|
|---|
| 6474 | g4w_use_zlib=n
|
|---|
| 6475 | ;;
|
|---|
| 6476 | y*|Y*)
|
|---|
| 6477 | g4wlib_build_zlib=y
|
|---|
| 6478 | g4w_use_zlib=y
|
|---|
| 6479 | ;;
|
|---|
| 6480 | esac
|
|---|
| 6481 |
|
|---|
| 6482 |
|
|---|
| 6483 | echo " "
|
|---|
| 6484 |
|
|---|
| 6485 | case "$g4wanalysis_use" in
|
|---|
| 6486 | '')
|
|---|
| 6487 | g4wanalysis_use=n
|
|---|
| 6488 | ;;
|
|---|
| 6489 | esac
|
|---|
| 6490 |
|
|---|
| 6491 | echo ""
|
|---|
| 6492 |
|
|---|
| 6493 | g4message=`cat << EOM
|
|---|
| 6494 |
|
|---|
| 6495 | G4ANALYSIS_USE
|
|---|
| 6496 |
|
|---|
| 6497 | Activates the configuration setup for allowing plugins to
|
|---|
| 6498 | analysis tools based on AIDA (Astract Interfaces for Data
|
|---|
| 6499 | Analysis). In order to use AIDA features and compliant analysis
|
|---|
| 6500 | tools, the proper environment for these tools will have to be
|
|---|
| 6501 | set (see documentation for the specific analysis tools).
|
|---|
| 6502 | EOM`
|
|---|
| 6503 |
|
|---|
| 6504 | dflt=$g4wanalysis_use
|
|---|
| 6505 | rp=$g4message
|
|---|
| 6506 | . ./myread
|
|---|
| 6507 | gans=$ans
|
|---|
| 6508 |
|
|---|
| 6509 | case $gans in
|
|---|
| 6510 |
|
|---|
| 6511 | n*|N*)
|
|---|
| 6512 | g4wanalysis_use=n
|
|---|
| 6513 | ;;
|
|---|
| 6514 | y*|Y*)
|
|---|
| 6515 | g4wanalysis_use=y
|
|---|
| 6516 | ;;
|
|---|
| 6517 | esac
|
|---|
| 6518 |
|
|---|
| 6519 |
|
|---|
| 6520 | : end of configuration questions
|
|---|
| 6521 | echo " "
|
|---|
| 6522 | echo "End of configuration phase."
|
|---|
| 6523 | echo " "
|
|---|
| 6524 |
|
|---|
| 6525 | : back to where it started
|
|---|
| 6526 | if test -d ../../.config/UU; then
|
|---|
| 6527 | cd ../..
|
|---|
| 6528 | fi
|
|---|
| 6529 |
|
|---|
| 6530 | : configuration may be patched via a 'config.over' file
|
|---|
| 6531 | if $test -f config.over; then
|
|---|
| 6532 | echo " "
|
|---|
| 6533 | dflt=y
|
|---|
| 6534 | rp='A config.over file exists. Do you wish to load it?'
|
|---|
| 6535 | . .config/UU/myread
|
|---|
| 6536 | case "$ans" in
|
|---|
| 6537 | n*) echo "OK, I'll ignore it.";;
|
|---|
| 6538 | *) . ./config.over
|
|---|
| 6539 | echo "Configuration settings have been loaded."
|
|---|
| 6540 | ;;
|
|---|
| 6541 | esac
|
|---|
| 6542 | fi
|
|---|
| 6543 |
|
|---|
| 6544 | : in case they want portability, strip down executable paths
|
|---|
| 6545 | case "$d_portable" in
|
|---|
| 6546 | "$define")
|
|---|
| 6547 | echo " "
|
|---|
| 6548 | echo "Stripping down executable paths..." >&4
|
|---|
| 6549 | for file in $loclist $trylist; do
|
|---|
| 6550 | eval $file="\$file"
|
|---|
| 6551 | done
|
|---|
| 6552 | ;;
|
|---|
| 6553 | esac
|
|---|
| 6554 |
|
|---|
| 6555 | : create config.sh file
|
|---|
| 6556 | echo " "
|
|---|
| 6557 | echo "Creating configuration setup file..." >&4
|
|---|
| 6558 | mkdir -p $g4conf
|
|---|
| 6559 | $spitshell <<EOT > $g4conf/config.sh
|
|---|
| 6560 | $startsh
|
|---|
| 6561 | #
|
|---|
| 6562 | # This file was produced by running the Configure script. It holds all the
|
|---|
| 6563 | # definitions figured out by Configure. Should you modify one of these values,
|
|---|
| 6564 | # do not forget to propagate your changes by running "Configure -der". You may
|
|---|
| 6565 | # instead choose to run each of the .SH files by yourself, or "Configure -S".
|
|---|
| 6566 | #
|
|---|
| 6567 |
|
|---|
| 6568 | # Package name : $package
|
|---|
| 6569 | # Source directory : $src
|
|---|
| 6570 | # Configuration time: $cf_time
|
|---|
| 6571 | # Configured by : $cf_by
|
|---|
| 6572 | # Target system : $myuname
|
|---|
| 6573 |
|
|---|
| 6574 | Author='$Author'
|
|---|
| 6575 | Date='$Date'
|
|---|
| 6576 | Header='$Header'
|
|---|
| 6577 | Id='$Id'
|
|---|
| 6578 | Locker='$Locker'
|
|---|
| 6579 | Log='$Log'
|
|---|
| 6580 | RCSfile='$RCSfile'
|
|---|
| 6581 | Revision='$Revision'
|
|---|
| 6582 | Source='$Source'
|
|---|
| 6583 | State='$State'
|
|---|
| 6584 | c='$c'
|
|---|
| 6585 | cf_by='$cf_by'
|
|---|
| 6586 | cf_time='$cf_time'
|
|---|
| 6587 | contains='$contains'
|
|---|
| 6588 | d_portable='$d_portable'
|
|---|
| 6589 | eunicefix='$eunicefix'
|
|---|
| 6590 | g4_gmake='$g4_gmake'
|
|---|
| 6591 | g4_gmake_version='$g4_gmake_version'
|
|---|
| 6592 | g4_make='$g4_make'
|
|---|
| 6593 | g4_make_version='$g4_make_version'
|
|---|
| 6594 | g4_qtmochome='$g4_qtmochome'
|
|---|
| 6595 | g4_qtincdir='$g4_qtincdir'
|
|---|
| 6596 | g4_qtlibdir='$g4_qtlibdir'
|
|---|
| 6597 | g4abladata='$g4abladata'
|
|---|
| 6598 | g4base='$g4base'
|
|---|
| 6599 | g4bin='$g4bin'
|
|---|
| 6600 | g4clhep_base_dir='$g4clhep_base_dir'
|
|---|
| 6601 | g4clhep_include_dir='$g4clhep_include_dir'
|
|---|
| 6602 | g4clhep_lib='$g4clhep_lib'
|
|---|
| 6603 | g4clhep_lib_dir='$g4clhep_lib_dir'
|
|---|
| 6604 | g4compiler='$g4compiler'
|
|---|
| 6605 | g4conf='$g4conf'
|
|---|
| 6606 | g4data='$g4data'
|
|---|
| 6607 | g4debug='$g4debug'
|
|---|
| 6608 | g4elasticdata='$g4elasticdata'
|
|---|
| 6609 | g4final_install='$g4final_install'
|
|---|
| 6610 | g4gdml_xercesc_root='$g4gdml_xercesc_root'
|
|---|
| 6611 | g4global='$g4global'
|
|---|
| 6612 | g4granular='$g4granular'
|
|---|
| 6613 | g4include='$g4include'
|
|---|
| 6614 | g4includes_flag='$g4includes_flag'
|
|---|
| 6615 | g4install='$g4install'
|
|---|
| 6616 | g4ledata='$g4ledata'
|
|---|
| 6617 | g4levelgammadata='$g4levelgammadata'
|
|---|
| 6618 | g4lib='$g4lib'
|
|---|
| 6619 | g4lib_build_gdml='$g4lib_build_gdml'
|
|---|
| 6620 | g4lib_build_shared='$g4lib_build_shared'
|
|---|
| 6621 | g4lib_build_static='$g4lib_build_static'
|
|---|
| 6622 | g4lib_use_dll='$g4lib_use_dll'
|
|---|
| 6623 | g4lib_use_dyn='$g4lib_use_dyn'
|
|---|
| 6624 | g4lib_use_granular='$g4lib_use_granular'
|
|---|
| 6625 | g4lib_use_shared='$g4lib_use_shared'
|
|---|
| 6626 | g4lib_use_static='$g4lib_use_static'
|
|---|
| 6627 | g4make='$g4make'
|
|---|
| 6628 | g4neutronhpcrosssections='$g4neutronhpcrosssections'
|
|---|
| 6629 | g4osname='$g4osname'
|
|---|
| 6630 | g4radioactivedata='$g4radioactivedata'
|
|---|
| 6631 | g4system='$g4system'
|
|---|
| 6632 | g4tmp='$g4tmp'
|
|---|
| 6633 | g4ui_build_gag_session='$g4ui_build_gag_session'
|
|---|
| 6634 | g4ui_build_qt_session='$g4ui_build_qt_session'
|
|---|
| 6635 | g4ui_build_terminal_session='$g4ui_build_terminal_session'
|
|---|
| 6636 | g4ui_build_win32_session='$g4ui_build_win32_session'
|
|---|
| 6637 | g4ui_build_xaw_session='$g4ui_build_xaw_session'
|
|---|
| 6638 | g4ui_build_xm_session='$g4ui_build_xm_session'
|
|---|
| 6639 | g4ui_none='$g4ui_none'
|
|---|
| 6640 | g4ui_use_gag='$g4ui_use_gag'
|
|---|
| 6641 | g4ui_use_qt='$g4ui_use_qt'
|
|---|
| 6642 | g4ui_use_tcsh='$g4ui_use_tcsh'
|
|---|
| 6643 | g4ui_use_terminal='$g4ui_use_terminal'
|
|---|
| 6644 | g4ui_use_win32='$g4ui_use_win32'
|
|---|
| 6645 | g4ui_use_xaw='$g4ui_use_xaw'
|
|---|
| 6646 | g4ui_use_xm='$g4ui_use_xm'
|
|---|
| 6647 | g4ui_xawflags='$g4ui_xawflags'
|
|---|
| 6648 | g4ui_xawhome='$g4ui_xawhome'
|
|---|
| 6649 | g4ui_xawlibs='$g4ui_xawlibs'
|
|---|
| 6650 | g4vis_build_asciitree_driver='$g4vis_build_asciitree_driver'
|
|---|
| 6651 | g4vis_build_dawn_driver='$g4vis_build_dawn_driver'
|
|---|
| 6652 | g4vis_build_dawnfile_driver='$g4vis_build_dawnfile_driver'
|
|---|
| 6653 | g4vis_build_oiwin32_driver='$g4vis_build_oiwin32_driver'
|
|---|
| 6654 | g4vis_build_oix_driver='$g4vis_build_oix_driver'
|
|---|
| 6655 | g4vis_build_openglqt_driver='$g4vis_build_openglqt_driver'
|
|---|
| 6656 | g4vis_build_openglwin32_driver='$g4vis_build_openglwin32_driver'
|
|---|
| 6657 | g4vis_build_openglx_driver='$g4vis_build_openglx_driver'
|
|---|
| 6658 | g4vis_build_openglxm_driver='$g4vis_build_openglxm_driver'
|
|---|
| 6659 | g4vis_build_raytracer_driver='$g4vis_build_raytracer_driver'
|
|---|
| 6660 | g4vis_build_raytracerx_driver='$g4vis_build_raytracerx_driver'
|
|---|
| 6661 | g4vis_build_vrml_driver='$g4vis_build_vrml_driver'
|
|---|
| 6662 | g4vis_build_vrmlfile_driver='$g4vis_build_vrmlfile_driver'
|
|---|
| 6663 | g4vis_oglhome='$g4vis_oglhome'
|
|---|
| 6664 | g4vis_oivhome='$g4vis_oivhome'
|
|---|
| 6665 | g4vis_use_asciitree='$g4vis_use_asciitree'
|
|---|
| 6666 | g4vis_use_dawn='$g4vis_use_dawn'
|
|---|
| 6667 | g4vis_use_dawnfile='$g4vis_use_dawnfile'
|
|---|
| 6668 | g4vis_use_oiwin32='$g4vis_use_oiwin32'
|
|---|
| 6669 | g4vis_use_oix='$g4vis_use_oix'
|
|---|
| 6670 | g4vis_use_openglqt='$g4vis_use_openglqt'
|
|---|
| 6671 | g4vis_use_openglwin32='$g4vis_use_openglwin32'
|
|---|
| 6672 | g4vis_use_openglx='$g4vis_use_openglx'
|
|---|
| 6673 | g4vis_use_openglxm='$g4vis_use_openglxm'
|
|---|
| 6674 | g4vis_use_raytracer='$g4vis_use_raytracer'
|
|---|
| 6675 | g4vis_use_raytracerx='$g4vis_use_raytracerx'
|
|---|
| 6676 | g4vis_use_vrml='$g4vis_use_vrml'
|
|---|
| 6677 | g4vis_use_vrmlfile='$g4vis_use_vrmlfile'
|
|---|
| 6678 | g4vis_xmflags='$g4vis_xmflags'
|
|---|
| 6679 | g4vis_xmflags='$g4vis_xmflags'
|
|---|
| 6680 | g4vis_xmhome='$g4vis_xmhome'
|
|---|
| 6681 | g4vis_xmhome='$g4vis_xmhome'
|
|---|
| 6682 | g4vis_xmlibs='$g4vis_xmlibs'
|
|---|
| 6683 | g4vis_xmlibs='$g4vis_xmlibs'
|
|---|
| 6684 | g4w_use_g3tog4='$g4w_use_g3tog4'
|
|---|
| 6685 | g4w_use_zlib='$g4w_use_zlib'
|
|---|
| 6686 | g4wanalysis_build='$g4wanalysis_build'
|
|---|
| 6687 | g4wanalysis_build_jas='$g4wanalysis_build_jas'
|
|---|
| 6688 | g4wanalysis_build_lab='$g4wanalysis_build_lab'
|
|---|
| 6689 | g4wanalysis_build_lizard='$g4wanalysis_build_lizard'
|
|---|
| 6690 | g4wanalysis_use='$g4wanalysis_use'
|
|---|
| 6691 | g4wanalysis_use_jas='$g4wanalysis_use_jas'
|
|---|
| 6692 | g4wanalysis_use_lab='$g4wanalysis_use_lab'
|
|---|
| 6693 | g4wanalysis_use_lizard='$g4wanalysis_use_lizard'
|
|---|
| 6694 | g4wlib_build_g3tog4='$g4wlib_build_g3tog4'
|
|---|
| 6695 | g4wlib_build_zlib='$g4wlib_build_zlib'
|
|---|
| 6696 | g4workdir='$g4workdir'
|
|---|
| 6697 | hint='$hint'
|
|---|
| 6698 | lns='$lns'
|
|---|
| 6699 | myuname='$myuname'
|
|---|
| 6700 | n='$n'
|
|---|
| 6701 | osname='$osname'
|
|---|
| 6702 | osvers='$osvers'
|
|---|
| 6703 | package='$package'
|
|---|
| 6704 | sh='$sh'
|
|---|
| 6705 | sharpbang='$sharpbang'
|
|---|
| 6706 | shsharp='$shsharp'
|
|---|
| 6707 | spackage='$spackage'
|
|---|
| 6708 | spitshell='$spitshell'
|
|---|
| 6709 | src='$src'
|
|---|
| 6710 | startsh='$startsh'
|
|---|
| 6711 | EOT
|
|---|
| 6712 |
|
|---|
| 6713 | : add special variables
|
|---|
| 6714 | mkdir -p $g4conf
|
|---|
| 6715 | $test -f $src/patchlevel.h && \
|
|---|
| 6716 | awk '/^#define/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >> $g4conf/config.sh
|
|---|
| 6717 | echo "CONFIG=true" >> $g4conf/config.sh
|
|---|
| 6718 |
|
|---|
| 6719 | : propagate old symbols
|
|---|
| 6720 | if $test -f .config/UU/config.sh; then
|
|---|
| 6721 | <.config/UU/config.sh sort | uniq >.config/UU/oldconfig.sh
|
|---|
| 6722 | sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' $g4conf/config.sh $g4conf/config.sh .config/UU/oldconfig.sh |\
|
|---|
| 6723 | sort | uniq -u >.config/UU/oldsyms
|
|---|
| 6724 | set X `cat .config/UU/oldsyms`
|
|---|
| 6725 | shift
|
|---|
| 6726 | case $# in
|
|---|
| 6727 | 0) ;;
|
|---|
| 6728 | *)
|
|---|
| 6729 | cat <<EOM
|
|---|
| 6730 |
|
|---|
| 6731 | Hmm...You had some extra variables I don't know about...
|
|---|
| 6732 | I'll try to keep 'em...
|
|---|
| 6733 |
|
|---|
| 6734 | EOM
|
|---|
| 6735 | echo "# Variables propagated from previous config.sh file." >>.config/bin/$g4system/config.sh
|
|---|
| 6736 | for sym in `cat .config/UU/oldsyms`; do
|
|---|
| 6737 | echo " Propagating $hint variable "'$'"$sym..."
|
|---|
| 6738 | eval 'tmp="$'"${sym}"'"'
|
|---|
| 6739 | echo "$tmp" | \
|
|---|
| 6740 | sed -e "s/'/'\"'\"'/g" -e "s/^/$sym='/" -e "s/$/'/" >>.config/bin/$g4system/config.sh
|
|---|
| 6741 | done
|
|---|
| 6742 | ;;
|
|---|
| 6743 | esac
|
|---|
| 6744 | fi
|
|---|
| 6745 |
|
|---|
| 6746 | : preserve RCS keywords in files with variable substitution, grrr
|
|---|
| 6747 | Id='$Id'
|
|---|
| 6748 |
|
|---|
| 6749 | : Finish up by extracting the .SH files
|
|---|
| 6750 | case "$alldone" in
|
|---|
| 6751 | exit)
|
|---|
| 6752 | $rm -rf .config/UU
|
|---|
| 6753 | echo "Done."
|
|---|
| 6754 | exit 0
|
|---|
| 6755 | ;;
|
|---|
| 6756 | cont)
|
|---|
| 6757 | ;;
|
|---|
| 6758 | '')
|
|---|
| 6759 | dflt=''
|
|---|
| 6760 | nostick=true
|
|---|
| 6761 | $cat <<EOM
|
|---|
| 6762 |
|
|---|
| 6763 | WARNING: the generated configuration file
|
|---|
| 6764 | can be edited if necessary!
|
|---|
| 6765 | You can introduce any change to the configuration file
|
|---|
| 6766 | $g4conf/config.sh before the final installation.
|
|---|
| 6767 | To do so, use a shell escape now (e.g. !vi $g4conf/config.sh).
|
|---|
| 6768 |
|
|---|
| 6769 | EOM
|
|---|
| 6770 | rp="Press [Enter] to start installation or use a shell escape to edit config.sh:"
|
|---|
| 6771 | . .config/UU/myread
|
|---|
| 6772 | nostick=''
|
|---|
| 6773 | case "$ans" in
|
|---|
| 6774 | '') ;;
|
|---|
| 6775 | *) : in case they cannot read
|
|---|
| 6776 | sh 1>&4 -c "$ans";;
|
|---|
| 6777 | esac
|
|---|
| 6778 | ;;
|
|---|
| 6779 | esac
|
|---|
| 6780 |
|
|---|
| 6781 | : if this fails, just run all the .SH files by hand
|
|---|
| 6782 | . $g4conf/config.sh
|
|---|
| 6783 |
|
|---|
| 6784 | echo " "
|
|---|
| 6785 | exec 1>&4
|
|---|
| 6786 | . ./.config/UU/extract
|
|---|
| 6787 |
|
|---|
| 6788 | if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then
|
|---|
| 6789 | dflt=y
|
|---|
| 6790 | case "$silent" in
|
|---|
| 6791 | true) ;;
|
|---|
| 6792 | *)
|
|---|
| 6793 | $cat <<EOM
|
|---|
| 6794 |
|
|---|
| 6795 | Now you need to generate make dependencies by running "make depend".
|
|---|
| 6796 | You might prefer to run it in background: "make depend > makedepend.out &"
|
|---|
| 6797 | It can take a while, so you might not want to run it right now.
|
|---|
| 6798 |
|
|---|
| 6799 | EOM
|
|---|
| 6800 | ;;
|
|---|
| 6801 | esac
|
|---|
| 6802 | rp="Run make depend now?"
|
|---|
| 6803 | . .config/UU/myread
|
|---|
| 6804 | case "$ans" in
|
|---|
| 6805 | y*)
|
|---|
| 6806 | make depend && echo "Now you must run a make."
|
|---|
| 6807 | ;;
|
|---|
| 6808 | *)
|
|---|
| 6809 | echo "You must run 'make depend' then 'make'."
|
|---|
| 6810 | ;;
|
|---|
| 6811 | esac
|
|---|
| 6812 | elif test -f [Mm]akefile; then
|
|---|
| 6813 | echo " "
|
|---|
| 6814 | echo "Now you must run a make."
|
|---|
| 6815 | elif [ -f $g4conf/install.sh -a X$g4build = Xyes ] ; then
|
|---|
| 6816 | echo " "
|
|---|
| 6817 | echo "Now starting Geant4 libraries build..."
|
|---|
| 6818 | echo " "
|
|---|
| 6819 | . $g4conf/install.sh
|
|---|
| 6820 | elif [ -f $g4conf/install.sh -a X$install = Xyes ] ; then
|
|---|
| 6821 | echo " "
|
|---|
| 6822 | echo "Now starting Geant4 libraries installation..."
|
|---|
| 6823 | echo " "
|
|---|
| 6824 | . $g4conf/move.sh
|
|---|
| 6825 | else
|
|---|
| 6826 | echo " "
|
|---|
| 6827 | echo "WARNING: Geant4 is NOT installed yet!"
|
|---|
| 6828 | echo "You (or the administrator if you have not enough privileges)"
|
|---|
| 6829 | echo "should start with \$G4INSTALL/Configure -install"
|
|---|
| 6830 | echo "(where \$G4INSTALL is Geant4 install directory)."
|
|---|
| 6831 | echo " "
|
|---|
| 6832 | fi
|
|---|
| 6833 |
|
|---|
| 6834 | $rm -f kit*isdone ark*isdone
|
|---|
| 6835 | $rm -rf .config/UU
|
|---|
| 6836 |
|
|---|
| 6837 | : End of Configure
|
|---|
| 6838 |
|
|---|