summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorvkalintiris <vasilis@netdata.cloud>2022-12-22 13:18:55 +0200
committerGitHub <noreply@github.com>2022-12-22 13:18:55 +0200
commit6f42311c4b32d42798f78de1fd43f53694f24e6e (patch)
treea48e85baea0d2feabdcddf1426a6a3c8c46c5568 /configure.ac
parentc1aec98b30d8a4e80813cfccd636c31999c7ae3e (diff)
Revert "Refactor ML code and add support for multiple KMeans models. … (#14172)
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac23
1 files changed, 22 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 2670bc9ce0..53e673c2a6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -208,6 +208,12 @@ AC_ARG_ENABLE(
[enable_ml="detect"]
)
AC_ARG_ENABLE(
+ [ml_tests],
+ [AS_HELP_STRING([--enable-ml-tests], [Enable anomaly detection tests @<:@no@:>@])],
+ [enable_ml_tests="yes"],
+ [enable_ml_tests="no"]
+)
+AC_ARG_ENABLE(
[aclk_ssl_debug],
[AS_HELP_STRING([--enable-aclk-ssl-debug], [Enables possibility for SSL key logging @<:@default no@:>@])],
[aclk_ssl_debug="yes"],
@@ -1174,6 +1180,19 @@ if test "${build_ml}" = "yes"; then
OPTIONAL_ML_LIBS=""
fi
+# Decide if we should build ML tests.
+if test "${build_ml}" = "yes" -a "${enable_ml_tests}" = "yes" -a "${have_gtest}" = "yes"; then
+ build_ml_tests="yes"
+else
+ build_ml_tests="no"
+fi
+
+AM_CONDITIONAL([ENABLE_ML_TESTS], [test "${build_ml_tests}" = "yes"])
+if test "${build_ml_tests}" = "yes"; then
+ AC_DEFINE([ENABLE_ML_TESTS], [1], [anomaly detection tests])
+ OPTIONAL_ML_TESTS_CFLAGS="${OPTIONAL_GTEST_CFLAGS}"
+ OPTIONAL_ML_TESTS_LIBS="${OPTIONAL_GTEST_LIBS}"
+fi
# -----------------------------------------------------------------------------
# ebpf.plugin
@@ -1593,7 +1612,7 @@ CFLAGS="${originalCFLAGS} ${OPTIONAL_LTO_CFLAGS} ${OPTIONAL_PROTOBUF_CFLAGS} ${O
${OPTIONAL_LIBCAP_CFLAGS} ${OPTIONAL_IPMIMONITORING_CFLAGS} ${OPTIONAL_CUPS_CFLAGS} ${OPTIONAL_XENSTAT_FLAGS} \
${OPTIONAL_KINESIS_CFLAGS} ${OPTIONAL_PUBSUB_CFLAGS} ${OPTIONAL_PROMETHEUS_REMOTE_WRITE_CFLAGS} \
${OPTIONAL_MONGOC_CFLAGS} ${LWS_CFLAGS} ${OPTIONAL_JSONC_STATIC_CFLAGS} ${OPTIONAL_BPF_CFLAGS} ${JUDY_CFLAGS} \
- ${OPTIONAL_ACLK_CFLAGS} ${OPTIONAL_ML_CFLAGS} ${OPTIONAL_OS_DEP_CFLAGS}"
+ ${OPTIONAL_ACLK_CFLAGS} ${OPTIONAL_ML_CFLAGS} ${OPTIONAL_ML_TESTS_CFLAGS} ${OPTIONAL_OS_DEP_CFLAGS}"
CXXFLAGS="${CFLAGS} ${CXX11FLAG}"
@@ -1647,6 +1666,8 @@ AC_SUBST([OPTIONAL_GTEST_CFLAGS])
AC_SUBST([OPTIONAL_GTEST_LIBS])
AC_SUBST([OPTIONAL_ML_CFLAGS])
AC_SUBST([OPTIONAL_ML_LIBS])
+AC_SUBST([OPTIONAL_ML_TESTS_CFLAGS])
+AC_SUBST([OPTIONAL_ML_TESTS_LIBS])
# -----------------------------------------------------------------------------
# Check if cmocka is available - needed for unit testing