diff --git a/tests/Makefile.am b/tests/Makefile.am
--- /dev/null
+++ b/tests/Makefile.am
@@ -0,0 +1,9 @@
+if HAVE_CHECK
+SUBDIRS_CHECK = check
+else
+SUBDIRS_CHECK =
+endif
+
+SUBDIRS = $(SUBDIRS_CHECK)
+
+DIST_SUBDIRS = check