]
);
+dnl Blackbox test suite
+PKG_CHECK_MODULES([CMOCKA], [cmocka >= 1.1.0], [cmocka=true], [cmocka=false])
+PKG_CHECK_MODULES([LXC], [lxc >= 2.0.0], [lxc=true], [lxc=false])
+AM_CONDITIONAL(BLACKBOX_TESTS, test "$cmocka" = true -a "$lxc" = true)
+
dnl Install test binaries
AC_ARG_ENABLE([install_tests],
[AS_HELP_STRING([--enable-install-tests], [include test binaries in installation])],
test_cases_channel_shutdown.c \
test_cases_channel_conn.c
-run_blackbox_tests_LDADD = ../../../src/libmeshlink.la -llxc -lcmocka
-run_blackbox_tests_CFLAGS = -D_GNU_SOURCE
+run_blackbox_tests_LDADD = ../../../src/libmeshlink.la $(LXC_LIBS) $(CMOCKA_LIBS)
+run_blackbox_tests_CFLAGS = -D_GNU_SOURCE $(LXC_CFLAGS) $(CMOCKA_CFLAGS)