--- root.orig/configure	2006-03-02 02:41:46.000000000 -0600
+++ root.new/configure	2006-03-11 22:36:07.000000000 -0600
@@ -2190,21 +2190,21 @@
     # for a system library, then see if we have various headers needed.
     if test "x$enable_builtin_afterimage" = "xyes" ; then
        check_header "jpeglib.h" "" $ASIMAGE $ASIMAGE/include \
-          /usr/local/include /usr/include /opt/include
+          $finkdir/include /usr/local/include /usr/include /opt/include
        asjpegincdir=$found_dir
        check_header "png.h" "" $ASIMAGE $ASIMAGE/include \
-          /usr/local/include /usr/include /usr/local/include/libpng \
+          $finkdir/include /usr/local/include /usr/include /usr/local/include/libpng \
           /opt/include
        aspngincdir=$found_dir
        if test ! "x$enable_astiff" = "xno" ; then
            check_header "tiffio.h" "" $ASIMAGE $ASIMAGE/include \
-               /usr/local/include /usr/include /opt/include
+               $finkdir/include /usr/local/include /usr/include /opt/include
            astiffincdir=$found_dir
        else
            astiffincdir="--with-tiff=no"
        fi
        check_header "gif_lib.h" "" $ASIMAGE $ASIMAGE/include \
-          /usr/local/include /usr/include /opt/include
+          $finkdir/include /usr/local/include /usr/include /opt/include
        asgifincdir=$found_dir
 
        asextralib=""
@@ -2222,7 +2222,7 @@
        fi
        for k in $aslibs ; do
            check_library $k "$enable_shared" "" \
-             $ASIMAGE $ASIMAGE/lib /usr/local/lib /usr/lib /opt/lib
+             $ASIMAGE $ASIMAGE/lib $finkdir/lib /usr/local/lib /usr/lib /opt/lib
            if test "x$k" = "xlibz" ; then
                found_libz=$found_lib
                found_dirz=$found_dir
--- root.orig/build/unix/makelib.sh	2006-03-25 14:17:40.000000000 -0600
+++ root.new/build/unix/makelib.sh	2006-03-27 18:47:06.000000000 -0600
@@ -113,8 +113,8 @@
    # Add versioning information to shared library if available
    if [ "x$MAJOR" != "x" ]; then
        VERSION="-compatibility_version ${MAJOR} -current_version ${MAJOR}.${MINOR}.${REVIS}"
-       SONAME=`echo $SONAME | sed "s/.*\./&${MAJOR}./"`
-       LIB=`echo $LIB | sed "s/\/*.*\/.*\./&${MAJOR}.${MINOR}./"`
+       SONAME=`echo $SONAME | sed "s/\(.*\)\.dylib/\1.${MAJOR}.dylib/"`
+       LIB=`echo $LIB | sed "s/\(\/*.*\/.*\)\.dylib/\1.${MAJOR}.${MINOR}.dylib/"`
    fi
    if [ $macosx_minor -ge 4 ]; then
       cmd="$LD $SOFLAGS$SONAME $m64 -o $LIB $OBJS \
@@ -135,19 +135,21 @@
    else
       opt=-O
    fi
-   if [ $macosx_minor -ge 4 ]; then
-      cmd="ln -fs `basename $LIB` $BUNDLE"
-   elif [ $macosx_minor -ge 3 ]; then
-      cmd="$LD $opt $m64 -bundle -undefined dynamic_lookup -o \
-          $BUNDLE $OBJS `[ -d ${FINKDIR}/lib ] && echo -L${FINKDIR}/lib` \
-          -ldl $EXTRA $EXPLLNKCORE"
-   else
-      cmd="$LD $opt -bundle -undefined suppress -o $BUNDLE \
-	   $OBJS `[ -d ${FINKDIR}/lib ] && echo -L${FINKDIR}/lib` \
-           -ldl $EXTRA $EXPLLNKCORE"
+   if [ $LIB != $BUNDLE ]; then
+       if [ $macosx_minor -ge 4 ]; then
+	   cmd="ln -fs `basename $LIB` $BUNDLE"
+       elif [ $macosx_minor -ge 3 ]; then
+	   cmd="$LD $opt $m64 -bundle -undefined dynamic_lookup -o \
+                $BUNDLE $OBJS `[ -d ${FINKDIR}/lib ] && echo -L${FINKDIR}/lib` \
+                -ldl $EXTRA $EXPLLNKCORE"
+       else
+	   cmd="$LD $opt -bundle -undefined suppress -o $BUNDLE \
+	        $OBJS `[ -d ${FINKDIR}/lib ] && echo -L${FINKDIR}/lib` \
+                -ldl $EXTRA $EXPLLNKCORE"
+       fi
+       echo $cmd
+       $cmd
    fi
-   echo $cmd
-   $cmd
 elif [ $LD = "KCC" ]; then
    cmd="$LD $LDFLAGS -o $LIB $OBJS $EXTRA $EXPLLNKCORE"
    echo $cmd
@@ -195,8 +197,11 @@
 	ln -fs $SONAME.$MAJOR        $LIB
     elif [ -f $LIB ]; then
 	# Versioned library has format foo.3.05.so
-	ln -fs `echo $SONAME | sed "s/.*\./&${MINOR}./"` `echo $LIB | sed "s/\.${MINOR}//"`
-	ln -fs `echo $SONAME | sed "s/.*\./&${MINOR}./"` `echo $LIB | sed "s/\.${MAJOR}\.${MINOR}//"`
+	source_file=`echo $SONAME | sed "s/.*\./&${MINOR}./"`
+	if [ $LIB != ${LIB/.${MAJOR}.${MINOR}/} ]; then
+	    ln -fs $source_file ${LIB/.${MINOR}/}
+	    ln -fs $source_file ${LIB/.${MAJOR}.${MINOR}/}
+	fi
     fi
 fi
 
--- root.orig/build/unix/makecintdlls.sh	2006-04-23 13:28:45.000000000 -0500
+++ root.new/build/unix/makecintdlls.sh		2006-04-23 13:32:44.000000000 -0500
@@ -82,32 +82,6 @@
    ${1}
 }
 
