Index: tests/Fragmentations/Makefile.am
===================================================================
--- tests/Fragmentations/Makefile.am	(revision aba610cde06d025a98237132edfdeacef9fe648c)
+++ tests/Fragmentations/Makefile.am	(revision 740d40e9b13bb9dbeb059d1f879dae6db1a97e2d)
@@ -1,36 +1,145 @@
-TESTS = \
-	1_2-dimethoxyethane.test \
-	1_2-dimethylbenzene.test \
-	2-methylcyclohexanone.test \
-	benzene.test \
-	cholesterol.test \
-	cycloheptane.test \
-	dimethyl_bromomalonate.test \
-	glucose.test \
-	heptan.test \
-	isoleucine.test \
-	neohexane.test \
-	N_N-dimethylacetamide.test \
-	proline.test \
-	putrescine.test \
-	tartaric_acid.test
+AUTOM4TE = $(SHELL) $(top_srcdir)/build-aux/missing --run autom4te
 
 EXTRA_DIST = \
-	$(TESTS) \
-	1_2-dimethoxyethane \
-	1_2-dimethylbenzene \
-	2-methylcyclohexanone \
-	benzene \
-	cholesterol \
-	cycloheptane \
-	dimethyl_bromomalonate \
-	glucose \
-	heptan \
-	isoleucine \
-	neohexane \
-	N_N-dimethylacetamide \
-	proline \
-	putrescine \
-	tartaric_acid
+	testsuite.at \
+	$(TESTSUITE) \
+	atlocal.in \
+	molecuilder.in \
+	$(srcdir)/package.m4 \
+	$(srcdir)/1_2-dimethoxyethane \
+	$(srcdir)/1_2-dimethylbenzene \
+	$(srcdir)/2-methylcyclohexanone \
+	$(srcdir)/benzene \
+	$(srcdir)/cholesterol \
+	$(srcdir)/cycloheptane \
+	$(srcdir)/dimethyl_bromomalonate \
+	$(srcdir)/glucose \
+	$(srcdir)/heptan \
+	$(srcdir)/isoleucine \
+	$(srcdir)/neohexane \
+	$(srcdir)/N_N-dimethylacetamide \
+	$(srcdir)/proline \
+	$(srcdir)/putrescine \
+	$(srcdir)/tartaric_acid
 
