diff -up amber12/AmberTools/src/configure2.r amber12/AmberTools/src/configure2
--- amber12/AmberTools/src/configure2.r	2012-07-03 05:54:03.000000000 +0200
+++ amber12/AmberTools/src/configure2	2013-07-15 00:09:27.068633884 +0200
@@ -380,9 +380,9 @@ pycflags=
 nabflags=
 free_format=-FR
 #  C versions, if compiled from source:
-flibs="-larpack -llapack -lblas "
+flibs="-L/usr/lib64/atlas -L/usr/lib/atlas -larpack -llapack -lf77blas -lcblas -latlas"
 #  Fortran versions, if compiled from source:
-flibsf="-larpack -llapack -lblas "
+flibsf="-L/usr/lib64/atlas -L/usr/lib/atlas -larpack -llapack -lf77blas -lcblas -latlas"
 omp_flag=
 mpi_flag=
 lex=flex
@@ -1795,8 +1795,8 @@ EOF
           else
               fnetlib=""
           fi
-          printf "Testing $netcdf_loc/include/netcdf.mod... "
-          $fc -I$netcdf_loc/include test_nc_mod.f90 -L$netcdf_lib_loc -lnetcdf $fnetlib -o a.out > /dev/null 2>&1
+          printf "Testing $(pkg-config --variable=libdir netcdf)/gfortran/modules/netcdf.mod... "
+          $fc -I$(pkg-config --variable=libdir netcdf)/gfortran/modules test_nc_mod.f90 -L$netcdf_lib_loc -lnetcdf $fnetlib -o a.out > /dev/null 2>&1
           ncerror=$?
           /bin/rm -f test_nc_mod.f90 a.out
           if [ $ncerror -ne 0 ]; then
@@ -1808,7 +1808,7 @@ EOF
               echo "OK"
               netcdfflag="-L$netcdf_lib_loc -lnetcdf $fnetlib"
               netcdfinc="-I$netcdf_loc/include"
-              netcdf="$netcdf_loc/include/netcdf.mod"
+              netcdf="$(pkg-config --variable=libdir netcdf)/gfortran/modules/netcdf.mod"
               cflags="$cflags -DBINTRAJ"
               coptflags="$coptflags -DBINTRAJ"
               pmemd_coptflags="$pmemd_coptflags -DBINTRAJ"
@@ -2026,14 +2026,7 @@ EOF
       if [ "$sse" = "yes" ]; then
           enable_sse="--enable-sse2=yes" # --enable-avx=yes"
       fi
-      cd fftw-3.3 && \
-	  ./configure --prefix=$AMBERHOME --libdir=$AMBERHOME/lib \
-          --enable-static=yes \
-          $enable_mpi $enable_debug $enable_sse\
-	  CC="$cc" CFLAGS="$cflags $coptflags" \
-          F77="$fc" FFLAGS="$fflags $foptflags" \
-          FLIBS="$flibs_arch" \
-	  > ../fftw3_config.log 2>&1
+      pkg-config --exists fftw3
       ncerror=$?
       if [ $ncerror -gt 0 ]; then
           echo "    Error: FFTW configure returned $ncerror"
@@ -2043,13 +2036,12 @@ EOF
       else
           echo "    fftw-3.3 configure succeeded."
       fi
-      cd ..
       fftw3="FFTW3"
       flibs_fftw3="-lfftw3"
-      fftw3="\$(LIBDIR)/libfftw3.a"
+      fftw3="fftw3"
       if [ "$mpi" = 'yes' ]; then
           flibs_fftw3="-lfftw3_mpi $flibs_fftw3"
-          fftw3="\$(LIBDIR)/libfftw3_mpi.a"
+          fftw3="fftw3_mpi"
       fi
   else
       echo "Skipping configuration of FFTW3"
@@ -2063,9 +2055,8 @@ EOF
       echo
       echo "Configuring XBLAS (may be time-consuming)..."
       echo
-      xblas="\$(LIBDIR)/libxblas-amb.a"
-      cd xblas
-      CC="$cc" FC="$fc" CFLAGS="$cflags $coptflags" ./configure --prefix="$AMBERHOME/lib" > ../xblas_config.log 2>&1
+      xblas="-lxblas"
+      ldconfig -i -N -p |grep -q libxblas.so
       ncerror=$?
       if [ $ncerror -gt 0 ]; then
 	  echo "    Error: XBLAS configure returned $ncerror"
@@ -2075,7 +2066,6 @@ EOF
       else
 	  echo "    XBLAS configure succeeded."
       fi
-      cd ..
   else
       xblas=""
   fi
@@ -2085,30 +2075,7 @@ EOF
   #--------------------------------------------------------------------------
   if [ "$mtkpp" = 'install_mtkpp' ]; then
 
-    boostDir=$PWD/boost-1.38.0
-    cd mtkpp
-    echo
-    echo "Configuring MTK++ (may be time-consuming)..."
-    echo
-    if [ "$is_mac" = 'yes' ]; then
-      ./configure CXX="$cplusplus" CC="$cc" QTDIR="" \
-        CFLAGS="$cflags" \
-        CXXFLAGS="$cxxflags" \
-        --prefix=$AMBERHOME \
-        --includedir=$AMBERHOME/include/mtkpp \
-        --disable-shared \
-        --with-boost="${boostDir}" > ../mtkpp_config.log 2>&1
-    else
-      ./configure CXX="$cplusplus" CC="$cc" QTDIR="" \
-         CFLAGS="$cflags" \
-         CXXFLAGS="$cxxflags" \
-         --disable-shared --enable-static="yes" \
-         --prefix=$AMBERHOME \
-         --includedir=$AMBERHOME/include/mtkpp \
-         --with-boost="${boostDir}" > ../mtkpp_config.log 2>&1
-    fi
-
-    mtkerror=$?
+    mtkerror=0
     if [ $mtkerror -gt 0 ]; then
       echo "    Warning: MTK++ configure returned $mtkerror"
       echo "    MTK++ configure failed!  Check the mtkpp_config.log file"
@@ -2118,7 +2085,6 @@ EOF
     else
       echo "    MTK++-0.2.0 configure succeeded."
     fi
-    cd ..
   fi
  
   # Configure PUPIL support
@@ -2195,9 +2161,6 @@ cd ../src
 if [ ! -x lib ]; then
     ln -s ../AmberTools/src/lib .
 fi
-if [ ! -x netcdf ]; then
-    ln -s ../AmberTools/src/netcdf .
-fi
 if [ ! -x include ]; then
     ln -s ../AmberTools/src/include .
 fi
