)
AC_MSG_RESULT([$enable_unit_tests])
AM_CONDITIONAL([UNIT_TESTS], [test "x$enable_unit_tests" != "xno"])
- AS_IF([test "x$enable_unit_tests" != "xno"], [
+
+ AC_MSG_CHECKING([whether to enable backend unit test building])
+ AC_ARG_ENABLE([backend-unit-tests],
+ AS_HELP_STRING([--enable-backend-unit-tests],
+ [enable backend unit test building @<:@default=no@:>@]),
+ [enable_backend_unit_tests=$enableval],
+ [enable_backend_unit_tests=no]
+ )
+ AC_MSG_RESULT([$enable_backend_unit_tests])
+ AM_CONDITIONAL([BACKEND_UNIT_TESTS], [test "x$enable_backend_unit_tests" != "xno"])
+
+ AS_IF([test "x$enable_unit_tests" != "xno" || test "x$enable_backend_unit_tests" != "xno"], [
BOOST_TEST([mt])
])
])
remotebackend_json.log: remotebackend_http.log remotebackend_post.log
-#if UNIT_TESTS
-#TESTS = \
-# remotebackend_pipe.test \
-# remotebackend_unix.test \
-# remotebackend_http.test \
-# remotebackend_post.test \
-# remotebackend_json.test \
-# remotebackend_zeromq.test
-#
-#endif
+if BACKEND_UNIT_TESTS
+TESTS = \
+ remotebackend_pipe.test \
+ remotebackend_unix.test \
+ remotebackend_http.test \
+ remotebackend_post.test \
+ remotebackend_json.test \
+ remotebackend_zeromq.test
+
+endif
BUILT_SOURCES = ../../pdns/dnslabeltext.cc