-rename() {
-   if [ "${SOEXT}" != "dll" ]; then
-      if [ "${PLATFORM}" = "macosx" ]; then
-         if [ ${macosx_minor} -ge 4 ]; then
-            mv ${1}.${SOEXT} ${1}.dll
-            rm -f ${1}.so
-         else
-            mv ${1}.so ${1}.dll
-            rm -f ${1}.${SOEXT}
-         fi
-      else
-         mv ${1}.${SOEXT} ${1}.dll
-      fi
-   fi
-}
-
-macrename() {
-   if [ "${PLATFORM}" = "macosx" ]; then
-      if [ ${macosx_minor} -ge 4 ]; then
-         mv -f ${1}.${SOEXT} ${1}.so
-      else
-         rm -f ${1}.${SOEXT}
-      fi
-   fi;
-}
-
 cpdllwin32() {
    mv -f bin/stdfunc.dll   ${CINTDIRI}
    mv -f bin/vector.dll    ${CINTDIRS}
@@ -138,9 +112,8 @@
          -DG__MAKECINT -c-2 -Z0 ${STDFUNCDIR}/stdfunc.h"
 execute "${CC} ${OPT} ${CINTCFLAGS} -I. ${CXXOUT}${STDFUNCDIR}/G__c_stdfunc.o \
          -c ${STDFUNCDIR}/G__c_stdfunc.c"
-${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" stdfunc.${SOEXT} \
-   ${CINTDIRI}/stdfunc.${SOEXT} "${STDFUNCDIR}/G__c_stdfunc.o"
-rename ${CINTDIRI}/stdfunc
+${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" ${CINTDIRI}/stdfunc.dll \
+   ${CINTDIRI}/stdfunc.dll "${STDFUNCDIR}/G__c_stdfunc.o"
 
 #execute "${CINT} -w1 -zstdcxxfunc -n${STDFUNCDIR}/G__c_stdcxxfunc.cxx \
 #         -D__MAKECINT__ -DG__MAKECINT -c-1 -A -Z0 ${STDFUNCDIR}/stdcxxfunc.h"
@@ -175,9 +148,8 @@
          -c ${POSIXDIR}/G__c_posix.c"
 execute "${CC} ${OPT} ${CINTCFLAGS} -I. ${CXXOUT}${POSIXDIR}/exten.o \
          -c ${POSIXDIR}/exten.c"
-${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" posix.${SOEXT} \
-   ${CINTDIRI}/posix.${SOEXT} "${POSIXDIR}/G__c_posix.o ${POSIXDIR}/exten.o"
-rename ${CINTDIRI}/posix
+${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" ${CINTDIRI}/posix.dll \
+   ${CINTDIRI}/posix.dll "${POSIXDIR}/G__c_posix.o ${POSIXDIR}/exten.o"
 
 rm -f ${POSIXDIR}/G__c_posix.c ${POSIXDIR}/G__c_posix.h ${POSIXDIR}/G__c_posix.o \
       ${POSIXDIR}/exten.o
@@ -189,9 +161,8 @@
 execute "${CINT} -K -w1 -zipc -n${IPCDIR}/G__c_ipc.c -D__MAKECINT__ \
          -DG__MAKECINT -c-2 -Z0 ${IPCDIR}/ipcif.h"
 execute "${CC} ${OPT} ${CINTCFLAGS} -I. ${CXXOUT}${IPCDIR}/G__c_ipc.o -c ${IPCDIR}/G__c_ipc.c"
-${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" ipc.${SOEXT} \
-   ${CINTDIRI}/sys/ipc.${SOEXT} "${IPCDIR}/G__c_ipc.o"
-rename ${CINTDIRI}/sys/ipc
+${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" ${CINTDIRI}/sys/ipc.dll \
+   ${CINTDIRI}/sys/ipc.dll "${IPCDIR}/G__c_ipc.o"
 
 rm -f ${IPCDIR}/G__c_ipc.c ${IPCDIR}/G__c_ipc.h ${IPCDIR}/G__c_ipc.o
 
@@ -233,12 +204,10 @@
          -c ${STLDIR}/rootcint_vector.cxx"
 execute "${CXX} ${OPT} ${CINTCXXFLAGS} ${INCDIRS} -DWHAT=\"vector\" \
          ${CXXOUT}${STLDIR}/stlLoader_vector.o -c ${LINKDEFDIR}/stlLoader.cc"
-${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" vector.${SOEXT} \
-   ${CINTDIRS}/vector.${SOEXT} ${STLDIR}/G__cpp_vector.o ${STLDIR}/stlLoader_vector.o
-${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" libvectorDict.${SOEXT} \
-   lib/libvectorDict.${SOEXT} ${STLDIR}/rootcint_vector.o
-rename ${CINTDIRS}/vector
-macrename lib/libvectorDict
+${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" ${CINTDIRS}/vector.dll \
+   ${CINTDIRS}/vector.dll ${STLDIR}/G__cpp_vector.o ${STLDIR}/stlLoader_vector.o
+${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" libvectorDict.so \
+   lib/libvectorDict.so ${STLDIR}/rootcint_vector.o
 
 execute "${CINT} -w1 -zlist -n${STLDIR}/G__cpp_list.cxx -D__MAKECINT__ \
          -DG__MAKECINT -I${STLDIR} -c-1 -A  -Z0 ${STLDIR}/lst.h"
@@ -250,12 +219,10 @@
          -c ${STLDIR}/rootcint_list.cxx"
 execute "${CXX} ${OPT} ${CINTCXXFLAGS} ${INCDIRS} -DWHAT=\"list\" \
          ${CXXOUT}${STLDIR}/stlLoader_list.o -c ${LINKDEFDIR}/stlLoader.cc"
-${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" list.${SOEXT} \
-   ${CINTDIRS}/list.${SOEXT} ${STLDIR}/G__cpp_list.o ${STLDIR}/stlLoader_list.o
-${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" liblistDict.${SOEXT} \
-   lib/liblistDict.${SOEXT} ${STLDIR}/rootcint_list.o
-rename ${CINTDIRS}/list
-macrename lib/liblistDict
+${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" ${CINTDIRS}/list.dll \
+   ${CINTDIRS}/list.dll ${STLDIR}/G__cpp_list.o ${STLDIR}/stlLoader_list.o
+${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" liblistDict.so \
+   lib/liblistDict.so ${STLDIR}/rootcint_list.o
 
 execute "${CINT} -w1 -zdeque -n${STLDIR}/G__cpp_deque.cxx -D__MAKECINT__ \
          -DG__MAKECINT -I${STLDIR} -c-1 -A  -Z0 ${STLDIR}/dqu.h"
@@ -267,12 +234,10 @@
          -c ${STLDIR}/rootcint_deque.cxx"
 execute "${CXX} ${OPT} ${CINTCXXFLAGS} ${INCDIRS} -DWHAT=\"deque\" \
          ${CXXOUT}${STLDIR}/stlLoader_deque.o -c ${LINKDEFDIR}/stlLoader.cc"
-${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" deque.${SOEXT} \
-   ${CINTDIRS}/deque.${SOEXT} ${STLDIR}/G__cpp_deque.o  ${STLDIR}/stlLoader_deque.o 
-${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" libdequeDict.${SOEXT} \
-   lib/libdequeDict.${SOEXT} ${STLDIR}/rootcint_deque.o
-rename ${CINTDIRS}/deque
-macrename lib/libdequeDict
+${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" ${CINTDIRS}/deque.dll \
+   ${CINTDIRS}/deque.dll ${STLDIR}/G__cpp_deque.o  ${STLDIR}/stlLoader_deque.o 
+${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" libdequeDict.so \
+   lib/libdequeDict.so ${STLDIR}/rootcint_deque.o
 
 execute "${CINT} -w1 -zmap -n${STLDIR}/G__cpp_map.cxx -D__MAKECINT__ \
          -DG__MAKECINT -I${STLDIR} -c-1 -A  -Z0 ${STLDIR}/mp.h"
@@ -283,12 +248,10 @@
          -c ${STLDIR}/rootcint_map.cxx"
 execute "${CXX} ${OPT} ${CINTCXXFLAGS} ${INCDIRS} -DWHAT=\"map\" \
          ${CXXOUT}${STLDIR}/stlLoader_map.o -c ${LINKDEFDIR}/stlLoader.cc"
-${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" map.${SOEXT} \
-   ${CINTDIRS}/map.${SOEXT} ${STLDIR}/G__cpp_map.o ${STLDIR}/stlLoader_map.o
-${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" libmapDict.${SOEXT} \
-   lib/libmapDict.${SOEXT} ${STLDIR}/rootcint_map.o
-rename ${CINTDIRS}/map
-macrename lib/libmapDict
+${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" ${CINTDIRS}/map.dll \
+   ${CINTDIRS}/map.dll ${STLDIR}/G__cpp_map.o ${STLDIR}/stlLoader_map.o
+${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" libmapDict.so \
+   lib/libmapDict.so ${STLDIR}/rootcint_map.o
 
 execute "${CINT} -w1 -zmap2 -n${STLDIR}/G__cpp_map2.cxx -D__MAKECINT__ \
          -DG__MAKECINT -DG__MAP2 -I${STLDIR} -c-1 -A  -Z0 ${STLDIR}/mp.h"
@@ -300,12 +263,10 @@
          -c ${STLDIR}/rootcint_map2.cxx"
 execute "${CXX} ${OPT} ${CINTCXXFLAGS} ${INCDIRS} -DWHAT=\"map2\" \
          ${CXXOUT}${STLDIR}/stlLoader_map2.o -c ${LINKDEFDIR}/stlLoader.cc"
-${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" map2.${SOEXT} \
-   ${CINTDIRS}/map2.${SOEXT} ${STLDIR}/G__cpp_map2.o ${STLDIR}/stlLoader_map2.o 
-${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" libmap2Dict.${SOEXT} \
-   lib/libmap2Dict.${SOEXT} ${STLDIR}/rootcint_map2.o
-rename ${CINTDIRS}/map2
-macrename lib/libmap2Dict
+${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" ${CINTDIRS}/map2.dll \
+   ${CINTDIRS}/map2.dll ${STLDIR}/G__cpp_map2.o ${STLDIR}/stlLoader_map2.o 
+${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" libmap2Dict.so \
+   lib/libmap2Dict.so ${STLDIR}/rootcint_map2.o
 
 execute "${CINT} -w1 -zset -n${STLDIR}/G__cpp_set.cxx -D__MAKECINT__ \
          -DG__MAKECINT -I${STLDIR} -c-1 -A  -Z0 ${STLDIR}/st.h"
@@ -316,12 +277,10 @@
          -c ${STLDIR}/rootcint_set.cxx"
 execute "${CXX} ${OPT} ${CINTCXXFLAGS} ${INCDIRS} -DWHAT=\"set\" \
          ${CXXOUT}${STLDIR}/stlLoader_set.o -c ${LINKDEFDIR}/stlLoader.cc"
-${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" set.${SOEXT} \
-   ${CINTDIRS}/set.${SOEXT} ${STLDIR}/G__cpp_set.o ${STLDIR}/stlLoader_set.o
+${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" ${CINTDIRS}/set.dll \
+   ${CINTDIRS}/set.dll ${STLDIR}/G__cpp_set.o ${STLDIR}/stlLoader_set.o
 ${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" libsetDict.${SOEXT} \
-   lib/libsetDict.${SOEXT} ${STLDIR}/rootcint_set.o
-rename ${CINTDIRS}/set
-macrename lib/libsetDict
+   lib/libsetDict.so ${STLDIR}/rootcint_set.o
 
 execute "${CINT} -w1 -zmultimap -n${STLDIR}/G__cpp_multimap.cxx -D__MAKECINT__ \
          -DG__MAKECINT -I${STLDIR} -c-1 -A  -Z0 ${STLDIR}/multmp.h"
@@ -333,13 +292,11 @@
          -c ${STLDIR}/rootcint_multimap.cxx"
 execute "${CXX} ${OPT} ${CINTCXXFLAGS} ${INCDIRS} -DWHAT=\"multimap\" \
          ${CXXOUT}${STLDIR}/stlLoader_multimap.o -c ${LINKDEFDIR}/stlLoader.cc"
-${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" multimap.${SOEXT} \
-   ${CINTDIRS}/multimap.${SOEXT} ${STLDIR}/G__cpp_multimap.o \
+${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" ${CINTDIRS}/multimap.dll \
+   ${CINTDIRS}/multimap.dll ${STLDIR}/G__cpp_multimap.o \
    ${STLDIR}/stlLoader_multimap.o
-${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" libmultimapDict.${SOEXT} \
-   lib/libmultimapDict.${SOEXT} ${STLDIR}/rootcint_multimap.o
-rename ${CINTDIRS}/multimap
-macrename lib/libmultimapDict
+${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" libmultimapDict.so \
+   lib/libmultimapDict.so ${STLDIR}/rootcint_multimap.o
 
 execute "${CINT} -w1 -zmultimap2 -n${STLDIR}/G__cpp_multimap2.cxx -D__MAKECINT__ \
          -DG__MAKECINT -DG__MAP2 -I${STLDIR} -c-1 -A  -Z0 ${STLDIR}/multmp.h"
@@ -351,13 +308,11 @@
          -c ${STLDIR}/rootcint_multimap2.cxx"
 execute "${CXX} ${OPT} ${CINTCXXFLAGS} ${INCDIRS} -DWHAT=\"multimap2\" \
          ${CXXOUT}${STLDIR}/stlLoader_multimap2.o -c ${LINKDEFDIR}/stlLoader.cc"
-${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" multimap2.${SOEXT} \
-   ${CINTDIRS}/multimap2.${SOEXT} ${STLDIR}/G__cpp_multimap2.o \
+${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" ${CINTDIRS}/multimap2.dll \
+   ${CINTDIRS}/multimap2.dll ${STLDIR}/G__cpp_multimap2.o \
    ${STLDIR}/stlLoader_multimap2.o
-${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" libmultimap2Dict.${SOEXT} \
-   lib/libmultimap2Dict.${SOEXT} ${STLDIR}/rootcint_multimap2.o
-rename ${CINTDIRS}/multimap2
-macrename lib/libmultimap2Dict
+${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" libmultimap2Dict.so \
+   lib/libmultimap2Dict.so ${STLDIR}/rootcint_multimap2.o
 
 execute "${CINT} -w1 -zmultiset -n${STLDIR}/G__cpp_multiset.cxx -D__MAKECINT__ \
          -DG__MAKECINT -I${STLDIR} -c-1 -A  -Z0 ${STLDIR}/multst.h"
@@ -369,29 +324,25 @@
          -c ${STLDIR}/rootcint_multiset.cxx"
 execute "${CXX} ${OPT} ${CINTCXXFLAGS} ${INCDIRS} -DWHAT=\"multiset\" \
          ${CXXOUT}${STLDIR}/stlLoader_multiset.o -c ${LINKDEFDIR}/stlLoader.cc"
-${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" multiset.${SOEXT} \
-   ${CINTDIRS}/multiset.${SOEXT} ${STLDIR}/G__cpp_multiset.o \
+${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" ${CINTDIRS}/multiset.dll \
+   ${CINTDIRS}/multiset.dll ${STLDIR}/G__cpp_multiset.o \
    ${STLDIR}/stlLoader_multiset.o
-${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" libmultisetDict.${SOEXT} \
-   lib/libmultisetDict.${SOEXT} ${STLDIR}/rootcint_multiset.o
-rename ${CINTDIRS}/multiset
-macrename lib/libmultisetDict
+${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" libmultisetDict.so \
+   lib/libmultisetDict.so ${STLDIR}/rootcint_multiset.o
 
 execute "${CINT} -w1 -zstack -n${STLDIR}/G__cpp_stack.cxx -D__MAKECINT__ \
          -DG__MAKECINT -I${STLDIR} -c-1 -A  -Z0 ${STLDIR}/stk.h"
 execute "${CXX} ${OPT} ${CINTCXXFLAGS} ${INCDIRS} ${CXXOUT}${STLDIR}/G__cpp_stack.o \
          -c ${STLDIR}/G__cpp_stack.cxx"
-${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" stack.${SOEXT} \
-   ${CINTDIRS}/stack.${SOEXT} ${STLDIR}/G__cpp_stack.o
-rename ${CINTDIRS}/stack
+${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" ${CINTDIRS}/stack.dll \
+   ${CINTDIRS}/stack.dll ${STLDIR}/G__cpp_stack.o
 
 execute "${CINT} -w1 -zqueue -n${STLDIR}/G__cpp_queue.cxx -D__MAKECINT__ \
          -DG__MAKECINT -I${STLDIR} -c-1 -A  -Z0 ${STLDIR}/que.h"
 execute "${CXX} ${OPT} ${CINTCXXFLAGS} ${INCDIRS} ${CXXOUT}${STLDIR}/G__cpp_queue.o \
          -c ${STLDIR}/G__cpp_queue.cxx"
-${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" queue.${SOEXT} \
-   ${CINTDIRS}/queue.${SOEXT} ${STLDIR}/G__cpp_queue.o
-rename ${CINTDIRS}/queue
+${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" ${CINTDIRS}/queue.dll \
+   ${CINTDIRS}/queue.dll ${STLDIR}/G__cpp_queue.o
 
 #execute "${CINT} -w1 -zvalarray -n${STLDIR}/G__cpp_valarray.cxx -D__MAKECINT__ \
 #         -DG__MAKECINT -I${STLDIR} -c-1 -A  -Z0 ${STLDIR}/vary.h"
@@ -405,17 +356,15 @@
          -DG__MAKECINT -I${STLDIR} -c-1 -A  -Z0 ${STLDIR}/cinteh.h"
 execute "${CXX} ${OPT} ${CINTCXXFLAGS} ${INCDIRS} ${CXXOUT}${STLDIR}/G__cpp_exception.o \
          -c ${STLDIR}/G__cpp_exception.cxx"
-${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" exception.${SOEXT} \
-   ${CINTDIRS}/exception.${SOEXT} ${STLDIR}/G__cpp_exception.o
-rename ${CINTDIRS}/exception
+${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" ${CINTDIRS}/exception.dll \
+   ${CINTDIRS}/exception.dll ${STLDIR}/G__cpp_exception.o
 
 execute "${CINT} -w1 -zcomplex -n${STLDIR}/G__cpp_complex.cxx -D__MAKECINT__ \
          -DG__MAKECINT -I${STLDIR} -c-1 -A  -Z0 ${STLDIR}/cmplx.h"
 execute "${CXX} ${OPT} ${CINTCXXFLAGS} ${INCDIRS} ${CXXOUT}${STLDIR}/G__cpp_complex.o \
          -c ${STLDIR}/G__cpp_complex.cxx"
-${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" complex.${SOEXT} \
-   ${CINTDIRS}/complex.${SOEXT} ${STLDIR}/G__cpp_complex.o
-rename ${CINTDIRS}/complex
+${MAKELIB} ${PLATFORM} ${LD} "${LDFLAGS}" "${SOFLAGS}" ${CINTDIRS}/complex.dll \
+   ${CINTDIRS}/complex.dll ${STLDIR}/G__cpp_complex.o
 
 rm -f ${STLDIR}/G__* ${STLDIR}/rootcint_*  ${STLDIR}/stlLoader_*

--- root.orig/config/Makefile.depend	2006-05-28 15:07:59.000000000 -0500
+++ root.new/config/Makefile.depend	2006-06-04 13:36:40.000000000 -0500
@@ -8,80 +8,91 @@
 HISTLIBEXTRA        = lib/libMatrix.lib
 GRAFLIBDEP          = $(HISTLIB) $(MATRIXLIB)
 GRAFLIBEXTRA        = lib/libHist.lib lib/libMatrix.lib
-GPADLIBDEP          = $(GRAFLIB) $(HISTLIB)
-GPADLIBEXTRA        = lib/libGraf.lib lib/libHist.lib
-G3DLIBDEP           = $(GRAFLIB) $(HISTLIB)
-G3DLIBEXTRA         = lib/libGraf.lib lib/libHist.lib
+GPADLIBDEP          = $(GRAFLIB) $(HISTLIB) $(MATRIXLIB)
+GPADLIBEXTRA        = lib/libGraf.lib lib/libHist.lib lib/libMatrix.lib
+G3DLIBDEP           = $(GRAFLIB) $(HISTLIB) $(MATRIXLIB)
+G3DLIBEXTRA         = lib/libGraf.lib lib/libHist.lib lib/libMatrix.lib
 WIN32GDKLIBDEP      = $(GPADLIB) $(GRAFLIB)
 WIN32GDKLIBEXTRA    = lib/libGpad.lib lib/libGraf.lib
-ASIMAGELIBDEP       = $(GRAFLIB) $(HISTLIB) $(GPADLIB)
-ASIMAGELIBEXTRA     = lib/libGraf.lib lib/libHist.lib lib/libGpad.lib
-ASIMAGEGUILIBDEP    = $(GRAFLIB) $(HISTLIB) $(GUILIB) $(ASIMAGELIB)
+ASIMAGELIBDEP       = $(GRAFLIB) $(HISTLIB) $(GPADLIB) $(MATRIXLIB)
+ASIMAGELIBEXTRA     = lib/libGraf.lib lib/libHist.lib lib/libGpad.lib lib/libMatrix.lib
+ASIMAGEGUILIBDEP    = $(GRAFLIB) $(HISTLIB) $(GUILIB) $(ASIMAGELIB) $(GPADLIB) $(MATRIXLIB)
 ASIMAGEGUILIBEXTRA  = lib/libGraf.lib lib/libHist.lib lib/libGui.lib \
-                      lib/libASImage.lib
-ASIMAGEGSLIBDEP     = $(GRAFLIB) $(ASIMAGELIB)
-ASIMAGEGSLIBEXTRA   = lib/libGraf.lib lib/libASImage.lib
+                      lib/libASImage.lib lib/libGpad.lib lib/libMatrix.lib
+ASIMAGEGSLIBDEP     = $(GRAFLIB) $(ASIMAGELIB) $(HISTLIB) $(GPADLIB) $(MATRIXLIB)
+ASIMAGEGSLIBEXTRA   = lib/libGraf.lib lib/libASImage.lib lib/libHist.lib \
+                      lib/libGpad.lib lib/libMatrix.lib
 GEDLIBDEP           = $(HISTLIB) $(GPADLIB) $(GRAFLIB) $(GUILIB) $(TREELIB) \
-                      $(TREEPLAYERLIB)
+                      $(TREEPLAYERLIB) $(MARIXLIB) $(G3DLIB)
 GEDLIBEXTRA         = lib/libHist.lib lib/libGpad.lib lib/libGraf.lib \
-                      lib/libTree.lib lib/libTreePlayer.lib lib/libGui.lib
-GEDOLDLIBDEP        = $(GPADLIB) $(GRAFLIB)
-GEDOLDLIBEXTRA      = lib/libGpad.lib lib/libGraf.lib
-POSTSCRIPTLIBDEP    = $(GRAFLIB)
-POSTSCRIPTLIBEXTRA  = lib/libGraf.lib
-GUILIBDEP           = $(GPADLIB) $(GRAFLIB)
-GUILIBEXTRA         = lib/libGpad.lib lib/libGraf.lib
+                      lib/libTree.lib lib/libTreePlayer.lib lib/libGui.lib \
+                      lib/libMatrix.lib lib/libGraf3d.lib
+GEDOLDLIBDEP        = $(GPADLIB) $(GRAFLIB) $(HISTLIB) $(MARIXLIB)
+GEDOLDLIBEXTRA      = lib/libGpad.lib lib/libGraf.lib lib/libHist.lib lib/libMatrix.lib
+POSTSCRIPTLIBDEP    = $(GRAFLIB) $(HISTLIB) $(MARIXLIB)
+POSTSCRIPTLIBEXTRA  = lib/libGraf.lib lib/libHist.lib lib/libMatrix.lib
+GUILIBDEP           = $(GPADLIB) $(GRAFLIB) $(HISTLIB) $(MATRIXLIB)
+GUILIBEXTRA         = lib/libGpad.lib lib/libGraf.lib lib/libHist.lib lib/libMatrix.lib
 HISTPAINTERLIBDEP   = $(GRAFLIB) $(HISTLIB) $(MATRIXLIB)
 HISTPAINTERLIBEXTRA = lib/libGraf.lib lib/libHist.lib lib/libMatrix.lib
-HTMLLIBDEP          = $(GRAFLIB)
-HTMLLIBEXTRA        = lib/libGraf.lib
+HTMLLIBDEP          = $(GRAFLIB) $(HISTLIB) $(MATRIXLIB)
+HTMLLIBEXTRA        = lib/libGraf.lib lib/libHist.lib lib/libMatrix.lib
 MINUITLIBDEP        = $(GRAFLIB) $(HISTLIB) $(MATRIXLIB)
 MINUITLIBEXTRA      = lib/libGraf.lib lib/libHist.lib lib/libMatrix.lib
 MINUIT2LIBDEP       = $(GRAFLIB) $(HISTLIB) $(MATRIXLIB)
 MINUIT2LIBEXTRA     = lib/libGraf.lib lib/libHist.lib lib/libMatrix.lib
-FUMILILIBDEP        = $(GRAFLIB) $(HISTLIB)
-FUMILILIBEXTRA      = lib/libGraf.lib lib/libHist.lib
-TREEPLAYERLIBDEP    = $(TREELIB) $(G3DLIB) $(GRAFLIB) $(HISTLIB)
+FUMILILIBDEP        = $(GRAFLIB) $(HISTLIB) $(MATRIXLIB)
+FUMILILIBEXTRA      = lib/libGraf.lib lib/libHist.lib lib/libMatrix.lib
+TREEPLAYERLIBDEP    = $(TREELIB) $(G3DLIB) $(GRAFLIB) $(HISTLIB) $(MATRIXLIB)
 TREEPLAYERLIBEXTRA  = lib/libTree.lib lib/libGraf3d.lib \
-                      lib/libGraf.lib lib/libHist.lib
-TREEVIEWERLIBDEP    = $(TREELIB) $(GPADLIB) $(GRAFLIB) $(HISTLIB) $(GUILIB)
+                      lib/libGraf.lib lib/libHist.lib lib/libMatrix.lib
+TREEVIEWERLIBDEP    = $(TREELIB) $(GPADLIB) $(GRAFLIB) $(HISTLIB) $(GUILIB) $(MATRIXLIB)
 TREEVIEWERLIBEXTRA  = lib/libTree.lib lib/libGpad.lib lib/libGraf.lib \
-                      lib/libHist.lib lib/libGui.lib
+                      lib/libHist.lib lib/libGui.lib lib/libMatrix.lib
 PROOFLIBDEP         = $(TREELIB) $(G3DLIB) $(GRAFLIB) $(HISTLIB) \
-                      $(TREEPLAYERLIB) $(THREADLIB)
+                      $(TREEPLAYERLIB) $(THREADLIB) $(MATRIXLIB)
 PROOFLIBEXTRA       = lib/libTree.lib lib/libGraf3d.lib lib/libGraf.lib \
-                      lib/libHist.lib lib/libTreePlayer.lib lib/libThread.lib
-PROOFXLIBDEP        = $(PROOFLIB) $(THREADLIB) $(XPDLIB)
-PROOFXLIBEXTRA      = lib/libProof.lib lib/libThread.lib lib/libXrdProofd.lib
-PROOFGUILIBDEP      = $(PROOFLIB) $(GUILIB)
-PROOFGUILIBEXTRA    = lib/libProof.lib lib/libGui.lib
+                      lib/libHist.lib lib/libTreePlayer.lib lib/libThread.lib \
+                      lib/libMatrix.lib
+PROOFXLIBDEP        = $(PROOFLIB) $(THREADLIB) $(XPDLIB) $(TREELIB) $(G3DLIB) \
+                      $(GRAFLIB) $(HISTLIB) $(TREEPLAYERLIB) $(MATRIXLIB)
+PROOFXLIBEXTRA      = lib/libProof.lib lib/libThread.lib lib/libXrdProofd.lib \
+                      lib/libTree.lib lib/libGraf3d.lib lib/libGraf.lib \
+                      lib/libHist.lib lib/libTreePlayer.lib lib/libMatrix.lib
+PROOFGUILIBDEP      = $(PROOFLIB) $(GUILIB) $(TREELIB) $(G3DLIB) $(GRAFLIB) $(GPADLIB) \
+                      $(HISTLIB) $(TREEPLAYERLIB) $(THREADLIB) $(MATRIXLIB)
+PROOFGUILIBEXTRA    = lib/libProof.lib lib/libGui.lib lib/libTree.lib lib/libGraf3d.lib \
+                      lib/libGraf.lib lib/libGpad.lib lib/libHist.lib lib/libTreePlayer.lib \
+                      lib/libThread.lib lib/libMatrix.lib
 PEACLIBDEP          = $(PROOFLIB) $(CLARENSLIB)
 PEACLIBEXTRA        = lib/libProof.lib lib/libClarens.lib
 PEACGUILIBDEP       = $(GUILIB)
 PEACGUILIBEXTRA     = lib/libGui.lib
-EGLIBDEP            = $(G3DLIB) $(GRAFLIB)
-EGLIBEXTRA          = lib/libGraf3d.lib lib/libGraf.lib
-VMCLIBDEP           = $(EGLIB) $(GEOMLIB)
-VMCLIBEXTRA         = lib/libEG.lib lib/libGeom.lib
+EGLIBDEP            = $(G3DLIB) $(GRAFLIB) $(HISTLIB) $(MATRIXLIB)
+EGLIBEXTRA          = lib/libGraf3d.lib lib/libGraf.lib lib/libHist.lib lib/libMatrix.lib
+VMCLIBDEP           = $(EGLIB) $(GEOMLIB) $(G3DLIB) $(GRAFLIB) $(HISTLIB) $(MATRIXLIB)
+VMCLIBEXTRA         = lib/libEG.lib lib/libGeom.lib \
+                      lib/libGraf3d.lib lib/libGraf.lib lib/libHist.lib lib/libMatrix.lib
 PHYSICSLIBDEP       = $(MATRIXLIB)
 PHYSICSLIBEXTRA     = lib/libMatrix.lib
 PYTHIALIBDEP        = $(EGLIB) $(GRAFLIB)
 PYTHIALIBEXTRA      = lib/libEG.lib lib/libGraf.lib
-PYTHIA6LIBDEP       = $(EGLIB) $(GRAFLIB) $(VMCLIB)
-PYTHIA6LIBEXTRA     = lib/libEG.lib lib/libGraf.lib lib/libVMC.lib
+PYTHIA6LIBDEP       = $(EGLIB) $(GRAFLIB) $(VMCLIB) $(G3DLIB) $(HISTLIB) $(MATRIXLIB)
+PYTHIA6LIBEXTRA     = lib/libEG.lib lib/libGraf.lib lib/libVMC.lib lib/libGraf3d.lib \
+                      lib/libHist.lib lib/libMatrix.lib
 VENUSLIBDEP         = $(EGLIB)
 VENUSLIBEXTRA       = lib/libEG.lib
-TABLELIBDEP         = $(TREELIB) $(GPADLIB) $(G3DLIB) $(GRAFLIB) $(HISTLIB)
+TABLELIBDEP         = $(TREELIB) $(GPADLIB) $(G3DLIB) $(GRAFLIB) $(HISTLIB) $(MATRIXLIB)
 TABLELIBEXTRA       = lib/libTree.lib lib/libGpad.lib \
-                      lib/libGraf3d.lib lib/libGraf.lib lib/libHist.lib
-MLPLIBDEP           = $(HISTLIB) $(MATRIXLIB) $(TREELIB) $(GRAFLIB) \
+                      lib/libGraf3d.lib lib/libGraf.lib lib/libHist.lib lib/libMatrix.lib
+MLPLIBDEP           = $(HISTLIB) $(MATRIXLIB) $(TREELIB) $(G3DLIB) $(GRAFLIB) \
                       $(GPADLIB) $(TREEPLAYERLIB)
 MLPLIBEXTRA         = lib/libHist.lib lib/libMatrix.lib lib/libTree.lib \
-                      lib/libGraf.lib lib/libGpad.lib lib/libTreePlayer.lib
+                      lib/libGraf3d.lib lib/libGraf.lib lib/libGpad.lib lib/libTreePlayer.lib
 TMVALIBDEP          = $(HISTLIB) $(MATRIXLIB) $(TREELIB) $(GRAFLIB) \
-                      $(GPADLIB) $(TREEPLAYERLIB) $(MLPLIB)
+                      $(G3DLIB) $(GPADLIB) $(TREEPLAYERLIB) $(MLPLIB)
 TMVALIBEXTRA        = lib/libHist.lib lib/libMatrix.lib lib/libTree.lib \
-                      lib/libGraf.lib lib/libGpad.lib lib/libTreePlayer.lib \
+                      lib/libGraf.lib lib/libGraf3d.lib lib/libGpad.lib lib/libTreePlayer.lib \
                       lib/libMLP.lib
 SPLOTLIBDEP         = $(MATRIXLIB) $(HISTLIB) $(TREELIB) $(TREEPLAYERLIB) \
                       $(G3DLIB) $(GRAFLIB)
@@ -89,26 +100,29 @@
                       lib/libTreePlayer.lib lib/libGraf3d.lib lib/libGraf.lib
 QUADPLIBDEP         = $(MATRIXLIB)
 QUADPLIBEXTRA       = lib/libMatrix.lib
-GLLIBDEP            = $(G3DLIB) $(GUILIB) $(GRAFLIB) $(HISTLIB) $(GEDLIB)
+GLLIBDEP            = $(G3DLIB) $(GUILIB) $(GRAFLIB) $(HISTLIB) $(GEDLIB) \
+                      $(MATRIXLIB) $(TREELIB) $(TREEPLAYERLIB)
 GLLIBEXTRA          = lib/libGraf3d.lib lib/libGui.lib lib/libGraf.lib \
-                      lib/libHist.lib lib/libGed.lib
+                      lib/libHist.lib lib/libGed.lib lib/libMatrix.lib \
+                      lib/libTree.lib lib/libTreePlayer.lib
 HBOOKLIBDEP         = $(HISTLIB) $(MATRIXLIB) $(TREELIB) $(GRAFLIB) \
-                      $(TREEPLAYERLIB)
+                      $(G3DLIB) $(TREEPLAYERLIB)
 HBOOKLIBEXTRA       = lib/libHist.lib lib/libMatrix.lib lib/libTree.lib \
-                      lib/libGraf.lib lib/libTreePlayer.lib
-GEOMPAINTERLIBDEP   = $(GEOMLIB) $(TREELIB) $(G3DLIB) $(HISTLIB)
+                      lib/libGraf.lib lib/libGraf3d.lib lib/libTreePlayer.lib
+GEOMPAINTERLIBDEP   = $(GEOMLIB) $(TREELIB) $(G3DLIB) $(GRAFLIB) $(HISTLIB) $(MATRIXLIB)
 GEOMPAINTERLIBEXTRA = lib/libGeom.lib lib/libTree.lib lib/libGraf3d.lib \
-                      lib/libHist.lib
+                      lib/libGraf.lib lib/libHist.lib lib/libMatrix.lib
 QTROOTLIBDEP        = $(GUILIB) $(GQTLIB)
 QTROOTLIBEXTRA      = lib/libGui.lib lib/libGQt.lib
 GQTLIBDEP           = $(GPADLIB) $(RINTLIB)
 GQTLIBEXTRA         = lib/libGpad.lib lib/libRint.lib
-RUBYLIBDEP          = $(HISTLIB)
-RUBYLIBEXTRA        = lib/libHist.lib
-GUIBLDLIBDEP        = $(GUILIB) $(GRAFLIB)
-GUIBLDLIBEXTRA      = lib/libGui.lib lib/libGraf.lib
-FOAMLIBDEP          = $(HISTLIB)
-FOAMLIBEXTRA        = lib/libHist.lib
+RUBYLIBDEP          = $(HISTLIB) $(MATRIXLIB)
+RUBYLIBEXTRA        = lib/libHist.lib lib/libMatrix.lib
+GUIBLDLIBDEP        = $(GUILIB) $(GRAFLIB) $(GPADLIB) $(HISTLIB) $(MATRIXLIB)
+GUIBLDLIBEXTRA      = lib/libGui.lib lib/libGraf.lib lib/libGpad.lib \
+                      lib/libHist.lib lib/libMatrix.lib
+FOAMLIBDEP          = $(HISTLIB) $(MATRIXLIB)
+FOAMLIBEXTRA        = lib/libHist.lib lib/libMatrix.lib
 ALIENLIBDEP         = $(XMLLIB)
 ALIENLIBEXTRA       = lib/libXMLIO.lib
 ROOFITLIBDEP        = $(HISTLIB) $(GRAFLIB) $(MATRIXLIB) $(TREELIB)\
@@ -128,82 +142,90 @@
 HISTLIBEXTRA        = -Llib -lMatrix
 GRAFLIBDEP          = $(HISTLIB) $(MATRIXLIB)
 GRAFLIBEXTRA        = -Llib -lHist -lMatrix
-GPADLIBDEP          = $(GRAFLIB) $(HISTLIB)
-GPADLIBEXTRA        = -Llib -lGraf -lHist
-G3DLIBDEP           = $(GRAFLIB) $(HISTLIB)
-G3DLIBEXTRA         = -Llib -lGraf -lHist
+GPADLIBDEP          = $(GRAFLIB) $(HISTLIB) $(MATRIXLIB)
+GPADLIBEXTRA        = -Llib -lGraf -lHist -lMatrix
+G3DLIBDEP           = $(GRAFLIB) $(HISTLIB) $(MATRIXLIB)
+G3DLIBEXTRA         = -Llib -lGraf -lHist -lMatrix
 GEDLIBDEP           = $(HISTLIB) $(GPADLIB) $(GRAFLIB) $(GUILIB) $(TREELIB) \
-                      $(TREEPLAYERLIB)
-GEDLIBEXTRA         = -Llib -lHist -lGpad -lGraf -lGui -lTree -lTreePlayer
-GEDOLDLIBDEP        = $(GPADLIB) $(GRAFLIB)
-GEDOLDLIBEXTRA      = -Llib -lGpad -lGraf
-POSTSCRIPTLIBDEP    = $(GRAFLIB)
-POSTSCRIPTLIBEXTRA  = -Llib -lGraf
-GUILIBDEP           = $(GPADLIB) $(GRAFLIB)
-GUILIBEXTRA         = -Llib -lGpad -lGraf
+                      $(TREEPLAYERLIB) $(MATRIXLIB) $(G3DLIB)
+GEDLIBEXTRA         = -Llib -lHist -lGpad -lGraf -lGui -lTree -lTreePlayer \
+                      -lMatrix -lGraf3d
+GEDOLDLIBDEP        = $(GPADLIB) $(GRAFLIB) $(HISTLIB) $(MATRIXLIB)
+GEDOLDLIBEXTRA      = -Llib -lGpad -lGraf -lHist -lMatrix
+POSTSCRIPTLIBDEP    = $(GRAFLIB) $(HISTLIB) $(MATRIXLIB)
+POSTSCRIPTLIBEXTRA  = -Llib -lGraf -lHist -lMatrix
+GUILIBDEP           = $(GPADLIB) $(GRAFLIB) $(HISTLIB) $(MATRIXLIB)
+GUILIBEXTRA        := -Llib -lGpad -lGraf -lHist -lMatrix $(GUILIBEXTRA)
 HISTPAINTERLIBDEP   = $(GRAFLIB) $(HISTLIB) $(MATRIXLIB)
 HISTPAINTERLIBEXTRA = -Llib -lGraf -lHist -lMatrix
-HTMLLIBDEP          = $(GRAFLIB)
-HTMLLIBEXTRA        = -Llib -lGraf
+HTMLLIBDEP          = $(GRAFLIB) $(HISTLIB) $(MATRIXLIB)
+HTMLLIBEXTRA        = -Llib -lGraf -lHist -lMatrix
 MINUITLIBDEP        = $(GRAFLIB) $(HISTLIB) $(MATRIXLIB)
 MINUITLIBEXTRA      = -Llib -lGraf -lHist -lMatrix
 MINUIT2LIBDEP       = $(GRAFLIB) $(HISTLIB) $(MATRIXLIB)
 MINUIT2LIBEXTRA     = -Llib -lGraf -lHist -lMatrix
-FUMILILIBDEP        = $(GRAFLIB) $(HISTLIB)
-FUMILILIBEXTRA      = -Llib -lGraf -lHist
-TREEPLAYERLIBDEP    = $(TREELIB) $(G3DLIB) $(GRAFLIB) $(HISTLIB)
-TREEPLAYERLIBEXTRA  = -Llib -lTree -lGraf3d -lGraf -lHist
-TREEVIEWERLIBDEP    = $(TREELIB) $(GPADLIB) $(GRAFLIB) $(HISTLIB) $(GUILIB)
-TREEVIEWERLIBEXTRA  = -Llib -lTree -lGpad -lGraf -lHist -lGui
+FUMILILIBDEP        = $(GRAFLIB) $(HISTLIB) $(MATRIXLIB)
+FUMILILIBEXTRA      = -Llib -lGraf -lHist -lMatrix
+TREEPLAYERLIBDEP    = $(TREELIB) $(G3DLIB) $(GRAFLIB) $(HISTLIB) $(MATRIXLIB)
+TREEPLAYERLIBEXTRA  = -Llib -lTree -lGraf3d -lGraf -lHist -lMatrix
+TREEVIEWERLIBDEP    = $(TREELIB) $(GPADLIB) $(GRAFLIB) $(HISTLIB) $(GUILIB) $(MATRIXLIB)
+TREEVIEWERLIBEXTRA  = -Llib -lTree -lGpad -lGraf -lHist -lGui -lMatrix
 PROOFLIBDEP         = $(TREELIB) $(G3DLIB) $(GRAFLIB) $(HISTLIB) \
-                      $(TREEPLAYERLIB) $(THREADLIB)
-PROOFLIBEXTRA       = -Llib -lTree -lGraf3d -lGraf -lHist -lTreePlayer -lThread
-PROOFXLIBDEP        = $(PROOFLIB) $(THREADLIB) $(XPDLIB)
-PROOFXLIBEXTRA      = -Llib -lProof -lThread -lXrdProofd
-PROOFGUILIBDEP      = $(PROOFLIB) $(GUILIB)
-PROOFGUILIBEXTRA    = -Llib -lProof -lGui
+                      $(TREEPLAYERLIB) $(THREADLIB) $(MATRIXLIB)
+PROOFLIBEXTRA       = -Llib -lTree -lGraf3d -lGraf -lHist -lTreePlayer -lThread \
+                      -lMatrix
+PROOFXLIBDEP        = $(PROOFLIB) $(THREADLIB) $(XPDLIB) $(TREELIB) $(G3DLIB) \
+                      $(GRAFLIB) $(HISTLIB) $(TREEPLAYERLIB) $(MATRIXLIB)
+PROOFXLIBEXTRA      = -Llib -lProof -lThread -lXrdProofd -lTree -lGraf3d -lGraf \
+                      -lHist -lTreePlayer -lMatrix
+PROOFGUILIBDEP      = $(PROOFLIB) $(GUILIB) $(TREELIB) $(G3DLIB) $(GRAFLIB) \
+                      $(GPADLIB) $(HISTLIB) $(TREEPLAYERLIB) $(THREADLIB) $(MATRIXLIB)
+PROOFGUILIBEXTRA    = -Llib -lProof -lGui -lTree -lGraf3d -lGraf -lGpad -lHist \
+                      -lTreePlayer -lThread -lMatrix
 PEACLIBDEP          = $(PROOFLIB) $(CLARENSLIB)
 PEACLIBEXTRA        = -Llib -lProof -lClarens
 PEACGUILIBDEP       = $(GUILIB)
 PEACGUILIBEXTRA     = -Llib -lGui
-X3DLIBDEP           = $(G3DLIB) $(GUILIB)
-X3DLIBEXTRA         = -Llib -lGraf3d -lGui
-EGLIBDEP            = $(G3DLIB) $(GRAFLIB)
-EGLIBEXTRA          = -Llib -lGraf3d -lGraf
-VMCLIBDEP           = $(EGLIB) $(GEOMLIB)
-VMCLIBEXTRA         = -Llib -lEG -lGeom
+X3DLIBDEP           = $(G3DLIB) $(GUILIB) $(GRAFLIB) $(GPADLIB) $(HISTLIB) $(MATRIXLIB)
+X3DLIBEXTRA         = -Llib -lGraf3d -lGui -lGraf -lGpad -lHist -lMatrix
+EGLIBDEP            = $(G3DLIB) $(GRAFLIB) $(HISTLIB) $(MATRIXLIB)
+EGLIBEXTRA          = -Llib -lGraf3d -lGraf -lHist -lMatrix
+VMCLIBDEP           = $(EGLIB) $(GEOMLIB) $(G3DLIB) $(GRAFLIB) $(HISTLIB) $(MATRIXLIB)
+VMCLIBEXTRA         = -Llib -lEG -lGeom -lGraf3d -lGraf -lHist -lMatrix
 PHYSICSLIBDEP       = $(MATRIXLIB)
 PHYSICSLIBEXTRA     = -Llib -lMatrix
 PYTHIALIBDEP        = $(EGLIB) $(GRAFLIB)
 PYTHIALIBEXTRA      = -Llib -lEG -lGraf $(FPYTHIALIBDIR) $(FPYTHIALIB)
-PYTHIA6LIBDEP       = $(EGLIB) $(GRAFLIB) $(VMCLIB)
-PYTHIA6LIBEXTRA     = -Llib -lEG -lGraf -lVMC $(FPYTHIA6LIBDIR) $(FPYTHIA6LIB)
+PYTHIA6LIBDEP       = $(EGLIB) $(GRAFLIB) $(VMCLIB) $(G3DLIB) $(HISTLIB) $(MATRIXLIB)
+PYTHIA6LIBEXTRA     = -Llib -lEG -lGraf -lVMC -lGraf3d -lHist -lMatrix \
+                      $(FPYTHIA6LIBDIR) $(FPYTHIA6LIB)
 VENUSLIBDEP         = $(EGLIB)
 VENUSLIBEXTRA       = -Llib -lEG $(FVENUSLIBDIR) $(FVENUSLIB)
-X11TTFLIBDEP        = $(X11LIB) $(GRAFLIB)
-X11TTFLIBEXTRA      = -Llib -lGX11 -lGraf
-TABLELIBDEP         = $(TREELIB) $(GPADLIB) $(G3DLIB) $(GRAFLIB) $(HISTLIB)
-TABLELIBEXTRA       = -Llib -lTree -lGpad -lGraf3d -lGraf -lHist
-GLLIBDEP            = $(GPADLIB) $(G3DLIB) $(GUILIB) $(GRAFLIB) $(HISTLIB) $(GEDLIB)
-GLLIBEXTRA         := -Llib -lGpad -lGraf3d -lGui -lGraf -lHist -lGed
+X11TTFLIBDEP        = $(X11LIB) $(GRAFLIB) $(HISTLIB) $(MATRIXLIB)
+X11TTFLIBEXTRA      = -Llib -lGX11 -lGraf -lHist -lMatrix
+TABLELIBDEP         = $(TREELIB) $(GPADLIB) $(G3DLIB) $(GRAFLIB) $(HISTLIB) $(MATRIXLIB)
+TABLELIBEXTRA       = -Llib -lTree -lGpad -lGraf3d -lGraf -lHist -lMatrix
+GLLIBDEP            = $(GPADLIB) $(G3DLIB) $(GUILIB) $(GRAFLIB) $(HISTLIB) $(GEDLIB) \
+                      $(MATRIXLIB) $(TREELIB) $(TREEPLAYERLIB)
+GLLIBEXTRA          = -Llib -lGpad -lGraf3d -lGui -lGraf -lHist -lGed \
+                      -lMatrix -lTree -lTreePlayer
 HBOOKLIBDEP         = $(HISTLIB) $(MATRIXLIB) $(TREELIB) $(GRAFLIB) \
-                      $(TREEPLAYERLIB)
-HBOOKLIBEXTRA       = -Llib -lHist -lMatrix -lTree -lGraf -lTreePlayer
-GEOMPAINTERLIBDEP   = $(GEOMLIB) $(TREELIB) $(G3DLIB) $(HISTLIB)
-GEOMPAINTERLIBEXTRA = -Llib -lGeom -lTree -lGraf3d -lHist
-ASIMAGELIBDEP       = $(GRAFLIB) $(HISTLIB) $(GPADLIB)
-ASIMAGELIBEXTRA     = -Llib -lGraf -lHist -lGpad
-ASIMAGEGUILIBDEP    = $(GRAFLIB) $(HISTLIB) $(GUILIB) $(ASIMAGELIB)
-ASIMAGEGUILIBEXTRA  = -Llib -lGraf -lHist -lGui -lASImage
-ASIMAGEGSLIBDEP     = $(GRAFLIB) $(ASIMAGELIB)
-ASIMAGEGSLIBEXTRA   = -Llib -lGraf -lASImage
-MLPLIBDEP           = $(HISTLIB) $(MATRIXLIB) $(TREELIB) $(GRAFLIB) \
+                      $(G3DLIB) $(TREEPLAYERLIB)
+HBOOKLIBEXTRA       = -Llib -lHist -lMatrix -lTree -lGraf -lGraf3d -lTreePlayer
+GEOMPAINTERLIBDEP   = $(GEOMLIB) $(TREELIB) $(G3DLIB) $(GRAFLIB) $(HISTLIB) $(MATRIXLIB)
+GEOMPAINTERLIBEXTRA = -Llib -lGeom -lTree -lGraf3d -lGraf -lHist -lMatrix
+ASIMAGELIBDEP       = $(GRAFLIB) $(HISTLIB) $(GPADLIB) $(MATRIXLIB)
+ASIMAGELIBEXTRA     = -Llib -lGraf -lHist -lGpad -lMatrix
+ASIMAGEGUILIBDEP    = $(GRAFLIB) $(HISTLIB) $(GUILIB) $(ASIMAGELIB) $(GPADLIB) $(MATRIXLIB)
+ASIMAGEGUILIBEXTRA  = -Llib -lGraf -lHist -lGui -lASImage -lGpad -lMatrix
+ASIMAGEGSLIBDEP     = $(GRAFLIB) $(ASIMAGELIB) $(HISTLIB) $(GPADLIB) $(MATRIXLIB)
+ASIMAGEGSLIBEXTRA   = -Llib -lGraf -lASImage -lHist -lGpad -lMatrix
+MLPLIBDEP           = $(HISTLIB) $(MATRIXLIB) $(TREELIB) $(G3DLIB) $(GRAFLIB) \
                       $(GPADLIB) $(TREEPLAYERLIB)
-MLPLIBEXTRA         = -Llib -lHist -lMatrix -lTree -lGraf -lGpad \
-                      -lTreePlayer
+MLPLIBEXTRA         = -Llib -lHist -lMatrix -lTree -lGraf3d -lGraf -lGpad -lTreePlayer
 TMVALIBDEP          = $(HISTLIB) $(MATRIXLIB) $(TREELIB) $(GRAFLIB) \
-                      $(GPADLIB) $(TREEPLAYERLIB) $(MLPLIB)
-TMVALIBEXTRA        = -Llib -lHist -lMatrix -lTree -lGraf -lGpad -lTreePlayer \
+                      $(G3DLIB) $(GPADLIB) $(TREEPLAYERLIB) $(MLPLIB)
+TMVALIBEXTRA        = -Llib -lHist -lMatrix -lTree -lGraf3d -lGraf -lGpad -lTreePlayer \
                       -lMLP
 SPLOTLIBDEP         = $(MATRIXLIB) $(HISTLIB) $(TREELIB) $(TREEPLAYERLIB) \
                       $(G3DLIB) $(GRAFLIB)
@@ -214,12 +236,12 @@
 GQTLIBEXTRA         = -Llib -lGpad -lRint
 QUADPLIBDEP         = $(MATRIXLIB)
 QUADPLIBEXTRA       = -Llib -lMatrix
-RUBYLIBDEP          = $(HISTLIB)
-RUBYLIBEXTRA        = -Llib -lHist
-GUIBLDLIBDEP        = $(GUILIB) $(GRAFLIB)
-GUIBLDLIBEXTRA      = -Llib -lGui -lGraf
-FOAMLIBDEP          = $(HISTLIB)
-FOAMLIBEXTRA        = -Llib -lHist
+RUBYLIBDEP          = $(HISTLIB) $(MATRIXLIB)
+RUBYLIBEXTRA        = -Llib -lHist -lMatrix
+GUIBLDLIBDEP        = $(GUILIB) $(GRAFLIB) $(HISTLIB) $(GPADLIB) $(MATRIXLIB)
+GUIBLDLIBEXTRA      = -Llib -lGui -lGraf -lHist -lGpad -lMatrix
+FOAMLIBDEP          = $(HISTLIB) $(MATRIXLIB)
+FOAMLIBEXTRA        = -Llib -lHist -lMatrix
 ALIENLIBDEP         = $(XMLLIB)
 ALIENLIBEXTRA       = -Llib -lXMLIO
 ROOFITLIBDEP        = $(HISTLIB) $(GRAFLIB) $(MATRIXLIB) $(TREELIB)\