@@ -2282,7 +2245,7 @@ LDFLAGS=$ldflags \$(CUSTOMBUILDFLAGS)
 AMBERLDFLAGS=\$(AMBERBUILDFLAGS)
 
 LEX=   $lex
-YACC=  \$(BINDIR)/yacc
+YACC=  yacc
 AR=    ar rv
 M4=    $m4
 RANLIB=$ranlib
diff -up amber12/AmberTools/src/cpptraj/Makefile.r amber12/AmberTools/src/cpptraj/Makefile
--- amber12/AmberTools/src/cpptraj/Makefile.r	2012-02-12 20:45:27.000000000 +0100
+++ amber12/AmberTools/src/cpptraj/Makefile	2013-07-10 22:58:17.676274059 +0200
@@ -29,10 +29,6 @@ docs: src/cpptraj.Doxyfile
 clean:
 	cd src && $(MAKE) -f Makefile_at clean
 
-# Clean up lapack, arpack, and blas libraries for standalone
-libclean:
-	cd src && $(MAKE) libclean
-
 # Remove cpptraj binary from $AMBERHOME/bin
 uninstall:
 	cd src && $(MAKE) -f Makefile_at uninstall
diff -up amber12/AmberTools/src/cpptraj/src/Makefile_at.r amber12/AmberTools/src/cpptraj/src/Makefile_at
--- amber12/AmberTools/src/cpptraj/src/Makefile_at.r	2012-03-10 01:53:39.000000000 +0100
+++ amber12/AmberTools/src/cpptraj/src/Makefile_at	2013-07-10 22:58:17.677274062 +0200
@@ -10,7 +10,6 @@ PTRAJ_OBJECTS=thermo.o pubfft.o
 # of these libraries each time 'make' is invoked.
 # NOTE: Since -nobintraj is possible and the dependency for netcdf is not
 #       set correctly by configure there is no way this can work for netcdf 
-EXTERNAL_LIBS=$(LIBDIR)/libarpack.a $(LIBDIR)/liblapack.a $(LIBDIR)/libblas.a
 
 include cpptrajfiles
 
@@ -29,22 +28,10 @@ dependclean:
 	-/bin/rm FindDepend.o
 	-/bin/rm findDepend
 
-cpptraj$(SFX): $(NETCDF) $(OBJECTS) $(PTRAJ_OBJECTS) $(EXTERNAL_LIBS) 
+cpptraj$(SFX): $(NETCDF) $(OBJECTS) $(PTRAJ_OBJECTS)
 	$(CXX) $(LDFLAGS) -o cpptraj$(SFX) $(OBJECTS) $(PTRAJ_OBJECTS) \
                -L$(LIBDIR) $(NETCDFLIB) $(ZLIB) $(BZLIB) $(FLIBS_PTRAJ)
 
-$(INCDIR)/netcdf.mod: ../../netcdf_config.log
-	cd ../../netcdf/src && $(MAKE) install
-
-$(LIBDIR)/libarpack.a:
-	cd ../../arpack && $(MAKE) install
-
-$(LIBDIR)/liblapack.a:
-	cd ../../lapack && $(MAKE) $(LAPACK)
-
-$(LIBDIR)/libblas.a:
-	cd ../../blas && $(MAKE) $(BLAS)
-
 thermo.o:  ../../ptraj/thermo.F90
 	$(FC) $(FPPFLAGS) -c $(FREEFORMAT_FLAG) $(FOPTFLAGS) $(FFLAGS) $(AMBERFFLAGS) -o $@ ../../ptraj/thermo.F90
 
diff -up amber12/AmberTools/src/cpptraj/src/Makefile.r amber12/AmberTools/src/cpptraj/src/Makefile
--- amber12/AmberTools/src/cpptraj/src/Makefile.r	2012-01-17 03:31:53.000000000 +0100
+++ amber12/AmberTools/src/cpptraj/src/Makefile	2013-07-10 22:58:17.677274062 +0200
@@ -17,19 +17,10 @@ dependclean:
 	-/bin/rm FindDepend.o
 	-/bin/rm findDepend
 
-cpptraj$(SFX): $(OBJECTS) $(PTRAJ_OBJECTS) $(ARPACK) $(LAPACK) $(BLAS) 
+cpptraj$(SFX): $(OBJECTS) $(PTRAJ_OBJECTS)
 	$(CXX) $(LDFLAGS) -o cpptraj$(SFX) $(OBJECTS) $(PTRAJ_OBJECTS) $(FLIBS_PTRAJ) $(NETCDFLIB) $(ZLIB) $(BZLIB) $(ARPACK) $(LAPACK) $(BLAS) $(FLIBS)
 
 
-$(BLAS): $(BLAS_HOME)/Makefile
-	cd $(BLAS_HOME) && $(MAKE) install
-
-$(ARPACK): $(ARPACK_HOME)/Makefile
-	cd $(ARPACK_HOME) && $(MAKE) install
-
-$(LAPACK): $(LAPACK_HOME)/Makefile
-	cd $(LAPACK_HOME) && $(MAKE) install
-
 thermo.o:  $(PTRAJ_HOME)/thermo.F90
 	$(FC) $(FPPFLAGS) -c $(FFLAGS) -o $@ $(PTRAJ_HOME)/thermo.F90
 
@@ -39,11 +30,5 @@ pubfft.o:  $(PTRAJ_HOME)/pubfft.F90
 clean:
 	/bin/rm -f $(OBJECTS) $(PTRAJ_OBJECTS) cpptraj$(SFX)
 
-libclean: $(BLAS_HOME)/Makefile $(ARPACK_HOME)/Makefile $(LAPACK_HOME)/Makefile
-	cd $(BLAS_HOME) && $(MAKE) clean
-	cd $(LAPACK_HOME) && $(MAKE) clean
-	cd $(ARPACK_HOME) && $(MAKE) clean
-	/bin/rm -f $(BLAS) $(ARPACK) $(LAPACK)
-
 # Header dependencies
 include cpptrajdepend
diff -up amber12/AmberTools/src/leap/Makefile.r amber12/AmberTools/src/leap/Makefile
--- amber12/AmberTools/src/leap/Makefile.r	2012-01-03 21:33:14.000000000 +0100
+++ amber12/AmberTools/src/leap/Makefile	2013-07-14 00:19:24.179813169 +0200
@@ -15,10 +15,6 @@ uninstall:
 	-rm -f $(BINDIR)/xleap
 
 install_xleap:
