Index: ThirdParty/mpqc_open/src/bin/mpqc/Makefile.am
===================================================================
--- ThirdParty/mpqc_open/src/bin/mpqc/Makefile.am	(revision 4f20e7b5ff82dcec4ad6e9561244a07a95f27fe5)
+++ ThirdParty/mpqc_open/src/bin/mpqc/Makefile.am	(revision fbf005fe6f3de1a0fe7c1467b64db03e679102ae)
@@ -1,34 +1,81 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src/lib
+AM_CPPFLAGS = \
+	-I$(top_srcdir)/include -I$(top_srcdir)/src/lib \
+	-DHAVE_JOBMARKET -I$(top_srcdir)/../JobMarket/src -I$(top_builddir)/../JobMarket -I$(top_srcdir)/../../src -I$(top_srcdir)/../LinearAlgebra/src -I$(top_srcdir)/../CodePatterns/src $(BOOST_SYSTEM_CFLAGS) \
+	-DHAVE_MPQCDATA -I$(top_builddir)/../../src
 
 bin_PROGRAMS = molecuilder_mpqc
 
-noinst_LTLIBRARIES = libmpqc.la
+lib_LTLIBRARIES = \
+	libmolecuilder_mpqc.la
 
-libmpqc_la_SOURCES = \
+noinst_LTLIBRARIES = \
+	libmolecuilder_mpqc_extract_dummy.la
+
+LIBMPQCSOURCES = \
+	mpqc.cc \
 	mpqcin.cc \
+	parse.cc \
+	scan.cc
+
+LIBMPQCHEADERS = \
+	mpqc.h \
 	mpqcin.h \
-	parse.cc \
 	parse.h \
-	scan.cc \
 	scdirlist.h
 
+libmolecuilder_mpqc_extract_dummy_la_SOURCES = \
+	mpqc_extract_dummy.cc \
+	mpqc_extract.h
+
+libmolecuilder_mpqc_la_includedir = $(includedir)/molecuilder_mpqc/
+libmolecuilder_mpqc_la_CPPFLAGS = $(AM_CPPFLAGS)
+libmolecuilder_mpqc_la_LDFLAGS = $(AM_LDFLAGS)
+	
+libmolecuilder_mpqc_la_LIBADD = \
+	../../lib/libSCmbpt.la ../../lib/libSCscf.la ../../lib/libSCdft.la ../../lib/libSCwfn.la ../../lib/libSCpsi.la ../../lib/libSCsolvent.la ../../lib/libSCintv3.la ../../lib/libSCbasis.la ../../lib/libSCoint3.la ../../lib/libSCmolecule.la ../../lib/libSCisosurf.la ../../lib/libSCoptimize.la ../../lib/libSCsymmetry.la ../../lib/libSCscmat.la ../../lib/libSCrender.la ../../lib/libSCgroup.la ../../lib/libSCmisc.la ../../lib/libSCstate.la ../../lib/libSCkeyval.la ../../lib/libSCclass.la ../../lib/libSCcontainer.la ../../lib/libSCref.la ../../lib/libSCoptions.la
+
+nobase_libmolecuilder_mpqc_la_include_HEADERS = ${LIBMPQCHEADERS}
+
+## Define the source file list for the "libexample-@MOLECUILDER_API_VERSION@.la"
+## target.  Note that @MOLECUILDER_API_VERSION@ is not interpreted by Automake and
+## will therefore be treated as if it were literally part of the target name,
+## and the variable name derived from that.
+## The file extension .cc is recognized by Automake, and makes it produce
+## rules which invoke the C++ compiler to produce a libtool object file (.lo)
+## from each source file.  Note that it is not necessary to list header files
+## which are already listed elsewhere in a _HEADERS variable assignment.
+libmolecuilder_mpqc_la_SOURCES = ${LIBMPQCSOURCES}
+
+## Instruct libtool to include ABI version information in the generated shared
+## library file (.so).  The library ABI version is defined in configure.ac, so
+## that all version information is kept in one place.
+libmolecuilder_mpqc_la_LDFLAGS += -version-info $(MPQC_SO_VERSION)
+
+## The generated configuration header is installed in its own subdirectory of
+## $(libdir).  The reason for this is that the configuration information put
+## into this header file describes the target platform the installed library
+## has been built for.  Thus the file must not be installed into a location
+## intended for architecture-independent files, as defined by the Filesystem
+## Hierarchy Standard (FHS).
+## The nodist_ prefix instructs Automake to not generate rules for including
+## the listed files in the distribution on 'make dist'.  Files that are listed
+## in _HEADERS variables are normally included in the distribution, but the
+## configuration header file is generated at configure time and should not be
+## shipped with the source tarball.
+libmolecuilder_mpqc_la_libincludedir = $(libdir)/molecuilder_mpqc/include
+nodist_libmolecuilder_mpqc_la_libinclude_HEADERS = $(top_builddir)/src/lib/scconfig.h
+
+## Install the generated pkg-config file (.pc) into the expected location for
+## architecture-dependent package configuration information.  Occasionally,
+## pkg-config files are also used for architecture-independent data packages,
+## in which case the correct install location would be $(datadir)/pkgconfig.
+#pkgconfigdir = $(libdir)/pkgconfig
+#pkgconfig_DATA = $(top_builddir)/molecuilder_mpqc.pc
+
 molecuilder_mpqc_SOURCES = \
-	mpqc.cc
+	mpqc_main.cc
 
-molecuilder_mpqc_CPPFLAGS = \
-	$(AM_CPPFLAGS) \
-	-DHAVE_JOBMARKET -I$(top_srcdir)/../JobMarket/src -I$(top_builddir)/../JobMarket -I$(top_srcdir)/../../src -I$(top_srcdir)/../LinearAlgebra/src $(BOOST_SYSTEM_CFLAGS) \
-	-DHAVE_MPQCDATA -I$(top_builddir)/../../src
-
-molecuilder_mpqc_LDFLAGS = \
-	$(AM_LDFLAGS) \
-	-L$(top_builddir)/../JobMarket/src/JobMarket/.libs -Wl,-rpath,$(top_builddir)/../JobMarket/src/JobMarket/.libs \
-	-L$(top_builddir)/../../src/.libs -Wl,-rpath,$(top_builddir)/../../src/.libs \
-	$(BOOST_SYSTEM_LDFLAGS)
 molecuilder_mpqc_LDADD = \
-	libmpqc.la ../../lib/libSCmbpt.la ../../lib/libSCscf.la ../../lib/libSCdft.la ../../lib/libSCwfn.la ../../lib/libSCpsi.la ../../lib/libSCsolvent.la ../../lib/libSCintv3.la ../../lib/libSCbasis.la ../../lib/libSCoint3.la ../../lib/libSCmolecule.la ../../lib/libSCisosurf.la ../../lib/libSCoptimize.la ../../lib/libSCsymmetry.la ../../lib/libSCscmat.la ../../lib/libSCrender.la ../../lib/libSCgroup.la ../../lib/libSCmisc.la ../../lib/libSCstate.la ../../lib/libSCkeyval.la ../../lib/libSCclass.la ../../lib/libSCcontainer.la ../../lib/libSCref.la ../../lib/libSCoptions.la \
-	-lJobMarketPoolWorker -lJobMarket  \
-	-lMolecuilderJobs -lMolecuilderFragmentationSummation \
-	-lboost_serialization
+	libmolecuilder_mpqc.la libmolecuilder_mpqc_extract_dummy.la
 if COND_LIBINT
 molecuilder_mpqc_LDADD += -lint
