From: Chris Hofstaedtler Date: Tue, 3 Apr 2018 08:55:38 +0000 (+0200) Subject: Split PDNS_ENABLE_UNIT_TESTS so recursor, dnsdist dont have meaningless --enable... X-Git-Tag: dnsdist-1.3.1~180^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F6436%2Fhead;p=thirdparty%2Fpdns.git Split PDNS_ENABLE_UNIT_TESTS so recursor, dnsdist dont have meaningless --enable-backend-unit-tests --- diff --git a/configure.ac b/configure.ac index 022c43bbae..6f9258ae4d 100644 --- a/configure.ac +++ b/configure.ac @@ -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 index 0000000000..8d818973f5 --- /dev/null +++ b/m4/pdns_enable_backend_unit_tests.m4 @@ -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]) + ]) + ]) +]) diff --git a/m4/pdns_enable_unit_tests.m4 b/m4/pdns_enable_unit_tests.m4 index abc4ec00b2..f34fbe03cf 100644 --- a/m4/pdns_enable_unit_tests.m4 +++ b/m4/pdns_enable_unit_tests.m4 @@ -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])