diff --git a/configure.ac b/configure.ac
index d14e193..645b341 100644
--- a/configure.ac
+++ b/configure.ac
@@ -192,18 +192,18 @@ AM_CONDITIONAL(USE_GSTREAMER, test x"$HAVE_GSTREAMER" = "xyes")
 AC_SUBST(GSTREAMER_CFLAGS)
 AC_SUBST(GSTREAMER_LIBS)
 
-dnl Check for check
-PKG_CHECK_MODULES(CHECK, check >= 0.9.4, HAVE_CHECK=yes, HAVE_CHECK=no)
-
-if test x"$HAVE_CHECK" = "xyes"; then
-  AC_DEFINE(HAVE_CHECK, 1, [Define if check support is enabled])
+dnl Check for check, which dmapd uses for its unit tests
+AC_ARG_ENABLE(check, [  --disable-check         do not build check support], enable_check=$enableval, enable_check=yes)
+if test x$enable_check = xyes; then
+	PKG_CHECK_MODULES([CHECK], [check >= 0.9.4],have_check=yes,have_check=no)
+	AM_CONDITIONAL(USE_CHECK, test x"$have_check" = "xyes")
+	if test "x$have_check" = "xyes"; then
+		AC_DEFINE(HAVE_CHECK, 1, [Define if check support is enabled])
+	fi
+else
+	AM_CONDITIONAL(USE_CHECK, false)
 fi
 
-AM_CONDITIONAL(USE_CHECK, test x"$HAVE_CHECK" = "xyes")
-
-AC_SUBST(CHECK_CFLAGS)
-AC_SUBST(CHECK_LIBS)
-
 AM_CONDITIONAL(FLYN, test "$FLYN")
 
 AC_OUTPUT([
