Index: ThirdParty/JobMarket/tests/CodeChecks/Makefile.am
===================================================================
--- ThirdParty/JobMarket/tests/CodeChecks/Makefile.am	(revision 363f2898862bc5529d83e0358237e36e9520c655)
+++ ThirdParty/JobMarket/tests/CodeChecks/Makefile.am	(revision 363f2898862bc5529d83e0358237e36e9520c655)
@@ -0,0 +1,61 @@
+AUTOM4TE = autom4te
+
+TESTSUITE = $(srcdir)/testsuite
+
+TESTSCRIPTS = \
+	testsuite-config_h.at \
+	testsuite-date_in_dox.at \
+	testsuite-header-dist.at \
+	testsuite-memdebug.at \
+	testsuite-project-disclaimer.at
+
+DISTCLEANFILES = atconfig
+
+EXTRA_DIST = \
+	atlocal.in \
+	package.m4 \
+	testsuite.at \
+	$(TESTSUITE) \
+	$(TESTSCRIPTS)
+
+max_jobs = 4
+ 
+check-local: atlocal package.m4 $(TESTSUITE)
+	nrjobs=; \
+	for flag in $$MAKEFLAGS; do \
+		case $$flag in \
+		--* | =*=) ;; \
+		*j*) nrjobs="-j$(max_jobs)" ;; \
+		esac; \
+	done; \
+	$(SHELL) '$(TESTSUITE)' $$nrjobs AUTOTEST_PATH='$(abs_top_builddir)/src' $(TESTSUITEFLAGS)
+
+installcheck-local: atconfig atlocal $(TESTSUITE)
+	nrjobs=; \
+	for flag in $$MAKEFLAGS; do \
+		case $$flag in \
+		--* | =*=) ;; \
+		*j*) nrjobs="-j$(max_jobs)" ;; \
+		esac; \
+	done; \
+	$(SHELL) '$(TESTSUITE)' $$nrjobs AUTOTEST_PATH='$(bindir)' $(TESTSUITEFLAGS)
+
+clean-local:
+	test ! -f '$(TESTSUITE)' || \
+	$(SHELL) '$(TESTSUITE)' --clean
+
+AUTOTEST = $(AUTOM4TE) --language=autotest
+$(TESTSUITE): $(srcdir)/testsuite.at package.m4 $(TESTSCRIPTS)
+	$(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
+	mv $@.tmp $@
+
+# The `:;' works around a Bash 3.2 bug when the output is not writeable.
+package.m4: $(top_srcdir)/configure.ac
+	:;{ \
+		echo '# Signature of the current package.' && \
+		echo 'm4_define([AT_PACKAGE_NAME],      [@PACKAGE_NAME@])' && \
+		echo 'm4_define([AT_PACKAGE_TARNAME],   [@PACKAGE_TARNAME@])' && \
+		echo 'm4_define([AT_PACKAGE_VERSION],   [@PACKAGE_VERSION@])' && \
+		echo 'm4_define([AT_PACKAGE_STRING],    [@PACKAGE_STRING@])' && \
+		echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
+	} >'$(srcdir)/package.m4'
Index: ThirdParty/JobMarket/tests/CodeChecks/atlocal.in
===================================================================
--- ThirdParty/JobMarket/tests/CodeChecks/atlocal.in	(revision 363f2898862bc5529d83e0358237e36e9520c655)
+++ ThirdParty/JobMarket/tests/CodeChecks/atlocal.in	(revision 363f2898862bc5529d83e0358237e36e9520c655)
@@ -0,0 +1,1 @@
+abs_top_srcdir='@abs_top_srcdir@'
Index: ThirdParty/JobMarket/tests/CodeChecks/testsuite-config_h.at
===================================================================
--- ThirdParty/JobMarket/tests/CodeChecks/testsuite-config_h.at	(revision 363f2898862bc5529d83e0358237e36e9520c655)
+++ ThirdParty/JobMarket/tests/CodeChecks/testsuite-config_h.at	(revision 363f2898862bc5529d83e0358237e36e9520c655)
@@ -0,0 +1,25 @@
+AT_SETUP([Checking for present config.h include])
+AT_KEYWORDS([CodeCheck config_h])
+ok=""
+echo `pwd`
+echo "${#ok[*]} are ok to not contain config.h: ${ok[*]}."
+liste=`find ${abs_top_srcdir}/src -name '*.?pp'`
+for file in $liste
+do
+  # check whether its one of the excluded ones
+  found=0
+  for item in $ok
+  do
+    if test "$item" == "`basename $file`"
+    then
+      found=1
+      break
+    fi
+  done
+  # if not, check whether it contains the include
+  if test $found -eq 0
+  then
+    AT_CHECK([egrep -q '^#include.*config.h' $file], 0, [ignore], [ignore], [echo "Could not find config.h include in $file."])
+  fi
+done
+AT_CLEANUP
Index: ThirdParty/JobMarket/tests/CodeChecks/testsuite-date_in_dox.at
===================================================================
--- ThirdParty/JobMarket/tests/CodeChecks/testsuite-date_in_dox.at	(revision 363f2898862bc5529d83e0358237e36e9520c655)
+++ ThirdParty/JobMarket/tests/CodeChecks/testsuite-date_in_dox.at	(revision 363f2898862bc5529d83e0358237e36e9520c655)
@@ -0,0 +1,25 @@
+AT_SETUP([Checking for present date stamp in .dox files])
+AT_KEYWORDS([CodeCheck dox date_in_dox])
+ok=""
+echo `pwd`
+echo "${#ok[*]} are ok to not contain date in .dox: ${ok[*]}."
+liste=`find ${abs_top_srcdir}/src -name '*.dox'`
+for file in $liste
+do
+  # check whether its one of the excluded ones
+  found=0
+  for item in $ok
+  do
+    if test "$item" == "`basename $file`"
+    then
+      found=1
+      break
+    fi
+  done
+  # if not, check whether it contains the include
+  if test $found -eq 0
+  then
+    AT_CHECK([egrep -q '\date [[0-9]]{4}-[[0-2]][[0-9]]-[[0-3]][[0-9]]' $file], 0, [ignore], [ignore], [echo "Could not find date stamp in $file."])
+  fi
+done
+AT_CLEANUP
Index: ThirdParty/JobMarket/tests/CodeChecks/testsuite-header-dist.at
===================================================================
--- ThirdParty/JobMarket/tests/CodeChecks/testsuite-header-dist.at	(revision 363f2898862bc5529d83e0358237e36e9520c655)
+++ ThirdParty/JobMarket/tests/CodeChecks/testsuite-header-dist.at	(revision 363f2898862bc5529d83e0358237e36e9520c655)
@@ -0,0 +1,27 @@
+AT_SETUP([Checking that header files get distributed])
+AT_KEYWORDS([CodeCheck header])
+
+ok=""
+echo "${#ok[*]} are ok not to get distributed: ${ok[*]}."
+Makefiles=`find ${abs_top_srcdir}/src -name Makefile.am`
+liste=`find ${abs_top_srcdir}/src -name '*.hpp'`
+for header in $liste; do
+  filename=`basename $header`
+  # check whether it is one of the excluded ones
+  found=0
+  for item in $ok
+  do
+    if test x"$item" == x"$filename"
+    then
+      found=1
+      break
+    fi
+  done
+  # if not, check whether it contains the include
+  if test $found -eq 0
+  then
+    AT_CHECK([egrep -q $filename $Makefiles], 0, [ignore], [ignore], [echo "$filename is not present in any Makefile.am and thus won't get distributed. Either add to the module's Makefile.am's ..._SOURCES or at least to EXTRADIST."])
+  fi
+done
+
+AT_CLEANUP
Index: ThirdParty/JobMarket/tests/CodeChecks/testsuite-memdebug.at
===================================================================
--- ThirdParty/JobMarket/tests/CodeChecks/testsuite-memdebug.at	(revision 363f2898862bc5529d83e0358237e36e9520c655)
+++ ThirdParty/JobMarket/tests/CodeChecks/testsuite-memdebug.at	(revision 363f2898862bc5529d83e0358237e36e9520c655)
@@ -0,0 +1,28 @@
+AT_SETUP([Checking for present MemDebug.hpp include])
+AT_KEYWORDS([CodeCheck MemDebug])
+ok=""
+echo `pwd`
+echo "${#ok[*]} are ok to not contain MemDebug.hpp: ${ok[0]} ${ok[1]}."
+liste=`find ${abs_top_srcdir}/src -name '*.cpp'`
+for file in $liste
+do
+  # check whether its one of the excluded ones
+  found=0
+  for item in $ok
+  do
+    if test "$item" == "`basename $file`"
+    then
+      found=1
+      break
+    fi
+  done
+  # if not, check whether it contains the include if its NOT a unit test
+  if test -z `echo $file | grep unittests`
+  then
+    if test $found -eq 0
+    then
+      AT_CHECK([egrep -q '^#include.*MemDebug.hpp' $file], 0, [ignore], [ignore], [echo "Could not find MemDebug.hpp include in $file."])
+    fi
+  fi
+done
+AT_CLEANUP
Index: ThirdParty/JobMarket/tests/CodeChecks/testsuite-project-disclaimer.at
===================================================================
--- ThirdParty/JobMarket/tests/CodeChecks/testsuite-project-disclaimer.at	(revision 363f2898862bc5529d83e0358237e36e9520c655)
+++ ThirdParty/JobMarket/tests/CodeChecks/testsuite-project-disclaimer.at	(revision 363f2898862bc5529d83e0358237e36e9520c655)
@@ -0,0 +1,26 @@
+AT_SETUP([Checking for present project disclaimer])
+AT_KEYWORDS([CodeCheck disclaimer])
+ok=""
+echo `pwd`
+echo "${#ok[*]} are ok to not contain config.h: ${ok[*]}."
+liste=`find ${abs_top_srcdir}/src -name '*.cpp'`
+for file in $liste
+do
+  # check whether its one of the excluded ones
+  found=0
+  for item in $ok
+  do
+    if test "$item" == "`basename $file`"
+    then
+      found=1
+      break
+    fi
+  done
+  # if not, check whether it contains the include
+  if test $found -eq 0
+  then
+    AT_CHECK([egrep -q " * Project: JobMarket" $file], 0, [ignore], [ignore], [echo "Could not find project disclaimer in $file."])
+    AT_CHECK([egrep -q " * Copyright.* Frederik Heber" $file], 0, [ignore], [ignore], [echo "Could not find copyright in $file."])
+  fi
+done
+AT_CLEANUP
Index: ThirdParty/JobMarket/tests/CodeChecks/testsuite.at
===================================================================
--- ThirdParty/JobMarket/tests/CodeChecks/testsuite.at	(revision 363f2898862bc5529d83e0358237e36e9520c655)
+++ ThirdParty/JobMarket/tests/CodeChecks/testsuite.at	(revision 363f2898862bc5529d83e0358237e36e9520c655)
@@ -0,0 +1,23 @@
+# Process with autom4te to create an -*- Autotest -*- test suite.
+#
+# see regression/... subdirs wherein for each of the cases and each check (enumerated) is a pre and post dir. 
+# In pre initial files are placed, in post results can be found to be checked by diff in this testsuite.
+
+AT_INIT([Job Market])
+AT_TESTED(egrep find grep)
+
+# Use colored output with new-enough Autotest.
+m4_ifdef([AT_COLOR_TESTS], [AT_COLOR_TESTS])
+
+AT_BANNER([JobMarket - Code Checks])
+m4_include(atlocal)
+
+m4_include(testsuite-config_h.at)
+
+m4_include(testsuite-date_in_dox.at)
+
+m4_include(testsuite-memdebug.at)
+
+m4_include(testsuite-project-disclaimer.at)
+
+m4_include(testsuite-header-dist.at)
