]> granicus.if.org Git - pdns/commitdiff
Split PDNS_ENABLE_UNIT_TESTS so recursor, dnsdist dont have meaningless --enable...
authorChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Tue, 3 Apr 2018 08:55:38 +0000 (10:55 +0200)
committerChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Tue, 3 Apr 2018 08:55:38 +0000 (10:55 +0200)
configure.ac
m4/pdns_enable_backend_unit_tests.m4 [new file with mode: 0644]
m4/pdns_enable_unit_tests.m4

index 022c43bbaec42aa42bd7190766370fee3ae73e14..6f9258ae4d2b7e647b19562fc860156b14cfc3f3 100644 (file)
@@ -116,6 +116,7 @@ AS_IF([test "$boost_cv_lib_program_options" = "no"], [
   AC_MSG_ERROR([Boost Program Options library not found])
 ])
 PDNS_ENABLE_UNIT_TESTS
+PDNS_ENABLE_BACKEND_UNIT_TESTS
 PDNS_ENABLE_REPRODUCIBLE
 
 PDNS_WITH_SQLITE3
diff --git a/m4/pdns_enable_backend_unit_tests.m4 b/m4/pdns_enable_backend_unit_tests.m4
new file mode 100644 (file)
index 0000000..8d81897
--- /dev/null
@@ -0,0 +1,18 @@
+AC_DEFUN([PDNS_ENABLE_BACKEND_UNIT_TESTS], [
+  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_backend_unit_tests" != "xno"], [
+     BOOST_TEST([mt])
+     AS_IF([test "$boost_cv_lib_unit_test_framework" = "no"], [
+       AC_MSG_ERROR([Boost Unit Test library not found])
+     ])
+   ])
+])
index abc4ec00b249e86959805e9f54c5857173385f88..f34fbe03cf7cf9b7b5c6d1ab29c879790170631b 100644 (file)
@@ -9,17 +9,7 @@ AC_DEFUN([PDNS_ENABLE_UNIT_TESTS], [
   AC_MSG_RESULT([$enable_unit_tests])
   AM_CONDITIONAL([UNIT_TESTS], [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"], [
+  AS_IF([test "x$enable_unit_tests" != "xno"], [
      BOOST_TEST([mt])
      AS_IF([test "$boost_cv_lib_unit_test_framework" = "no"], [
        AC_MSG_ERROR([Boost Unit Test library not found])