#! /bin/sh # # If these # comments don't work, trim them. Don't worry about any other # shell scripts, Configure will trim # comments from them for you. # # (If you are trying to port this package to a machine without sh, # I would suggest you have a look at the prototypical config_h.SH file # and edit it to reflect your system. Some packages may include samples # of config.h for certain machines, so you might look for one of those.) # # Yes, you may rip this off to use in other distribution packages. This # script belongs to the public domain and cannot be copyrighted. # # (Note: this Configure script was generated automatically. Rather than # working with this copy of Configure, you may wish to get metaconfig. # The dist-3.0 package (which contains metaconfig) was posted in # comp.sources.misc and is available on CPAN under authors/id/RAM so # you may fetch it yourself from your nearest archive site.) # # $Id: Configure,v 1.133 2010/06/24 15:24:11 bmorgan Exp $ # # Generated on Thu Jun 24 16:21:02 BST 2010 [metaconfig 3.0 PL70] cat >/tmp/c1$$ </tmp/c2$$ </dev/null` test "$me" || me=$0 ;; esac : Proper PATH separator p_=: : On OS/2 this directory should exist if this is not floppy only system :-] #if test -d c:/.; then # p_=\; # PATH=`cmd /c "echo %PATH%" | tr '\\\\' / ` #?X: That's a bug in ksh5.22 # OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'` #fi : Proper PATH setting paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin' paths="$paths /opt/bin /opt/local/bin /opt/local /opt/lbin" paths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin" paths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin" paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb" paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /usr/ccs/bin" paths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib" paths="$paths /sbin /usr/sbin /usr/libexec" for p in $paths do case "$p_$PATH$p_" in *$p_$p$p_*) ;; *) test -d $p && PATH=$PATH$p_$p ;; esac done PATH=.$p_$PATH export PATH : shall we be using ksh? inksh='' needksh='' avoidksh='' newsh=/bin/ksh changesh='' if (PATH=.; alias -x) >/dev/null 2>&1; then inksh=true fi if test -f /hp-ux -a -f /bin/ksh; then needksh='to avoid sh bug in "here document" expansion' fi if test -d /usr/lpp -a -f /usr/bin/bsh -a -f /usr/bin/uname; then if test X`/usr/bin/uname -v` = X4; then avoidksh="to avoid AIX 4's /bin/sh" newsh=/usr/bin/bsh fi fi case "$inksh/$needksh" in /[a-z]*) unset ENV changesh=true reason="$needksh" ;; esac case "$inksh/$avoidksh" in true/[a-z]*) changesh=true reason="$avoidksh" ;; esac case "$inksh/$needksh-$avoidksh-" in true/--) cat <&2 $me: Fatal Error: I can't find a Bourne Shell anywhere. Usually it's in /bin/sh. Please contact Serguei.Sadilov@cern.ch and we'll try to straighten this all out. EOM exit 1 ;; esac : see if sh knows # comments if `$sh -c '#' >/dev/null 2>&1`; then shsharp=true spitshell=cat xcat=/bin/cat test -f $xcat || xcat=/usr/bin/cat echo "#!$xcat" >try $eunicefix try chmod +x try # # $xcat is wrong on WIN32: there is no /bin/cat and /usr/bin/cat by default. # But we are sure that sharpbang is to be '#!' and let 'today' will be !=0. # # ./try > today echo "#!$xcat" >today if test -s today; then sharpbang='#!' else echo "#! $xcat" > try $eunicefix try chmod +x try # # $xcat is wrong on WIN32: there is no /bin/cat and /usr/bin/cat by default. # But we are sure that sharpbang is to be '#!' and let 'today' will be !=0. # # ./try > today echo "#!$xcat" >today if test -s today; then sharpbang='#! ' else sharpbang=': use ' fi fi else echo " " echo "Your $sh doesn't grok # comments--I will strip them later on." shsharp=false cd .. echo "exec grep -v '^[ ]*#'" >spitshell chmod +x spitshell $eunicefix spitshell spitshell=`pwd`/spitshell cd UU echo "I presume that if # doesn't work, #! won't work either!" sharpbang=': use ' fi rm -f try today : figure out how to guarantee sh startup case "$startsh" in '') startsh=${sharpbang}${sh} ;; *) esac cat >try <options.awk <<'EOF' BEGIN { optstr = "dD:eEf:hKOrsSU:V"; # getopt-style specification len = length(optstr); for (i = 1; i <= len; i++) { c = substr(optstr, i, 1); if (i < len) a = substr(optstr, i + 1, 1); else a = ""; if (a == ":") { arg[c] = 1; i++; } opt[c] = 1; } } { expect = 0; str = $0; if (substr(str, 1, 1) != "-") { printf("'%s'\n", str); next; } len = length($0); for (i = 2; i <= len; i++) { c = substr(str, i, 1); if (!opt[c]) { printf("-%s\n", substr(str, i)); next; } printf("-%s\n", c); if (arg[c]) { if (i < len) printf("'%s'\n", substr(str, i + 1)); else expect = 1; next; } } } END { if (expect) print "?"; } EOF : process the command line options set X `for arg in "$@"; do echo "X$arg"; done | sed -e s/X// | awk -f options.awk` eval "set $*" shift rm -f options.awk : set up default values fastread='' reuseval=false config_sh='' alldone='' error='' silent='' extractsh='' override='' knowitall='' rm -f optdef.sh cat >optdef.sh <&2 error=true fi cd .config/UU shift;; -h) shift; error=true;; -r) shift; reuseval=true;; -s) shift; silent=true; realsilent=true;; -E) shift; alldone=exit;; -K) shift; knowitall=true;; -O) shift; override=true;; -S) shift; silent=true; extractsh=true;; -D) shift case "$1" in *=) echo "$me: use '-U symbol=', not '-D symbol='." >&2 echo "$me: ignoring -D $1" >&2 ;; *=*) echo "$1" | \ sed -e "s/'/'\"'\"'/g" -e "s/=\(.*\)/='\1'/" >> optdef.sh;; *) echo "$1='define'" >> optdef.sh;; esac shift ;; -U) shift case "$1" in *=) echo "$1" >> optdef.sh;; *=*) echo "$me: use '-D symbol=val', not '-U symbol=val'." >&2 echo "$me: ignoring -U $1" >&2 ;; *) echo "$1='undef'" >> optdef.sh;; esac shift ;; -V) echo "$me generated by metaconfig 3.0 PL70." >&2 exit 0;; --) break;; -*) echo "$me: unknown option $1" >&2; shift; error=true;; *) break;; esac done case "$error" in true) cat >&2 <&1 case "$silent" in true) exec 1>/dev/null;; esac : run the defines and the undefines, if any, but leave the file out there... touch optdef.sh . ./optdef.sh : set package name package=g4conf : Some greps do not return status, grrr. echo "grimblepritz" >grimble if grep blurfldyick grimble >/dev/null 2>&1 ; then contains=contains elif grep grimblepritz grimble >/dev/null 2>&1 ; then contains=grep else contains=contains fi rm -f grimble : the following should work in any shell case "$contains" in contains*) echo " " echo "Grep doesn't return a status!! Attempting remedial action." cat >contains <<'EOSS' grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp EOSS chmod +x contains esac : first determine how to suppress newline on echo command #echo " " #echo "Checking echo to see how to suppress newlines..." (echo "hi there\c" ; echo " ") >.echotmp if $contains c .echotmp >/dev/null 2>&1 ; then # echo "...using -n." n='-n' c='' else # cat <<'EOM' #...using \c #EOM n='' c='\c' fi #echo $n "The star should be here-->$c" #echo '*' rm -f .echotmp : compute the number of columns on the terminal for proper question formatting case "$COLUMNS" in '') COLUMNS='80';; esac : set up the echo used in my read myecho="case \"\$xxxm\" in '') echo $n \"\$rp $c\" >&4;; *) case \"\$rp\" in '') echo $n \"[\$xxxm] $c\";; *) if test \`echo \"\$rp [\$xxxm] \" | wc -c\` -ge $COLUMNS; then echo \"\$rp\" >&4 echo $n \"[\$xxxm] $c\" >&4 else echo $n \"\$rp [\$xxxm] $c\" >&4 fi ;; esac;; esac" : now set up to do reads with possible shell escape and default assignment cat <myread $startsh xxxm=\$dflt $myecho ans='!' case "\$fastread" in yes) case "\$dflt" in '') ;; *) ans=''; case "\$silent-\$rp" in true-) ;; *) echo " " >&4;; esac;; esac;; *) case "\$silent" in true) case "\$rp" in '') ans='';; esac;; esac;; esac while expr "X\$ans" : "X!" >/dev/null; do read answ set x \$xxxm shift aok=''; eval "ans=\\"\$answ\\"" && aok=y case "\$answ" in "!") sh 1>&4 echo " " $myecho ;; !*) set x \`expr "X\$ans" : "X!\(.*\)\$"\` shift sh 1>&4 -c "\$*" echo " " $myecho ;; "\$ans") case "\$ans" in \\&*) set x \`expr "X\$ans" : "X&\(.*\)\$"\` shift case "\$1" in -d) fastread=yes echo "(OK, I'll run with -d after this question.)" >&4 ;; -*) echo "*** Sorry, \$1 not supported yet." >&4 ;; esac $myecho ans=! ;; esac;; *) case "\$aok" in y) echo "*** Substitution done -- please confirm." xxxm="\$ans" ans=\`echo $n "\$ans$c" | tr '\012' ' '\` xxxm="\$ans" ans=! ;; *) echo "*** Error -- try again." ans=! ;; esac $myecho ;; esac case "\$ans\$xxxm\$nostick" in '') ans=! $myecho ;; esac done case "\$ans" in '') ans="\$xxxm";; esac EOSC : Find the path to the source tree case "$src" in '') src=`echo $0 | sed -e 's%/[^/][^/]*$%%'` #echo "src=$src" ;; esac case "$src" in '') src=. rsrc=.. ;; /*) rsrc="$src/.." #echo "rsrc=$rsrc" ;; ./*) cur_dir=`pwd` cd ../../$src src=`pwd` cd $cur_dir rsrc="$src/.." rsrc="$src/.." #echo "src=$src" #echo "rsrc=$rsrc" ;; *) rsrc="../../$src" #echo "rsrc=$rsrc" ;; esac #cur_dir=`pwd` #echo "cur_dir=$cur_dir" if test -f $src/Configure && \ $contains "^package=$package" $src/Configure >/dev/null 2>&1 then : found it, so we are ok. else rsrc='' for src in . .. ../.. ../../.. ../../../..; do if test -f ../../$src/Configure && \ $contains "^package=$package" ../../$src/Configure >/dev/null 2>&1 then rsrc=../../$src break fi done fi case "$rsrc" in '') echo " " # dflt= # rp="Directory where sources for $package are located?" # . ./myread # src="$ans" rsrc="$src" #echo "src=$src" #echo "rsrc=$rsrc" if test -f $rsrc/Configure && \ $contains "^package=$package" $rsrc/Configure >/dev/null 2>&1 then echo "Ok, I've found them under $src" else echo "Sorry, I can't seem to be able to locate $package sources." >&4 echo "Please, use absolute path or relative with './' to Configure." >&4 exit 1 fi ;; ../../.) ;; *) # echo " " # echo "Sources for $package found in $src" >&4 ;; esac : script used to extract .SH files with variable substitutions cat >extract <<'EOS' CONFIG=true #echo "Doing variable substitutions on .SH files..." if test -f $src/MANIFEST; then set x `awk '{print $1}' <$src/MANIFEST | grep '\.SH'` else # echo "(Looking for .SH files under the source directory.)" set x `(cd $src; find ./config/scripts -name "*.SH" -print)` fi shift case $# in 0) set x `(cd $src; echo *.SH)`; shift;; esac if test ! -f $src/$1; then shift fi mkdir_p=' name=$1; create=""; while test $name; do if test ! -d "$name"; then create="$name $create"; name=`echo $name | sed -e "s|^[^/]*$||"`; name=`echo $name | sed -e "s|\(.*\)/.*|\1|"`; else name=""; fi; done; for file in $create; do mkdir $file; done ' for file in $*; do case "$src" in ".") case "$file" in */*) dir=`expr X$file : 'X\(.*\)/'` file_SH=`expr X$file : 'X.*/\(.*\)'` file_EX=`expr X$file : 'X.*/\(.*\).SH'` (cd $dir && . ./$file_SH && mkdir -p $abssrc/.config/bin/$g4system && mv $file_EX $abssrc/.config/bin/$g4system) # echo Sergei_1 # echo "file_SH=$file_SH" # echo "file_EX=$file_EX" # echo "file=$file" # echo "dir=$dir" # echo "src=$src" # echo "g4system=$g4system" # echo Sergei_1 ;; *) file_SH=`expr X$file : 'X.*/\(.*\)'` file_EX=`expr X$file : 'X.*/\(.*\).SH'` (. ./$file && mkdir -p $abssrc/.config/bin/$g4system && mv file-SH $abssrc/.config/bin/$g4system) # echo Sergei_2 # echo "file_SH=$file_SH" # echo "file_EX=$file_EX" # echo "file=$file" # echo "dir=$dir" # echo "src=$src" # echo "g4system=$g4system" # echo Sergei_2 ;; esac ;; *) case "$file" in */*) dir=`expr X$file : 'X\(.*\)/'` file_SH=`expr X$file : 'X.*/\(.*\)'` file_EX=`expr X$file : 'X.*/\(.*\)\.SH'` (set x $dir; shift; eval $mkdir_p) (sh <$src/$dir/$file_SH && mkdir -p $src/.config/bin/$g4system && mv $file_EX $src/.config/bin/$g4system) # echo Sergei_3 # echo "dir=$dir" # echo "file=$file" # echo Sergei_3 ;; *) file_SH=`expr X$file : 'X.*/\(.*\)'` file_EX=`expr X$file : 'X.*/\(.*\)\.SH'` (sh <$src/$file && mkdir -p $src/.config/bin/$g4system && mv $file_EX $src/.config/bin/$g4system) echo Sergei_4 ;; esac ;; esac done if test -f $src/config_h.SH; then if test ! -f config.h; then : oops, they left it out of MANIFEST, probably, so do it anyway. . $src/config_h.SH fi fi EOS : extract files and exit if asked to do so case "$extractsh" in true) case "$realsilent" in true) ;; *) exec 1>&4;; esac case "$config_sh" in '') config_sh='$g4conf/config.sh'; config="$g4conf/config.sh";; /*) config="$g4conf/$config_sh";; *) config="$g4conf/$config_sh";; esac echo " " echo "Fetching answers from $config_sh..." . $config test "$override" && . ./optdef.sh echo " " cd ../.. . .config/UU/extract rm -rf .config/UU echo "Done." exit 0 ;; esac : Eunice requires " " instead of "", can you believe it #echo " " : Here we go... trap 'echo " ";rm -rf ../../.config/UU; test -d ../../.config/UU && rm -rf X $rmlist; exit 1' 1 2 3 15 : create .config dir to save info across Configure sessions test -d ../.config || mkdir ../.config cat >../.config/README </dev/null` case "$user" in '') user=`whoami 2>&1`;; esac if [ X$g4build = Xyes ] ; then echo " " echo " --- Geant4 Toolkit Build ---" echo " " if $contains "^$user\$" ../../.config/instruct >/dev/null 2>&1; then firsttime=false rp='Would you like to see the instructions?' dflt=n . ./myread case "$ans" in [yY]*) ;; *) needman=false;; esac fi fi if [ X$install = Xyes ] ; then needman=false fi if [ X$install = X -a X$g4build = X ] ; then needman=false fi if $needman; then cat <>../../.config/instruct;; esac fi : find out where common programs are #echo " " #echo "Locating common programs..." >&4 cat <loc $startsh case \$# in 0) exit 1;; esac thing=\$1 shift dflt=\$1 shift for dir in \$*; do case "\$thing" in .) if test -d \$dir/\$thing; then echo \$dir exit 0 fi ;; *) for thisthing in \$dir/\$thing; do : just loop through to pick last item done if test -f \$thisthing; then echo \$thisthing exit 0 elif test -f \$dir/\$thing.exe; then : on Eunice apparently echo \$dir/\$thing exit 0 fi ;; esac done echo \$dflt exit 1 EOSC chmod +x loc $eunicefix loc loclist=" awk cat echo expr grep rm sed touch tr " trylist=" date gcc ln test uname " pth=`echo $PATH | sed -e "s/$p_/ /g"` pth="$pth /lib /usr/lib" for file in $loclist; do eval xxx=\$$file case "$xxx" in /*|?:[\\/]*) if test -f "$xxx"; then : ok else echo "WARNING: no $xxx -- ignoring your setting for $file." >&4 xxx=`./loc $file $file $pth` fi ;; '') xxx=`./loc $file $file $pth`;; *) xxx=`./loc $xxx $xxx $pth`;; esac eval $file=$xxx eval _$file=$xxx case "$xxx" in /*) echo "$file is in $xxx." > /dev/null ;; ?:[\\/]*) echo "$file is in $xxx." > /dev/null ;; *) echo "I don't know where '$file' is." >&4 echo "Please, install it or fix your PATH settings!" >&4 exit 1 ;; esac done #echo " " #echo "Don't worry if any of the following aren't found..." say=offhand for file in $trylist; do eval xxx=\$$file case "$xxx" in /*|?:[\\/]*) if test -f "$xxx"; then : ok else echo "WARNING: no $xxx -- ignoring your setting for $file." >&4 xxx=`./loc $file $file $pth` fi ;; '') xxx=`./loc $file $file $pth`;; *) xxx=`./loc $xxx $xxx $pth`;; esac eval $file=$xxx eval _$file=$xxx case "$xxx" in /*) echo "$file is in $xxx." > /dev/null ;; ?:[\\/]*) echo "$file is in $xxx." > /dev/null ;; *) echo "I don't see $file out there, $say." say=either ;; esac done case "$egrep" in egrep) # echo "Substituting grep for egrep." egrep=$grep ;; esac case "$ln" in ln) # echo "Substituting cp for ln." ln=$cp ;; esac case "$test" in test) echo "Hopefully test is built into your sh." > /dev/null ;; *) if `sh -c "PATH= test true" >/dev/null 2>&1`; then echo "Using the test built into your sh." > /dev/null test=test _test=test fi ;; esac case "$echo" in echo) echo "Hopefully echo is built into your sh." > /dev/null ;; '') ;; *) # echo " " #echo "Checking compatibility between $echo and builtin echo (if any)..." >&4 $echo $n "hi there$c" >foo1 echo $n "hi there$c" >foo2 if cmp foo1 foo2 >/dev/null 2>&1; then echo "They are compatible. In fact, they may be identical." > /dev/null else case "$n" in '-n') n='' c='\c';; *) n='-n' c='';; esac #We suppress the following message to avoid problems where the system points #sh to dash (Ubuntu). If you have problems with echo, uncomment the cat and #two $echo s to see if you're warned!! # cat <$c" # $echo "*" fi $rm -f foo1 foo2 ;; esac : determine whether symbolic links are supported #echo " " $touch blurfl if $ln -s blurfl sym > /dev/null 2>&1 ; then # echo "Symbolic links are supported." >&4 lns="$ln -s" else # echo "Symbolic links are NOT supported." >&4 lns="$ln" fi $rm -f blurfl sym : see whether [:lower:] and [:upper:] are supported character classes #echo " " up='[A-Z]' low='[a-z]' case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in ABYZ) # echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4 up='[:upper:]' low='[:lower:]' ;; *) # echo "Your tr only supports [a-z] and [A-Z] to convert case." >&4 ;; esac : set up the translation script tr, must be called with ./tr of course cat >tr </dev/null || hostname) 2>&1` mygcc=`( ($g++ -v) 2>/dev/null) 2>&1` myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \ ./tr '[A-Z]' '[a-z]' | tr '\012' ' '` newmyuname="$myuname" dflt=n case "$knowitall" in '') if test -f ../config.sh; then if $contains myuname= ../config.sh >/dev/null 2>&1; then eval "`grep myuname= ../config.sh`" fi if test "X$myuname" = "X$newmyuname"; then dflt=y fi fi ;; *) dflt=y;; esac : Get old answers from old config file if Configure was run on the : same system, otherwise use the hints. hint=default cd ../.. if $test -d $src/hints ; then (cd $src/hints; ls -C *.sh 2> /dev/null) | $sed 's/\.sh/ /g' >&4 fi dflt='' : Half the following guesses are probably wrong... If you have better : tests or hints, please send them to Serguei.Sadilov@cern.ch : The metaconfig authors would also appreciate a copy... $test -f /irix && osname=irix $test -f /xenix && osname=sco_xenix $test -f /dynix && osname=dynix $test -f /dnix && osname=dnix $test -f /lynx.os && osname=lynxos $test -f /unicos && osname=unicos && osvers=`$uname -r` $test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r` $test -f /bin/mips && /bin/mips && osname=mips $test -d /NextApps && set X `hostinfo | grep 'NeXT Mach.*:' | \ $sed -e 's/://' -e 's/\./_/'` && osname=next && osvers=$4 $test -d /usr/apollo/bin && osname=apollo $test -f /etc/saf/_sactab && osname=svr4 $test -d /usr/include/minix && osname=minix if $test -d /MachTen; then osname=machten if $test -x /sbin/version; then osvers=`/sbin/version | $awk '{print $2}' | $sed -e 's/[A-Za-z]$//'` elif $test -x /usr/etc/version; then osvers=`/usr/etc/version | $awk '{print $2}' | $sed -e 's/[A-Za-z]$//'` else osvers="$2.$3" fi fi if $test -f $uname; then set X $myuname shift case "$5" in fps*) osname=fps ;; mips*) case "$4" in umips) osname=umips ;; *) osname=mips ;; esac;; [23]100) osname=mips ;; next*) osname=next ;; news*) osname=news ;; i386*) if $test -f /etc/kconfig; then osname=isc if test "$lns" = "ln -s"; then osvers=4 elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then osvers=3 elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then osvers=2 fi fi ;; esac case "$1" in aix) osname=aix tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1` case "$tmp" in 'not found') osvers="$4"."$3" ;; '<3240'|'<>3240') osvers=3.2.0 ;; '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;; '=3250'|'>3250') osvers=3.2.5 ;; *) osvers=$tmp;; esac ;; *dc.osx) osname=dcosx osvers="$3" ;; dnix) osname=dnix osvers="$3" ;; cygwin*) osname=win32 ;; darwin*) osname=darwin ;; domainos) osname=apollo osvers="$3" ;; dgux) osname=dgux osvers="$3" ;; dynixptx*) osname=dynixptx osvers="$3" ;; freebsd) osname=freebsd osvers="$3" ;; genix) osname=genix ;; hp*) osname=hpux case "$3" in *.08.*) osvers=9 ;; *.09.*) osvers=9 ;; *.10.*) osvers=10 ;; *) osvers="$3" ;; esac ;; irix*) osname=irix case "$3" in 4*) osvers=4 ;; 5*) osvers=5 ;; *) osvers="$3" ;; esac ;; linux) osname=linux case "$3" in 1*) osvers=1 ;; *) osvers="$3" ;; esac ;; netbsd*) osname=netbsd osvers="$3" ;; bsd386) osname=bsd386 osvers=`$uname -r` ;; next*) osname=next ;; solaris) osname=solaris case "$3" in 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;; *) osvers="$3" ;; esac ;; sunos) osname=sunos case "$3" in 5*) osname=solaris osvers=`echo $3 | $sed 's/^5/2/g'` ;; *) osvers="$3" ;; esac ;; titanos) osname=titanos case "$3" in 1*) osvers=1 ;; 2*) osvers=2 ;; 3*) osvers=3 ;; 4*) osvers=4 ;; *) osvers="$3" ;; esac ;; ultrix) osname=ultrix osvers="$3" ;; osf1|mls+) case "$5" in alpha) osname=dec_osf osvers=`echo "$3" | sed 's/^[vt]//'` ;; hp*) osname=hp_osf1 ;; mips) osname=mips_osf1 ;; esac ;; uts) osname=uts osvers="$3" ;; qnx) osname=qnx osvers="$4" ;; $2) case "$osname" in *isc*) ;; *freebsd*) ;; svr*) : svr4.x or possibly later case "svr$3" in ${osname}*) osname=svr$3 osvers=$4 ;; esac case "$osname" in svr4.0) : Check for ESIX if test -f /stand/boot ; then eval `grep '^INITPROG=[a-z/0-9]*$' /stand/boot` if test -n "$INITPROG" -a -f "$INITPROG"; then isesix=`strings -a $INITPROG|grep 'ESIX SYSTEM V/386 Release 4.0'` if test -n "$isesix"; then osname=esix4 fi fi fi ;; esac ;; *) if test -f /etc/systemid; then osname=sco set `echo $3 | $sed 's/\./ /g'` $4 if $test -f sco_$1_$2_$3.sh; then osvers=$1.$2.$3 elif $test -f sco_$1_$2.sh; then osvers=$1.$2 elif $test -f sco_$1.sh; then osvers=$1 fi else case "$osname" in '') : Still unknown. Probably a generic Sys V. osname="sysv" osvers="$3" ;; esac fi ;; esac ;; *) case "$osname" in '') : Still unknown. Probably a generic BSD. osname="$1" osvers="$3" ;; esac ;; esac else if test -f /vmunix -a -f $src/hints/news_os.sh; then (what /vmunix | .config/UU/tr '[A-Z]' '[a-z]') > .config/UU/kernel.what 2>&1 if $contains news-os .config/UU/kernel.what >/dev/null 2>&1; then osname=news_os fi $rm -f .config/UU/kernel.what elif test -d c:/.; then set X $myuname osname=os2 osvers="$5" fi fi : Now look for a hint file osname_osvers, unless one has been : specified already. case "$hintfile" in ''|' ') file=`echo "${osname}_${osvers}" | $sed -e 's@\.@_@g' -e 's@_$@@'` : Also try without trailing minor version numbers. xfile=`echo $file | $sed -e 's@_[^_]*$@@'` xxfile=`echo $xfile | $sed -e 's@_[^_]*$@@'` xxxfile=`echo $xxfile | $sed -e 's@_[^_]*$@@'` xxxxfile=`echo $xxxfile | $sed -e 's@_[^_]*$@@'` case "$file" in '') dflt=none ;; *) case "$osvers" in '') dflt=$file ;; *) if $test -f $src/hints/$file.sh ; then dflt=$file elif $test -f $src/hints/$xfile.sh ; then dflt=$xfile elif $test -f $src/hints/$xxfile.sh ; then dflt=$xxfile elif $test -f $src/hints/$xxxfile.sh ; then dflt=$xxxfile elif $test -f $src/hints/$xxxxfile.sh ; then dflt=$xxxxfile elif $test -f "$src/hints/${osname}.sh" ; then dflt="${osname}" else dflt=none fi ;; esac ;; esac ;; *) dflt=`echo $hintfile | $sed 's/\.sh$//'` ;; esac if [ X$install = Xnever ] ; then $cat <> .config/UU/config.sh elif $test X$tans = X -o X$tans = Xnone ; then : nothing else : Give one chance to correct a possible typo. echo "$file.sh does not exist" dflt=$file rp="hint to use instead?" . .config/UU/myread for file in $ans; do if $test -f "$src/hints/$file.sh"; then . $src/hints/$file.sh $cat $src/hints/$file.sh >> .config/UU/config.sh elif $test X$ans = X -o X$ans = Xnone ; then : nothing else echo "$file.sh does not exist -- ignored." fi done fi done fi hint=recommended : Remember our hint file for later. if $test -f "$src/hints/$file.sh" ; then hintfile="$file" else hintfile='' fi : Sadilov: g4system.U - inserted here. : 'current' directory is where 'Configure' is started #echo " " case "$g4osname" in '') case "$osname" in 'aix') g4osname=AIX ;; 'dec_osf') g4osname=DEC ;; 'hpux') g4osname=HP ;; 'linux') g4osname=Linux ;; 'irix') g4osname=SGI ;; 'sunos') g4osname=SUN ;; 'solaris') g4osname=SUN ;; 'win32') g4osname=WIN32 ;; 'darwin') g4osname=Darwin ;; esac esac #echo " " case "$g4compiler" in '') case "$g4osname" in 'AIX') g4compiler=xlC ;; 'DEC') g4compiler=cxx ;; 'HP') g4compiler=aCC ;; 'Linux') # g4compiler=g++ # Assume if "gcc" is in place then "g++" is here gcccompiler=`( ($gcc -v) 1>/dev/null || echo "ERROR: There is no 'gcc' ('g++'?) compiler.") 2>&1` case $gcccompiler in *egcs*) g4compiler=egcs ;; *2.96*) echo "WARNING: Found version of g++ (2.96.XXX) is known to be buggy!" g4compiler="g++" ;; *) g4compiler="g++" ;; esac ;; 'SGI') g4compiler=CC ;; 'SUN') g4compiler=CC ;; 'WIN32') g4compiler=VC clcompiler=`( cl 1>/dev/null || echo "ERROR: There is no cl compiler.") 2>&1` case $clcompiler in *"Version 12"*) g4compiler=VC6 ;; *"Version 13"*) g4compiler=VC ;; *) g4compiler=VC ;; esac ;; 'Darwin') g4compiler=g++ ;; esac esac if [ X$g4system = X ] ; then if [ X$g4build = Xyes ] ; then while test 1 = 1 ; do g4message=`cat << EOM Definition of G4SYSTEM variable is $g4osname-$g4compiler. That stands for: 1) OS : $g4osname 2) Compiler : $g4compiler To modify default settings, select number above (e.g. 2) EOM` dflt="Press [Enter] for default settings" rp=$g4message . .config/UU/myread gans=$ans case $gans in 1) case "$osname" in 'aix') g4osnamerec=AIX ;; 'dec_osf') g4osnamerec=DEC ;; 'hpux') g4osnamerec=HP ;; 'linux') g4osnamerec=Linux ;; 'irix') g4osnamerec=SGI ;; 'sunos') g4osnamerec=SUN ;; 'win32') g4osnamerec=WIN32 ;; 'darwin') g4osnamerec=Darwin ;; esac dflt=$g4osname rp="What is your OS'?" . .config/UU/myread tans=$ans if test X$tans != X$g4osnamerec ; then echo "" echo "You are configuring Geant4 for a different platform to the native system!" echo "You are on your own!!!" dflt=$tans rp="Confirm your selection or set native '$g4osnamerec'!" . .config/UU/myread tans=$ans fi g4osname=$tans ;; 2) case "$g4osname" in 'AIX') g4compilerrec=xlC ;; 'DEC') g4compilerrec=cxx ;; 'HP') g4compilerrec=aCC ;; 'Linux') g4compilerrec=g++ ;; 'SGI') g4compilerrec=CC ;; 'SUN') g4compilerrec=CC ;; 'WIN32') g4compilerrec=VC ;; 'Darwin') g4compilerrec=g++ ;; esac dflt=$g4compiler rp="Which C++ compiler?" . .config/UU/myread tans=$ans if test X$tans != X$g4compilerrec ; then echo " " echo "The recommmended compiler for this platform ($g4osname) is $g4compilerrec." echo "Use of $tans on $g4osname is not supported - you are on your own!" dflt=$tans rp="Confirm your selection or set recommended '$g4compilerrec'!" . .config/UU/myread tans=$ans fi g4compiler=$tans ;; *) break ;; esac done fi # # Ask about compiler used. # g4system=$g4osname-$g4compiler fi cd .config/UU myuname=`( ($uname -a) 2>/dev/null || hostname) 2>&1` myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \ ./tr '[A-Z]' '[a-z]' | tr '\012' ' '` newmyuname="$myuname" dflt=n cd ../.. if [ X$g4build = X ] ; then if test -f $src/.config/bin/$g4system/env.sh; then # create not_display flag if [ X$g4ldlibs != X -o X$g4ldflags != X -o X$g4cxxflags != X -o X$g4cppflags != X -o X$g4incflags != X ] ; then g4non_display=yes # echo g4non_display=$g4non_display fi if [ X$install = Xyes ] ; then $rm -rf .config/UU . $src/.config/bin/$g4system/move.sh exit 1 fi #end of cppflags if [ X$g4cppflags = Xyes ] ; then . $src/.config/bin/$g4system/env.sh CPPFLAGS=`grep 'CPPFLAGS_FINAL :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\):=//'` # echo CPPFLAGS=$CPPFLAGS echo $CPPFLAGS $rm -rf .config/UU exit 1 fi #end of cppflags if [ X$g4cxxflags = Xyes ] ; then . $src/.config/bin/$g4system/env.sh CXXFLAGS=`grep 'CXXFLAGS_FINAL :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\):=//'` # echo CXXFLAGS=$CXXFLAGS echo $CXXFLAGS $rm -rf .config/UU exit 1 fi #end of cxxflags g4install_lib_AAA=`echo $g4install/lib|sed -e "s/\//AAA/g"` g4final_install_lib_AAA=`echo $g4final_install/lib/geant4|sed -e "s/\//AAA/g"` ############################################################################# if [ X$g4incflags = Xyes ] ; then . $src/.config/bin/$g4system/env.sh ### Getting G4FIRST_INSTALL G4FIRST_INSTALL_AAA=`grep 'G4INSTALL =' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\)= //'|$sed -e 's/\//AAA/g'` G4INSTALL_AAA=`echo $G4INSTALL|sed -e "s/\//AAA/g"` ### INCFLAGS_AAA=`grep 'INCFLAGS_FINAL :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\):=//'|$sed -e 's/\//AAA/g'` # echo INCFLAGS_AAA=$INCFLAGS_AAA # echo G4INSTALL_AAA=$G4INSTALL_AAA # echo G4FIRST_INSTALL_AAA=$G4FIRST_INSTALL_AAA INCFLAGS_AAA_NEW=`echo $INCFLAGS_AAA| $sed -e "s/$G4FIRST_INSTALL_AAA/$G4INSTALL_AAA/g"` # echo INCFLAGS_AAA_NEW=$INCFLAGS_AAA_NEW INCFLAGS=`echo $INCFLAGS_AAA_NEW| $sed -e "s/AAA/\//g"` # echo INCFLAGS=$INCFLAGS if [ X$G4INCLUDE = X ] ; then echo $INCFLAGS else echo -I$G4INCLUDE fi $rm -rf .config/UU exit 1 fi #end of incflags ############################################################################# ############################################################################# if [ X$g4ldflags = Xyes ] ; then . $src/.config/bin/$g4system/env.sh ### Getting G4FIRST_INSTALL G4FIRST_LIB_AAA=`grep 'G4LIB =' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\)= //'|$sed -e 's/\//AAA/g'` G4LIB_AAA=`echo $G4LIB|sed -e "s/\//AAA/g"` ### # G4FIRST_INSTALL_LIB_AAA=${G4FIRST_INSTALL_AAA}AAAlib # G4INSTALL_LIB_AAA=${G4INSTALL_AAA}AAAlibAAAgeant4 # echo G4FIRST_INSTALL_LIB_AAA=$G4FIRST_INSTALL_LIB_AAA # echo G4INSTALL_LIB_AAA=$G4INSTALL_LIB_AAA LDFLAGS_AAA=`grep 'LDFLAGS_FINAL :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | $sed -e 's/^\(.*\):=//'|$sed -e 's/\//AAA/g'` LDFLAGS_AAA_NEW=`echo $LDFLAGS_AAA| $sed -e "s/$G4FIRST_LIB_AAA/$G4LIB_AAA/g"` LDFLAGS=`echo $LDFLAGS_AAA_NEW| $sed -e "s/AAA/\//g"` # echo LDFLAGS=$LDFLAGS echo $LDFLAGS $rm -rf .config/UU exit 1 fi #end of ldflags ############################################################################# if [ X$g4ldlibs = Xyes ] ; then # cat >&2 <&2 </dev/null 2>&1; then eval "`grep myuname= $src/.config/bin/$g4system/config.sh`" fi if test "X$myuname" = "X$newmyuname"; then dflt=y fi fi cd .config/UU ;; *) dflt=y;; esac cd ../.. if test -f $src/.config/bin/$g4system/config.sh; then echo " " rp="There exists a config.sh file. Shall I use it to set the defaults?" . .config/UU/myread case "$ans" in n*|N*) echo "OK, I'll ignore it."; mv $src/.config/bin/$g4system/config.sh $src/.config/bin/$g4system/config.sh.old;; *) echo "Fetching default answers from your old config.sh file..." >&4 tmp_n="$n" tmp_c="$c" tmp_sh="$sh" . $src/.config/bin/$g4system/config.sh cp $src/.config/bin/$g4system/config.sh .config/UU n="$tmp_n" c="$tmp_c" : Older versions did not always set $sh. Catch re-use of such : an old config.sh. case "$sh" in '') sh="$tmp_sh" ;; esac hint=previous ;; esac fi cd .config/UU ;; *) echo " " echo "Fetching default answers from $config_sh..." >&4 tmp_n="$n" tmp_c="$c" cd ../.. cp $config_sh config.sh 2>/dev/null chmod +w config.sh . ./config.sh cd .config/UU cp ../config.sh . n="$tmp_n" c="$tmp_c" hint=previous ;; esac test "$override" && . ./optdef.sh myuname="$newmyuname" : Restore computed paths for file in $loclist $trylist; do eval $file="\$_$file" done : who configured the system cf_time=`$date 2>&1` cf_by=`(logname) 2>/dev/null` case "$cf_by" in "") cf_by=`(whoami) 2>/dev/null` case "$cf_by" in "") cf_by=unknown ;; esac ;; esac cat <qt $startsh # # Autoconf(ish) style check for Qt headers, libraries and moc application # # # These are variables that the final unit generated script may use # with_qt_dir="\$qt_search_dir" # # Only run if we haven't succesfully found Qt already # if test "x\$g4_qt_is_configured" = "x" ; then # # Flag specifying if we've configured Qt o.k. # g4_qt_is_configured="yes" # Optimism # Flag to be set if any part of configuration fails g4_havegoodqt="yes" # Optimism # Qt4 flag g4_is_qt4="no" # Variables to be set g4_qt_include_dir='' g4_qt_lib_dir='' g4_qt_moc='' g4_qt_version='' g4_qt_cxxflags='' g4_qt_gl_cxxflags='' g4_qt_libs='' g4_qt_gl_libs='' # # User may supply a value for 'QTDIR' and in that case we ASSUME a # Trolltech style installation or a Mac Framework. The latter has a # higher priority in the list of search paths because otherwise we may # miss the presence of a Framework (see Bug #1095) # if test "x\$with_qt_dir" != "x" ; then g4_qt_dir="\$with_qt_dir" g4_qt_possible_qt_include_dirs="\$with_qt_dir/QtCore.framework/Headers \$with_qt_dir/lib*/QtCore.framework/Headers \$with_qt_dir/include/QtCore \$with_qt_dir/include/Qt \`ls -dr \$with_qt_dir/include/qt*/QtCore 2>/dev/null\` \`ls -dr \$with_qt_dir/include/qt*/Qt 2>/dev/null\` \`ls -dr \$with_qt_dir/include/qt* 2>/dev/null\` \$with_qt_dir/include" # Check for qglobal.h g4_qglobal_loc=\`./loc qglobal.h no \$g4_qt_possible_qt_include_dirs\` if test "x\$g4_qglobal_loc" = "xno" ; then g4_havegoodqt=no g4_qt_include_dir=no fi echo "checking for qglobal.h... \$g4_qglobal_loc" if test "x\$g4_qglobal_loc" != "xno" ; then g4_qt_include_dir="\`dirname \$g4_qglobal_loc\`" fi else # We use standard search paths, again preferencing Frameworks so that # these are not missed qt_direct_test_header="qglobal.h" g4_qt_include_path_list=" \`ls -dr /Library/Frameworks/QtCore.framework/Headers 2>/dev/null\` \`ls -dr /System/Library/Frameworks/QtCore.framework/Headers 2>/dev/null\` \`ls -dr /usr/local/Qt*/QtCore.framework/Headers 2>/dev/null\` \`ls -dr /usr/local/Qt*/lib*/QtCore.framework/Headers 2>/dev/null\` \`ls -dr /usr/local/lib*/Qt*/QtCore.framework/Headers 2>/dev/null\` \`ls -dr /opt/local/Qt*/QtCore.framework/Headers 2>/dev/null\` \`ls -dr /opt/local/Qt*/lib*/QtCore.framework/Headers 2>/dev/null\` \`ls -dr /opt/local/lib/Qt*/QtCore.framework/Headers 2>/dev/null\` \`ls -dr /opt/local/lib*/QtCore.framework/Headers 2>/dev/null\` \`ls -dr /opt/Qt*/QtCore.framework/Headers 2>/dev/null\` \`ls -dr /opt/Qt*/lib*/QtCore.framework/Headers 2>/dev/null\` \`ls -dr /usr/lib/QtCore.framework/Headers 2>/dev/null\` \`ls -dr /usr/lib/Qt*/QtCore.framework/Headers 2>/dev/null\` /usr/include/QtCore \`ls -dr /usr/include/qt*/QtCore 2>/dev/null\` \`ls -dr /usr/local/include/QtCore 2>/dev/null\` \`ls -dr /usr/local/include/qt*/QtCore 2>/dev/null\` \`ls -dr /usr/local/qt*/include/QtCore 2>/dev/null\` \`ls -dr /opt/qt*/include/QtCore 2>/dev/null\` \`ls -dr /usr/qt*/include/QtCore 2>/dev/null\` \`ls -dr /usr/qt/*/include/QtCore 2>/dev/null\` \`ls -dr /usr/include/qt/*/QtCore 2>/dev/null\` \`ls -dr /sw/include/QtCore 2>/dev/null\` \`ls -dr /sw/qt*/include/QtCore 2>/dev/null\` \`ls -dr /sw/qt/*/include/QtCore 2>/dev/null\` /usr/include \`ls -dr /usr/include/qt* 2>/dev/null\` \`ls -dr /usr/local/include 2>/dev/null\` \`ls -dr /usr/local/include/qt* 2>/dev/null\` \`ls -dr /usr/local/qt*/include 2>/dev/null\` \`ls -dr /opt/qt*/include 2>/dev/null\` \`ls -dr /usr/qt*/include 2>/dev/null\` \`ls -dr /usr/qt/*/include 2>/dev/null\` \`ls -dr /usr/include/qt/* 2>/dev/null\` \`ls -dr /sw/include 2>/dev/null\` \`ls -dr /sw/qt*/include 2>/dev/null\` \`ls -dr /sw/qt/*/include 2>/dev/null\` /usr/include/Qt \`ls -dr /usr/include/qt*/Qt 2>/dev/null\` \`ls -dr /usr/local/include/Qt 2>/dev/null\` \`ls -dr /usr/local/include/qt*/Qt 2>/dev/null\` \`ls -dr /opt/qt*/include/Qt 2>/dev/null\` \`ls -dr /usr/qt*/include/Qt 2>/dev/null\` \`ls -dr /usr/qt/*/include/Qt 2>/dev/null\` \`ls -dr /usr/include/qt/*/Qt 2>/dev/null\` \`ls -dr /sw/include/Qt 2>/dev/null\` \`ls -dr /sw/qt*/include/Qt 2>/dev/null\` \`ls -dr /sw/qt/*/include/Qt 2>/dev/null\` " # Find ALL installed versions of qglobal.h for g4_qt_dir in \$g4_qt_include_path_list ; do if test -r "\$g4_qt_dir/\$qt_direct_test_header" ; then g4_qt_found_dirs="\$g4_qt_found_dirs \$g4_qt_dir" fi done # Which one relates to the newest Qt? g4_qt_prev_ver=0 for g4_qt_dir in \$g4_qt_found_dirs ; do g4_qt_this_ver=\`grep -w '#define QT_VERSION' \$g4_qt_dir/\$qt_direct_test_header | sed s/'#define QT_VERSION'//\` if expr \$g4_qt_this_ver '>' \$g4_qt_prev_ver > /dev/null ; then g4_qt_include_dir=\$g4_qt_dir g4_qt_prev_ver=\$g4_qt_this_ver fi done if test "x\$g4_qt_include_dir" = "x" ; then g4_qt_include_dir=no g4_havegoodqt=no echo "checking for qglobal.h... no" else echo "checking for qglobal.h... \$g4_qt_include_dir/qglobal.h" fi fi # END TEST with_qt_dir is set # # Result of above tests should have given us g4_qt_include_dir # We can now use this to check other things, taking care to deal with the # correct paths... # # Immediate and obvious Darwin check... if test "x\`basename \$g4_qt_include_dir\`" = "xHeaders" ; then #check for moc - we have a framework so we first need to check for #a bin directory below g4_qt_include_dir. Depending on how the #Framework was installed, this may be below the level that #QtCore.framework is at. # Find base framework directory g4_qt_fmwk_base_dir=\`dirname \$g4_qt_include_dir\` g4_qt_fmwk_base_dir=\`dirname \$g4_qt_fmwk_base_dir\` if test "x\`basename \$g4_qt_fmwk_base_dir\`" = "xlib" ; then #This is probably an independent install echo "checking Mac Framework location... trolltech/custom" g4_qt_dir=\`dirname \$g4_qt_fmwk_base_dir\` #Check for moc if test -x "\$g4_qt_dir/bin/moc" ; then g4_qt_moc="\$g4_qt_dir/bin/moc" echo "checking for moc... \$g4_qt_moc" g4_qt_version="4" g4_qt_cxxflags="-I\$g4_qt_dir/lib/QtCore.framework/Headers -I\$g4_qt_dir/lib/QtGui.framework/Headers" g4_qt_gl_cxxflags="-I\$g4_qt_dir/lib/QtOpenGl.framework/Headers" g4_qt_libs="-F\$g4_qt_dir/lib -framework QtCore -framework QtGui" g4_qt_gl_libs="-framework QtOpenGL" else echo "checking for moc... no" g4_havegoodqt=no fi elif test "x\`basename \$g4_qt_fmwk_base_dir\`" = "xFrameworks" ; then #This looks like a system install echo "Checking Mac Framework location... Frameworks" if test -x "/usr/bin/moc" ; then g4_qt_moc="/usr/bin/moc" echo "checking for moc... \$g4_qt_moc" g4_qt_dir=\$g4_qt_fmwk_base_dir g4_qt_version="4" g4_qt_cxxflags="-I\$g4_qt_dir/QtCore.framework/Headers -I\$g4_qt_dir/QtGui.framework/Headers" g4_qt_gl_cxxflags="-I\$g4_qt_dir/QtOpenGl.framework/Headers" g4_qt_libs="-F\$g4_qt_dir -framework QtCore -framework QtGui" g4_qt_gl_libs="-framework QtOpenGL" else echo "checking for moc... no" g4_havegoodqt=no fi fi elif test "x\$g4_qt_include_dir" != "x" ; then # Probably have Unix-style installation, in which case estimated # 'QTDIR' equivalent is $with_qt_dir if supplied, or directory # one level below the 'include' directory in \$g4_qt_include_dir if test "x\$with_qt_dir" = "x" ; then # We need to strip g4_qt_include_dir, if it was found g4_qt_dir=\$g4_qt_include_dir # Only do this IF there's an 'include' in the path name! if test "x\`echo \$g4_qt_dir | grep include\`" != "x" ; then while test "x\`basename \$g4_qt_dir\`" != "xinclude" ; do g4_qt_dir=\`dirname \$g4_qt_dir\` done fi #Now should be one level above equivalent QTDIR g4_qt_dir=\`dirname \$g4_qt_dir\` fi # At this point, we need get Qt version of detected qglobal.h because # Qt3/4 libraries MAY be installed alongside each other... qt_direct_test_header=qglobal.h g4_qt_major_ver=\`grep QT_VERSION_STR \$g4_qt_include_dir/\$qt_direct_test_header 2>/dev/null | sed 's/.* \"\([0-9]\)\..*\"/\1/'\` # # We might have an odd install where our found qglobal.h #includes # the real qglobal... # if test "x\$g4_qt_major_ver" = "x" ; then # check for a #include of qglobal... possible_actual_qglobal=\`grep '#include.*qglobal' \$g4_qt_include_dir/\$qt_direct_test_header 2>/dev/null\` if test "x\$possible_actual_qglobal" != "x" ; then #We did get something, and it's likely the include #will give us a relative path (but an ASSUMPTION at present) relative_path_to_qglobal=\`grep '#include.*qglobal' \$g4_qt_include_dir/\$qt_direct_test_header 2>/dev/null | sed 's/.*\"\(.*\)\"/\1/'\` if test -r \$g4_qt_include_dir/\$relative_path_to_qglobal ; then g4_qt_major_ver=\`grep QT_VERSION_STR \$g4_qt_include_dir/\$relative_path_to_qglobal 2>/dev/null | sed 's/.* \"\([0-9]\)\..*\"/\1/'\` else g4_qt_major_ver=no g4_havegoodqt=no fi else g4_qt_major_ver=no g4_havegoodqt=no fi fi #END TEST odd qglobal includes qglobal behaviour if test "x\$g4_qt_major_ver" = "x4" ; then g4_is_qt4=yes else g4_is_qt4=no fi echo "checking Qt major version... \$g4_qt_major_ver" # # We also need to check for Qt4 installations with QtCore type # directory structures. That being the case, make sure we have # the extra headers.. # if test "x\`basename \$g4_qt_include_dir\`" = "xQtCore" ; then g4_qt_extra_headers="" g4_qt_gl_headers="" g4_qt_extra_packages="QtGui" g4_qt_gl_packages="QtOpenGL" for i in \$g4_qt_extra_packages ; do if test -d "\`dirname \$g4_qt_include_dir\`/\$i" ; then echo "checking for \$i headers... yes" g4_qt_extra_headers="\$g4_qt_extra_headers \`dirname \$g4_qt_include_dir\`/\$i" else echo "checking for \$i headers... no" g4_havegoodqt=no fi done for i in \$g4_qt_gl_packages ; do if test -d "\`dirname \$g4_qt_include_dir\`/\$i" ; then echo "checking for \$i headers... yes" g4_qt_gl_headers="\$g4_qt_gl_headers \`dirname \$g4_qt_include_dir\`/\$i" else echo "checking for \$i headers... no" g4_havegoodqt=no fi done fi #END TEST QtCore style install # # Now check for appropriate library... # if test -d "\$g4_qt_dir/lib64" ; then # Damn, this doesn't guarantee we're on a 64bit system, some distros/packages # will have a lib64 dir even on an i*86 machine... # We don't ever cross-compile Geant4, so must have the native libraries. # Double check for this craziness... case "`uname -m`" in i*86) g4_qt_lib_dir=\$g4_qt_dir/lib ;; *) g4_qt_lib_dir=\$g4_qt_dir/lib64 ;; esac else g4_qt_lib_dir=\$g4_qt_dir/lib fi if test "x\$g4_is_qt4" = "xyes" ; then g4_qt_lib="\`ls \$g4_qt_lib_dir/libQtCore* 2> /dev/null | sed -n 1p | sed s@\$g4_qt_lib_dir/lib@@ | sed s@[.].*@@\`" if test "x\$g4_qt_lib" = "x" ; then # We might be on Windows... g4_qt_lib="\`ls \$g4_qt_lib_dir/QtCore4.lib 2> /dev/null | sed -n 1p | sed s@\$g4_qt_lib_dir/@@\`" fi if test "x\$g4_qt_lib" != "x" ; then echo "checking for QtCore library... \$g4_qt_lib" else echo "checking for QtCore library... no" g4_havegoodqt=no fi else g4_qt_lib="\`ls \$g4_qt_lib_dir/libqt-mt.* \$g4_qt_lib_dir/libqt.* 2> /dev/null | sed -n 1p | sed s@\$g4_qt_lib_dir/lib@@ | sed s@[.].*@@\`" if test "x\$g4_qt_lib" != "x" ; then echo "checking for qt-mt or qt library... \$g4_qt_lib" # On Darwin we also need libqui for Qt3 if test "x\$osname" = "xdarwin" ; then g4_qt_lib_qui="\`ls \$g4_qt_lib_dir/libqui.* 2> /dev/null | sed -n 1p | sed s@\$g4_qt_lib_dir/lib@@ | sed s@[.].*@@\`" if test "x\$g4_qt_lib_qui" != "x" ; then echo "checking for qui library... yes" else echo "checking for qui library... no" g4_havegoodqt=no fi fi else echo "checking for qt-mt or qt library... no" g4_havegoodqt=no fi fi #END TEST for Qt4/3 libraries # # Finally, we need to search for moc # We use prior knowledge of the detected Qt version to # try and grab the correct moc straight off. # g4_qt_bin_dir=\$g4_qt_dir/bin g4_qtmoc=no g4_qt_cross_check_moc=no if test "x\$g4_is_qt4" = "xyes" ; then # Try the qt4 variants first... if test -x "\$g4_qt_bin_dir/moc-qt4" ; then g4_qtmoc="\$g4_qt_bin_dir/moc-qt4" elif test -x "\$g4_qt_bin_dir/qt4-moc" ; then g4_qtmoc="\$g4_qt_bin_dir/qt4-moc" elif test -x "\$g4_qt_bin_dir/moc" ; then g4_qtmoc="\$g4_qt_bin_dir/moc" g4_qt_cross_check_moc=yes else g4_havegoodqt=no fi else # We've probably got Qt3, so check for # the qt3 variants first if test -x "\$g4_qt_bin_dir/moc-qt3" ; then g4_qtmoc="\$g4_qt_bin_dir/moc-qt3" elif test -x "\$g4_qt_bin_dir/qt3-moc" ; then g4_qtmoc="\$g4_qt_bin_dir/qt3-moc" elif test -x "\$g4_qt_bin_dir/moc" ; then g4_qtmoc="\$g4_qt_bin_dir/moc" g4_qt_cross_check_moc=yes else g4_havegoodqt=no fi fi echo "checking for moc... \$g4_qtmoc" # # If pure 'moc' was found, cross check its version # against previously detected Qt major version # if test "x\$g4_qt_cross_check_moc" = "xyes" ; then $echo $n "Checking \$g4_qtmoc major version is \$g4_qt_major_ver... $c" # Grab version of found moc g4_qt_found_moc_major_version=\`\$g4_qtmoc -v 2>&1 | sed 's/^.*(Qt \([0-9]\)\..*/\1/'\` if test "x\$g4_qt_found_moc_major_version" != "x\$g4_qt_major_ver" ; then # We need to ask the user where correct moc is $echo "no" promptend="no" user_moc="\$g4_qtmoc" while test "x\$promptend" = "xno" ; do echo " " g4message=\`cat << EOM Qt moc was found as \$user_moc and has major version \$g4_qt_found_moc_major_version. This does not match the version of the detected Qt install which is \$g4_qt_major_ver. Please enter the full path to the moc program which matches this Qt version, or type '-' to CANCEL the Qt checks. EOM\` dflt="\$user_moc" rp=\$g4message . ./myread # Check for user cancellation if test "x\$ans" = "x-" ; then g4_havegoodqt="no" g4_qtmoc="" promptend="yes" else user_moc="\$ans" if test -x "\$user_moc" ; then g4_qt_found_moc_major_version=\`\$user_moc -v 2>&1 | sed 's/^.*(Qt \([0-9]\)\..*/\1/'\` if test "x\$g4_qt_found_moc_major_version" != "x\$g4_qt_major_ver" ; then echo "Checking if \$user_moc version is \$g4_qt_major_ver... no" else echo "Checking if \$user_moc version is \$g4_qt_major_ver... yes" g4_qtmoc=\$user_moc promptend=yes fi else echo "warning: \$user_moc is not executable." user_moc="" g4_qt_found_moc_major_version="" fi fi # We need to ask the user where correct moc is done else $echo "yes" fi fi ## THIS IS POINT AT WHICH TO DO FALLBACK TESTS I.E DOES ## COMPILATION OF SMALL TEST PROGRAM WORK - THEN HEADERS AND ## LIBS ARE AUTOMATICALLY FOUND BY LINKER # ## Finally, set output variables, raw for now # if test "x\$g4_havegoodqt" = "xyes" ; then g4_qt_version=\$g4_qt_major_ver # Take care of Qt4 style header structure... if test "x\`basename \$g4_qt_include_dir\`" = "xQtCore"; then g4_qt_cxxflags="-I\`dirname \$g4_qt_include_dir\` -I\$g4_qt_include_dir" else g4_qt_cxxflags="-I\$g4_qt_include_dir" fi if test "x\$g4_is_qt4" = "xyes" ; then for i in \$g4_qt_extra_headers ; do g4_qt_cxxflags="\$g4_qt_cxxflags -I\$i" done for i in \$g4_qt_gl_headers ; do g4_qt_gl_cxxflags="\$g4_qt_gl_cxxflags -I\$i" done fi g4_qt_libs="-L\$g4_qt_lib_dir" if test "x\$g4_qt_lib" = "xQtCore4.lib" ; then #We have Windows... g4_qt_libs="\$g4_qt_libs QtCore4.lib QtGui4.lib" g4_qt_gl_libs="QtOpenGL4.lib" else g4_qt_libs="\$g4_qt_libs -l\$g4_qt_lib" if test "x\$g4_is_qt4" = "xyes" ; then g4_qt_libs="\$g4_qt_libs -lQtGui" g4_qt_gl_libs="-lQtOpenGL" fi fi if test "x\$g4_qt_lib_qui" != "x" ; then g4_qt_libs="\$g4_qt_libs -lqui" fi g4_qt_moc=\$g4_qtmoc g4_qt_is_configured=yes else g4_qt_is_configured='' fi else #We couldn't find qglobal... g4_havegoodqt="no" fi #END TEST for Darwin Framework else #Probably also want flags here to reset variables if requested echo "configure: Qt already configured, no recheck neccessary" fi #END TEST "x\$g4_qt_is_configured" = "x" EOSC : decide how portable to be case "$d_portable" in "$define") dflt=y;; *) dflt=n;; esac $cat <<'EOH' I can set things up so that your shell scripts and binaries are more portable, at what may be a noticable cost in performance. In particular, if you ask to be portable, the following happens: 1) Shell scripts will rely on the PATH variable rather than using the paths derived above. 2) ~username interpretations will be done at run time rather than by Configure. EOH rp="Do you expect to run these scripts and binaries on multiple machines?" . ./myread case "$ans" in y*) d_portable="$define" ;; *) d_portable="$undef" ;; esac : set up shell script to do ~ expansion cat >filexp <&2 exit 1 fi case "\$1" in */*) echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\` ;; *) echo \$dir ;; esac fi ;; *) echo \$1 ;; esac EOSS chmod +x filexp $eunicefix filexp : now set up to get a file name cat <getfile $startsh EOS cat <<'EOSC' >>getfile tilde='' fullpath='' already='' skip='' none_ok='' exp_file='' nopath_ok='' orig_rp="$rp" orig_dflt="$dflt" case "$fn" in *\(*) expr $fn : '.*(\(.*\)).*' | tr ',' '\012' >getfile.ok fn=`echo $fn | sed 's/(.*)//'` ;; esac case "$fn" in *:*) loc_file=`expr $fn : '.*:\(.*\)'` fn=`expr $fn : '\(.*\):.*'` ;; esac case "$fn" in *~*) tilde=true;; esac case "$fn" in */*) fullpath=true;; esac case "$fn" in *+*) skip=true;; esac case "$fn" in *n*) none_ok=true;; esac case "$fn" in *e*) exp_file=true;; esac case "$fn" in *p*) nopath_ok=true;; esac case "$fn" in *f*) type='File';; *d*) type='Directory';; *l*) type='Locate';; esac what="$type" case "$what" in Locate) what='File';; esac case "$exp_file" in '') case "$d_portable" in "$define") ;; *) exp_file=true;; esac ;; esac cd ../.. while test "$type"; do redo='' rp="$orig_rp" dflt="$orig_dflt" case "$tilde" in true) rp="$rp ";; esac . .config/UU/myread if test -f .config/UU/getfile.ok && \ $contains "^$ans\$" .config/UU/getfile.ok >/dev/null 2>&1 then value="$ans" ansexp="$ans" break fi case "$ans" in none) value='' ansexp='' case "$none_ok" in true) type='';; esac ;; *) case "$tilde" in '') value="$ans" ansexp="$ans";; *) value=`.config/UU/filexp $ans` case $? in 0) if test "$ans" != "$value"; then echo "(That expands to $value on this system.)" fi ;; *) value="$ans";; esac ansexp="$value" case "$exp_file" in '') value="$ans";; esac ;; esac case "$fullpath" in true) case "$ansexp" in /*) value="$ansexp" ;; *) redo=true case "$already" in true) echo "I shall only accept a full path name, as in /bin/ls." >&4 echo "Use a ! shell escape if you wish to check pathnames." >&4 ;; *) echo "Please give a full path name, starting with slash." >&4 case "$tilde" in true) echo "Note that using ~username is ok provided it expands well." >&4 already=true ;; esac esac ;; esac ;; esac case "$redo" in '') case "$type" in File) if test -f "$ansexp"; then type='' elif test -r "$ansexp" || (test -h "$ansexp") >/dev/null 2>&1 then echo "($value is not a plain file, but that's ok.)" type='' fi ;; Directory) if test -d "$ansexp"; then type='' fi ;; Locate) if test -d "$ansexp"; then echo "(Looking for $loc_file in directory $value.)" value="$value/$loc_file" ansexp="$ansexp/$loc_file" fi if test -f "$ansexp"; then type='' fi case "$nopath_ok" in true) case "$value" in */*) ;; *) echo "Assuming $value will be in people's path." type='' ;; esac ;; esac ;; esac case "$skip" in true) type=''; esac case "$type" in '') ;; *) if test "$fastread" = yes; then dflt=y else dflt=n fi rp="$what $value doesn't exist. Use that name anyway?" . .config/UU/myread dflt='' case "$ans" in y*) type='';; *) echo " ";; esac ;; esac ;; esac ;; esac done cd .config/UU ans="$value" # Check for Windows! if test "X$g4system" = "XWIN32-VC" -o "X$g4system" = "XWIN32-VC7"; then checkdrive=`echo $ans|cut -d"/" -f2` if test "X$checkdrive" = "Xcygdrive"; then windrive=`echo $ans|cut -d"/" -f3` winpath=`echo $ans|cut -d"/" -f4-` fullwinpath="$windrive:/$winpath" ans=$fullwinpath fi # if cygwin syntax is used fi # if Win rp="$orig_rp" dflt="$orig_dflt" rm -f getfile.ok EOSC echo " " echo "*OPTIONS FOR GEANT4 INSTALLATION PATHS*" if [ X$src = X. ] ; then cd ../.. abssrc=`pwd` cd .config/UU else abssrc=$src fi case "$g4conf" in '') g4conf=$abssrc/.config/bin/$g4system ;; esac case "$g4install" in '') if test $g4system = "WIN32-VC" -o $g4system = "WIN32-VC7"; then g4install=$abssrc else g4install=$abssrc fi # Check for Windows! if test $g4system = "WIN32-VC" -o $g4system = "WIN32-VC7"; then checkdrive=`echo $g4install|cut -d"/" -f2` if test $checkdrive = "cygdrive"; then windrive=`echo $g4install|cut -d"/" -f3` winpath=`echo $g4install|cut -d"/" -f4-` fullwinpath="$windrive:/$winpath" g4install=$fullwinpath fi fi ;; esac case "$g4final_install" in '') g4final_install=$g4install ;; esac case "$g4workdir" in '') g4workdir=$g4install ;; esac case "$g4includes_flag" in '') g4includes_flag=n ;; esac g4message="What is the path to the Geant4 source tree?" dflt=$g4install fn='d~' rp=$g4message . ./getfile g4install=$ans g4workdir=$g4install ################################# echo " " g4message="Where should Geant4 be installed?" dflt=$g4final_install fn='d~' rp=$g4message . ./getfile g4final_install=$ans ################################## echo " " g4message="Do you want to install all Geant4 headers in one directory?" dflt=$g4includes_flag rp=$g4message . ./myread g4includes_flag=$ans if [ X$g4includes_flag = Xy ] ; then case "$g4include" in '') g4include=$g4install/include ;; esac # Set constantly! if [ X$g4install != X$g4final_install ] ; then g4include=$g4final_install/include/geant4 else g4include=$g4final_install/include fi fi echo " " echo "*GEANT4 LIBRARY BUILD OPTIONS*" if test "X$g4system" = "XWIN32-VC" -o "X$g4system" = "XWIN32-VC7"; then while test 1 = 1 ; do g4message="Do you want to build DLL (.dll) libraries?" dflt=$g4lib_build_dll rp=$g4message . ./myread gans=$ans case $gans in n*|N*) g4lib_build_dll=n g4lib_build_shared=n g4lib_build_static=y break ;; y*|Y*) g4lib_build_dll=y g4lib_build_shared=n g4lib_build_static=n break ;; esac done fi if test "X$g4system" != "XWIN32-VC" -a "X$g4system" != "XWIN32-VC7" ; then while test 1 = 1 ; do g4message="Do you want to build shared libraries?" dflt=$g4lib_build_shared rp=$g4message . ./myread gans=$ans case $gans in n*|N*) g4lib_build_shared=n g4lib_build_static=y break ;; y*|Y*) g4lib_build_shared=y break ;; esac done if [ X$g4lib_build_shared = Xy ] ; then # # Ask about g4lib_build_static - default "n". # while test 1 = 1 ; do g4message="Do you want to build static libraries too?" dflt=n rp=$g4message . ./myread gans=$ans case $gans in n*|N*) g4lib_build_static=n break ;; y*|Y*) g4lib_build_static=y break ;; esac done fi fi # if !Win 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 g4global=n g4granular=n g4lib_use_granular=n fi 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 # # Ask about g4global - default "(empty)". # g4message="Do you want to build global libraries?" dflt=$g4global rp=$g4message . ./myread gans=$ans case $gans in n*|N*) g4global=n g4granular=y g4lib_use_granular=y ;; y*|Y*) g4global=y g4granular=n g4lib_use_granular=n ;; esac if [ X$g4global = Xy ] ; then # # Ask about g4granular - default "n". # g4message="Do you want to build granular libraries as well?" dflt=$g4granular rp=$g4message . ./myread gans=$ans case $gans in n*|N*) g4granular=n ;; y*|Y*) g4granular=y ;; esac if [ X$g4granular = Xy ] ; then # # Ask about g4lib_use_granular - default "n". # g4message="Do you want to use granular libraries in your applications?" dflt=$g4lib_use_granular rp=$g4message . ./myread gans=$ans case $gans in n*|N*) g4lib_use_granular=n ;; y*|Y*) g4lib_use_granular=y ;; esac fi fi fi # !Win ### End file - without will be problem! Check in others... g4message="Do you want to build libraries with debugging information?" dflt=$g4debug rp=$g4message . ./myread gans=$ans case $gans in n*|N*) g4debug=n ;; y*|Y*) g4debug=y ;; esac g4data_photonevaporation_version='PhotonEvaporation2.0' g4data_radioactivedecay_version='RadioactiveDecay3.2' g4data_g4emlow_version='G4EMLOW6.13' g4data_g4ndl_version='G4NDL3.13' g4data_g4abla_version='G4ABLA3.0' g4data_realsurface_version='RealSurface1.0' g4data_neutronxs_version='G4NEUTRONXS1.0' #END GEANT4 DATA OPTIONS echo " " echo "*CHECKS AND OPTIONS FOR GEANT4 PHYSICS DATA FILES*" # # Set defaults for data paths - here, because we depend on g4install # case "$g4data" in '') g4data=$g4install/data ;; esac case "$g4levelgammadata" in '') g4levelgammadata=$g4data/$g4data_photonevaporation_version ;; esac case "$g4radioactivedata" in '') g4radioactivedata=$g4data/$g4data_radioactivedecay_version ;; esac case "$g4ledata" in '') g4ledata=$g4data/$g4data_g4emlow_version ;; esac case "$g4neutronhpcrosssections" in '') g4neutronhpcrosssections=$g4data/$g4data_g4ndl_version ;; esac case "$g4abladata" in '') g4abladata=$g4data/$g4data_g4abla_version ;; esac case "$g4realsurfacedata" in '') g4realsurfacedata=$g4data/$g4data_realsurface_version ;; esac case "$g4neutronxsdata" in '') g4neutronxsdata=$g4data/$g4data_neutronxs_version ;; esac # # Now we have defaults, prompt user to see if this is where they want to use # g4data_alllibs="$g4data_photonevaporation_version $g4data_radioactivedecay_version $g4data_g4emlow_version $g4data_g4ndl_version $g4data_g4abla_version $g4data_realsurface_version $g4data_neutronxs_version" g4message=`cat </dev/null | sed s"/'//"` case $g4_make_version in GNU*) g4_make_isgnu=yes ;; *) g4_make_isgnu=no ;; esac echo "Checking if make is GNU make... $g4_make_isgnu" fi if test "x$g4osname" != "xWIN32" ; then if test "x$g4_gmake_loc" != "xno" ; then g4_gmake_version=`$g4_gmake_loc -v 2>/dev/null | sed s"/'//"` case $g4_gmake_version in GNU*) g4_gmake_isgnu=yes ;; *) g4_gmake_isgnu=no ;; esac echo "Checking if gmake is GNU make... $g4_gmake_isgnu" fi fi # Now perform selection on following logic # 1) If we have gmake AND it's GNU make, use that # 2) If we have make AND it's GNU make, use that # 3) If none of the above, prompt user for path to make program if test "x$g4_gmake_loc" != "xno" -a "x$g4_gmake_isgnu" = "xyes" ; then g4make=$g4_gmake_loc elif test "x$g4_make_loc" != "xno" -a "x$g4_make_isgnu" = "xyes" ; then g4make=$g4_make_loc else g4_got_user_make="no" while test "x$g4_got_user_make" = "xno"; do g4message=`cat << EOM G4MAKE A GNU make program could not be located on your system. Please enter the full path to the GNU make program you want to use: EOM` dflt=$g4make rp=$g4message . ./myread gans=$ans #Check if this is GNU make... g4_user_make_version=`$gans -v 2>/dev/null | sed s"/'//"` case $g4_user_make_version in "GNU Make"*) echo "Checking that $gans is GNU Make... yes" g4make=$gans g4_got_user_make=yes ;; *) echo "Checking that $gans is GNU Make... no" ;; esac done fi echo " " echo "*CHECKS FOR REQUIRED EXTERNAL PACKAGE CLHEP*" if test "X$g4clhep_base_dir" = "X" ; then clhep_dirs=`find $g4clhep_base_dir /usr/local/include /usr/include -type d -name CLHEP 2>/dev/null |xargs echo` fi if test "X$clhep_dirs" != "X" ; then g4clhep_base_dir_found=`echo $clhep_dirs|cut -d" " -f1` g4clhep_base_dir_found=`dirname $g4clhep_base_dir_found` g4clhep_base_dir_found=`dirname $g4clhep_base_dir_found` g4clhep_base_dir=$g4clhep_base_dir_found fi if test "X$g4clhep_base_dir" != "X" ; then echo "checking for a CLHEP installation... $g4clhep_base_dir" echo " " g4message="Is this the CLHEP installation you want to use?" dflt=$g4clhep_base_dir fn='d~' rp=$g4message . ./getfile cend="no" while test "$cend" = "no" ; do if test -e "$ans/include/CLHEP" ; then cend="yes" g4clhep_base_dir=$ans else g4message=`cat << EOM Could not find CLHEP installed in $ans! Please, specify where CLHEP is installed: CLHEP_BASE_DIR: EOM` dflt="" fn='d~' rp=$g4message . ./getfile fi done else g4message=`cat << EOM Could not find CLHEP installed on this system! Please, specify where CLHEP is installed: CLHEP_BASE_DIR: EOM` dflt="" fn='d~' rp=$g4message . ./getfile cend="no" while test "$cend" = "no" ; do if test -e "$ans/include/CLHEP" ; then cend="yes" g4clhep_base_dir=$ans else g4message=`cat << EOM Could not find CLHEP installed in $ans! Please, specify where CLHEP is installed: CLHEP_BASE_DIR: EOM` dflt="" fn='d~' rp=$g4message . ./getfile fi done fi case "$g4clhep_include_dir" in '') g4clhep_include_dir=$g4clhep_base_dir/include ;; esac case "$g4clhep_lib_dir" in '') g4clhep_lib_dir=$g4clhep_base_dir/lib ;; esac case "$g4clhep_lib" in '') if test "X$g4system" = "XWIN32-VC" -o "X$g4system" = "XWIN32-VC7"; then g4clhep_lib="CLHEP.lib" else g4clhep_lib=CLHEP fi ;; esac while test 1 = 1 ; do g4message_1=`cat << You You can customize paths and library name of you CLHEP installation: 1) CLHEP_INCLUDE_DIR: $g4clhep_include_dir 2) CLHEP_LIB_DIR: $g4clhep_lib_dir 3) CLHEP_LIB: $g4clhep_lib You` g4message_2=" need to use full library name with its extension (e.g. libCLHEP.lib)." g4message_3=`cat << EOM To modify default settings, select number above (e.g. 2) EOM` if test "X$g4system" != "XWIN32-VC" -a "X$g4system" != "XWIN32-VC7"; then rp=$g4message_1$g4message_3 else rp=$g4message_1$g4message_2$g4message_3 fi dflt="Press [Enter] for default settings" . ./myread gans=$ans case $gans in 1) dflt=$g4clhep_include_dir fn='d~' rp="Where is the CLHEP include directory?" . ./getfile g4clhep_include_dir=$ans ;; 2) dflt=$g4clhep_lib_dir fn='d~' rp="Where is the CLHEP lib directory?" . ./getfile g4clhep_lib_dir=$ans ;; 3) dflt=$g4clhep_lib rp="What is the name of the CLHEP library?" . ./myread g4clhep_lib=$ans ;; *) break ;; esac done echo " " echo "*OPTIONS FOR GEANT4 USER INTERFACE MODULES*" g4message="Enable building of User Interface (UI) modules?" dflt='y' rp=$g4message . ./myread gans=$ans case $gans in n*|N*) g4ui_none=y ;; y*|Y*) g4ui_none=n ;; esac case $g4ui_none in n) if test "X$g4system" != "XWIN32-VC" -a "X$g4system" != "XWIN32-VC7"; then g4message="Enable building of the XAW (X11 Athena Widget set) UI module?" dflt=$g4ui_build_xaw_session rp=$g4message . ./myread gans=$ans case $gans in n*|N*) g4ui_build_xaw_session=n g4ui_use_xaw=n ;; y*|Y*) g4ui_build_xaw_session=y g4ui_use_xaw=y ;; esac ############################################################ ############################################################ if test "X$g4ui_build_xaw_session" = "Xy" ; then if test "X$g4ui_xawhome" = "X" ; then xaw_dirs=`find $g4ui_xawhome /usr/X11R6/include /usr/local/include /usr/include /sw/include -type d -name Xaw 2>/dev/null |xargs echo` #echo ogl_dirs=$ogl_dirs if test "X$xaw_dirs" != "X" ; then g4xaw_base_dir_found=`echo $xaw_dirs|cut -d" " -f1` #echo g4ogl_base_dir_found=$g4ogl_base_dir_found # That's right: should be 3 times! (e.g./usr/local/lib/libGLU.so -> /usr/local) g4xaw_base_dir_found=`dirname $g4xaw_base_dir_found` g4xaw_base_dir_found=`dirname $g4xaw_base_dir_found` g4xaw_base_dir_found=`dirname $g4xaw_base_dir_found` g4ui_xawhome=$g4xaw_base_dir_found #else #case "$g4ui_xawhome" in #'') # g4ui_xawhome=/usr/X11R6/ # ;; #esac fi fi ########################################################################## #if test "X$g4ui_xawhome" != "X" ; then #xaw_dirs=$g4ui_xawhome #fi if test "X$g4ui_xawhome" != "X" ; then g4message=`cat << EOM You have selected to build the XAW based user interfaces. Specify the correct path where XAW is installed on your system. It was found in $g4ui_xawhome. Press [Enter] to set this path or type the correct one. You can set '-' (without quotation) to CANCEL the XAW flag at all: EOM` dflt=$g4ui_xawhome fn='d~(-)' rp=$g4message . ./getfile cend="no" while test "$cend" = "no" ; do if test -e "$ans/include/X11/Xaw" || [ "X$ans" = "X-" ]; then cend="yes" if test "X$ans" != "X-" ; then g4ui_xawhome=$ans else g4ui_build_xaw_session=n g4ui_use_xaw=n echo " " fi else g4message=`cat << EOM You have selected to build the XAW based user interfaces. But XAW was not found in $ans. Please specify the correct path where XAW is installed on your system. You can set '-' (without quotation) to CANCEL the XAW flag at all: EOM` dflt="" fn='d~(-)' rp=$g4message . ./getfile fi done else g4message=`cat << EOM You have selected to build the XAW based user interfaces. But XAW was not found in expected place. Please specify the correct path where XAW is installed on your system. You can set '-' (without quotation) to CANCEL the XAW flag at all: EOM` dflt="" fn='d~(-)' rp=$g4message . ./getfile cend="no" while test "$cend" = "no" ; do if test -e "$ans/include/X11/Xaw" || [ "X$ans" = "X-" ]; then cend="yes" if test "X$ans" != "X-" ; then g4ui_xawhome=$ans else g4ui_build_xaw_session=n g4ui_use_xaw=n echo " " fi else g4message=`cat << EOM You have selected to build the XAW based user interfaces. But XAW was not found in $ans. Please specify the correct path where XAW is installed on your system. You can set '-' (without quotation) to CANCEL the XAW flag at all: EOM` dflt="" fn='d~(-)' rp=$g4message . ./getfile fi done fi if test "X$g4osname" = "XLinux"; then if test "X$g4ui_xawhome" = "X/usr" -o "X$g4ui_xawhome" = "X/usr/local" ; then g4ui_xawhome="" fi fi fi # g4vis_build_opheglxm_driver ############################################### # Set XMFLAGS and XMLIBS # if test "X$g4ui_build_xaw_session" = "Xy" ; then if test "X$g4osname" = "XAIX" ; then g4ui_xawflags=" -I$g4ui_xawhome/include " g4ui_xawlibs=" -L$g4ui_xawhome/lib -lXaw -lXmu -lXt -lX11 -lXext " fi if test "X$g4osname" = "XLinux" ; then if test "X$g4ui_xawhome" = "X" ; then g4ui_xawflags="" else g4ui_xawflags=" -I$g4ui_xawhome/include " fi if test "X$g4ui_xawhome" = "X/usr/X11R6" -o "X$g4ui_xawhome" = "X" ; then g4ui_xawlibs=" -lXaw " else if test -d "$g4ui_xawhome/lib64" ; then g4ui_xawlibs=" -L$g4ui_xawhome/lib64 -lXaw " else g4ui_xawlibs=" -L$g4ui_xawhome/lib -lXaw " fi fi fi if test "X$g4osname" = "XDarwin" ; then g4ui_xawflags=" -I$g4ui_xawhome/include " g4ui_xawlibs=" -L$g4ui_xawhome/lib -lXaw " fi if test "X$g4osname" = "XDEC" ; then g4ui_xawflags=" -I$g4ui_xawhome/include " g4ui_xawlibs=" -L$g4ui_xawhome/lib -lXaw " fi if test "X$g4osname" = "XHP" ; then g4ui_xawflags=" -I$g4ui_xawhome/include " g4ui_xawlibs=" -L$g4ui_xawhome/lib -lXaw " fi if test "X$g4osname" = "XSGI" ; then g4ui_xawflags=" -I$g4ui_xawhome/include " g4ui_xawlibs=" -L$g4ui_xawhome/lib -lXaw " fi if test "X$g4osname" = "XSUN" ; then g4ui_xawflags=" -I$g4ui_xawhome/include " 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 " fi fi # end of XM build ############################################### ############################################### g4message="Enable building of the X11-Motif (Xm) UI module?" dflt=$g4ui_build_xm_session rp=$g4message . ./myread gans=$ans case $gans in n*|N*) g4ui_build_xm_session=n g4ui_use_xm=n ;; y*|Y*) g4ui_build_xm_session=y g4ui_use_xm=y ;; esac ############################################################ ############################################################ if test "X$g4ui_build_xm_session" = "Xy" ; then if test "X$g4vis_xmhome" = "X" ; then xm_dirs=`find $g4vis_xmhome /usr/X11R6/include /usr/local/include /usr/include /sw/include -type d -name Xm 2>/dev/null |xargs echo` #echo ogl_dirs=$ogl_dirs if test "X$xm_dirs" != "X" ; then g4xm_base_dir_found=`echo $xm_dirs|cut -d" " -f1` #echo g4ogl_base_dir_found=$g4ogl_base_dir_found # That's right: should be twice! (e.g./usr/local/lib/libGLU.so -> /usr/local) g4xm_base_dir_found=`dirname $g4xm_base_dir_found` g4xm_base_dir_found=`dirname $g4xm_base_dir_found` g4vis_xmhome=$g4xm_base_dir_found #else #case "$g4vis_xmhome" in #'') # g4vis_xmhome=/usr/X11R6/ # ;; #esac fi fi ########################################################################## #if test "X$g4vis_xmhome" != "X" ; then #xm_dirs=$g4vis_xmhome #fi if test "X$g4vis_xmhome" != "X" ; then g4message=`cat << EOM You have selected to build the X11-Motif(Xm) based user interfaces. Specify the correct path where Xm is installed on your system. It was found in $g4vis_xmhome. Press [Enter] to set this path or type the correct one. You can set '-' (without quotation) to CANCEL the XM flag at all: EOM` dflt=$g4vis_xmhome fn='d~(-)' rp=$g4message . ./getfile cend="no" while test "$cend" = "no" ; do if test -e "$ans/include/Xm" || [ "X$ans" = "X-" ]; then cend="yes" if test "X$ans" != "X-" ; then g4vis_xmhome=$ans else g4ui_build_xm_session=n g4ui_use_xm=n echo " " fi else g4message=`cat << EOM You have selected to build the X11-Motif(Xm) based user interfaces. But Xm was not found in $ans. Please specify the correct path where Xm is installed on your system. You can set '-' (without quotation) to CANCEL the XM flag at all: EOM` dflt="" fn='d~(-)' rp=$g4message . ./getfile fi done else g4message=`cat << EOM You have selected to build the X11-Motif(Xm) based user interfaces. But Xm was not found in the expected place. Please specify the correct path where Xm is installed on your system. You can set '-' (without quotation) to CANCEL the XM flag at all: EOM` dflt="" fn='d~(-)' rp=$g4message . ./getfile cend="no" while test "$cend" = "no" ; do if test -e "$ans/include/Xm" || [ "X$ans" = "X-" ]; then cend="yes" if test "X$ans" != "X-" ; then g4vis_xmhome=$ans else g4ui_build_xm_session=n g4ui_use_xm=n echo " " fi else g4message=`cat << EOM You have selected to build the X11-Motif(Xm) based user interfaces. But Xm was not found in $ans. Please specify the correct path where Xm is installed on your system. You can set '-' (without quotation) to CANCEL the XM flag at all: EOM` dflt="" fn='d~(-)' rp=$g4message . ./getfile fi done fi if test "X$g4osname" = "XLinux"; then if test "X$g4vis_xmhome" = "X/usr" -o "X$g4vis_xmhome" = "X/usr/local" ; then g4vis_xmhome="" fi fi fi # g4vis_build_opheglxm_driver ############################################### # Set XMFLAGS and XMLIBS # if test "X$g4ui_build_xm_session" = "Xy" ; then if test "X$g4osname" = "XAIX" ; then g4vis_xmflags=" -I$g4vis_xmhome/include " g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm -lXt -lX11 " fi if test "X$g4osname" = "XLinux" ; then if test "X$g4vis_xmhome" = "X" ; then g4vis_xmflags="" else g4vis_xmflags=" -I$g4vis_xmhome/include " fi if test "X$g4vis_xmhome" = "X/usr/X11R6" -o "X$g4vis_xmhome" = "X" ; then g4vis_xmlibs=" -lXm -lXpm " else if test -d "$g4vis_xmhome/lib64" ; then g4vis_xmlibs=" -L$g4vis_xmhome/lib64 -lXm -lXpm " else g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm -lXpm " fi fi fi if test "X$g4osname" = "XDarwin" ; then g4vis_xmflags=" -I$g4vis_xmhome/include " g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm -lXpm " fi if test "X$g4osname" = "XDEC" ; then g4vis_xmflags=" -I$g4vis_xmhome/include " g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm " fi if test "X$g4osname" = "XHP" ; then g4vis_xmflags=" -I$g4vis_xmhome/include/Motif1.2 " g4vis_xmlibs=" -L$g4vis_xmhome/lib/Motif1.2 -lXm " fi if test "X$g4osname" = "XSGI" ; then g4vis_xmflags=" -I$g4vis_xmhome/include " g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm " fi if test "X$g4osname" = "XSUN" ; then g4vis_xmflags=" -I$g4vis_xmhome/include " g4vis_xmlibs=" -L$g4vis_xmhome/lib -L/usr/openwin/lib -L/usr/dt/lib -L/usr/ucblib -R/usr/openwin/lib -lXt -lXm -lX11 " fi fi # end of XM build ############################################### ############################################### fi # if !WIN if test "X$g4system" = "XWIN32-VC" -o "X$g4system" = "XWIN32-VC7"; then g4message="Enable building of the WIN32 Terminal UI module?" dflt=$g4ui_build_win32_session rp=$g4message . ./myread gans=$ans case $gans in n*|N*) g4ui_build_win32_session=n g4ui_use_win32=n ;; y*|Y*) g4ui_build_win32_session=y g4ui_use_win32=y ;; esac fi # if WIN g4message=`cat << EOM G4UI_USE_TCSH Specifies to use the tcsh-style terminal in the application to be built. EOM` dflt=$g4ui_use_tcsh rp=$g4message #. ./myread #gans=$ans gans=y case $gans in n*|N*) g4ui_use_tcsh=n ;; y*|Y*) g4ui_use_tcsh=y ;; esac ;; esac # # BEGIN QT/QTUI PROBE # # Checks applied for all systems ONLY IF g4ui_none HAS NOT BEEN SET TO y if test "x$g4ui_none" = "xn" ; then # Query the user to see if build of Qt UI module is needed g4message="Enable building of the Qt UI module?" # Read in the user response dflt=$g4ui_build_qt_session rp=$g4message . ./myread gans=$ans # Check response and take set variables as needed. case $gans in n*|N*) g4ui_build_qt_session=n g4ui_use_qt=n ;; y*|Y*) g4ui_build_qt_session=y g4ui_use_qt=y ;; esac ########## ########## # Now, if user chose to build module, we need to check for a Qt # installation # if test "x$g4ui_build_qt_session" = "xy" ; then # NB Have to supply arg to qt script, just blank in this case! qt_search_dir="" . ./qt # If we didn't find Qt automatically, then ask user if they know # where it's installed... if test "x$g4_havegoodqt" = "xno" ; then promptend="no" user_qthome="the standard locations" while test "x$promptend" = "xno" ; do g4message=`cat << EOM Autodetection failed to locate Qt3 or Qt4 in $qthomeloc on your system. Please enter the path to your Qt3 OR Qt4 install (i.e. if Qt4 is installed in PATH/include/QT, PATH/include or PATH/include/qt4, enter PATH), or type '-' to CANCEL the build of the Qt UI module. Qt path: EOM` dflt="" fn='d~(-)' rp=$g4message . ./getfile user_qthome=$ans if test "x$user_qthome" = "x-" ; then # Cancel build... g4ui_build_qt_session=n g4ui_use_qt=n echo "configure: build/use of Qt UI module cancelled" promptend=yes else # Check for installation in user directory echo " " qt_search_dir=$user_qthome . ./qt if test "x$g4_havegoodqt" = "xyes" ; then promptend=yes fi fi #END TEST user_qthome = - done #END while promptend=no (for user input of Qt install) fi #END TEST g4_havegoodqt = no (for user prompt) fi #END TEST g4ui_build_qt_session (whether to build at all) fi #END TEST g4ui_none = n echo " " echo "*OPTIONS FOR GEANT4 VISUALIZATION DRIVERS*" g4message="Enable building of visualization drivers?" dflt='y' rp=$g4message . ./myread gans=$ans case $gans in n*|N*) g4vis_none=y ;; y*|Y*) g4vis_none=n ;; esac case $g4vis_none in n) if test "X$g4system" != "XWIN32-VC" -a "X$g4system" != "XWIN32-VC7"; then g4message="Enable building of the X11 OpenGL visualization driver?" dflt=$g4vis_build_openglx_driver rp=$g4message . ./myread gans=$ans case $gans in n*|N*) g4vis_build_openglx_driver=n g4vis_use_openglx=n ;; y*|Y*) g4vis_build_openglx_driver=y g4vis_use_openglx=y ;; esac ############################################# g4message="Enable building of the X11-Motif OpenGL visualization driver?" dflt=$g4vis_build_openglxm_driver rp=$g4message . ./myread gans=$ans case $gans in n*|N*) g4vis_build_openglxm_driver=n g4vis_use_openglxm=n ;; y*|Y*) g4vis_build_openglxm_driver=y g4vis_use_openglxm=y ;; esac ############################################################ #echo xm_dirs=$xm_dirs #echo g4vis_xmhome=$g4vis_xmhome #echo g4ui_build_xm_session=$g4ui_build_xm_session #echo g4vis_build_openglxm_driver=$g4vis_build_openglxm_driver if test "X$g4ui_build_xm_session" = "Xn" ; then #echo PASS1 if test "X$g4vis_build_openglxm_driver" = "Xy" ; then #echo PASS2 if test "X$g4vis_xmhome" = "X" ; then xm_dirs=`find $g4vis_xmhome /usr/X11R6/include /usr/local/include /usr/include /sw/include -type d -name Xm 2>/dev/null |xargs echo` #echo ogl_dirs=$ogl_dirs if test "X$xm_dirs" != "X" ; then g4xm_base_dir_found=`echo $xm_dirs|cut -d" " -f1` #echo g4ogl_base_dir_found=$g4ogl_base_dir_found # That's right: should be twice! (e.g./usr/local/lib/libGLU.so -> /usr/local) g4xm_base_dir_found=`dirname $g4xm_base_dir_found` g4xm_base_dir_found=`dirname $g4xm_base_dir_found` g4vis_xmhome=$g4xm_base_dir_found #else #case "$g4vis_xmhome" in #'') # g4vis_xmhome=/usr/X11R6/ # ;; #esac fi fi ########################################################################## #if test "X$g4vis_xmhome" != "X" ; then #xm_dirs=$g4vis_xmhome #fi if test "X$g4vis_xmhome" != "X" ; then g4message=`cat << EOM You have selected to build the OpenGL-Motif(Xm) driver. Specify the correct path where Xm is installed in your system. It was found in $g4vis_xmhome. Press [Enter] to set this path or type the correct one. You can set '-' (without quotation) to CANCEL the XM flag at all: EOM` dflt=$g4vis_xmhome fn='d~(-)' rp=$g4message . ./getfile cend="no" while test "$cend" = "no" ; do if test -e "$ans/include/Xm" || [ "X$ans" = "X-" ]; then cend="yes" if test "X$ans" != "X-" ; then g4vis_xmhome=$ans else g4vis_build_openglxm_driver=n g4vis_use_openglxm=n echo " " fi else g4message=`cat << EOM You have selected to build the OpenGL-Motif(Xm) driver. But Xm was not found in $ans. Please specify the correct path where Xm is installed in your system. You can set '-' (without quotation) to CANCEL the XM flag at all: EOM` dflt="" fn='d~(-)' rp=$g4message . ./getfile fi done else g4message=`cat << EOM You have selected to build the OpenGL-Motif(Xm) driver. But Xm was not found in expected place. Please specify the correct path where Xm is installed in your system. You can set '-' (without quotation) to CANCEL the XM flag at all: EOM` dflt="" fn='d~(-)' rp=$g4message . ./getfile cend="no" while test "$cend" = "no" ; do if test -e "$ans/include/Xm" || [ "X$ans" = "X-" ]; then cend="yes" if test "X$ans" != "X-" ; then g4vis_xmhome=$ans else g4vis_build_openglxm_driver=n g4vis_use_openglxm=n echo " " fi else g4message=`cat << EOM You have selected to build the OpenGL-Motif(Xm) driver. But Xm was not found in $ans. Please specify the correct path where Xm is installed in your system. You can set '-' (without quotation) to CANCEL the XM flag at all: EOM` dflt="" fn='d~(-)' rp=$g4message . ./getfile fi done fi if test "X$g4osname" = "XLinux"; then if test "X$g4vis_xmhome" = "X/usr" -o "X$g4vis_xmhome" = "X/usr/local" ; then g4vis_xmhome="" fi fi fi # g4vis_build_opheglxm_driver ############################################### # Set XMFLAGS and XMLIBS # if test "X$g4vis_build_openglxm_driver" = "Xy" ; then if test "X$g4osname" = "XAIX" ; then g4vis_xmflags=" -I$g4vis_xmhome/include " g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm -lXt -lX11 " fi if test "X$g4osname" = "XLinux" ; then if test "X$g4vis_xmhome" = "X" ; then g4vis_xmflags="" else g4vis_xmflags=" -I$g4vis_xmhome/include " fi if test "X$g4vis_xmhome" = "X/usr/X11R6" -o "X$g4vis_xmhome" = "X" ; then g4vis_xmlibs=" -lXm -lXpm " else if test -d "$g4vis_xmhome/lib64" ; then g4vis_xmlibs=" -L$g4vis_xmhome/lib64 -lXm -lXpm " else g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm -lXpm " fi fi fi if test "X$g4osname" = "XDarwin" ; then g4vis_xmflags=" -I$g4vis_xmhome/include " g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm -lXpm " fi if test "X$g4osname" = "XDEC" ; then g4vis_xmflags=" -I$g4vis_xmhome/include " g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm " fi if test "X$g4osname" = "XHP" ; then g4vis_xmflags=" -I$g4vis_xmhome/include/Motif1.2 " g4vis_xmlibs=" -L$g4vis_xmhome/lib/Motif1.2 -lXm " fi if test "X$g4osname" = "XSGI" ; then g4vis_xmflags=" -I$g4vis_xmhome/include " g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm " fi if test "X$g4osname" = "XSUN" ; then g4vis_xmflags=" -I$g4vis_xmhome/include " g4vis_xmlibs=" -L$g4vis_xmhome/lib -L/usr/openwin/lib -L/usr/dt/lib -L/usr/ucblib -R/usr/openwin/lib -lXt -lXm -lX11 " fi fi # end of XM build fi ############################################### fi # if !WIN ###################################################################### if test "X$g4system" = "XWIN32-VC" -o "X$g4system" = "XWIN32-VC7"; then g4message="Enable building of the WIN32 OpenGL visualization driver?" dflt=$g4vis_build_openglwin32_driver rp=$g4message . ./myread gans=$ans case $gans in n*|N*) g4vis_build_openglwin32_driver=n g4vis_use_openglwin32=n ;; y*|Y*) g4vis_build_openglwin32_driver=y g4vis_use_openglwin32=y ;; esac fi # if WIN ########################################### if test "X$g4system" != "XWIN32-VC" -a "X$g4system" != "XWIN32-VC7"; then g4message="Enable building of the FukuiRenderer/DAWN visualization driver?" dflt=$g4vis_build_dawn_driver rp=$g4message . ./myread gans=$ans case $gans in n*|N*) g4vis_build_dawn_driver=n g4vis_use_dawn=n ;; y*|Y*) g4vis_build_dawn_driver=y g4vis_use_dawn=y ;; esac ####################################### g4message="Enable building of the X11 OpenInventor visualization driver?" dflt=$g4vis_build_oix_driver rp=$g4message . ./myread gans=$ans case $gans in n*|N*) g4vis_build_oix_driver=n g4vis_use_oix=n ;; y*|Y*) g4vis_build_oix_driver=y g4vis_use_oix=y ;; esac ############################################################ if test "X$g4vis_build_oix_driver" = "Xy" ; then oiv_dirs=`find $g4vis_oivhome /usr/X11R6/include /usr/local/include /usr/include -type d -name Inventor 2>/dev/null|xargs echo` #echo ogl_dirs=$ogl_dirs if test "X$oiv_dirs" != "X" ; then g4oiv_base_dir_found=`echo $oiv_dirs|cut -d" " -f1` #echo g4ogl_base_dir_found=$g4ogl_base_dir_found # That's right: should be twice! (e.g./usr/local/lib/libGLU.so -> /usr/local) g4oiv_base_dir_found=`dirname $g4oiv_base_dir_found` g4oiv_base_dir_found=`dirname $g4oiv_base_dir_found` g4vis_oivhome=$g4oiv_base_dir_found #else #case "$g4vis_oivhome" in #'') # g4vis_oivhome=/usr # ;; #esac fi ########################################################################## #if test "X$g4vis_oivhome" != "X" ; then #oiv_dirs=$g4vis_oivhome #fi if test "X$g4vis_oivhome" != "X" ; then g4message=`cat << EOM You have selected to build the X11 OpenInventor driver. Specify the path where OpenInventor is installed on your system. It was found in $g4vis_oivhome. Press [Enter] to set this path or type the correct one. You can set '-' (without quotation) to CANCEL the OpenInventor flag at all: EOM` dflt=$g4vis_oivhome fn='d~(-)' rp=$g4message . ./getfile cend="no" while test "$cend" = "no" ; do if test -e "$ans/include/Inventor" || [ "X$ans" = "X-" ]; then cend="yes" if test "X$ans" != "X-" ; then g4vis_oivhome=$ans else g4vis_build_oix_driver=n g4vis_use_oix=n echo " " fi else g4message=`cat << EOM You have selected to build the X11 OpenInventor driver. But OpenInventor was not found in $ans. Please specify the correct path where OpenInventor is installed on your system. You can set '-' (without quotation) to CANCEL the OpenInventor flag at all: EOM` dflt="" fn='d~(-)' rp=$g4message . ./getfile fi done else g4message=`cat << EOM You have selected to build the X11 OpenInventor driver. But OpenInventor was not found in the expected place. Please specify the correct path where OpenInventor is installed on your system. You can set '-' (without quotation) to CANCEL the OpenInventor flag at all: EOM` dflt="" fn='d~(-)' rp=$g4message . ./getfile cend="no" while test "$cend" = "no" ; do if test -e "$ans/include/Inventor" || [ "X$ans" = "X-" ]; then cend="yes" if test "X$ans" != "X-" ; then g4vis_oivhome=$ans else g4vis_build_oix_driver=n g4vis_use_oix=n echo " " fi else g4message=`cat << EOM You have selected to build the X11 OpenInventor driver. But OpenInventor was not found in $ans. Please specify the correct path where OpenInventor is installed on your system. You can set '-' (without quotation) to CANCEL the OpenInventor flag at all: EOM` dflt="" fn='d~(-)' rp=$g4message . ./getfile fi done fi if test "X$g4osname" = "XLinux"; then if test "X$g4vis_oivhome" = "X/usr" -o "X$g4vis_oivhome" = "X/usr/local"; then g4vis_oivhome="" fi fi fi # g4vis_build_oix_driver ############################################### g4message="Enable building of the X11 RayTracer visualization driver?" dflt=$g4vis_build_raytracerx_driver rp=$g4message . ./myread gans=$ans case $gans in n*|N*) g4vis_build_raytracerx_driver=n g4vis_use_raytracerx=n ;; y*|Y*) g4vis_build_raytracerx_driver=y g4vis_use_raytracerx=y ;; esac ######################################################## fi # if !WIN ############################################################### if test "X$g4system" = "XWIN32-VC" -o "X$g4system" = "XWIN32-VC7"; then g4message="Enable building of the WIN32 OpenInventor visualization driver?" dflt=$g4vis_build_oiwin32_driver rp=$g4message . ./myread gans=$ans case $gans in n*|N*) g4vis_build_oiwin32_driver=n g4vis_use_oiwin32=n ;; y*|Y*) g4vis_build_oiwin32_driver=y g4vis_use_oiwin32=y ;; esac ############################################################ if test "X$g4vis_build_oiwin32_driver" = "Xy" ; then oiv_dirs=`find $g4vis_oivhome /usr/X11R6/include /usr/local/include /usr/include -type d -name Inventor 2>/dev/null|xargs echo` #echo ogl_dirs=$ogl_dirs if test "X$oiv_dirs" != "X" ; then g4oiv_base_dir_found=`echo $oiv_dirs|cut -d" " -f1` #echo g4ogl_base_dir_found=$g4ogl_base_dir_found # That's right: should be twice! (e.g./usr/local/lib/libGLU.so -> /usr/local) g4oiv_base_dir_found=`dirname $g4oiv_base_dir_found` g4oiv_base_dir_found=`dirname $g4oiv_base_dir_found` g4vis_oivhome=$g4oiv_base_dir_found #else #case "$g4vis_oivhome" in #'') # g4vis_oivhome=/usr # ;; #esac fi ########################################################################## #if test "X$g4vis_oivhome" != "X" ; then #oiv_dirs=$g4vis_oivhome #fi if test "X$g4vis_oivhome" != "X" ; then g4message=`cat << EOM You have selected to build the WIN32 OpenInventor driver. Specify the correct path where OpenInventor is installed on your system. It was found in $g4vis_oivhome. Press [Enter] to set this path or type the correct one. You can set '-' (without quotation) to CANCEL the OpenInventor flag at all: EOM` dflt=$g4vis_oivhome fn='d~(-)' rp=$g4message . ./getfile cend="no" while test "$cend" = "no" ; do if test -e "$ans/include/Inventor" || [ "X$ans" = "X-" ]; then cend="yes" if test "X$ans" != "X-" ; then g4vis_oivhome=$ans else g4vis_build_oiwin32_driver=n g4vis_use_oiwin32=n echo " " fi else g4message=`cat << EOM You have selected to build the WIN32 OpenInventor driver. But OpenInventor was not found in $ans. Please specify the correct path where OpenInventor is installed on your system. You can set '-' (without quotation) to CANCEL the OpenInventor flag at all: EOM` dflt="" fn='d~(-)' rp=$g4message . ./getfile fi done else g4message=`cat << EOM You have selected to build the WIN32 OpenInventor driver. But OpenInventor was not found in expected place. Please specify the correct path where OpenInventor is installed on your system. You can set '-' (without quotation) to CANCEL the OpenInventor flag at all: EOM` dflt="" fn='d~(-)' rp=$g4message . ./getfile cend="no" while test "$cend" = "no" ; do if test -e "$ans/include/Inventor" || [ "X$ans" = "X-" ]; then cend="yes" if test "X$ans" != "X-" ; then g4vis_oivhome=$ans else g4vis_build_oiwin32_driver=n g4vis_use_oiwin32=n echo " " fi else g4message=`cat << EOM You have selected to build the WIN32 OpenInventor driver. But OpenInventor was not found in $ans. Please specify the correct path where OpenInventor is installed on your system. You can set '-' (without quotation) to CANCEL the OpenInventor flag at all: EOM` dflt="" fn='d~(-)' rp=$g4message . ./getfile fi done fi if test "X$g4osname" = "XLinux"; then if test "X$g4vis_oivhome" = "X/usr" -o "X$g4vis_oivhome" = "X/usr/local"; then g4vis_oivhome="" fi fi fi # g4vis_build_oiwin32_driver ############################################### fi # if WIN ################################################################ if test "X$g4system" != "XWIN32-VC" -a "X$g4system" != "XWIN32-VC7"; then g4message=`cat << EOM G4VIS_BUILD_DAWNFILE_DRIVER G4VIS_USE_DAWNFILE DAWN drivers are interfaces to Fukui Renderer DAWN. It is a vectorized 3D PostScript processor, and so well suited to prepare technical high quality outputs for presentation and/or documentation. The DAWNFILE driver sends 3D data to DAWN via an intermediate file, named g4.prim in the current directory. The file g4.prim is able to be re-visualized later without the help of Geant4. EOM` dflt=$g4vis_use_dawnfile rp=$g4message #. ./myread #gans=$ans gans=y case $gans in n*|N*) g4vis_build_dawnfile_driver=n g4vis_use_dawnfile=n ;; y*|Y*) g4vis_build_dawnfile_driver=y g4vis_use_dawnfile=y ;; esac g4message=`cat << EOM G4VIS_BUILD_RAYTRACER_DRIVER G4VIS_USE_RAYTRACER It performs ray-tracing visualization using the tracking routines of Geant4. It is, therefore, available for debugging tracking routines. It is well suited for photo-realistic high quality output for presentation, and for intuitive debugging of detector geometry. EOM` dflt=$g4vis_use_raytracer rp=$g4message #. ./myread #gans=$ans gans=y case $gans in n*|N*) g4vis_build_raytracer_driver=n g4vis_use_raytracer=n ;; y*|Y*) g4vis_build_raytracer_driver=y g4vis_use_raytracer=y ;; esac g4message="Enable building of the VRML visualization driver?" dflt=$g4vis_build_vrml_driver rp=$g4message . ./myread gans=$ans case $gans in n*|N*) g4vis_build_vrml_driver=n g4vis_use_vrml=n ;; y*|Y*) g4vis_build_vrml_driver=y g4vis_use_vrml=y ;; esac g4message=`cat << EOM G4VIS_BUILD_VRMLFILE_DRIVER G4VIS_USE_VRMLFILE This driver generates VRML files, which describe 3D scenes to be visualized with a proper VRML viewer, at either a local or a remote host. The VRMLFILE driver sends 3D data to your VRML viewer, which is running in the same host machine as Geant4, via an intermediate file named g4.wrl created in the current directory. This file is available for re-visualization afterwards. In visualization, you should specify a name of the VRML viewer by setting the environment variable G4VRML_VIEWER beforehand. EOM` dflt=$g4vis_use_vrmlfile rp=$g4message #. ./myread #gans=$ans gans=y case $gans in n*|N*) g4vis_build_vrmlfile_driver=n g4vis_use_vrmlfile=n ;; y*|Y*) g4vis_build_vrmlfile_driver=y g4vis_use_vrmlfile=y ;; esac fi # if !WIN g4message=`cat << EOM G4VIS_BUILD_ASCIITREE_DRIVER G4VIS_USE_ASCIITREE Description???????????????????????? EOM` dflt=$g4vis_use_asciitree rp=$g4message # Don't ask by default and set to 'y'! #. ./myread #gans=$ans gans=y case $gans in n*|N*) g4vis_build_asciitree_driver=n g4vis_use_asciitree=n ;; y*|Y*) g4vis_build_asciitree_driver=y g4vis_use_asciitree=y ;; esac g4message=`cat << EOM G4VIS_BUILD_GAGTREE_DRIVER G4VIS_USE_GAGTREE Description???????????????????????? EOM` dflt=$g4vis_use_gagtree rp=$g4message # Don't ask by default and set to 'y'! #. ./myread #gans=$ans gans=y case $gans in n*|N*) g4vis_build_gagtree_driver=n g4vis_use_gagtree=n ;; y*|Y*) g4vis_build_gagtree_driver=y g4vis_use_gagtree=y ;; esac ;; esac if test "X$g4system" != "XWIN32-VC" -a "X$g4system" != "XWIN32-VC7" -a "X$g4system" != "XDarwin-g++"; then #echo PASS1 if [ X$g4vis_build_openglx_driver = Xy ] || [ X$g4vis_build_openglxm_driver = Xy ] || [ X$g4vis_build_openglwin32_driver = Xy ] ; then #echo PASS2 ##################################################################### ogl_dirs=`find $g4vis_oglhome /usr/X11R6/include /usr/local/include /usr/include -type d -name GL 2>/dev/null|xargs echo` #echo ogl_dirs=$ogl_dirs if test "X$ogl_dirs" != "X" ; then g4ogl_base_dir_found=`echo $ogl_dirs|cut -d" " -f1` #echo g4ogl_base_dir_found=$g4ogl_base_dir_found # That's right: should be twice! (e.g./usr/local/lib/libGLU.so -> /usr/local) g4ogl_base_dir_found=`dirname $g4ogl_base_dir_found` g4ogl_base_dir_found=`dirname $g4ogl_base_dir_found` g4vis_oglhome=$g4ogl_base_dir_found #else #case "$g4vis_oglhome" in #'') # g4vis_oglhome=/usr # ;; #esac fi ########################################################################## if test "X$g4vis_oglhome" != "X" ; then ogl_dirs=$g4vis_oglhome fi if test "X$ogl_dirs" != "X" ; then g4message=`cat << EOM You have selected to build one or more drivers that require OpenGL. Specify the correct path (OGLHOME) where OpenGL is installed on your system. It was found in $g4vis_oglhome. Press [Enter] to set this path or type the correct one. You can set '-' (without quotation) to CANCEL the OpenGL flag at all: EOM` dflt=$g4vis_oglhome fn='d~(-)' rp=$g4message . ./getfile cend="no" while test "$cend" = "no" ; do if test -e "$ans/include/GL" || [ "X$ans" = "X-" ]; then cend="yes" if test "X$ans" != "X-" ; then g4vis_oglhome=$ans else g4vis_build_openglx_driver=n g4vis_use_openglx=n g4vis_build_openglxm_driver=n g4vis_use_openglxm=n g4vis_build_openglwin32_driver=n g4vis_use_openglwin32=n echo " " fi else g4message=`cat << EOM You have selected to build one or more drivers that require OpenGL. But OpenGL was not found in $ans. Please specify the correct path where OpenGL is installed on your system. You can set '-' (without quotation) to CANCEL the OpenGL flag at all: EOM` dflt="" fn='d~(-)' rp=$g4message . ./getfile fi done else g4message=`cat << EOM You have selected to build one or more drivers that require OpenGL. But OpenGL was not found in the expected place. Please specify the correct path where OpenGL is installed on your system. You can set '-' (without quotation) to CANCEL the OpenGL flag at all: EOM` dflt="" fn='d~(-)' rp=$g4message . ./getfile cend="no" while test "$cend" = "no" ; do if test -e "$ans/include/GL" || [ "X$ans" = "X-" ]; then cend="yes" if test "X$ans" != "X-" ; then g4vis_oglhome=$ans else g4vis_build_openglx_driver=n g4vis_use_openglx=n g4vis_build_openglxm_driver=n g4vis_use_openglxm=n g4vis_build_openglwin32_driver=n g4vis_use_openglwin32=n echo " " fi else g4message=`cat << EOM You have selected to build one or more drivers that require OpenGL. But OpenGL was not found in $ans. Please specify the correct path where OpenGL is installed on your system. You can set '-' (without quotation) to CANCEL the OpenGL flag at all: EOM` dflt="" fn='d~(-)' rp=$g4message . ./getfile fi done fi if test "X$g4osname" = "XLinux"; then if test "X$g4vis_oglhome" = "X/usr" -o "X$g4vis_oglhome" = "X/usr/local"; then g4vis_oglhome="" fi fi # if platform (Linux vs SUN) fi # if need ########################################### fi # if platform (Unix vs Win) # # BEGIN QTVIS/QT PROBE # # Because the vis driver only works with UI, only probe if g4ui_none is # NOT set AND g4vis_none is NOT set. # Also, Qt vis driver has dependency on Qt UI module - so only ask if # build is required IF Qt UI was selected. # if test "x$g4ui_none" = "xn" -a "x$g4vis_none" = "xn" ; then if test "x$g4ui_build_qt_session" = "xy" ; then # Query the user to see if build of Qt GL module is needed g4message="Enable building of the Qt OpenGL visualization driver?" # Read in the user response dflt=$g4vis_build_openglqt_driver rp=$g4message . ./myread gans=$ans # Check response and take set variables as needed. case $gans in n*|N*) g4vis_build_openglqt_driver=n g4vis_use_openglqt=n ;; y*|Y*) g4vis_build_openglqt_driver=y g4vis_use_openglqt=y ;; esac ########## ########## # Now, if user chose to build module, we need to check for a Qt # installation # if test "x$g4vis_build_openglqt_driver" = "xy" ; then # NB Have to supply arg to qt script, just blank in this case! qt_search_dir="" . ./qt # If we didn't find Qt automatically, then ask user if they know # where it's installed... if test "x$g4_havegoodqt" = "xno" ; then promptend="no" user_qthome="the standard locations" while test "x$promptend" = "xno" ; do g4message=`cat << EOM Autodetection failed to locate Qt3 or Qt4 in $qthomeloc on your system. Please enter the path to your Qt3 OR Qt4 install (i.e. if Qt4 is installed in PATH/include/QT, PATH/include or PATH/include/qt4, enter PATH), or type '-' to CANCEL the build of the Qt UI module. Qt path: EOM` dflt="" fn='d~(-)' rp=$g4message . ./getfile user_qthome=$ans if test "x$user_qthome" = "x-" ; then # Cancel build... g4vis_build_openglqt_driver=n g4vis_use_openglqt=n echo "configure: build/use of Qt OpenGl driver cancelled" promptend=yes else # Check for installation in user directory echo " " qt_search_dir=$user_qthome . ./qt if test "x$g4_havegoodqt" = "xyes" ; then promptend=yes fi fi #END TEST user_qthome = - done #END while promptend=no (for user input of Qt install) fi #END TEST g4_havegoodqt = no (for user prompt) fi #END TEST g4vis_build_openglqt_driver (whether to build at all) else # TEST g4ui_build_qt_session # Because we can 'drop through' this test on repeat # running Configure, force build and use to n g4vis_build_openglqt_driver=n g4vis_use_openglqt=n fi #END TEST g4ui_build_qt_session (dependency on Qt UI module) fi #END TEST g4ui_none = n AND g4vis_none=n # Now query the user to see if they want to build the GDML plugin echo " " echo "*OPTIONS FOR GEANT4 OPTIONAL EXTENSION MODULES*" g4message="Enable the Geometry Description Markup Language (GDML) module?" dflt=$g4lib_build_gdml rp=$g4message . ./myread gans=$ans # # Check response # case $gans in n*|N*) g4lib_build_gdml=n ;; y*|Y*) g4lib_build_gdml=y ;; esac # # If user does want to build GDML plugin, now try to locate Xerces install # if test "X$g4lib_build_gdml" != "Xn"; then # If g4system is WIN32-VC, we need to force the input of a search path # though we can use with_xercesc_root as the dflt. if test "X$g4system" = "XWIN32-VC" ; then g4message=`cat << EOM You have requested GDML support for Geant4 built on WIN32-VC. This requires the Xerces-C library built for MSVC. Please enter the path to the Xerces-C install (i.e. if XercesC is installed in PATH\include\xercesc, enter PATH), or type '-' to CANCEL the build of the GDML module. XercesC path: EOM` dflt=$with_xercesc_root fn='d~(-)' rp=$g4message . ./getfile with_xercesc_root=$ans if test "X$with_xercesc_root" = "X-" ; then g4lib_build_gdml=n g4gdml_xercesc_root="" echo "G4LIB_BUILD_GDML cancelled..." echo " " fi fi # We now have a suitable platform independent setup for probing for the # Xerces-C install.... if test "X$with_xercesc_root" != "X-"; then if test "X$with_xercesc_root" != "X" ; then # Probe for Xerces-C in the supplied directory xercesc_root=`find $with_xercesc_root/include -type d -name xercesc 2>/dev/null | xargs echo` else # Probe for Xerces-C in standard locations xercesc_root=`find /usr/include /usr/local/include /opt/local/include /sw/include -type d -name xercesc 2>/dev/null | xargs echo` fi # What did we find?? if test "X$xercesc_root" = "X" ; then g4gdml_xercesc_root="" echo "checking for XercesC install... no" else # We'll have PATH/include/xercesc if we found it g4gdml_xercesc_root=`dirname $xercesc_root` g4gdml_xercesc_root=`dirname $g4gdml_xercesc_root` echo "checking for XercesC install... $g4gdml_xercesc_root" fi # If we didn't find anything, fall back to the user... if test "X$g4gdml_xercesc_root" = "X" ; then promptend="no" if test "X$with_xercesc_root" = "X" ; then xercescloc="the standard locations" else xercescloc=$with_xercesc_root fi while test "$promptend" = "no"; do g4message=`cat << EOM Autodetection failed to locate XercesC in $xercescloc on your system. Please enter the path to your XercesC install (i.e. if XercesC is installed in PATH/include/xercesc, enter PATH), or type '-' to CANCEL the build of the GDML module. XercesC path: EOM` dflt=$g4gdml_xercesc_root fn='d~(-)' rp=$g4message . ./getfile #check for user cancellation if test "X$ans" = "X-"; then g4lib_build_gdml=n g4gdml_xercesc_root="" echo "G4LIB_BUILD_GDML cancelled..." echo " " promptend=yes else if test -r "$ans/include/xercesc"; then g4gdml_xercesc_root=$ans echo "checking for XercesC install... $g4gdml_xercesc_root" echo " " promptend=yes else xercesloc=$ans echo "checking for Xercesc install... no" fi fi #END OF USER INPUT CHECKING done #END OF WHILE LOOP OVER USER INPUT fi #END OF USER INPUT SECTION # # If a filter on g4gdml_xerces_root is needed to remove common system paths # then it should be put here... # if test "x$g4gdml_xercesc_root" = "x/usr" -o "x$g4gdml_xercesc_root" = "x/usr/local" ; then g4gdml_xercesc_root="" fi fi # End outer check of WIN32-VC module cancellation fi #END XERCES PROBE #END OF GDML/XERCES PROBE case "$g4tmp" in '') g4tmp=$g4workdir/tmp ;; esac case "$g4lib" in '') g4lib=$g4workdir/lib ;; esac g4message="Enable build of the g3tog4 utility module?" dflt=$g4wlib_build_g3tog4 rp=$g4message . ./myread gans=$ans case $gans in n*|N*) g4wlib_build_g3tog4=n g4w_use_g3tog4=n ;; y*|Y*) g4wlib_build_g3tog4=y g4w_use_g3tog4=y ;; esac # # On WIN32, if GL or Inventor drivers are built, we MUST # build zlib # if test "X$g4vis_build_oiwin32_driver" = "Xy" -o "X$g4vis_build_openglwin32_driver" = "Xy" ; then # Force build of ZLIB g4wlib_build_zlib='y' g4w_use_zlib='y' echo " " echo "Configure: Auto-enable builtin zlib to support WIN32 visualization drivers" echo " " else g4message="Enable internal zlib compression for HepRep visualization?" dflt=$g4wlib_build_zlib rp=$g4message . ./myread gans=$ans case $gans in n*|N*) g4wlib_build_zlib=n g4w_use_zlib=n ;; y*|Y*) g4wlib_build_zlib=y g4w_use_zlib=y ;; esac fi : end of configuration questions echo " " echo "End of configuration phase." echo " " : back to where it started if test -d ../../.config/UU; then cd ../.. fi : configuration may be patched via a 'config.over' file if $test -f config.over; then echo " " dflt=y rp='A config.over file exists. Do you wish to load it?' . .config/UU/myread case "$ans" in n*) echo "OK, I'll ignore it.";; *) . ./config.over echo "Configuration settings have been loaded." ;; esac fi : in case they want portability, strip down executable paths case "$d_portable" in "$define") echo " " echo "Stripping down executable paths..." >&4 for file in $loclist $trylist; do eval $file="\$file" done ;; esac : create config.sh file echo " " echo "Creating configuration setup file..." >&4 mkdir -p $g4conf $spitshell < $g4conf/config.sh $startsh # # This file was produced by running the Configure script. It holds all the # definitions figured out by Configure. Should you modify one of these values, # do not forget to propagate your changes by running "Configure -der". You may # instead choose to run each of the .SH files by yourself, or "Configure -S". # # Package name : $package # Source directory : $src # Configuration time: $cf_time # Configured by : $cf_by # Target system : $myuname Author='$Author' Date='$Date' Header='$Header' Id='$Id' Locker='$Locker' Log='$Log' RCSfile='$RCSfile' Revision='$Revision' Source='$Source' State='$State' c='$c' cf_by='$cf_by' cf_time='$cf_time' contains='$contains' d_portable='$d_portable' eunicefix='$eunicefix' g4_gmake='$g4_gmake' g4_gmake_version='$g4_gmake_version' g4_make='$g4_make' g4_make_version='$g4_make_version' g4_qt_cxxflags='$g4_qt_cxxflags' g4_qt_gl_cxxflags='$g4_qt_gl_cxxflags' g4_qt_gl_libs='$g4_qt_gl_libs' g4_qt_libs='$g4_qt_libs' g4_qt_moc='$g4_qt_moc' g4_qt_version='$g4_qt_version' g4abladata='$g4abladata' g4base='$g4base' g4bin='$g4bin' g4clhep_base_dir='$g4clhep_base_dir' g4clhep_include_dir='$g4clhep_include_dir' g4clhep_lib='$g4clhep_lib' g4clhep_lib_dir='$g4clhep_lib_dir' g4compiler='$g4compiler' g4conf='$g4conf' g4data='$g4data' g4debug='$g4debug' g4elasticdata='$g4elasticdata' g4final_install='$g4final_install' g4gdml_xercesc_root='$g4gdml_xercesc_root' g4global='$g4global' g4granular='$g4granular' g4include='$g4include' g4includes_flag='$g4includes_flag' g4install='$g4install' g4ledata='$g4ledata' g4levelgammadata='$g4levelgammadata' g4lib='$g4lib' g4lib_build_gdml='$g4lib_build_gdml' g4lib_build_shared='$g4lib_build_shared' g4lib_build_static='$g4lib_build_static' g4lib_use_dll='$g4lib_use_dll' g4lib_use_dyn='$g4lib_use_dyn' g4lib_use_granular='$g4lib_use_granular' g4lib_use_shared='$g4lib_use_shared' g4lib_use_static='$g4lib_use_static' g4make='$g4make' g4neutronhpcrosssections='$g4neutronhpcrosssections' g4neutronxsdata='$g4neutronxsdata' g4osname='$g4osname' g4radioactivedata='$g4radioactivedata' g4system='$g4system' g4tmp='$g4tmp' g4ui_build_gag_session='$g4ui_build_gag_session' g4ui_build_qt_session='$g4ui_build_qt_session' g4ui_build_terminal_session='$g4ui_build_terminal_session' g4ui_build_win32_session='$g4ui_build_win32_session' g4ui_build_xaw_session='$g4ui_build_xaw_session' g4ui_build_xm_session='$g4ui_build_xm_session' g4ui_none='$g4ui_none' g4ui_use_gag='$g4ui_use_gag' g4ui_use_qt='$g4ui_use_qt' g4ui_use_tcsh='$g4ui_use_tcsh' g4ui_use_terminal='$g4ui_use_terminal' g4ui_use_win32='$g4ui_use_win32' g4ui_use_xaw='$g4ui_use_xaw' g4ui_use_xm='$g4ui_use_xm' g4ui_xawflags='$g4ui_xawflags' g4ui_xawhome='$g4ui_xawhome' g4ui_xawlibs='$g4ui_xawlibs' g4vis_build_asciitree_driver='$g4vis_build_asciitree_driver' g4vis_build_dawn_driver='$g4vis_build_dawn_driver' g4vis_build_dawnfile_driver='$g4vis_build_dawnfile_driver' g4vis_build_oiwin32_driver='$g4vis_build_oiwin32_driver' g4vis_build_oix_driver='$g4vis_build_oix_driver' g4vis_build_openglqt_driver='$g4vis_build_openglqt_driver' g4vis_build_openglwin32_driver='$g4vis_build_openglwin32_driver' g4vis_build_openglx_driver='$g4vis_build_openglx_driver' g4vis_build_openglxm_driver='$g4vis_build_openglxm_driver' g4vis_build_raytracer_driver='$g4vis_build_raytracer_driver' g4vis_build_raytracerx_driver='$g4vis_build_raytracerx_driver' g4vis_build_vrml_driver='$g4vis_build_vrml_driver' g4vis_build_vrmlfile_driver='$g4vis_build_vrmlfile_driver' g4vis_oglhome='$g4vis_oglhome' g4vis_oivhome='$g4vis_oivhome' g4vis_use_asciitree='$g4vis_use_asciitree' g4vis_use_dawn='$g4vis_use_dawn' g4vis_use_dawnfile='$g4vis_use_dawnfile' g4vis_use_oiwin32='$g4vis_use_oiwin32' g4vis_use_oix='$g4vis_use_oix' g4vis_use_openglqt='$g4vis_use_openglqt' g4vis_use_openglwin32='$g4vis_use_openglwin32' g4vis_use_openglx='$g4vis_use_openglx' g4vis_use_openglxm='$g4vis_use_openglxm' g4vis_use_raytracer='$g4vis_use_raytracer' g4vis_use_raytracerx='$g4vis_use_raytracerx' g4vis_use_vrml='$g4vis_use_vrml' g4vis_use_vrmlfile='$g4vis_use_vrmlfile' g4vis_xmflags='$g4vis_xmflags' g4vis_xmflags='$g4vis_xmflags' g4vis_xmhome='$g4vis_xmhome' g4vis_xmhome='$g4vis_xmhome' g4vis_xmlibs='$g4vis_xmlibs' g4vis_xmlibs='$g4vis_xmlibs' g4w_use_g3tog4='$g4w_use_g3tog4' g4w_use_zlib='$g4w_use_zlib' g4wlib_build_g3tog4='$g4wlib_build_g3tog4' g4wlib_build_zlib='$g4wlib_build_zlib' g4workdir='$g4workdir' hint='$hint' lns='$lns' myuname='$myuname' n='$n' osname='$osname' osvers='$osvers' package='$package' sh='$sh' sharpbang='$sharpbang' shsharp='$shsharp' spackage='$spackage' spitshell='$spitshell' src='$src' startsh='$startsh' EOT : add special variables mkdir -p $g4conf $test -f $src/patchlevel.h && \ awk '/^#define/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >> $g4conf/config.sh echo "CONFIG=true" >> $g4conf/config.sh : propagate old symbols if $test -f .config/UU/config.sh; then <.config/UU/config.sh sort | uniq >.config/UU/oldconfig.sh sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' $g4conf/config.sh $g4conf/config.sh .config/UU/oldconfig.sh |\ sort | uniq -u >.config/UU/oldsyms set X `cat .config/UU/oldsyms` shift case $# in 0) ;; *) cat <>.config/bin/$g4system/config.sh for sym in `cat .config/UU/oldsyms`; do echo " Propagating $hint variable "'$'"$sym..." eval 'tmp="$'"${sym}"'"' echo "$tmp" | \ sed -e "s/'/'\"'\"'/g" -e "s/^/$sym='/" -e "s/$/'/" >>.config/bin/$g4system/config.sh done ;; esac fi : preserve RCS keywords in files with variable substitution, grrr Id='$Id' : Finish up by extracting the .SH files case "$alldone" in exit) $rm -rf .config/UU echo "Done." exit 0 ;; cont) ;; '') dflt='' nostick=true $cat <&4 -c "$ans";; esac ;; esac : if this fails, just run all the .SH files by hand . $g4conf/config.sh echo " " exec 1>&4 . ./.config/UU/extract if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then dflt=y case "$silent" in true) ;; *) $cat < makedepend.out &" It can take a while, so you might not want to run it right now. EOM ;; esac rp="Run make depend now?" . .config/UU/myread case "$ans" in y*) make depend && echo "Now you must run a make." ;; *) echo "You must run 'make depend' then 'make'." ;; esac elif test -f [Mm]akefile; then echo " " echo "Now you must run a make." elif [ -f $g4conf/install.sh -a X$g4build = Xyes ] ; then echo " " echo "Now starting Geant4 libraries build..." echo " " . $g4conf/install.sh elif [ -f $g4conf/install.sh -a X$install = Xyes ] ; then echo " " echo "Now starting Geant4 libraries installation..." echo " " . $g4conf/move.sh else echo " " echo "WARNING: Geant4 is NOT installed yet!" echo "You (or the administrator if you have not enough privileges)" echo "should start with \$G4INSTALL/Configure -install" echo "(where \$G4INSTALL is Geant4 install directory)." echo " " fi $rm -f kit*isdone ark*isdone $rm -rf .config/UU : End of Configure