#! /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.107 2008/11/14 15:14:46 bmorgan Exp $ # # Generated on Fri Nov 14 15:14:32 GMT 2008 [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... #if [ X$install = Xyes ] ; then #echo " " #echo " " #echo " " #echo " --- Geant4 Toolkit Installation ---" #echo " " #echo " " #echo " " #echo " " #else #echo " " #echo " " #echo " " #echo " --- Geant4 Toolkit Installation ---" #echo " (setting environments for USER )" #echo " " #echo " " #echo " " #fi 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$install = Xyes ] ; then # #echo " " #echo " " #echo " " #echo " --- Geant4 Toolkit Installation ---" #echo " " #echo " " #echo " " #echo " " # ##if $contains "^$user\$" ../../.config/instruct >/dev/null 2>&1; then ## firsttime=false ## echo " " ## rp='Would you like to see the instructions?' ## dflt=n ## . ./myread ## case "$ans" in ## [yY]*) ;; ## *) needman=false;; ## esac ##fi #fi if [ X$g4build = Xyes ] ; then echo " " echo " " echo " " echo " --- Geant4 Toolkit Build ---" echo " " echo " " echo " " echo " " if $contains "^$user\$" ../../.config/instruct >/dev/null 2>&1; then firsttime=false echo " " 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 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 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 "" cat << EOM You are running 'Configure' on NOT native platform! You are on your own way !!! EOM 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 "" cat << EOM The recommmended compiler for this platform ($g4osname) is $g4compilerrec. You are on your own way !!! EOM dflt=$tans rp="Confirm your selection or set recommended '$g4compilerrec'!" . .config/UU/myread tans=$ans fi g4compiler=$tans ;; # [eE]) # break # ;; *) # echo " " break ;; esac done fi # # Ask about compiler used. # g4system=$g4osname-$g4compiler fi #cat << EOM # #G4SYSTEM is now set to $g4system. # #EOM 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 # if test "x\$with_qt_dir" != "x" ; then g4_qt_dir="\$with_qt_dir" g4_qt_possible_qt_include_dirs="\$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 \$with_qt_dir/QtCore.framework/Headers" # 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... 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\` /usr/include/QtCore \`ls -dr /usr/include/qt*/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 /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 /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 fi echo "checking for qglobal.h... \$g4_qt_include_dir/qglobal.h" 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 if test -x "/usr/bin/moc" ; then g4_qt_moc="/usr/bin/moc" echo "checking for moc... \$g4_qt_moc" g4_qt_dir=\`dirname \$g4_qt_include_dir\` g4_qt_dir=\`dirname \$g4_qt_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 else # 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 g4_qt_lib_dir=\$g4_qt_dir/lib64 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 # g4_qt_bin_dir=\$g4_qt_dir/bin g4_qtmoc=no if test -x "\$g4_qt_bin_dir/moc" ; then g4_qtmoc="\$g4_qt_bin_dir/moc" elif 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" else g4_havegoodqt=no fi echo "checking for moc... \$g4_qtmoc" ## 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 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" echo "" echo "DEBUG#####" echo "g4_qt_cxxflags = \$g4_qt_cxxflags" echo "g4_qt_gl_cxxflags = \$g4_qt_gl_cxxflags" echo "g4_qt_libs = \$g4_qt_libs" echo "g4_qt_gl_libs = \$g4_qt_gl_libs" echo "g4_qt_moc = \$g4_qt_moc" echo "..." echo "g4_havegoodqt = \$g4_havegoodqt" echo "g4_qt_is_configured = \$g4_qt_is_configured" echo "##########" 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 "SSS" #echo `pwd` #echo "SSS" if [ X$src = X. ] ; then cd ../.. abssrc=`pwd` cd .config/UU else abssrc=$src fi case "$g4conf" in '') g4conf=$abssrc/.config/bin/$g4system ;; esac #echo "g4conf=$g4conf" case "$g4install" in '') if test $g4system = "WIN32-VC" -o $g4system = "WIN32-VC7"; then # g4install="c:/geant4" g4install=$abssrc else # if [ X"$HOME" = X/ ] ; then # HOME="" # fi # g4install="$HOME"/geant4 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=`cat << EOM Where is Geant4 source installed? EOM` #dflt="NO DEFAULT ANSWER" dflt=$g4install fn='d~' rp=$g4message . ./getfile g4install=$ans g4workdir=$g4install ################################# g4message=`cat << EOM Specify the path where Geant4 libraries and source files should be installed. EOM` #dflt="NO DEFAULT ANSWER" dflt=$g4final_install fn='d~' rp=$g4message . ./getfile g4final_install=$ans #g4workdir=$g4install ################################## g4message=`cat << EOM Do you want to copy all Geant4 headers in one directory? EOM` #dflt="NO DEFAULT ANSWER" dflt=$g4includes_flag #fn='d~' rp=$g4message . ./myread g4includes_flag=$ans if [ X$g4includes_flag = Xy ] ; then case "$g4include" in '') g4include=$g4install/include # g4include='' ;; esac #g4message=`cat << EOM # #Where will be directory to copy all Geant4 headers? #EOM` # ##dflt="NO DEFAULT ANSWER" ####dflt=$g4install/include #dflt=$g4include #fn='d~+' #rp=$g4message #. ./getfile #g4include=$ans # Set constantly! if [ X$g4install != X$g4final_install ] ; then g4include=$g4final_install/include/geant4 else g4include=$g4final_install/include fi fi #if test "X$g4include" = "X[NOT DEFINED]" ; then #g4include="" #fi echo " " case "$g4tmp" in '') g4tmp=$g4workdir/tmp ;; esac case "$g4lib" in '') g4lib=$g4workdir/lib ;; esac #case "$g4bin" in #'') # g4bin=$g4workdir/bin # ;; #esac while test 1 = 0 ; do g4message=`cat << EOM (OPTIONAL) You can now customise installation directories: G4TMP - tmp/ containing temporary dependency (.d) and object (.o) files; G4LIB - lib/ containing final static (.a) or shared (.so) libraries; 1) G4TMP: $g4tmp 2) G4LIB: $g4lib To modify default settings, select number above (e.g. 2) EOM` #dflt="NO DEFAULT ANSWER" dflt="Press [Enter] for default settings" #fn='d~' rp=$g4message . ./myread gans=$ans case $gans in 1) dflt=$g4tmp fn='d~+' rp="Where will be your Geant4 tmp directory?" . ./getfile g4tmp=$ans ;; 2) dflt=$g4lib fn='d~+' rp="Where will be your Geant4 lib directory?" . ./getfile g4lib=$ans ;; # 3) # dflt=$g4bin # fn='d~+' # rp="Where will be your Geant4 bin directory?" # . ./getfile # g4bin=$ans # ;; # [eE]) # break # ;; *) break # echo " " ;; esac done echo " " case "$g4data" in '') g4data=$g4install/data ;; esac case "$g4levelgammadata" in '') g4levelgammadata=$g4data/PhotonEvaporation2.0 ;; esac case "$g4radioactivedata" in '') g4radioactivedata=$g4data/RadioactiveDecay3.2 ;; esac case "$g4ledata" in '') g4ledata=$g4data/G4EMLOW6.1 ;; esac case "$g4neutronhpcrosssections" in '') g4neutronhpcrosssections=$g4data/G4NDL3.12 ;; esac case "$g4abladata" in '') g4abladata=$g4data/G4ABLA3.0 ;; esac #case "$g4elasticdata" in #'') # g4elasticdata=$g4data/G4ELASTIC1.1 # ;; #esac ######################################################################### # while test 1 = 1 ; do g4message=`cat << EOM Please, specify default directory where ALL the Geant4 data is installed: G4LEVELGAMMADATA: $g4levelgammadata G4RADIOACTIVEDATA: $g4radioactivedata G4LEDATA: $g4ledata G4NEUTRONHPDATA: $g4neutronhpcrosssections G4ABLADATA: $g4abladata You will be asked about customizing these next. EOM` #dflt="NO DEFAULT ANSWER" dflt=$g4data #fn='d~' rp=$g4message #. ./myread gans=$ans dflt=$g4data fn='d~' . ./getfile if [ X$g4data != X$ans ] ; then g4data=$ans g4levelgammadata=$g4data/PhotonEvaporation2.0 g4radioactivedata=$g4data/RadioactiveDecay3.2 g4ledata=$g4data/G4EMLOW6.1 g4neutronhpcrosssections=$g4data/G4NDL3.12 g4abladata=$g4data/G4ABLA3.0 # g4elasticdata=$g4data/G4ELASTIC1.1 fi # done ################################################################### while test 1 = 1 ; do g4message=`cat << EOM Please, specify default directory where the Geant4 data is installed: 1) G4LEVELGAMMADATA: $g4levelgammadata 2) G4RADIOACTIVEDATA: $g4radioactivedata 3) G4LEDATA: $g4ledata 4) G4NEUTRONHPDATA: $g4neutronhpcrosssections 5) G4ABLADATA: $g4abladata To modify default settings, select number above (e.g. 2) EOM` #dflt="NO DEFAULT ANSWER" dflt="Press [Enter] for default settings" #fn='d~' rp=$g4message . ./myread gans=$ans case $gans in 1) dflt=$g4levelgammadata fn='d~' rp="Where is Geant4 PhotonEvaporation2.0 data installed?" . ./getfile g4levelgammadata=$ans ;; 2) dflt=$g4radioactivedata fn='d~' rp="Where is Geant4 RadioactiveDecay3.2 data installed?" . ./getfile g4radioactivedata=$ans ;; 3) dflt=$g4ledata fn='d~' rp="Where is G4EMLOW6.1 data installed ?" . ./getfile g4ledata=$ans ;; 4) dflt=$g4neutronhpcrosssections fn='d~' rp="Where is G4NDL3.12 data installed?" . ./getfile g4neutronhpcrosssections=$ans ;; 5) dflt=$g4abladata fn='d~' rp="Where is G4ABLA3.0 data installed?" . ./getfile g4abladata=$ans ;; # 5) # dflt=$g4elasticdata # fn='d~' # rp="Where is G4ELASTIC1.1 data installed?" # . ./getfile # g4elasticdata=$ans # ;; # [eE]) # break # ;; *) break # echo " " ;; esac done 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` #echo clhep_dirs=$clhep_dirs fi if test "X$clhep_dirs" != "X" ; then g4clhep_base_dir_found=`echo $clhep_dirs|cut -d" " -f1` #echo g4clhep_base_dir_found=$g4clhep_base_dir_found #g4clhep_base_dir_n=`echo $g4clhep_base_dir_found |awk -F"/" '{print NF}'` #echo g4clhep_base_dir_n=$g4clhep_base_dir_n 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 #else #case "$g4clhep_base_dir" in #'') # if test "X$g4system" = "XWIN32-VC" -o "X$g4system" = "XWIN32-VC7"; then # g4clhep_base_dir="c:/usr/local" # else # g4clhep_base_dir=/usr/local # fi # ;; #esac fi #while test 1 = 1 ; do #if test "X$g4clhep_base_dir" != "X" ; then #clhep_dirs=$g4clhep_base_dir #echo 1 g4clhep_base_dir=$g4clhep_base_dir #fi if test "X$g4clhep_base_dir" != "X" ; then g4message=`cat << EOM Please, specify where CLHEP is installed. It was found in: CLHEP_BASE_DIR: $g4clhep_base_dir EOM` 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 #dflt="Press [Enter] for default settings" #fn='d~' #####rp=$g4message #. ./myread #gans=$ans # case $gans in # 1) ## dflt="" ## fn='d~' # rp="Where is CLHEP installed?" ## . ./getfile ## g4clhep_base_dir=$ans ##### g4clhep_include_dir=$ans/include ##### g4clhep_lib_dir=$ans/lib # ;; # 2) # dflt=$g4clhep_include_dir # fn='d~' # rp="Where is CLHEP include directory?" # . ./getfile # g4clhep_include_dir=$ans # ;; # 3) # dflt=$g4clhep_lib_dir # fn='d~' # rp="Where is CLHEP lib directory?" # . ./getfile # g4clhep_lib_dir=$ans # ;; # 4) # dflt=$g4clhep_lib # rp="What is CLHEP lib title?" # . ./myread # g4clhep_lib=$ans # ;; ## [eE]) ## break ## ;; # *) # echo " " # break # ;; # esac #done 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" #fn='d~' . ./myread gans=$ans case $gans in 1) dflt=$g4clhep_include_dir fn='d~' rp="Where is CLHEP include directory?" . ./getfile g4clhep_include_dir=$ans ;; 2) dflt=$g4clhep_lib_dir fn='d~' rp="Where is CLHEP lib directory?" . ./getfile g4clhep_lib_dir=$ans ;; 3) dflt=$g4clhep_lib rp="What is CLHEP lib title?" . ./myread g4clhep_lib=$ans ;; # [eE]) ## break ## ;; *) # echo " " break ;; esac done #if test "X$g4clhep_base_dir" = "X/usr" -o "X$g4clhep_base_dir" = "X/usr/local"; then #g4clhep_base_dir="" #fi # #if test "X$g4clhep_include_dir" = "X/usr/include" -o "X$g4clhep_include_dir" = "X/usr/local/include"; then #g4clhep_include_dir="" #fi # #if test "X$g4clhep_lib_dir" = "X/usr/lib" -o "X$g4clhep_lib_dir" = "X/usr/local/lib"; then #g4clhep_lib_dir="" #fi echo " " case "$g4lib_build_shared" in '') g4lib_build_shared=n ;; esac echo " " case "$g4lib_build_static" in '') g4lib_build_static=n ;; esac echo " " case "$g4lib_use_shared" in '') g4lib_use_shared=n ;; esac echo " " case "$g4lib_use_static" in '') g4lib_use_static=n ;; esac case "$g4lib_build_dll" in '') g4lib_build_dll=n ;; esac case "$g4lib_build_dyn" in '') g4lib_build_dyn=n ;; esac # # Ask about building of SHARED|STATIC libraries - default STATIC. # echo "" if test "X$g4system" = "XWIN32-VC" -o "X$g4system" = "XWIN32-VC7"; then while test 1 = 1 ; do g4message=`cat << EOM By default 'static' libraries are built. Do you want to build DLL (.dll) libraries? EOM` 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 # g4lib_build_static="" # g4lib_use_shared=1 # g4lib_use_static="" break ;; # [eE]) # break # ;; # *) # echo " " # break # ;; esac done fi if test "X$g4system" != "XWIN32-VC" -a "X$g4system" != "XWIN32-VC7" ; then while test 1 = 1 ; do g4message=`cat << EOM By default 'static' (.a) libraries are built. Do you want to build 'shared' (.so) libraries? EOM` 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 # g4lib_build_static="" # g4lib_use_shared=1 # g4lib_use_static="" break ;; # [eE]) # break # ;; # *) # echo " " # break # ;; esac done if [ X$g4lib_build_shared = Xy ] ; then # # Ask about g4lib_build_static - default "n". # echo "" while test 1 = 1 ; do g4message=`cat << EOM You selected to build 'shared' (.so) libraries. Do you want to build 'static' (.a) libraries too? EOM` #dflt=$g4lib_build_static dflt=n rp=$g4message . ./myread gans=$ans case $gans in n*|N*) g4lib_build_static=n break ;; y*|Y*) # g4lib_build_shared=1 g4lib_build_static=y # g4lib_use_shared=1 # g4lib_use_static="" break ;; # [eE]) # break # ;; # *) # echo " " # break # ;; esac done ## Comment out in waiting G4LIB_USE_STATIC and G4LIB_USE_SHARED. # #if [ X$g4lib_build_static = Xy ] ; then ## ## Ask about g4lib_use_static - default "n". ## #echo "" # #while test 1 = 1 ; do # #g4message=`cat << EOM # #You selected to build 'shared' (.so) and 'static' (.a) libraries. #Do you want to use 'static' (.a) libraries? #EOM` # #dflt=$g4lib_use_static #rp=$g4message #. ./myread #gans=$ans # # case $gans in # # n*|N*) # break # ;; # y*|Y*) ## g4lib_build_shared=1 ## g4lib_build_static=1 ## g4lib_use_shared=1 # g4lib_use_static=y # break # ;; ## [eE]) ## break ## ;; ## *) ## echo " " ## break ## ;; # esac #done #fi fi fi # if !Win echo " " case "$g4global" in '') g4global=n ;; esac echo " " # By default it's 'grabular'! case "$g4granular" in '') g4granular=y ;; esac echo " " # Will be set (if needed) in GNUmakefile! case "$g4lib_use_granular" in '') g4lib_use_granular=y ;; esac 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)". # echo "" while test 1 = 1 ; do g4message=`cat << EOM Do you want to build 'global' compound libraries? EOM` dflt=$g4global rp=$g4message . ./myread gans=$ans case $gans in n*|N*) g4global=n g4granular=y g4lib_use_granular=y break ;; y*|Y*) g4global=y # Shoud be comment out to keep settings from config.sh - not now to keep as in release g4granular=n # Shoud be comment out to keep settings from config.sh - not now to keep as in release g4lib_use_granular=n break ;; # [eE]) # break # ;; # *) # echo " " # break # ;; esac done if [ X$g4global = Xy ] ; then # # Ask about g4granular - default "n". # echo "" while test 1 = 1 ; do g4message=`cat << EOM Granular libraries are used by defaults, you asked to build global compound libraries. Do you want to build 'granular' libraries too? EOM` dflt=$g4granular rp=$g4message . ./myread gans=$ans case $gans in n*|N*) g4granular=n break ;; y*|Y*) g4granular=y break ;; # [eE]) # break # ;; # *) # echo " " # break # ;; esac done if [ X$g4granular = Xy ] ; then # # Ask about g4lib_use_granular - default "n". # echo "" while test 1 = 1 ; do g4message=`cat << EOM Global libraries are used by defaults, you asked to build global compound libraries and granular libraries. Do you want to use 'granular' libraries instead? EOM` dflt=$g4lib_use_granular rp=$g4message . ./myread gans=$ans case $gans in n*|N*) g4lib_use_granular=n break ;; y*|Y*) g4lib_use_granular=y break ;; # [eE]) # break # ;; # *) # echo " " # break # ;; esac done fi fi fi # !Win ### End file - without will be problem! Check in others... echo " " case "$g4debug" in '') g4debug=n ;; esac # # Ask about g4debug - default "(empty)". # echo "" while test 1 = 1 ; do g4message=`cat << EOM Do you want to compile libraries in DEBUG mode (-g)? EOM` dflt=$g4debug rp=$g4message . ./myread gans=$ans case $gans in n*|N*) break ;; y*|Y*) g4debug=y break ;; # [eE]) # break # ;; # *) # echo " " # break # ;; esac done echo " " case "$g4ui_none" in '') g4ui_none=n ;; esac # Set by default! case "$g4ui_build_terminal_session" in '') g4ui_build_terminal_session=y ;; esac # Set by default! case "$g4ui_use_terminal" in '') g4ui_use_terminal=y ;; esac # Set by default! case "$g4ui_build_gag_session" in '') g4ui_build_gag_session=y ;; esac # Set by default! case "$g4ui_use_gag" in '') g4ui_use_gag=y ;; esac case "$g4ui_build_xm_session" in '') g4ui_build_xm_session=n ;; esac case "$g4ui_use_xm" in '') g4ui_use_xm=n ;; esac case "$g4ui_build_xaw_session" in '') g4ui_build_xaw_session=n ;; esac case "$g4ui_use_xaw" in '') g4ui_use_xaw=n ;; esac case "$g4ui_build_win32_session" in '') g4ui_build_win32_session=n ;; esac case "$g4ui_use_win32" in '') g4ui_use_win32=n ;; esac # Set by default! case "$g4ui_use_tcsh" in '') g4ui_use_tcsh=y ;; esac echo "" g4message=`cat << EOM G4UI_NONE If this variable is set, no UI sessions nor any UI libraries are built. This can be useful when running a pure batch job or in a user framework having its own UI system. Do you want to set this variable ? EOM` dflt=$g4ui_none rp=$g4message . ./myread gans=$ans case $gans in n*|N*) g4ui_none=n ;; y*|Y*) g4ui_none=y ;; esac case $g4ui_none in n) g4message=`cat << EOM G4UI_BUILD_TERMINAL_SESSION Specifies to include in kernel library a basic dumb terminal user interface (default). G4UI_USE_TERMINAL Specifies to use dumb terminal interface in the application to be built (default). EOM` dflt=$g4ui_use_terminal rp=$g4message #. ./myread #gans=$ans gans=y case $gans in n*|N*) g4ui_build_terminal_session=n g4ui_use_terminal=n ;; y*|Y*) g4ui_build_terminal_session=y g4ui_use_terminal=y ;; esac g4message=`cat << EOM G4UI_BUILD_GAG_SESSION Specifies to include in kernel library the GAG based user interface. G4UI_USE_GAG Specifies to use the GAG interface in the application to be built. EOM` dflt=$g4ui_use_gag rp=$g4message #. ./myread #gans=$ans gans=y case $gans in n*|N*) g4ui_build_gag_session=n g4ui_use_gag=n ;; y*|Y*) g4ui_build_gag_session=y g4ui_use_gag=y ;; esac if test "X$g4system" != "XWIN32-VC" -a "X$g4system" != "XWIN32-VC7"; then g4message=`cat << EOM G4UI_BUILD_XAW_SESSION G4UI_USE_XAW Specifies to include and use the XAW interfaces in the application to be built. The XAW (X11 Athena Widget set) extensions are required to activate and build this driver. EOM` dflt=$g4ui_use_xaw 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 use the XAW based user interfaces. Specify the correct path where XAW is installed in 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 fi else g4message=`cat << EOM You have selected to use XAW based user interfaces. But XAW was not found in $ans. Please specify the correct path where XAW is installed in 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 use XAW based user interfaces. But XAW was not found in expected place. Please specify the correct path where XAW is installed in 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 fi else g4message=`cat << EOM You have selected to use XAW based user interfaces. But XAW was not found in $ans. Please specify the correct path where XAW is installed in 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 g4ui_xawflags=" -I$g4ui_xawhome/include " if test "X$g4ui_xawhome" = "X/usr/X11R6" ; then g4ui_xawlibs=" -lXaw " else g4ui_xawlibs=" -L$g4ui_xawhome/lib -lXaw " 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=`cat << EOM G4UI_BUILD_XM_SESSION G4UI_USE_XM Specifies to include and use the XM Motif based user interfaces. The XM Motif extensions are required to activate and build this driver. EOM` dflt=$g4ui_use_xm 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 use the XM Motif based user interfaces. 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 g4ui_build_xm_session=n g4ui_use_xm=n fi else g4message=`cat << EOM You have selected to use XM Motif based user interfaces. But XM Motif 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 use XM Motif based user interfaces. But XM Motif 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 g4ui_build_xm_session=n g4ui_use_xm=n fi else g4message=`cat << EOM You have selected to use XM Motif based user interfaces. But XM Motif 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$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 g4vis_xmflags=" -I$g4vis_xmhome/include " if test "X$g4vis_xmhome" = "X/usr/X11R6" ; then g4vis_xmlibs=" -lXm -lXpm " else g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm -lXpm " 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=`cat << EOM G4UI_BUILD_WIN32_SESSION G4UI_USE_WIN32 Specifies to include and use the terminal interface for Windows systems. EOM` dflt=$g4ui_use_win32 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=`cat </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 use OPENGLXM 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 fi else g4message=`cat << EOM You have selected to use OPENGLXM driver. But it 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 use OPENGLXM driver. But it 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 fi else g4message=`cat << EOM You have selected to use OPENGLXM driver. But it 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 g4vis_xmflags=" -I$g4vis_xmhome/include " if test "X$g4vis_xmhome" = "X/usr/X11R6" ; then g4vis_xmlibs=" -lXm -lXpm " else g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm -lXpm " 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=`cat << EOM G4VIS_BUILD_OPENGLWIN32_DRIVER G4VIS_USE_OPENGLWIN32 It is an interface to the de facto standard 3D graphics library, OpenGL. It is well suited for real-time fast visualization and prototyping. The Windows version of the OpenGL libraries is required. EOM` dflt=$g4vis_use_openglwin32 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=`cat << EOM G4VIS_BUILD_DAWN_DRIVER G4VIS_USE_DAWN DAWN drivers are interfaces to the Fukui Renderer DAWN. DAWN is a vectorized 3D PostScript processor suited to prepare technical high quality outputs for presentation and/or documentation. EOM` dflt=$g4vis_use_dawn 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=`cat << EOM G4VIS_BUILD_OIX_DRIVER G4VIS_USE_OIX The OpenInventor driver is based on OpenInventor technology for scientific visualization. The X11 version of OpenInventor is required. EOM` dflt=$g4vis_use_oix 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 OIVHOME/include OIVHOME/lib You have selected to use OpenInventor driver. Specify the correct path (OIVHOME) where OpenInventor is installed in 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 fi else g4message=`cat << EOM OIVHOME/include OIVHOME/lib You have selected to use OpenInventor driver. But it was not found in $ans. Please specify the correct path where OpenInventor is installed in 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 OIVHOME/include OIVHOME/lib You have selected to use OpenInventor driver. But it was not found in expected place. Please specify the correct path where OpenInventor is installed in 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 fi else g4message=`cat << EOM OIVHOME/include OIVHOME/lib You have selected to use OpenInventor driver. But it was not found in $ans. Please specify the correct path where OpenInventor is installed in 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=`cat << EOM G4VIS_BUILD_RAYTRACERX_DRIVER G4VIS_USE_RAYTRACERX Allows for interactive ray-tracing graphics through X11. The X11 package is required. EOM` dflt=$g4vis_use_raytracerx 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=`cat << EOM G4VIS_BUILD_OIWIN32_DRIVER G4VIS_USE_OIWIN32 Specifies to build and use the driver for the free X11 version of OpenInventor on Windows systems. The Windows version of OpenInventor is required. EOM` dflt=$g4vis_use_oiwin32 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 OIVHOME/include OIVHOME/lib You have selected to use OpenInventor driver. Specify the correct path (OIVHOME) where OpenInventor is installed in 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 fi else g4message=`cat << EOM OIVHOME/include OIVHOME/lib You have selected to use OpenInventor driver. But it was not found in $ans. Please specify the correct path where OpenInventor is installed in 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 OIVHOME/include OIVHOME/lib You have selected to use OpenInventor driver. But it was not found in expected place. Please specify the correct path where OpenInventor is installed in 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 fi else g4message=`cat << EOM OIVHOME/include OIVHOME/lib You have selected to use OpenInventor driver. But it was not found in $ans. Please specify the correct path where OpenInventor is installed in 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=`cat << EOM G4VIS_BUILD_VRML_DRIVER G4VIS_USE_VRML These driver generate VRML files, which describe 3D scenes to be visualized with a proper VRML viewer. EOM` dflt=$g4vis_use_vrml 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 OGLHOME/include OGLHOME/lib You have selected to use OpenGL driver. Specify the correct path (OGLHOME) where OpenGL is installed in 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 fi else g4message=`cat << EOM OGLHOME/include OGLHOME/lib You have selected to use OpenGL driver. But it was not found in $ans. Please specify the correct path where OpenGL is installed in 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 OGLHOME/include OGLHOME/lib You have selected to use OpenGL driver. But it was not found in expected place. Please specify the correct path where OpenGL is installed in 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 fi else g4message=`cat << EOM OGLHOME/include OGLHOME/lib You have selected to use OpenGL driver. But it was not found in $ans. Please specify the correct path where OpenGL is installed in 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 also that g4vis_none is NOT set # if test "x$g4ui_none" = "xn" -a "x$g4vis_none" = "xn" ; then # Query the user to see if build of Qt UI module is needed g4message=`cat </dev/null | xargs echo` #If we got something, strip off the include/xerces part if test "X$xercesc_root" != "X"; then g4gdml_xercesc_root=`dirname $xercesc_root` g4gdml_xercesc_root=`dirname $g4gdml_xercesc_root` echo " " echo "checking for XercesC install... $g4gdml_xercesc_root" else g4gdml_xercesc_root="" echo " " echo "checking for XercesC install... no" fi fi #END OF XERCES AUTOPROBE # # If the autoprobe failed, prompt the user to enter the path to the Xerces # install # if test "X$g4gdml_xercesc_root" = "X"; then promptend="no" xercesloc="the standard locations" while test "$promptend" = "no"; do g4message=`cat << EOM Autodetection failed to locate XercesC in $xercesloc 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..." promptend=yes else if test -r "$ans/include/xercesc"; then g4gdml_xercesc_root=$ans echo "checking for XercesC install... $g4gdml_xercesc_root" 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 XERCES PROBE #END OF GDML/XERCES PROBE echo " " case "$g4make" in '') g4make=gmake ;; esac echo "" g4_gmake_version=`(gmake -v) 2>/dev/null` case $g4_gmake_version in GNU*) g4_gmake=y ;; *) g4_gmake=n ;; esac g4_make_version=`(make -v) 2>/dev/null` case $g4_make_version in GNU*) g4_make=y ;; *) g4_make=n ;; esac if [ $g4_gmake = y ] ; then g4make=gmake g4message=`cat << EOM G4MAKE You have GNU make which could be used to build GEANT4. You can select your own 'make' program if you want. EOM` fi if [ $g4_gmake = n ] && [ $g4_make = y ] ; then g4make=make g4message=`cat << EOM G4MAKE You have GNU make which could be used to build GEANT4. You can select your own 'make' program if you want. EOM` fi if [ $g4_gmake = n ] && [ $g4_make = n ] ; then g4make=none g4message=`cat << EOM G4MAKE You have NO GNU make which could be used to build GEANT4. Please select your own 'make' program compatible with GNU make. EOM` dflt=$g4make rp=$g4message . ./myread gans=$ans case $gans in '') g4make=$dflt ;; *) g4make=$gans ;; esac fi echo " " case "$g4wlib_build_g3tog4" in '') g4wlib_build_g3tog4=n ;; esac case "$g4w_use_g3tog4" in '') g4w_use_g3tog4=n ;; esac echo "" g4message=`cat << EOM G4LIB_BUILD_G3TOG4 The utility module 'g3tog4' will be built by setting this variable. NOTE: it requires a valid FORTRAN compiler to be installed on your system and the 'cernlib' command in the path, in order to build the ancillary tools! Do you want to build 'g3tog4' ? EOM` 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 echo " " case "$g4wlib_build_zlib" in '') g4wlib_build_zlib=n ;; esac case "$g4w_use_zlib" in '') g4w_use_zlib=n ;; esac echo "" g4message=`cat << EOM G4LIB_BUILD_ZLIB Do you want to activate compression for output files generated by the HepRep visualization driver? EOM` 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 echo " " case "$g4wanalysis_use" in '') g4wanalysis_use=n ;; esac echo "" g4message=`cat << EOM G4ANALYSIS_USE Activates the configuration setup for allowing plugins to analysis tools based on AIDA (Astract Interfaces for Data Analysis). In order to use AIDA features and compliant analysis tools, the proper environment for these tools will have to be set (see documentation for the specific analysis tools). EOM` dflt=$g4wanalysis_use rp=$g4message . ./myread gans=$ans case $gans in n*|N*) g4wanalysis_use=n ;; y*|Y*) g4wanalysis_use=y ;; esac : 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' 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' g4wanalysis_build='$g4wanalysis_build' g4wanalysis_build_jas='$g4wanalysis_build_jas' g4wanalysis_build_lab='$g4wanalysis_build_lab' g4wanalysis_build_lizard='$g4wanalysis_build_lizard' g4wanalysis_use='$g4wanalysis_use' g4wanalysis_use_jas='$g4wanalysis_use_jas' g4wanalysis_use_lab='$g4wanalysis_use_lab' g4wanalysis_use_lizard='$g4wanalysis_use_lizard' 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