Index: ThirdParty/JobMarket/src/unittests/Makefile.am
===================================================================
--- ThirdParty/JobMarket/src/unittests/Makefile.am	(revision 363f2898862bc5529d83e0358237e36e9520c655)
+++ ThirdParty/JobMarket/src/unittests/Makefile.am	(revision 889d80c0de7c69479d17ef2c785403680213d549)
@@ -10,5 +10,5 @@
 lib_LTLIBRARIES =
 
-AM_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl
+AM_LDFLAGS = ${CodePatterns_LDFLAGS} $(CPPUNIT_LDFLAGS) -ldl
 AM_CPPFLAGS = -I$(top_srcdir)/src $(CPPUNIT_CFLAGS) $(BOOST_CPPFLAGS) ${CodePatterns_CFLAGS}
 
@@ -50,7 +50,7 @@
   $(BOOST_THREAD_LDFLAGS) $(BOOST_THREAD_LIBS) \
   $(BOOST_SYSTEM_LDFLAGS) $(BOOST_SYSTEM_LIBS) \
-  ${CodePatterns_LIBS}
+  ${CodePatterns_LIBS} \
+  $(CPPUNIT_LIBS)
 
-FragmentJobUnitTest_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl
 FragmentJobUnitTest_SOURCES = UnitTestMain.cpp \
   FragmentJobUnitTest.cpp \
@@ -60,10 +60,6 @@
   stubs/FragmentJobStub.hpp
 FragmentJobUnitTest_LDADD = \
-  ../JobMarket/libJobMarketJobs.la \
-  $(BOOST_SERIALIZATION_LDFLAGS) $(BOOST_SERIALIZATION_LIBS) \
-  $(BOOST_SYSTEM_LDFLAGS) $(BOOST_SYSTEM_LIBS) \
-  ${CodePatterns_LIBS}
+  ${FRAGMENTATIONAUTOMATIONLIBS}
 
-FragmentQueueUnitTest_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl
 FragmentQueueUnitTest_SOURCES = UnitTestMain.cpp \
   FragmentQueueUnitTest.cpp \
@@ -74,20 +70,12 @@
   stubs/ObserverStub.hpp
 FragmentQueueUnitTest_LDADD = \
-  ../JobMarket/libJobMarketJobs.la \
-  $(BOOST_SERIALIZATION_LDFLAGS) $(BOOST_SERIALIZATION_LIBS) \
-  $(BOOST_SYSTEM_LDFLAGS) $(BOOST_SYSTEM_LIBS) \
-  ${CodePatterns_LIBS}
+  ${FRAGMENTATIONAUTOMATIONLIBS}
 
-FragmentResultUnitTest_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl
 FragmentResultUnitTest_SOURCES = UnitTestMain.cpp \
   FragmentResultUnitTest.cpp \
   FragmentResultUnitTest.hpp
 FragmentResultUnitTest_LDADD = \
-	../JobMarket/libJobMarketJobs.la \
-  $(BOOST_SERIALIZATION_LDFLAGS) $(BOOST_SERIALIZATION_LIBS) \
-  $(BOOST_SYSTEM_LDFLAGS) $(BOOST_SYSTEM_LIBS) \
-  ${CodePatterns_LIBS}
+  ${FRAGMENTATIONAUTOMATIONLIBS}
 
-OperationQueueUnitTest_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl
 OperationQueueUnitTest_SOURCES = UnitTestMain.cpp \
   OperationQueueUnitTest.cpp \
@@ -95,33 +83,26 @@
   stubs/AsyncOperationStub.hpp
 OperationQueueUnitTest_LDADD = \
-	../JobMarket/libJobMarketOperations.la \
-	../JobMarket/libJobMarketJobs.la \
-	../JobMarket/libJobMarketHelper.la \
+  ../JobMarket/libJobMarketOperations.la \
+  ../JobMarket/libJobMarketJobs.la \
+  ../JobMarket/libJobMarketHelper.la \
   $(BOOST_SYSTEM_LDFLAGS) $(BOOST_SYSTEM_LIBS) \
-  ${CodePatterns_LIBS}
+  ${CodePatterns_LIBS} \
+  $(CPPUNIT_LIBS)
 
-SystemCommandJobUnitTest_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl
 SystemCommandJobUnitTest_SOURCES = UnitTestMain.cpp \
   SystemCommandJobUnitTest.cpp \
   SystemCommandJobUnitTest.hpp
 SystemCommandJobUnitTest_LDADD = \
-	../JobMarket/libJobMarketJobs.la \
-  $(BOOST_SERIALIZATION_LDFLAGS) $(BOOST_SERIALIZATION_LIBS) \
+  ${FRAGMENTATIONAUTOMATIONLIBS} \
   $(BOOST_IOSTREAMS_LDFLAGS) $(BOOST_IOSTREAMS_LIBS) \
-  $(BOOST_FILESYSTEM_LDFLAGS) $(BOOST_FILESYSTEM_LIBS) \
-  $(BOOST_SYSTEM_LDFLAGS) $(BOOST_SYSTEM_LIBS) \
-  ${CodePatterns_LIBS}
+  $(BOOST_FILESYSTEM_LDFLAGS) $(BOOST_FILESYSTEM_LIBS)
 
-WorkerAddressUnitTest_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl
 WorkerAddressUnitTest_SOURCES = UnitTestMain.cpp \
   WorkerAddressUnitTest.cpp \
   WorkerAddressUnitTest.hpp
 WorkerAddressUnitTest_LDADD = \
-	../JobMarket/libJobMarketHelper.la \
-  $(BOOST_SERIALIZATION_LDFLAGS) $(BOOST_SERIALIZATION_LIBS) \
-  $(BOOST_SYSTEM_LDFLAGS) $(BOOST_SYSTEM_LIBS) \
-  ${CodePatterns_LIBS}
+  ../JobMarket/libJobMarketHelper.la \
+  ${FRAGMENTATIONAUTOMATIONLIBS}
 
-WorkerPoolUnitTest_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl
 WorkerPoolUnitTest_SOURCES = UnitTestMain.cpp \
   WorkerPoolUnitTest.cpp \
@@ -130,9 +111,10 @@
   stubs/ObserverStub.hpp
 WorkerPoolUnitTest_LDADD = \
-	../JobMarket/libJobMarketPool.la \
-	../JobMarket/libJobMarketHelper.la \
+  ../JobMarket/libJobMarketPool.la \
+  ../JobMarket/libJobMarketHelper.la \
   $(BOOST_SERIALIZATION_LDFLAGS) $(BOOST_SERIALIZATION_LIBS) \
   $(BOOST_SYSTEM_LDFLAGS) $(BOOST_SYSTEM_LIBS) \
-  ${CodePatterns_LIBS}
+  ${CodePatterns_LIBS} \
+  $(CPPUNIT_LIBS)
 
 #AUTOMAKE_OPTIONS = parallel-tests
