summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2019-10-26 08:29:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-10-26 08:29:53 +0000
commitd608b19e0d3b3f4d84fcfcdd72bb7e64c86b6f01 (patch)
tree8c283d1c81d718e64d87d9a2d1132c89f3915939 /configure.ac
parentReleasing debian version 1.18.0-1. (diff)
downloadnetdata-d608b19e0d3b3f4d84fcfcdd72bb7e64c86b6f01.tar.xz
netdata-d608b19e0d3b3f4d84fcfcdd72bb7e64c86b6f01.zip
Merging upstream version 1.18.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac27
1 files changed, 27 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index a966f0ea6..ea91a7299 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1130,6 +1130,31 @@ AC_SUBST([OPTIONAL_PROMETHEUS_REMOTE_WRITE_LIBS])
AC_SUBST([OPTIONAL_MONGOC_CFLAGS])
AC_SUBST([OPTIONAL_MONGOC_LIBS])
+# -----------------------------------------------------------------------------
+# Check if cmocka is available - needed for unit testing
+
+AC_ARG_ENABLE(
+ [unit-tests],
+ [AS_HELP_STRING([--disable-unit-tests],
+ [Disables building and running the unit tests suite])],
+ [],
+ [enable_unit_tests="yes"]
+)
+
+PKG_CHECK_MODULES(
+ [CMOCKA],
+ [cmocka],
+ [have_cmocka="yes"],
+ [AC_MSG_NOTICE([CMocka not found on the system. Unit tests disabled])]
+)
+AM_CONDITIONAL([ENABLE_UNITTESTS], [test "${enable_unit_tests}" = "yes" -a "${have_cmocka}" = "yes" ])
+AC_SUBST([ENABLE_UNITTESTS])
+
+TEST_CFLAGS="${CFLAGS} ${CMOCKA_CFLAGS}"
+TEST_LIBS="${CMOCKA_LIBS}"
+
+AC_SUBST([TEST_CFLAGS])
+AC_SUBST([TEST_LIBS])
AC_CONFIG_FILES([
Makefile
@@ -1172,6 +1197,7 @@ AC_CONFIG_FILES([
health/Makefile
health/notifications/Makefile
libnetdata/Makefile
+ libnetdata/tests/Makefile
libnetdata/adaptive_resortable_list/Makefile
libnetdata/avl/Makefile
libnetdata/buffer/Makefile
@@ -1187,6 +1213,7 @@ AC_CONFIG_FILES([
libnetdata/socket/Makefile
libnetdata/statistical/Makefile
libnetdata/storage_number/Makefile
+ libnetdata/storage_number/tests/Makefile
libnetdata/threads/Makefile
libnetdata/url/Makefile
libnetdata/json/Makefile