forked from PowerDNS/weakforced
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpdns_enable_unit_tests.m4
28 lines (26 loc) · 1.06 KB
/
pdns_enable_unit_tests.m4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
AC_DEFUN([PDNS_ENABLE_UNIT_TESTS], [
AC_MSG_CHECKING([whether to enable unit test building])
AC_ARG_ENABLE([unit-tests],
AS_HELP_STRING([--enable-unit-tests],
[enable unit test building @<:@default=no@:>@]),
[enable_unit_tests=$enableval],
[enable_unit_tests=no]
)
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"], [
BOOST_TEST([mt])
AS_IF([test "$boost_cv_lib_unit_test_framework" = "no"], [
AC_MSG_ERROR([Boost Unit Test library not found])
])
])
])