-	cd src/Wc && $(MAKE)
-	cd src/Xmu && $(MAKE)
-	cd src/Xpm && $(MAKE)
-	cd src/Xraw && $(MAKE)
 	cd src/leap && $(MAKE) install
 	@echo "Copying shell script" 
 	cp xleap $(BINDIR)/xleap
@@ -33,9 +29,5 @@ skip_xleap:
 	@echo "NOTE: -nox11 was specified as an option to configure."
 
 clean:
-	cd src/Wc && $(MAKE) clean
-	cd src/Xmu && $(MAKE) clean
-	cd src/Xpm && $(MAKE) clean
-	cd src/Xraw && $(MAKE) clean
 	cd src/leap && $(MAKE) clean
 
diff -up amber12/AmberTools/src/leap/src/leap/Makefile.r amber12/AmberTools/src/leap/src/leap/Makefile
--- amber12/AmberTools/src/leap/src/leap/Makefile.r	2012-04-02 04:47:11.000000000 +0200
+++ amber12/AmberTools/src/leap/src/leap/Makefile	2013-07-14 00:23:45.740615237 +0200
@@ -110,8 +110,8 @@ XBITMAPS= $(XBIT1) $(XBIT2) $(XBIT3)
 #     /usr/X11R6/lib/libX11.a(XlcDL.o): In function `try_both_dlsym':
 #     XlcDL.o(.text+0xe2): undefined reference to `dlsym'
 #
-XALEAP_LIB = ../Xraw/libXaw.a ../Wc/libWcLeap.a ../Xpm/libXpm.a \
-	../Xmu/libXmu.a $(XLIBS) -lXt -lXext -lSM -lICE -lX11 -lXau -lXdmcp $(LM) -lpthread
+XALEAP_LIB = -lXraw -lWc -lXpm \
+	-lXmu $(XLIBS) -lXt -lXext -lSM -lICE -lX11 -lXau -lXdmcp $(LM) -lpthread
 
 OBJ = $(OA) $(OG) $(OO) $(OL)
 
diff -up amber12/AmberTools/src/leap/src/leap/xaAngleParmTable.c.r amber12/AmberTools/src/leap/src/leap/xaAngleParmTable.c
--- amber12/AmberTools/src/leap/src/leap/xaAngleParmTable.c.r	2012-01-03 20:46:26.000000000 +0100
+++ amber12/AmberTools/src/leap/src/leap/xaAngleParmTable.c	2013-07-14 00:38:57.071426599 +0200
@@ -51,9 +51,9 @@
 
 #include	"xaTable.h"
 
-#include        "../Xraw/table.h"
+#include        <X11/Xraw/table.h>
 
-#include        "../Wc/WcCreate.h"
+#include        <Wc/WcCreate.h>
 
 #define TYPE1C		0
 #define	TYPE2C		1
diff -up amber12/AmberTools/src/leap/src/leap/xaAtomTable.c.r amber12/AmberTools/src/leap/src/leap/xaAtomTable.c
--- amber12/AmberTools/src/leap/src/leap/xaAtomTable.c.r	2012-01-03 21:33:14.000000000 +0100
+++ amber12/AmberTools/src/leap/src/leap/xaAtomTable.c	2013-07-10 22:58:17.678274065 +0200
@@ -56,7 +56,7 @@
 
 #include        "xaTable.h"
 #include        "xaAtomTable.h"
-#include        "../Wc/WcCreate.h"
+#include        <Wc/WcCreate.h>
 
 #define NAMEC           0
 #define TYPEC           1
diff -up amber12/AmberTools/src/leap/src/leap/xaBondParmTable.c.r amber12/AmberTools/src/leap/src/leap/xaBondParmTable.c
--- amber12/AmberTools/src/leap/src/leap/xaBondParmTable.c.r	2012-01-03 20:46:26.000000000 +0100
+++ amber12/AmberTools/src/leap/src/leap/xaBondParmTable.c	2013-07-14 00:38:32.999351800 +0200
@@ -52,7 +52,7 @@
 
 #include	"xaTable.h"
 
-#include        "../Xraw/table.h"
+#include        <X11/Xraw/table.h>
 
 #define TYPE1C		0
 #define	TYPE2C		1
diff -up amber12/AmberTools/src/leap/src/leap/xaCommand.c.r amber12/AmberTools/src/leap/src/leap/xaCommand.c
--- amber12/AmberTools/src/leap/src/leap/xaCommand.c.r	2012-01-03 21:33:14.000000000 +0100
+++ amber12/AmberTools/src/leap/src/leap/xaCommand.c	2013-07-14 00:38:09.645278710 +0200
@@ -41,13 +41,13 @@
 #include 	<X11/IntrinsicP.h>
 #include	<X11/StringDefs.h>
 #include 	<X11/Xatom.h>
-#include 	"../Xmu/Atoms.h"
-#include 	"../Xmu/Misc.h"
-#include	"../Xraw/List.h"
-#include	"../Xraw/AsciiText.h"
-#include    "../Xraw/AsciiSrc.h"
-#include	"../Xraw/Label.h"
-#include	"../Xraw/Toggle.h"
+#include	<X11/Xmu/Atoms.h>
+#include	<X11/Xmu/Misc.h>
+#include	<X11/Xraw/List.h>
+#include	<X11/Xraw/AsciiText.h>
+#include	<X11/Xraw/AsciiSrc.h>
+#include	<X11/Xraw/Label.h>
+#include	<X11/Xraw/Toggle.h>
 #include	<X11/keysym.h>
 #include	<X11/Shell.h>
 
@@ -66,7 +66,7 @@
 
 #include	"xaCommand.h"
 
-#include        "../Wc/WcCreate.h"
+#include        <Wc/WcCreate.h>
 
 #define	EMPTY_LIST	"      "
 #define	XACEMPTYSTRING	"";
diff -up amber12/AmberTools/src/leap/src/leap/xaHBondParmTable.c.r amber12/AmberTools/src/leap/src/leap/xaHBondParmTable.c
--- amber12/AmberTools/src/leap/src/leap/xaHBondParmTable.c.r	2012-01-03 20:46:26.000000000 +0100
+++ amber12/AmberTools/src/leap/src/leap/xaHBondParmTable.c	2013-07-14 00:39:17.335489575 +0200
@@ -53,7 +53,7 @@
 
 #include	"xaTable.h"
 
-#include        "../Xraw/table.h"
+#include        <X11/Xraw/table.h>
 
 #define TYPE1C		0
 #define	TYPE2C		1
