diff -up cernlib-2006/2006/src/pawlib/paw/programs/paw.script cernlib-2006/2006/src/pawlib/paw/programs/paw diff -up cernlib-2006/2006/src/graflib/dzdoc/dzedit/dzedit.script cernlib-2006/2006/src/graflib/dzdoc/dzedit/dzedit diff -up cernlib-2006/2006/src/scripts/cernlib.script cernlib-2006/2006/src/scripts/cernlib --- cernlib-2006/2006/src/scripts/cernlib.script 2006-12-07 14:26:55.000000000 +0100 +++ cernlib-2006/2006/src/scripts/cernlib 2007-07-25 21:00:54.000000000 +0200 @@ -16,12 +16,17 @@ [ -z "$CERN_LEVEL" ] && gver="pro" || gver="$CERN_LEVEL" _P=0 ; _p=0 ; _u=0 ; Gsys="" + #default is to use dynamic lapack + _l=1 ; + dynlapack=0; + dynxbae=0; while [ $# -gt 0 ] do case $1 in -G) Gsys=$2 ; shift ;; -P) _P=1 ;; -s) _s="is an obsolete option" ;; -u) _u=1 ; _p=1 ;; + -l) _l=0 ;; -v) gver=$2 ; shift ;; --) shift ; break ;; *) break ;; @@ -46,14 +51,38 @@ [ $# -eq 2 -a $1 != "graflib" ] && lver=$2 dir=$CERN/$lver/lib ln=$1 - if [ $1 = "kernlib" -o $1 = "packlib" ] ; then + if [ $1 = "kernlib" ]; then _p=1 fi + if [ $1 = "packlib" -o $1 = "packlib-lesstif" ]; then + _p=1 + ln="packlib.a $dir/libkernlib" + [ $1 = "packlib-lesstif" -o z"$Gsys" = 'zMotif' ] && ln="packlib-lesstif.a $dir/lib$ln" + fi + + if [ $1 = "geant321" -o $1 = "pawlib" -o $1 = "packlib-lesstif" ]; then + [ -z "$Gsys" ] && Gsys="Motif" + fi [ $1 = "genlib" ] && ln="mathlib.a $dir/libphtools" [ $1 = "bvsl" ] && ln="mathlib" [ $1 = "mpalib" ] && ln="mathlib" - [ $1 = "lapack" ] && ln="lapack3.a $dir/libblas" - [ $1 = "pawlib" ] && ln="pawlib.a $dir/liblapack3.a $dir/libblas" + if [ $_l -eq 0 ] ; then + if [ $1 = "pawlib" ]; then + ln="pawlib-lesstif.a $dir/libpawlib.a $dir/liblapack3.a $dir/libblas" + dynxbae=1 + fi + [ $1 = "lapack" ] && ln="lapack3.a $dir/libblas" + else + if [ $1 = "pawlib" ] ; then + ln="pawlib-lesstif.a $dir/libpawlib" + dynxbae=1 + dynlapack=1 + fi + if [ $1 = "lapack" ] ; then + ln="" + dynlapack=1 + fi + fi [ $1 = "pythia" ] && ln="jetset" if [ $1 = "GKS" -o $1 = "gks" ] ; then drv="X11" ; glib="$1" ; dir="$CERN/gks/$lver/lib" @@ -69,10 +98,14 @@ [ $drv = "Motif" ] && drv="X11" ln="$ln.a $dir/libgraf$drv" fi - CERNLIB="$CERNLIB $dir/lib$ln.a" + [ -n "$ln" ] && CERNLIB="$CERNLIB $dir/lib$ln.a" done - [ $_p -eq 0 ] && CERNLIB="$CERNLIB $CERN/$gver/lib/libpacklib.a" - + if [ $_p -eq 0 ]; then + if [ z"$Gsys" = "zMotif" ]; then + CERNLIB="$CERNLIB $CERN/$gver/lib/libpacklib-lesstif.a" + fi + CERNLIB="$CERNLIB $CERN/$gver/lib/libpacklib.a $CERN/$gver/lib/libkernlib.a" + fi # get system name [ -d /NextAdmin ] && Msys="NeXT" || Msys=`uname -s` case $Msys in @@ -81,7 +114,6 @@ ;; *) ;; esac - if [ -n "$Gsys" ] ; then case $Msys in @@ -110,10 +142,12 @@ SYSGGL="-lfgl -lgl_s -lm -lbsd" ; SYSGMOTIF="-lXm -lXt -lX11 -lPW" ;; - Linux) [ -d /usr/X386/lib ] && SYSGX11="-L/usr/X386/lib -lX11" - [ -d /usr/X11/lib ] && SYSGX11="-L/usr/X11/lib -lX11" - [ -d /usr/X11R6/lib ] && SYSGX11="-L/usr/X11R6/lib -lX11" - [ -d /usr/X11R6/lib ] && SYSGMOTIF="-L/usr/X11R6/lib -lXm -lXt -lXp -lXext -lX11" + Linux) SYSGX11="-lX11" + SYSGMOTIF="-lXm -lXt -lXp -lXext -lX11" + [ -d /usr/X11R6/lib ] && SYSGX11="-L/usr/X11R6/lib $SYSGX11" + [ -d /usr/X11R6/lib64 ] && SYSGX11="-L/usr/X11R6/lib64 $SYSGX11" + [ -d /usr/X11R6/lib ] && SYSGMOTIF="-L/usr/X11R6/lib $SYSGMOTIF" + [ -d /usr/X11R6/lib64 ] && SYSGMOTIF="-L/usr/X11R6/lib64 $SYSGMOTIF" [ `uname -m` = ppc ] && SYSGMOTIF="$SYSGMOTIF -lSM -lICE -lXpm" ;; Darwin) [ -d /usr/X11R6/lib ] && SYSGX11="-L/usr/X11R6/lib -lX11" @@ -150,7 +184,11 @@ SYSGMOTIF="-L/usr/lib/X11 -lXm -lXt -lX11 -lm" ;; esac + if [ $_u -eq 0 ] ; then + [ $dynxbae = 1 ] && CERNLIB="$CERNLIB -lXbae -lXm -lXaw" + fi [ -z "$SYSGX11" ] && SYSGX11="-lX11" + case $Gsys in X11) CERNLIB="$CERNLIB $SYSGX11" ;; Motif) [ -z "$SYSGMOTIF" ] && SYSGMOTIF="-lXm -lXt $SYSGX11" ; @@ -212,6 +250,9 @@ if [ "$Msys" = "Linux" ] ; then CERNLIB="$CERNLIB -lnsl -lcrypt -ldl" fi + if [ $dynlapack = 1 ] ; then + CERNLIB="$CERNLIB -llapack -lblas" + fi if [ "$Msys" = "Darwin" ] ; then CERNLIB1="$CERNLIB -L/usr/local/lib/system -lcompat -ldl" fi diff -up cernlib-2006/2006/src/patchy/yexpand.script cernlib-2006/2006/src/patchy/yexpand