diff --git a/configure.ac b/configure.ac
index a37d6f7..ec7d410 100644
--- a/configure.ac
+++ b/configure.ac
@@ -103,8 +103,14 @@ AC_PROG_INSTALL
 AM_PROG_AR
 LT_INIT
 
-# Checks for libraries.
-PKG_CHECK_MODULES([CHECK], [check >= 0.11.0], [tests=yes], [tests=no])
+AC_ARG_ENABLE([tests],
+              AS_HELP_STRING([--enable-tests], [Build tests]))
+
+AS_IF([test "x$enable_tests" = "xyes"],
+      [PKG_CHECK_MODULES([CHECK], [check >= 0.11.0],
+                         [tests=yes],
+                         [AC_MSG_FAILURE([--enable-tests was given, but dependency check wasn't found])])],
+      [])
 AM_CONDITIONAL([TESTS], [test x${tests} = xyes])
 
 # Checks for typedefs, structures, and compiler characteristics.