diff -up amber12/AmberTools/src/leap/src/leap/xaLeapc.c.r amber12/AmberTools/src/leap/src/leap/xaLeapc.c
--- amber12/AmberTools/src/leap/src/leap/xaLeapc.c.r	2012-01-03 21:33:14.000000000 +0100
+++ amber12/AmberTools/src/leap/src/leap/xaLeapc.c	2013-07-14 00:32:15.082177001 +0200
@@ -40,6 +40,7 @@
 
 #include        <stdio.h>
 #include        <stdlib.h>
+#include        <unistd.h> /* for isatty() */
 
 #include 	<X11/IntrinsicP.h>
 #ifdef sun
@@ -52,8 +53,8 @@
 #include        <X11/cursorfont.h>
 
 
-#include 	"../Wc/WcCreate.h"
-#include	"../Xpm/xpm.h"
+#include	<Wc/WcCreate.h>
+#include	<X11/xpm.h>
 
 #ifdef FUNC
 #undef FUNC
@@ -71,8 +72,8 @@
 
 #include	"parser.h"
 #include        "block.h"
-#include        "../Xraw/Command.h"
-#include        "../Xraw/3d.h"
+#include        <X11/Xraw/Command.h>
+#include        <X11/Xraw/3d.h>
 #define ICON_NAME ("xleap_icon")
 
 extern VFUNCTION	GfAtomClassGraphicsCreator;
diff -up amber12/AmberTools/src/leap/src/leap/xaParmEditor.c.r amber12/AmberTools/src/leap/src/leap/xaParmEditor.c
--- amber12/AmberTools/src/leap/src/leap/xaParmEditor.c.r	2012-01-03 21:33:14.000000000 +0100
+++ amber12/AmberTools/src/leap/src/leap/xaParmEditor.c	2013-07-10 22:58:17.679274068 +0200
@@ -73,7 +73,7 @@
 #include	"xaAngleParmTable.h"
 #include	"xaTorsionParmTable.h"
 #include	"xaHBondParmTable.h"
