summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in17
1 files changed, 17 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 6b5d65a3..db1376f9 100644
--- a/configure.in
+++ b/configure.in
@@ -701,6 +701,22 @@ if test "x$PROFILING" = xyes; then
fi
################################################################################
+dnl -- Enable testing
+AC_MSG_CHECKING(whether to enable unit testing)
+AC_ARG_ENABLE(testing,
+ AC_HELP_STRING(--enable-testing, [enable testing targets in the makefile]),
+ TESTING=$enableval, TESTING=no)
+AC_MSG_RESULT($TESTING)
+
+if test "$TESTING" = yes; then
+ AC_PATH_PROG(RUBY19, ruby1.9)
+ AC_PATH_PROG(VALGRIND, valgrind)
+ if test -z "$RUBY19" -o -z "$VALGRIND"; then
+ AC_MSG_ERROR([ruby1.9 and valgrind are required for testing])
+ fi
+fi
+
+################################################################################
dnl -- Disable devmapper
AC_MSG_CHECKING(whether to use device-mapper)
AC_ARG_ENABLE(devmapper,
@@ -1260,6 +1276,7 @@ AC_SUBST(SELINUX_PC)
AC_SUBST(SNAPSHOTS)
AC_SUBST(STATICDIR)
AC_SUBST(STATIC_LINK)
+AC_SUBST(TESTING)
AC_SUBST(UDEV_LIBS)
AC_SUBST(UDEV_PC)
AC_SUBST(UDEV_RULES)