-${TESTS}: defs
+TESTSUITE = $(srcdir)/testsuite
+
+DISTCLEANFILES = atconfig
+
+TESTSCRIPTS = \
+	1_2-dimethoxyethane/testsuite-1_2-dimethoxyethane-order1.at \
+	1_2-dimethoxyethane/testsuite-1_2-dimethoxyethane-order2.at \
+	1_2-dimethoxyethane/testsuite-1_2-dimethoxyethane-order3.at \
+	1_2-dimethoxyethane/testsuite-1_2-dimethoxyethane-order4.at \
+	1_2-dimethylbenzene/testsuite-1_2-dimethylbenzene-order1.at \
+	1_2-dimethylbenzene/testsuite-1_2-dimethylbenzene-order2.at \
+	1_2-dimethylbenzene/testsuite-1_2-dimethylbenzene-order3.at \
+	1_2-dimethylbenzene/testsuite-1_2-dimethylbenzene-order4.at \
+	2-methylcyclohexanone/testsuite-2-methylcyclohexanone-order1.at \
+	2-methylcyclohexanone/testsuite-2-methylcyclohexanone-order2.at \
+	2-methylcyclohexanone/testsuite-2-methylcyclohexanone-order3.at \
+	2-methylcyclohexanone/testsuite-2-methylcyclohexanone-order4.at \
+	benzene/testsuite-benzene-order1.at \
+	benzene/testsuite-benzene-order2.at \
+	benzene/testsuite-benzene-order3.at \
+	benzene/testsuite-benzene-order4.at \
+	benzene/testsuite-benzene-order5.at \
+	benzene/testsuite-benzene-order6.at \
+	cholesterol/testsuite-cholesterol-order1.at \
+	cholesterol/testsuite-cholesterol-order2.at \
+	cholesterol/testsuite-cholesterol-order3.at \
+	cholesterol/testsuite-cholesterol-order4.at \
+	cycloheptane/testsuite-cycloheptane-order1.at \
+	cycloheptane/testsuite-cycloheptane-order2.at \
+	cycloheptane/testsuite-cycloheptane-order3.at \
+	cycloheptane/testsuite-cycloheptane-order4.at \
+	cycloheptane/testsuite-cycloheptane-order5.at \
+	cycloheptane/testsuite-cycloheptane-order6.at \
+	dimethyl_bromomalonate/testsuite-dimethyl_bromomalonate-order1.at \
+	dimethyl_bromomalonate/testsuite-dimethyl_bromomalonate-order2.at \
+	dimethyl_bromomalonate/testsuite-dimethyl_bromomalonate-order3.at \
+	dimethyl_bromomalonate/testsuite-dimethyl_bromomalonate-order4.at \
+	dimethyl_bromomalonate/testsuite-dimethyl_bromomalonate-order5.at \
+	dimethyl_bromomalonate/testsuite-dimethyl_bromomalonate-order6.at \
+	glucose/testsuite-glucose-order1.at \
+	glucose/testsuite-glucose-order2.at \
+	glucose/testsuite-glucose-order3.at \
+	glucose/testsuite-glucose-order4.at \
+	glucose/testsuite-glucose-order5.at \
+	glucose/testsuite-glucose-order6.at \
+	heptan/testsuite-heptan-order1.at \
+	heptan/testsuite-heptan-order2.at \
+	heptan/testsuite-heptan-order3.at \
+	heptan/testsuite-heptan-order4.at \
+	isoleucine/testsuite-isoleucine-order1.at \
+	isoleucine/testsuite-isoleucine-order2.at \
+	isoleucine/testsuite-isoleucine-order3.at \
+	isoleucine/testsuite-isoleucine-order4.at \
+	isoleucine/testsuite-isoleucine-order5.at \
+	isoleucine/testsuite-isoleucine-order6.at \
+	neohexane/testsuite-neohexane-order1.at \
+	neohexane/testsuite-neohexane-order2.at \
+	neohexane/testsuite-neohexane-order3.at \
+	neohexane/testsuite-neohexane-order4.at \
+	neohexane/testsuite-neohexane-order5.at \
+	neohexane/testsuite-neohexane-order6.at \
+	N_N-dimethylacetamide/testsuite-N_N-dimethylacetamide-order1.at \
+	N_N-dimethylacetamide/testsuite-N_N-dimethylacetamide-order2.at \
+	N_N-dimethylacetamide/testsuite-N_N-dimethylacetamide-order3.at \
+	N_N-dimethylacetamide/testsuite-N_N-dimethylacetamide-order4.at \
+	N_N-dimethylacetamide/testsuite-N_N-dimethylacetamide-order5.at \
+	N_N-dimethylacetamide/testsuite-N_N-dimethylacetamide-order6.at \
+	proline/testsuite-proline-order1.at \
+	proline/testsuite-proline-order2.at \
+	proline/testsuite-proline-order3.at \
+	proline/testsuite-proline-order4.at \
+	proline/testsuite-proline-order5.at \
+	proline/testsuite-proline-order6.at \
+	putrescine/testsuite-putrescine-order1.at \
+	putrescine/testsuite-putrescine-order2.at \
+	putrescine/testsuite-putrescine-order3.at \
+	putrescine/testsuite-putrescine-order4.at \
+	putrescine/testsuite-putrescine-order5.at \
+	putrescine/testsuite-putrescine-order6.at \
+	tartaric_acid/testsuite-tartaric_acid-order1.at \
+	tartaric_acid/testsuite-tartaric_acid-order2.at \
+	tartaric_acid/testsuite-tartaric_acid-order3.at \
+	tartaric_acid/testsuite-tartaric_acid-order4.at \
+	tartaric_acid/testsuite-tartaric_acid-order5.at \
+	tartaric_acid/testsuite-tartaric_acid-order6.at
+
+max_jobs = 4
+ 
+check-local: atconfig atlocal $(TESTSUITE)
+	nrjobs=; \
+	for flag in $$MAKEFLAGS; do \
+		case $$flag in \
+		--* | =*=) ;; \
+		*j*) nrjobs="-j$(max_jobs)" ;; \
+		esac; \
+	done; \
+	$(SHELL) '$(TESTSUITE)' $$nrjobs $(TESTSUITEFLAGS)
+
+installcheck-local: atconfig atlocal $(TESTSUITE)
+	$(SHELL) '$(TESTSUITE)' 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'