-#include        "../Wc/WcCreate.h"
+#include	<Wc/WcCreate.h>
 
 typedef	struct	{
 	Widget		wTop;
diff -up amber12/AmberTools/src/leap/src/leap/xaTable.c.r amber12/AmberTools/src/leap/src/leap/xaTable.c
--- amber12/AmberTools/src/leap/src/leap/xaTable.c.r	2012-01-03 21:33:14.000000000 +0100
+++ amber12/AmberTools/src/leap/src/leap/xaTable.c	2013-07-14 00:35:20.022752102 +0200
@@ -47,11 +47,11 @@
 #include        <X11/Shell.h>
 #include        <X11/cursorfont.h>
 #include        <X11/keysym.h>
-#include        "../Xraw/ScrolledTable.h"
-#include        "../Xraw/Scrollbar.h"
-#include        "../Xraw/Table2.h"
-#include        "../Wc/WcCreate.h"
-#include        "../Xraw/3d.h"
+#include        <X11/Xraw/ScrolledTable.h>
+#include        <X11/Xraw/Scrollbar.h>
+#include        <X11/Xraw/TableP.h>
+#include        <Wc/WcCreate.h>
+#include        <X11/Xraw/3d.h>
 
 #include        "basics.h"
 #include        "varArray.h"
diff -up amber12/AmberTools/src/leap/src/leap/xaTools.c.r amber12/AmberTools/src/leap/src/leap/xaTools.c
--- amber12/AmberTools/src/leap/src/leap/xaTools.c.r	2012-01-03 21:33:14.000000000 +0100
+++ amber12/AmberTools/src/leap/src/leap/xaTools.c	2013-07-10 22:58:17.680274071 +0200
@@ -47,7 +47,7 @@
 
 #include	"xaLeap.h"
 #include	"xaTools.h"
-#include        "../Wc/WcCreate.h"
+#include	<Wc/WcCreate.h>
 
 /*
  *------------------------------------------------------------
diff -up amber12/AmberTools/src/leap/src/leap/xaUnitEditor.c.r amber12/AmberTools/src/leap/src/leap/xaUnitEditor.c
--- amber12/AmberTools/src/leap/src/leap/xaUnitEditor.c.r	2012-01-03 21:33:14.000000000 +0100
+++ amber12/AmberTools/src/leap/src/leap/xaUnitEditor.c	2013-07-14 00:33:32.133416345 +0200
@@ -64,7 +64,7 @@
 #include 	<X11/cursorfont.h>
 #include 	<X11/Shell.h>
 #include	<X11/keysym.h>
-#include    "../Xraw/SmeBSB.h"
+#include	<X11/Xraw/SmeBSB.h>
 
 #include	"basics.h"
 #include        "classes.h"
@@ -82,7 +82,7 @@
 #include	"xaCommand.h"
 #include	"xaUnitEditor.h"
 #include	"xaAtomTable.h"
-#include        "../Wc/WcCreate.h"
+#include	<Wc/WcCreate.h>
 extern int		GiUnitEditors;
 
 /*
diff -up amber12/AmberTools/src/leap/src/leap/xaUtilMessageFilter.c.r amber12/AmberTools/src/leap/src/leap/xaUtilMessageFilter.c
--- amber12/AmberTools/src/leap/src/leap/xaUtilMessageFilter.c.r	2012-01-03 20:46:26.000000000 +0100
+++ amber12/AmberTools/src/leap/src/leap/xaUtilMessageFilter.c	2013-07-10 22:58:17.681274074 +0200
@@ -46,7 +46,7 @@
 
 #include	<X11/keysym.h>
 
-#include 	"../Wc/WcCreate.h"
+#include 	<Wc/WcCreate.h>
 
 #include	"varArray.h"
 
diff -up amber12/AmberTools/src/leap/src/leap/XrawRegistr.c.r amber12/AmberTools/src/leap/src/leap/XrawRegistr.c
--- amber12/AmberTools/src/leap/src/leap/XrawRegistr.c.r	2012-01-03 20:46:26.000000000 +0100
+++ amber12/AmberTools/src/leap/src/leap/XrawRegistr.c	2013-07-14 00:37:32.673164382 +0200
@@ -8,41 +8,41 @@
 #include <X11/CompositeP.h>
 #include <X11/ConstrainP.h>
 
-#include "../Wc/WcCreateP.h"
+#include <Wc/WcCreateP.h>
 
-#include "../Xraw/ArrowP.h"
-#include "../Xraw/AsciiSinkP.h"
-#include "../Xraw/AsciiSrcP.h"
-#include "../Xraw/AsciiTextP.h"
-#include "../Xraw/BoxP.h"
-#include "../Xraw/ClockP.h"
-#include "../Xraw/CommandP.h"
-#include "../Xraw/DialogP.h"
-#include "../Xraw/FormP.h"
-#include "../Xraw/FrameP.h"
-#include "../Xraw/GripP.h"
-#include "../Xraw/LabelP.h"
-#include "../Xraw/ListP.h"
-#include "../Xraw/LogoP.h"
-#include "../Xraw/MailboxP.h"
-#include "../Xraw/MenuButtoP.h"
-#include "../Xraw/PanedP.h"
-#include "../Xraw/RepeaterP.h"
-#include "../Xraw/SeparatorP.h"
-#include "../Xraw/ScrollbarP.h"
-#include "../Xraw/ScrolledTableP.h"
-#include "../Xraw/SimpleMenP.h"
-#include "../Xraw/SimpleP.h"
-#include "../Xraw/SmeBSBP.h"
-#include "../Xraw/SmeLineP.h"
-#include "../Xraw/SmeP.h"
-#include "../Xraw/StripCharP.h"
-#include "../Xraw/TableP.h"
-#include "../Xraw/TextP.h"
-#include "../Xraw/TextSinkP.h"
-#include "../Xraw/TextSrcP.h"
-#include "../Xraw/ToggleP.h"
-#include "../Xraw/ViewportP.h"
+#include <X11/Xraw/ArrowP.h>
+#include <X11/Xraw/AsciiSinkP.h>
+#include <X11/Xraw/AsciiSrcP.h>
+#include <X11/Xraw/AsciiTextP.h>
+#include <X11/Xraw/BoxP.h>
+#include <X11/Xraw/ClockP.h>
+#include <X11/Xraw/CommandP.h>
+#include <X11/Xraw/DialogP.h>
+#include <X11/Xraw/FormP.h>
+#include <X11/Xraw/FrameP.h>
+#include <X11/Xraw/GripP.h>
+#include <X11/Xraw/LabelP.h>
+#include <X11/Xraw/ListP.h>
+#include <X11/Xraw/LogoP.h>
+#include <X11/Xraw/MailboxP.h>
+#include <X11/Xraw/MenuButtoP.h>
+#include <X11/Xraw/PanedP.h>
+#include <X11/Xraw/RepeaterP.h>
+#include <X11/Xraw/SeparatorP.h>
+#include <X11/Xraw/ScrollbarP.h>
+#include <X11/Xraw/ScrolledTableP.h>
+#include <X11/Xraw/SimpleMenP.h>
+#include <X11/Xraw/SimpleP.h>
+#include <X11/Xraw/SmeBSBP.h>
+#include <X11/Xraw/SmeLineP.h>
+#include <X11/Xraw/SmeP.h>
+#include <X11/Xraw/StripCharP.h>
+#include <X11/Xraw/TableP.h>
+#include <X11/Xraw/TextP.h>
+#include <X11/Xraw/TextSinkP.h>
+#include <X11/Xraw/TextSrcP.h>
+#include <X11/Xraw/ToggleP.h>
+#include <X11/Xraw/ViewportP.h>
 
 #include "XrawRegistr.h"
 
diff -up amber12/AmberTools/src/Makefile.r amber12/AmberTools/src/Makefile
--- amber12/AmberTools/src/Makefile.r	2012-03-29 16:52:57.000000000 +0200
+++ amber12/AmberTools/src/Makefile	2013-07-10 22:58:17.681274074 +0200
@@ -6,19 +6,12 @@ PARALLEL_TOKEN=DMPI
 
 include $(CONFIG_FILE)
 
-.NOTPARALLEL:configured_serial THIRDPARTY $(MTKPP)
+.NOTPARALLEL:configured_serial
 install: $(INSTALLTYPE)
-.PHONY: INSTALL_MTKPP
 
-serial: configured_serial THIRDPARTY $(MTKPP)
+serial: configured_serial
 	@echo "Starting installation of ${AMBERTOOLS} serial at `date`".
 #	utility routines and libraries:
-	(cd ucpp-1.3 && $(MAKE) $(UCPP) )
-	(cd byacc && $(MAKE) install )
-	(cd arpack && $(MAKE) install );
-	(cd lapack && $(MAKE) $(LAPACK) )
-	(cd blas && $(MAKE) $(BLAS) )
-	(cd c9x-complex && $(MAKE) $(C9XCOMPLEX) )
 	(cd etc && $(MAKE) install )
 	(cd chamber && $(MAKE) install )
 	(cd pbsa && $(MAKE) install )
@@ -79,12 +72,6 @@ serial: configured_serial THIRDPARTY $(M
 
 nabonly: $(NETCDF) $(XBLAS)  
 #	utility routines and libraries:
-	(cd ucpp-1.3 && $(MAKE) $(UCPP) )
-	(cd byacc && $(MAKE) install )
-	(cd arpack && $(MAKE) install );
-	(cd lapack && $(MAKE) $(LAPACK) )
-	(cd blas && $(MAKE) $(BLAS) )
-	(cd c9x-complex && $(MAKE) $(C9XCOMPLEX) )
 	(cd pbsa && $(MAKE) libinstall )
 	(cd rism && $(MAKE) $(RISM) )
 	(cd cifparse && $(MAKE) install )
@@ -100,27 +87,14 @@ openmp: nabonly
 	(cd cpptraj && $(MAKE) install )
 	(cd paramfit && $(MAKE) install )
 
-mtkpponly: configured_serial install_mtkpp
+.NOTPARALLEL:configured_parallel
 
-install_mtkpp:
-	@echo "Starting installation of MTK++ at `date`".
-	(cd mtkpp && $(MAKE) && $(MAKE) -j 1 install )
-	(cd mtkpp/tests && $(MAKE) create )
-
-	@echo
-	@echo "Completed installation of MTK++"
-	@echo
-
-.NOTPARALLEL:configured_parallel THIRDPARTY
-
-parallel: configured_parallel THIRDPARTY
+parallel: configured_parallel
 	@echo "Starting installation of ${AMBERTOOLS} MPI at `date`".
 	(cd etc && $(MAKE) parallel)
 	(cd sff && $(MAKE) libsff_mpi )
 #	(cd pbsa && $(MAKE) clean && $(MAKE) install.parallel )
 	(cd pbsa && $(MAKE) libinstall )
-	(cd byacc && $(MAKE) install )
-	(cd ucpp-1.3 && $(MAKE) $(UCPP) )
 #	(cd mdgx && $(MAKE) parallel )
 	(if [ "$(RISM)" = "yes" ]; then \
 		cd rism && $(MAKE) install_mpi ; \
@@ -161,19 +135,12 @@ configured_parallel: configured
 		} ;\
 	)
 
-clean::  netcdf_clean
-	-(cd ucpp-1.3 && $(MAKE) clean )
-	-(cd byacc && $(MAKE) clean )
+clean::
 	-(cd cifparse && $(MAKE) clean )
 	-(cd nab && $(MAKE) clean )
 	-(cd sff && $(MAKE) clean )
 	-(cd nss && $(MAKE) clean )
 	-(cd leap && $(MAKE) clean )
-	-(cd arpack && $(MAKE) clean )
-	-(cd blas && $(MAKE) clean )
-	-(cd xblas && $(MAKE) clean )
-	-(cd lapack && $(MAKE) clean )
-	-(cd c9x-complex && $(MAKE) clean )
 	-(cd etc && $(MAKE) clean )
 	-(cd chamber && $(MAKE) clean )
 	-(cd pbsa && $(MAKE) clean )
@@ -183,36 +150,20 @@ clean::  netcdf_clean
 	-(cd ptraj && $(MAKE) clean )
 	-(cd cpptraj && $(MAKE) clean)
 	-(cd reduce && $(MAKE) clean )
-	-(cd mtkpp && $(MAKE) clean )
 	-(cd mdgx && $(MAKE) clean )
 	-(cd xtalutil/CPrograms && $(MAKE) clean )
 	-(cd xray && $(MAKE) clean )
 	-(cd paramfit && $(MAKE) clean )
 	-(cd rism && $(MAKE) clean )
-	-(cd fftw-3.3 && $(MAKE) clean )
-	-($(RM) -f fftw-3.3/mpi/fftw3-mpi.f03 )
 	-(cd mmpbsa_py && $(MAKE) clean )
 	-(cd parmed && $(MAKE) clean )
 
-netcdf_clean:
-	-(cd netcdf/src && $(MAKE) clean)
-	-(cd netcdf/lib && rm -f *.a *.la)
-	-(cd netcdf/include && rm -f *.mod netcdf.*)
-	-(cd netcdf/bin && rm -f *)
-
 uninstall:
-	-(cd ucpp-1.3 && $(MAKE) uninstall )
-	-(cd byacc && $(MAKE) uninstall )
 	-(cd cifparse && $(MAKE) uninstall )
 	-(cd nab && $(MAKE) uninstall )
 	-(cd sff && $(MAKE) uninstall )
 	-(cd nss && $(MAKE) uninstall )
 	-(cd leap && $(MAKE) uninstall )
-	-(cd arpack && $(MAKE) uninstall )
-	-(cd blas && $(MAKE) uninstall )
-	-($(RM) -f $(LIBDIR)/libxblas.a )
-	-(cd lapack && $(MAKE) uninstall )
-	-(cd c9x-complex && $(MAKE) uninstall )
 	-(cd etc && $(MAKE) uninstall )
 	-(cd chamber && $(MAKE) uninstall )
 	-(cd pbsa && $(MAKE) uninstall )
@@ -224,30 +175,14 @@ uninstall:
 	-(cd mdgx && $(MAKE) uninstall )
 	-(cd xtalutil/CPrograms && $(MAKE) uninstall )
 	-(cd xray && $(MAKE) uninstall )
-	-(cd mtkpp && $(MAKE) uninstall )
 	-(cd paramfit && $(MAKE) uninstall )
 	-(cd rism && $(MAKE) uninstall )
-	-(cd netcdf/src && $(MAKE) uninstall)
-	-(cd fftw-3.3 && $(MAKE) uninstall)
 	-(cd cpptraj && $(MAKE) uninstall)
 	-(cd mmpbsa_py && $(MAKE) uninstall )
 	-(cd parmed && $(MAKE) uninstall )
 	-(cd amberlite && $(MAKE) uninstall )
 	-/bin/rm -f ../test/numprocs
-	-/bin/rm -fr $(BINDIR)/ncmpidump $(BINDIR)/ncmpigen $(BINDIR)/ncvalid $(LIBDIR)/libnetcdf.a $(INCDIR)/mtkpp
-	-(cd $(LIBDIR) && /bin/rm -f libxblas-amb.a libfftw3_mpi.a libfftw3_mpi.la)
-	-(cd $(INCDIR) && /bin/rm -f fftw3-mpi.f03 fftw3-mpi.h)
-
-$(INCDIR)/netcdf.mod:
-	cd netcdf/src && $(MAKE) && $(MAKE) -j 1 install
-
-$(LIBDIR)/libxblas-amb.a:
-	(cd xblas && $(MAKE) -j 1 lib-amb && mv libxblas-amb.a $(LIBDIR) )
-
-$(LIBDIR)/libfftw3.a $(LIBDIR)/libfftw3_mpi.a: 
-	cd fftw-3.3 && $(MAKE) && $(MAKE) -j 1 install;
-
-THIRDPARTY: $(NETCDF) $(XBLAS) $(FFTW3)
+	-/bin/rm -fr $(BINDIR)/ncmpidump $(BINDIR)/ncmpigen $(BINDIR)/ncvalid
 
 cuda:
 	@echo "$(AMBERTOOLS) has no CUDA-enabled components"
diff -up amber12/AmberTools/src/mdgx/Makefile.r amber12/AmberTools/src/mdgx/Makefile
--- amber12/AmberTools/src/mdgx/Makefile.r	2012-03-17 15:44:11.000000000 +0100
+++ amber12/AmberTools/src/mdgx/Makefile	2013-07-14 23:57:09.758653459 +0200
@@ -132,19 +132,16 @@ MDGX_HEADERS = \
 	       ptrajmask.h \
 	       ../sff/AmberNetcdf.h 
 
-mdgx$(SFX) : $(MDGX_OBJS) $(LIBDIR)/libfftw3.a
+mdgx$(SFX) : $(MDGX_OBJS)
 	$(CC) $(COPTFLAGS) $(CFLAGS) $(AMBERCFLAGS) $(LDFLAGS) \
 	-o $@ $(MDGX_OBJS) $(FFTWLIB) -L$(LIBDIR) $(NETCDFLIB) $(LM)
 
-mdgx.MPI$(SFX) : $(MDGX_OBJS) $(LIBDIR)/libfftw3.a
+mdgx.MPI$(SFX) : $(MDGX_OBJS)
 	$(CC) $(COPTFLAGS) $(CFLAGS) $(AMBERCFLAGS) $(LDFLAGS) \
 	-o $@ $(MDGX_OBJS) $(FFTWLIB) -L$(LIBDIR) $(NETCDFLIB) $(LM)
 
-$(LIBDIR)/fftw3.a: ../fftw-3.3/config.log
-	cd ../fftw-3.3 && $(MAKE) && $(MAKE) -j 1 install;
-
 .c.o:
-	$(CC) -c $(COPTFLAGS) $(CFLAGS) $(AMBERCFLAGS) -I$(INCDIR) -I../fftw-3.3/api -o $@ $<
+	$(CC) -c $(COPTFLAGS) $(CFLAGS) $(AMBERCFLAGS) -I$(INCDIR) -o $@ $<
 
 clean:
 	/bin/rm -f $(MDGX_OBJS) mdgx$(SFX)
diff -up amber12/AmberTools/src/nab/nab.c.r amber12/AmberTools/src/nab/nab.c
--- amber12/AmberTools/src/nab/nab.c.r	2012-01-03 21:33:15.000000000 +0100
+++ amber12/AmberTools/src/nab/nab.c	2013-07-14 21:42:50.581613256 +0200
@@ -161,8 +161,8 @@ char	*cppstring;
                fprintf( stderr, "AMBERHOME is not set!\n" );
                exit(1);
             }
-			sprintf( cmd, "%s/bin/%s %s -I%s/include %s ",
-				amberhome, CPP, cppstring, amberhome,
+			sprintf( cmd, "%s %s -I%s/include %s ",
+				CPP, cppstring, amberhome,
 				argv[ ac ] ? argv[ ac ] : "" );
 			if( cgdopt ) fprintf( stderr, "cpp cmd: %s\n", cmd );
 			nfields = split( cmd, fields, " " );
diff -up amber12/AmberTools/src/nss/Makefile.r amber12/AmberTools/src/nss/Makefile
--- amber12/AmberTools/src/nss/Makefile.r	2012-01-03 20:46:27.000000000 +0100
+++ amber12/AmberTools/src/nss/Makefile	2013-07-10 22:58:17.682274076 +0200
@@ -54,7 +54,7 @@ matextract$(SFX): matextract.o
 	$(NAB) -o matextract$(SFX) matextract.o
 
 matgen$(SFX):	matgen.o
-	$(NAB) -o matgen$(SFX) matgen.o
+	$(NAB) -o matgen$(SFX) matgen.o $(FLIBS_FFTW2)
 
 matmerge$(SFX):	matmerge.o
 	$(NAB) -o matmerge$(SFX) matmerge.o
diff -up amber12/AmberTools/src/pbsa/Makefile.r amber12/AmberTools/src/pbsa/Makefile
--- amber12/AmberTools/src/pbsa/Makefile.r	2012-03-09 13:53:59.000000000 +0100
+++ amber12/AmberTools/src/pbsa/Makefile	2013-07-10 22:58:17.682274076 +0200
@@ -144,17 +144,17 @@ configured_parallel: configured
 	)
 
 #---------------------------------------------------------------------------
-pbsa$(SFX): FFTW3 $(OBJ) syslib netlib c9x-complex configured_serial 
+pbsa$(SFX): FFTW3 $(OBJ) syslib c9x-complex configured_serial 
 	$(FC) $(PBSAFLAG) $(FPPFLAGS) $(FFLAGS) $(AMBERFFLAGS) -o pbsa$(SFX) $(OBJ) \
 	        ../lib/nxtsec.o ../lib/random.o $(FLIBS_FFTW3) \
 	        -L$(LIBDIR) $(FLIBSF) $(LDFLAGS) $(AMBERLDFLAGS)
 
-pbsa.MPI$(SFX): FFTW3.MPI $(OBJ) syslib netlib c9x-complex configured_parallel 
+pbsa.MPI$(SFX): FFTW3.MPI $(OBJ) syslib c9x-complex configured_parallel 
 	$(FC) $(PBSAFLAG) $(FPPFLAGS) $(FFLAGS) $(AMBERFFLAGS) -o pbsa.MPI$(SFX) $(OBJ) \
 	        ../lib/nxtsec.o ../lib/random.o $(FLIBS_FFTW3) \
 	        -L$(LIBDIR) $(FLIBSF) $(LDFLAGS) $(AMBERLDFLAGS)
 
-simplepbsa$(SFX): simplepbsa.o gopt.o libpbsa.a sfflib syslib netlib c9x-complex
+simplepbsa$(SFX): simplepbsa.o gopt.o libpbsa.a sfflib syslib c9x-complex
 	$(FC) $(PBSAFLAG) $(FPPFLAGS) $(FFLAGS) $(AMBERFFLAGS) -o simplepbsa$(SFX) simplepbsa.o gopt.o \
 		libpbsa.a $(LIBDIR)/libsff.a ../lib/nxtsec.o -L$(LIBDIR) $(FLIBSF) \
 		$(LDFLAGS) $(AMBERLDFLAGS)
@@ -194,10 +194,6 @@ FFTW3:
 		cd $(MKL)/interfaces/fftw3xf && $(MAKE) lib$(MKL_PROCESSOR) \
 		compiler=$(COMPILER) PRECISION=MKL_DOUBLE \
 		INSTALL_DIR=$(LIBDIR); \
-	else \
-	    if [ ! -f $(INCDIR)/fftw3.f03 ]; then\
-		cd ../fftw-3.3 && $(MAKE) && $(MAKE) -j 1 install; \
-	    fi \
 	fi \
 	fi
 
@@ -207,10 +203,6 @@ FFTW3.MPI:
 		cd $(MKL)/interfaces/fftw3xf && $(MAKE) lib$(MKL_PROCESSOR) \
 		compiler=$(COMPILER) PRECISION=MKL_DOUBLE \
 		INSTALL_DIR=$(LIBDIR); \
-	else \
-	    if [ ! -f $(INCDIR)/fftw3-mpi.f03 ]; then\
-		cd ../fftw-3.3 && $(MAKE) && $(MAKE) -j 1 install; \
-	    fi \
 	fi \
 	fi
 
@@ -220,11 +212,6 @@ syslib:
 sfflib:
 	cd ../sff && $(MAKE) install
 
-netlib: 
-	cd ../lapack && $(MAKE) $(LAPACK)
-	cd ../blas && $(MAKE) $(BLAS)
-	cd ../arpack && $(MAKE) install
-
 c9x-complex:
 	@if test $(C9XCOMPLEX) != "skip"; then \
 	   cd ../c9x-complex && $(MAKE) libmc.a; \
diff -up amber12/AmberTools/src/ptraj/Makefile.r amber12/AmberTools/src/ptraj/Makefile
--- amber12/AmberTools/src/ptraj/Makefile.r	2012-01-17 03:33:12.000000000 +0100
+++ amber12/AmberTools/src/ptraj/Makefile	2013-07-16 21:52:06.721513774 +0200
@@ -57,28 +57,19 @@ thermo.o:  thermo.F90
 pubfft.o:  pubfft.F90
 	$(FC) $(FPPFLAGS) -c $(FREEFORMAT_FLAG) $(FOPTFLAGS) $(FFLAGS) $(AMBERFFLAGS) -o $@ $<
 
-rdparm$(SFX): libs $(OBJECTS)
+rdparm$(SFX): $(OBJECTS)
 	$(CC) $(CFLAGS) $(AMBERCFLAGS) $(LDFLAGS) $(AMBERLDFLAGS) \
 		-o rdparm$(SFX) $(OBJECTS) $(LIBS) $(NETCDFLIB) $(LM)
 
-ptraj$(SFX): libs netlib $(OBJECTS)
+ptraj$(SFX): $(OBJECTS)
 	$(CC) $(CFLAGS) $(AMBERCFLAGS) $(LDFLAGS) $(AMBERLDFLAGS) \
 		-o ptraj$(SFX) $(OBJECTS) $(LIBS) $(NETCDFLIB) $(LM)
 
-ptraj.MPI$(SFX): libs netlib $(OBJECTS)
+ptraj.MPI$(SFX): $(OBJECTS)
 	$(CC) $(CFLAGS) $(AMBERCFLAGS) $(LDFLAGS) $(AMBERLDFLAGS) \
 		-o ptraj.MPI$(SFX) $(OBJECTS) $(LIBS) $(PNETCDFLIB) $(LM)
 
-libs: 
-	cd pdb && $(MAKE) 
-	cd ../arpack && $(MAKE)
-
-netlib:
-	cd ../lapack && $(MAKE) $(LAPACK)
-	cd ../blas && $(MAKE) $(BLAS)
-
 clean:
-	cd pdb && $(MAKE) clean
 	/bin/rm -f $(OBJECTS) rdparm$(SFX) ptraj$(SFX)
 
 install: all
@@ -88,5 +79,4 @@ uninstall:
 	-rm -f $(BINDIR)/rdparm$(SFX)
 	-rm -f $(BINDIR)/ptraj$(SFX)
 	-rm -f $(BINDIR)/ptraj$(SFX).MPI
-	-rm -f $(LIBDIR)/libpdb.a
 
diff -up amber12/AmberTools/src/ptraj/ptraj.h.r amber12/AmberTools/src/ptraj/ptraj.h
--- amber12/AmberTools/src/ptraj/ptraj.h.r	2012-01-03 21:33:15.000000000 +0100
+++ amber12/AmberTools/src/ptraj/ptraj.h	2013-07-16 21:53:08.110677781 +0200
@@ -67,7 +67,7 @@
 #include "constants.h"
 #include "ptraj_local.h"
 #include "utility.h"
-#include "pdb/pdb.h"
+#include <pdb.h>
 #include "evec.h"
 #include "dispatch.h"
 #include "actions.h"
diff -up amber12/AmberTools/src/rism/Makefile.r amber12/AmberTools/src/rism/Makefile
--- amber12/AmberTools/src/rism/Makefile.r	2012-03-18 03:35:24.000000000 +0100
+++ amber12/AmberTools/src/rism/Makefile	2013-07-10 22:58:17.683274079 +0200
@@ -18,7 +18,7 @@ SRC=rism1d.F90
 rism1d$(SFX): $(OBJ) librism
 	$(FC) $(FPPFLAGS) $(FFLAGS) $(AMBERFFLAGS) -o rism1d$(SFX) $(OBJ) \
 	        -L$(LIBDIR) -lrism $(FLIBS_FFTW3) \
-	        $(FLIBSF)  $(LDFLAGS) $(AMBERLDFLAGS)  $(LIBDIR)/libxblas-amb.a
+	        $(FLIBSF)  $(LDFLAGS) $(AMBERLDFLAGS)  -lxblas
 
 # ------- rism3d information: ----------------------------------------------
 
diff -up amber12/AmberTools/src/sff/sff.c.r amber12/AmberTools/src/sff/sff.c
--- amber12/AmberTools/src/sff/sff.c.r	2012-03-09 13:53:59.000000000 +0100
+++ amber12/AmberTools/src/sff/sff.c	2013-07-10 22:58:17.683274079 +0200
@@ -308,7 +308,7 @@ REAL_T seconds(void)
    return (((REAL_T) nsec) * 1.0e-09);
 #else
    REAL_T t1;
-   arsecond_( &t1);
+   arscnd_( &t1);
    return t1;
 #endif
 }
diff -up amber12/AmberTools/src/sff/sff.h.r amber12/AmberTools/src/sff/sff.h
--- amber12/AmberTools/src/sff/sff.h.r	2012-03-09 13:53:59.000000000 +0100
+++ amber12/AmberTools/src/sff/sff.h	2013-07-10 22:58:17.684274082 +0200
@@ -226,7 +226,7 @@ INT_T            mme_rism_max_memory();
 #endif
 
 /*  from arpack:  */
-void arsecond_( double * );
+void arscnd_( double * );
 
 
 #endif
diff -up amber12/AmberTools/src/sqm/Makefile.r amber12/AmberTools/src/sqm/Makefile
--- amber12/AmberTools/src/sqm/Makefile.r	2012-01-17 03:31:54.000000000 +0100
+++ amber12/AmberTools/src/sqm/Makefile	2013-07-10 22:58:17.684274082 +0200
@@ -82,7 +82,7 @@ QMOBJ = qm2_allocate_e_repul.o qm2_calc_
 install: sqm$(SFX)
 	mv sqm$(SFX) $(BINDIR)
 
-sqm$(SFX): $(SQMOBJ) $(QMOBJ) netlib sys
+sqm$(SFX): $(SQMOBJ) $(QMOBJ) sys
 	$(FC) $(FPPFLAGS) $(FFLAGS) $(AMBERFFLAGS) -o sqm$(SFX) $(SQMOBJ) $(QMOBJ) \
 		-L$(LIBDIR) $(FLIBSF) ../lib/sys.a $(LDFLAGS) $(AMBERLDFLAGS)
 
@@ -101,11 +101,6 @@ $(LIBDIR)/libsqm.a: $(QMOBJ) $(LIBQMOBJ)
 sys:
 	cd ../lib; $(MAKE) sys.a
 
-netlib:
-	cd ../lapack; $(MAKE) $(LAPACK)
-	cd ../blas; $(MAKE) $(BLAS)
-	cd ../arpack && $(MAKE) install
-
 clean:
 	/bin/rm -f *.o  *.mod *.d sqm$(SFX)
 
